CN101316232A - Fragmentation and reassembly method based on network protocol version six - Google Patents

Fragmentation and reassembly method based on network protocol version six Download PDF

Info

Publication number
CN101316232A
CN101316232A CNA2008100223254A CN200810022325A CN101316232A CN 101316232 A CN101316232 A CN 101316232A CN A2008100223254 A CNA2008100223254 A CN A2008100223254A CN 200810022325 A CN200810022325 A CN 200810022325A CN 101316232 A CN101316232 A CN 101316232A
Authority
CN
China
Prior art keywords
burst
hole
tree
module
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.)
Granted
Application number
CNA2008100223254A
Other languages
Chinese (zh)
Other versions
CN101316232B (en
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.)
Nanjing University of Posts and Telecommunications Asset Management Co., Ltd.
Original Assignee
Nanjing Post and Telecommunication University
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 Nanjing Post and Telecommunication University filed Critical Nanjing Post and Telecommunication University
Priority to CN2008100223254A priority Critical patent/CN101316232B/en
Publication of CN101316232A publication Critical patent/CN101316232A/en
Application granted granted Critical
Publication of CN101316232B publication Critical patent/CN101316232B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention relates to a segmentation and reset method based on the Version 6 of a network protocol, which is a method that can improve the transmission performance of the new generation Internet protocol (IPV6) by improving the segmentation and reset efficiency, the specific method includes the following steps: (1) a segmentation and reset system receives a data segment transmitted from a network; (2) the data segment received in step (1) is sent to a segment detection module; (3) the data segment that is not the currently-processed data segment distinguished in step (2) is transmitted to a segmentation tree module for cache, and the segmentation detection module is invoked to guarantee that the segmentation on the branch of the segmentation tree is legal during the branch cache process; 4) the segments passing the authentication in step (2) are transmitted to a segment classification module, and the segments are classified into four types and imprinted with type marks; (5) an advanced processing module is invoked to judge if advanced processing can be carried out, if so, a specific reset module is started to complete the restoration of a data package; otherwise, the data package is transmitted to the segment tree module for cache; and (6) the coming of the next segment is waited and the process is returned to step (1).

Description

The fragmentation and reassembly method of protocol edition 6 Network Based
Technical field
The present invention is a kind of by improving the burst recombination efficiency, improves Internet Protocol of new generation---the method for IPV6 transmission performance belongs to the networking technical field of data transmission.
Background technology
The Web technology promotes the internet and develops with surprising rapidity.Before 10 years, the people that pay close attention to the Future Internet scalability just begin to worry that IPv4 (the 4 version Internet protocol Internet Protocol Version 4) limitation of network itself will be difficult to support the sustainable development of internet.IETF (internet engineering task group Internet Engineering Task Force) has released Internet Protocol of new generation for this reason---IPv6 (6 version Internet protocol Internet Protocol Version 6).Compare with IPv4, IPv6 provides many brand-new characteristics, as address space expansion, fail safe setting and automatic configuration etc.
The development of IPv6 obtains the support of numerous equipment manufacturers, even brings up to national aspect and carry out research and deployment based on IPv6.The IPv6 of U.S. Department of Defense disposes program and shows: 2005-2007, and IPv6 and IPv4 agreement are moved jointly; Realized the comprehensive IPv6 plan of continental United States in 2008.Europe and Japan and Korea S. have also launched big quantity research in the IPv6 association area, and various experimental networks and tentative commercial IPv6 net are open-minded one after another.In March, 2004, first next generation Internet backbone network of China---CERNET2 formally opens and provides service, becomes at present worldwide largest IPv6 country backbone network.
Though IPV6 is having very big breakthrough aspect the transmission of super large bag,, be the super large bag transmission that impossible realize fully on the internet in the short time in view of the scale of parcel net is quite big.So, big bag is carried out burst, reorganization also inevitably.The recombination method of research time-saving and efficiency still is necessary.Just present, based on the fragmentation and reassembly method of IPV4 very big breakthrough has been arranged, but also be in the starting stage for method based on the burst reorganization of IPV6, the research of carrying out is also few.And both have very big difference on packet header, and the fragmentation and reassembly method among the IPV4 can not directly be applied among the IPV6.We will describe next chapter the difference that is in relation between the two.
If restrict the transmission rate of the network of rate of received data in the past, the IP reception process software that receives on the main frame can be handled timely to packet fully.But now along with network speed is brought up to 1Gbps, 10Gbps, the transmittability of network has been not a main restricting factor.So just require the process software of IP data more efficiently, fragmentation and reassembly method replaces original burst recombination methods such as picture RFC791, RFC815 more efficiently.The Fast Classification of the high efficiency of transmission of Ji Dahua parallel processing, information and packet fragmentation and reorganization are exactly the most important thing that we will solve so.
List of references
[1]David?D?Clark.IP?datagram?reassembly?algorithms[C].RFC815,MIT?Laboratory?forComputer,Science?Computer?Systems?and?Communications?Group,1982.
[2]RFC2460,Internet?Protocol,Version?6(IPv6)Specification,Networking?Group,1998.
[3]Y.Xiang,and?W.Zhou,″An?Active?Distributed?Defense?System?to?Protect?Web?Applications?from?DDoS?Attacks″,Proc.of?the?6thInternational?Conference?onInformation?Integration?and?Web?Based
[4]S.Savage,D.Wetherall,A.Karlin?and?T.Anderson,″Network Support?for?IPTraceback″,ACM/IEEE?Transactions?on?Networking,Vol.9,No.3,2001,pp.226-237.
[5]RFC791,Internet?Protocol,DARPA,1981.
Summary of the invention
Technical problem: the purpose of this invention is to provide a kind of fragmentation and reassembly method of protocol edition 6 Network Based, in this invention, introduced the mechanism that burst tree mechanism, burst are classified, and embedded mechanism towards pre-treatment.
Technical scheme: the fragmentation and reassembly method of protocol edition 6 Network Based of the present invention is:
To the classification mechanism of burst reorganization introducing burst tree mechanism, burst, towards the mechanism of pre-treatment, concrete grammar is:
1). the burst recombination system receives a network and passes the data fragmentation of coming;
2). give the burst detection module with the data fragmentation that step 1) is received, identify by this module the legitimacy of burst to keep legal burst, abandon illegal burst;
3). with step 2) what differentiate is not to hand to burst tree module when the burst of the packet of pre-treatment to carry out buffer memory; And in the process of branch cache, also will call the burst detection module, the burst that ensures in the branch of burst tree is legal;
4). will be through step 2) the legal burst identified hands to the burst sort module, burst will be divided into four types, and be ironed type code;
5). call leading processing module and judge whether and can handle in advance, so just start the recovery that concrete recombination module is finished packet, carry out buffer memory otherwise just it is handed to burst tree module if can handle in advance;
6). wait for the arrival of next burst and forward step 1) to.
Described burst tree mechanism is: from root node down, and ground floor, address difference; The second layer, the address is identical, the port difference; The 3rd layer-leaf node, address, port are identical, and sign is different; Concrete data all are stored on the leaf node, and fragmented packets is received by system, when searching the segmentation tree, and according to source, the destination address of this fragmented packets, node in source, destination interface and the sign search tree; If there is not the leaf node of coupling, just in tree, create node, will treat that recombination data deposits leaf node in, and write down the time that this leaf node is created; System is that whole segmentation tree is set up a timer, and in each timing cycle, the difference of current time and leaf node creation-time is all calculated by system, and relatively this difference and the overtime threshold that system stipulates, as if overtime, then deletes this leaf node and outputting alarm; Overtime as if not having, then continue to keep; Establishing an initialization of variable on leaf node is 0, whenever receives a fragmented packets, and just will its value adds that the data field of bag comprises the size of header and data, deposits data field in node buffering area relevant position according to the side-play amount in the bag then; If last bag then adds its field offset amount that data field size composes to the variable of preserving final size.
The classification mechanism of described burst is: burst is divided into 4 types: 1. burst is with a hole complete filling; 2. burst has been filled the first half in hole; 3. burst has been filled the latter half in hole; 4. burst has been filled the mid portion in hole.
Described mechanism towards pre-treatment is: in first three burst that receives through classification, it is further classified, judgement is first burst of original bag, the burst of centre or last burst; If 1. the prolate-headed M field of burst be 1 and the burst offset field be 0, this burst is first burst type so; If 2. the prolate-headed M field of burst be 1 and the burst offset field greater than 0, this burst is middle burst type so; If 3. the prolate-headed M field of burst be 0 and the burst offset field greater than 0, this burst is last burst type so.
1. the principle of sharding method: the burst reorganization is most important work of IP layer, the main thought of its processing is: when packet when a network A enters another network B, if the data packet length of former network A must carry out burst greater than the maximum data packet length that new network B is allowed.Thereby there are some identification field to indicate the side-play amount of the common identification number of fragment packets, burst and whether are last a slice (as Fig. 1) at the burst extension header of IP packet.Source host is by using path mtu discovery mechanism, can determine the maximum packet length that source node can transmit in the whole link between the destination node, and then the IP packet that will transmit carried out rational burst, and fill in corresponding attribute field, be that each burst must comprise the basic head of IPV6, burst extension header and partial data.Destination host then according to the prolate-headed flag information of burst of the packet of receiving, is recombinated the burst of receiving with restore data.Therefore, fragment packets in order to obtain information, deal with data, all must be finished the reorganization of packet burst through network monitor equipment, safety means, system management facility the time.Therefore, a fragmentation and reassembly method is rapidly and efficiently arranged, can improve the performance of Network Transmission to a great extent.
2. based on the realization of the RFC815 method of IPV4: present most of operating systems are still used general sort algorithm to the reorganization of IP fragmentation, exactly side-play amount and the length of each IP fragmentation according to it are sorted in the burst sequence.This algorithm is inefficiency not only, and fail safe is not enough.At first, it must write down all bursts, and this itself is exactly a pretty troublesome job; Secondly, when a new burst arrived, it must be incorporated into this burst with paid-in burst.This is a very complicated job, because like this have a variety of situations to consider, as this burst perhaps just in time is that lacks between certain two burst, perhaps overlapping part is arranged with existing certain burst, even it is the same with certain existing burst, perhaps between two bursts, but do not fill up content between these two bursts fully.Therefore this sharding method must be considered considerable situation, is very easy to start a leak and gives hackers with opportunity.Reorganization has had method---the RFC815 (IP DATA-GRAM REASSEMBLY ALGORITHMS) that recommends to IETF to burst in fact.The recombination method of the description of RFC815 is quite simple, makes the workload of record burst reduce to minimum in the RFC815 method.No matter how many these bursts have, what situation is arranged, with what arrive in proper order, only need a size to equal the memory block of the preceding packet size of burst, it will be further appreciated that this method is applicable to different operating system.For this method is described, be necessary to define some terms.We are referred to as " hole " to the data field of reassembly buffer district hollow, and each such " hole " comprises two elements: Dongtou, the sequence number of the 1st byte in hole; The hole tail, the sequence number of last byte in hole.We call " hole descriptor " to this a pair of variable, and we call " hole descriptor chained list " to the chained list that all " a hole descriptor " of datagram connects into.When a new burst arrived, it might fill one or more such holes.We will check " hole descriptor chained list " each see if there is the burst of being just come here in the hole and fill.If just from chained list, remove this, otherwise just it abandoned.When last burst arrives, with eliminate in the chained list all.At this moment, packet just can be recombinated fully, and gives the last layer agreement and do further processing.The RFC815 method divides two sections to describe: part 1 indicates when a burst arrives, and does not have the hole to be filled the step that is adopted by this burst in order to define; Part 2 will be described the straightforward procedure of a management " hole descriptor ".
3. burst processing method: one newly to burst can have a lot of modes to fill existing hole: the simplest is that it is a hole complete filling; Perhaps, it in the Dongtou or the hole tail stay new hole; Perhaps, this burst is in the centre in hole at last, all stays Yi Xindong in Dongtou and hole tail.This method will with each hole with newly to the relevant information of burst carry out 4 compare tests.We are with the beginning as method of the burst that arrives the earliest.Create the data buffer zone of a sky and describe in the hole and set up one in the chained list, this shows that packet does not begin reorganization fully.Wherein, the Dongtou is zero, and the hole tail is infinitely great (the infinity here is meant a very large integer, and concrete number can be decided according to the realization situation).Below 8 steps be used to each newly to burst be inserted in the used memory block of packet after the reorganization.New burst is by head (fragment.first)--the 1st byte sequence number of burst and run-out (fragment.last)---, and last byte sequence number of burst is described.
1. describe from the hole and select next hole the chained list, if there is not the hole, promptly this burst is wrong, might be that dos attack abandons it, and execution in step 8;
2. if head are greater than the hole tail, promptly fragment.first>hole.last illustrates that then this burst does not belong to the part in this hole, can not fill this hole, needs the next hole of execution in step 1 search to test;
3. if run-out is less than the Dongtou, i.e. fragment.last<hole.first, then execution in step 1; If (top two the step all for really talking about, so this newly to burst not cover this hole, we disregard this hole.Select next hole to check beginning as method.)
4. from the descriptor chained list of hole, delete currentitem; Since (above-mentioned two steps are not true, and this new burst has certain related with this hole certainly so.Therefore, current descriptor deletes it with no longer valid,
And whether decision is necessary to create new descriptor in two following steps.)
5. if head are greater than the Dongtou, be fragment.first>hole.first, create a new hole descriptor newhole so, its Dongtou equals original Dongtou, its hole tail equals head and subtracts 1, i.e. newhole.first=hole.first and newhole.last=fragment.first-1; If (step is true, and the beginning in this hole part is not covered by this burst so, and we have created a hole descriptor to this duck eye.)
6. if run-out is less than the hole tail, be fragment.last<hole.last, and " morefragment " field of IP stem is for really talking about, we will create a new hole descriptor newhole, wherein the Dongtou equals run-out and adds 1, the hole tail equals original hole tail, i.e. newhole.first=fragment.last+1 and newhole.last=hole.last; (this step is the mirror image of step basically.Begin most, the data after we do not know to recombinate are surrounded by much, so we have created one from zero hole to infinitely great (concrete number is determined by the implementor).At last, we are with last burst of the packet received.At this moment, last byte from buffering area can be removed to infinitely-great this hole descriptor.Be called " more fragment " this flag bit by the IP stem and show this situation.Can prevent that to the test in this step us from setting up last byte from packet to infinitely-great hole descriptor.)
7. return step 1;
8. if descriptor chained list in hole is empty, the reorganization of packet has also been finished so, it is passed to the last layer agreement do further processing, otherwise return.
(1) management of hole descriptor chained list: the most complicated in above-mentioned 8 steps is not to carry out the method test, but from the descriptor chained list of hole, increase or the deletion chained list in element.There is a very simple method to manage these hole descriptors, exactly the hole descriptor is put in the byte of each wide open beginning.Attention is by the definition of recombination method, and each burst minimum is 8 bytes.Depositing Dongtou, hole tail respectively needs two bytes, and two other byte is used to link the usefulness of other element in the tabulation of hole descriptor.So also leave two bytes and handle the realization feature.For this storage policy a significant disadvantages is arranged, before the reassembly buffer district, will carry out above-mentioned 8 steps in copies data from burst exactly.If first copies data will be destroyed one or more holes descriptor so.In case this method begins, the hole descriptor that will delete after all is just by discarded fully.These hole descriptors that disperse in whole reassembly buffer district must be lined up certain chained list oneself can be searched them.This just means the stem that a pointed chained list must be arranged.In many cases, this pointer can be stored in the descriptor block zone that interrelates with each reassembly buffer district.If also it's not true for such buffering area, one bad but effectively way be that linked list head is existed the field that the IP stem does not re-use in the reassembly buffer district, most typical as checksum field.
The shortcoming of RFC815 method: foregoing description is one simply to be described 815 methods.It has been supposed in the process of packet reorganization does not have the IP option to work, but option is optional in IPV4, length also is unfixed, it is much to be to know just that up to the 1st burst receiving packet (the 1st fragment packets here is meant the burst that comprises raw data packets zero byte, not necessarily the 1st in the reception order) the IP stem has about the where the shoe pinches of option so.This is because because some option is copied to each burst of packet in the same manner, and other option as " record route ", just is placed to the 1st burst.Only known that stem has and muchly just can know from burst, where to begin copy data to buffering area.If the burst of Dao Daing just in time is the 1st burst the earliest, everything is all no problem so.Otherwise, mistake will occur, even can be easy to go smoothly by dos attack, the danger of destroying the pointer that the hole descriptor is connected together is arranged in copies data.And in this method to the hole descriptor to deposit the place more hard to understand.
Beneficial effect: use burst tree mechanism can be distinguished the burst of difference bag, and can realize the parallel reorganization of the bursts of different bags, the present relatively sequential processes of generally using, and the speed of reorganization will improve a lot; Use the classification mechanism of burst to distinguish storage, the reorganization of burst is provided very big convenience, reduced the time of searching, can improve recombination efficiency to a certain extent the different bursts of same bag; The mechanism towards pre-treatment that embeds can be handled first three burst in advance, and for the reorganization of the bag of few and three bursts, speed can obtain the raising of the order of magnitude.Present still more big packet network has obtained certain development, and especially IPV6 also supports the transmission of huge bag, and what so should mechanism just more seem has been necessary.
Description of drawings
Fig. 1 is the schematic diagram of IPV6 burst extension header form;
Fig. 2 is the schematic diagram of IPV6 pack arrangement;
Fig. 3 is the schematic diagram of the packet after the reorganization;
Fig. 4 is the schematic diagram of the recombination mechanism of burst;
Fig. 5 is the schematic diagram of burst tree structure;
Fig. 6 is the schematic diagram that the burst legitimacy detects;
Fig. 7 is the schematic diagram of burst classification process;
Fig. 8 is the pretreated schematic diagram of burst reorganization;
Fig. 9 is the schematic diagram of state machine.
Figure 10 is a system flow chart.
Embodiment
Method of the present invention mainly comprises: the reorganization principle of fragment packets, burst tree, burst detect, the classification of burst, leading treatment mechanism, concrete six parts such as recombination method.
1. the reorganization principle of fragment packets:
At the destination node main frame, fragment packets was reassembled as the original not form of burst, as shown in Figure 2 (note: the packet after the reorganization is that not comprise burst prolate-headed).
The principle that reorganization should be followed: former bag can only be by having same source, the fragment packets reorganization of destination address and segmental identification, can not the burst part form in the bag after the reorganization by all stems (not containing the burst stem) in burst stem front in first fragment packets (just the burst side-play amount is that bag of 0), and do following two places and revise:
" next stem " field from the burst stem of first burst obtain can not burst " next stem " field value in last stem of part, by length and the length of last burst and the payload length that side-play amount calculates the reorganization bag that can not the burst part.In order to write out the computing formula of the payload length that calculates the reorganization bag, we define some relevant variable symbols earlier:
The payload length field of PL.orig=reorganization bag;
The payload length field of first fragment packets of PL.first=;
The branch leaf length of burst stem back in first fragment packets of FL.first=;
The burst offset field of burst stem in last fragment packets of FO.last=;
The branch leaf length of burst stem back in last fragment packets of FL.last=;
The computing formula of calculating the payload length of reorganization bag so can be written as:
PL.orig=PL.first-FL.first-8+(8*FO.last)+FL.last。
But the burst part of reorganization bag is made up of the burst of burst stem back in each fragment packets.The length of each burst can be deducted in this bag that the length computation of all stems obtains between IPv6 stem and the burst by the payload length of fragment packets.But the relative position of each burst in the burst part calculated by its burst offset value.Concrete recombination mechanism as shown in Figure 4.
2. burst is set:
According to above-mentioned burst recombination mechanism, we determine to adopt " burst tree " technology to realize the reorganization of IPv6 fragment packets.We just illustrate the structure and the storage rule of " burst tree " so now.
The structure of " burst tree ": so-called " burst tree " is meant, sets up tree structure and stores the burst package, as shown in Figure 5.
The foundation rule of segmentation tree: from root node down, ground floor, address difference; The second layer, the address is identical, the port difference; The 3rd layer (leaf node), address, port are identical, and sign is different.Concrete data all are stored on the leaf node.Fragmented packets is received by system, when searching the segmentation tree, and according to source, the destination address of this fragmented packets, node in source, destination interface and the sign search tree.If there is not the leaf node of coupling, just in tree, create node, will treat that recombination data deposits leaf node in, and write down the time that this leaf node is created.System is that whole segmentation tree is set up a timer, and in each timing cycle, the difference of current time and leaf node creation-time is all calculated by system, and relatively this difference and the overtime threshold that system stipulates, as if overtime, then deletes this leaf node and outputting alarm; Overtime as if not having, then continue to keep.Establish a variable datasize on leaf node, whenever receive a fragmented packets, just will datasize value adds the size of the data field (comprising header and data) of bag.Deposit data field in node buffering area relevant position according to the side-play amount in the bag then.If last bag (M=0, field offset amount>0) then adds its field offset amount that data field size composes to fullsize.Fullsize and datasize are compared:
If fullsize>datasize, then explanation also has fragment packets, continues to wait for the arrival of next fragment packets;
Figure A20081002232500092
If fullsize=datasize illustrates that then the fragment packets of a bag is here, illustrate that packet is by success
Restore; (because another new core concept of this patent realizes dynamic burst reorganization exactly, just the data content of each burst all is stored on the final position of leaf node BUFFER, when the HOLE in BUFFER is filled and finishes so, just the realization of nature the recovery of bag, the efficient of the burst reorganization that so just improves to a great extent also will inevitably be to " network speed " increases.Concrete realization mechanism is described in detail afterwards chapters and sections)
Figure A20081002232500093
If fullsize<datasize, then explanation has made mistakes even has suffered dos attack, alarms, and deletes this leaf node.
After this, receive that at every turn new fragment packets all will compare fullsize and datasize.When bag group, new data packet format is: packet header is the information of all headers before the up-to-date fragmented packets of receiving (Ethernet head+IPv6 head+can not segmentation extension header); Data division is the data in this node buffering area.
3. burst detects:
Present most of operating system is still used general sort algorithm to the reorganization of IP fragmentation, exactly side-play amount and the length of each IP fragmentation according to it is sorted in the burst sequence.This algorithm is inefficiency not only, and fail safe is not enough.At first, it must write down all bursts, and this itself is exactly a pretty troublesome job; Secondly, when a new burst arrived, it must be incorporated into this burst with paid-in burst.This is a very complicated job, because like this have a variety of situations to consider, as this burst perhaps just in time is that lacks between certain two burst, perhaps overlapping part is arranged with existing certain burst, even it is the same with certain existing burst, perhaps between two bursts, but do not fill up content between these two bursts fully.Therefore this sharding method must be considered considerable situation, is very easy to start a leak and gives hackers with opportunity.Below I provide quite simple recombination method, make the workload of record burst reduce to minimum.No matter how many these bursts have, what situation is arranged, with what arrive in proper order, only need a size to equal the memory block of the preceding packet size of burst, it will be further appreciated that this method is applicable to different operating system.For this method is described, be necessary to define some terms.We are referred to as " hole " to the data field of reassembly buffer district hollow, and each such " hole " comprises two elements: Dongtou, the sequence number of the 1st byte in hole; The hole tail, the sequence number of last byte in hole.We call " hole descriptor " to this a pair of variable, and we call " hole descriptor chained list " to the chained list that all " a hole descriptor " of datagram connects into.When a new burst arrived, it might fill one or more such holes.We will check " hole descriptor chained list " each see if there is the burst of being just come here in the hole and fill.If just from chained list, remove this, otherwise just it abandoned.When last burst arrives, with eliminate in the chained list all.At this moment, packet just can be recombinated fully, and gives the last layer agreement and do further processing.
We are with the beginning as method of the burst that arrives the earliest, earlier the good burst tree of initialization is traveled through, search corresponding leaf node, if search failure, the buffering area of a then newly-built leaf node sky and to the path of root, and describe in the hole and to set up one in the chained list, this shows that packet does not begin reorganization fully.Wherein, the Dongtou is zero, and the hole tail is infinitely great.When receiving a new burst, at first calculate head and sheet tail-end value: fragment.first, the fragment.last of this burst.Then, the head, sheet tail-end value and each the hole descriptor that calculate are compared successively (if describe chained list for empty, from the leaf node buffering area, read the information in first hole so), if exist a hole to comprise this burst, be fragment.first>=hole.first and fragment.last<=hole.last, illustrate that so this burst is legal, and carry out following operation; Otherwise, just illustrating that this burst is illegal, warning and this burst abandoned reports an error.The testing process of burst legitimacy as shown in Figure 6.
4. the classification of burst:
After burst detects through burst and is accredited as legal burst, will classify to it below.We are divided into 4 types with burst: 1. burst is with a hole complete filling, i.e. fragment.first=hole.first ﹠amp; ﹠amp; Fragment.last=hole.last-1; 2. burst has been filled the first half in hole, i.e. fragment.first=hole.first ﹠amp; ﹠amp; Fragment.last<hole.last; 3. burst has been filled the latter half in hole, i.e. fragment.first>hole.first ﹠amp; ﹠amp; Fragment.last=hole.last-1; 4. burst has been filled the mid portion in hole, i.e. fragment.first>hole.first ﹠amp; ﹠amp; Fragment.last<hole.last-1.The flow chart of burst classification as shown in Figure 7.
5. leading treatment mechanism:
In order further to improve recombination rates, this patent provides the treatment mechanism forward that first three burst is handled in advance.In first three burst that receives through classification, it further to be classified, judgement is first burst (First_part) of original bag, middle burst (Middle_part) or last burst (Last_part).Classification mechanism is as follows so:
Figure A20081002232500101
First_part: the prolate-headed M field of burst be 1 and the burst offset field be 0;
Figure A20081002232500102
Middle_part: the prolate-headed M field of burst be 1 and the burst offset field greater than 0;
Last_part: the prolate-headed M field of burst be 0 and the burst offset field greater than 0.
The realization thought of the leading treatment mechanism of this embedding such as following flow chart are shown in Figure 8.In order to be the thought that the reader further understands this leading mechanism, we give out with state machine now so, as shown in Figure 9.The explanation of state machine:
Figure A20081002232500104
FIRST (i): the burst that receives for the i time is first burst of bag;
Figure A20081002232500105
MIDDLE (i): the burst that receives for the i time is the middle burst of bag;
Figure A20081002232500106
LAST (i): the burst that receives for the i time is last burst of bag;
Figure A20081002232500107
NOT FIRST (3): the burst that receives for the 3rd time is not first burst of bag;
Figure A20081002232500108
NOT MIDDLE (3): the burst that receives for the 3rd time is not the middle burst of bag;
Figure A20081002232500109
NOT LAST (3): the burst that receives for the 3rd time is not last burst of bag.
6. recombination method:
Below 8 steps be used to each newly to burst be inserted in the used memory block of packet after the reorganization.New burst is by head (fragment.first)---the 1st byte sequence number of burst and run-out (fragment.last)---, and last byte sequence number of burst is described.
Figure A200810022325001010
Describe the next hole of selection the chained list from the hole, if there is not the hole, promptly this burst is wrong, might be that dos attack abandons it, and execution in step 8;
Figure A200810022325001011
If head are greater than the hole tail, promptly fragment.first>hole.last illustrates that then this burst does not belong to the part in this hole, can not fill this hole, needs the next hole of execution in step 1 search to test;
Figure A200810022325001012
If run-out is less than the Dongtou, i.e. fragment.last<hole.first, then execution in step 1; If (top two the step all for really talking about, so this newly to burst not cover this hole, we disregard this hole.Select next hole to check beginning as method.)
Figure A20081002232500111
From the descriptor chained list of hole, delete currentitem; Since (above-mentioned two steps are not true, and this new burst has certain related with this hole certainly so.Therefore, current descriptor deletes it with no longer valid, and whether decision is necessary to create new descriptor in two following steps.)
If head are greater than the Dongtou, promptly fragment.first>hole.first creates a new hole descriptor newhole so,
Its Dongtou equals original Dongtou, and its hole tail equals head and subtracts 1, i.e. newhole.first=hole.first and newhole.last=fragment.first-1; If (step is true, and the beginning in this hole part is not covered by this burst so, and we have created a hole descriptor to this duck eye.)
If run-out is less than the hole tail, be fragment.last<hole.last, and " M " field of burst extended head is the words of " 1 ", we will create a new hole descriptor newhole, wherein the Dongtou equals run-out and adds 1, the hole tail equals original hole tail, i.e. newhole.first=fragment.last+1 and newhole.last=hole.last; (this step is the mirror image of step basically.Begin most, the data after we do not know to recombinate are surrounded by much, so we have created one from zero hole to infinitely great (concrete number is determined by the implementor).At last, we are with last burst of the packet received.At this moment, last byte from buffering area can be removed to infinitely-great this hole descriptor.Be called " more fragment " this flag bit by the IP stem and show this situation.Can prevent that to the test in this step us from setting up last byte from packet to infinitely-great hole descriptor.)
Figure A20081002232500114
Return step 1;
Figure A20081002232500115
If hole descriptor chained list is empty, the reorganization of packet has also been finished so, it is passed to the last layer agreement do further processing, otherwise return.

Claims (4)

1. the fragmentation and reassembly method of a protocol edition 6 Network Based, it is characterized in that burst reorganization introduce the classification mechanism of burst tree mechanism, burst, towards the mechanism of pre-treatment, concrete grammar is:
1). the burst recombination system receives a network and passes the data fragmentation of coming;
2). give the burst detection module with the data fragmentation that step 1) is received, identify by this module the legitimacy of burst to keep legal burst, abandon illegal burst;
3). with step 2) what differentiate is not to hand to burst tree module when the burst of the packet of pre-treatment to carry out buffer memory; And in the process of branch cache, also will call the burst detection module, the burst that ensures in the branch of burst tree is legal;
4). will be through step 2) the legal burst identified hands to the burst sort module, burst will be divided into four types, and be ironed type code;
5). call leading processing module and judge whether and can handle in advance, so just start the recovery that concrete recombination module is finished packet, carry out buffer memory otherwise just it is handed to burst tree module if can handle in advance;
6). wait for the arrival of next burst and forward step 1) to.
2. the fragmentation and reassembly method of protocol edition 6 Network Based according to claim 1 is characterized in that described burst tree mechanism is: from root node down, and ground floor, address difference; The second layer, the address is identical, the port difference; The 3rd layer-leaf node, address, port are identical, and sign is different; Concrete data all are stored on the leaf node, and fragmented packets is received by system, when searching the segmentation tree, and according to source, the destination address of this fragmented packets, node in source, destination interface and the sign search tree; If there is not the leaf node of coupling, just in tree, create node, will treat that recombination data deposits leaf node in, and write down the time that this leaf node is created; System is that whole segmentation tree is set up a timer, and in each timing cycle, the difference of current time and leaf node creation-time is all calculated by system, and relatively this difference and the overtime threshold that system stipulates, as if overtime, then deletes this leaf node and outputting alarm; Overtime as if not having, then continue to keep; Establishing an initialization of variable on leaf node is 0, whenever receives a fragmented packets, and just will its value adds that the data field of bag comprises the size of header and data, deposits data field in node buffering area relevant position according to the side-play amount in the bag then; If last bag then adds its field offset amount that data field size composes to the variable of preserving final size.
3. the fragmentation and reassembly method of protocol edition 6 Network Based according to claim 1, it is characterized in that the classification mechanism of described burst is: burst is divided into 4 types: 1. burst is with a hole complete filling; 2. burst has been filled the first half in hole; 3. burst has been filled the latter half in hole; 4. burst has been filled the mid portion in hole.
4. the fragmentation and reassembly method of protocol edition 6 Network Based according to claim 1, it is characterized in that described mechanism towards pre-treatment is: in first three burst that receives through classification, it is further classified, and judgement is first burst of original bag, the burst of centre or last burst; If 1. the prolate-headed M field of burst be 1 and the burst offset field be 0, this burst is first burst type so; If 2. the prolate-headed M field of burst be 1 and the burst offset field greater than 0, this burst is middle burst type so; If 3. the prolate-headed M field of burst be 0 and the burst offset field greater than 0, this burst is last burst type so.
CN2008100223254A 2008-07-09 2008-07-09 Fragmentation and reassembly method based on network protocol version six Expired - Fee Related CN101316232B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2008100223254A CN101316232B (en) 2008-07-09 2008-07-09 Fragmentation and reassembly method based on network protocol version six

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2008100223254A CN101316232B (en) 2008-07-09 2008-07-09 Fragmentation and reassembly method based on network protocol version six

Publications (2)

Publication Number Publication Date
CN101316232A true CN101316232A (en) 2008-12-03
CN101316232B CN101316232B (en) 2010-12-22

Family

ID=40107077

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2008100223254A Expired - Fee Related CN101316232B (en) 2008-07-09 2008-07-09 Fragmentation and reassembly method based on network protocol version six

Country Status (1)

Country Link
CN (1) CN101316232B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101820388A (en) * 2009-02-27 2010-09-01 凹凸电子(武汉)有限公司 The Apparatus and method for of packet fragment reassembly
CN103023808A (en) * 2012-12-28 2013-04-03 南京邮电大学 Block link list structure based 6lowpan data packet repackaging buffering method
CN103295621A (en) * 2012-02-27 2013-09-11 三星电子株式会社 Apparatus and method for data decoding
CN104022999A (en) * 2013-09-05 2014-09-03 北京科能腾达信息技术股份有限公司 Network data processing method and system based on protocol analysis
CN104202268A (en) * 2014-09-16 2014-12-10 桂林电子科技大学 IPv6 (internet protocol version 6) routing protocol message fragment reassembly method for wireless sensor network
CN104639511A (en) * 2013-11-13 2015-05-20 安凯(广州)微电子技术有限公司 Method and device for saving internal memory
CN107895391A (en) * 2017-08-30 2018-04-10 陕西千山航空电子有限责任公司 A kind of flight data packet processing method
CN109547389A (en) * 2017-08-08 2019-03-29 中国移动通信集团宁夏有限公司 A kind of method and device of ASCII stream file ASCII recombination
CN111343225A (en) * 2018-12-19 2020-06-26 北京奇虎科技有限公司 File processing method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100464536C (en) * 2006-09-18 2009-02-25 华为技术有限公司 Method and device for recomposing fragmented data

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101820388A (en) * 2009-02-27 2010-09-01 凹凸电子(武汉)有限公司 The Apparatus and method for of packet fragment reassembly
CN103295621A (en) * 2012-02-27 2013-09-11 三星电子株式会社 Apparatus and method for data decoding
CN103023808B (en) * 2012-12-28 2015-06-03 南京邮电大学 Block link list structure based 6lowpan data packet repackaging buffering method
CN103023808A (en) * 2012-12-28 2013-04-03 南京邮电大学 Block link list structure based 6lowpan data packet repackaging buffering method
CN104022999A (en) * 2013-09-05 2014-09-03 北京科能腾达信息技术股份有限公司 Network data processing method and system based on protocol analysis
CN104639511A (en) * 2013-11-13 2015-05-20 安凯(广州)微电子技术有限公司 Method and device for saving internal memory
CN104639511B (en) * 2013-11-13 2018-08-03 安凯(广州)微电子技术有限公司 A kind of implementation method and device for saving memory
CN104202268A (en) * 2014-09-16 2014-12-10 桂林电子科技大学 IPv6 (internet protocol version 6) routing protocol message fragment reassembly method for wireless sensor network
CN109547389A (en) * 2017-08-08 2019-03-29 中国移动通信集团宁夏有限公司 A kind of method and device of ASCII stream file ASCII recombination
CN109547389B (en) * 2017-08-08 2021-12-07 中国移动通信集团宁夏有限公司 Code stream file recombination method and device
CN107895391A (en) * 2017-08-30 2018-04-10 陕西千山航空电子有限责任公司 A kind of flight data packet processing method
CN107895391B (en) * 2017-08-30 2021-07-16 陕西千山航空电子有限责任公司 Flight parameter data packet processing method
CN111343225A (en) * 2018-12-19 2020-06-26 北京奇虎科技有限公司 File processing method and device
CN111343225B (en) * 2018-12-19 2024-04-09 三六零科技集团有限公司 File processing method and device

Also Published As

Publication number Publication date
CN101316232B (en) 2010-12-22

Similar Documents

Publication Publication Date Title
CN101316232B (en) Fragmentation and reassembly method based on network protocol version six
US9305055B2 (en) Method and apparatus for analysing data packets
US8681819B2 (en) Programmable multifield parser packet
US20150334210A1 (en) Processing Data Packets in Performance Enhancing Proxy (PEP) Environment
JP2002538731A (en) Dynamic parsing in high performance network interfaces
CN104022999A (en) Network data processing method and system based on protocol analysis
CN106534059A (en) Network named fragments in a content centric network
WO2014094441A1 (en) Virus detection method and device
CN101997859B (en) Method and equipment for identifying load of packet in TCP stream
CN109120602B (en) IPv6 attack tracing method
CN104796354A (en) Out-of-order data packet string matching method and system
CN102217251A (en) Data forwarding method, data processing method, system and device thereof
CN107666486A (en) A kind of network data flow restoration methods and system based on message protocol feature
CN105407096A (en) Message data detection method based on stream management
CN113709110A (en) Software and hardware combined intrusion detection system and method
CN101026576A (en) Pattern matching method and device for processing fragmented message string giving consideration to matching strategy
JP2002538721A (en) Method and apparatus for classifying network traffic at a high performance network interface
CN111865996A (en) Data detection method and device and electronic equipment
Bani-Hani et al. SYN flooding attacks and countermeasures: a survey
CN101582880A (en) Method and system for filtering messages based on audited object
CN107743102B (en) efficient tcp session recombination method
JP2007537617A (en) How to speed up execution file transit time via checkpoint
CN104702622B (en) Many-one type intranet and extranet big data one-way transmission communication means
CN114896207A (en) Method and device for retrieving pcapng data packet file
JP4729389B2 (en) Pattern matching device, pattern matching method, pattern matching program, and recording medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20081203

Assignee: Jiangsu Nanyou IOT Technology Park Ltd.

Assignor: Nanjing Post & Telecommunication Univ.

Contract record no.: 2016320000207

Denomination of invention: Fragmentation and reassembly method based on network protocol version six

Granted publication date: 20101222

License type: Common License

Record date: 20161109

LICC Enforcement, change and cancellation of record of contracts on the licence for exploitation of a patent or utility model
C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20161205

Address after: 210003 Gulou District, Jiangsu, Nanjing new model road, No. 66

Patentee after: Nanjing University of Posts and Telecommunications Asset Management Co., Ltd.

Address before: 210003 Nanjing City, Jiangsu Province, the new model road No. 66

Patentee before: Nanjing Post & Telecommunication Univ.

EC01 Cancellation of recordation of patent licensing contract

Assignee: Jiangsu Nanyou IOT Technology Park Ltd.

Assignor: Nanjing Post & Telecommunication Univ.

Contract record no.: 2016320000207

Date of cancellation: 20180116

EC01 Cancellation of recordation of patent licensing contract
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20101222

Termination date: 20200709

CF01 Termination of patent right due to non-payment of annual fee