CN108075943A - Test packet building method and device - Google Patents
Test packet building method and device Download PDFInfo
- Publication number
- CN108075943A CN108075943A CN201611033377.2A CN201611033377A CN108075943A CN 108075943 A CN108075943 A CN 108075943A CN 201611033377 A CN201611033377 A CN 201611033377A CN 108075943 A CN108075943 A CN 108075943A
- Authority
- CN
- China
- Prior art keywords
- port
- message
- test
- loopback
- forwarding
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/50—Testing arrangements
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Disclose a kind of test packet building method and device.The described method includes:One physical port of the first test equipment is arranged to loopback port, the transmitter of the loopback port is connected with receiver;Mirror image rule is set in the forwarding chip of first test equipment, the mirror image rule indicates that the arbitrary message that the loopback port receives is replicated the message loopback port that is a and obtaining duplication and sent by the forwarding chip, and the forwarding chip is asic chip;The CPU generation test packets of first test equipment, and send the test packet with the loopback port.The application is not required to additionally increase special chip in the first test equipment, CPU is only needed to generate a small amount of test packet, substantial amounts of test packet can just be obtained by combining the mirror image of the physical port with loop fuction and asic chip basis afterwards, so as to realize the construction of a large amount of test packets on the premise of CPU burdens are not aggravated.
Description
Technical field
The present embodiments relate to technical field of the computer network, more particularly to a kind of test packet building method and dress
It puts.
Background technology
Service provider's (English:Service provider, SP) in order to verify network effect can reach it is expected or
For diagnostic network present situation, generally require to measure the network performance of network, to determine the service quality of network.In measurement internetworking
During energy, SP constructs large-scale simulating traffic to simulate the big flow user environment in reality most possibly.It is big based on this
The simulating traffic of scale can carry out the measurement of various network performance quality.The large-scale simulating traffic is reported for substantial amounts of test
Text.
Some network equipments field programmable gate array (English:Field-programmable gate array,
FPGA) or network processing unit is (English:Network processor, NP) it is used as forwarding chip.Forwarding chip realizes the network equipment
Data surface function, be generally used for the work that processing is simple but burden is big.FPGA or NP can be used to construct substantial amounts of test
Message.Some network equipments application-specific integrated circuit (English:Application-specific integrated circuit,
ASIC) chip is as forwarding chip.The function of asic chip has been fixed in production, if the asic chip is not supported to give birth to
Into test packet, then central processing unit (English can only be used using the network equipment of the asic chip:central processing
Unit, CPU) or the substantial amounts of test packet of additional special chip construction.Control chips of the CPU as the network equipment realizes net
The control plane function of network equipment is generally used for the work that processing is flexible, complicated but burden is small.If construct substantial amounts of survey with CPU
Message is tried, then can largely occupy the ability to work of CPU, influences the performance of the network equipment.If addition is additional in the network device
Special chip construct substantial amounts of test packet, then add the complexity of the network equipment.
The content of the invention
In order to solve the problems, such as correlation technique, this application provides a kind of test packet building method and devices.The skill
Art scheme is as follows:
In a first aspect, a kind of test packet building method is provided, the described method includes:
One physical port of the first test equipment is arranged to loopback port, the transmitter of the loopback port and reception
Device is connected;
Mirror image rule is set in the forwarding chip of first test equipment, and the mirror image rule indicates the forwarding core
The arbitrary message that the loopback port receives is replicated the message loopback port that is a and obtaining duplication and sent by piece,
The forwarding chip is application-specific integrated circuit ASIC chip;
The central processor CPU generation test packet of first test equipment, and described in the transmission of the loopback port
Test packet.
Since the transmitter of loopback port is connected with receiver, meeting after which sends in loopback port
Port is looped back to be received.Afterwards, in forwarding chip in the presence of mirror image rule, test report that loopback port receives
Text will be replicated portion, and the test packet that duplication obtains can be looped back transmitted by port again.Loopback port is sent at this time
Test packet continues to perform above-mentioned loopback and replicate to operate, and so repeats, it becomes possible to obtain substantial amounts of test packet.
Substantial amounts of test packet can be used for simulating the big flow user environment in reality, to realize the survey to various network performance quality
Amount.
CPU need to only generate a small amount of test packet in the application, afterwards combine with loop fuction physical port and
The image feature on asic chip basis can just obtain substantial amounts of test packet, right in test packet construction process so as to reduce
The occupancy of the ability to work of CPU.And due to the basic function that image feature is asic chip, physical port is arranged to loopback end
Mouth is also without additional special chip, and therefore, the application is not required to additionally increase special chip in the first test equipment, with regard to energy
The construction of a large amount of test packets is realized on the premise of CPU burdens are not aggravated.
Further, the arbitrary message that the forwarding chip is received with the forwarding port forwarding loopback port, it is described
Forward another physical port that port is first test equipment.
In the application after test packet, which is looped back port, to be received, survey that forwarding chip can not only receive loopback port
It tries message and replicates a, the test packet that loopback port receives can be also forwarded to forwarding port, so as to subsequently can be with
Based on test packet formed flow is forwarded to carry out the measurement of various network performance quality.
Further, the forwarding chip is based on scheduled rate, limits the rate of the flow from the loopback port,
So that the transmission rate of test packet meets specifically measurement demand.
Further, the method further includes:
Multiple reflection messages of the second test equipment transmission are received, the multiple reflection message has with the test packet
Identical message characteristic;
The number for the message that the loopback port is received subtracts the number of the multiple reflection message, obtains packet loss
Number;
The number for the message that the number of dropped packets divided by the loopback port are received, obtains packet loss.
Second test equipment often receives a test packet can send a reflection message to the first test equipment.
In addition, in practical application, when determining packet loss, can be not only determined by the first test equipment, it can also be by
Second test equipment is determined or is carried out by other network equipments in addition to the first test equipment and the second test equipment
It determines, the application is not construed as limiting this.And it when determining packet loss, can also be determined at times, can be subsequently based on
The packet loss of each period draws real-time packet loss curve.
Second aspect, provides a kind of first test equipment, and first test equipment includes:Central processor CPU, extremely
Few two physical ports and forwarding chip;
At least two physical port includes loopback port, and the transmitter of the loopback port is connected with receiver;
The forwarding chip is application-specific integrated circuit ASIC chip, and mirror image rule, institute are provided in the forwarding chip
It states mirror image rule and indicates that the arbitrary message that the loopback port receives is replicated a and obtains duplication by the forwarding chip
Message sent with the loopback port;
The CPU for generating test packet, and sends the test packet with the loopback port.
Wherein, at least two physical port further includes forwarding port;The forwarding chip, for the forwarding end
Mouth forwards the arbitrary message that the loopback port receives.
Further, the forwarding chip is additionally operable to, based on scheduled rate, limit the flow from the loopback port
Rate.
Wherein, the forwarding port, for receiving multiple reflection messages that the second test equipment is sent, the multiple reflection
Message has identical message characteristic with the test packet;
The CPU, the number for being additionally operable to the message for receiving the loopback port subtract the multiple reflection message
Number obtains number of dropped packets;The number for the message that the number of dropped packets divided by the loopback port are received, obtains packet loss.
The skill that the technique effect technological means corresponding with first aspect that above-mentioned the application second aspect is obtained obtains
Art effect is approximate, repeats no more herein.
The third aspect, this application provides a kind of computer storage medias, are provided for saving as above-mentioned second aspect
The first test equipment used in computer software instructions or storage for performing above-mentioned second aspect as the first test equipment institute
The program of design.
Description of the drawings
Figure 1A is a kind of flow chart of test packet building method provided in an embodiment of the present invention;
Figure 1B is a kind of schematic diagram of test packet construction process provided in an embodiment of the present invention;
Fig. 1 C are the schematic diagrames of the measurement process under a kind of internal scene provided in an embodiment of the present invention;
Fig. 1 D are the schematic diagrames of the measurement process under a kind of outer scene provided in an embodiment of the present invention;
Fig. 2 is a kind of structure diagram of first test equipment provided in an embodiment of the present invention.
Specific embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with attached drawing to the present invention
Embodiment is described in further detail.
Before to the embodiment of the present invention carrying out that explanation is explained in detail, first the application scenarios of the embodiment of the present invention are given
Explanation.In modern network charter business, SP usually requires that the various network performance quality of network are measured to obtain matter
Measurement is reported, the service quality of network is proved will pass through quality measurement reports to user.In addition, after the completion of network deployment
SP or other networks contractor can also measure various network performance quality, to verify that can network effect reach pre-
Phase.Furthermore network ownership can also measure various network performance quality periodically or on specific opportunity, to diagnose net
Network present situation.
When being measured to various network performance quality, SP constructs large-scale simulating traffic and carrys out maximum possible simulation
Go out the big flow user environment in reality.The survey of various network performance quality can be carried out based on the large-scale simulating traffic
Amount.The large-scale simulating traffic is substantial amounts of test packet.
In correlation technique, if the network equipment, by the use of asic chip as forwarding chip, and the asic chip is not supported to generate
Test packet, then the network equipment CPU or additional special chip can only be used to construct substantial amounts of test packet.If it is constructed with CPU
Substantial amounts of test packet then can largely occupy the ability to work of CPU, influence the performance of the network equipment.If in the network device
It adds additional special chip and constructs substantial amounts of test packet, then add the complexity of the network equipment.For this purpose, the present invention is implemented
Example provides a kind of test packet building method, not influence the performance of the network equipment and not increase the complexity of the network equipment
On the premise of degree, the construction of a large amount of test packets is realized.
Figure 1A is a kind of flow chart of test packet building method provided in an embodiment of the present invention, and this method is applied to first
Test equipment.Referring to Figure 1A, this method includes:
Step 101:One physical port of the first test equipment is arranged to loopback port, the transmitter of loopback port with
Receiver is connected.
Loopback (English:Loopback) refer to the transmitter of a certain physical port with receiver being connected, so that the object
The message that reason port is sent is received again by the physical port.Wherein, in embodiments of the present invention, the transmitter of loopback port with
Receiver is connected, and the message that loopback port is sent at this time will be looped back port and be received.
In addition, the transmitter of loopback port can be connected with receiver by External cable, an optical fiber can be such as used
The transmitter of loopback port is connected with receiver.Certainly, the transmitter of loopback port can also pass through loopback with receiver
Physical layer (the English of port in itself:Physical layer, PHY) chip is connected, at this time the transmitting terminal in the PHY chip with
Receiving terminal is directly connected to.
Step 102:Mirror image rule, mirror image rule instruction forwarding chip are set in the forwarding chip of the first test equipment
The arbitrary message that loopback port receives is replicated a and obtained message loopback port transmission will be replicated.
The forwarding chip of first test equipment can be asic chip.
In addition, mirror image (English:Mirror) refer to replicate a by the message that a port receives and obtain duplication
Message sent with another port.Wherein, in embodiments of the present invention, it is that the message for receiving loopback port replicates
Message that is a and obtaining duplication is sent again with loopback port.
Step 103:The CPU generation test packets of first test equipment, and send the test packet with loopback port.
Test packet is the message available for the measurement for carrying out various network performance quality.
Wherein, when CPU generates test packet, message generation requirement can be first set, come further according to message generation requirement
Generate test packet.
Message generation requirement can be configured according to specifically measurement demand, and message generation requirement can pass through
Configuration file is configured, it is of course also possible to be configured otherwise, the embodiment of the present invention is not construed as limiting this.
Wherein, message generation requirement can include message format, message length, destination address etc..
Wherein, when CPU sends test packet with loopback port, since the transmitter of loopback port is connected with receiver,
Therefore, which can be looped back port after being sent in loopback port and be received.Afterwards, mirror image rule is deposited in forwarding chip
In case, the test packet that loopback port receives will be replicated portion, and the test packet that duplication obtains again can quilt
Transmitted by loopback port.The test packet that loopback port is sent at this time continues to perform above-mentioned loopback and replicate to operate, so
It repeats, it becomes possible to obtain substantial amounts of test packet.The big flow that substantial amounts of test packet can be used for simulating in reality is used
Family environment, to realize the measurement to various network performance quality.
In the embodiment of the present invention, CPU need to only generate a small amount of test packet, combine the physics end with loop fuction afterwards
Mouth and the image feature on asic chip basis can just obtain substantial amounts of test packet, so as to reduce test packet construction process
In to the occupancy of the ability to work of CPU.And due to the basic function that image feature is asic chip, physical port is arranged to ring
Port is gone back to also without additional special chip, therefore, the application is not required to additionally increase special chip in the first test equipment,
With regard to that can realize the construction of a large amount of test packets on the premise of CPU burdens are not aggravated.
In practical application, the end opportunity of the loopback on above-mentioned loopback port and duplication operation can also be configured,
It can such as terminate the loopback on loopback port and replicate to operate when the number of obtained test packet is predetermined number;Also may be used
When current time is preset time, to terminate the loopback on loopback port and replicate to operate;It is, of course, also possible in other situations
The lower loopback terminated on loopback port and duplication operate, and the embodiment of the present invention is not construed as limiting this.Wherein, predetermined number and default
Time can in advance be configured according to specific measurement demand.
Further, the arbitrary message that forwarding chip can also be received with forwarding port forwarding loopback port, that is to say,
After test packet, which is looped back port, to be received, the test packet that loopback port receives can not only be replicated portion by forwarding chip,
The test packet that loopback port receives with forwarding port can be also forwarded to, be forwarded can be subsequently based on test packet
The flow formed carries out the measurement of various network performance quality.
Forward another physical port that port is the first test equipment.And since in the embodiment of the present invention, loopback port connects
The message received be test packet, therefore, forwarding port can for test packet destination address in the forwarding table of storage institute
Corresponding forwarding port.
In addition, after generating some message under normal circumstances, directly the message can be forwarded to corresponding forwarding port.
And in the embodiment of the present invention, then it is first forcibly to send out test packet with loopback port after CPU generation test packets
It send, substantial amounts of test packet is obtained to be based on the test packet.After substantial amounts of test packet is obtained, then with corresponding turn
Originator mouth normally forwards test packet, to form large-scale simulating traffic.
Figure 1B is a kind of schematic diagram of test packet construction process provided in an embodiment of the present invention, further, with reference to figure
1B illustrates test packet building method provided in an embodiment of the present invention.Wherein, loopback port-for-port P1, test report
The forwarding port-for-port P2 of text.
In the first step, CPU generates a test packet 1.CPU sends test packet 1 with loopback port P1, this
When test packet 1 be looped back port P1 again after loopback port P1 transmissions and received.Afterwards, forwarding chip meets loopback port P1
The test packet 1 received is forwarded to forwarding port P2.And the at this point, survey that forwarding chip can also receive loopback port P1
Examination message 1 replicates portion, and will replicate the obtained loopback port P1 transmissions of test packet 2.
In second step, the loopback port P1 of test packet 2 is sent, test packet 2 is sent in loopback port P1 at this time
Port P1 is looped back again afterwards to be received.Afterwards, the test packet 2 that forwarding chip receives loopback port P1 forwarding port P2
It is forwarded to.And at this point, the test packet 2 that forwarding chip can also receive loopback port P1 replicates portion, and will replicate
The test packet 3 arrived is sent with loopback port P1.
It so repeats, it will a test packet is all generated in each step, so as to be based only upon a survey of CPU generations
Try message, it becomes possible to substantial amounts of test packet is generated in a short time, such as when proceeding to N steps, it is possible to obtain N number of test
Message.
In practical application, when being measured based on substantial amounts of test packet to various network performance quality, test is reported
Required by the transmission rate of text will also tend to, thus, appointed in forwarding chip with what forwarding port forwarding loopback port received
It anticipates during message, forwarding chip is also based on scheduled rate, limits the rate of the flow from loopback port.Wherein,
Scheduled rate can be in advance configured according to specific measurement demand.
Wherein, forwarding chip is based on scheduled rate, when limiting the rate of the flow from loopback port, can pass through forwarding
The shaping feature of chip realizes that specifically, forwarding chip can be based on scheduled rate, and the flow from loopback port is carried out
Shaping, using will the rate limit from the flow of loopback port as scheduled rate.
Shaping (English:Shapping) refer to the transmission rate of message being restricted to some fixed rate, and shaping is also
One basic function of asic chip.
Important measurement index when further, due to being measured to various network performance quality is surveyed for packet loss
Therefore amount, after forwarding chip forwards the arbitrary message that loopback port receives with forwarding port, can also determine packet loss.
Specifically, the first test equipment can receive multiple reflection messages of the second test equipment transmission, and loopback port is received
The number of message subtract the number of the plurality of reflection message, obtain number of dropped packets, then the number of dropped packets divided by loopback port received
The number of the message arrived, obtains packet loss.
The plurality of reflection message and test packet have an identical message characteristic, the message characteristic can for message format,
Message length etc..And second test equipment often receive a test packet can to the first test equipment send one reflection report
Text.
Further, since the arbitrary message that forwarding chip can be received with forwarding port forwarding loopback port, therefore, loopback end
The number for the message that mouth receives is the number for the test packet that the first test equipment is sent to the second test equipment.
Furthermore in practical application, when determining packet loss, it can be not only determined by the first test equipment, it can also be by
Second test equipment is determined or is carried out by other network equipments in addition to the first test equipment and the second test equipment
It determines, the embodiment of the present invention is not construed as limiting this.And it when determining packet loss, can also be determined at times, so as to follow-up energy
Real-time packet loss curve is enough drawn based on the packet loss of each period.
Wherein, when determining packet loss by the second test equipment, forwarding chip is received with forwarding port forwarding loopback port
Arbitrary message after, the second test equipment can count the number of the test packet received, and be obtained from the first test equipment
Take the number for the test packet that the first test equipment sends to the second test equipment.Afterwards, the second test equipment can be by first
The number for the test packet that test equipment is sent to the second test equipment subtracts the test packet that the second test equipment receives
Number obtains number of dropped packets.For the test packet for again sending the number of dropped packets divided by the first test equipment to the second test equipment
Number, obtains packet loss.
Wherein, when determining packet loss by other network equipments in addition to the first test equipment and the second test equipment, the
The number for the test packet that one test equipment can send the first test equipment to the second test equipment is sent to the network and sets
Standby, the number of the test packet received can be also sent to the network equipment by the second test equipment.Afterwards, the network equipment
The number for the test packet that can send the first test equipment to the second test equipment subtracts what the second test equipment received
The number of test packet, obtains number of dropped packets.The survey for again sending the number of dropped packets divided by the first test equipment to the second test equipment
The number of message is tried, obtains packet loss.
When being measured to various network performance quality, usually there are three kinds of measurement scenes:First, internal scene, at this time
Measured zone is user's access interface (English:User to network interface, UNI)-UNI is to strange land user
Network between interface measures.2nd, outer scene, measured zone is Network-Node Interface (English at this time:network-
To-network interface, NNI)-NNI is that the network between network inner joint is measured.3rd, inside and outside scene,
Measured zone is UNI-NNI at this time, is that the network between strange land user interface and network inner joint is measured.Divide below
The other measurement process under these three measurement scenes illustrates.
Internal scene:UNI to the first test equipment and the network between the UNI of the second test equipment measure.
As shown in Figure 1 C, the UNI of the first test equipment is port A, and the UNI of the second test equipment is port B.First is surveyed
The port A of equipment is tried as loopback port, and mirror image rule is set in the forwarding chip of the first test equipment.First test is set
After standby CPU generation test packets, you can the test packet is sent with loopback port A, to obtain substantial amounts of test packet.It
Afterwards, substantial amounts of test packet is sent to by the first test equipment by the NNI of the first test equipment and the NNI of the second test equipment
Second test equipment after the second test equipment receives test packet, can send the test packet with port B.
At this point, if packet loss is determined by the first test equipment, the second test equipment can also set port B
It is set to loopback port.The test packet is received after port B transmissions by port B again at this time.Afterwards, the second test equipment can be with
The source address of the port B test packets received with destination address is swapped, obtains reflection message, and by the reflection message
First test equipment is sent to by reflector port, which can be the NNI of the second test equipment.
Wherein, the second test equipment swaps the source address of the test packet received in port B with destination address
When, accesses control list (English can be passed through:Access control list, ACL) it swaps, it is of course also possible to logical
It crosses other manner to swap, the embodiment of the present invention is not construed as limiting this.
It, can be in addition, before the reflection message is sent to the first test equipment by the second test equipment by reflector port
It first determines the reflector port, specifically, can the reflector port be redirected to based on ACL, it can also the forwarding table based on storage
The reflector port is found, it is of course also possible to determine the reflector port otherwise, the embodiment of the present invention does not limit this
It is fixed.
Outer scene:NNI to the first test equipment and the network between the NNI of the second test equipment measure.
As shown in figure iD, the NNI of the first test equipment is port C, and the NNI of the second test equipment is port D.Due to loopback
Port can carry out loopback to message, directly can not send message to other network equipments, and port C is as the first test equipment
It is to need to send message to the second test equipment, therefore, port C cannot function as ring to the forwarding port of the second test equipment
Port is gone back to, needs to select the port in addition to the C of port at this time in the first test equipment as loopback port.Assuming that selection port
Q sets mirror image rule as loopback port in the forwarding chip of the first test equipment.Then first test equipment at this time
After CPU generation test packets, you can the test packet is sent with loopback port Q, to obtain substantial amounts of test packet.Afterwards,
Substantial amounts of test packet is sent to the port D of the second test equipment by one test equipment by port C.
At this point, if packet loss is determined by the first test equipment, the second test equipment can also meet port D
The source address of the test packet received is swapped with destination address, obtains reflection message, and the reflection message is passed through port D
It is sent to the first test equipment.
Inside and outside scene:UNI to the first test equipment and the network between the NNI of the second test equipment measure;Or
Person, the NNI to the first test equipment and the network between the UNI of the second test equipment measure.
Wherein, when the network between the NNI to the UNI of the first test equipment and the second test equipment measures, the
The operation that one test equipment performs is identical with the operation that the first test equipment performs in above-mentioned internal scene, and the second test equipment is held
Capable operation is identical with the operation that the second test equipment in said external scene performs, and the embodiment of the present invention repeats no more this.
Wherein, when the network between the UNI to the NNI of the first test equipment and the second test equipment measures, the
The operation that one test equipment performs is identical with the operation that the first test equipment in said external scene performs, and the second test equipment is held
Capable operation is identical with the operation that the second test equipment performs in above-mentioned internal scene, and the embodiment of the present invention repeats no more this.
In embodiments of the present invention, a physical port of the first test equipment is arranged to loopback port, and first
After setting mirror image rule in the forwarding chip of test equipment, the CPU of the first test equipment can generate test packet, and use loopback
Port sends the test packet.Since the transmitter of loopback port is connected with receiver, which will be in ring
Port can be looped back after port is sent by, which returning, is received.Afterwards, in forwarding chip in the presence of mirror image rule, loopback port
The test packet received will be replicated portion, and the test packet that duplication obtains can be looped back transmitted by port again.At this time
The test packet that loopback port is sent continues to perform above-mentioned loopback and replicate to operate, and so repeats, it becomes possible to obtain
Substantial amounts of test packet.It that is to say, CPU need to only generate a small amount of test packet in the embodiment of the present invention, and combine has ring afterwards
Substantial amounts of test packet can just be obtained by returning the physical port of function and the image feature on asic chip basis, be surveyed so as to reduce
Try the occupancy of the ability to work in message construction process to CPU.And due to the basic function that image feature is asic chip, by object
Reason port is arranged to loopback port also without additional special chip, and therefore, the application is not required to the volume in the first test equipment
Outer increase special chip can just realize the construction of a large amount of test packets on the premise of CPU burdens are not aggravated.
Fig. 2 is a kind of structure diagram of first test equipment provided in an embodiment of the present invention.Referring to Fig. 2, the device bag
Include CPU201, at least two physical interfaces and forwarding chip 202;
At least two physical ports include loopback port 203, and the transmitter of loopback port 203 is connected with receiver;
Forwarding chip 202 is asic chip, and mirror image rule is provided in forwarding chip 202, mirror image rule instruction forwarding
The arbitrary message that loopback port 203 receives is replicated message loopback port 203 that is a and obtaining duplication and sent out by chip 202
It send;
CPU201 for generating test packet, and sends test packet with loopback port 203.
Optionally, at least two physical ports further include forwarding port 204;
Forwarding chip 202, for the arbitrary message received with forwarding port 204 forwarding loopback port 203.
Optionally, forwarding chip 202 are additionally operable to, based on scheduled rate, limit the speed of the flow from loopback port 203
Rate.
Optionally, port 204 is forwarded, for receiving multiple reflection messages that the second test equipment is sent, multiple reflection reports
Text has identical message characteristic with test packet;
CPU201, the number for being additionally operable to the message for receiving loopback port 203 subtract the number of multiple reflection messages, obtain
To number of dropped packets;The number for the message that number of dropped packets divided by loopback port 203 are received, obtains packet loss.
Wherein, CPU201 can be a kind of IC chip, have the processing capacity of signal.CPU can use hardware and
Software module combination performs some operations.Software module can be located at random access memory, and flash memory, read-only memory may be programmed only
In the storage medium for reading this fields such as memory or electrically erasable programmable memory, register maturation.
In addition, each nextport hardware component NextPort of the first test equipment is coupled by communication bus 205, wherein communication bus
205 in addition to including data/address bus, further includes power bus, controlling bus and status signal bus in addition.But for clear explanation,
Various buses are all designated as communication bus 205 in fig. 2.
In embodiments of the present invention, the CPU of the first test equipment can generate test packet, and sent and be somebody's turn to do with loopback port
Test packet.Since the transmitter of loopback port is connected with receiver, which will send in loopback port
After can be looped back port and received.Afterwards, in forwarding chip in the presence of mirror image rule, survey that loopback port receives
Examination message will be replicated portion, and the test packet that duplication obtains can be looped back transmitted by port again.Loopback port is sent out at this time
The test packet sent continues to perform above-mentioned loopback and replicate to operate, and so repeats, it becomes possible to largely be tested
Message.It that is to say, CPU need to only generate a small amount of test packet in the embodiment of the present invention, combine the object with loop fuction afterwards
The image feature on reason port and asic chip basis can just obtain substantial amounts of test packet, so as to reduce test packet construction
In the process to the occupancy of the ability to work of CPU.And due to the basic function that image feature is asic chip, physical port is set
It is loopback port also without additional special chip, therefore, the application is not required to additionally increase in the first test equipment special
Chip can just realize the construction of a large amount of test packets on the premise of CPU burdens are not aggravated.
It should be noted that:The first test equipment that above-described embodiment provides belongs to test packet building method embodiment
Same design, specific implementation process refer to embodiment of the method, and which is not described herein again.
One of ordinary skill in the art will appreciate that hardware can be passed through by realizing all or part of step of above-described embodiment
It completes, relevant hardware can also be instructed to complete by program, the program can be stored in a kind of computer-readable
In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all the present invention spirit and
Within principle, any modifications, equivalent replacements and improvements are made should all be included in the protection scope of the present invention.
Claims (8)
1. a kind of test packet building method, which is characterized in that the described method includes:
One physical port of the first test equipment is arranged to loopback port, transmitter and the receiver phase of the loopback port
Connection;
Mirror image rule is set in the forwarding chip of first test equipment, and the mirror image rule indicates that the forwarding chip will
The arbitrary message that the loopback port receives replicates the message loopback port that is a and obtaining duplication and sends, described
Forwarding chip is application-specific integrated circuit ASIC chip;
The central processor CPU generation test packet of first test equipment, and send the test with the loopback port
Message.
2. the method as described in claim 1, which is characterized in that the method further includes:
The arbitrary message that the forwarding chip is received with the forwarding port forwarding loopback port, the forwarding port is described
Another physical port of first test equipment.
3. method as claimed in claim 2, which is characterized in that the method further includes:
The forwarding chip is based on scheduled rate, limits the rate of the flow from the loopback port.
4. method as claimed in claim 2, which is characterized in that the method further includes:
Multiple reflection messages of the second test equipment transmission are received, the multiple reflection message has identical with the test packet
Message characteristic;
The number for the message that the loopback port is received subtracts the number of the multiple reflection message, obtains number of dropped packets;
The number for the message that the number of dropped packets divided by the loopback port are received, obtains packet loss.
5. a kind of first test equipment, which is characterized in that first test equipment includes:Central processor CPU, at least two
Physical port and forwarding chip;
At least two physical port includes loopback port, and the transmitter of the loopback port is connected with receiver;
The forwarding chip is application-specific integrated circuit ASIC chip, and mirror image rule, the mirror are provided in the forwarding chip
As the arbitrary message that the loopback port receives is replicated portion by the rule instruction forwarding chip and will replicate obtained report
Text is sent with the loopback port;
The CPU for generating test packet, and sends the test packet with the loopback port.
6. device as claimed in claim 5, which is characterized in that at least two physical port further includes forwarding port;
The forwarding chip, for the arbitrary message for the forwarding port loopback port being forwarded to receive.
7. device as claimed in claim 6, which is characterized in that the forwarding chip is additionally operable to based on scheduled rate, and limitation comes
From the rate of the flow of the loopback port.
8. device as claimed in claim 6, which is characterized in that the forwarding port sends for receiving the second test equipment
Multiple reflection messages, the multiple reflection message and the test packet is with identical message characteristic;
The CPU, the number for being additionally operable to the message for receiving the loopback port subtract the number of the multiple reflection message,
Obtain number of dropped packets;The number for the message that the number of dropped packets divided by the loopback port are received, obtains packet loss.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611033377.2A CN108075943A (en) | 2016-11-15 | 2016-11-15 | Test packet building method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611033377.2A CN108075943A (en) | 2016-11-15 | 2016-11-15 | Test packet building method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108075943A true CN108075943A (en) | 2018-05-25 |
Family
ID=62161270
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611033377.2A Pending CN108075943A (en) | 2016-11-15 | 2016-11-15 | Test packet building method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108075943A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110602001A (en) * | 2019-09-03 | 2019-12-20 | 北京东土军悦科技有限公司 | Far-end loopback testing device and method |
CN110891285A (en) * | 2019-12-03 | 2020-03-17 | 锐捷网络股份有限公司 | Transmitting equipment, reflecting equipment, network performance testing method and system |
CN110958079A (en) * | 2019-11-25 | 2020-04-03 | 新华三技术有限公司 | Test method, device and system |
CN111385166A (en) * | 2020-02-21 | 2020-07-07 | 苏州浪潮智能科技有限公司 | Network switch testing method, device, equipment and storage medium |
CN114244786A (en) * | 2021-11-30 | 2022-03-25 | 深圳市飞速创新技术股份有限公司 | Security protection method, device, equipment and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101056224A (en) * | 2007-05-31 | 2007-10-17 | 杭州华三通信技术有限公司 | A loop detection method and device for the network device |
CN101873236A (en) * | 2010-06-13 | 2010-10-27 | 中兴通讯股份有限公司 | Method and system for testing message |
WO2011124165A3 (en) * | 2011-05-10 | 2012-04-12 | 华为技术有限公司 | Method and device for detecting link loss ratio |
CN103236956A (en) * | 2013-04-18 | 2013-08-07 | 神州数码网络(北京)有限公司 | Method and switch for testing throughput of communication equipment |
CN103716248A (en) * | 2013-06-07 | 2014-04-09 | 潘晶 | Ethernet traffic generation and analysis method based on Ethernet switch chip |
CN104320184A (en) * | 2014-10-16 | 2015-01-28 | 武汉电信器件有限公司 | High-speed optical module for fiber channel |
-
2016
- 2016-11-15 CN CN201611033377.2A patent/CN108075943A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101056224A (en) * | 2007-05-31 | 2007-10-17 | 杭州华三通信技术有限公司 | A loop detection method and device for the network device |
CN101873236A (en) * | 2010-06-13 | 2010-10-27 | 中兴通讯股份有限公司 | Method and system for testing message |
WO2011124165A3 (en) * | 2011-05-10 | 2012-04-12 | 华为技术有限公司 | Method and device for detecting link loss ratio |
CN103236956A (en) * | 2013-04-18 | 2013-08-07 | 神州数码网络(北京)有限公司 | Method and switch for testing throughput of communication equipment |
CN103716248A (en) * | 2013-06-07 | 2014-04-09 | 潘晶 | Ethernet traffic generation and analysis method based on Ethernet switch chip |
CN104320184A (en) * | 2014-10-16 | 2015-01-28 | 武汉电信器件有限公司 | High-speed optical module for fiber channel |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110602001A (en) * | 2019-09-03 | 2019-12-20 | 北京东土军悦科技有限公司 | Far-end loopback testing device and method |
CN110602001B (en) * | 2019-09-03 | 2021-11-09 | 北京东土军悦科技有限公司 | Far-end loopback testing device and method |
CN110958079A (en) * | 2019-11-25 | 2020-04-03 | 新华三技术有限公司 | Test method, device and system |
CN110958079B (en) * | 2019-11-25 | 2022-07-01 | 新华三技术有限公司 | Test method, device and system |
CN110891285A (en) * | 2019-12-03 | 2020-03-17 | 锐捷网络股份有限公司 | Transmitting equipment, reflecting equipment, network performance testing method and system |
CN110891285B (en) * | 2019-12-03 | 2023-03-21 | 锐捷网络股份有限公司 | Transmitting equipment, reflecting equipment, network performance testing method and system |
CN111385166A (en) * | 2020-02-21 | 2020-07-07 | 苏州浪潮智能科技有限公司 | Network switch testing method, device, equipment and storage medium |
CN114244786A (en) * | 2021-11-30 | 2022-03-25 | 深圳市飞速创新技术股份有限公司 | Security protection method, device, equipment and storage medium |
CN114244786B (en) * | 2021-11-30 | 2024-05-10 | 深圳市飞速创新技术股份有限公司 | Security protection method, device, equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108075943A (en) | Test packet building method and device | |
US10484206B2 (en) | Path detection method in VxLAN, controller, and network device | |
CN107749802B (en) | Experiment platform and experiment method supporting protocol-independent data packet processing | |
US10355971B2 (en) | System and method for data path validation and verification | |
US10346344B2 (en) | Method, client device and data forwarding device for transmitting data through serial port | |
JP2006526303A (en) | System and method for boundary scan testing of wired or wireless networks | |
CN112039796B (en) | Data packet transmission method and device, storage medium and electronic equipment | |
US11398981B2 (en) | Path creation method and device for network on chip and electronic apparatus | |
CN109561395A (en) | A kind of blue-tooth transmission method and device | |
CN106487610A (en) | Double loop network test method for bit error rate and device | |
CN105743816B (en) | A kind of link aggregation method and device | |
CN109150645B (en) | Test method and system for switching chip | |
CN106656667B (en) | Test method, system and the control device of interchanger forwarding performance | |
WO2017028303A1 (en) | Method and apparatus for exploring fronthaul topology | |
CN116915708A (en) | Method for routing data packets, processor and readable storage medium | |
WO2020088379A1 (en) | Service flow processing method and device | |
CN111092925B (en) | Block chain capacity expansion processing method, device and equipment | |
CN109067657A (en) | A kind of message processing method and device | |
CN113835946B (en) | Pressure test method for data exchange | |
JP2004519896A (en) | Method and system for generating multiple self-ID packets on a 1394 bus using a standard PHY chip | |
CN103944892B (en) | A kind of dynamic virtual local area network registration method and apparatus | |
US20170019327A1 (en) | Heterogeneous network system, network apparatus, and rendezvous path selection method thereof | |
WO2022134674A1 (en) | Message transmission method and apparatus, and device, storage medium and system | |
CN112602294B (en) | Method and device for detecting bandwidth | |
CN104079451B (en) | A kind of method and apparatus for finding optical module |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20180525 |