CN105763659B - A kind of IPv6 tunnel packet packaging method and system - Google Patents

A kind of IPv6 tunnel packet packaging method and system Download PDF

Info

Publication number
CN105763659B
CN105763659B CN201410779694.3A CN201410779694A CN105763659B CN 105763659 B CN105763659 B CN 105763659B CN 201410779694 A CN201410779694 A CN 201410779694A CN 105763659 B CN105763659 B CN 105763659B
Authority
CN
China
Prior art keywords
ipv4
ipv6
message
heading
fragment
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.)
Active
Application number
CN201410779694.3A
Other languages
Chinese (zh)
Other versions
CN105763659A (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.)
China Telecom Corp Ltd
Original Assignee
China Telecom Corp 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 China Telecom Corp Ltd filed Critical China Telecom Corp Ltd
Priority to CN201410779694.3A priority Critical patent/CN105763659B/en
Publication of CN105763659A publication Critical patent/CN105763659A/en
Application granted granted Critical
Publication of CN105763659B publication Critical patent/CN105763659B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a kind of method and system of IPv6 tunnel packet encapsulation IPv4 message, and this method can guarantee that the network equipment can read packed IPv4 message, and execute corresponding forwarding strategy.This method comprises: receiving IPv4 message and taking out IPv4 heading;IPv6 heading is set, IPv6 extension header is set in the IPv6 heading and is identified, indicates the prolate-headed position IPv4, and the IPv4 heading of taking-up is encapsulated into IPv4 extension header;The IPv4 message content is connected, IPv6 message is encapsulated as.Therefore, IPv4 heading can be positioned, the content in IPv4 heading is read.

Description

A kind of IPv6 tunnel packet packaging method and system
Technical field
The present invention relates to the communications field more particularly to a kind of IPv6 tunnel packet packaging methods and system.
Background technique
IPv6 tunneling technique is a kind of important technology type in IPv6 transitional technology.
Although the tunnel IPv6 solves the problems, such as IPv6 transition period IPv4 user access and message passing through IPv 6 network, but It is to cause the network equipment in message forwarding path that can only identify IPv6 message since IPv4 message is packaged into IPv6 message Head can not read the content in IPv4 heading, to make some Policy Control mechanisms of IPv4 message fail, such as basis IPv4 message destination address adjusts bandwidth, according to service quality (QoS) label adjustment forwarding priority etc..
Summary of the invention
The technical problem to be solved by the present invention is in the tunnel IPv6, since IPv4 message is packaged into IPv6 message, The network equipment can not position the heading of IPv4, so that the content in IPv4 heading can not be read.
According to an aspect of the present invention, a kind of IPv6 tunnel packet packaging method is proposed, comprising:
It receives IPv4 message and takes out IPv4 heading;
IPv6 heading is set, IPv6 extension header is set in the IPv6 heading and is identified, instruction IPv4 is prolate-headed Position, and the IPv4 heading of taking-up is encapsulated into IPv4 extension header;
The IPv4 message content is connected, IPv6 message is encapsulated as.
Further, it receives IPv4 message and takes out IPv4 heading;
Judge whether IPv4 message length is greater than the PMTU value of IPv6, if it is not greater, will take out without message fragment IPv4 heading be encapsulated into IPv4 extension header, and connect the IPv4 message content, be encapsulated as IPv6 message;
If it is greater, then IPv4 message is divided by n piece according to the PMTU value of message length and IPv6, setting IPv4 message Fragment flag bit identifies the relationship between each fragment message, and n IPv4 heading of generation is encapsulated into n respectively In the IPv4 extension header of IPv6 message, and the IPv4 message content of fragment in each IPv6 message is connected, is encapsulated as n fragment IPv6 message.
Further, the length of IPv4 message is divided into each fragment message equal with the PMTU value of IPv6, until The length of IPv4 message is less than or equal to the PMTU value of IPv6.
Further, at least one IPv6 message is received, obtains IPv6 extension header mark from IPv6 heading;
The prolate-headed position IPv4 is known according to IPv6 extension header mark, and reads IPv4 extension header;
IPv4 heading is read from IPv4 extension header;
Field contents in IPv4 heading are taken out, are matched with the strategy in Policy Table, if it does, then according to The strategy is forwarded, otherwise, normal to forward.
Further, when receiving multiple IPv6 messages, judged whether to lose fragment according to the fragment flag bit of IPv4 message, If it is, triggering IPv4 message is retransmitted.
According to another aspect of the present invention, it is also proposed that a kind of IPv6 tunnel packet package system, comprising:
Heading extraction module, for receiving IPv4 message and taking out IPv4 heading;
Package module is arranged IPv6 extension header in the IPv6 heading and identifies for IPv6 heading to be arranged, instruction The prolate-headed position IPv4, and the IPv4 heading of taking-up is encapsulated into IPv4 extension header;The IPv4 message content is connected, It is encapsulated as IPv6 message.
Further, fragment module, for judging whether IPv4 message length is greater than the PMTU value of IPv6, if it is not greater, Without message fragment;If it is greater, then IPv4 message is divided into n piece according to the PMTU value of message length and IPv6, it is arranged The fragment flag bit of IPv4 message, identifies the relationship between each fragment message;
Wherein, the package module respectively extends the IPv4 that n IPv4 heading of generation is encapsulated into n IPv6 message In head, and the IPv4 message content of fragment in each IPv6 message is connected, is encapsulated as the IPv6 message of n fragment.
Further, the fragment module is used to for the length of IPv4 message being divided into equal with the PMTU value of IPv6 each Fragment message, until the length of IPv4 message is less than or equal to the PMTU value of IPv6.
Further, strategic control module obtains IPv6 extension from IPv6 heading for receiving at least one IPv6 message Leader is known;The prolate-headed position IPv4 is known according to IPv6 extension header mark, and reads IPv4 extension header;It is read from IPv4 extension header Take IPv4 heading;Field contents in IPv4 heading are taken out, are matched with the strategy in Policy Table, if it does, Then it is forwarded according to the strategy, it is otherwise, normal to forward.
Further, the strategic control module is used for when receiving multiple IPv6 messages, according to the fragment mark of IPv4 message Will position judges whether to lose fragment, if it is, triggering IPv4 message is retransmitted.
Compared with prior art, the present invention is by receiving IPv4 message and taking out IPv4 heading;IPv6 heading is set, IPv6 extension header is arranged in the IPv6 heading to identify, indicates the prolate-headed position IPv4, and by the IPv4 message of taking-up Head is encapsulated into IPv4 extension header;The IPv4 message content is connected, IPv6 message is encapsulated as.Therefore, IPv4 report can be positioned Literary head reads the content in IPv4 heading.
By referring to the drawings to the detailed description of exemplary embodiment of the present invention, other feature of the invention and its Advantage will become apparent.
Detailed description of the invention
The attached drawing for constituting part of specification describes the embodiment of the present invention, and together with the description for solving Release the principle of the present invention.
The present invention can be more clearly understood according to following detailed description referring to attached drawing, in which:
Fig. 1 is the flow diagram of one embodiment of IPv6 tunnel packet packaging method of the present invention.
Fig. 2 is the structural schematic diagram that the present invention carries IPv4 heading in IPv6 extension header.
Fig. 3 is the flow diagram of another embodiment of IPv6 tunnel packet packaging method of the present invention.
Fig. 4 is that the flow diagram for carrying out the embodiment of the method for policy control is encapsulated the present invention is based on IPv6 message.
Fig. 5 is that the present invention carries out the encapsulation of IPv6 message and carries out the flow diagram of the embodiment of the method for policy control.
Fig. 6 is that the structural diagrams of one embodiment of IPv6 tunnel packet package system of the present invention are intended to.
Specific embodiment
Carry out the various exemplary embodiments of detailed description of the present invention now with reference to attached drawing.It should also be noted that unless in addition having Body explanation, the unlimited system of component and the positioned opposite of step, numerical expression and the numerical value otherwise illustrated in these embodiments is originally The range of invention.
Simultaneously, it should be appreciated that for ease of description, the size of various pieces shown in attached drawing is not according to reality Proportionate relationship draw.
Be to the description only actually of at least one exemplary embodiment below it is illustrative, never as to the present invention And its application or any restrictions used.
Technology, method and apparatus known to person of ordinary skill in the relevant may be not discussed in detail, but suitable In the case of, the technology, method and apparatus should be considered as authorizing part of specification.
It is shown here and discuss all examples in, any occurrence should be construed as merely illustratively, without It is as limitation.Therefore, the other examples of exemplary embodiment can have different values.
It should also be noted that similar label and letter indicate similar terms in following attached drawing, therefore, once a certain Xiang Yi It is defined in a attached drawing, then in subsequent attached drawing does not need that it is further discussed.
To make the objectives, technical solutions, and advantages of the present invention clearer, below in conjunction with specific embodiment, and reference Attached drawing, the present invention is described in more detail.
Fig. 1 is the flow diagram of one embodiment of IPv6 tunnel packet packaging method of the present invention.The following steps are included:
In step 110, receives IPv4 message and take out IPv4 heading.
In step 120, IPv6 heading is set, IPv6 extension header is set in the IPv6 heading and is identified, instruction The prolate-headed position IPv4, and the IPv4 heading of taking-up is encapsulated into IPv4 extension header.
Fig. 2 show the structural schematic diagram that the present invention carries IPv4 heading in IPv6 extension header.
As shown, indicating that next leader label are IPv4 in the IPv6 heading, that is, instruction IPv4 is prolate-headed Position, it is TCP/UDP that IPv4 heading, IPv4 heading length and next leader label are carried in IPv4 extension header, In, next leader label are that TCP/UDP refers to that be transmitted is TCP/UDP message.It will be understood by those of skill in the art that this Locating next leader label is that TCP/UDP is only intended to illustrate, and be should not be construed as limiting the invention.For example, next leader Label are ICMP or other headings, and only the value of this field is different, do not influence treatment process.
In step 130, the IPv4 message content is connected, IPv6 message is encapsulated as.
In an embodiment of the present invention, by receiving IPv4 message and taking out IPv4 heading;IPv6 heading is set, IPv6 extension header is arranged in the IPv6 heading to identify, indicates the prolate-headed position IPv4, and by the IPv4 heading of taking-up It is encapsulated into IPv4 extension header;The IPv4 message content is connected, IPv6 message is encapsulated as.Therefore, IPv4 message can be positioned Head reads the content in IPv4 heading.
Fig. 3 is the flow diagram of another embodiment of IPv6 tunnel packet packaging method of the present invention.Including following step It is rapid:
In step 310, receives IPv4 message and take out IPv4 heading.
In step 320, judge whether IPv4 message length is greater than the PMTU value of IPv6, if it is not greater, then executing step 330, if it is greater, then executing step 340.
Step 350 is continued to execute without message fragment in step 330.
In step 340, IPv4 message is divided by n piece according to the PMTU value of message length and IPv6, setting IPv4 message Fragment flag bit identifies the relationship between each fragment message, continues to execute step 350.
Wherein, it is by the operation that IPv4 message is divided into n piece according to the PMTU value of message length and IPv6, by IPv4 message Length is divided into each fragment message equal with the PMTU value of IPv6, until the length of IPv4 message is less than or equal to IPv6's PMTU value.
In step 350, IPv4 heading is encapsulated into the IPv4 extension header of IPv6 message, and connects each IPv6 message In IPv4 message content, be encapsulated as IPv6 message.
In step 360, tunnel packet output.
In this embodiment, IPv4 message fragment number n, the fragment are determined according to the PMTU value of message length and IPv6 Message length afterwards is less than the PMTU value of IPv6, and IPv4 heading is generated n parts, and all fragment IPv4 messages all have and original There are the identical source of IPv4 message, purpose IP address and QoS marker.
Since the tunnel IPv6 needs to add IPv6 heading on the outside of IPv4 message, causes tunnel packet size to increase, have It may lead to message fragment beyond the MTU value of transmission path.The fragment of tunnel packet uses IPv6 fragment mechanism, i.e. network at present Equipment integrally regards IPv4 message as payload, is split using IPv6 message fragment mechanism to it, it is complete to will lead to fragment in this way At later, only first message encapsulates IPv4 heading, does not have IPv4 heading in other tunnel packets, equipment is using letter Single offset pointer mode can not navigate to the IPv4 heading in all messages.
In an embodiment of the present invention, for IPv4 message after entering the network equipment, message length will be with device forwards The PMTU value of the IPv6 of port detection is compared, if message length is greater than the PMTU value of IPv6, needs to divide message Piece.Its fragment length should be less than the PMTU value of IPv6, rather than forward the link MTU value of port.Existing IPv6 fragment mechanism Using IPv4 message as a payload, it is not intended that the format of IPv4 heading, so only first message after having divided piece Carry IPv4 heading.And the embodiment of the invention is solved using second caused by IPv6 wafer separator system and subsequent point Piece message does not have the problem of IPv4 heading information.
Fig. 4 is that the flow diagram for carrying out the embodiment of the method for policy control is encapsulated based on IPv6 message.Including following step It is rapid:
In step 410, at least one IPv6 message is received, obtains IPv6 extension header mark from IPv6 heading.
In step 420, IPv4 extension header is judged whether there is, if so, 430 are thened follow the steps, if it is not, executing step Rapid 440.
In step 430, the prolate-headed position IPv4 is known according to IPv6 extension header mark, and read IPv4 extension header.
In step 440, it is forwarded by IPv6 message forward rule.
In step 450, IPv4 heading is read from IPv4 extension header.
In step 460, the field contents in IPv4 heading are taken out, are matched with the strategy in Policy Table.If Matching, thens follow the steps 470, if it does not match, executing step 440.
In step 470, it is forwarded according to the strategy.
In this embodiment, the equipment (such as BRAS) for carrying out policy control needs support IPv6 agreement, in IPv6 agreement solution IPv4 extension header attribute is supported when analysis.At this point, the equipment for carrying out policy control can extract the IPv4 message content in extension header, According to relevant field therein, such as QoS, IPv4 destination address, the forwarding behavior (such as buffer, abandon) of message is controlled.Its In, QoS marker carries differentiated services code points (DSCP) field in IPv4, and content can be according to application definition.For example, root Speed limit, packet loss etc. are carried out according to dscp field.Alternatively, speed limit, raising speed are carried out according to the address destination IP v4, bandwidth safeguard is provided etc.. It will be understood by those of skill in the art that be served only for illustrating herein, should not be construed as limiting the invention.
The equipment for carrying out policy control is controlled according to the information of each fragment, when the multiple IPv6 messages of reception When, judged whether to lose fragment according to the fragment flag bit of IPv4 message, if it is, triggering IPv4 message is retransmitted.
In an embodiment of the present invention, it is handled first, in accordance with normal IPv6 message process, when discovery IPv6 message When carrying IPv4 extension header, the IPv4 heading information in extension header will be parsed, and this tunnel IPv6 is arranged according to its information The forwarding strategy of message realizes the policy control to all messages.
Fig. 5 is that the present invention carries out the encapsulation of IPv6 message and carries out the flow diagram of the embodiment of the method for policy control.Packet Include following steps:
In step 501, receives IPv4 message and take out IPv4 heading.
In step 502, IPv4 heading is cached, and judges the relationship of message length and the PMTU value of IPv6, determines fragment Number n.
In step 503, n parts of IPv4 headings, and the fragment flag bit being arranged in IPv4 message are generated by fragment number n.
In step 504, the IPv4 heading of generation is encapsulated into tunnel packet, and IPv6 extension header is set.
In step 505, IPv6 extension header is set and is identified, indicates the prolate-headed position IPv4.
In step 506, the IPv4 heading of taking-up is encapsulated into IPv4 extension header.
In step 507, IPv4 message content is connected, IPv6 message is encapsulated as.
In step 608, associated check value is recalculated.
In step 509, fragment message is forwarded.
Wherein, on the network equipment among tunnel, relevant IPv4 message forwarding strategy is needed to be implemented.
In step 510, IPv6 tunnel packet is obtained, handles IPv6 heading.
In step 511, IPv6 extension header mark is obtained from IPv6 heading.
In step 512, IPv4 extension header is read.
In step 513, Policy Table is read.
In step 514, the relevant field in IPv4 extension header is taken out, is judged whether and the policy condition phase in Policy Table Matching.If matching, thens follow the steps 516, if mismatching, 515 are thened follow the steps.
It is normal to forward in step 515.
In step 516, strategically forward.
Strategically forwarding mentioned here refers to the relevant field according to IPv4 message, such as QoS, IPv4 destination address Deng controlling the forwarding behavior (such as buffer, abandon) of message.Wherein, QoS marker carries the differentiated services code points in IPv4 (DSCP) field, content can be according to application definitions.For example, carrying out speed limit, packet loss etc. according to dscp field.Alternatively, according to The address destination IP v4 carries out speed limit, raising speed, offer bandwidth safeguard etc..It will be understood by those of skill in the art that be served only for herein Citing, should not be construed as limiting the invention.
In an embodiment of the present invention, policy control is carried out on the basis of IPv4 message fragment encapsulates, in conjunction with the tunnel IPv6 IPv4 extension header in head reads the field contents in IPv4 heading, and executes corresponding scheduling strategy according to field meanings, Realize the policy control to all messages.
Fig. 6 is that the structural diagrams of one embodiment of IPv6 tunnel packet package system of the present invention are intended to.Including heading Extraction module 610 and package module 620, in which:
Heading extraction module 610, for receiving IPv4 message and taking out IPv4 heading.
Package module 620 is arranged IPv6 extension header in the IPv6 heading and identifies for IPv6 heading to be arranged, It indicates the prolate-headed position IPv4, and the IPv4 heading of taking-up is encapsulated into IPv4 extension header;Connect the IPv4 message Content is encapsulated as IPv6 message.
Fig. 2 show the structural schematic diagram that the present invention carries IPv4 heading in IPv6 extension header.
As shown, indicating that next leader label are IPv4 in the IPv6 heading, that is, instruction IPv4 is prolate-headed Position, it is TCP/UDP that IPv4 heading, IPv4 heading length and next leader label are carried in IPv4 extension header, In, next leader label are that TCP/UDP refers to that be transmitted is TCP/UDP message.It will be understood by those of skill in the art that this Locating next leader label is that TCP/UDP is only intended to illustrate, and be should not be construed as limiting the invention, for example, next leader Label are ICMP or other headings, and only the value of this field is different, do not influence treatment process.
Wherein, package module 620 is IPv6 tunnel gateway, and specific physical equipment can be home gateway, broad band remote connects Enter server (BRAS), carrier class networks address conversion (CGN), address rotation translation router (AFTR) etc., specifically sees tunnel The deployed position of entrance and exit.
In an embodiment of the present invention, IPv4 message is received by heading extraction module 610 and takes out IPv4 heading; IPv6 heading is arranged in package module 620, and IPv6 extension header is arranged in the IPv6 heading and identifies, indicates IPv4 extension header Position, and the IPv4 heading of taking-up is encapsulated into IPv4 extension header;The IPv4 message content is connected, IPv6 is encapsulated as Message.Therefore, IPv4 heading can be positioned, the content in IPv4 heading is read.
Another embodiment of the invention, after receiving IPv4 message and taking out IPv4 heading, which further includes Fragment module 630, for judging whether IPv4 message length is greater than the PMTU value of IPv6, if it is not greater, without message point Piece;If it is greater, then IPv4 message is divided into n piece according to the PMTU value of message length and IPv6, the fragment of IPv4 message is set Flag bit identifies the relationship between each fragment message;
For example, the fragment module is used to the length of IPv4 message being divided into each point equal with the PMTU value of IPv6 Piece message, until the length of IPv4 message is less than or equal to the PMTU value of IPv6.
Wherein, n IPv4 heading of generation is encapsulated into the IPv4 of n IPv6 message by the package module 620 respectively In extension header, and the IPv4 message content of fragment in each IPv6 message is connected, is encapsulated as the IPv6 message of n fragment.
In this embodiment, IPv4 message fragment number n, the fragment are determined according to the PMTU value of message length and IPv6 Message length afterwards is less than the PMTU value of IPv6, and IPv4 heading is generated n parts, and all fragment IPv4 messages all have and original There are the identical source of IPv4 message, purpose IP address and QoS marker.
Since the tunnel IPv6 needs to add IPv6 heading on the outside of IPv4 message, causes tunnel packet size to increase, have It may lead to message fragment beyond the MTU value of transmission path.The fragment of tunnel packet uses IPv6 fragment mechanism, i.e. network at present Equipment integrally regards IPv4 message as payload, is split using IPv6 message fragment mechanism to it, it is complete to will lead to fragment in this way At later, only first message encapsulates IPv4 heading, does not have IPv4 heading in other tunnel packets, equipment is using letter Single offset pointer mode can not navigate to the IPv4 heading in all messages.
In an embodiment of the present invention, for IPv4 message after entering the network equipment, message length will be with device forwards The PMTU value of the IPv6 of port detection is compared, if message length is greater than the PMTU value of IPv6, needs to divide message Piece.Its fragment length should be less than the PMTU value of IPv6, rather than forward the link MTU value of port.Existing IPv6 fragment mechanism Using IPv4 message as a payload, it is not intended that the format of IPv4 heading, so only first message after having divided piece Carry IPv4 heading.And the present invention is solved and is not had using second caused by IPv6 wafer separator system and successive fragment message The problem of IPv4 heading information.
Another embodiment of the invention, which further includes strategic control module 640, for receiving at least one IPv6 Message obtains IPv6 extension header mark from IPv6 heading;The prolate-headed position IPv4 is known according to IPv6 extension header mark, and Read IPv4 extension header;IPv4 heading is read from IPv4 extension header;Field contents in IPv4 heading are taken out, with strategy Strategy in table is matched, if it does, then be forwarded according to the strategy, it is otherwise, normal to forward.
In this embodiment, strategic control module 640 needs support IPv6 agreement, to support in IPv6 protocol analysis IPv4 extension header attribute.At this point, the equipment for carrying out policy control can extract the IPv4 message content in extension header, according to therein Relevant field, such as QoS, IPv4 destination address control the forwarding behavior (such as buffer, abandon) of message.Wherein, QoS marker Differentiated services code points (DSCP) field in IPv4 is carried, content can be according to application definition.For example, according to dscp field Carry out speed limit, packet loss etc..Alternatively, speed limit, raising speed are carried out according to the address destination IP v4, bandwidth safeguard is provided etc..The skill of this field Art personnel should be appreciated that be served only for illustrating herein, should not be construed as limiting the invention.
Strategic control module 640 is controlled according to the information of each fragment, when receiving multiple IPv6 messages, root Judge whether to lose fragment according to the fragment flag bit of IPv4 message, if it is, triggering IPv4 message is retransmitted.
Wherein, strategic control module 640 can be router, bandwidth remote access server (BRAS) etc..
In an embodiment of the present invention, it by combining the IPv4 extension header in the tunnel IPv6 head, reads in IPv4 heading Field contents, and execute corresponding scheduling strategy according to field meanings, realize the policy control to all messages.
So far, the present invention is described in detail.In order to avoid covering design of the invention, it is public that this field institute is not described The some details known.Those skilled in the art as described above, completely it can be appreciated how implementing technology disclosed herein Scheme.
Method and device of the invention may be achieved in many ways.For example, can by software, hardware, firmware or Person's software, hardware, firmware any combination realize method and device of the invention.The step of for the method it is above-mentioned Sequence is merely to be illustrated, and the step of method of the invention is not limited to sequence described in detail above, unless with other sides Formula illustrates.In addition, in some embodiments, the present invention can be also embodied as recording program in the recording medium, these Program includes for realizing machine readable instructions according to the method for the present invention.Thus, the present invention also covers storage for executing The recording medium of program according to the method for the present invention.
Although some specific embodiments of the invention are described in detail by example, the skill of this field Art personnel it should be understood that above example merely to being illustrated, the range being not intended to be limiting of the invention.The skill of this field Art personnel are it should be understood that can without departing from the scope and spirit of the present invention modify to above embodiments.This hair Bright range is defined by the following claims.

Claims (8)

1. a kind of IPv6 tunnel packet packaging method, comprising:
It receives IPv4 message and takes out IPv4 heading;
IPv6 heading is set, IPv6 extension header is set in the IPv6 heading and is identified, indicates the prolate-headed position IPv4, And the IPv4 heading of taking-up is encapsulated into IPv4 extension header;
The IPv4 message content is connected, IPv6 message is encapsulated as;
At least one IPv6 message is received, obtains IPv6 extension header mark from IPv6 heading;
The prolate-headed position IPv4 is known according to IPv6 extension header mark, and reads IPv4 extension header;
IPv4 heading is read from IPv4 extension header;
Field contents in IPv4 heading are taken out, are matched with the strategy in Policy Table, if it does, then according to described Strategy is forwarded, otherwise, normal to forward.
2. IPv6 tunnel packet packaging method according to claim 1, comprising:
It receives IPv4 message and takes out IPv4 heading;
Judge whether IPv4 message length is greater than the PMTU value of IPv6, if it is not greater, without message fragment, by taking-up IPv4 heading is encapsulated into IPv4 extension header, and connects the IPv4 message content, is encapsulated as IPv6 message;
If it is greater, then IPv4 message is divided into n piece according to the PMTU value of message length and IPv6, the fragment of IPv4 message is set Flag bit identifies the relationship between each fragment message, and n IPv4 heading of generation is encapsulated into n IPv6 report respectively In the IPv4 extension header of text, and the IPv4 message content of fragment in each IPv6 message is connected, is encapsulated as the IPv6 report of n fragment Text.
3. IPv6 tunnel packet packaging method according to claim 2, comprising:
The length of IPv4 message is divided into each fragment message equal with the PMTU value of IPv6, until the length of IPv4 message PMTU value less than or equal to IPv6.
4. IPv6 tunnel packet packaging method according to claim 1, comprising:
When receiving multiple IPv6 messages, judged whether to lose fragment according to the fragment flag bit of IPv4 message, if it is, touching Hair IPv4 message is retransmitted.
5. a kind of IPv6 tunnel packet package system, comprising:
Heading extraction module, for receiving IPv4 message and taking out IPv4 heading;
Package module is arranged IPv6 extension header in the IPv6 heading and identifies, indicate IPv4 for IPv6 heading to be arranged Prolate-headed position, and the IPv4 heading of taking-up is encapsulated into IPv4 extension header;The IPv4 message content is connected, is encapsulated For IPv6 message;
Strategic control module obtains IPv6 extension header mark from IPv6 heading for receiving at least one IPv6 message;According to IPv6 extension header mark knows the prolate-headed position IPv4, and reads IPv4 extension header;IPv4 message is read from IPv4 extension header Head;Field contents in IPv4 heading are taken out, are matched with the strategy in Policy Table, if it does, then according to described Strategy is forwarded, otherwise, normal to forward.
6. IPv6 tunnel packet package system according to claim 5, further includes:
Fragment module, for judging whether IPv4 message length is greater than the PMTU value of IPv6, if it is not greater, without message point Piece;If it is greater, then IPv4 message is divided into n piece according to the PMTU value of message length and IPv6, the fragment of IPv4 message is set Flag bit identifies the relationship between each fragment message;
Wherein, n IPv4 heading of generation is encapsulated into the IPv4 extension header of n IPv6 message by the package module respectively In, and the IPv4 message content of fragment in each IPv6 message is connected, it is encapsulated as the IPv6 message of n fragment.
7. IPv6 tunnel packet package system according to claim 6, comprising:
The length of IPv4 message for being divided into each fragment message equal with the PMTU value of IPv6 by the fragment module, directly It is less than or equal to the PMTU value of IPv6 to the length of IPv4 message.
8. IPv6 tunnel packet package system according to claim 6, comprising:
The strategic control module is used for when receiving multiple IPv6 messages, is judged whether according to the fragment flag bit of IPv4 message Fragment is lost, if it is, triggering IPv4 message is retransmitted.
CN201410779694.3A 2014-12-16 2014-12-16 A kind of IPv6 tunnel packet packaging method and system Active CN105763659B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410779694.3A CN105763659B (en) 2014-12-16 2014-12-16 A kind of IPv6 tunnel packet packaging method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410779694.3A CN105763659B (en) 2014-12-16 2014-12-16 A kind of IPv6 tunnel packet packaging method and system

Publications (2)

Publication Number Publication Date
CN105763659A CN105763659A (en) 2016-07-13
CN105763659B true CN105763659B (en) 2019-02-05

Family

ID=56336953

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410779694.3A Active CN105763659B (en) 2014-12-16 2014-12-16 A kind of IPv6 tunnel packet packaging method and system

Country Status (1)

Country Link
CN (1) CN105763659B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108270673B (en) * 2016-12-30 2019-08-13 中兴通讯股份有限公司 File transmitting method, device and system
CN114629843A (en) * 2020-12-11 2022-06-14 华为技术有限公司 Message processing method and device
CN113726635B (en) * 2021-08-30 2023-05-26 新华三大数据技术有限公司 Message processing method and device and electronic equipment
CN115022423A (en) * 2022-06-22 2022-09-06 上海弘积信息科技有限公司 IPv4 identifier distribution method in load balancing equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1716954A (en) * 2005-05-27 2006-01-04 清华大学 Method for intercommunication between IP V6 network and IPV4 network based on transit mechanism
CN101136841A (en) * 2006-08-28 2008-03-05 中兴通讯股份有限公司 Field programmable gate array based tunnel implementing device and method
US7424019B1 (en) * 2001-11-27 2008-09-09 Marvell Israel (M.I.S.L) Ltd. Packet header altering device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7424019B1 (en) * 2001-11-27 2008-09-09 Marvell Israel (M.I.S.L) Ltd. Packet header altering device
CN1716954A (en) * 2005-05-27 2006-01-04 清华大学 Method for intercommunication between IP V6 network and IPV4 network based on transit mechanism
CN101136841A (en) * 2006-08-28 2008-03-05 中兴通讯股份有限公司 Field programmable gate array based tunnel implementing device and method

Also Published As

Publication number Publication date
CN105763659A (en) 2016-07-13

Similar Documents

Publication Publication Date Title
US10374947B2 (en) Method and apparatus for encapsulating / decapsulating data packets at a radio access node
EP3958521A1 (en) Method and apparatus for providing service for service flow
US10243847B2 (en) Forwarding packets with encapsulated service chain headers
CN108702331B (en) Integration of SR application segments with Service Function Chaining (SFC) header metadata
US10205656B2 (en) Method and apparatus for updating manner of processing packet of service flow
US10601610B2 (en) Tunnel-level fragmentation and reassembly based on tunnel context
US20080304476A1 (en) Ethernet over mpls circuit emulation service
CN105763659B (en) A kind of IPv6 tunnel packet packaging method and system
US9445384B2 (en) Mobile device to generate multiple maximum transfer units and data transfer method
US8705545B2 (en) N-way routing packets across an intermediate network
WO2013113171A1 (en) Flow identification method, device, and system
CN112787902B (en) Message encapsulation method and device and message decapsulation method and device
US9762486B2 (en) Method and system for using extension headers to support protocol stack migration
US20240073128A1 (en) Message encapsulation and de-encapsulation method and device, storage medium, and electronic device
US20210281665A1 (en) Transmission Control Protocol (TCP) Acknowledgement (ACK) Packet Suppression
JP6222505B2 (en) Method and apparatus for generating input parameters
EP2600569B1 (en) Method, apparatus and system for processing a tunnel packet
CN113055268A (en) Method, device, equipment and medium for tunnel traffic load balancing
US20230412501A1 (en) Data processing method and apparatus, and chip
WO2023040782A1 (en) Message processing method and system, and device and storage medium
CN110505137B (en) Function expansion type wired network device
CN106850386A (en) Message processing method and equipment
CN117478458A (en) Message processing method, device and network equipment
Zhou et al. A Customized IPv6 Header for Packet Transmission over a LAN
Huaqing et al. A Customized IPv6 Header for Packet Transmission over a LAN

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant