CN102420713A - Test data packet packaging method and equipment - Google Patents

Test data packet packaging method and equipment Download PDF

Info

Publication number
CN102420713A
CN102420713A CN2010102965449A CN201010296544A CN102420713A CN 102420713 A CN102420713 A CN 102420713A CN 2010102965449 A CN2010102965449 A CN 2010102965449A CN 201010296544 A CN201010296544 A CN 201010296544A CN 102420713 A CN102420713 A CN 102420713A
Authority
CN
China
Prior art keywords
protocol
protocol element
agreement
encapsulation
data
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
Application number
CN2010102965449A
Other languages
Chinese (zh)
Inventor
矫恒浩
郑勇
战照鹏
刘文斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Datang Mobile Communications Equipment Co Ltd
Original Assignee
Datang Mobile Communications Equipment Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Datang Mobile Communications Equipment Co Ltd filed Critical Datang Mobile Communications Equipment Co Ltd
Priority to CN2010102965449A priority Critical patent/CN102420713A/en
Publication of CN102420713A publication Critical patent/CN102420713A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a test data packet packaging method, relating to the field of network performance testing. The test data packet packaging method comprises the following steps of: constructing protocol units of different protocols by a network access system capable of bypassing an operating system to invoke a network device driver for independently transmitting data, and configuring data items opened to users in the protocol units, wherein the protocol unit of each protocol utilizes a data format defined by the protocol; and configuring a level of each selected protocol unit and modifying the data items opened to the users in the selected protocol unit according to the protocol units selected by the users by using the network access system, and packaging test data packets. According to the test data packet packaging method and equipment disclosed by the invention, the protocol stack packaging formats of the test data packets can be customized and related parameters can be modified by the users, performance tests of various network devices can be met, and great convenience is brought for an abnormal test, even network attack can be simulated.

Description

A kind of test packet method for packing and equipment
Technical field
The present invention relates to the applied in network performance test technical field, relate in particular to a kind of test packet method for packing and equipment.
Background technology
Agreement is the regular term when being used for information exchange data between the description process.Two entities that intercom mutually are in different geographical in network, and two processes on it intercom mutually, need coordinate their action and reach synchronous through exchange message, and the exchange of information must be carried out according to the process of appointing jointly in advance.
Protocol stack is meant the summation of each layer protocol in the network, the reflection that it is vivid the process of network file transmission: by upper-layer protocol to underlying protocol, again by underlying protocol to upper-layer protocol.
Different entities has the various network interface in the network, and the various network interface often has different protocol stack encapsulation format, and the packet that sends to these network interfaces should meet its protocol stack encapsulation format.In the LTE of evolution system, each evolution base station eNB has a series of functions and corresponding physical interface, interconnects through X2 interface between a plurality of eNBs.With regard to the outside connected, eNB was connected to EPC (Evolved Packet Core, Evolved Packet Core) equipment through S1-U interface, so EPC equipment connects PDN (packet Data Network, Packet Data Network) through the SGi interface.
S1-U interface and SGi interface with EPC equipment are example, are illustrated in figure 1 as the protocol stack encapsulation format of S1-U interface, are specially by following order to encapsulate successively: payload data DATA; UDP (User Datagram Protocol, UDP) or TCP (Transmission Control Protocol, transmission control protocol) stem; IP (Internet Protocol, Internet Protocol) stem; GTP-U (GPRS Tunnelling Protocol for User Plane, GPRS user-plane tunnel agreement) data; UDP (User Datagram Protocol, UDP) stem; The IP stem; Data link layer L2 and physical layer L1.Be illustrated in figure 2 as the protocol stack encapsulation format of SGi interface, be specially by following order and encapsulate successively: payload DATA; UDP or TCP stem; The IP stem; Data link layer L2 and physical layer L1.
In above-mentioned two interface corresponding protocols stack encapsulation format, each layer protocol data satisfies the data format of this protocol definition.The stem that this protocol definition is all arranged like every layer protocol; Be example with the IP agreement, as shown in Figure 3, its header length is the 20-60 byte; The important information that wherein comprises relevant Route Selection and payment, as version VER, life span, check and, source and destination IP address or the like.
During to the data transmission in network testing equipment, often need send the test packet of corresponding protocols stack encapsulation format to the interface of equipment under test, to different equipment under test interfaces, the protocol stack encapsulation format of its test packet also often is not quite similar.
Existing testing tool such as the Jperf of giving out a contract for a project; Realization to the mode that network interface sends the test packet of this interface corresponding protocols stack encapsulation format is: utilize packaged protocol stack in the direct call operation of the protocol stack interface system that operating system provides, utilize the protocol stack that calls to accomplish the encapsulation of test packet.
Existing testing tool can only be accomplished the fairly simple test packet encapsulation of some protocol stack encapsulation format, as accomplishing the protocol encapsulation of TCP or UDP/IP form, tests maximum TCP and UDP bandwidth performance etc. through sending this type of test packet.
Can accomplish the test packet encapsulation easily though utilize the existing testing tool of giving out a contract for a project; But often can only send packet to a certain class interface; For protocol stack encapsulation format comparatively complex interface such as S1-U interface, then directly call operation system protocol stack is realized.
Simultaneously; Sometimes in order more comprehensively the equipment under test interface to be tested; Also need carry out abnormality test, send " illegally " packet of protocol header parameter error to the equipment under test interface to equipment under test, for example carry the verification of wrong IP stem and test packet.In the test packet of existing give out a contract for a project testing tool such as Jperf encapsulation; Actual for the encapsulation process of protocol header is to be accomplished by the protocol stack module of operating system; Cause user and software developer can't revise the protocol header parameter, therefore be difficult to carry out abnormality test.
Summary of the invention
The embodiment of the invention provides a kind of test packet method for packing and equipment, network device performance test method and system, in order to solve the existing testing tool of giving out a contract for a project can not encapsulating face to the defective of the needed test packet of heterogeneous networks performance test.
A kind of test packet method for packing of the present invention comprises:
Utilization can get around operating system and call the network access system that network device driver is come independent transmission data; Make up the protocol element of different agreement; Data item open to the user in the said protocol element is set, and the protocol element of each agreement adopts the data format of this protocol definition;
Utilize said network access system, the protocol element of selecting according to the user, to the level setting of each protocol element of selecting and in the selected protocol element to the modification of the open data item of user, carry out the encapsulation of test packet.
The present invention also provides a kind of network device performance test method, comprising:
Select the protocol element of network access system structure according to the protocol stack encapsulation format of prebuild, and the level of each protocol element of selection is set;
Data item open to the user in the selected protocol element is revised in performance test according to the preadmission row;
Utilize said network access system to make up test packet and send to destination network device;
According to said destination network device performance test is carried out in the reception request of test packet.
The present invention also provides a kind of test packet sealed in unit, comprising:
Construction unit; Be used to utilize and get around the network access system that operating system is called the next independent transmission data of network device driver; Make up the protocol element of different agreement; Data item open to the user in the said protocol element is set, and the protocol element of each agreement adopts the data format of this protocol definition;
Encapsulation unit; Be used to utilize said network access system; The protocol element of selecting according to the user, to the level setting of each protocol element of selecting and in the selected protocol element to the modification of the open data item of user, carry out the encapsulation and the transmission of test packet.
The present invention also provides a kind of network device performance test system, comprising:
Select and the unit is set, be used for the protocol element of selecting network access system to make up according to the protocol stack encapsulation format of prebuild, and the level of each protocol element of selection is set;
Parameter modifying unit is used for according to preadmission row performance test and revises the selected protocol element data item open to the user;
Data transmission unit is used to utilize said network access system to make up test packet and sends to destination network device;
The performance test unit is used for according to said destination network device performance test being carried out in the reception request of test packet.
Utilize test packet method for packing provided by the invention and equipment, network device performance test method and system, it is following to have a following beneficial effect: can select a plurality of protocol elements to form the protocol stack encapsulation format of the corresponding interface as required voluntarily by the user; Simultaneously, can protocol element give the user with all parameters of protocol header are open, fill in header message as required, greatly facilitate abnormality test, even can be used for analog network and attack by the user.
Description of drawings
Fig. 1 is the S1-U interface corresponding protocols stack encapsulation format sketch map of EPC equipment;
Fig. 2 is the SGi interface corresponding protocols stack encapsulation format sketch map of EPC equipment;
Fig. 3 is the form sketch map of the stem of existing IP agreement;
Fig. 4 is a test packet method for packing flow chart provided by the invention;
Fig. 5 is for accordinging to test packet method for packing flow chart in the embodiment of the invention;
Fig. 6 obtains protocol element and the input parameter sketch map that the interface obtains user's selection for adopting;
Fig. 7 is the test packet encapsulation flow chart according to embodiment of the invention S1-U interface;
The test packet encapsulation flow chart of S1-U interface when Fig. 8 adopts fragment process for accordinging in the embodiment of the invention;
Fig. 9 is for accordinging to network device performance test method flow diagram in the embodiment of the invention;
Figure 10 is for accordinging to test packet sealed in unit structure chart in the embodiment of the invention;
Figure 11 is for accordinging to network device performance test system construction drawing in the embodiment of the invention.
Embodiment
, illustrate in greater detail test packet method for packing provided by the invention and equipment, network device performance test method and system below in conjunction with accompanying drawing and embodiment.
The present invention is directed to protocol stack packaged in the existing testing tool call operation system of giving out a contract for a project and accomplish the defective of the encapsulation of test packet; For the packet that makes transmission satisfies the protocol stack encapsulation format of heterogeneous networks interface, simultaneously, for the parameter of each layer protocol stem can be set; A kind of test packet method for packing is provided; Flexibly custom protocol stack encapsulation format with carry out parameter modification, as shown in Figure 4, this method comprises:
Step S401; Utilization can get around operating system and call the network access system that network device driver is come independent transmission data; Data item open to the user in the said protocol element is set, makes up the protocol element of different agreement, the protocol element of each agreement adopts the data format of this protocol definition;
For the protocol stack module that gets around computer operating system is sent to network with raw data packets; Need have accesses network bottom ability and call the network access system of network device driver; Utilize this system, can send the packet of any protocol stack encapsulation format to the purpose interface.
And be that windows platform or Linux platform all provide such network access system, it can get around the protocol stack module of computer operating system, directly calls network device driver, and raw data packets is sent to network.
For the protocol stack encapsulation format that makes test packet satisfies the requirement of the protocol stack encapsulation format of tested interface, the present invention utilizes network access system to make up the protocol element of a plurality of common protocol.And data item open to the user in the said protocol element is set, thereby the user can make amendment to these data item.
Step S402 utilizes said network access system, the protocol element of selecting according to the user, to the level setting of each protocol element of selecting and in the selected protocol element to the modification of the open data item of user, carry out the encapsulation of test packet.
It is thus clear that; Test packet method for packing provided by the invention; Make the user can plant flexibly parameter such as the protocol header parameter open in the custom protocol stack encapsulation format and protocol element to the user; Particularly, the present invention selects a plurality of protocol elements to form the protocol stack encapsulation format of the corresponding interface through making up the protocol element of a series of common protocol by the user as required voluntarily; Simultaneously, protocol element is given the user with all parameters of protocol header are open, fills in header message as required by the user, greatly facilitates abnormality test, even can be used for analog network and attack.
Preferably; Above-mentioned network access system is the Winpcap system in the present embodiment; The Winpcap system has the ability of accesses network bottom, and the protocol stack module that can be independent of the in-local system sends raw data packets, utilizes this ability of Winpcap system; Through protocol element and more open parameters of definition common protocol, can send the test packet of any encapsulation mode to the purpose interface.
Satisfy the requirement of tested protocol stack of the interface encapsulation format for the encapsulation mode that makes data; Utilize the protocol element of the different agreement of network access system structure to comprise in the present embodiment: the protocol element of the protocol element of the protocol element of IP agreement, the protocol element of udp protocol, Transmission Control Protocol, the protocol element of GTP-U agreement, ARP (Address Resolution Protocol address resolution protocol), the protocol element of ICMP (Internet Control Message Protocol, Internet Control Message Protocol) etc.The protocol element of each agreement adopts the data format of this protocol definition, and concrete open data item can be provided with flexibly.Preferably, utilize the data item open in the protocol element of each agreement that said network access system is provided with in the present embodiment, be specially the parameter item of the stem of each protocol definition the user.
According in the embodiments of the invention, the method for packing of test packet is as shown in Figure 5, comprising:
Step S501; Utilization can get around operating system and call the network access system that network device driver is come independent transmission data; Make up the protocol element of different agreement; Data item open to the user in the said protocol element is set, and the protocol element of each agreement adopts the data format of this protocol definition, the default value of each data item in the protocol element of each agreement of initialization;
Data item possibly both comprise the also possible Bao Wei of the data item data item open to the user to user's opening in the protocol element of each agreement, and the embodiment of the invention all initialization has default value.
Step S502, the protocol element of selecting according to the user and the level of each protocol element of selecting is provided with the protocol stack encapsulation format that makes up test packet;
Therefore, the user can select the protocol stack encapsulation format of the tested interface of corresponding protocol cell formation according to the interface corresponding protocols stack encapsulation format of acceptance test packet equipment.
Step S503, according to the protocol stack encapsulation format that makes up, user in the selected protocol element to the modification of the open data item of user and unmodified data item default value, make up the corresponding data structure of protocol stack encapsulation format;
Protocol element has comprised this protocol header information, and present embodiment is embedded in all parameter defaults of protocol header in the structure of protocol element, and these parameters are open to the user, fills in corresponding value as required by the user.Fig. 6 has provided the protocol element of IP agreement, the embedded protocol header parameter of protocol element of udp protocol, and these two protocol elements have made up the UDP/IP protocol stack.
It is thus clear that through the embodiment of the invention, the user need construct the protocol stack encapsulation format according to certain selective sequential protocol element, the user can also be provided with protocol header parameter in the protocol element simultaneously.
Step S504 encapsulates payload data according to data structure, and the encapsulation back generates test packet.
Embodiment of the invention network access system specifically through modes such as interface (like Fig. 6) or script file obtain protocol element that the user selects, to the level setting of each protocol element of selecting and in the selected protocol element to the modification of the open data item (like header parameter) of user; Construct corresponding data structure then; This data structure can be a chained list, also can be array or alternate manner.According to this data structure payload data is encapsulated, can obtain test packet to be sent, the interface that calls network access system such as Winpcap bottom transmission data at last is sent to the purpose interface with test packet.
Particularly; The protocol stack encapsulation format of said prebuild is specially the S1-U interface corresponding protocols stack encapsulation format that connects Evolved Packet Core EPC equipment and evolution base station eNB, or for connecting the SGi interface corresponding protocols stack encapsulation format of EPC equipment and grouped data network PDN.
S1-U interface with LTE mobile communications network EPC equipment is an example below; Its protocol stack encapsulation format is as shown in Figure 1; According to protocol stack encapsulation format shown in Figure 1; The protocol element that the user that obtains among the step S502 selects specifically comprises: it is middle-level that the protocol element of the protocol element B of the protocol element of UDP or Transmission Control Protocol, IP agreement, the protocol element of GTP-U agreement, udp protocol, the protocol element A of IP agreement, the level of each protocol element are set to the protocol stack encapsulation format of S1-U interface.Among the step S503; The user defines each level agreement unit as required to the data item of user's opening such as the header parameter of protocol element; The for example source port number of the source IP address of IP protocol element and purpose IP address, udp protocol unit and destination slogan or the like; Data item for the user is unmodified will be got default value according to protocol requirement, generate the data structure of S1-U interface corresponding protocols stack encapsulation format; Among the step S504; The parameter of having obtained user-defined protocol stack encapsulation format and protocol element can construct the corresponding data structure of protocol stack encapsulation format therewith afterwards; As shown in Figure 7; According to this data structure payload data is encapsulated according to the order of the protocol element A of the protocol element of the protocol element of the protocol element B of the protocol element of UDP or Transmission Control Protocol, IP agreement, GTP-U agreement, udp protocol, IP agreement successively; Add data link layer (L1 and L2) stem at last, obtain corresponding test packet, the interface that this packet is provided through Winpcap is sent to the purpose interface and has promptly accomplished this time and give out a contract for a project.
Encapsulation process about the test packet of SGi interface corresponding protocols stack encapsulation format is similar with the S1-U encapsulation process, is that variation has taken place concrete encapsulation format, no longer details here.
In addition; Because the long data that data link layer can be transmitted can not surpass its MTU (Maximum Transmission Unit; MTU); Therefore when the total length of each level agreement unit and payload user data during greater than MTU the encapsulation process of data change to some extent; According to said data structure payload data is encapsulated the protocol element of each agreement successively among the step S504 in the present embodiment, when implementing the protocol element encapsulation of IP agreement, whether the payload data length of confirming to encapsulate and the protocol element length sum of IP agreement be less than MTU MTU; If less than, the payload data that will encapsulate is encapsulated into the protocol element of IP agreement, and the protocol element of the IP agreement after the encapsulation is carried out next level agreement unit encapsulation; If be not less than; The payload data burst that then will encapsulate; The protocol element length sum that makes each branch leaf length and agreement is less than MTU; Each burst is encapsulated into the protocol element to the corresponding IP agreement of each burst, the flag bit relevant with burst in the protocol element of the corresponding IP agreement of each burst is set, the protocol element of the IP agreement after all bursts encapsulation is carried out next level agreement unit encapsulation respectively; In protocol element when encapsulation that implements the IP agreement again, repeat the protocol element encapsulation process of above-mentioned IP agreement, to being encapsulated into last level agreement unit in the data structure.
Still be example with above-mentioned S1-U interface, as shown in Figure 8, be specially:
1) when the encapsulation of the protocol element B that implements the IP agreement; The payload data that discovery will encapsulate (is promptly accomplished the data that the last layer encapsulation obtains; Promptly accomplish the data that obtain after the protocol element encapsulation of UDP/IP agreement) length L engh<MTU of the protocol element B of length and IP agreement, then carry out the encapsulation of the protocol element B of IP agreement; The protocol element of the IP agreement after the encapsulation is carried out next level agreement unit encapsulation, the i.e. protocol element of GTP-U agreement encapsulation;
2) Lengh >=MTU; Then the payload data that will encapsulate is carried out burst; Payload data length behind each burst must not be greater than (MTU-protocol element B length); Each burst is encapsulated into the protocol element (protocol element B, protocol element B1, protocol element B2...) to the corresponding IP agreement of each burst; The flag bit relevant with burst in the protocol element of the corresponding IP agreement of each burst is set, the protocol element of the IP agreement after all bursts encapsulation is carried out next level agreement unit encapsulation respectively, promptly carry out the protocol element encapsulation of GTP-U agreement.
Preferably, about the description of IP fragmentation the payload data that will encapsulate is carried out burst according to the RFC760 agreement in the present embodiment, flag bit relevant with burst in the IP protocol element is set according to the RFC760 agreement.
It is thus clear that carried out after the fragment process the actual test packets that obtain a plurality of completion encapsulation.
When 3) after the protocol element encapsulation that executes udp protocol, implementing the encapsulation of protocol element A of IP agreement once more; By above-mentioned 1) and 2) method encapsulate the data that the payload data that will encapsulate different this moments obtains after for the protocol element encapsulation of accomplishing udp protocol.Fig. 8 shows once more the situation of burst.The quantity of test packet is the quantity of the burst second time when like this, accomplishing final encapsulation.
The above-mentioned test packet method for packing that the embodiment of the invention provides originally can be tested multiple IP network equipment interface owing to have custom protocol stack function flexibly; Owing to have the custom protocol parameter function, can carry out multiple abnormality test easily, even the simulation multiple network is attacked.
According in the embodiment of the invention, a kind of network device performance test method also is provided, as shown in Figure 9, comprising:
Step S901 selects the protocol element of network access system structure according to the protocol stack encapsulation format of prebuild, and the level of each protocol element of selection is set;
As make up the S1-U interface corresponding protocols stack encapsulation format that connects Evolved Packet Core EPC equipment and evolution base station eNB; Or the SGi interface corresponding protocols stack encapsulation format of connection EPC equipment and grouped data network PDN, realize having the EPC equipment performance test of S1-U interface and SGi interface.
Step S902, data item open to the user in the selected protocol element is revised in performance test according to the preadmission row, as revising protocol header parameter etc.;
Step S903 utilizes network access system to make up test packet and sends to destination network device;
Step S904 carries out performance test according to destination network device to the reception request of test packet.
Provide the concrete performance test that realizes of above-mentioned network device performance test method below:
1) ARP extensive aggression
The protocol stack encapsulation format of prebuild is an ARP protocol stack encapsulation format; The performance test of preadmission row is the ARP extensive aggression; The data item of revising comprises the destination network device address of rewriting; Can send the test packet of ARP protocol stack encapsulation format so continuously to destination network device, simulation ARP extensive aggression, the ability of bearing the ARP extensive aggression of test target network.
2) ip fragmentation is attacked
The protocol stack encapsulation format of prebuild is the IP stack encapsulation format; The performance test of said preadmission row is that ip fragmentation is attacked; The data item of said modification comprises the flag bit of rewriting of filling in destination network device address and sign fragment; Particularly, with 0, the three MF position 1, second DF position in the IP protocol element flag bit; The network equipment receives this type of packet and thinks that ip fragmentation can be buffered in it in internal memory like this, therefore can Simulation with I P fragment attack through send this type of packet continuously to destination network device.
The embodiment of the invention is in protocol element when encapsulation of carrying out the IP agreement, during greater than MTU, carries out fragment process by the foregoing description method in the protocol element length sum of payload data that will encapsulate and IP agreement.
3) TCP server extensive aggression
This moment, destination network device was a server, and the protocol stack encapsulation format of said prebuild is an ICP/IP protocol stack encapsulation format; The user selects the protocol element of Transmission Control Protocol and the protocol element of IP agreement; The performance test of said preadmission row is a TCP/IP connection request extensive aggression, and the data item of modification comprises identifying sets up the flag of TCP/IP connection request, the destination network device address of rewriting.Particularly, the SYN position that is provided with in the protocol element control field of Transmission Control Protocol is 1, other position 0, and destination server receives this type of packet and thinks that request sets up TCP/IP and connect like this, therefore sets up the resource of TCP/IP connection for its distribution; What network access system made up is the ICP/IP protocol stack encapsulation format packet that does not carry payload user data, sends this packet continuously to destination server, can carry out TCP/IP connection request extensive aggression.
4) network equipment anomalous performance test
The data item open in this moment user's modification selected protocol element to the user, the verification and the default value that are specially stem in the selected protocol element are revised as error checking and value, so can network apparatus test to the handling property of misdata bag.
According in the embodiment of the invention; A kind of test packet sealed in unit also is provided, shown in figure 10, comprising: construction unit 10; Be used to utilize and get around the network access system that operating system is called the next independent transmission data of network device driver; Data item open to the user in the said protocol element is set, makes up the protocol element of different agreement, the protocol element of each agreement adopts the data format of this protocol definition; Encapsulation unit 20; Be used to utilize said network access system; The protocol element of selecting according to the user, to the level setting of each protocol element of selecting and in the selected protocol element to the modification of the open data item of user, carry out the encapsulation and the transmission of test packet.
Preferably, when said construction unit 10 usefulness network access systems make up the protocol element of each agreement, the default value of each data item in the protocol element of each agreement of initialization; Said encapsulation unit 20 specifically comprises: protocol stack encapsulation format construction unit 201, and the level that the protocol element that is used for selecting according to the user reaches each protocol element of selecting is provided with the protocol stack encapsulation format that makes up test packet; Data structure generation unit 202, the protocol stack encapsulation format, the user that are used for according to structure to the modification of the open data item of user and unmodified data item default value, make up the corresponding data structure of protocol stack encapsulation format to selected protocol element; Test packet generation unit 203 is used for according to said data structure payload data being encapsulated, and the encapsulation back generates test packet.
Preferably; The test packet generation unit specifically comprises: length is confirmed the unit; Be used for payload data being encapsulated successively the protocol element of each agreement according to said data structure; When implementing the protocol element encapsulation of IP agreement, whether the protocol element length sum of definite payload data length that will encapsulate and IP agreement is less than MTU MTU; First encapsulation unit is used in definite said length sum during less than MTU, and the payload data that will encapsulate is encapsulated into the protocol element of IP agreement, and the protocol element of the IP agreement after the encapsulation is carried out next level agreement unit encapsulation; Second encapsulation unit; Be used for when definite said length sum is not less than MTU; The payload data burst that will encapsulate; Each burst is encapsulated into the protocol element to the corresponding IP agreement of each burst, the flag bit relevant with burst in the protocol element of the corresponding IP agreement of each burst is set, the protocol element of the IP agreement after all bursts encapsulation is carried out next level agreement unit encapsulation respectively; The 3rd encapsulation unit repeats the protocol element encapsulation process of above-mentioned IP agreement, to being encapsulated into last level agreement unit in the data structure when being used for implementing again the protocol element encapsulation of IP agreement.
According to a kind of network device performance test system also is provided in the embodiment of the invention; Shown in figure 11; Comprise: select and unit 101 is set, be used for the protocol element of selecting network access system to make up according to the protocol stack encapsulation format of prebuild, and the level of each protocol element of selection is set; Parameter modifying unit 102 is used for according to preadmission row performance test and revises the selected protocol element data item open to the user; Data transmission unit 103 is used to utilize said network access system to make up test packet and sends to destination network device; Performance test unit 104 is used for according to said destination network device performance test being carried out in the reception request of test packet.
Those skilled in the art should understand that embodiments of the invention can be provided as method, system or computer program.Therefore, the present invention can adopt the form of the embodiment of complete hardware embodiment, complete software implementation example or combination software and hardware aspect.And the present invention can be employed in the form that one or more computer-usable storage medium (including but not limited to magnetic disc store, CD-ROM, optical memory etc.) that wherein include computer usable program code go up the computer program of implementing.
The present invention is that reference is described according to the flow chart and/or the block diagram of method, equipment (system) and the computer program of the embodiment of the invention.Should understand can be by the flow process in each flow process in computer program instructions realization flow figure and/or the block diagram and/or square frame and flow chart and/or the block diagram and/or the combination of square frame.Can provide these computer program instructions to the processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing device to produce a machine, make the instruction of carrying out through the processor of computer or other programmable data processing device produce to be used for the device of the function that is implemented in flow process of flow chart or a plurality of flow process and/or square frame of block diagram or a plurality of square frame appointments.
These computer program instructions also can be stored in ability vectoring computer or the computer-readable memory of other programmable data processing device with ad hoc fashion work; Make the instruction that is stored in this computer-readable memory produce the manufacture that comprises command device, this command device is implemented in the function of appointment in flow process of flow chart or a plurality of flow process and/or square frame of block diagram or a plurality of square frame.
These computer program instructions also can be loaded on computer or other programmable data processing device; Make on computer or other programmable devices and to carry out the sequence of operations step producing computer implemented processing, thereby the instruction of on computer or other programmable devices, carrying out is provided for being implemented in the step of the function of appointment in flow process of flow chart or a plurality of flow process and/or square frame of block diagram or a plurality of square frame.
Although described the preferred embodiments of the present invention, in a single day those skilled in the art get the basic inventive concept could of cicada, then can make other change and modification to these embodiment.So accompanying claims is intended to be interpreted as all changes and the modification that comprises preferred embodiment and fall into the scope of the invention.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, belong within the scope of claim of the present invention and equivalent technologies thereof if of the present invention these are revised with modification, then the present invention also is intended to comprise these changes and modification interior.

Claims (14)

1. a test packet method for packing is characterized in that, comprising:
Utilization can get around operating system and call the network access system that network device driver is come independent transmission data; Make up the protocol element of different agreement; Data item open to the user in the said protocol element is set, and the protocol element of each agreement adopts the data format of this protocol definition;
Utilize said network access system, the protocol element of selecting according to the user, to the level setting of each protocol element of selecting and in the selected protocol element to the modification of the open data item of user, carry out the encapsulation of test packet.
2. the method for claim 1 is characterized in that, said network access system is the Winpcap system.
3. the method for claim 1 is characterized in that, when utilizing network access system to make up the protocol element of each agreement, also comprises: the default value of each data item in the protocol element of each agreement of initialization;
Utilize said network access system to carry out the encapsulation of test packet, specifically comprise:
The protocol element of selecting according to the user and the level of each protocol element of selecting is provided with the protocol stack encapsulation format that makes up test packet;
According to the protocol stack encapsulation format that makes up, user in the selected protocol element to the modification of the open data item of user and unmodified data item default value, make up the corresponding data structure of protocol stack encapsulation format;
According to said data structure payload data is encapsulated, the encapsulation back generates test packet.
4. method as claimed in claim 3 is characterized in that, utilizes network access system according to said data structure payload data to be encapsulated, and specifically comprises:
According to said data structure payload data is encapsulated the protocol element of each agreement successively, when implementing the protocol element encapsulation of IP agreement, whether the payload data length of confirming to encapsulate and the protocol element length sum of IP agreement be less than MTU MTU;
If less than, the payload data that will encapsulate is encapsulated into the protocol element of IP agreement, and the protocol element of the IP agreement after the encapsulation is carried out next level agreement unit encapsulation;
If be not less than; The payload data burst that then will encapsulate; Each burst is encapsulated into the protocol element to the corresponding IP agreement of each burst; The flag bit relevant with burst in the protocol element of the corresponding IP agreement of each burst is set, the protocol element of the IP agreement after all bursts encapsulation is carried out next level agreement unit encapsulation respectively;
In protocol element when encapsulation that implements the IP agreement again, repeat the protocol element encapsulation process of above-mentioned IP agreement, to being encapsulated into last level agreement unit in the data structure.
5. like the arbitrary described method of claim 1~4, it is characterized in that, utilize the data item open in the protocol element of each agreement that said network access system is provided with, be specially the parameter item of the stem of each protocol definition the user.
6. a network device performance test method is characterized in that, comprising:
Select the protocol element of network access system structure according to the protocol stack encapsulation format of prebuild, and the level of each protocol element of selection is set;
Data item open to the user in the selected protocol element is revised in performance test according to the preadmission row;
Utilize said network access system to make up test packet and send to destination network device;
According to said destination network device performance test is carried out in the reception request of test packet.
7. method as claimed in claim 6 is characterized in that, the protocol stack encapsulation format of said prebuild is an ARP protocol stack encapsulation format; The performance test of said preadmission row is the ARP extensive aggression, and the data item of said modification comprises the destination network device address of rewriting; Or
The protocol stack encapsulation format of said prebuild is the IP stack encapsulation format; The performance test of said preadmission row is that ip fragmentation is attacked, and the data item of said modification comprises the flag bit of rewriting of filling in destination network device address and sign fragment.
8. method as claimed in claim 6 is characterized in that, said destination network device is a server, and the protocol stack encapsulation format of said prebuild is an ICP/IP protocol stack encapsulation format; The performance test of said preadmission row is a TCP/IP connection request extensive aggression, and the data item of said modification comprises identifying sets up the flag of TCP/IP connection request, the destination network device address of rewriting.
9. method as claimed in claim 6; It is characterized in that; Said according to the preadmission row performance test revise in the selected protocol element data item open to the user, the verification and the default value that are specially stem in the selected protocol element are revised as error checking and value.
10. method as claimed in claim 6; It is characterized in that; The protocol stack encapsulation format of said prebuild is specially the S1-U interface corresponding protocols stack encapsulation format that connects Evolved Packet Core EPC equipment and evolution base station eNB, or for connecting the SGi interface corresponding protocols stack encapsulation format of EPC equipment and grouped data network PDN.
11. a test packet sealed in unit is characterized in that, comprising:
Construction unit; Be used to utilize and get around the network access system that operating system is called the next independent transmission data of network device driver; Make up the protocol element of different agreement; Data item open to the user in the said protocol element is set, and the protocol element of each agreement adopts the data format of this protocol definition;
Encapsulation unit; Be used to utilize said network access system; The protocol element of selecting according to the user, to the level setting of each protocol element of selecting and in the selected protocol element to the modification of the open data item of user, carry out the encapsulation and the transmission of test packet.
12. equipment as claimed in claim 11 is characterized in that, when said construction unit makes up the protocol element of each agreement with network access system, and the default value of each data item in the protocol element of each agreement of initialization; Said encapsulation unit specifically comprises:
Protocol stack encapsulation format construction unit, the level that the protocol element that is used for selecting according to the user reaches each protocol element of selecting is provided with the protocol stack encapsulation format that makes up test packet;
The data structure generation unit, the protocol stack encapsulation format, the user that are used for according to structure to the modification of the open data item of user and unmodified data item default value, make up the corresponding data structure of protocol stack encapsulation format to selected protocol element;
The test packet generation unit is used for according to said data structure payload data being encapsulated, and the encapsulation back generates test packet.
13. equipment as claimed in claim 12 is characterized in that, the test packet generation unit specifically comprises:
Length is confirmed the unit; Be used for payload data being encapsulated successively the protocol element of each agreement according to said data structure; When implementing the protocol element encapsulation of IP agreement, whether the protocol element length sum of definite payload data length that will encapsulate and IP agreement is less than MTU MTU;
First encapsulation unit is used in definite said length sum during less than MTU, and the payload data that will encapsulate is encapsulated into the protocol element of IP agreement, and the protocol element of the IP agreement after the encapsulation is carried out next level agreement unit encapsulation;
Second encapsulation unit; Be used for when definite said length sum is not less than MTU; The payload data burst that will encapsulate; Each burst is encapsulated into the protocol element to the corresponding IP agreement of each burst, the flag bit relevant with burst in the protocol element of the corresponding IP agreement of each burst is set, the protocol element of the IP agreement after all bursts encapsulation is carried out next level agreement unit encapsulation respectively;
The 3rd encapsulation unit repeats the protocol element encapsulation process of above-mentioned IP agreement, to being encapsulated into last level agreement unit in the data structure when being used for implementing again the protocol element encapsulation of IP agreement.
14. a network device performance test system is characterized in that, comprising:
Select and the unit is set, be used for the protocol element of selecting network access system to make up according to the protocol stack encapsulation format of prebuild, and the level of each protocol element of selection is set;
Parameter modifying unit is used for according to preadmission row performance test and revises the selected protocol element data item open to the user;
Data transmission unit is used to utilize said network access system to make up test packet and sends to destination network device;
The performance test unit is used for according to said destination network device performance test being carried out in the reception request of test packet.
CN2010102965449A 2010-09-28 2010-09-28 Test data packet packaging method and equipment Pending CN102420713A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010102965449A CN102420713A (en) 2010-09-28 2010-09-28 Test data packet packaging method and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010102965449A CN102420713A (en) 2010-09-28 2010-09-28 Test data packet packaging method and equipment

Publications (1)

Publication Number Publication Date
CN102420713A true CN102420713A (en) 2012-04-18

Family

ID=45944960

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010102965449A Pending CN102420713A (en) 2010-09-28 2010-09-28 Test data packet packaging method and equipment

Country Status (1)

Country Link
CN (1) CN102420713A (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104052628A (en) * 2013-03-12 2014-09-17 腾讯科技(深圳)有限公司 Protocol packet detection method and protocol packet detection device
CN104468279A (en) * 2014-12-22 2015-03-25 上海斐讯数据通信技术有限公司 Routing protocol interaction testing method and tool
CN104993971A (en) * 2015-05-27 2015-10-21 上海斐讯数据通信技术有限公司 Method and system for testing MTU value in uplink network model of router
CN106301994A (en) * 2015-06-24 2017-01-04 北京京东尚科信息技术有限公司 A kind of network service abnormality test method and apparatus
CN106357475A (en) * 2016-08-31 2017-01-25 成都科来软件有限公司 Data packet construction system and working method thereof
CN107276852A (en) * 2017-06-27 2017-10-20 福建省天奕网络科技有限公司 A kind of data safety detection method and terminal
CN107704245A (en) * 2017-09-21 2018-02-16 深圳市麦斯杰网络有限公司 Protocol accessing method, device and computer-readable recording medium
CN108965300A (en) * 2018-07-21 2018-12-07 中国人民解放军战略支援部队信息工程大学 A kind of data packet generation method, device and computer readable storage medium
CN110290095A (en) * 2018-03-19 2019-09-27 北京京东尚科信息技术有限公司 The method and apparatus for being used for transmission data
CN110932925A (en) * 2019-10-31 2020-03-27 苏州浪潮智能科技有限公司 Method and system for testing stability of server BMC (baseboard management controller) network
CN112532492A (en) * 2020-12-08 2021-03-19 航天科技控股集团股份有限公司 CAN virtual message construction method and system for testing automobile instrument
CN113037587A (en) * 2021-02-26 2021-06-25 清华大学 TCP/IP protocol stack testing method and device and electronic equipment
CN113098731A (en) * 2021-03-01 2021-07-09 Oppo广东移动通信有限公司 Protocol stack testing method, testing system and computer storage medium
CN114830711A (en) * 2019-12-16 2022-07-29 西门子工业软件有限公司 Apparatus for testing base station
WO2022188603A1 (en) * 2021-03-11 2022-09-15 华为技术有限公司 Packet processing method and apparatus

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1394010A (en) * 2001-06-21 2003-01-29 华为技术有限公司 Microcode test method and device for network processor
CN1471267A (en) * 2002-07-22 2004-01-28 华为技术有限公司 Network protocol measuring method and measuring system thereof
CN1543104A (en) * 2003-04-28 2004-11-03 华为技术有限公司 Data transmission method for mobile packet network
CN1852177A (en) * 2005-10-13 2006-10-25 华为技术有限公司 Testing adopter and testing tool system and detecting method
CN101576843A (en) * 2008-05-07 2009-11-11 阿里巴巴集团控股有限公司 Method and device for testing application program interface
CN101841437A (en) * 2010-03-23 2010-09-22 华为技术有限公司 Method and device for testing equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1394010A (en) * 2001-06-21 2003-01-29 华为技术有限公司 Microcode test method and device for network processor
CN1471267A (en) * 2002-07-22 2004-01-28 华为技术有限公司 Network protocol measuring method and measuring system thereof
CN1543104A (en) * 2003-04-28 2004-11-03 华为技术有限公司 Data transmission method for mobile packet network
CN1852177A (en) * 2005-10-13 2006-10-25 华为技术有限公司 Testing adopter and testing tool system and detecting method
CN101576843A (en) * 2008-05-07 2009-11-11 阿里巴巴集团控股有限公司 Method and device for testing application program interface
CN101841437A (en) * 2010-03-23 2010-09-22 华为技术有限公司 Method and device for testing equipment

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104052628B (en) * 2013-03-12 2018-10-30 腾讯科技(深圳)有限公司 Agreement packet inspection method and agreement package detection device
CN104052628A (en) * 2013-03-12 2014-09-17 腾讯科技(深圳)有限公司 Protocol packet detection method and protocol packet detection device
CN104468279A (en) * 2014-12-22 2015-03-25 上海斐讯数据通信技术有限公司 Routing protocol interaction testing method and tool
CN104993971A (en) * 2015-05-27 2015-10-21 上海斐讯数据通信技术有限公司 Method and system for testing MTU value in uplink network model of router
CN106301994B (en) * 2015-06-24 2023-11-03 北京京东尚科信息技术有限公司 Network communication abnormity testing method and device
CN106301994A (en) * 2015-06-24 2017-01-04 北京京东尚科信息技术有限公司 A kind of network service abnormality test method and apparatus
CN106357475A (en) * 2016-08-31 2017-01-25 成都科来软件有限公司 Data packet construction system and working method thereof
CN107276852A (en) * 2017-06-27 2017-10-20 福建省天奕网络科技有限公司 A kind of data safety detection method and terminal
CN107276852B (en) * 2017-06-27 2020-02-21 福建省天奕网络科技有限公司 Data security detection method and terminal
CN107704245A (en) * 2017-09-21 2018-02-16 深圳市麦斯杰网络有限公司 Protocol accessing method, device and computer-readable recording medium
CN110290095A (en) * 2018-03-19 2019-09-27 北京京东尚科信息技术有限公司 The method and apparatus for being used for transmission data
CN108965300A (en) * 2018-07-21 2018-12-07 中国人民解放军战略支援部队信息工程大学 A kind of data packet generation method, device and computer readable storage medium
CN110932925A (en) * 2019-10-31 2020-03-27 苏州浪潮智能科技有限公司 Method and system for testing stability of server BMC (baseboard management controller) network
CN114830711A (en) * 2019-12-16 2022-07-29 西门子工业软件有限公司 Apparatus for testing base station
CN112532492A (en) * 2020-12-08 2021-03-19 航天科技控股集团股份有限公司 CAN virtual message construction method and system for testing automobile instrument
CN113037587A (en) * 2021-02-26 2021-06-25 清华大学 TCP/IP protocol stack testing method and device and electronic equipment
CN113098731A (en) * 2021-03-01 2021-07-09 Oppo广东移动通信有限公司 Protocol stack testing method, testing system and computer storage medium
WO2022188603A1 (en) * 2021-03-11 2022-09-15 华为技术有限公司 Packet processing method and apparatus

Similar Documents

Publication Publication Date Title
CN102420713A (en) Test data packet packaging method and equipment
CN103155522B (en) Methods and systems for communicating between a vehicle and a remote application server
CN107210943A (en) Accessed by means of the device of all purpose communication driver
CN104202300A (en) Data communication method and device based on network isolating device
CN106656909B (en) Transmission device and transmission method thereof
CN104754027A (en) Cross-network communication method and communication system
CN103841620B (en) Cathode protection data automatic acquisition system Communication Protocol for Wireless Sensor Network method
CN105323115A (en) Data packet simulation method and data packet simulation device of network management test event
CN103583020A (en) Relay server and relay communication system
CN103001883A (en) Internal communication method of programmable virtual router based on Net field programmable gate array (FPGA)
CN107579792B (en) Multi-model in-orbit satellite engineering parameter parallel analysis method
CN104639390A (en) Method and device for testing system
CN105099923B (en) Message transmitting method and device
CN102315981B (en) Equipment and method for testing evolved packet core network equipment
CN102984025A (en) Method, device and system for testing gateway device virtual tunnel performance
CN107508828A (en) A kind of very-long-range data interaction system and method
CN114780315A (en) Hardware simulation test method and device
CN109005150B (en) Non-link communication method and system based on Ethernet MAC address
CN105391780A (en) Data collection method and system, and data receiving method and system
US7526420B2 (en) Method and system for virtual injection of network application codes into network simulation
CN105577461A (en) Multi-layer protocol automatic testing method, multi-layer protocol automatic testing device, and multi-layer protocol automatic testing system
CN103051542A (en) Method for realizing connectivity detection based on data link layer Ethernet MAC (media access control) address
US9762353B2 (en) Data packet for bidirectional transmission of data packets during data transmission between a first and a second communication appliance, and method for transmitting such a data packet
CN110445658A (en) A kind of message processing method and system
CN105703946A (en) Method oriented to QualNet for correcting simulated scene node information regularly

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20120418