Message forwarding method and system, network device, storage medium and program product

By generating IPv4 packets carrying IPv6 addresses at the edge nodes of the IPv6 network, the problem of intermediate nodes in IPv6 private networks being unable to announce forwarding status to the IPv4 network is solved. This enables the IPv4 network to be aware of the forwarding status of the IPv6 network, improving the success rate of path tracing and the flexibility of network communication.

CN117440057BActive Publication Date: 2026-01-02HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210818034.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-12
Publication Date
2026-01-02
Estimated Expiration
2042-07-12

AI Technical Summary

Technical Problem

In a private IPv6 network, intermediate nodes lacking IPv4 addresses are unable to advertise packet forwarding status to the IPv4 network, resulting in the IPv4 network being unaware of forwarding errors in the IPv6 network.

Method used

By generating IPv4 packets at the edge nodes of the IPv6 network, carrying the IPv6 address of the intermediate IPv6 node, the forwarding status is advertised to the IPv4 network. ICMP packets are used for flexible extension to carry the IPv6 private network identifier and address.

Benefits of technology

It successfully enabled intermediate nodes in IPv6 networks to announce forwarding status to the IPv4 network when IPv4 addresses are unavailable, improving the success rate of path tracing and the flexibility of network communication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117440057B_ABST
    Figure CN117440057B_ABST
Patent Text Reader

Abstract

Disclosed are a message forwarding method and system, network device, storage medium and program product, and belong to the field of communication technology. In the method, when an edge node, a first forwarding node, of an IPv6 network receives a first control message from a second forwarding node in the same IPv6 network, a second control message is generated based on the first control message, and the second control message is an IPv4 message, so as to send the second control message to a third forwarding node in an IPv4 network. When the second forwarding node does not have an IPv4 address, the second control message is extended to carry an IPv6 address of the second forwarding node in the second control message. Therefore, by the method provided in the application, the intermediate node in the IPv6 network can successfully realize the message forwarding condition to the forwarding node in the IPv4 network when the intermediate node does not have an IPv4 address.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of communication, and in particular, to a message forwarding method and system, network device, storage medium and program product. BACKGROUND

[0002] With the development of network technology, Internet Protocol version 6 (IPv6) networks gradually replace IPv4 networks. The IPv6 network includes an IPv6-only network, in which intermediate nodes except edge nodes are only configured with IPv6 addresses and are not configured with IPv4 addresses. In this scenario, if an intermediate node in the IPv6-only network receives a message sent by a forwarding node in an IPv4 network and determines that it cannot continue to forward the message, the intermediate node in the IPv6-only network needs to notify the forwarding node in the IPv4 network of the forwarding status of the message. SUMMARY

[0003] Embodiments of the present application provide a message forwarding method, system, network device, storage medium and program product, which can realize the notification of the message forwarding status of an intermediate node in an IPv6-only network to a forwarding node in an IPv4 network. The technical solution is as follows:

[0004] In a first aspect, a message forwarding method is provided, which is applied to a message forwarding system including a first forwarding node, a second forwarding node and a third forwarding node. The first forwarding node is an edge node of an IPv6 network, the second forwarding node is located in the IPv6 network, and the third forwarding node is located in an IPv4 network.

[0005] In the method, the first forwarding node receives a first message sent by the third forwarding node, and the first message is an IPv4 message. The first forwarding node generates a second message based on the first message and sends the second message to the second forwarding node, and the second message is an IPv6 message. The first forwarding node receives a first control message sent by the second forwarding node, and the first control message is an IPv6 message. The first control message is used to notify the forwarding status of the second forwarding node for the second message. When the first forwarding node determines that the second forwarding node does not have an IPv4 address, the first forwarding node generates a second control message based on the first control message and sends the second control message to the third forwarding node. The second control message is an IPv4 message, and the second control message carries an IPv6 address of the second forwarding node.

[0006] In the embodiment of the present application, when the first forwarding node of the edge node of the IPv6 network receives the first control message from the second forwarding node in the same IPv6 network, since the first control message is used to announce the forwarding of the second packet by the second forwarding node, and the second packet is generated based on the first packet from the IPv4 network, the first forwarding node needs to announce the forwarding of the first packet to the sender (the third forwarding node in the IPv4 network) when receiving the first control message. Based on this, when receiving the first control message, the first forwarding node generates a second control message based on the first control message, and the second control message is an IPv4 packet, so as to send the second control message to the third forwarding node in the IPv4 network. And when the second forwarding node does not have an IPv4 address, in order to successfully announce the forwarding of the packet by the second forwarding node in the IPv6 network to the third forwarding node in the IPv4 network, the embodiment of the present application extends the second control message, so as to carry the IPv6 address of the second forwarding node in the second control message. Therefore, through the method provided by the embodiment of the present application, the intermediate node in the IPv6 network can successfully announce the forwarding of the packet to the forwarding node in the IPv4 network when the intermediate node does not have an IPv4 address.

[0007] Based on the method provided in the first aspect, in a possible implementation, the first control message carries an IPv6 private network identifier, and the IPv6 private network identifier indicates that the intermediate node in the IPv6 network does not have an IPv4 address. In this scenario, the implementation process of the first forwarding node determining that the second forwarding node does not have an IPv4 address is as follows: the first forwarding node parses the first control message to obtain the IPv6 private network identifier; and the first forwarding node determines that the second forwarding node does not have an IPv4 address based on the IPv6 private network identifier.

[0008] If the IPv6 network where the second forwarding node is located is an IPv6 private network, the second forwarding node does not have an IPv4 address. In this scenario, in order to trigger the first forwarding node to announce the forwarding of the second packet by the second forwarding node to the third forwarding node by using the method provided in the embodiment of the present application, the second forwarding node can carry the IPv6 private network identifier of the IPv6 network in the first control message, so as to enable the first forwarding node to determine that the second forwarding node does not have an IPv4 address based on the IPv6 private network identifier, and then announce the forwarding of the second packet by the second forwarding node to the third forwarding node by using the method provided in the embodiment of the present application.

[0009] In a possible implementation manner of the method provided in the first aspect, the first control message is an Internet Control Message Protocol (ICMP) packet. The first control message comprises a first extension object, and the first extension object carries the IPv6 private network identifier. Alternatively, the first control message comprises a first ICMP packet header, and the first ICMP packet header carries the IPv6 private network identifier.

[0010] In the embodiment of the present application, when the first control message is an ICMP packet, the ICMP packet can be flexibly extended, so that the extended ICMP packet can carry the IPv6 private network identifier. The flexibility of the embodiment of the present application is improved.

[0011] In a possible implementation manner of the method provided in the first aspect, the implementation process in which the first forwarding node determines that the second forwarding node does not have an IPv4 address comprises the following steps: the first forwarding node acquires a locally stored IPv6 private network identifier, the IPv6 private network identifier indicating that an intermediate node in the IPv6 network is not configured with an IPv4 address; and the first forwarding node determines that the second forwarding node does not have an IPv4 address based on the IPv6 private network identifier.

[0012] In the embodiment of the present application, the IPv6 private network identifier corresponding to the IPv6 network in which the second forwarding node is located can also be preconfigured on the first forwarding node. Thus, the first forwarding node can directly acquire the IPv6 private network identifier from the local storage, so as to determine that the second forwarding node does not have an IPv4 address based on the IPv6 private network identifier, and then use the method provided in the embodiment of the present application to notify the third forwarding node of the forwarding of the second packet by the second forwarding node. The flexibility of the embodiment of the present application is improved.

[0013] In a possible implementation manner of the method provided in the first aspect, the first control message carries the IPv6 address of the second forwarding node. In this scenario, the implementation process in which the first forwarding node generates the second control message based on the first control message comprises the following step: the first forwarding node acquires the IPv6 address of the second forwarding node from the first control message, to generate the second control message.

[0014] Since the second control message needs to carry the IPv6 address of the second forwarding node, the first forwarding node needs to acquire the IPv6 address of the second forwarding node before generating the second control message. In the embodiment of the present application, the first forwarding node can acquire the IPv6 address of the second forwarding node from the first control message, or acquire the IPv6 address of the second forwarding node from the local storage, so as to improve the flexibility of the embodiment of the present application.

[0015] In a possible implementation manner of the method provided in the first aspect, the first control message is an Internet Control Message Protocol (ICMP) packet, and the first control message comprises a second extension object, and the second extension object carries an IPv6 address of the second forwarding node. In this case, the first forwarding node obtains the IPv6 address of the second forwarding node from the first control message in the following manner: the first forwarding node obtains the IPv6 address of the second forwarding node from the second extension object.

[0016] In a possible implementation manner of the method provided in the first aspect, the first control message is an Internet Control Message Protocol (ICMP) packet, and the first control message comprises a second ICMP packet header, and the second ICMP packet header carries an IPv6 address of the second forwarding node. In this case, the first forwarding node obtains the IPv6 address of the second forwarding node from the first control message in the following manner: the first forwarding node obtains the IPv6 address of the second forwarding node from the second ICMP packet header.

[0017] In the embodiments of the present application, when the first control message is an ICMP packet, the ICMP packet can be flexibly extended in the above two implementation manners, so that the extended ICMP packet can carry the IPv6 address of the second forwarding node. The flexibility of the embodiments of the present application is improved.

[0018] In a possible implementation manner of the method provided in the first aspect, the first control message comprises a first IPv6 packet header, and the first IPv6 packet header carries an IPv6 address of the second forwarding node. In this case, the first forwarding node obtains the IPv6 address of the second forwarding node from the first control message in the following manner: the first forwarding node obtains the IPv6 address of the second forwarding node from the first IPv6 packet header.

[0019] Optionally, the IPv6 address of the second forwarding node can be carried in the IPv6 packet header of the first control message, so that the first control message can carry the IPv6 address of the second forwarding node without being extended. The flexibility of the embodiments of the present application is improved.

[0020] In a possible implementation manner of the method provided in the first aspect, the first forwarding node locally stores an IPv6 address of the second forwarding node. In this case, the first forwarding node generates the second control message based on the first control message in the following manner: the first forwarding node obtains the locally stored IPv6 address of the second forwarding node, and generates the second control message based on the first control message and the IPv6 address of the second forwarding node.

[0021] In the embodiment of the present application, the first forwarding node can obtain the IPv6 address of the second forwarding node from the first control message, or obtain the IPv6 address of the second forwarding node from the local storage, thereby improving the flexibility of the embodiment of the present application.

[0022] In a possible implementation manner of the method provided in the first aspect, the second control message is an Internet Control Message Protocol (ICMP) message. The second control message includes a third extension object, and the third extension object carries the IPv6 address of the second forwarding node. Alternatively, the second control message includes a third ICMP message header, and the third ICMP message header carries the IPv6 address of the second forwarding node.

[0023] In the embodiment of the present application, the second control message can be flexibly extended, so that the second control message can carry the IPv6 address of the second forwarding node, thereby improving the application flexibility of the embodiment of the present application.

[0024] In a possible implementation manner of the method provided in the first aspect, the second control message further carries an IPv6 private network identifier, and the IPv6 private network identifier indicates that an intermediate node in the IPv6 network is not configured with an IPv4 address.

[0025] In the embodiment of the present application, the second control message can further carry the IPv6 private network identifier, so that the third forwarding node can learn that the second forwarding node is a node in the IPv6 private network, thereby further improving the flexibility of the embodiment of the present application.

[0026] In a possible implementation manner of the method provided in the first aspect, the second control message is an Internet Control Message Protocol (ICMP) message. The second control message includes a fourth extension object, and the fourth extension object carries the IPv6 private network identifier. Alternatively, the second control message includes a fourth ICMP message header, and the fourth ICMP message header carries the IPv6 private network identifier.

[0027] In the embodiment of the present application, the second control message can be flexibly extended, so that the second control message can carry the IPv6 private network identifier, thereby improving the application flexibility of the embodiment of the present application.

[0028] In a possible implementation manner of the method provided in the first aspect, the second forwarding node satisfies one of the following two conditions: an intermediate node in the IPv6 network where the second forwarding node is located is not configured with an IPv4 address; or the second forwarding node is configured with an IPv4 address, but the IPv4 address of the second forwarding node is not used externally.

[0029] In the embodiments of the present application, the second forwarding node without an IPv4 address can be a node in an IPv6 private network, or a node configured with an IPv4 address but without an exposed IPv4 address, further improving the application flexibility of the embodiments of the present application.

[0030] In a possible implementation manner of the method provided in the first aspect, the first message and the second message both carry a time to live TTL, and the first control message indicates that the TTL of the second message expires when the second message reaches the second forwarding node.

[0031] With the method provided in the embodiments of the present application, the first control message and the second control message can be used to successfully notify the node in the IPv4 network of the error in forwarding the message from the IPv6 network when the TTL of the message from the IPv4 network expires and the second forwarding node in the IPv6 network cannot continue to forward the message.

[0032] In a possible implementation manner of the method provided in the first aspect, the first message and the second message are path tracking messages.

[0033] With the method provided in the embodiments of the present application, in the path tracking scenario across the IPv6 network, when the TTL of the path tracking message from the IPv4 network expires, the second forwarding node in the IPv6 network can successfully notify the node in the IPv4 network of the IPv6 address of the second forwarding node, so that the third forwarding node in the IPv4 network tracks the IPv6 address of the second forwarding node, improving the success rate of path tracking.

[0034] In a second aspect, a message forwarding method is provided, and the method is applied to a message forwarding system, the message forwarding system including a first forwarding node, a second forwarding node, and a third forwarding node. The first forwarding node is an edge node of a sixth generation network protocol IPv6 network. The second forwarding node is located in the IPv6 network. The third forwarding node is located in a fourth generation network protocol IPv4 network.

[0035] It should be noted that the technical effects of the method provided in the second aspect can refer to the technical effects of the method provided in the first aspect, which will not be repeated here.

[0036] In the method, after the third forwarding node sends the first message to the first forwarding node, the third forwarding node receives the second control message sent by the first forwarding node. The second control message is an IPv4 message, and the second control message carries the IPv6 address of the second forwarding node. The first message is an IPv4 message. The third forwarding node determines the forwarding condition of the first message by the second forwarding node based on the second control message.

[0037] In a possible implementation manner of the method provided in the second aspect, after the third forwarding node determines the case in which the second forwarding node forwards the first message based on the second control message, the method further includes:

[0038] The third forwarding node parses the second control message to obtain the IPv6 address of the second forwarding node.

[0039] The third forwarding node displays the IPv6 address of the second forwarding node.

[0040] In a possible implementation manner of the method provided in the second aspect, the second control message is an Internet Control Message Protocol (ICMP) message.

[0041] The second network control message includes a third extension object, and the third extension object carries the IPv6 address of the second forwarding node, or the second control message includes a third ICMP message header, and the third ICMP message header carries the IPv6 address of the second forwarding node.

[0042] In a possible implementation manner of the method provided in the second aspect, after the third forwarding node determines the case in which the first forwarding node forwards the first message based on the second control message, the method further includes:

[0043] The third forwarding node determines an IPv6 private network identifier, and the IPv6 private network identifier indicates that intermediate nodes in the IPv6 network are not configured with IPv4 addresses.

[0044] The third forwarding node displays the IPv6 private network identifier.

[0045] In a possible implementation manner of the method provided in the second aspect, the third forwarding node determines the IPv6 private network identifier, and the method includes:

[0046] The third forwarding node parses the second control message to obtain the IPv6 private network identifier.

[0047] In a possible implementation manner of the method provided in the second aspect, the second control message is an Internet Control Message Protocol (ICMP) message.

[0048] The second network control message includes a fourth extension object, and the fourth extension object carries the IPv6 private network identifier, or the second control message includes a fourth ICMP message header, and the fourth ICMP message header carries the IPv6 private network identifier.

[0049] In a possible implementation manner of the method provided in the second aspect, the second control message indicates that a Time-To-Live (TTL) of the first message expires when the first message reaches the second forwarding node.

[0050] In a possible implementation manner of the method provided in the second aspect, the first message is a path tracking message.

[0051] In a third aspect, a message forwarding method is provided. The method is applied to a message forwarding system, and the message forwarding system includes a first forwarding node and a second forwarding node. The first forwarding node is an edge node of an IPv6 network, and the second forwarding node is located in the IPv6 network.

[0052] It should be noted that the technical effects of the method provided in the third aspect can also refer to the technical effects of the method provided in the first aspect, which will not be repeated here.

[0053] In the method, the second forwarding node receives a second message sent by the first forwarding node, and the second message is an IPv6 message.

[0054] When the second forwarding node determines that it cannot continue to forward the second message at present, and determines that the second message has an IPv4 message header, a first control message is generated based on the second message. The first control message indicates the forwarding condition of the second forwarding node for the second message, and the first control message indicates that the second forwarding node does not have an IPv4 address.

[0055] The second forwarding node sends the first control message to the first forwarding node.

[0056] In a possible implementation manner of the method provided in the third aspect, the first control message carries an IPv6 private network identifier, and the IPv6 private network identifier indicates that an intermediate node in the IPv6 network does not have an IPv4 address.

[0057] In a possible implementation manner of the method provided in the third aspect, the first control message is an Internet Control Message Protocol (ICMP) message.

[0058] The first network control message includes a first extension object, and the first extension object carries the IPv6 private network identifier. Alternatively, the first control message includes a first ICMP message header, and the first ICMP message header carries the IPv6 private network identifier.

[0059] In a possible implementation manner of the method provided in the third aspect, the first control message carries an IPv6 address of the second forwarding node.

[0060] In a possible implementation manner of the method provided in the third aspect, the first control message is an Internet Control Message Protocol (ICMP) message.

[0061] The first network control message comprises a second extension object carrying an IPv6 address of the second forwarding node, or the first control message comprises a second ICMP packet header carrying the IPv6 address of the second forwarding node.

[0062] In a possible implementation manner of the method provided in the third aspect, the first control message comprises a first IPv6 packet header carrying an IPv6 address of the second forwarding node.

[0063] In a possible implementation manner of the method provided in the third aspect, the second forwarding node determines that the second packet cannot be currently forwarded continuously, comprising:

[0064] When the time to live TTL of the second packet is 1, the second forwarding node determines that the second packet cannot be currently forwarded continuously.

[0065] In a possible implementation manner of the method provided in the third aspect, the second packet is a path tracking packet.

[0066] The fourth aspect provides a network device, comprising a memory and a processor; the memory is configured to store program instructions; the processor is configured to invoke the program stored in the memory, so that the network device executes the method according to the first aspect.

[0067] The fifth aspect provides a network device, comprising a memory and a processor; the memory is configured to store program instructions; the processor is configured to invoke the program stored in the memory, so that the network device executes the method according to the second aspect.

[0068] The sixth aspect provides a network device, comprising a memory and a processor; the memory is configured to store program instructions; the processor is configured to invoke the program stored in the memory, so that the network device executes the method according to the third aspect.

[0069] The seventh aspect provides a network device, comprising a transceiver module and a processing module:

[0070] The transceiver module is configured to perform the transceiver-related operations in the method according to the first aspect, and the processing module is configured to perform the operations in the method according to the first aspect, except the transceiver-related operations.

[0071] The eighth aspect provides a network device, comprising a transceiver module and a processing module:

[0072] The transceiving module is configured to perform the transceiving-related operations in the method of the second aspect, and the processing module is configured to perform operations other than the transceiving-related operations in the method of the second aspect.

[0073] In a ninth aspect, a network device is provided, which includes a transceiving module and a processing module:

[0074] The transceiving module is configured to perform the transceiving-related operations in the method of the third aspect, and the processing module is configured to perform operations other than the transceiving-related operations in the method of the third aspect.

[0075] In a tenth aspect, a computer-readable storage medium is provided, which stores instructions that, when executed on a processor, implement the method of the first aspect.

[0076] In an eleventh aspect, a computer-readable storage medium is provided, which stores instructions that, when executed on a processor, implement the method of the second aspect.

[0077] In a twelfth aspect, a computer-readable storage medium is provided, which stores instructions that, when executed on a processor, implement the method of the third aspect.

[0078] In a thirteenth aspect, a computer program product is provided, which contains instructions that, when executed on a processor, implement the method of the first aspect.

[0079] In a fourteenth aspect, a computer program product is provided, which contains instructions that, when executed on a processor, implement the method of the second aspect.

[0080] In a fifteenth aspect, a computer program product is provided, which contains instructions that, when executed on a processor, implement the method of the third aspect.

[0081] The technical effects obtained by the fourth aspect to the fifteenth aspect described above can refer to the technical effects obtained by the corresponding technical means in the first aspect to the third aspect, which will not be described here. BRIEF DESCRIPTION OF DRAWINGS

[0082] Figure 1 is a schematic diagram of IPv4 message traversing an IPv6 network provided by an embodiment of the present application;

[0083] Figure 2 is a schematic diagram of a path tracking process provided by an embodiment of the present application;

[0084] Figure 3is another path tracking process schematic diagram provided by the embodiment of the present application;

[0085] Figure 4 is a structure schematic diagram of a packet forwarding system provided by the embodiment of the present application;

[0086] Figure 5 is another structure schematic diagram of a packet forwarding system provided by the embodiment of the present application;

[0087] Figure 6 is a packet forwarding method flow chart provided by the embodiment of the present application;

[0088] Figure 7 is a format schematic diagram of an ICMP packet provided by the embodiment of the present application;

[0089] Figure 8 is a tracking result schematic diagram provided by the embodiment of the present application;

[0090] Figure 9 is another path tracking process schematic diagram provided by the embodiment of the present application;

[0091] Figure 10 is a structure schematic diagram of a network device provided by the embodiment of the present application;

[0092] Figure 11 is another structure schematic diagram of a network device provided by the embodiment of the present application;

[0093] Figure 12 is another structure schematic diagram of a network device provided by the embodiment of the present application;

[0094] Figure 13 is another structure schematic diagram of a packet forwarding system provided by the embodiment of the present application. DETAILED DESCRIPTION

[0095] In order to make the purpose, technical scheme and advantages of the embodiments of the present application more clear, the embodiments of the present application will be further described in detail below with reference to the drawings.

[0096] It should be understood that the "multiple" mentioned herein refers to two or more than two. In the description of the present application, unless otherwise specified, " / " represents the meaning of or, for example, A / B can represent A or B; "and / or" herein is only a description of the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, the same items or similar items with basically the same functions and roles are distinguished by using "first", "second" and the like. The skilled in the art can understand that "first", "second" and the like do not limit the quantity and execution order, and "first", "second" and the like do not necessarily mean different.

[0097] Before the embodiments of the present application are explained in detail, the application scenarios of the embodiments of the present application are introduced.

[0098] The traceroute technology is a technology for detecting each forwarding node passed by the message forwarding path. In the traceroute technology, the path detection node can send multiple traceroute messages with the same destination address but different time to live (TTL), such as 10 different traceroute messages with TTL from 1 to 10. When any forwarding node in the network receives a certain traceroute message, it continues to forward the traceroute message after reducing the TTL value in the traceroute message by 1. If the TTL of the received traceroute message is 1, the forwarding node returns an internet control message protocol (ICMP) error message to the path detection node, and the ICMP error message carries the IP address of the forwarding node. In this way, the path detection node can obtain the IP addresses of each forwarding node passed by the message forwarding path, thereby achieving the purpose of path tracing.

[0099] Currently, in the fourth generation network protocol (Internet Protocol version 4, IPv4) network, when the forwarding node determines that the TTL of the message is 1, it returns an internet control message protocol (ICMP) error message based on IPv4 to other forwarding nodes. The ICMP error message is an IPv4 message, and the ICMP error message carries the IPv4 address of the forwarding node, so that other nodes can learn that the message forwarding at the forwarding node has an error.

[0100] With the development of network technology, the Internet Protocol version 6 (IPv6) network is gradually replacing the IPv4 network. In this scenario, the IPv4 message is usually transmitted over the IPv6 network. The message can be referred to as IPv4 over IPv6 data.

[0101] Figure 1 is a schematic diagram of IPv4 message over IPv6 network provided by an embodiment of the present application. Figure 1 In the figure, CE is used to mark the customer edge device, PE is used to mark the provider edge device, and P is used to mark the operator intermediate device. As shown in Figure 1 , CE1 sends an IPv4 message to CE2. An IPv6 network is in the middle between CE1 and CE2. The message sent by CE1 enters the IPv6 network at the PE1 node, and PE1 encapsulates a layer of IPv6 message header (abbreviated as IPv6 header in the figure) outside the message. Figure 1 The intermediate P node of the IPv6 network forwards the IPv6 message, and finally reaches the exit node PE2 of the IPv6 network. PE2 will strip the IPv6 message header and send the IPv4 message to CE2.

[0102] In the scenario shown in Figure 1 , if path tracking is performed, the specific tracking process can be as shown in Figure 2 . Figure 2 is a schematic diagram of a path tracking process provided by an embodiment of the present application. As shown in Figure 2 , the path tracking process includes the following steps.

[0103] 1. CE1 initiates path tracking (Traceroute) to CE2, that is, multiple path tracking messages with different TTLs are sent respectively.

[0104] 2. When the TTL in the path tracking message is 1, the path tracking message reaches PE1. PE1 checks the TTL timeout, and directly replies to CE1 an ICMP error message of TTL timeout.

[0105] 3、When the TTL in the path tracking packet is 2, the path tracking packet reaches PE1, PE1 checks the value of TTL and judges that it can continue to forward. Then TTL is decreased by 1 (the TTL value in the IPv4 packet header is changed to 1), and the outer IPv6 packet header is encapsulated in the path tracking packet, and the encapsulated path tracking packet is continued to be forwarded. The TTL mode of the IPv6 network can be the uniform (Uniform) mode, at this time the TTL in the encapsulated IPv6 packet header (the TTL field in the actual IPv6 packet header is called Hoplimit, in order to follow the IPV4 uniform, the Hop limt of IPv6 is also uniformly called TTL) is set to be the same as the TTL of the inner IPv4 packet header, that is, the TTL in the IPv6 packet header is also 1. The path tracking packet reaches the P node, and the P node judges that TTL is timed out according to the outer IPv6 packet header, and needs to reply the ICMP error packet of TTL timeout to CE1.

[0106] 4、The processing flow when the TTL in the path tracking packet is 3 is similar to the processing flow when the TTL is 2, and will not be repeated here.

[0107] 5、When the TTL in the path tracking packet is 4, the path tracking packet reaches PE1, and PE1 judges that it needs to continue forwarding based on the value of the TTL. Then PE1 decreases the TTL by 1 (the TTL value in the IPv4 packet header becomes 3), encapsulates an IPv6 packet header outside the path tracking packet, the TTL in the IPv6 packet header is also 3, and continues to forward the encapsulated path tracking packet. The path tracking packet reaches P node, P node continues to forward the path tracking packet based on IPv6, decreases the TTL in the IPv6 packet header in the path tracking packet by 1 (the value is updated to 2), and forwards the updated path tracking packet to PE2. PE2 receives the path tracking packet and judges that it needs to continue forwarding, at this time, decreases the TTL of IPv6 by 1, and judges that it is the exit node of the IPv6 network, so it needs to strip the IPv6 packet header. Meanwhile, since the TTL mode of the IPv6 network where PE2 is located is configured as the uniform mode, PE2 writes the TTL value in the IPv6 packet header in the path tracking packet to the TTL in the IPv4 packet header, that is, PE2 strips the IPv6 packet header in the received path tracking packet, updates the TTL in the IPv4 packet header to 1, and sends the processed path tracking packet to CE2. CE2 receives the path tracking packet and judges that the TTL is 1, since the destination address of the path tracking packet is CE2, that is, the path tracking packet has reached the destination, at this time, CE2 processes the path tracking packet in other ways (the embodiment of the present application does not make a detailed description), and CE2 replies to CE1 with an ICMP error message of port unreachable. CE1 receives the message from CE2, since CE2 is the destination of the path tracking, so the path tracking process ends.

[0108] The detailed process of step 2 can be as shown in Figure 3 .

[0109] In Figure 3 , CE1 sends a path tracking packet with TTL of 2 to PE1, the path tracking packet includes an IPv4 packet header and a payload, the IPv4 packet header carries a source address (SA) 1.1.1.1 and a destination address (DA) 2.2.2.2, and the TTL in the IPv4 packet header is 2. PE1 receives the path tracking packet, decreases the TTL in the IPv4 packet header of the path tracking packet by 1, encapsulates an IPv6 packet header outside the path tracking packet Figure 3The TTL of the IPv6 packet header is also set to 1, and the processed path tracking packet is forwarded to the P node. When the P node receives the path tracking packet, it judges that the TTL in the IPv6 packet header is expired, and the P node judges that the received path tracking packet includes an IPv4 packet header, so the P node carries the IPv4 address 100.1.1.2 of the P node in the TTL expired ICMP error packet, and sends the ICMP error packet to the CE1 through the PE1. As shown in FIG. 8, the IPv4 address 100.1.1.2 of the P node is carried in the ICMP packet header (ICMP header for short) of the ICMP error packet. Figure 3 Figure 3

[0110] In the above scenario, if the IPv6 network is an IPv6-only network, when a forwarding node in the IPv6-only network receives a packet sent from a forwarding node in the IPv4 network and determines that the TTL of the packet is 1, the forwarding node in the IPv6-only network has two processing manners. One is that the forwarding node directly discards the packet and does not send an IPv4-based ICMP error packet to the forwarding node in the IPv4 network. The other is that the forwarding node sends an IPv6-based ICMP error packet to an edge node of the IPv6-only network, and the IPv6-based ICMP error packet carries an IPv6 address of the forwarding node. When the edge node receives the IPv6-based ICMP error packet, it needs to continue forwarding the error packet to the forwarding node in the IPv4 network. However, since the edge node receives the IPv6-based ICMP error packet, the network to be notified is the IPv4 network, so the edge node also discards the IPv6-based ICMP error packet. The two processing manners both cause the forwarding node in the IPv4 network to be unable to perceive that the packet forwarding in the IPv6-only network is erroneous.

[0111] Therefore, the embodiment of the present application provides a packet forwarding method. The method can realize that a forwarding node in an IPv6-only network notifies a node in an IPv4 network of packet forwarding. If the forwarding node in the IPv6 network is configured with an IPv4 address but does not want to expose the IPv4 address in the network, the method can also realize that the forwarding node notifies the node in the IPv4 network of packet forwarding.

[0112] The packet forwarding system, the packet forwarding method, and the related apparatus provided by the embodiment of the present application are explained in detail as follows.

[0113] ​​Figure 4 is a schematic diagram of an architecture of a packet forwarding system provided in an embodiment of the present application. As shown in Figure 4 the packet forwarding system includes a first forwarding node 401, a second forwarding node 402 and a third forwarding node 403. The first forwarding node 401 communicates with the second forwarding node 402, and the second forwarding node 402 communicates with the third forwarding node 403.

[0114] The first forwarding node 401 is an edge node of an IPv6 network, the second forwarding node 402 is located in the IPv6 network, and the third forwarding node 403 is located in an IPv4 network. The second forwarding node 402 being located in the IPv6 network can be understood as: the second forwarding node 402 is an intermediate node of the IPv6 network. That is, the forwarding nodes in the IPv6 network include edge nodes and intermediate nodes, the edge nodes are used to communicate with the forwarding nodes in other networks, and the intermediate nodes only communicate with the forwarding nodes in the same network. The third forwarding node 403 being located in the IPv4 network can also be understood as: the third forwarding node 403 is an intermediate node of the IPv4 network.

[0115] In the embodiment of the present application, the IPv6 network can be an IPv6 private network. The intermediate nodes in the IPv6 private network only have IPv6 addresses and do not have IPv4 addresses. The edge nodes in the IPv6 private network have both IPv4 addresses and IPv6 addresses.

[0116] The intermediate nodes not having IPv4 addresses can mean that, in IP address allocation, the intermediate nodes are not configured with IPv4 addresses, in which case the intermediate nodes naturally do not have IPv4 addresses. In other words, for the intermediate nodes in the IPv6 private network, the intermediate nodes are not configured with IPv4 addresses.

[0117] It should be noted that, in the embodiment of the present application, the forwarding nodes do not have IPv4 addresses, which can include another case in addition to the case of the intermediate nodes in the above-mentioned IPv6 private network. The case is that the forwarding nodes are configured with IPv4 addresses, but the IPv4 addresses are not used externally in some scenarios, that is, the IPv4 addresses are not exposed in the network.

[0118] It should be noted that, Figure 4 The nodes in the packet forwarding system shown in the figure are used for example illustration, and the packet forwarding system can also include other nodes, which will not be illustrated one by one here.

[0119] Figure 5 is another schematic diagram of an architecture of a packet forwarding system provided in an embodiment of the present application. As shown in Figure 5 the packet forwarding system includes five forwarding nodes,Figure 5 The first forwarding node 401 in the first forwarding node 401, the second forwarding node 402 can be

[0120] The first forwarding node 401 in the first forwarding node 401, the second forwarding node 402 can be

[0121] In this scenario, Figure 4 The first forwarding node 401 in the first forwarding node 401, the second forwarding node 402 can be Figure 5 The first forwarding node 401 in the first forwarding node 401, the second forwarding node 402 can be Figure 5 The first forwarding node 401 in the first forwarding node 401, the second forwarding node 402 can be Figure 5 The first forwarding node 401 in the first forwarding node 401, the second forwarding node 402 can be Figure 4 The first forwarding node 401 in the first forwarding node 401, the second forwarding node 402 can be Figure 5 The first forwarding node 401 in the first forwarding node 401, the second forwarding node 402 can be Figure 5 The first forwarding node 401 in the first forwarding node 401, the second forwarding node 402 can be Figure 5 The first forwarding node 401 in the first forwarding node 401, the second forwarding node 402 can be

[0122] It should be noted that the forwarding node involved in the embodiments of the present application can be a network element with network layer function, such as a router, a three-layer switch, etc. Hereinafter, no further example is given.

[0123] Figure 6 The first forwarding node 401 in the first forwarding node 401, the second forwarding node 402 can be Figure 6 As shown in FIG. 6, the message forwarding method comprises the following steps.

[0124] Step 601: The third forwarding node sends a first message to the first forwarding node, and the first message is an IPv4 message. Wherein, the third forwarding node is located in an IPv4 network, and the first forwarding node is an edge node of an IPv6 network.

[0125] The first message can be a service message in a service flow, or a path tracking message in a path tracking scenario.

[0126] The first message is an IPv4 message, which can be understood as: the first message comprises an IPv4 message header and a payload, the IPv4 message header carries a source address and a destination address corresponding to the payload, and the source address and the destination address are both IPv4 addresses. Based on this, the first message is a message that needs to be sent to an IPv4 network. Wherein, the source address corresponding to the payload can be understood as the address of the communication end generating the data corresponding to the payload. The destination address corresponding to the payload can be understood as the address of the destination communication end to which the payload needs to be sent.

[0127] In addition, the first forwarding node is an edge node of the IPv6 network, and the first message is a message that needs to be sent to the IPv4 network through the IPv6 network.

[0128] For example, for Figure 5 As shown in the message forwarding system, the third forwarding node is CE1, and the first forwarding node is PE1. The first message is a message sent by CE1 to CE2, and the source address corresponding to the payload in the first message is the IPv4 address of CE1, and the destination address corresponding to the payload is the IPv4 address corresponding to CE2. The message needs to be sent to CE2 through PE1, so when CE1 determines the first message, CE1 sends the first message to PE1.

[0129] In step 602, the first forwarding node receives the first message, generates a second message based on the first message, and sends the second message to the second forwarding node. The second message is an IPv6 message. The second forwarding node is located in the IPv6 network.

[0130] Since the first message is an IPv4 message, and the first forwarding node is an edge node of the IPv6 network, when the first forwarding node receives the first message, the first forwarding node needs to send the first message to the second forwarding node in the IPv6 network, so as to send the first message to the destination in the IPv4 network through the second forwarding node.

[0131] In some embodiments, the first message can only include an IPv4 message header and a payload, and the source address and the destination address carried by the IPv4 message header are the source address and the destination address corresponding to the payload, respectively. In this scenario, the implementation process of the first forwarding node for generating the second message based on the first message can be as follows: the first forwarding node encapsulates an IPv6 message header outside the first message to obtain the second message. The source address carried by the IPv6 message header is the IPv6 address of the first forwarding node, and the destination address carried by the IPv6 message header is the IPv6 address of another forwarding node in the IPv6 network. The first forwarding node looks up a forwarding table based on the destination address in the IPv6 message header to obtain an out-interface (i.e., a next-hop interface) for forwarding the second message. The next-hop interface is an interface of the first forwarding node that communicates with the second forwarding node, and then the first forwarding node sends the second message through the found next-hop interface, so as to send the second message to the second forwarding node.

[0132] For example, for Figure 5The message forwarding system is shown, the third forwarding node is CE1, and the first forwarding node is PE1. The first message is a message sent by CE1 to CE2. When PE1 receives the first message, the source address of the IPv6 message header in the second message generated based on the first message is the IPv6 address of PE1, and the destination address is the IPv6 address of PE2. The first forwarding node finds the next hop interface based on the IPv6 address of PE2 in the IPv6 message header, and the next hop interface is the interface of PE1 communicating with P. Then PE1 sends the second message through the found next hop interface, so as to send the second message to P and then to PE2 through P.

[0133] In some other embodiments, the first message can include an outer IPv4 message header, an inner IPv4 message header, and a payload. The source address and the destination address carried by the inner IPv4 message header are the source address and the destination address corresponding to the payload, respectively. The source address and the destination address carried by the outer IPv4 message header are the addresses of other nodes on the message forwarding path. Figure 5 In the scenario shown, if a VPN network is deployed between CE1 and PE1, the source address and the destination address carried by the outer IPv4 message header can be the source address and the destination address of the VPN tunnel in the VPN network. In this scenario, the implementation process of the first forwarding node for generating the second message based on the first message can be as follows: the first forwarding node removes the outer IPv4 message header of the first message, and then encapsulates an IPv6 message header outside the inner IPv4 message header and the payload to obtain the second message. The source address and the destination address carried by the IPv6 message header are explained in the previous paragraph, and are not repeated here.

[0134] Based on the above two embodiments, it can be understood that the second message includes the payload in the first message and the IPv4 message header carrying the source address and the destination address corresponding to the payload.

[0135] Step 603: The second forwarding node receives the second message, and in a case where it is determined that the second message cannot be forwarded at present and the second message has an IPv4 message header, generates a first control message based on the second message and sends the first control message to the first forwarding node. The first control message is an IPv6 message, and the first control message is used to announce the forwarding situation of the second message.

[0136] When the second forwarding node determines that the second message cannot be forwarded at present, in order to enable the sender of the second message (i.e., the first forwarding node) to learn the situation in a timely manner, the second forwarding node can generate a first control message for announcing the forwarding situation of the second message, and send the first control message to the sender of the second message.

[0137] In some embodiments, the second forwarding node determines that it is currently unable to continue forwarding the second packet based on the TTL of the second packet. For example, in a traceroute scenario, the first packet and the second packet are both traceroute packets. When the TTL of the second packet is 1, the second forwarding node determines that it is currently unable to continue forwarding the second packet.

[0138] Optionally, the second forwarding node can also determine that it is currently unable to continue forwarding the second packet in other scenarios. For example, the data size of the second packet exceeds the forwarding capability of the second forwarding node. In this case, the second forwarding node can also generate the first control message to notify the forwarding status of the second packet. The various scenarios in which the second forwarding node determines that it is currently unable to continue forwarding the second packet are not described one by one in the embodiments of the present application.

[0139] In addition, in some embodiments, the second forwarding node generates the first control message based on the second packet in the following manner: the second forwarding node takes all or part of the second packet as the payload of the first control message to be generated, and then generates the first control message based on the determined payload. In this way, when the first forwarding node receives the first control message, it can determine that the first control message is a control message for the second packet by analyzing the payload of the first control message, i.e., learn that the first control message is used to notify the forwarding status of the second packet.

[0140] Optionally, the second forwarding node can also generate the first control message based on the second packet in other manners, which are not described one by one in the embodiments of the present application.

[0141] In addition, in the embodiments of the present application, the second forwarding node can generate the first control message through the Internet Control Message Protocol (ICMP) to notify the packet forwarding status of the second forwarding node through the ICMP. In this case, the first control message is an ICMP packet, which can be an ICMP error packet, for example. The format of the ICMP packet is described in detail later, and is not expanded here.

[0142] Optionally, the second forwarding node can also generate the first control message through other protocols to notify the packet forwarding status of the second forwarding node. The various protocols are not described one by one in the embodiments of the present application.

[0143] The first control message is described in detail below.

[0144] (1) The first control message carries an IPv6 private network identifier.

[0145] Based on the above, the second forwarding node can generate the first control message in the following manner: the second forwarding node determines the forwarding status of the second packet, and then generates the first control message based on the determined forwarding status. Figure 4As shown in the network architecture, if the IPv6 network where the second forwarding node resides is a private IPv6 network, then the second forwarding node does not have an IPv4 address configured. In this scenario, in order to trigger the first forwarding node to notify the third forwarding node of the second forwarding node's forwarding of the second packet using the method provided in this embodiment, the second forwarding node can carry the private IPv6 network identifier in the first control message. This allows the first forwarding node to determine, based on the private IPv6 network identifier, that the second forwarding node does not have an IPv4 address, and then notify the third forwarding node of the second packet's forwarding using the method provided in this embodiment.

[0146] The IPv6 private network identifier is used to identify that the IPv6 network where the second forwarding node is located is an IPv6 private network. That is, the IPv6 private network identifier is used to indicate that the intermediate nodes in the IPv6 network where the second forwarding node is located are not configured with IPv4 addresses.

[0147] The following example, using an ICMP message as the first control message, illustrates how the first control message carries the IPv6 private network identifier.

[0148] To facilitate understanding, the basic format of ICMP messages will be explained first. Figure 7 This is a schematic diagram of an ICMP message format provided in an embodiment of this application. For example... Figure 7 As shown, this ICMP message typically includes an IP header ( Figure 7 The abbreviation for IP header is 6.5.5. Figure 7 The ICMP header (abbreviated as ICMP header) and ICMP data.

[0149] The IP header is either an IPv4 or IPv6 header, carrying the destination and source addresses to guide the forwarding of the ICMP message. The ICMP header includes a checksum of the entire ICMP data. Optionally, the ICMP header may also include checksums for the source address, destination address, and next header fields from the IP header. Additionally, the packet content field in the ICMP header typically includes the source and destination addresses. The source address in the ICMP header is the address of the node that generated the ICMP message, and the destination address is the address of the node to which the ICMP message needs to be advertised. The ICMP data carries the payload of the ICMP message.

[0150] Optionally, in request for comments (RFC) 4884, such as Figure 7As shown, an extension data structure can also be added at the end of the ICMP data. The extension data structure includes an extension header (abbreviated as extension header in the following) and a variable number of extension objects, to extend the functions of the ICMP message. Figure 7

[0151] Based on the basic format of the ICMP message, in some embodiments, the first control message is an ICMP message, and the first network control message includes a first extension object carrying the IPv6 private network identifier.

[0152] That is, when the first control message is a network control message protocol ICMP message, the IPv6 private network identifier can be carried by the first extension object added at the end of the payload of the ICMP message.

[0153] For example, Figure 7 An example format of an extension object provided by an embodiment of the application is also shown in the following. Figure 7 As shown, the extension object includes a length field, an object identifier field, an object type field, an ingress interface index field, and an ingress interface address field. At this time, the object identifier field in the first extension object can be used to carry the IPv6 private network identifier.

[0154] Alternatively, the IPv6 private network identifier can also be carried by other fields in the first extension object, which will not be exemplified one by one here. For related descriptions of the fields in the first extension object, refer to RFC4884.

[0155] In other embodiments, the first control message is a network control message protocol ICMP message, and the first network control message includes a first ICMP message header carrying the IPv6 private network identifier.

[0156] That is, when the first control message is a network control message protocol ICMP message, the IPv6 private network identifier can not be carried by the first extension object added at the end of the payload of the ICMP message, but the fields in the ICMP message header are extended to carry the IPv6 private network identifier.

[0157] For example, based on the format of the ICMP message header shown in the following, Figure 7 the type field or the code field in the first ICMP message header can be extended to enable the type field or the code field to carry the IPv6 private network identifier.

[0158] Alternatively, the IPv6 private network identifier can also be carried by other fields in the first ICMP message header, which will not be exemplified one by one here.​

[0159] (2) The first control message carries an IPv6 address of the second forwarding node.

[0160] In order to be able to inform the first forwarding node that the second forwarding node is unable to continue forwarding the second message, in the embodiments of the present application, the second forwarding node, when generating the first control message, can also carry an IPv6 address of the second forwarding node in the first control message.

[0161] In some embodiments, the first control message is an ICMP message, and the first network control message includes a second extension object carrying the IPv6 address of the second forwarding node.

[0162] That is, when the first control message is a network control message protocol ICMP message, the IPv6 address of the second forwarding node can be carried by a second extension object added at the end of the payload of the ICMP message.

[0163] For example, if the format of the second extension object is as shown in Figure 7 the IPv6 address of the second forwarding node can be carried by the ingress interface address field in the second extension object.

[0164] Alternatively, the IPv6 address of the second forwarding node can also be carried by other fields in the second extension object, which will not be exemplified one by one here.

[0165] The second extension object and the aforementioned first extension object can be the same extension object or different extension objects, and the embodiments of the present application do not limit this.

[0166] In other embodiments, the first control message is an ICMP message, and the first network control message includes a second ICMP message header carrying the IPv6 address of the second forwarding node.

[0167] That is, when the first control message is a network control message protocol ICMP message, the IPv6 address of the second forwarding node can not be carried by a second extension object added at the end of the payload of the ICMP message, but the fields in the ICMP message header can be extended to carry the IPv6 address of the second forwarding node.

[0168] For example, based on the format of the ICMP message header as shown in Figure 7 the packet content field in the first ICMP message header can be extended to enable the field to carry the IPv6 address of the second forwarding node.

[0169] Alternatively, the IPv6 address of the second forwarding node can also be carried by other fields in the second ICMP message header, which will not be exemplified one by one here.

[0170] In addition, as shown in the format of the ICMP message, when the first control message is an ICMP message, the first control message includes a first IPv6 message header, and the source address carried in the first IPv6 message header is the IPv6 address of the second forwarding node. Based on this, in some other embodiments, the ICMP message can not be extended, and in this case, when the second forwarding node determines that it cannot continue to forward the second message at present, the first control message can be generated by not extending the ICMP message. Figure 3 It should be noted that the various optional schemes of carrying the IPv6 private network identifier in the first control message can be used in combination with the various optional schemes of carrying the IPv6 address of the second forwarding node in the first control message. For example, the first control message includes the extension object shown in

[0171] The IPv6 private network identifier is carried in the object identifier field in the extension object, and the IPv6 address of the second forwarding node is carried in the ingress interface address field in the extension object. Other combination schemes will not be exemplified one by one here. Figure 7 In addition, the first control message can also not carry the IPv6 private network identifier, and only carry the IPv6 address of the second forwarding node by any of the above schemes. Here also will not be exemplified one by one.

[0172] Step 604: The first forwarding node receives the first control message, and when the first forwarding node determines that the second forwarding node does not have an IPv4 address, generates a second control message based on the first control message, and sends the second control message to the third forwarding node. The second control message is an IPv4 message, and the second control message carries the IPv6 address of the second forwarding node.

[0173] Since the first control message is used to announce the forwarding of the second message by the second forwarding node, and the second message is generated based on the first message, when the first forwarding node receives the first control message, it needs to announce the forwarding of the message to the third forwarding node that is the sender of the first message. Based on this, when the first forwarding node receives the first control message, it generates a second control message based on the first control message to send the second control message to the third forwarding node. And in order to be able to announce the forwarding of the message by the second forwarding node to the third forwarding node, the IPv6 address of the second forwarding node needs to be carried in the second control message.

[0174]

[0175] ​In addition, since the third forwarding node is a node in the IPv4 network, the second control message needs to be an IPv4 message, so as to send the second control message to the third forwarding node. Therefore, the embodiment of the present application provides a scheme, which can carry the IPv6 address of the second forwarding node in the second control message in the IPv4 message format, so as to realize the case of announcing the second forwarding node in the IPv6 network to the third forwarding node in the IPv4 network.

[0176] In addition, it should be noted that since some nodes in the IPv6 network can also be configured with an IPv4 address, in this case, the second control message does not need to be generated by the method provided in the embodiment of the present application. Therefore, after receiving the first control message, the first forwarding node first determines whether the second forwarding node has an IPv4 address. If the second forwarding node has an IPv4 address, the first forwarding node can directly announce the third forwarding node based on the IPv4 address. When the first forwarding node determines that the second forwarding node does not have an IPv4 address, the first forwarding node generates the second control message based on the first control message by the method provided in the embodiment of the present application, so as to carry the IPv6 address of the second forwarding node in the second control message in the IPv4 message format.

[0177] In some embodiments, in the case that the first control message carries the IPv6 private network identifier, since the IPv6 private network identifier indicates that the intermediate node in the IPv6 network where the second forwarding node is located does not have an IPv4 address, that is, the IPv6 network where the second forwarding node is located is an IPv6 private network, the first forwarding node can determine that the second forwarding node does not have an IPv4 address through the IPv6 private network identifier.

[0178] Based on this, the implementation process of the first forwarding node determining that the second forwarding node does not have an IPv4 address can be: the first forwarding node parses the first control message to obtain the IPv6 private network identifier; and the first forwarding node determines that the second forwarding node does not have an IPv4 address based on the IPv6 private network identifier.

[0179] The detailed implementation of the first forwarding node parsing the first control message to obtain the IPv6 private network identifier is related to how the first control message carries the IPv6 private network identifier. Hereinafter, two scenarios are taken as examples for illustration, and the parsing process in other scenarios can also refer to the following examples, which will not be illustrated one by one.

[0180] For example, in the case that the first control message is an ICMP message, and the first control message includes a first extension object, and the first extension object carries the IPv6 private network identifier, the first forwarding node can obtain the IPv6 private network identifier by parsing the first extension object.

[0181] For example, in the case that the first control message is an ICMP message and the first control message comprises a first ICMP message header, the first forwarding node can obtain the IPv6 private network identifier by analyzing the first ICMP message header.

[0182] In some other embodiments, the network administrator can pre-configure the IPv6 private network identifier corresponding to the IPv6 network where the second forwarding node is located on the first forwarding node. In this case, the implementation process of the first forwarding node determining that the second forwarding node does not have an IPv4 address can be: the first forwarding node obtains the locally stored IPv6 private network identifier, which indicates that the intermediate nodes in the IPv6 network where the second forwarding node is located do not have an IPv4 address, so the first forwarding node can determine that the second forwarding node does not have an IPv4 address based on the IPv6 private network identifier.

[0183] The implementation manner of the first forwarding node obtaining the locally stored IPv6 private network identifier can be: the first forwarding node determines the network prefix of the IPv6 network where the second forwarding node is located based on the first control message, and then obtains the IPv6 private network identifier corresponding to the network prefix from the local storage.

[0184] For example, the implementation process of the first forwarding node determining the network prefix of the IPv6 network where the second forwarding node is located based on the first control message can be: the first forwarding node analyzes the source address in the IPv6 message header of the first control message, which is the IPv6 address of the second forwarding node, and the first forwarding node can determine the network prefix of the IPv6 network based on the IPv6 address of the second forwarding node.

[0185] The network prefix is a network number that uniquely identifies a network, so when the network administrator configures the IPv6 private network identifier corresponding to the IPv6 network where the second forwarding node is located on the first forwarding node, the network administrator can establish the correspondence between the network prefix of the IPv6 network and the IPv6 private network identifier, so as to facilitate the first forwarding node to index the IPv6 private network identifier based on the network prefix later.

[0186] Optionally, in some scenarios, the second forwarding node is configured with an IPv4 address, but the second forwarding node does not want to expose the IPv4 address in the network for some reasons when generating the first control message, and the first control message does not carry the IPv4 address of the second forwarding node. In this scenario, when the first forwarding node receives the first control message, the first control message does not carry the IPv6 private network identifier, and the first forwarding node does not obtain the IPv6 private network identifier from the local storage, and the first forwarding node can also determine that the second forwarding node does not have an IPv4 address.

[0187] Therefore, in the embodiment of the present application, the first forwarding node determines that the second forwarding node without an IPv4 address satisfies one of the following two conditions. One is that the intermediate node in the IPv6 network where the second forwarding node is located is not configured with an IPv4 address. The other is that the second forwarding node is configured with an IPv4 address, but the IPv4 address of the second forwarding node is not used externally.

[0188] In addition, in the embodiment of the present application, in order to be able to realize the case of announcing the second forwarding node to the third forwarding node, the IPv6 address of the second forwarding node needs to be carried in the second control message. Based on this, the first forwarding node needs to obtain the IPv6 address of the second forwarding node before generating the second control message.

[0189] The process of how the first forwarding node obtains the IPv6 address of the second forwarding node and generates the second control message is described in detail below.

[0190] In some embodiments, in the scenario where the first control message carries the IPv6 address of the second forwarding node, the implementation process of the first forwarding node generating the second control message based on the first control message can be: the first forwarding node obtains the IPv6 address of the second forwarding node from the first control message to generate the second control message.

[0191] The implementation manner of the first forwarding node obtaining the IPv6 address of the second forwarding node from the first control message is related to the manner in which the first control message carries the IPv6 address of the second forwarding node. The following three scenarios are taken as examples for illustration, and the obtaining process in other scenarios can also refer to the following examples, which will not be illustrated one by one.

[0192] For example, in the scenario where the first control message is an ICMP message, and the first control message includes a second extension object carrying the IPv6 address of the second forwarding node, the implementation process of the first forwarding node obtaining the IPv6 address of the second forwarding node from the first control message can be: the first forwarding node obtains the IPv6 address of the second forwarding node from the second extension object.

[0193] For example, when the second extension object includes an ingress interface address field, the first forwarding node can obtain the IPv6 address of the second forwarding node from the ingress interface address field of the second extension object.

[0194] For example, when the second extension object includes an ingress interface address field, the first forwarding node can obtain the IPv6 address of the second forwarding node from the ingress interface address field of the second extension object.

[0195] For example, when the second extension object includes an ingress interface address field, the first forwarding node can obtain the IPv6 address of the second forwarding node from the ingress interface address field of the second extension object.

[0196] For example, when the second extension object includes an ingress interface address field, the first forwarding node can obtain the IPv6 address of the second forwarding node from the ingress interface address field of the second extension object.

[0197] For example, when the second extension object includes an ingress interface address field, the first forwarding node can obtain the IPv6 address of the second forwarding node from the ingress interface address field of the second extension object.

[0198] In some embodiments, the first forwarding node can obtain the IPv6 address of the second forwarding node from the first control message. For example, when the first control message includes a first IPv6 packet header, the first forwarding node can obtain the IPv6 address of the second forwarding node from the first IPv6 packet header.

[0199] For example, when the second extension object includes an ingress interface address field, the first forwarding node can obtain the IPv6 address of the second forwarding node from the ingress interface address field of the second extension object.

[0200] In addition, in the embodiment of the present application, in order to realize the case that the second forwarding node is notified to forward the message to the third forwarding node, the IPv6 address of the second forwarding node needs to be carried in the second control message. The implementation of carrying the IPv6 address of the second forwarding node in the second control message can be as follows.

[0201] In some embodiments, the second control message is an ICMP message, and the second control message includes a third extension object, which carries the IPv6 address of the second forwarding node.

[0202] In other embodiments, the second control message is a network control message protocol ICMP message, and the first control message includes a third ICMP message header, which carries the IPv6 address of the second forwarding node.

[0203] The specific implementation of carrying the IPv6 address of the first forwarding node in the second control message can refer to the implementation of carrying the IPv6 address of the second forwarding node in the first control message through the extension object or the ICMP message header, which will not be described here.

[0204] It should be noted that, since the first control message includes the first IPv6 message header, the first control message can also carry the IPv6 address of the second forwarding node in the first IPv6 message header. However, the second control message is an IPv4 message, and therefore the second control message does not include an IPv6 message header, so the second control message needs to carry the IPv6 address of the second forwarding node through the extension object or the extended ICMP message header or other extension methods.

[0205] In addition, in the embodiment of the present application, if the IPv6 network where the second forwarding node is located is an IPv6 special network, the second control message can also carry an IPv6 special network identifier, which indicates that the intermediate nodes in the IPv6 network where the second forwarding node is located are not configured with IPv4 addresses. The implementation of carrying the IPv6 special network identifier by the second forwarding node can be as follows.

[0206] In some embodiments, the second control message is an ICMP message, and the second control message includes a fourth extension object, which carries the IPv6 special network identifier.

[0207] In other embodiments, the second control message is an ICMP message, and the second control message includes a fourth ICMP message header, which carries the IPv6 special network identifier.

[0208] The implementation of the second control message carrying the IPv6 private network identifier can refer to the implementation of the first control message carrying the IPv6 private network identifier through the extension object or the ICMP message header, which will not be described herein.

[0209] The above describes how the second control message carries the IPv6 address of the second forwarding node and the IPv6 private network identifier by taking the second control message as an ICMP message. Alternatively, when the second control message is implemented through other protocols, the second control message under other protocols can also be extended to carry the IPv6 address of the second forwarding node and the IPv6 private network identifier, which will not be described herein in detail.

[0210] Step 605: The third forwarding node receives the second control message and determines the forwarding condition of the first message by the second forwarding node based on the second control message.

[0211] After the third forwarding node sends the first message to the first forwarding node, the third forwarding node will receive the second control message sent by the first forwarding node based on the above steps 602-604. As known from step 604, the second control message is an IPv4 message and the second control message carries the IPv6 address of the second forwarding node.

[0212] Since the second control message carries the IPv6 address of the second forwarding node, when the third forwarding node receives the second control message sent by the first forwarding node, the third forwarding node can know that the second forwarding node triggers the first forwarding node to send the second control message based on the IPv6 address of the second forwarding node, so as to learn the forwarding condition of the second forwarding node for the first message through the first forwarding node.

[0213] For example, the second control message indicates that the time to live TTL of the first message is expired when the first message reaches the second forwarding node. That is, the second control message is used to announce that the second forwarding node fails to forward the first message, and the error reason is that the time to live TTL of the first message is expired.

[0214] For example, in the path tracking scenario, the first message is a path tracking message, and when the third forwarding node receives the second control message after sending a path tracking message to the first forwarding node, the third forwarding node can determine that the TTL in the path tracking message is 1 when the path tracking message is transmitted to the second forwarding node based on the IPv6 address of the second forwarding node carried by the second control message, so that the second forwarding node cannot continue to forward the path tracking message. That is, the third forwarding node can determine that the second forwarding node fails to continue to forward the first message based on the IPv6 address of the second forwarding node carried by the second control message.

[0215] Further, after determining the forwarding status of the first packet by the second forwarding node based on the second control message, the third forwarding node can further parse the second control message to obtain the IPv6 address of the second forwarding node, and then display the IPv6 address of the second forwarding node.

[0216] For example, in the path tracking scenario, when displaying the IPv6 address of the second forwarding node, the third forwarding node can also display the initial TTL value of the first packet sent by the third forwarding node. In order to facilitate the network administrator to determine the node tracked by the path tracking packet with the TTL value.

[0217] For example, assuming that the third forwarding node is CE1 in the architecture shown in Figure 5 , the first forwarding node is PE1, and the second forwarding node is P, then in the path tracking scenario, CE1 can display the tracking result shown in Figure 8 .

[0218] As shown in Figure 8 , the destination address of the path tracking is the IPv4 address 2.2.2.2 of CE2 (shown as tracert 2.2.2.2 in Figure 8 ). That is, the payload of all the first packets (i.e., path tracking packets) initiated by CE1 has the destination address 2.2.2.2.

[0219] When the TTL in the first packet is 1, the tracked node is PE1, and thus the IPv4 address 100.1.1.1 of PE1 is displayed. Figure 8 The three 1 milliseconds (ms) in the second row of indicate that CE1 sent three first packets with TTL 1 respectively, and each 1 ms indicates the time length between sending the corresponding first packet and receiving the second control message.

[0220] Figure 8 When the TTL in the first packet is 2, the tracked node is P, and thus the IPv6 address A2::2 of P is displayed. Figure 5 The three 1 milliseconds (ms) in the third row of also indicate that CE1 sent three first packets with TTL 2 respectively. It should be noted that

[0221] the IPv6 network where P is located is an SRv6 network, and thus the IPv6 address of P is a segment identity (SID) allocated by the SRv6 network for P, which is A2::2.The specific implementation of the third forwarding node analyzing the second control message to obtain the IPv6 address of the second forwarding node is related to the manner in which the second control message carries the IPv6 address of the second forwarding node. For details, refer to the related content of the second control message in step 604, which will not be described herein again.

[0222] It should be noted that since the IPv6 address of the second forwarding node has 128 bits, the third forwarding node may not have the ability to display the IPv6 address with 128 bits in some scenarios. In this case, the third forwarding node can display a prompt information indicating that the currently tracked second forwarding node is a node in the IPv6 network.

[0223] In addition, in the case where the second forwarding node is an intermediate node in the IPv6 private network, in order to facilitate the network administrator to learn the IPv6 network in which the second forwarding node is located in time, after the third forwarding node determines the case that the first forwarding node forwards the first message based on the second control message, the third forwarding node can further determine an IPv6 private network identifier of the IPv6 network, the IPv6 private network identifier indicating that the intermediate node in the IPv6 network in which the second forwarding node is located is configured with an IPv4 address; and then the third forwarding node displays the IPv6 private network identifier.

[0224] In some embodiments, the implementation process of the third forwarding node determining the IPv6 private network identifier of the IPv6 network can be that the third forwarding node analyzes the second control message to obtain the IPv6 private network identifier. That is, the third forwarding node obtains the IPv6 private network identifier from the second control message.

[0225] The specific implementation of the third forwarding node analyzing the second control message to obtain the IPv6 private network identifier is related to the manner in which the second control message carries the IPv6 private network identifier. For details, refer to the related content of the second control message in step 604, which will not be described herein again.

[0226] Optionally, in other embodiments, the third forwarding node can also obtain the IPv6 private network identifier from the local storage. The specific implementation can refer to the process of the first forwarding node obtaining the IPv6 private network identifier from the local storage, which will not be described herein again.

[0227] In summary, based on the above, the third forwarding node can determine the IPv6 address of the second forwarding node and the IPv6 private network identifier of the IPv6 network in which the second forwarding node is located in the following manners. Figure 6The embodiment shown, when the edge node of the IPv6 network, the first forwarding node, receives the first control message from the second forwarding node in the same IPv6 network, since the first control message is used to announce the forwarding of the second message by the second forwarding node, and the second message is generated based on the first message from the IPv4 network, the first forwarding node needs to announce the forwarding of the first message to the sender (the third forwarding node in the IPv4 network) when receiving the first control message. Based on this, when receiving the first control message, the first forwarding node generates a second control message based on the first control message, and the second control message is an IPv4 message to send the second control message to the third forwarding node in the IPv4 network. And when the second forwarding node does not have an IPv4 address, in order to successfully announce the forwarding of the message by the second forwarding node in the IPv6 network to the third forwarding node in the IPv4 network, the embodiment of the application extends the second control message to carry the IPv6 address of the second forwarding node in the second control message. Therefore, through the method provided by the embodiment of the application, the intermediate node in the IPv6 network can successfully announce the forwarding of the message to the forwarding node in the IPv4 network when the intermediate node does not have an IPv4 address.

[0228] It should be noted that, Figure 6 The various optional schemes in steps 601 to 606 of the embodiment shown can be combined based on requirements, and the embodiment of the application will not be illustrated one by one.

[0229] The following is an example of the path tracking flowchart. Figure 9 The path tracking flowchart shown is an example of one of the various optional schemes, and does not constitute a limitation on the schemes provided by the embodiment of the application. Figure 9 is Figure 6 The path tracking flowchart shown is an example of one of the various optional schemes, and does not constitute a limitation on the schemes provided by the embodiment of the application.

[0230] As shown in the figure. The path tracking flowchart includes the following steps. Figure 9

[0231] (1) CE1 sends a path tracking message with TTL of 2 to PE1, and the path tracking message includes an IPv4 message header and a payload, wherein the IPv4 message header carries a source address (SA) 1.1.1.1 and a destination address (DA) 2.2.2.2, and the TTL in the IPv4 message header is 2.

[0232] (2) After PE1 receives the path tracking message, the TTL in the IPv4 message header of the path tracking message is reduced to 1, and an IPv6 message header is encapsulated outside the path tracking message. Figure 9 ​The IPv6 header (abbreviated as IPv6 header) is set to 1, and the processed path tracing packet is forwarded to P.

[0233] (3) When P receives the path tracing message, it determines that the TTL in the IPv6 header of the path tracing message has expired, and P determines that the received path tracing message includes an IPv4 header. Therefore, P generates an ICMP error message (i.e., the first control message) that needs to announce the TTL timeout based on the scheme provided in the embodiments of this application.

[0234] like Figure 9 As shown, the ICMP error message generated by P directly uses the received path tracing message as the ICMP data (i.e., the payload of the ICMP error message), then adds an extension object to the end of the ICMP data, and sequentially adds an ICMP header to the outer layer of the ICMP data. Figure 9 The abbreviation for ICMP header) and IPv6 header ( Figure 9 This is obtained by abbreviating it as the IPv6 header. The extended object carries the IPv6 private network identifier and the IPv6 address of the IP. It should be noted that... Figure 9 The IPv6 network where P is located is an SRv6 network. Therefore, P's IPv6 address is the segment identity (SID) assigned to it by the SRv6 network, which is A2::2.

[0235] Additionally, it should be noted that the ICMP header in the ICMP error message generated by P can be used to indicate that there is an error in IPv6 network forwarding. For specific indication methods, please refer to the relevant protocols, which will not be elaborated upon here. Therefore, the ICMP header in the ICMP error message generated by P can also be called the ICMPv6 header.

[0236] (4) When PE1 receives the ICMP error message sent by P, it strips the outer IPv6 header of the ICMP error message and the IPv6 header in the ICMP data, and then uses the remaining IPv4 header and payload as new ICMP data. Based on the new ICMP data and the extended object, it reconstructs the ICMP error message (i.e. the second control message) and sends the reconstructed ICMP error message to CE1.

[0237] It should also be noted that since the reconstructed ICMP error message needs to be sent to the IPv4 network, the ICMP header in the reconstructed ICMP error message can be used to indicate IPv4 network errors. Specific indication methods can be found in relevant protocols and will not be detailed here. Therefore, the ICMP header in the ICMP error message reconstructed by PE1 can also be called the ICMPv4 header.

[0238] (5) When CE1 receives the reconstructed ICMP error message from PE1, it obtains the IPv6 address of the P node based on the extended object in the received ICMP error message, thereby enabling the tracking of the IPv6 address of the P node when the TTL is 2.

[0239] Figure 10 This is a schematic diagram of the structure of a network device provided in an embodiment of this application. The network device is... Figure 4 Any forwarding node in the message forwarding system shown, such as the first forwarding node, the second forwarding node, or the third forwarding node.

[0240] Specifically, such as Figure 10 As shown, the network device 1000 includes a transceiver module 1001 and a processing module 1002.

[0241] The transceiver module 1001 is used to perform... Figure 6 In this embodiment, operations related to sending and receiving are performed; the processing module 1002 is used to execute... Figure 6 The examples include operations other than those related to sending and receiving.

[0242] exist Figure 10 In the scenario where the network device 1000 shown is the first forwarding node in the aforementioned embodiment, the specific functions of the transceiver module 1001 and the processing module 1002 are as follows.

[0243] The transceiver module 1001 is used to receive the first packet sent by the third forwarding node. The first packet is an IPv4 packet. For specific implementation details, please refer to [reference needed]. Figure 6 Step 602 in the embodiment.

[0244] Processing module 1002 is used to generate a second packet based on the first packet and send the second packet, which is an IPv6 packet, to the second forwarding node. For specific implementation details, please refer to [reference needed]. Figure 6 Step 602 in the embodiment.

[0245] The transceiver module 1001 is used to receive the first control message sent by the second forwarding node. The first control message is an IPv6 packet and is used to notify the second forwarding node of its forwarding of the second packet. For specific implementation details, please refer to [reference needed]. Figure 6 Step 604 in the embodiment.

[0246] The processing module 1002 is configured to generate a second control message based on the first control message when it is determined that the second forwarding node does not have an IPv4 address. The specific implementation can be referred to the step 604 in the embodiment. Figure 6

[0247] The transceiver module 1001 is configured to send the second control message to the third forwarding node, the second control message being an IPv4 packet, and the second control message carrying an IPv6 address of the second forwarding node. The specific implementation can be referred to the step 604 in the embodiment. Figure 6

[0248] Optionally, the first control message carries an IPv6 private network identifier, the IPv6 private network identifier indicating that an intermediate node in the IPv6 network is not configured with an IPv4 address.

[0249] The processing module 1002 is configured to:

[0250] parse the first control message to obtain the IPv6 private network identifier;

[0251] determine, based on the IPv6 private network identifier, that the second forwarding node does not have an IPv4 address.

[0252] Optionally, the first control message is an Internet Control Message Protocol (ICMP) packet.

[0253] The first control message includes a first extension object, and the first extension object carries the IPv6 private network identifier, or the first control message includes a first ICMP packet header, and the first ICMP packet header carries the IPv6 private network identifier.

[0254] Optionally, the processing module 1002 is configured to:

[0255] obtain a locally stored IPv6 private network identifier, the IPv6 private network identifier indicating that an intermediate node in the IPv6 network is not configured with an IPv4 address;

[0256] determine, based on the IPv6 private network identifier, that the second forwarding node does not have an IPv4 address.

[0257] Optionally, the first control message carries an IPv6 address of the second forwarding node.

[0258] The processing module 1002 is configured to:

[0259] obtain the IPv6 address of the second forwarding node from the first control message to generate the second control message.

[0260] ​​Optionally, the first control message is an Internet Control Message Protocol (ICMP) message, and the first control message comprises a second extension object carrying an IPv6 address of the second forwarding node.

[0261] The processing module 1002 is configured to:

[0262] The processing module 1002 is configured to:

[0263] Optionally, the first control message is an Internet Control Message Protocol (ICMP) message, and the first control message comprises a second ICMP message header carrying an IPv6 address of the second forwarding node.

[0264] The processing module 1002 is configured to:

[0265] The processing module 1002 is configured to:

[0266] Optionally, the first control message comprises a first IPv6 message header carrying an IPv6 address of the second forwarding node.

[0267] The processing module 1002 is configured to:

[0268] The processing module 1002 is configured to:

[0269] Optionally, the first forwarding node locally stores an IPv6 address of the second forwarding node.

[0270] The processing module 1002 is configured to:

[0271] The processing module 1002 is configured to: obtain the stored IPv6 address of the second forwarding node, and generate a second control message based on the first control message and the IPv6 address of the second forwarding node.

[0272] Optionally, the second control message is an Internet Control Message Protocol (ICMP) message.

[0273] The second control message comprises a third extension object carrying an IPv6 address of the second forwarding node, or the second control message comprises a third ICMP message header carrying an IPv6 address of the second forwarding node.

[0274] Optionally, the second control message further carries an IPv6 private network identifier, and the IPv6 private network identifier indicates that intermediate nodes in the IPv6 network are not configured with IPv4 addresses.

[0275] Optionally, the second control message is an Internet Control Message Protocol (ICMP) message.

[0276] The second control message comprises a fourth extension object, and the fourth extension object carries the IPv6 private network identifier; or the second control message comprises a fourth ICMP message header, and the fourth ICMP message header carries the IPv6 private network identifier.

[0277] Optionally, the second forwarding node satisfies one of the following two conditions:

[0278] The intermediate node in the IPv6 network where the second forwarding node is located is not configured with an IPv4 address;

[0279] Or, the second forwarding node is configured with an IPv4 address, but the IPv4 address of the second forwarding node is not used externally.

[0280] Optionally, the first message and the second message both carry a time to live TTL, and the first control message indicates that the TTL of the second message expires when the second message reaches the second forwarding node.

[0281] Optionally, the first message and the second message are path tracking messages.

[0282] In Figure 10 The specific functions of the transceiver module 1001 and the processing module 1002 in the scenario of the second forwarding node in the foregoing embodiments are as follows.

[0283] The transceiver module 1001 is configured to receive a second message sent by a first forwarding node, and the second message is an IPv6 message. The specific implementation can refer to step 603 in the foregoing embodiments. Figure 6

[0284] The processing module 1002 is configured to, when it is determined that the second message cannot be forwarded at present and it is determined that the second message has an IPv4 message header, generate a first control message based on the second message, the first control message indicating the forwarding condition of the second forwarding node for the second message, and the first control message indicating that the second forwarding node does not have an IPv4 address. The specific implementation can refer to step 603 in the foregoing embodiments. Figure 6

[0285] The transceiver module 1001 is configured to send the first control message to the first forwarding node. The specific implementation can refer to step 603 in the foregoing embodiments. Figure 6

[0286] Optionally, the first control message carries an IPv6 private network identifier, and the IPv6 private network identifier indicates that the intermediate node in the IPv6 network is not configured with an IPv4 address.

[0287] Optionally, the first control message is an Internet Control Message Protocol (ICMP) message.

[0288] ​​​The first network control message comprises a first extension object carrying the IPv6 private network identifier, or the first control message comprises a first ICMP message header carrying the IPv6 private network identifier.

[0289] Optionally, the first control message carries an IPv6 address of the second forwarding node.

[0290] Optionally, the first control message is an ICMP message of a network control message protocol.

[0291] The first network control message comprises a second extension object carrying the IPv6 address of the second forwarding node, or the first control message comprises a second ICMP message header carrying the IPv6 address of the second forwarding node.

[0292] Optionally, the first control message comprises a first IPv6 message header carrying the IPv6 address of the second forwarding node.

[0293] Optionally, the processing module 1002 is configured to:

[0294] When the time to live TTL of the second message is 1, it is determined that the second message cannot be forwarded at present.

[0295] Optionally, the second message is a path tracking message.

[0296] In Figure 10 In the scenario that the network device 1000 is the third forwarding node in the foregoing embodiments, the specific functions of the transceiver module 1001 and the processing module 1002 are as follows.

[0297] The transceiver module 1001 is configured to, after sending a first message to a first forwarding node, receive a second control message sent by the first forwarding node, the second control message being an IPv4 message and the second control message carrying an IPv6 address of a second forwarding node, and the first message being an IPv4 message. The specific implementation can refer to steps 601 and 605 in the foregoing embodiments. Figure 6

[0298] The processing module 1002 is configured to determine, based on the second control message, a forwarding condition of the first message by the second forwarding node. The specific implementation can refer to step 605 in the foregoing embodiments. Figure 6

[0299] Optionally, the processing module 1002 is further configured to:

[0300] parsing the second control message to obtain the IPv6 address of the second forwarding node;

[0301] displaying the IPv6 address of the second forwarding node.​​

[0302] Optionally, the second control message is an Internet Control Message Protocol (ICMP) message.

[0303] The second network control message comprises a third extension object, and the third extension object carries an IPv6 address of the second forwarding node; or the second control message comprises a third ICMP message header, and the third ICMP message header carries the IPv6 address of the second forwarding node.

[0304] Optionally, the processing module 1002 is further configured to:

[0305] determine an IPv6 private network identifier, the IPv6 private network identifier indicating that intermediate nodes in the IPv6 network are not configured with IPv4 addresses;

[0306] display the IPv6 private network identifier.

[0307] Optionally, the processing module 1002 is configured to:

[0308] parse the second control message to obtain the IPv6 private network identifier.

[0309] Optionally, the second control message is an Internet Control Message Protocol (ICMP) message.

[0310] The second network control message comprises a fourth extension object, and the fourth extension object carries the IPv6 private network identifier; or the second control message comprises a fourth ICMP message header, and the fourth ICMP message header carries the IPv6 private network identifier.

[0311] Optionally, the second control message indicates that a time to live (TTL) of the first message expires when the first message reaches the second forwarding node.

[0312] Optionally, the first message is a path tracking message.

[0313] The hardware structure related to the embodiments of the present application will be introduced below.

[0314] Figure 11 is a structural schematic diagram of a device 1100 provided by the embodiments of the present application. Figure 12 is a structural schematic diagram of another device 1200 provided by the embodiments of the present application. The structures of the two devices will be explained and described below.

[0315] It should be noted that the device 1100 or the device 1200 introduced below corresponds to any of the forwarding nodes in the above method embodiments. The various hardware, modules and other operations and / or functions in the device 1100 or the device 1200 are respectively used to implement various steps and methods performed by any of the forwarding nodes in the method embodiments, and the detailed flow of how the device 1100 or the device 1200 processes the packet is described above in the method embodiments, which will not be repeated here for brevity. The steps of the above method embodiments are completed by the integrated logic circuit of hardware or the instructions in the form of software in the processor of the device 1100 or the device 1200. The steps of the method disclosed in the embodiments of the present application can be directly embodied as being completed by a hardware processor, or being completed by a combination of hardware and software modules in the processor. The software module can be located in a storage medium in the art such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, register, etc. The storage medium is located in the storage, and the processor reads the information in the storage, and combines the hardware to complete the steps of the above method, which will not be described in detail here to avoid repetition.

[0316] When the device 1100 corresponds to any of the forwarding nodes described above, each functional module in the forwarding node is implemented by software of the device 1100. In other words, the functional modules included in the forwarding node are generated after the processor of the device 1100 reads the program code stored in the storage.

[0317] When the device 1200 corresponds to any of the forwarding nodes described above, each functional module in the forwarding node is implemented by software of the device 1200. In other words, the functional modules included in the forwarding node are generated after the processor of the device 1200 reads the program code stored in the storage.

[0318] Referring to FIG. 11, Figure 11 Figure 11 FIG. 11 is a structural schematic diagram of a device 1100 provided by the embodiments of the present application. Optionally, the device 1100 is configured as Figure 4 the first forwarding node, the second forwarding node or the third forwarding node shown in FIG. 11. In other words, any of the forwarding nodes in the above method embodiments is optionally implemented by the device 1100.

[0319] The device 1100 is, for example, a network device, such as a switch, a router, etc. Alternatively, the device 1100 is, for example, a computing device, such as a host, a server or a personal computer, etc. The device 1100 can be implemented by a general bus architecture.

[0320] The device 1100 includes at least one processor 1101, a communication bus 1102, a storage 1103 and at least one communication interface 1104.​

[0321] Processor 1101 may be, for example, a general-purpose central processing unit (CPU), a network processor (NP), a graphics processing unit (GPU), a neural-network processing unit (NPU), a data processing unit (DPU), a microprocessor, or one or more integrated circuits for implementing the embodiments of this application. For example, processor 1101 may include an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. A PLD may be, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0322] The communication bus 1102 is used to transmit information between the aforementioned components. The communication bus 1102 can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, see attached... Figure 11 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0323] Memory 1103 may be, for example, read-only memory (ROM) or other types of static storage devices capable of storing static information and instructions; random access memory (RAM) or other types of dynamic storage devices capable of storing information and instructions; electrically erasable programmable read-only memory (EEPROM); compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.); magnetic disk storage media or other magnetic storage devices; or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. Memory 1103 may exist independently and be connected to processor 1101 via communication bus 1102. Memory 1103 may also be integrated with processor 1101.

[0324] Communication interface 1104 uses any transceiver-like device for communicating with other devices or communication networks. Communication interface 1104 includes a wired communication interface and may also include a wireless communication interface. The wired communication interface may be, for example, an Ethernet interface. The Ethernet interface may be an optical interface, an electrical interface, or a combination thereof. The wireless communication interface may be a wireless local area network (WLAN) interface, a cellular network communication interface, or a combination thereof.

[0325] In a specific implementation, as one embodiment, processor 1101 may include one or more CPUs, as shown in the appendix. Figure 11 CPU0 and CPU1 are shown in the diagram.

[0326] In a specific implementation, as one example, device 1100 may include multiple processors, as shown in the appendix. Figure 11 The processors 1101 and 1105 shown are illustrated. Each of these processors can be a single-core processor or a multi-core processor. Here, "processor" can refer to one or more devices, circuits, and / or processing cores used to process data (such as computer program instructions).

[0327] In a specific implementation, as one embodiment, device 1100 may further include an output device and an input device. The output device communicates with processor 1101 and can display information in various ways. For example, the output device may be a liquid crystal display (LCD), a light-emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector, etc. The input device communicates with processor 1101 and can receive user input in various ways. For example, the input device may be a mouse, keyboard, touchscreen device, or sensing device, etc.

[0328] In some embodiments, memory 1103 is used to store program code 1110 for executing the scheme of this application, and processor 1101 can execute the program code 1110 stored in memory 1103. That is, device 1100 can implement the packet forwarding method provided in the method embodiment through processor 1101 and program code 1110 in memory 1103.

[0329] The device 1100 of this application embodiment can correspond to any of the forwarding nodes in the above-described method embodiments, and the processor 1101, communication interface 1104, etc. in the device 1100 can implement the functions and / or various steps and methods implemented by any of the forwarding nodes in the above-described method embodiments. For the sake of brevity, further details are omitted here.

[0330] In some embodiments of this application, where the device 1100 is used for implementation, the appendix... Figure 10 The transceiver module and processing module in the network device 1000 shown are software modules in the program code 1110 in device 1100. The processor 1101 in device 1100 implements the auxiliary functions by executing the program code 1110. Figure 10 The functions of the transceiver module and processing module in the network device 600.

[0331] See appendix Figure 12 , attached Figure 12 This is a schematic diagram of the structure of a device 1200 provided in an embodiment of this application. Optionally, the device 1200 is configured as follows: Figure 4 The first, second, or third forwarding node shown. In other words, any of the forwarding nodes in the above method embodiments can optionally be implemented by device 1200.

[0332] Device 1200 is, for example, a network device, such as a switch or router. Device 1200 includes: a main control board 12010 and an interface board 12030.

[0333] The master board is also called a main processing unit (MPU) or a route processor card. The master board 12010 is configured to control and manage various components in the device 1200, including route calculation, device management, device maintenance, and protocol processing functions. The master board 12010 includes a central processing unit 12011 and a memory 12012.

[0334] The interface board 12030 is also called a line processing unit (LPU), a line card, or a service board. The interface board 12030 is configured to provide various service interfaces and implement data packet forwarding. The service interfaces include, but are not limited to, Ethernet interfaces, POS (Packet over SONET / SDH) interfaces, and the like. The Ethernet interface is, for example, a Flexible Ethernet Client (FlexE Client). The interface board 12030 includes a central processing unit 12031, a network processor 12032, a forwarding table item memory 12034, and a physical interface card (PIC) 12033.

[0335] The central processing unit 12031 on the interface board 12030 is configured to control and manage the interface board 12030 and communicate with the central processing unit 12011 on the master board 12010.

[0336] The network processor 12032 is configured to implement message forwarding processing. The network processor 12032 can be in the form of a forwarding chip. Specifically, the network processor 12032 is configured to forward a received message based on a forwarding table stored in the forwarding table item memory 12034. If the destination address of the message is an address of the device 1200, the message is sent to a CPU (such as the central processing unit 12011) for processing. If the destination address of the message is not an address of the device 1200, the next hop and the out interface corresponding to the destination address are found from the forwarding table based on the destination address, and the message is forwarded to the out interface corresponding to the destination address. The processing of the uplink message includes processing of the message entry interface and forwarding table lookup. The processing of the downlink message includes forwarding table lookup, and the like.

[0337] The physical interface card 12033 is used to implement the interfacing function of the physical layer, and the original traffic enters the interface board 12030 through the physical interface card 12033, and the processed packet is sent out from the physical interface card 12033. The physical interface card 12033 is also called a daughter card, which can be installed on the interface board 12030 and is responsible for converting the optical and electrical signals into packets and forwarding the packets to the network processor 12032 for processing after the packets are checked for legality. In some embodiments, the central processor can also perform the function of the network processor 12032, such as implementing software forwarding based on a general-purpose CPU, so that the network processor 12032 is not needed in the physical interface card 12033.

[0338] Optionally, the device 1200 includes a plurality of interface boards, for example, the device 1200 further includes an interface board 12040, which includes a central processor 12041, a network processor 12042, a forwarding table item storage 12044, and a physical interface card 12043.

[0339] Optionally, the device 1200 further includes a switching network board 12020. The switching network board 12020 can also be called a switch fabric unit (SFU). In the case that the network device has a plurality of interface boards 12030, the switching network board 12020 is used to complete the data exchange between the interface boards. For example, the interface board 12030 and the interface board 12040 can communicate through the switching network board 12020.

[0340] The main control board 12010 and the interface board 12030 are coupled. For example, the main control board 12010, the interface board 12030 and the interface board 12040, and the switching network board 12020 are connected through a system bus and a system backboard to realize intercommunication. In a possible implementation manner, an inter-process communication (IPC) channel is established between the main control board 12010 and the interface board 12030, and the main control board 12010 and the interface board 12030 communicate through the IPC channel.

[0341] In logic, the device 1200 includes a control plane and a forwarding plane, the control plane includes the main board 12010 and the central processor 12031, and the forwarding plane includes various components performing forwarding, such as the forwarding table item memory 12034, the physical interface card 12033 and the network processor 12032. The control plane performs functions such as router, generating forwarding table, processing signaling and protocol packets, configuring and maintaining the state of the device, and the like, and the control plane issues the generated forwarding table to the forwarding plane, in the forwarding plane, the network processor 12032 performs table lookup and forwarding based on the forwarding table issued by the control plane. The forwarding table issued by the control plane can be saved in the forwarding table item memory 12034. In some embodiments, the control plane and the forwarding plane can be completely separated and not on the same device.

[0342] In the case of implementing the device 1200 in the forwarding node, in some embodiments, the interface board 12040 in the device 1200 is equivalent to the interface board 12030 in the device 1200. Figure 10 The transceiver module in the network device 600 shown is equivalent to the physical interface card 12033 in the device 1200; the processing module of the network device 600 is equivalent to the network processor 12032, the central processor 12031 or the central processor 12011.

[0343] It should be understood that the operations on the interface board 12040 in the embodiments of the present application are consistent with the operations of the interface board 12030, and for the sake of brevity, will not be repeated. It should be understood that the device 1200 of the present embodiment can correspond to any of the forwarding nodes in the various method embodiments described above, and the main board 12010, the interface board 12030 and / or 12040 in the device 1200 can implement the functions and / or perform the various steps of any of the forwarding nodes in the various method embodiments described above, and for the sake of brevity, will not be repeated here.

[0344] It is worth mentioning that the master board can be one or more, and when there are multiple master boards, the master boards can include a main master board and a backup master board. The interface board can be one or more, and the more interface boards the network device provides, the stronger the data processing capability of the network device. The physical interface card on the interface board can also be one or more. The switching network board can be none or one or more, and when there are multiple switching network boards, the switching network boards can collectively implement load sharing and redundancy. Under the centralized forwarding architecture, the network device can not need the switching network board, and the interface board can undertake the processing function of the entire system. Under the distributed forwarding architecture, the network device can have at least one switching network board, and the switching network board can be used to realize data exchange between multiple interface boards and provide large-capacity data exchange and processing capability. Therefore, the data access and processing capability of the network device in the distributed architecture is greater than that of the network device in the centralized architecture. Alternatively, the network device can also be in the form of only one board, that is, the functions of the interface board and the master board are integrated on the one board, and at this time, the central processor on the interface board and the central processor on the master board can be combined into one central processor on the one board to perform the functions of the two superimposed boards. The data exchange and processing capability of the device in this form is relatively low (for example, low-end switches or routers and the like). Which architecture to use depends on the specific network deployment scenario, and no limitation is made here.

[0345] In some other embodiments, the application also provides a packet forwarding system. As shown in Figure 13 the packet forwarding system 1300 includes a first forwarding node 1301, a second forwarding node 1302, and a third forwarding node 1303. The first forwarding node 1301 is an edge node of an IPv6 network, the second forwarding node 1302 is located in the IPv6 network, and the third forwarding node 1303 is located in an IPv4 network.

[0346] The third forwarding node 1303 is configured to send a first packet to the first forwarding node, the first packet being an IPv4 packet.

[0347] The first forwarding node 1301 is configured to receive the first packet, generate a second packet based on the first packet, and send the second packet to the second forwarding node, the second packet being an IPv6 packet.

[0348] The second forwarding node 1302 is configured to receive the second packet, and in a case where it is determined that the second packet cannot be forwarded at present and the second packet has an IPv4 packet header, generate a first control message based on the second packet, the first control message being an IPv6 packet, and the first control message being used to announce a case where the second forwarding node forwards the second packet.

[0349] The first forwarding node 1301 is further configured to: receive a first control message, generate a second control message based on the first control message when the first forwarding node determines that the second forwarding node does not have an IPv4 address, and send the second control message to the third forwarding node, the second control message being an IPv4 message and the second control message carrying an IPv6 address of the second forwarding node.

[0350] The third forwarding node 1303 is further configured to: receive the second control message, and determine, based on the second control message, a forwarding condition of the second forwarding node for the first message.

[0351] The detailed functions of the forwarding nodes in the message forwarding system can refer to the embodiments shown in Figure 6 The detailed functions of the forwarding nodes in the message forwarding system can refer to the embodiments shown in

[0352] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the system, device and module described above can refer to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0353] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the system, device and module described above can refer to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0354] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and actual implementation can have another division manner, for example, a plurality of modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed modules can be indirect coupling or communication connection through some interfaces, devices or modules, and can also be electrical, mechanical or other forms of connection.

[0355] The modules described as separate components can or can not be physically separate, and the components shown as modules can or can not be physical modules, that is, they can be located in one place, or can be distributed on a plurality of network modules. According to actual needs, part or all of the modules can be selected to achieve the purpose of the embodiments of the present application.

[0356] In addition, each functional module in various embodiments of the present application can be integrated in one processing module, or each module can be physically present alone, or two or more modules can be integrated in one module. The integrated module can be realized in the form of hardware or in the form of a software functional module.

[0357] When the integrated module is realized in the form of a software functional module and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part that contributes to the prior art, or all or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program code storage media.

[0358] In the present application, the terms "first", "second", and the like are used to distinguish between items or similar items with substantially the same function and action. It should be understood that there is no logical or chronological dependency between "first" and "second", and the quantity and execution order are not limited. It should also be understood that although the following description uses the terms first, second, and the like to describe various elements, these elements should not be limited by the terms. These terms are only used to distinguish one element from another. For example, without departing from the scope of various examples, the first information can be referred to as the second information, and similarly, the second information can be referred to as the first information. The first information and the second information can both be information, and in some cases, can be separate and different information.

[0359] In the present application, the term "at least one" means one or more, and the term "a plurality of" means two or more. The terms "system" and "network" are often used interchangeably in this document.

[0360] It should also be understood that the term “if’ can be construed to mean “when” or “upon” or “in response to determining” or “in response to detecting,” depending on the context. Similarly, the phrase “if it is determined” or “if [a stated condition or event] is detected” can be construed to mean “upon determining” or “in response to determining” or “upon detecting [the stated condition or event]” or “in response to detecting [the stated condition or event],” depending on the context.

[0361] The above description is only specific embodiments of the present application, but the protection scope of the present application is not limited thereto, and any modification or replacement within the technical range disclosed by the present application can be easily thought by those skilled in the art, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

[0362] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer program instructions. When loaded and executed on a computer, all or part of the computer program instructions generate the processes or functions in the embodiments of the present application. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another computer-readable storage medium, for example, the computer program instructions can be transferred from one website, computer, server or data center to another website, computer, server or data center through wired or wireless manner. The computer-readable storage medium can be any available medium accessible by a computer or a data storage device such as a server, data center, etc. containing one or more available media. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a digital video disc (DVD), or a semiconductor medium (such as a solid state disk) and the like.

[0363] Those skilled in the art can understand that all or part of the steps of the above-mentioned embodiments can be completed by hardware, or by program to instruct related hardware, and the program can be stored in a computer-readable storage medium. The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.

[0364] The above description is only optional embodiments of the present application, and does not limit the present application, and any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A packet forwarding method, characterized by, The method is applied to a packet forwarding system, the packet forwarding system comprising a first forwarding node, a second forwarding node and a third forwarding node, the first forwarding node being an edge node of a sixth generation network protocol IPv6 network, the second forwarding node being located in the IPv6 network, and the third forwarding node being located in a fourth generation network protocol IPv4 network; the method comprising: The first forwarding node receives a first packet sent by the third forwarding node, the first packet being an IPv4 packet; The first forwarding node generates a second packet based on the first packet and sends the second packet to the second forwarding node, the second packet being an IPv6 packet; The first forwarding node receives a first control message sent by the second forwarding node, the first control message being an IPv6 packet, and the first control message being used to announce a forwarding condition of the second forwarding node for the second packet; When the first forwarding node determines that the second forwarding node does not have an IPv4 address, a second control message is generated based on the first control message and sent to the third forwarding node, the second control message being an IPv4 packet, and the second control message carrying an IPv6 address of the second forwarding node.

2. The method of claim 1, wherein, The first control message carries an IPv6 private network identifier, and the IPv6 private network identifier indicates that intermediate nodes in the IPv6 network are not configured with IPv4 addresses; The first forwarding node determines that the second forwarding node does not have an IPv4 address, comprising: The first forwarding node parses the first control message to obtain the IPv6 private network identifier; The first forwarding node determines that the second forwarding node does not have an IPv4 address based on the IPv6 private network identifier.

3. The method of claim 2, wherein, The first control message is an Internet Control Message Protocol (ICMP) packet; The first control message comprises a first extension object carrying the IPv6 private network identifier, or the first control message comprises a first ICMP packet header carrying the IPv6 private network identifier.

4. The method of claim 1, wherein, The first forwarding node determines that the second forwarding node does not have an IPv4 address, comprising: The first forwarding node obtains a locally stored IPv6 private network identifier, and the IPv6 private network identifier indicates that intermediate nodes in the IPv6 network are not configured with IPv4 addresses; The first forwarding node determines that the second forwarding node does not have an IPv4 address based on the IPv6 private network identifier.

5. The method according to any one of claims 1 to 4, characterized in that, The first control message carries the IPv6 address of the second forwarding node; The first forwarding node generates a second control message based on the first control message, comprising: The first forwarding node obtains the IPv6 address of the second forwarding node from the first control message to generate the second control message.

6. The method of claim 5, wherein, The first control message is an ICMP packet, and the first control message comprises a second extension object carrying the IPv6 address of the second forwarding node; The first forwarding node obtains the IPv6 address of the second forwarding node from the first control message, comprising: The first forwarding node obtains the IPv6 address of the second forwarding node from the second extension object.

7. The method of claim 5, wherein, The first control message is an Internet Control Message Protocol (ICMP) message, and the first control message comprises a second ICMP message header, which carries the IPv6 address of the second forwarding node. The first forwarding node obtains the IPv6 address of the second forwarding node from the first control message, comprising: The first forwarding node obtains the IPv6 address of the second forwarding node from the second ICMP message header.

8. The method of claim 5, wherein, The first control message comprises a first IPv6 message header, which carries the IPv6 address of the second forwarding node. The first forwarding node obtains the IPv6 address of the second forwarding node from the first control message, comprising: The first forwarding node obtains the IPv6 address of the second forwarding node from the first IPv6 message header.

9. The method of any one of claims 1-4, wherein, The first forwarding node locally stores the IPv6 address of the second forwarding node; The first forwarding node generates a second control message based on the first control message, comprising: The first forwarding node obtains the locally stored IPv6 address of the second forwarding node to generate the second control message based on the first control message and the IPv6 address of the second forwarding node.

10. The method of any one of claims 1-9, wherein, The second control message is an ICMP message. The second control message comprises a third extension object, which carries the IPv6 address of the second forwarding node, or the second control message comprises a third ICMP message header, which carries the IPv6 address of the second forwarding node.

11. The method of any one of claims 1-10, wherein, The second control message further carries an IPv6 private network identifier, which indicates that intermediate nodes in the IPv6 network are not configured with IPv4 addresses.

12. The method of claim 11, wherein, The second control message is an ICMP message. The second control message comprises a fourth extension object, which carries the IPv6 private network identifier, or the second control message comprises a fourth ICMP message header, which carries the IPv6 private network identifier.

13. The method of any one of claims 1-12, wherein, The second forwarding node satisfies one of the following two conditions: Intermediate nodes in the IPv6 network where the second forwarding node is located are not configured with IPv4 addresses. Or, the second forwarding node is configured with an IPv4 address, but the IPv4 address of the second forwarding node is not used externally.

14. The method of any one of claims 1-13, wherein, The first message and the second message both carry a time to live (TTL), and the first control message indicates that the TTL of the second message will expire when the second message reaches the second forwarding node.

15. The method of claim 14, wherein, The first message and the second message are path tracking messages.

16. A method of forwarding a packet, the method comprising: The method is applied to a packet forwarding system, the packet forwarding system comprising a first forwarding node, a second forwarding node and a third forwarding node, the first forwarding node being an edge node of an IPv6 network, the second forwarding node being located in the IPv6 network, and the third forwarding node being located in an IPv4 network; the method comprising: The third forwarding node receives a second control message sent by the first forwarding node after sending a first packet to the first forwarding node, the second control message being an IPv4 packet and the second control message carrying an IPv6 address of the second forwarding node, and the first packet being an IPv4 packet; The third forwarding node determines a forwarding condition of the first packet by the second forwarding node based on the second control message.

17. The method of claim 16, wherein, After the third forwarding node determines the forwarding condition of the first packet by the second forwarding node based on the second control message, the method further comprises: The third forwarding node parses the second control message to obtain the IPv6 address of the second forwarding node; The third forwarding node displays the IPv6 address of the second forwarding node.

18. The method of claim 16 or 17, wherein, The second control message is an ICMP packet. The second control message comprises a third extension object carrying the IPv6 address of the second forwarding node, or the second control message comprises a third ICMP packet header carrying the IPv6 address of the second forwarding node.

19. The method of any one of claims 16-18, wherein, After the third forwarding node determines the forwarding condition of the first packet by the second forwarding node based on the second control message, the method further comprises: The third forwarding node determines an IPv6 private network identifier, the IPv6 private network identifier indicating that intermediate nodes in the IPv6 network are not configured with IPv4 addresses; The third forwarding node displays the IPv6 private network identifier.

20. The method of claim 19, wherein, The third forwarding node determines an IPv6 private network identifier, comprising: The third forwarding node parses the second control message to obtain the IPv6 private network identifier.

21. The method of claim 20, wherein, The second control message is an ICMP packet. The second control message comprises a fourth extension object carrying the IPv6 private network identifier, or the second control message comprises a fourth ICMP packet header carrying the IPv6 private network identifier.

22. The method of any one of claims 16-21, wherein, The second control message indicates that a TTL of the first packet is timed out when the first packet reaches the second forwarding node.

23. The method of claim 22, wherein, The first packet is a path tracking packet.

24. A method of forwarding a packet, the method comprising: The method is applied to a packet forwarding system, the packet forwarding system comprising a first forwarding node and a second forwarding node, the first forwarding node being an edge node of an IPv6 network, and the second forwarding node being located in the IPv6 network; the method comprising: The second forwarding node receives a second packet sent by the first forwarding node, the second packet being an IPv6 packet; determining that the second forwarding node currently cannot continue to forward the second packet, and determining that the second packet has an IPv4 packet header, generating a first control message based on the second packet, the first control message indicating a forwarding condition of the second forwarding node for the second packet, and the first control message indicating that the second forwarding node does not have an IPv4 address; the second forwarding node sends the first control message to the first forwarding node.

25. The method of claim 24, wherein, the first control message carries an IPv6 private network identifier, and the IPv6 private network identifier indicates that intermediate nodes in the IPv6 network are not configured with IPv4 addresses.

26. The method of claim 25, wherein, the first control message is an Internet Control Message Protocol (ICMP) packet. the first control message includes a first extension object, and the first extension object carries the IPv6 private network identifier, or the first control message includes a first ICMP packet header, and the first ICMP packet header carries the IPv6 private network identifier.

27. The method of any one of claims 24-26, wherein, the first control message carries an IPv6 address of the second forwarding node.

28. The method of claim 27, wherein, the first control message is an Internet Control Message Protocol (ICMP) packet. the first control message includes a second extension object, and the second extension object carries the IPv6 address of the second forwarding node, or the first control message includes a second ICMP packet header, and the second ICMP packet header carries the IPv6 address of the second forwarding node.

29. The method of claim 27, wherein, the first control message includes a first IPv6 packet header, and the first IPv6 packet header carries the IPv6 address of the second forwarding node.

30. The method of any one of claims 24-29, wherein, the second forwarding node determines that the second forwarding node currently cannot continue to forward the second packet, including: when a time to live (TTL) of the second packet is 1, the second forwarding node determines that the second forwarding node currently cannot continue to forward the second packet.

31. The method of claim 30, wherein, the second packet is a path tracking packet.

32. A packet forwarding system, comprising: The packet forwarding system includes a first forwarding node, a second forwarding node, and a third forwarding node, the first forwarding node is an edge node of an Internet Protocol version 6 (IPv6) network, the second forwarding node is located in the IPv6 network, and the third forwarding node is located in an Internet Protocol version 4 (IPv4) network. The third forwarding node is configured to send a first packet to the first forwarding node, and the first packet is an IPv4 packet. The first forwarding node is configured to receive the first packet, generate a second packet based on the first packet, and send the second packet to the second forwarding node, and the second packet is an IPv6 packet. The second forwarding node is configured to receive the second packet, and in a case where it is determined that the second forwarding node currently cannot continue to forward the second packet and the second packet has an IPv4 packet header, generate a first control message based on the second packet, the first control message is an IPv6 packet, and the first control message is used to announce a forwarding condition of the second forwarding node for the second packet. The first forwarding node is further configured to: receive the first control message, generate a second control message based on the first control message when the first forwarding node determines that the second forwarding node does not have an IPv4 address, and send the second control message to the third forwarding node, wherein the second control message is an IPv4 packet, and the second control message carries an IPv6 address of the second forwarding node. The third forwarding node is further configured to: receive the second control message, and determine the forwarding condition of the second forwarding node based on the second control message.

33. A network device, comprising: The network device comprises a memory and a processor; The memory is configured to store program instructions; The processor is configured to invoke the program stored in the memory, so that the network device performs the method of any one of claims 1-15, or performs the method of any one of claims 16-23, or performs the method of any one of claims 24-31.

34. A network device, comprising: The network device comprises a transceiver module and a processing module; The transceiver module is configured to perform the transceiver-related operations in the method of any one of claims 1-15, and the processing module is configured to perform the operations in the method of any one of claims 1-15 other than the transceiver-related operations; or The transceiver module is configured to perform the transceiver-related operations in the method of any one of claims 16-23, and the processing module is configured to perform the operations in the method of any one of claims 16-23 other than the transceiver-related operations; or The transceiver module is configured to perform the transceiver-related operations in the method of any one of claims 24-31, and the processing module is configured to perform the operations in the method of any one of claims 24-31 other than the transceiver-related operations.

35. A computer readable storage medium, characterized in that, The computer readable storage medium stores instructions, and when the instructions run on the processor, the method of any one of claims 1-15 is implemented, or the method of any one of claims 16-23 is implemented, or the method of any one of claims 24-31 is implemented.

36. A computer program product, characterised in that, The computer program product comprises instructions, and when the instructions run on the processor, the method of any one of claims 1-15 is implemented, or the method of any one of claims 16-23 is implemented, or the method of any one of claims 24-31 is implemented.

Citation Information

Patent Citations

  • Method and device for building tunnels as well as network equipment

    CN102025613A

  • Method and device for transmitting multicast messages among IPv6 multicast islands

    CN103973459A