WO2024011982A1 - Message forwarding method, system, network device, storage medium and program product - Google Patents

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

Info

Publication number
WO2024011982A1
WO2024011982A1 PCT/CN2023/089293 CN2023089293W WO2024011982A1 WO 2024011982 A1 WO2024011982 A1 WO 2024011982A1 CN 2023089293 W CN2023089293 W CN 2023089293W WO 2024011982 A1 WO2024011982 A1 WO 2024011982A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
forwarding node
ipv6
control message
forwarding
Prior art date
Application number
PCT/CN2023/089293
Other languages
French (fr)
Chinese (zh)
Inventor
赵然晓
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2024011982A1 publication Critical patent/WO2024011982A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/251Translation of Internet protocol [IP] addresses between different IP versions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion

Definitions

  • the embodiments of the present application relate to the field of communication technology, and in particular to a message forwarding method, system, network device, storage medium and program product.
  • the sixth generation network protocol Internet Protocol version 6, IPv6
  • the IPv6 network includes an IPv6 dedicated (only) network.
  • Intermediate nodes other than edge nodes in the IPv6 dedicated network are only configured with IPv6 addresses and are not configured with IPv4 addresses.
  • the intermediate node in the IPv6 private network receives a message sent from the forwarding node in the IPv4 network and determines that it cannot continue to forward the message, the intermediate node in the IPv6 private network needs to send a message to the forwarding node in the IPv4 network.
  • the forwarding node announces the forwarding status of the message.
  • Embodiments of the present application provide a message forwarding method, system, network device, storage medium and program product, which can enable an intermediate node in an IPv6 private network to notify the forwarding node in an IPv4 network of message forwarding status.
  • the technical solutions are as follows:
  • a message forwarding method is provided. The method is applied to a message forwarding system.
  • the message forwarding system includes a first forwarding node, a second forwarding node and a third forwarding node.
  • the first forwarding node is an IPv6 network.
  • the edge node, the second forwarding node is located in the IPv6 network, and the third forwarding node is located in the IPv4 network.
  • the first forwarding node receives the 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, where the second message is an IPv6 message.
  • the first forwarding node receives the first control message sent by the second forwarding node.
  • the first control message is an IPv6 message, and the first control message is used to notify the second forwarding node of forwarding the second message.
  • the first forwarding node determines that the second forwarding node does not have an IPv4 address, it 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 The second control packet carries the IPv6 address of the second forwarding node.
  • 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 notify the second forwarding node to forward the first In the case of two messages, the second message is generated based on the first message from the IPv4 network. Therefore, when receiving the first control message, the first forwarding node needs to report to the sender of the first message (IPv4 network The third forwarding node in the server notifies the forwarding status of the packet.
  • the first forwarding node when the first forwarding node receives 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 forward to the third party in the IPv4 network.
  • the node sends a second control message.
  • the second forwarding node does not have an IPv4 address, in order to achieve successful forwarding to the third forwarding node in the IPv4 network,
  • the sending node notifies the packet forwarding situation of the second forwarding node in the IPv6 network.
  • the embodiment of the present 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 embodiments of this application, the intermediate node in the IPv6 network can successfully notify the forwarding node in the IPv4 network of the packet forwarding status when it does not have an IPv4 address.
  • the first control message carries an IPv6 dedicated network identifier, and the IPv6 dedicated network identifier indicates that the intermediate node in the IPv6 network is not configured with an IPv4 address.
  • the first forwarding node determines that the second forwarding node does not have an IPv4 address.
  • the implementation process is as follows: the first forwarding node parses the first control message to obtain the IPv6 dedicated network identifier; the first forwarding node determines the second forwarding node based on the IPv6 dedicated network identifier. The second forwarding node does not have an IPv4 address.
  • the second forwarding node can carry IPv6 in the first control message.
  • the IPv6 dedicated network identifier of the network so that the first forwarding node determines that the second forwarding node does not have an IPv4 address based on the IPv6 dedicated network identifier, and then uses the method provided by the embodiment of the present application to notify the third forwarding node of forwarding by the second forwarding node. The situation of the second message.
  • the first control message is a Network Control Message Protocol ICMP message.
  • the first control message includes a first extension object, and the first extension object carries an IPv6 dedicated network identifier, or the first control message includes a first ICMP header, and the first ICMP header carries an IPv6 dedicated network identifier.
  • the ICMP message when the first control message is an ICMP message, the ICMP message can be flexibly extended so that the extended ICMP message can carry the IPv6 dedicated network identifier.
  • the flexibility of the embodiment of the present application is improved.
  • the implementation process for the first forwarding node to determine that the second forwarding node does not have an IPv4 address is: the first forwarding node obtains a locally stored IPv6 dedicated network identifier, and the IPv6 dedicated The network identifier indicates that the intermediate node in the IPv6 network is not configured with an IPv4 address; the first forwarding node determines that the second forwarding node does not have an IPv4 address based on the IPv6 dedicated network identifier.
  • the first forwarding node can also be configured in advance with the IPv6 dedicated network identifier corresponding to the IPv6 network where the second forwarding node is located, so that the first forwarding node can subsequently obtain the IPv6 dedicated network identifier directly from the local storage.
  • Network identification so that the first forwarding node determines that the second forwarding node does not have an IPv4 address based on the IPv6 dedicated network identification, and then uses the method provided by the embodiment of this application to notify the third forwarding node that the second forwarding node forwards the second message. Case.
  • the flexibility of the embodiment of the present application is improved.
  • the first control message carries the IPv6 address of the second forwarding node.
  • the first forwarding node generates the second control message based on the first control message.
  • the first forwarding node obtains the IPv6 address of the second forwarding node from the first control message to generate the second control message.
  • the first forwarding node Since the second control message needs to carry the IPv6 address of the second forwarding node, the first forwarding node needs to first obtain the IPv6 address of the second forwarding node when generating the second control message.
  • 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 local storage, which improves the flexibility of the embodiment of the present application. sex.
  • the first control message is a Network Control Message Protocol ICMP message
  • the first control message includes a second extension object
  • the second extension object carries the second forwarding node IPv6 address.
  • the first forwarding node obtains the IPv6 address of the second forwarding node from the first control message.
  • the process is: the first forwarding node obtains the IPv6 address of the second forwarding node from the second extension object.
  • the first control message is a Network Control Message Protocol ICMP message
  • the first control message includes a second ICMP message header
  • the second ICMP message header carries 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 is: the first forwarding node obtains the IPv6 address of the second forwarding node from the second ICMP message header.
  • the ICMP message when the first control message is an ICMP message, the ICMP message can be flexibly extended by the above two implementation methods, so that the extended ICMP message can carry the IPv6 address of the second forwarding node. .
  • the flexibility of the embodiment of the present application is improved.
  • the first control message includes a first IPv6 header
  • the first IPv6 header carries the IPv6 address of the second forwarding node.
  • the implementation process for the first forwarding node to obtain the IPv6 address of the second forwarding node from the first control message may be: the first forwarding node obtains the IPv6 address of the second forwarding node from the first IPv6 packet header.
  • the IPv6 header of the first control message may carry the IPv6 address of the second forwarding node. Therefore, the first control message may also carry the IPv6 address of the second forwarding node without extending the first control message.
  • the flexibility of the embodiment of the present application is improved.
  • the first forwarding node locally stores 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 is: 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 second forwarding node.
  • the IPv6 address generates a second control message.
  • 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 local storage, which improves the flexibility of the embodiment of the present application. sex.
  • the second control message is a Network 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.
  • the second control message includes a third ICMP header, and the third ICMP header carries the second forwarding node. IPv6 address.
  • the second control message can be flexibly expanded so that the second control message can carry the IPv6 address of the second forwarding node, which improves the application flexibility of the embodiment of the present application.
  • the second control message also carries an IPv6 dedicated network identifier, and the IPv6 dedicated network identifier indicates that the intermediate node in the IPv6 network is not configured with an IPv4 address.
  • the second control message may further carry an IPv6 dedicated network identifier, so that the third forwarding node can learn that the second forwarding node is a node in the IPv6 dedicated network.
  • the flexibility of the embodiment of the present application is further improved.
  • the second control message is a Network Control Message Protocol ICMP message; wherein the second control message includes a fourth extension object, and the fourth extension object carries an IPv6 dedicated network identification, or the second control message includes a fourth ICMP header, and the fourth ICMP header carries the IPv6 dedicated network identification.
  • the second control message can be flexibly expanded so that the second control message can carry the IPv6 dedicated network identifier, which improves the application flexibility of the embodiment of the present application.
  • the second forwarding node satisfies one of the following two conditions: the intermediate node in the IPv6 network where the second forwarding node is located does not have an IPv4 address configured; or, the second forwarding node Forward section The node is configured with an IPv4 address, but the IPv4 address of the second forwarding node is not used externally.
  • the second forwarding node without an IPv4 address may also include a node configured with an IPv4 address but the IPv4 address is not exposed to the outside world, further improving the performance of the embodiment of the present application. application flexibility.
  • both the first message and the second message carry the time-to-live TTL, and the first control message indicates that the second message reaches the second forwarding node when the second message reaches the second forwarding node.
  • the TTL of the second packet has expired.
  • the first control message and the second control message can be used to realize that when the TTL of forwarding a message from an IPv4 network expires and the second forwarding node in the IPv6 network is unable to continue forwarding the message, Successfully notify nodes in the IPv4 network of the packet forwarding error.
  • the first message and the second message are path tracing messages.
  • the second forwarding node in the IPv6 network successfully forwards the path tracing message to the IPv4 network when determining that the TTL of the path tracing message from the IPv4 network has timed out.
  • the node advertises its own IPv6 address, so that the third forwarding node in the IPv4 network can track the IPv6 address of the second forwarding node. Improved path tracing success rate.
  • a message forwarding method is provided. The method is applied to a message forwarding system.
  • the message forwarding system includes a first forwarding node, a second forwarding node and a third forwarding node.
  • the first forwarding node is a sixth forwarding node.
  • the first generation network protocol IPv6 network is an edge node
  • the second forwarding node is located in the IPv6 network
  • the third forwarding node is located in the fourth generation network protocol IPv4 network.
  • 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 second The IPv6 address of the forwarding node, the first message is an IPv4 message; the third forwarding node determines, based on the second control message, whether the second forwarding node forwards the first message.
  • the method further includes:
  • the third forwarding node parses the second control message and obtains the IPv6 address of the second forwarding node
  • the third forwarding node displays the IPv6 address of the second forwarding node.
  • the second control message is a Network 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.
  • the second control message includes a third ICMP header, and the third ICMP header carries the IPv6 address of the second forwarding node. address.
  • the method further includes:
  • the third forwarding node determines the IPv6 dedicated network identifier, and the IPv6 dedicated network identifier indicates that the intermediate node in the IPv6 network is not configured with an IPv4 address;
  • the third forwarding node displays the IPv6 private network identification.
  • the third forwarding node determines the IPv6 private network Logo, including:
  • the third forwarding node parses the second control message to obtain the IPv6 dedicated network identifier.
  • the second control message is a Network Control Message Protocol ICMP message
  • the second control message includes a fourth extension object, and the fourth extension object carries the IPv6 dedicated network identifier.
  • the second control message includes a fourth ICMP header, and the fourth ICMP header carries the IPv6 dedicated network identifier.
  • the second control message indicates that when the first message reaches the second forwarding node, the time-to-live TTL of the first message times out.
  • the first message is a path tracing message.
  • a message forwarding method is provided. The method is applied to a message forwarding system.
  • the message forwarding system includes a first forwarding node and a second forwarding node.
  • the first forwarding node is a sixth-generation network protocol IPv6 network.
  • the edge node and the second forwarding node are located in the IPv6 network.
  • the second forwarding node receives the second message sent by the first forwarding node, and the second message is an IPv6 message;
  • the second forwarding node When the second forwarding node determines that it cannot continue to forward the second message and determines that the second message has an IPv4 header, it generates a first control message based on the second message, and the first control message instructs the second forwarding node to forward the second message.
  • the situation of two messages, and the first control message indicates 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.
  • the first control message carries an IPv6 dedicated network identifier, and the IPv6 dedicated network identifier indicates that the intermediate node in the IPv6 network is not configured with an IPv4 address.
  • the first control message is a Network Control Message Protocol ICMP message
  • the first control message includes a first extension object, and the first extension object carries an IPv6 dedicated network identifier.
  • the first control message includes a first ICMP header, and the first ICMP header carries an IPv6 dedicated network identifier.
  • the first control message carries the IPv6 address of the second forwarding node.
  • the first control message is a Network Control Message Protocol ICMP message
  • the first control message includes a second extension object, and the second extension object carries the IPv6 address of the second forwarding node.
  • the first control message includes a second ICMP header, and the second ICMP header carries the IPv6 address of the second forwarding node. address.
  • the first control message includes a first IPv6 header, and the first IPv6 header carries the IPv6 address of the second forwarding node.
  • the second forwarding node determines that it cannot continue to forward the second message currently, including:
  • the second forwarding node determines that it cannot continue to forward the second message.
  • the second message is a path tracing message.
  • a network device in a fourth aspect, includes a memory and a processor; the memory is used to store program instructions; the processor is configured to call the program stored in the memory, so that the network The device performs the method as described in the first aspect.
  • a network device in a fifth aspect, includes a memory and a processor; the memory is used to store program instructions; the processor is configured to call the program stored in the memory, so that the network The device performs the method as described in the second aspect.
  • a network device in a sixth aspect, includes a memory and a processor; the memory is used to store program instructions; the processor is configured to call the program stored in the memory, so that the network The device performs the method as described in the third aspect.
  • the network device includes a transceiver module and a processing module:
  • the transceiving module is configured to perform transceiver-related operations in the method described in the first aspect
  • the processing module is configured to perform operations other than the transceiver-related operations in the method described in the first aspect.
  • a network device which includes a transceiver module and a processing module:
  • the transceiving module is configured to perform transceiver-related operations in the method described in the second aspect
  • the processing module is configured to perform operations other than the transceiver-related operations in the method described in the second aspect.
  • a network device which includes a transceiver module and a processing module:
  • the transceiving module is configured to perform transceiver-related operations in the method described in the third aspect
  • the processing module is configured to perform operations other than the transceiver-related operations in the method described in the third aspect.
  • a computer-readable storage medium is provided. Instructions are stored in the computer-readable storage medium. When the instructions are run on a processor, the method described in the first aspect is implemented.
  • a computer-readable storage medium is provided. Instructions are stored in the computer-readable storage medium. When the instructions are run on a processor, the method described in the second aspect is implemented.
  • a computer-readable storage medium is provided. Instructions are stored in the computer-readable storage medium. When the instructions are run on a processor, the method described in the third aspect is implemented.
  • a computer program product includes instructions that, when run on a processor, implement the method described in the first aspect.
  • a fourteenth aspect provides a computer program product, which includes instructions that, when run on a processor, implement the method described in the second aspect.
  • a computer program product includes instructions that, when run on a processor, implement the method described in the third aspect.
  • Figure 1 is a schematic diagram of an IPv4 packet traversing an IPv6 network provided by an embodiment of the present application
  • Figure 2 is a schematic diagram of a path tracking process provided by an embodiment of the present application.
  • Figure 3 is a schematic diagram of another path tracking process provided by an embodiment of the present application.
  • Figure 4 is a schematic architectural diagram of a message forwarding system provided by an embodiment of the present application.
  • Figure 5 is a schematic architectural diagram of another message forwarding system provided by an embodiment of the present application.
  • Figure 6 is a flow chart of a message forwarding method provided by an embodiment of the present application.
  • Figure 7 is a schematic diagram of the format of an ICMP message provided by an embodiment of the present application.
  • Figure 8 is a schematic diagram of a tracking result provided by an embodiment of the present application.
  • Figure 9 is a schematic diagram of another path tracking process provided by an embodiment of the present application.
  • Figure 10 is a schematic structural diagram of a network device provided by an embodiment of the present application.
  • Figure 11 is a schematic structural diagram of another network device provided by an embodiment of the present application.
  • Figure 12 is a schematic structural diagram of another network device provided by an embodiment of the present application.
  • Figure 13 is a schematic architectural diagram of another message forwarding system provided by an embodiment of the present application.
  • Path tracing (traceroute) technology is a technology used to detect each forwarding node along which a packet forwarding path passes.
  • a path detection node can send multiple path tracing messages with the same destination address but different time to live (TTL), for example, 10 different path tracing messages with TTL from 1 to 10.
  • TTL time to live
  • any forwarding node in the network receives a path tracing message, it will continue to forward the path tracing message after subtracting 1 from the TTL value in the path tracing message.
  • TTL of the path tracing message received by the forwarding node is 1, an Internet Control Message Protocol (ICMP) error message is returned to the path detection node.
  • ICMP error message Carrying the IP address of the forwarding node. In this way, the path detection node can obtain the IP address of each forwarding node along the packet forwarding path, thereby achieving the purpose of path tracing.
  • ICMP Internet Control Message Protocol
  • IPv4 Internet Protocol version 4, IPv4
  • IPv4-based network control message protocol Internet control message protocol
  • ICMP IPv4-based network control message protocol
  • the ICMP error message is an IPv4 message
  • the ICMP error message carries the IPv4 address of the forwarding node, so that other nodes can learn that there is an error in forwarding the message at the forwarding node.
  • IPv6 Internet Protocol version 6, IPv6
  • FIG. 1 is a schematic diagram of an IPv4 packet traversing an IPv6 network provided by an embodiment of the present application.
  • CE is used to mark customer edge equipment
  • PE is used to mark operator edge equipment
  • P is used to mark operator intermediate equipment.
  • CE1 sends an IPv4 packet to CE2.
  • An IPv6 network passes between CE1 and CE2.
  • the packet sent by CE1 enters the IPv6 network on the PE1 node.
  • PE1 encapsulates an additional IPv6 header (abbreviated as IPv6 header in Figure 1) on the outer layer of the packet.
  • IPv6 is forwarded on the intermediate P node of the IPv6 network, and finally reaches the egress node PE2 of the IPv6 network.
  • PE2 will strip off the IPv6 packet header and send the IPv4 packet to CE2.
  • FIG. 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.
  • CE1 initiates path tracing (Traceroute) to CE2, that is, it sends multiple path tracing messages with different TTLs.
  • the path tracing message reaches PE1.
  • PE1 checks the TTL timeout and directly replies to CE1 with a TTL timeout ICMP error message.
  • the path tracing packet reaches PE1.
  • PE1 checks the TTL value and determines that forwarding can continue. Then the TTL is decremented by one (the TTL value in the IPv4 header becomes 1), and the IPv6 header is encapsulated in the outer layer of the path tracing message, and the encapsulated path tracing message is forwarded.
  • the TTL mode of the IPv6 network can be the uniform mode.
  • the TTL in the encapsulated IPv6 packet header (the TTL field in the actual IPv6 packet header is called Hop limit.
  • the Hop limit of IPv6 is also (Uniformly referred to as 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 tracing message reaches the P node.
  • the P node determines the TTL timeout based on the outer IPv6 message header and needs to reply to CE1 with a TTL timeout ICMP error message.
  • the path tracing packet reaches PE1, and PE1 determines that it needs to continue forwarding based on the TTL value. Then reduce the TTL by one (the TTL value in the IPv4 packet header becomes 3), and encapsulate the IPv6 packet header in the outer layer of the path tracing packet. The TTL in the IPv6 packet header is also 3, and the encapsulated route tracing packet is The article continues to be forwarded.
  • the path tracing message reaches the P node.
  • the P node continues to forward the path tracing message based on IPv6, and decrements the TTL of the IPv6 header in the path tracing message by 1 (updates the value to 2), and updates the path tracing message to Forward the document to PE2.
  • PE2 determines that it needs to continue forwarding. At this time, it decrements the IPv6 TTL by 1 and determines that it is the egress node of the IPv6 network, so it needs to strip off the IPv6 packet header.
  • PE2 because the TTL mode of the IPv6 network where PE2 is located is configured as Uniform mode, PE2 writes the TTL value of the IPv6 header in the path tracing packet to the IPv4 header.
  • TTL that is, at this time, PE2 strips off the IPv6 header in the received path tracing packet, updates the TTL in the IPv4 packet header to 1, and sends the processed path tracing packet to CE2.
  • CE2 After CE2 receives the path tracing message, it determines that the TTL is 1. Since the destination address of the path tracing message is CE2, that is, the path tracing message has reached the destination. At this time, CE2 will perform other processing on the path tracing message. (This application embodiment will not describe this in detail).
  • CE2 replies to CE1 with an ICMP error message indicating that the port is unreachable. After CE1 receives the message from CE2, since CE2 is the destination of path tracing, the path tracing process ends. .
  • CE1 sends a path tracing message with a TTL of 2 to PE1.
  • the path tracing message includes an IPv4 header and a payload.
  • the IPv4 header carries the source address (SA) 1.1.1.1 and The destination address (DA) is 2.2.2.2, and the TTL in the IPv4 header is 2.
  • PE1 reduces the TTL in the IPv4 header of the path tracing message to 1, and encapsulates the IPv6 header in the outer layer (abbreviated as IPv6 header in Figure 3), and the IPv6 message
  • the TTL of the header is also set to 1, and the processed path tracing message continues to be forwarded to the P node.
  • the P node When the P node receives the path tracing message, it determines that the TTL in the IPv6 header has expired, and the P node determines that the received path tracing message includes the IPv4 header, so the P node responds with the ICMP TTL expired message.
  • the error message carries the IPv4 address of the P node 100.1.1.2, and the ICMP error message is sent to CE1 through PE1.
  • the IPv4 address 100.1.1.2 of the P node is carried in the ICMP header of the ICMP error message (abbreviated as ICMP header in Figure 3).
  • the forwarding node in the IPv6 private network receives a message from a forwarding node in the IPv4 network and determines that the TTL of the message is 1, due to The forwarding node is only configured with an IPv6 address and not an IPv4 address.
  • the forwarding node in the IPv6 private network has two processing methods. One is: the forwarding node directly discards the message and does not send an IPv4-based ICMP error message to the forwarding node in the IPv4 network. The other is: the forwarding node sends an IPv6-based ICMP error message to the edge node of the IPv6 private network.
  • the IPv6-based ICMP error message carries the IPv6 address of the forwarding node, and the edge node receives the IPv6-based ICMP error message.
  • the error message needs to be forwarded to the forwarding node in the IPv4 network.
  • the edge node since the edge node receives an IPv6-based ICMP error message and the network that needs to be advertised is an IPv4 network, the edge node will also discard the IPv6-based ICMP error message at this time. Both of these processing methods will cause the forwarding node in the IPv4 network to be unable to detect errors in forwarding the packet in the IPv6 private network.
  • embodiments of this application provide a message forwarding method.
  • this method can realize the forwarding node in the IPv6 private network to notify the node in the IPv4 network of the packet forwarding situation.
  • this method can also be used to advertise packets to nodes in the IPv4 network. Forwarding status.
  • Figure 4 is a schematic architectural diagram of a message forwarding system provided by an embodiment of the present application.
  • the message 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.
  • the first forwarding node 401 is an edge node of the IPv6 network
  • the second forwarding node 402 is located in the IPv6 network
  • the third forwarding node 403 is located in the IPv4 network.
  • the second forwarding node 402 located in the IPv6 network can be understood as: 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 forwarding nodes in other networks, and the intermediate nodes only communicate with forwarding nodes in the same network.
  • the third forwarding node 403 is located in the IPv4 network: the third forwarding node 403 is an intermediate node of the IPv4 network.
  • the IPv6 network may be an IPv6 dedicated network.
  • the intermediate nodes in the IPv6 private network only have IPv6 addresses and do not have IPv4 addresses.
  • Edge nodes in IPv6 private networks have both IPv4 addresses and IPv6 addresses.
  • the intermediate node does not have an IPv4 address may mean that when the IP address is allocated, the IPv4 address is not configured for the intermediate node. In this case, the intermediate node naturally does not have an IPv4 address. In other words, for the intermediate node in the IPv6 private network, the IPv4 address is not configured for the intermediate node.
  • the forwarding node does not have an IPv4 address.
  • it may also include another situation. This situation is: the forwarding node is configured with an IPv4 address, but the IPv4 address is not used externally in some scenarios, that is, the IPv4 address is not exposed on the network.
  • nodes in the message forwarding system shown in Figure 4 are used for illustration.
  • the message forwarding system may also include other nodes, and examples will not be given one by one here.
  • FIG 5 is a schematic architectural diagram of another message forwarding system provided by an embodiment of the present application. As shown in Figure 5, the message forwarding system includes five forwarding nodes, which are marked CE1, PE1, P, PE2, and CE2 in Figure 5.
  • CE1 and CE2 are located in the IPv4 network, PE1 and PE2 are edge nodes of the IPv6 private network, and P is the intermediate node of the IPv6 private network. Based on this, CE1 communicates with PE1, PE1 and PE2 communicate with P respectively, and PE2 communicates with CE2.
  • the first forwarding node 401 in Figure 4 can be PE1 in Figure 5
  • the second forwarding node 402 can be P in Figure 5
  • the third forwarding node 403 can be CE1 in Figure 5
  • the first forwarding node 401 in Figure 4 may be PE2 in Figure 5
  • the second forwarding node 402 may be P in Figure 5
  • the third forwarding node 403 may be CE2 in Figure 5.
  • the forwarding node involved in the embodiment of this application may be a network element with network layer functions, such as a router, a layer 3 switch, etc. No more examples will be given here.
  • Figure 6 is a flow chart of a message forwarding method provided by an embodiment of the present application. As shown in Figure 6, the message forwarding method includes the following steps.
  • Step 601 The third forwarding node sends a first message to the first forwarding node, and the first message is an IPv4 message.
  • the third forwarding node is located in the IPv4 network, and the first forwarding node is an edge node of the IPv6 network.
  • the first message may be a service message in the service flow, or may be a path tracing message in a path tracing scenario.
  • the first message is an IPv4 message, which can be understood as: the first message includes an IPv4 header and a payload.
  • the IPv4 header carries the source address and destination address corresponding to the payload.
  • the source address and destination address are both IPv4 addresses.
  • the first message is a message that needs to be sent to the IPv4 network.
  • the source address corresponding to the payload can be understood as the address of the communication end that generates 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.
  • the first forwarding node is an edge node of the IPv6 network
  • the first packet is a packet that needs to be sent to the IPv4 network across the IPv6 network.
  • the third forwarding node is CE1 and the first forwarding node is PE1.
  • the first message is a message sent by CE1 to CE2.
  • the source address corresponding to the payload in the first message is the IPv4 address of CE1
  • the destination address corresponding to the payload is the IPv4 address corresponding to CE2.
  • This message needs to be sent to CE2 through PE1, so when CE1 determines the first message, CE1 sends the first message to PE1.
  • 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.
  • the first forwarding node Since the first message is an IPv4 message, and the first forwarding node is an edge node of the IPv6 network, when receiving the first message, the first forwarding node needs to send the first message to the third node in the IPv6 network. Two forwarding nodes, to send the first message to the destination in the IPv4 network through the second forwarding node.
  • the first packet may only include an IPv4 packet header and a payload.
  • the source address and destination address carried by the IPv4 packet header are the source address and destination address corresponding to the payload respectively.
  • the implementation process of the first forwarding node generating the second message based on the first message may be: the first forwarding node encapsulates the IPv6 header in the outer layer of the first message to obtain the second message.
  • the source address carried in the IPv6 packet header is the IPv6 address of the first forwarding node
  • the destination address carried in the IPv6 packet header is the IPv6 address of another forwarding node in the IPv6 network.
  • the first forwarding node searches the forwarding table based on the destination address in the IPv6 message header to obtain the outbound interface (that is, the next hop interface) for forwarding the second message.
  • the next hop interface is between the first forwarding node and the second forwarding node. An interface for communication, 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.
  • the third forwarding node is CE1 and the first forwarding node is PE1.
  • the first message is a message sent by CE1 to CE2.
  • the source address of the IPv6 header in the second message generated based on the first message is the IPv6 address of PE1
  • the destination address is the IPv6 address of PE2.
  • the first forwarding node searches the forwarding table based on the IPv6 address of PE2 in the IPv6 packet header to obtain the next hop interface.
  • the next hop interface is the interface on PE1 that communicates with P.
  • PE1 passes the second packet through the found
  • the next hop interface is used to send the second message to P, and then to PE2 through P.
  • the first message may include an outer IPv4 message header, an inner IPv4 message header and a payload.
  • the source address and destination address carried by the inner IPv4 message header are respectively corresponding to the payload.
  • the source address and destination address carried in the outer IPv4 packet header are respectively the addresses of other nodes on the packet forwarding path.
  • the source address and destination address carried in the outer IPv4 packet header can be the source address and destination address of the VPN tunnel in the VPN network. Destination address.
  • the implementation process for the first forwarding node to generate the second message based on the first message can be as follows: the first forwarding node peels off the outer IPv4 header of the first message, and then sends the inner IPv4 message The outer layer of the header and payload encapsulates the IPv6 message header to obtain the second message.
  • the source address and destination address carried in the IPv6 packet header please refer to the previous paragraph and will not be repeated here.
  • the second message is generated based on the first message. It can be understood that the second message includes the payload in the first message and the IPv4 header carrying the source address and destination address corresponding to the payload.
  • Step 603 The second forwarding node receives the second message, and generates the first control based on the second message after determining that it cannot continue to forward the second message and the second message has an IPv4 message header. message, and sends a first control message to the first forwarding node, where the first control message is an IPv6 message, and the first control message is used to notify the second forwarding node of forwarding the second message.
  • the second forwarding node may generate a notification for the second message.
  • the message forwarding situation is a control message, and sends the first control message to the sender of the second message.
  • the implementation process by which the second forwarding node determines that it cannot continue to forward the second message may be: when the TTL of the second message is 1, the second forwarding node determines that it cannot continue to forward the second message.
  • the first message and the second message are both path tracing messages.
  • the second forwarding node may also determine that it cannot continue to forward the second message in other scenarios. For example, if the data size of the second message exceeds the forwarding capability of the second forwarding node, the second forwarding node may also generate a first control message to notify the second forwarding node of forwarding the second message.
  • the embodiments of this application will not give examples one by one for various scenarios in which the second forwarding node is currently unable to continue forwarding the second message.
  • the implementation process of the second forwarding node generating the first control message based on the second message may be: the second forwarding node uses all or part of the second message as the first control message to be generated. payload, and then generates a first control message based on the determined payload.
  • the first forwarding node parses the payload of the first control message and determines that the first control message is a control message for the second message, that is, it learns the first control message. The message is used to notify the forwarding status of the second message.
  • the second forwarding node may also generate the first control message based on the second message through other methods.
  • the embodiments of this application will not be explained one by one here.
  • the second forwarding node may generate a first control message through Internet Control Message Protocol (ICMP) to notify the second forwarding node of the packet forwarding status through ICMP.
  • ICMP Internet Control Message Protocol
  • the first control message is an ICMP message, which may be an ICMP error message, for example.
  • the format of the ICMP message will be explained in detail later, so we will not go into it here.
  • the second forwarding node may also generate the first control message through other protocols to notify the second forwarding node of the packet forwarding status.
  • the embodiments of the present application will not be described one by one here.
  • the first control message will be explained in detail below.
  • the first control message carries the IPv6 dedicated network identifier.
  • the second forwarding node can carry IPv6 in the first control message.
  • the IPv6 dedicated network identifier of the network so that the first forwarding node determines that the second forwarding node does not have an IPv4 address based on the IPv6 dedicated network identifier, and then uses the method provided by the embodiment of the present application to notify the third forwarding node of forwarding by the second forwarding node. The situation of the second message.
  • the IPv6 dedicated network identifier is used to identify the IPv6 network where the second forwarding node is located as an IPv6 dedicated network. That is, the IPv6 dedicated network identifier is used to indicate that the intermediate node in the IPv6 network where the second forwarding node is located is not configured with an IPv4 address.
  • the following takes the first control message as an ICMP message as an example to illustrate how the first control message carries the IPv6 dedicated network identifier.
  • FIG. 7 is a schematic diagram of the format of an ICMP message provided by an embodiment of the present application.
  • the ICMP message usually includes an IP header (abbreviated as IP header in Figure 7), an ICMP message header (abbreviated as ICMP header in Figure 7) and ICMP data.
  • the IP header is an IPv4 header or an IPv6 header
  • the IPv4 header or IPv6 header carries the destination address and source address to guide the forwarding of ICMP messages.
  • the ICMP header includes the checksum of the entire ICMP data.
  • the ICMP message header may also include a checksum of the source address, destination address, and next message header fields in the IP message header.
  • the packet content field in the ICMP message header usually also includes the source address and destination address.
  • the source address in the ICMP message header is the address of the node that generated the ICMP message
  • the destination address in the ICMP message header is The address of the node that needs to be advertised in the ICMP message.
  • ICMP data is used to carry the payload of ICMP messages.
  • an extension data structure (extension data structure) can also be added at the end of the ICMP data.
  • the extended data structure includes an extended message header (abbreviated as extension header in Figure 7) and a variable number of extended objects to extend the functions of the ICMP message.
  • the first control message is an ICMP message
  • the first control message includes a first extension object
  • the first extension object carries an IPv6 dedicated network identifier
  • the IPv6 dedicated network identifier can be carried by the first extension object added at the end of the payload of the ICMP message.
  • FIG. 7 also shows a schematic format diagram of an extension object provided by an embodiment of the present application.
  • the extended object includes a length field, an object identification field, an object type field, an incoming interface index field, an incoming interface address field, etc.
  • the object identification field in the first extension object can be used to carry the IPv6 dedicated network identification.
  • the IPv6 dedicated network identifier can also be carried through other fields in the first extension object, which will not be explained one by one here.
  • each field in the first extension object please refer to RFC4884.
  • the first control message is a Network Control Message Protocol ICMP message
  • the first control message includes a first ICMP header
  • the first ICMP header carries an IPv6 dedicated network identifier
  • the IPv6 dedicated network identifier may not be carried in the first extension object added at the end of the payload of the ICMP message, but instead the field in the ICMP message header may be Extended to carry IPv6 private network identities.
  • the type field or code field in the first ICMP message header can be extended so that the type field or code field can carry the IPv6 dedicated network identifier.
  • IPv6 dedicated network identifier can also be carried through other fields in the first ICMP message header, which will not be explained one by one here.
  • the first control message carries the IPv6 address of the second forwarding node.
  • the second forwarding node may also carry The IPv6 address of the second forwarding node.
  • the first control message is an ICMP message
  • the first control message includes a second extension object
  • the second extension object carries the IPv6 address of the second forwarding node.
  • the IPv6 address of the second forwarding node can be carried through a second extension object added at the end of the payload of the ICMP message.
  • the IPv6 address of the second forwarding node can be carried through the incoming interface address field in the second extension object.
  • the IPv6 address of the second forwarding node can also be carried through other fields in the second extension object, which will not be explained one by one here.
  • the second extension object and the aforementioned first extension object may be the same extension object, or they may be different extension objects.
  • the embodiments of the present application are not limited to this.
  • the first control message is an ICMP message
  • the first control message includes a second ICMP message header
  • the second ICMP message header carries the IPv6 address of the second forwarding node
  • the second extension object may not be added at the end of the payload of the ICMP message to carry the IPv6 address of the second forwarding node, but the IPv6 address of the second forwarding node may be carried in the header of the ICMP message.
  • the fields in are extended to carry the IPv6 address of the second forwarding node.
  • the packet content field in the first ICMP message header can be extended so that the field can carry the IPv6 address of the second forwarding node.
  • the IPv6 address of the second forwarding node may also be carried through other fields in the second ICMP message header, which will not be explained one by one here.
  • the first control message when the first control message is an ICMP message, the first control message includes the first IPv6 header, and the source address carried in the first IPv6 header is the IPv6 address of the second forwarding node. Based on this, in other embodiments, the ICMP message may not be extended. In this case, when the second forwarding node determines that it cannot continue to forward the second message, it may generate the third ICMP message without extending the message. A control message.
  • the various options in which the first control message carries the IPv6 dedicated network identifier can be used in combination with the various options in which the first control message carries the IPv6 address of the second forwarding node.
  • the first control message includes the extended object shown in Figure 7, the IPv6 dedicated network identifier is carried through the object identification field in the extended object, and the IPv6 address of the second forwarding node is carried through the incoming interface address field in the extended object.
  • Other combination schemes will not be explained one by one here.
  • the first control message may not carry the IPv6 dedicated network identifier, but may only carry the IPv6 address of the second forwarding node through any of the above solutions.
  • the first control message may not carry the IPv6 dedicated network identifier, but may only carry the IPv6 address of the second forwarding node through any of the above solutions.
  • no examples will be given one by one.
  • Step 604 The first forwarding node receives the first control message.
  • the first forwarding node determines that the second forwarding node does not have an IPv4 address, it 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.
  • the first forwarding node when receiving the first control message, the first forwarding node needs to The third forwarding node, the sender of the first message, announces the forwarding status of the 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 to send the second control message to the third forwarding node. And in order to notify the third forwarding node that the second forwarding node forwards the message, the second control message needs to carry the IPv6 address of the second forwarding node.
  • the third forwarding node is a node in the IPv4 network
  • the second control message needs to be an IPv4 message, so that the second control message can be sent to the third forwarding node. Therefore, the embodiment of the present application provides a solution that 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 notification of the IPv6 address to the third forwarding node in the opposite IPv4 network.
  • the second forwarding node forwards the message.
  • the first forwarding node first determines whether the second forwarding node has an IPv4 address. If it has an IPv4 address, it can directly notify the third forwarding node based on the IPv4 address.
  • the first forwarding node determines that the second forwarding node does not have an IPv4 address
  • the first forwarding node 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 through the method provided in the embodiment of the present application, so as to implement the second control message in the IPv4 message format.
  • the control message carries the IPv6 address of the second forwarding node.
  • the first control message carries an IPv6 dedicated network identifier
  • the IPv6 dedicated network identifier indicates that the intermediate node in the IPv6 network where the second forwarding node is located does not have an IPv4 address configured, that is, the second forwarding node
  • the IPv6 network where the forwarding node is located is an IPv6 dedicated network, so the first forwarding node can determine that the second forwarding node does not have an IPv4 address through the IPv6 dedicated network identifier.
  • the implementation process of the first forwarding node determining that the second forwarding node does not have an IPv4 address may be: the first forwarding node parses the first control message to obtain the IPv6 dedicated network identifier; the first forwarding node determines the second forwarding node based on the IPv6 dedicated network identifier. The second forwarding node does not have an IPv4 address.
  • the detailed implementation method of the first forwarding node parsing the first control message to obtain the IPv6 dedicated network identifier is related to how the first control message carries the IPv6 dedicated network identifier.
  • the following two scenarios are used as examples.
  • the parsing process in other scenarios can also refer to the following examples, and will not be explained one by one.
  • the first forwarding node can obtain the IPv6 by parsing the first extension object. Private network identifier.
  • the first forwarding node may parse the first An ICMP header obtains the IPv6 private network identification.
  • the network administrator may configure the first forwarding node in advance with an IPv6 dedicated network identifier corresponding to the IPv6 network where the second forwarding node is located.
  • the implementation process for the first forwarding node to determine that the second forwarding node does not have an IPv4 address may be: the first forwarding node obtains a locally stored IPv6 dedicated network identifier, and the IPv6 dedicated network identifier indicates the IPv6 address where the second forwarding node is located.
  • the intermediate node in the network is not configured with 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 dedicated network identifier.
  • the implementation method for the first forwarding node to obtain the locally stored IPv6 dedicated network identifier may 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 network prefix corresponding to the IPv6 network identifier from the local storage.
  • the IPv6 dedicated network identifier corresponding to the network prefix may 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 network prefix corresponding to the IPv6 network identifier from the local storage.
  • the IPv6 dedicated network identifier corresponding to the network prefix may 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 network prefix corresponding to the IPv6 network identifier from the local storage.
  • 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 may be: the first forwarding node parses the source address in the IPv6 header of the first control message. , the source address 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.
  • the network prefix is a network number that uniquely identifies a network. Therefore, when the network administrator configures the IPv6 dedicated network identifier corresponding to the IPv6 network where the second forwarding node is located on the first forwarding node, the network prefix of the IPv6 network and the IPv6 Correspondence between dedicated network identifiers, so that the first forwarding node can subsequently find the IPv6 dedicated network identifier based on the network prefix index.
  • the second forwarding node is configured with an IPv4 address, but when generating the first control message, the second forwarding node is unwilling to expose the IPv4 address to the network for some reasons.
  • the first control message does not carry the IPv4 address of the second forwarding node.
  • the first forwarding node receives the first control message, the first control message does not carry the IPv6 dedicated network identifier, and the first forwarding node does not obtain the IPv6 dedicated network identifier from local storage.
  • the first forwarding node may also determine that the second forwarding node does not have an IPv4 address.
  • the first forwarding node determines that the second forwarding node that does not have 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.
  • the second control message in order to notify the third forwarding node that the second forwarding node forwards the packet, the second control message needs to carry the IPv6 address of the second forwarding node. Based on this, before generating the second control message, the first forwarding node needs to obtain the IPv6 address of the second forwarding node.
  • 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.
  • the implementation process of the first forwarding node generating the second control message based on the first control message may be: the first forwarding node generates the second control message from the first forwarding node. Obtain the IPv6 address of the second forwarding node from the control message to generate the second control message.
  • the implementation manner in which the first forwarding node obtains 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 used as examples.
  • the acquisition process in other scenarios can also refer to the following examples, and will not be explained one by one.
  • the first forwarding node obtains the IPv6 address from the first control message.
  • the implementation process of obtaining the IPv6 address of the second forwarding node may be: the first forwarding node obtains the IPv6 address of the second forwarding node from the second extension object.
  • the first forwarding node can obtain the IPv6 address of the second forwarding node from the incoming interface address field of the second extension object.
  • the first forwarding node obtains the IPv6 address of the second forwarding node from the second ICMP message header.
  • the first forwarding node may obtain the IPv6 address of the second forwarding node from the packet content field of the second ICMP message header.
  • the first forwarding node obtains the second forwarding node from the first control message.
  • the IPv6 address is implemented as follows: the first forwarding node obtains the IPv6 address of the second forwarding node from the first IPv6 message header.
  • the source address of the first IPv6 message header is the IPv6 address of the second forwarding node.
  • the network administrator may configure the IPv6 address of the second forwarding node on the first forwarding node in advance, that is, the first forwarding node locally stores 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 is: 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 second forwarding node.
  • the IPv6 address generates a second control message.
  • the network administrator configures the IPv6 address of the second forwarding node on the first forwarding node
  • the network administrator can establish a corresponding relationship between the IPv6 address of the second forwarding node and the incoming interface. interface, the IPv6 address of the second forwarding node can be indexed from local storage.
  • the first forwarding node may also obtain the stored IPv6 address of the second forwarding node through other methods, which is not limited in this embodiment of the present application.
  • the second control message in order to notify the third forwarding node that the second forwarding node forwards the packet, the second control message needs to carry the IPv6 address of the second forwarding node.
  • the following implementation methods may be used to carry the IPv6 address of the second forwarding node in the second control message.
  • the second control message is an ICMP message
  • the second control message includes a third extension object
  • the third extension object carries the IPv6 address of the second forwarding node.
  • the second control message is a Network Control Message Protocol ICMP message
  • the first control message includes a third ICMP header
  • the third ICMP header carries the IPv6 address of the second forwarding node.
  • the first control message since the first control message includes the first IPv6 packet header, the first control message may also carry the IPv6 address of the second forwarding node in the first IPv6 packet header.
  • the second control message is an IPv4 message, so the second control message does not include an IPv6 header. Therefore, the second control message needs to carry the IPv6 of the second forwarding node through an extended object or an extended ICMP header or other extension methods. address.
  • the second control message may also carry an IPv6 dedicated network identifier, and the IPv6 dedicated network identifier indicates the IPv6 network where the second forwarding node is located.
  • the intermediate nodes in are not configured with IPv4 addresses.
  • the second forwarding node can carry the IPv6 dedicated network identifier in the following ways.
  • the second control message is an ICMP message
  • the second control message includes a fourth extension object
  • the fourth extension object carries the IPv6 dedicated network identifier
  • the second control message is an ICMP message
  • the second control message includes a fourth ICMP header
  • the fourth ICMP header carries the IPv6 dedicated network identifier
  • IPv6 dedicated network identifier For a specific implementation method of carrying the IPv6 dedicated network identifier in the second control message, please refer to the implementation method of carrying the IPv6 dedicated network identifier in the first control message through an extension object or an ICMP message header, which will not be described again here.
  • the above description takes the second control message as an ICMP message as an example to illustrate how the second control message carries the IPv6 address and IPv6 dedicated network identifier of the second forwarding node.
  • the second control message under other protocols can also be extended so that the second control message carries the IPv6 address and IPv6 dedicated network identifier of the second forwarding node. This is also not explained in detail.
  • Step 605 The third forwarding node receives the second control message, and determines whether the second forwarding node forwards the first message based on the second control message.
  • the third forwarding node After the third forwarding node sends the first message to the first forwarding node, based on the aforementioned steps 602 to 604, the third forwarding node will receive the second control message sent by the first forwarding node. Based on step 604, it can be seen that the second control message is an IPv4 message and the second control message carries the IPv6 address of the second forwarding node.
  • the third forwarding node 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, it can know that it is the second forwarding node based on the IPv6 address of the second forwarding node.
  • the first forwarding node is triggered to send the second control message to notify the second forwarding node of forwarding the first message through the first forwarding node.
  • the second control message indicates that when the first packet reaches the second forwarding node, the TTL of the first packet expires. That is, the second control message is used to notify the second forwarding node that there is an error in forwarding the first message, and the cause of the error is that the TTL of the first message has expired.
  • the first message is a path tracing message.
  • the third forwarding node sends a path tracing message to the first forwarding node, when the third forwarding node receives the second control message, it will 2.
  • the IPv6 address of the second forwarding node can determine that the TTL in the path tracing message is 1 when the path tracing message is transmitted to the second forwarding node, so the second forwarding node cannot continue to forward the path tracing message. That is, based on the IPv6 address of the second forwarding node carried in the second control message, it can be determined that the second forwarding node cannot continue to forward the first message.
  • the third forwarding node determines the situation of the second forwarding node forwarding the first message based on the second control message in order to facilitate the network administrator to timely understand the situation of the second forwarding node forwarding the first message
  • the third forwarding node also The second control message can be further parsed to obtain the IPv6 address of the second forwarding node; and then the third forwarding node displays the IPv6 address of the second forwarding node.
  • the third forwarding node when displaying the IPv6 address of the second forwarding node, may also display the value of the initial TTL of the first packet sent by the third forwarding node. This allows the network administrator to determine the node traced by the path tracing packet with this TTL value.
  • CE1 can display the tracking results shown in Figure 8 in the path tracing scenario.
  • the destination address of path tracing is the IPv4 address 2.2.2.2 of CE2 (shown as tracert 2.2.2.2 in Figure 8). That is, the destination address of the payload in all first messages (ie, path tracing messages) initiated by CE1 is 2.2.2.2.
  • the tracked node is PE1, so the IPv4 address of PE1 is 100.1.1.1.
  • the three 1 milliseconds (ms) in the second line in Figure 8 indicate that CE1 sent three first messages with a TTL of 1 respectively. Each 1ms indicates the time between sending the corresponding first message and receiving the second control message. of duration.
  • the tracked node is P, so P's IPv6 address A2::2 is displayed.
  • the three 1 milliseconds (ms) in the third row in Figure 8 also indicate that CE1 sent three first messages with a TTL of 2 respectively.
  • the IPv6 network where P is located in Figure 5 is an SRv6 network, so the IPv6 address of P is the segment identity (SID) assigned to it by the SRv6 network, and the SID is A2::2.
  • the specific implementation manner in which the third forwarding node parses 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.
  • the relevant content of the second control message in step 604 please refer to the relevant content of the second control message in step 604, which will not be described again here.
  • the third forwarding node may display a prompt. Information, this prompt information is used when the currently tracked second forwarding node is a node in the IPv6 network.
  • the third forwarding node determines the forwarding by the first forwarding node based on the second control message. After the first message is received, the third forwarding node can further determine the IPv6 dedicated network identifier of the IPv6 network.
  • the IPv6 dedicated network identifier indicates that the intermediate node in the IPv6 network where the second forwarding node is located configures an IPv4 address; then the third forwarding node The node displays the IPv6 private network identification.
  • the implementation process of the third forwarding node determining the IPv6 dedicated network identifier of the IPv6 network may be: the third forwarding node parses the second control message to obtain the IPv6 dedicated network identifier. That is, the third forwarding node obtains the IPv6 dedicated network identifier from the second control message.
  • the specific implementation manner in which the third forwarding node parses the second control message to obtain the IPv6 dedicated network identifier is related to the manner in which the second control message carries the IPv6 dedicated network identifier. For details, please refer to the relevant content of the second control message in step 604, which will not be described again here.
  • the third forwarding node may also obtain the IPv6 dedicated network identifier from local storage.
  • the process of the first forwarding node obtaining the IPv6 dedicated network identifier from local storage which will not be described again here.
  • 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 notify the third The second forwarding node forwards the second message, and the second message is generated based on the first message from the IPv4 network. Therefore, when receiving the first control message, the first forwarding node needs to send a message to the first message.
  • the sender (the third forwarding node in the IPv4 network) announces the forwarding status of the packet.
  • the first forwarding node when the first forwarding node receives 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 forward to the third party in the IPv4 network.
  • the node sends a second control message.
  • the embodiment of the present 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 embodiments of this application, the intermediate node in the IPv6 network can successfully notify the forwarding node in the IPv4 network of the packet forwarding status when it does not have an IPv4 address.
  • steps 601 to 605 in the embodiment shown in FIG. 6 can be combined based on requirements, and this embodiment of the present application will not illustrate this one by one.
  • FIG. 9 is an example solution of various optional solutions in FIG. 6 and does not constitute a limitation to the solution provided by the embodiment of the present application.
  • the path tracing process includes the following steps.
  • CE1 sends a path tracing message with a TTL of 2 to PE1.
  • the path tracing message includes an IPv4 header and a payload.
  • the IPv4 header carries the source address (SA) 1.1.1.1 and the destination address (DA). 2.2.2.2, and the TTL in the IPv4 header is 2.
  • PE1 After receiving the path tracing message, PE1 reduces the TTL in the IPv4 header of the path tracing message to 1, and encapsulates the IPv6 header in the outer layer (abbreviated as IPv6 header in Figure 9), and The TTL (actually Hop) of the IPv6 packet header is also set to 1, and the processed path tracing packet continues to be forwarded to P.
  • the ICMP error message generated by P directly uses the received path tracing message as ICMP data (that is, the payload of the ICMP error message), and then adds an extension object at the end of the ICMP data and adds the
  • the outer layer of the data is obtained by sequentially adding an ICMP header (abbreviated as ICMP header in Figure 9) and an IPv6 message header (abbreviated as IPv6 header in Figure 9).
  • the extension object carries the IPv6 dedicated network identifier and the IPv6 address of P.
  • the IPv6 network where P is located in Figure 9 is an SRv6 network, so the IPv6 address of P is the segment identity (SID) assigned to it by the SRv6 network, and the SID is A2::2.
  • the ICMP header in the ICMP error message generated by P can be used to indicate that the current IPv6 network forwarding error occurs.
  • the ICMP header in the ICMP error message generated by P can also be called an ICMPv6 header.
  • PE1 When PE1 receives the ICMP error message sent by P, it peels off the outer IPv6 header of the ICMP error message and the IPv6 header in the ICMP data, and then removes the remaining IPv4 header and payload. As new ICMP data, the ICMP error message (that is, the second control message) is reconstructed based on the new ICMP data and extended object, and will be re-constructed. The constructed ICMP error message is sent to CE1.
  • the ICMP header in the reconstructed ICMP error message can be used to indicate IPv4 network errors.
  • the ICMP header in the ICMP error message reconstructed by PE1 can also be called an ICMPv4 header.
  • CE1 When CE1 receives the ICMP error message reconstructed by PE1, it obtains the IPv6 address of the P node based on the extended object in the received ICMP error message, thereby tracking the IPv6 address of the P node when the TTL is 2.
  • Figure 10 is a schematic structural diagram of a network device provided by an embodiment of the present application.
  • the network device is any forwarding node in the message forwarding system shown in Figure 4, such as the first forwarding node or the second forwarding node or the third forwarding node. forwarding node.
  • the network device 1000 includes a transceiver module 1001 and a processing module 1002.
  • the transceiver module 1002 is used to perform transceiver-related operations in the embodiment of FIG. 6; the processing module 1001 is used to perform operations other than transceiver-related operations in the embodiment of FIG. 6.
  • the specific functions of the transceiver module 1001 and the processing module 1002 are as follows.
  • the transceiver module 1001 is configured to receive the first message sent by the third forwarding node, where the first message is an IPv4 message.
  • the first message is an IPv4 message.
  • the first message is an IPv4 message.
  • the processing module 1002 is configured to generate a second message based on the first message, and send the second message to the second forwarding node, where the second message is an IPv6 message.
  • the second message is an IPv6 message.
  • the transceiver module 1001 is configured to receive a first control message sent by the second forwarding node, where the first control message is an IPv6 message, and the first control message is used to notify the second forwarding node of forwarding the second message.
  • the first control message is an IPv6 message
  • the first control message is used to notify the second forwarding node of forwarding the second message.
  • 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.
  • 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 transceiver module 1001 is configured to send a second control message to the third forwarding node, where the second control message is an IPv4 message, and the second control message carries the IPv6 address of the second forwarding node.
  • the second control message is an IPv4 message
  • the second control message carries the IPv6 address of the second forwarding node.
  • the first control message carries an IPv6 dedicated network identifier, and the IPv6 dedicated network identifier indicates that the intermediate node in the IPv6 network is not configured with an IPv4 address;
  • the processing module 1002 is used for:
  • the first control message is a Network Control Message Protocol ICMP message
  • the first control message includes a first extension object, and the first extension object carries an IPv6 dedicated network identifier.
  • the first control message includes a first ICMP header, and the first ICMP header carries an IPv6 dedicated network identifier.
  • processing module 1002 is used for:
  • the IPv6 dedicated network identifier indicates that the intermediate node in the IPv6 network is not configured with an IPv4 address;
  • the first control message carries the IPv6 address of the second forwarding node
  • the processing module 1002 is used for:
  • the first control message is a Network Control Message Protocol ICMP message
  • the first control message includes a second extension object
  • the second extension object carries the IPv6 address of the second forwarding node
  • the processing module 1002 is used for:
  • the first control message is a Network Control Message Protocol ICMP message
  • the first control message includes a second ICMP message header
  • the second ICMP message header carries the IPv6 address of the second forwarding node
  • the processing module 1002 is used for:
  • the first control message includes a first IPv6 header, and the first IPv6 header carries the IPv6 address of the second forwarding node;
  • the processing module 1002 is used for:
  • the first forwarding node locally stores the IPv6 address of the second forwarding node
  • the processing module 1002 is used for:
  • the second control message is a Network 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.
  • the second control message includes a third ICMP header, and the third ICMP header carries the IPv6 address of the second forwarding node. address.
  • the second control message also carries an IPv6 dedicated network identifier, and the IPv6 dedicated network identifier indicates that the intermediate node in the IPv6 network is not configured with an IPv4 address.
  • the second control message is a Network Control Message Protocol ICMP message
  • the second control message includes a fourth extension object, and the fourth extension object carries the IPv6 dedicated network identifier.
  • the second control message includes a fourth ICMP header, and the fourth ICMP header carries the IPv6 dedicated network identifier.
  • the second forwarding node meets one of the following two conditions:
  • the intermediate node in the IPv6 network where the second forwarding node is located is not configured with an IPv4 address
  • the second forwarding node is configured with an IPv4 address, but the IPv4 address of the second forwarding node is not used externally.
  • both the first message and the second message carry a time-to-live TTL
  • the first control message indicates that the TTL of the second message has expired when the second message reaches the second forwarding node.
  • the first message and the second message are path tracing messages.
  • the specific functions of the transceiver module 1001 and the processing module 1002 are as follows.
  • the transceiver module 1001 is configured to receive a second message sent by the first forwarding node, where the second message is an IPv6 message.
  • the second message is an IPv6 message.
  • the processing module 1002 is used to determine that the second message cannot be forwarded currently and determine that the second message contains an IPv4 message.
  • header a first control message is generated based on the second message, the first control message indicates that the second forwarding node forwards the second message, and the first control message indicates that the second forwarding node does not have an IPv4 address.
  • the first control message indicates that the second forwarding node does not have an IPv4 address.
  • the transceiver module 1001 is configured to send the first control message to the first forwarding node.
  • the first control message carries an IPv6 dedicated network identifier, and the IPv6 dedicated network identifier indicates that the intermediate node in the IPv6 network is not configured with an IPv4 address.
  • the first control message is a Network Control Message Protocol ICMP message
  • the first control message includes a first extension object, and the first extension object carries an IPv6 dedicated network identifier.
  • the first control message includes a first ICMP header, and the first ICMP header carries an IPv6 dedicated network identifier.
  • the first control message carries the IPv6 address of the second forwarding node.
  • the first control message is a Network Control Message Protocol ICMP message
  • the first control message includes a second extension object, and the second extension object carries the IPv6 address of the second forwarding node.
  • the first control message includes a second ICMP header, and the second ICMP header carries the IPv6 address of the second forwarding node. address.
  • the first control message includes a first IPv6 header, and the first IPv6 header carries the IPv6 address of the second forwarding node.
  • processing module 1002 is used for:
  • the second message is a path tracing message.
  • the specific functions of the transceiver module 1001 and the processing module 1002 are as follows.
  • the transceiver module 1001 is configured to receive a second control message sent by the first forwarding node after sending the first message to the first forwarding node.
  • the second control message is an IPv4 message and the second control message carries the information of the second forwarding node.
  • IPv6 address the first packet is an IPv4 packet.
  • the processing module 1002 is configured to determine, based on the second control message, whether the second forwarding node forwards the first message. For specific implementation, please refer to step 605 in the embodiment of FIG. 6 .
  • processing module 1002 is also used to:
  • the second control message is a Network 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.
  • the second control message includes a third ICMP header, and the third ICMP header carries the IPv6 address of the second forwarding node. address.
  • processing module 1002 is also used to:
  • IPv6 dedicated network identifier which indicates that the intermediate node in the IPv6 network is not configured with an IPv4 address
  • processing module 1002 is used for:
  • the second control message is parsed to obtain the IPv6 dedicated network identifier.
  • the second control message is a Network Control Message Protocol ICMP message
  • the second control message includes a fourth extension object, and the fourth extension object carries the IPv6 dedicated network identifier.
  • the second control message includes a fourth ICMP header, and the fourth ICMP header carries the IPv6 dedicated network identifier.
  • the second control message indicates that when the first packet reaches the second forwarding node, the TTL of the first packet expires.
  • the first message is a path tracing message.
  • Figure 11 is a schematic structural diagram of a device 1100 provided by an embodiment of the present application.
  • Figure 12 is a schematic structural diagram of another device 1200 provided by an embodiment of the present application. The structure of these two devices is explained below.
  • the device 1100 or the device 1200 introduced below corresponds to any forwarding node in the above method embodiment.
  • Each hardware, module and the above-mentioned other operations and/or functions in the device 1100 or the device 1200 are respectively used to implement the various steps and methods implemented by any forwarding node in the method embodiment.
  • Regarding how the device 1100 or the device 1200 processes messages please refer to the above method embodiments for specific details. For the sake of simplicity, they will not be described again here.
  • Each step of the above method embodiment is completed through the integrated logic circuit of the hardware in the processor of the device 1100 or the device 1200 or instructions in the form of software.
  • the steps of the methods disclosed in conjunction with the embodiments of the present application can be directly implemented by a hardware processor for execution, or can be executed by a combination of hardware and software modules in the processor.
  • the software module can be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other mature storage media in this field.
  • the storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware. To avoid repetition, the details will not be described here.
  • each functional module in the forwarding node is implemented using the software of the device 1100.
  • the functional module included in the forwarding node is generated by the processor of the device 1100 after reading the program code stored in the memory.
  • each functional module in the forwarding node is implemented using the software of the device 1200.
  • the functional module included in the forwarding node is generated by the processor of the device 1200 after reading the program code stored in the memory.
  • FIG. 11 is a schematic structural diagram of a device 1100 provided by an embodiment of the present application.
  • the device 1100 is configured as the first forwarding node, the second forwarding node, or the third forwarding node shown in FIG. 4 .
  • any forwarding node in the above method embodiment is optionally implemented through the device 1100.
  • the device 1100 is, for example, a network device.
  • the device 1100 is a switch, a router, etc.
  • the device 1100 is, for example, a computing device.
  • the device 1100 is a host, a server or a personal computer.
  • the device 1100 may be implemented by a general bus architecture.
  • Device 1100 includes at least one processor 1101, a communication bus 1102, a memory 1103, and at least one communication interface 1104.
  • the processor 1101 is, for example, a general-purpose central processing unit (CPU), a network processor (NP), a graphics processing unit (GPU), or a neural-network processing unit (NPU). ), a data processing unit (DPU), a microprocessor or one or more integrated circuits used to implement the solution of the present application.
  • the processor 1101 includes an application-specific integrated circuit (application-specific integrated circuit). integrated circuit (ASIC), programmable logic device (PLD) or a combination thereof.
  • a PLD is, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a general array logic (GAL), or any combination thereof.
  • Communication bus 1102 is used to transfer information between the above-mentioned components.
  • the communication bus 1102 can be divided into an address bus, a data bus, a control bus, etc.
  • address bus a data bus
  • control bus a control bus
  • Only one thick line is used in Figure 11, but this does not mean that there is only one bus or one type of bus.
  • the memory 1103 is, for example, a read-only memory (ROM) or other type of static storage device that can store static information and instructions, or a random access memory (random access memory, RAM) or a device that can store information and instructions.
  • ROM read-only memory
  • RAM random access memory
  • Other types of dynamic storage devices such as electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disk storage, optical discs Storage (including compressed optical discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store desired program code in the form of instructions or data structures and can Any other media accessed by a computer, without limitation.
  • the memory 1103 exists independently, for example, and is connected to the processor 1101 through the communication bus 1102 .
  • the memory 1103 may also be integrated with the processor 1101.
  • the Communication interface 1104 uses any transceiver-like device for communicating with other devices or communication networks.
  • the communication interface 1104 includes a wired communication interface and may also include a wireless communication interface.
  • the wired communication interface may be an Ethernet interface, for example.
  • the Ethernet interface can be an optical interface, an electrical interface, or a combination thereof.
  • the wireless communication interface may be a wireless local area networks (WLAN) interface, a cellular network communication interface or a combination thereof.
  • WLAN wireless local area networks
  • the processor 1101 may include one or more CPUs, such as CPU0 and CPU1 shown in FIG. 11 .
  • the device 1100 may include multiple processors, such as the processor 1101 and the processor 1105 shown in FIG. 11 .
  • processors can be a single-core processor (single-CPU) or a multi-core processor (multi-CPU).
  • a processor here may refer to one or more devices, circuits, and/or processing cores for processing data (such as computer program instructions).
  • the device 1100 may also include an output device and an input device.
  • Output devices communicate with processor 1101 and can display information in a variety of ways.
  • 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 (projector), etc.
  • Input devices communicate with processor 1101 and can receive user input in a variety of ways.
  • the input device may be a mouse, a keyboard, a touch screen device or a sensing device, etc.
  • the memory 1103 is used to store the program code 1110 for executing the solution of the present application, and the processor 1101 can execute the program code 1110 stored in the memory 1103. That is, the device 1100 can implement the message forwarding method provided by the method embodiment through the processor 1101 and the program code 1110 in the memory 1103.
  • the device 1100 in the embodiment of the present application can correspond to any forwarding node in the above method embodiments, and the processor 1101, communication interface 1104, etc. in the device 1100 can implement any forwarding node in the above method embodiments. functions and/or various steps and methods implemented. For the sake of brevity, no further details will be given here.
  • the transceiver module and the processing module in the network device 1000 shown in Figure 10 are software modules in the program code 1110 in the device 1100.
  • the device 1100 The processor 1101 in the processor implements the functions of the transceiver module and the processing module in the network device 600 in FIG. 10 by executing the program code 1110.
  • Figure 12 is a schematic structural diagram of a device 1200 provided by an embodiment of the present application.
  • the device 1200 is configured as the first forwarding node or the second forwarding node or the third forwarding node shown in Figure 4 node.
  • any forwarding node in the above method embodiments is optionally implemented through the device 1200.
  • the device 1200 is, for example, a network device.
  • the device 1200 is a switch, a router, etc.
  • the device 1200 includes: a main control board 12010 and an interface board 12030.
  • the main control board is also called the main processing unit (MPU) or route processor card.
  • the main control board 12010 is used to control and manage various components in the device 1200, including route calculation, device management, Equipment maintenance and protocol processing functions.
  • the main control board 12010 includes: a central processing unit 12011 and a memory 12012.
  • the interface board 12030 is also called a line processing unit (LPU), line card or service board.
  • the interface board 12030 is used to provide various service interfaces and implement data packet forwarding.
  • Business interfaces include but are not limited to Ethernet interfaces, POS (Packet over SONET/SDH) interfaces, etc.
  • Ethernet interfaces are, for example, Flexible Ethernet Clients (FlexE Clients).
  • the interface board 12030 includes: a central processor 12031, a network processor 12032, a forwarding entry memory 12034, and a physical interface card (physical interface card, PIC) 12033.
  • the central processor 12031 on the interface board 12030 is used to control and manage the interface board 12030 and communicate with the central processor 12011 on the main control board 12010.
  • the network processor 12032 is used to implement packet forwarding processing.
  • the network processor 12032 may be in the form of a forwarding chip.
  • the network processor 12032 is configured to forward the received message based on the forwarding table stored in the forwarding table memory 12034. If the destination address of the message is the address of the device 1200, then upload the message to the CPU (such as The central processor 12011) processes; if the destination address of the message is not the address of the device 1200, the next hop and outgoing interface corresponding to the destination address are found from the forwarding table based on the destination address, and the message is forwarded to the destination.
  • the outbound interface corresponding to the address includes: processing of packet incoming interfaces, forwarding table search; processing of downlink packets: forwarding table search, etc.
  • the physical interface card 12033 is used to implement the docking function of the physical layer.
  • the original traffic enters the interface board 12030 through this, and the processed packets are sent out from the physical interface card 12033.
  • the physical interface card 12033 is also called a daughter card and can be installed on the interface board 12030. It is responsible for converting photoelectric signals into messages and checking the validity of the messages before forwarding them to the network processor 12032 for processing.
  • the central processor can also perform the functions of the network processor 12032, such as implementing software forwarding based on a general-purpose CPU, so that the network processor 12032 is not required in the physical interface card 12033.
  • the device 1200 includes multiple interface boards.
  • the device 1200 also includes an interface board 12040.
  • the interface board 12040 includes: a central processor 12041, a network processor 12042, a forwarding entry memory 12044, and a physical interface card 12043.
  • the device 1200 also includes a switching network board 12020.
  • the switching fabric unit 12020 can also be called a switching fabric unit (switch fabric unit, SFU).
  • SFU switching fabric unit
  • the switching network board 12020 is used to complete data exchange between the interface boards.
  • the interface board 12030 and the interface board 12040 can communicate through the switching network board 12020.
  • the main control board 12010 and the interface board 12030 are coupled.
  • the main control board 12010, the interface board 12030, the interface board 12040, and the switching network board 12020 are connected to the system backplane through the system bus to achieve intercommunication.
  • an inter-process communication protocol (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.
  • IPC inter-process communication protocol
  • Logically, device 1200 includes a control plane and a forwarding plane.
  • the control plane includes a main control board 12010 and a central processor 12031.
  • the forwarding plane includes various components that perform forwarding, such as forwarding entry memory 12034, physical interface card 12033, and network processor. 12032.
  • the control plane executes functions such as router, generates forwarding tables, processes signaling and protocol messages, configures and maintains device status.
  • the control plane sends the generated forwarding tables to the forwarding plane.
  • the network processor 12032 is based on the control plane.
  • the delivered forwarding table looks up the table and forwards the packets received by the physical interface card 12033.
  • the forwarding table delivered by the control plane can be stored in the forwarding table item storage 12034. In some embodiments, the control plane and forwarding plane may be completely separate and not on the same device.
  • the transceiver module in the network device 600 shown in Figure 10 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, CPU 12031 or CPU 12011.
  • the operations on the interface board 12040 in the embodiment of the present application are consistent with the operations on the interface board 12030, and will not be described again for the sake of simplicity.
  • the device 1200 in this embodiment can correspond to any forwarding node in the above method embodiments, and the main control board 12010, interface board 12030 and/or 12040 in the device 1200 can implement the above method embodiments.
  • the functions of any forwarding node and/or the various steps implemented will not be described again here.
  • main control boards there may be one or more main control boards, and when there are multiple main control boards, they can include the main main control board and the backup main control board.
  • network equipment can have at least one switching network board, which enables data exchange between multiple interface boards through the switching network board, providing large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of network equipment with a distributed architecture are greater than those with a centralized architecture.
  • the network device can also be in the form of only one board, that is, there is no switching network board. The functions of the interface board and the main control board are integrated on this board. In this case, the central processor and main control board on the interface board The central processor on the board can be combined into one central processor on this board to perform the superimposed functions of the two.
  • This form of equipment has low data exchange and processing capabilities (for example, low-end switches or routers and other networks equipment).
  • the specific architecture used depends on the specific networking deployment scenario and is not limited here.
  • embodiments of the present application also provide a message forwarding system.
  • the message 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 the IPv6 network
  • the second forwarding node 1302 is located in the IPv6 network
  • the third forwarding node 1303 is located in the IPv4 network;
  • the third forwarding node 1303 is configured to: send the first message to the first forwarding node, where the first message is an IPv4 message;
  • the first forwarding node 1301 is configured to: receive the first message, generate a second message based on the first message, and send the second message to the second forwarding node, where the second message is an IPv6 message;
  • the second forwarding node 1302 is configured to: receive the second message, and generate a first control message based on the second message when it is determined that the second message cannot be forwarded currently and the second message has an IPv4 header.
  • the first control message is an IPv6 message, and the first control message is used to notify the second forwarding node of forwarding the second message;
  • the first forwarding node 1301 is also configured to: receive a first control message, and when the first forwarding node determines that the second forwarding node does not have an IPv4 address, generate a second control message based on the first control message, and send a third control message to the third forwarding node.
  • Two control messages the second control message is an IPv4 message, and the second control message carries the IPv6 address of the second forwarding node;
  • the third forwarding node 1303 is also configured to receive a second control message and determine, based on the second control message, whether the second forwarding node forwards the first message.
  • each forwarding node in the above message forwarding system can be referred to the embodiment shown in FIG. 6 and will not be described again here.
  • the disclosed systems, devices and methods can be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the modules is only a logical function division. In actual implementation, there may be other division methods.
  • multiple modules or components may be combined or may be Integrated into another system, or some features can be ignored, or not implemented.
  • the coupling or direct coupling or communication connection between each other shown or discussed may be indirect coupling or communication connection through some interfaces, devices or modules, or may be electrical, mechanical or other forms of connection.
  • the modules described as separate components may or may not be physically separated.
  • the components shown as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the embodiments of the present application.
  • each functional module in each embodiment of the present application can be integrated into one processing module, or each module can exist physically alone, or two or more modules can be integrated into one module.
  • the above integrated modules can be implemented in the form of hardware or software function modules.
  • the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of the present application is essentially or contributes to the existing technology, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to cause 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 aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program code. .
  • first and second are used to distinguish the same or similar items with basically the same functions and functions. It should be understood that there is no logic or timing between “first” and “second” There are no restrictions on the number and execution order of the dependencies. It should also be understood that, although the following description uses the terms first, second, etc. to describe various elements, these elements should not be limited by the terms. These terms are only used to distinguish one element from another.
  • the first information may be referred to as second information
  • the second information may be referred to as first information.
  • Both the first information and the second information may be information, and in some cases, may be separate and different information.
  • the term “if” may be interpreted to mean “when” or “upon” or “in response to determining” or “in response to detecting.”
  • the phrase “if it is determined" or “if [stated condition or event] is detected” may be interpreted to mean “when it is determined" or “in response to the determination... ” or “on detection of [stated condition or event]” or “in response to detection of [stated condition or event].”
  • the computer program product includes one or more computer program instructions.
  • the computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another, e.g., the computer program instructions may be transmitted from a website, computer, server or data center to Wired or wireless transmission to another website site, computer, server or data center.
  • the computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center integrated with one or more available media.
  • the available media may be magnetic media (such as floppy disks, hard disks, magnetic tapes), optical media (such as digital video discs (DVD), or semiconductor media (such as solid state drives)), etc.
  • the program can be stored in a computer-readable storage medium.
  • the storage medium can be read-only memory, magnetic disk or optical disk, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present application belongs to the technical field of communications. Disclosed are a message forwarding method, a system, a network device, a storage medium and a program product. In the method, when a first forwarding node which is an edge 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 on the basis of the first control message so as to send to a third forwarding node in the IPv4 network the second control message, the second control message being an IPv4 message; and when the second forwarding node does not have an IPv4 address, the second control message is expanded so as to carry in the second control message the IPv6 address of the second forwarding node. Therefore, when an intermediate node in an IPv6 network does not have an IPv4 address, the method provided in the embodiments of the present application can successfully notify a forwarding node in an IPv4 network about the situation of message forwarding.

Description

报文转发方法、系统、网络设备、存储介质及程序产品Message forwarding methods, systems, network equipment, storage media and program products
本申请要求于2022年07月12日提交的申请号为202210818034.6、发明名称为“报文转发方法、系统、网络设备、存储介质及程序产品”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to the Chinese patent application with application number 202210818034.6 and the invention title "Message forwarding method, system, network equipment, storage medium and program product" submitted on July 12, 2022, the entire content of which is incorporated by reference. incorporated in this application.
技术领域Technical field
本申请实施例涉及通信技术领域,特别涉及一种报文转发方法、系统、网络设备、存储介质及程序产品。The embodiments of the present application relate to the field of communication technology, and in particular to a message forwarding method, system, network device, storage medium and program product.
背景技术Background technique
随着网络技术的发展,第六代网络协议(Internet Protocol version 6,IPv6)网络逐渐取代IPv4网络。其中,IPv6网络包括IPv6专用(only)网络,IPv6专用网络中除边缘节点外的中间节点仅仅配置有IPv6地址,并没有配置IPv4地址。这种场景下,如果IPv6专用网络中的中间节点接收到来自IPv4网络中的转发节点发送的报文,且确定当前不能继续转发该报文,IPv6专用网络中的中间节点需要向IPv4网络中的转发节点通告该报文的转发情况。With the development of network technology, the sixth generation network protocol (Internet Protocol version 6, IPv6) network gradually replaces the IPv4 network. Among them, the IPv6 network includes an IPv6 dedicated (only) network. Intermediate nodes other than edge nodes in the IPv6 dedicated network are only configured with IPv6 addresses and are not configured with IPv4 addresses. In this scenario, if the intermediate node in the IPv6 private network receives a message sent from the forwarding node in the IPv4 network and determines that it cannot continue to forward the message, the intermediate node in the IPv6 private network needs to send a message to the forwarding node in the IPv4 network. The forwarding node announces the forwarding status of the message.
发明内容Contents of the invention
本申请实施例提供了一种报文转发方法、系统、网络设备、存储介质及程序产品,可以实现IPv6专用网络中的中间节点向IPv4网络中的转发节点通告报文转发情况。所述技术方案如下:Embodiments of the present application provide a message forwarding method, system, network device, storage medium and program product, which can enable an intermediate node in an IPv6 private network to notify the forwarding node in an IPv4 network of message forwarding status. The technical solutions are as follows:
第一方面,提供了一种报文转发方法,该方法应用于报文转发系统,该报文转发系统包括第一转发节点、第二转发节点和第三转发节点,第一转发节点为IPv6网络的边缘节点,第二转发节点位于IPv6网络,第三转发节点位于IPv4网络。In a first aspect, a message forwarding method is provided. The method is applied to a message forwarding system. The message forwarding system includes a first forwarding node, a second forwarding node and a third forwarding node. The first forwarding node is an IPv6 network. The edge node, the second forwarding node is located in the IPv6 network, and the third forwarding node is located in the IPv4 network.
在该方法中,第一转发节点接收第三转发节点发送的第一报文,第一报文为IPv4报文。第一转发节点基于第一报文生成第二报文,并向第二转发节点发送第二报文,第二报文为IPv6报文。第一转发节点接收第二转发节点发送的第一控制消息,第一控制消息为IPv6报文,第一控制消息用于通告第二转发节点转发第二报文的情况。当第一转发节点确定第二转发节点不具备IPv4地址时,基于第一控制消息生成第二控制消息,并向第三转发节点发送第二控制消息,第二控制消息为IPv4报文,且第二控制报文携带第二转发节点的IPv6地址。In this method, the first forwarding node receives the 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, where the second message is an IPv6 message. The first forwarding node receives the first control message sent by the second forwarding node. The first control message is an IPv6 message, and the first control message is used to notify the second forwarding node of forwarding the second message. When the first forwarding node determines that the second forwarding node does not have an IPv4 address, it 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 The second control packet carries the IPv6 address of the second forwarding node.
在本申请实施例中,当IPv6网络的边缘节点第一转发节点接收到来自同一IPv6网络中的第二转发节点的第一控制消息时,由于第一控制消息用于通告第二转发节点转发第二报文的情况,而第二报文是基于来自IPv4网络的第一报文生成的,因此第一转发节点在接收到第一控制消息时,需要向第一报文的发送方(IPv4网络中的第三转发节点)通告该报文转发情况。基于此,第一转发节点在接收到第一控制消息时,第一转发节点基于第一控制消息生成第二控制消息,且第二控制消息为IPv4报文,以向IPv4网络中的第三转发节点发送第二控制消息。并且在第二转发节点不具备IPv4地址时,为了能够实现成功向IPv4网络中第三转 发节点通告IPv6网络中第二转发节点转发报文的情况,本申请实施例对第二控制消息进行了扩展,以在第二控制消息中携带第二转发节点的IPv6地址。因此,通过本申请实施例提供的方法,IPv6网络中的中间节点在不具备IPv4地址时能够成功实现向IPv4网络中的转发节点通告报文转发情况。In this 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 notify the second forwarding node to forward the first In the case of two messages, the second message is generated based on the first message from the IPv4 network. Therefore, when receiving the first control message, the first forwarding node needs to report to the sender of the first message (IPv4 network The third forwarding node in the server notifies the forwarding status of the packet. Based on this, when the first forwarding node receives 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 forward to the third party in the IPv4 network. The node sends a second control message. And when the second forwarding node does not have an IPv4 address, in order to achieve successful forwarding to the third forwarding node in the IPv4 network, The sending node notifies the packet forwarding situation of the second forwarding node in the IPv6 network. The embodiment of the present 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 embodiments of this application, the intermediate node in the IPv6 network can successfully notify the forwarding node in the IPv4 network of the packet forwarding status when it does not have an IPv4 address.
基于第一方面提供的方法,在一种可能的实现方式中,第一控制消息携带IPv6专用网络标识,IPv6专用网络标识指示IPv6网络中的中间节点没有配置IPv4地址。这种场景下,第一转发节点确定第二转发节点不具备IPv4地址的实现过程为:第一转发节点解析第一控制消息,得到IPv6专用网络标识;第一转发节点基于IPv6专用网络标识确定第二转发节点不具备IPv4地址。Based on the method provided in the first aspect, in a possible implementation manner, the first control message carries an IPv6 dedicated network identifier, and the IPv6 dedicated network identifier indicates that the intermediate node in the IPv6 network is not configured with an IPv4 address. In this scenario, the first forwarding node determines that the second forwarding node does not have an IPv4 address. The implementation process is as follows: the first forwarding node parses the first control message to obtain the IPv6 dedicated network identifier; the first forwarding node determines the second forwarding node based on the IPv6 dedicated network identifier. The second forwarding node does not have an IPv4 address.
如果第二转发节点所在的IPv6网络为IPv6专用网络,则第二转发节点上没有配置IPv4地址。这种场景下,为了触发第一转发节点采用本申请实施例提供的方法向第三转发节点通告第二转发节点转发第二报文的情况,第二转发节点可以在第一控制消息中携带IPv6网络的IPv6专用网络标识,以便于第一转发节点基于该IPv6专用网络标识确定出第二转发节点不具备IPv4地址,进而采用本申请实施例提供的方法向第三转发节点通告第二转发节点转发第二报文的情况。If the IPv6 network where the second forwarding node is located is an IPv6 private network, no IPv4 address is configured on the second forwarding node. In this scenario, in order to trigger the first forwarding node to use the method provided by the embodiment of the present application to notify the third forwarding node of the second forwarding node forwarding the second message, the second forwarding node can carry IPv6 in the first control message. The IPv6 dedicated network identifier of the network, so that the first forwarding node determines that the second forwarding node does not have an IPv4 address based on the IPv6 dedicated network identifier, and then uses the method provided by the embodiment of the present application to notify the third forwarding node of forwarding by the second forwarding node. The situation of the second message.
基于第一方面提供的方法,在一种可能的实现方式中,第一控制消息为网络控制消息协议ICMP报文。其中,第一控制消息包括第一扩展对象,第一扩展对象携带IPv6专用网络标识,或者,第一控制消息包括第一ICMP报文头,第一ICMP报文头携带IPv6专用网络标识。Based on the method provided in the first aspect, in a possible implementation manner, the first control message is a Network Control Message Protocol ICMP message. The first control message includes a first extension object, and the first extension object carries an IPv6 dedicated network identifier, or the first control message includes a first ICMP header, and the first ICMP header carries an IPv6 dedicated network identifier.
在本申请实施例中,当第一控制消息为ICMP报文时,可以对ICMP报文进行灵活扩展,以使扩展后的ICMP报文能够携带IPv6专用网络标识。提高了本申请实施例的灵活性。In this embodiment of the present application, when the first control message is an ICMP message, the ICMP message can be flexibly extended so that the extended ICMP message can carry the IPv6 dedicated network identifier. The flexibility of the embodiment of the present application is improved.
基于第一方面提供的方法,在一种可能的实现方式中,第一转发节点确定第二转发节点不具备IPv4地址的实现过程为:第一转发节点获取本地存储的IPv6专用网络标识,IPv6专用网络标识指示IPv6网络中的中间节点没有配置IPv4地址;第一转发节点基于IPv6专用网络标识确定第二转发节点不具备IPv4地址。Based on the method provided in the first aspect, in a possible implementation manner, the implementation process for the first forwarding node to determine that the second forwarding node does not have an IPv4 address is: the first forwarding node obtains a locally stored IPv6 dedicated network identifier, and the IPv6 dedicated The network identifier indicates that the intermediate node in the IPv6 network is not configured with an IPv4 address; the first forwarding node determines that the second forwarding node does not have an IPv4 address based on the IPv6 dedicated network identifier.
在本申请实施例中,还可以预先在第一转发节点上配置与第二转发节点所在的IPv6网络对应的IPv6专用网络标识,如此后续第一转发节点直接从本地存储中便可获取该IPv6专用网络标识,以便于第一转发节点基于该IPv6专用网络标识确定出第二转发节点不具备IPv4地址,进而采用本申请实施例提供的方法向第三转发节点通告第二转发节点转发第二报文的情况。提高了本申请实施例的灵活性。In this embodiment of the present application, the first forwarding node can also be configured in advance with the IPv6 dedicated network identifier corresponding to the IPv6 network where the second forwarding node is located, so that the first forwarding node can subsequently obtain the IPv6 dedicated network identifier directly from the local storage. Network identification, so that the first forwarding node determines that the second forwarding node does not have an IPv4 address based on the IPv6 dedicated network identification, and then uses the method provided by the embodiment of this application to notify the third forwarding node that the second forwarding node forwards the second message. Case. The flexibility of the embodiment of the present application is improved.
基于第一方面提供的方法,在一种可能的实现方式中,第一控制消息携带第二转发节点的IPv6地址。这种场景下,第一转发节点基于第一控制消息生成第二控制消息的实现过程为:第一转发节点从第一控制消息中获取第二转发节点的IPv6地址,以生成第二控制消息。Based on the method provided in the first aspect, in a possible implementation manner, the first control message carries the IPv6 address of the second forwarding node. In this scenario, the first forwarding node generates the second control message based on the first control message. The first forwarding node obtains the IPv6 address of the second forwarding node from the first control message to generate the second control message.
由于第二控制消息需要携带第二转发节点的IPv6地址,因此第一转发节点在生成第二控制消息时,需要先获取第二转发节点的IPv6地址。在本申请实施例中,第一转发节点可以从第一控制消息中获取第二转发节点的IPv6地址,也可以从本地存储中获取第二转发节点的IPv6地址,提高了本申请实施例的灵活性。Since the second control message needs to carry the IPv6 address of the second forwarding node, the first forwarding node needs to first obtain the IPv6 address of the second forwarding node when generating the second control message. In this 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 local storage, which improves the flexibility of the embodiment of the present application. sex.
基于第一方面提供的方法,在一种可能的实现方式中,第一控制消息为网络控制消息协议ICMP报文,且第一控制消息包括第二扩展对象,第二扩展对象携带第二转发节点的IPv6地址。这种场景下,第一转发节点从第一控制消息中获取第二转发节点的IPv6地址的实现过 程为:第一转发节点从第二扩展对象中获取第二转发节点的IPv6地址。Based on the method provided in the first aspect, in a possible implementation manner, the first control message is a Network Control Message Protocol ICMP message, and the first control message includes a second extension object, and the second extension object carries the second forwarding node IPv6 address. In this scenario, the first forwarding node obtains the IPv6 address of the second forwarding node from the first control message. The process is: the first forwarding node obtains the IPv6 address of the second forwarding node from the second extension object.
基于第一方面提供的方法,在一种可能的实现方式中,第一控制消息为网络控制消息协议ICMP报文,且第一控制消息包括第二ICMP报文头,第二ICMP报文头携带第二转发节点的IPv6地址。这种场景下,第一转发节点从第一控制消息中获取第二转发节点的IPv6地址的实现过程为:第一转发节点从第二ICMP报文头中获取第二转发节点的IPv6地址。Based on the method provided in the first aspect, in a possible implementation manner, the first control message is a Network Control Message Protocol ICMP message, and the first control message includes a second ICMP message header, and the second ICMP message header carries The IPv6 address of the second forwarding node. In this scenario, the implementation process of the first forwarding node obtaining the IPv6 address of the second forwarding node from the first control message is: the first forwarding node obtains the IPv6 address of the second forwarding node from the second ICMP message header.
在本申请实施例中,当第一控制消息为ICMP报文时,可以对ICMP报文进行上述两种实现方式的灵活扩展,以使扩展后的ICMP报文能够携带第二转发节点的IPv6地址。提高了本申请实施例的灵活性。In this embodiment of the present application, when the first control message is an ICMP message, the ICMP message can be flexibly extended by the above two implementation methods, so that the extended ICMP message can carry the IPv6 address of the second forwarding node. . The flexibility of the embodiment of the present application is improved.
基于第一方面提供的方法,在一种可能的实现方式中,第一控制消息包括第一IPv6报文头,第一IPv6报文头携带第二转发节点的IPv6地址。这种场景下,第一转发节点从第一控制消息中获取第二转发节点的IPv6地址的实现过程可以为:第一转发节点从第一IPv6报文头中获取第二转发节点的IPv6地址。Based on the method provided in the first aspect, in a possible implementation manner, the first control message includes a first IPv6 header, and the first IPv6 header carries the IPv6 address of the second forwarding node. In this scenario, the implementation process for the first forwarding node to obtain the IPv6 address of the second forwarding node from the first control message may be: the first forwarding node obtains the IPv6 address of the second forwarding node from the first IPv6 packet header.
可选地,第一控制消息的IPv6报文头中可以携带有第二转发节点的IPv6地址,因此也可以不对第一控制消息进行扩展便可携带第二转发节点的IPv6地址。提高了本申请实施例的灵活性。Optionally, the IPv6 header of the first control message may carry the IPv6 address of the second forwarding node. Therefore, the first control message may also carry the IPv6 address of the second forwarding node without extending the first control message. The flexibility of the embodiment of the present application is improved.
基于第一方面提供的方法,在一种可能的实现方式中,第一转发节点本地存储有第二转发节点IPv6地址。这种场景下,第一转发节点基于第一控制消息生成第二控制消息的实现过程为:第一转发节点获取本地存储的第二转发节点IPv6地址,以基于第一控制消息和第二转发节点的IPv6地址,生成第二控制消息。Based on the method provided in the first aspect, in a possible implementation manner, the first forwarding node locally stores the IPv6 address of the second forwarding node. In this scenario, the implementation process of the first forwarding node generating the second control message based on the first control message is: 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 second forwarding node. The IPv6 address generates a second control message.
在本申请实施例中,第一转发节点可以从第一控制消息中获取第二转发节点的IPv6地址,也可以从本地存储中获取第二转发节点的IPv6地址,提高了本申请实施例的灵活性。In this 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 local storage, which improves the flexibility of the embodiment of the present application. sex.
基于第一方面提供的方法,在一种可能的实现方式中,第二控制消息为网络控制消息协议ICMP报文。其中,第二控制消息包括第三扩展对象,第三扩展对象携带第二转发节点的IPv6地址,或者,第二控制消息包括第三ICMP报文头,第三ICMP报文头携带第二转发节点的IPv6地址。Based on the method provided in the first aspect, in a possible implementation manner, the second control message is a Network 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 header, and the third ICMP header carries the second forwarding node. IPv6 address.
在本申请实施例中,可以对第二控制消息进行灵活扩展,以使第二控制消息能够携带第二转发节点的IPv6地址,提高了本申请实施例的应用灵活性。In this embodiment of the present application, the second control message can be flexibly expanded so that the second control message can carry the IPv6 address of the second forwarding node, which improves the application flexibility of the embodiment of the present application.
基于第一方面提供的方法,在一种可能的实现方式中,第二控制消息还携带IPv6专用网络标识,IPv6专用网络标识指示IPv6网络中的中间节点没有配置IPv4地址。Based on the method provided in the first aspect, in a possible implementation manner, the second control message also carries an IPv6 dedicated network identifier, and the IPv6 dedicated network identifier indicates that the intermediate node in the IPv6 network is not configured with an IPv4 address.
在本申请实施例中,第二控制消息还可以进一步携带IPv6专用网络标识,以使第三转发节点能够获悉到第二转发节点为IPv6专用网络中的节点。进一步提高了本申请实施例的灵活性。In this embodiment of the present application, the second control message may further carry an IPv6 dedicated network identifier, so that the third forwarding node can learn that the second forwarding node is a node in the IPv6 dedicated network. The flexibility of the embodiment of the present application is further improved.
基于第一方面提供的方法,在一种可能的实现方式中,第二控制消息为网络控制消息协议ICMP报文;其中,第二控制消息包括第四扩展对象,第四扩展对象携带IPv6专用网络标识,或者,第二控制消息包括第四ICMP报文头,第四ICMP报文头携带IPv6专用网络标识。Based on the method provided in the first aspect, in a possible implementation manner, the second control message is a Network Control Message Protocol ICMP message; wherein the second control message includes a fourth extension object, and the fourth extension object carries an IPv6 dedicated network identification, or the second control message includes a fourth ICMP header, and the fourth ICMP header carries the IPv6 dedicated network identification.
在本申请实施例中,可以对第二控制消息进行灵活扩展,以使第二控制消息能够携带IPv6专用网络标识,提高了本申请实施例的应用灵活性。In this embodiment of the present application, the second control message can be flexibly expanded so that the second control message can carry the IPv6 dedicated network identifier, which improves the application flexibility of the embodiment of the present application.
基于第一方面提供的方法,在一种可能的实现方式中,第二转发节点满足以下两种情况之一:第二转发节点所在的IPv6网络中的中间节点没有配置IPv4地址;或者,第二转发节 点配置有IPv4地址,但第二转发节点的IPv4地址不对外使用。Based on the method provided in the first aspect, in a possible implementation manner, the second forwarding node satisfies one of the following two conditions: the intermediate node in the IPv6 network where the second forwarding node is located does not have an IPv4 address configured; or, the second forwarding node Forward section The node is configured with an IPv4 address, but the IPv4 address of the second forwarding node is not used externally.
在本申请实施例中,不具备IPv4地址的第二转发节点除了可以是IPv6专用网络中的节点外,还可以包括配置有IPv4地址但是IPv4地址没有对外暴露的节点,进一步提高了本申请实施例的应用灵活性。In the embodiment of the present application, in addition to being a node in an IPv6 private network, the second forwarding node without an IPv4 address may also include a node configured with an IPv4 address but the IPv4 address is not exposed to the outside world, further improving the performance of the embodiment of the present application. application flexibility.
基于第一方面提供的方法,在一种可能的实现方式中,第一报文和第二报文均携带生存时间TTL,第一控制消息指示第二报文到达第二转发节点时所述第二报文的TTL超时。Based on the method provided in the first aspect, in a possible implementation manner, both the first message and the second message carry the time-to-live TTL, and the first control message indicates that the second message reaches the second forwarding node when the second message reaches the second forwarding node. The TTL of the second packet has expired.
基于本申请实施例提供的方法,可以通过第一控制消息和第二控制消息,实现IPv6网络中的第二转发节点在转发来自IPv4网络的报文的TTL超时而导致无法继续转发报文时,成功向IPv4网络中的节点通告该报文转发出错的情况。Based on the method provided by the embodiments of this application, the first control message and the second control message can be used to realize that when the TTL of forwarding a message from an IPv4 network expires and the second forwarding node in the IPv6 network is unable to continue forwarding the message, Successfully notify nodes in the IPv4 network of the packet forwarding error.
基于第一方面提供的方法,在一种可能的实现方式中,第一报文和第二报文为路径追踪报文。Based on the method provided in the first aspect, in a possible implementation manner, the first message and the second message are path tracing messages.
基于本申请实施例提供的方法,还可以实现在跨IPv6网络的路径追踪场景中,IPv6网络中的第二转发节点在确定来自IPv4网络的路径追踪报文的TTL超时时,成功向IPv4网络中的节点通告自身的IPv6地址,以使IPv4网络中的第三转发节点追踪到第二转发节点的IPv6地址。提高了路径追踪的成功率。Based on the method provided by the embodiments of this application, it can also be realized that in the path tracing scenario across IPv6 networks, the second forwarding node in the IPv6 network successfully forwards the path tracing message to the IPv4 network when determining that the TTL of the path tracing message from the IPv4 network has timed out. The node advertises its own IPv6 address, so that the third forwarding node in the IPv4 network can track the IPv6 address of the second forwarding node. Improved path tracing success rate.
第二方面,提供了一种报文转发方法,该方法应用于报文转发系统,该报文转发系统包括第一转发节点、第二转发节点和第三转发节点,第一转发节点为第六代网络协议IPv6网络的边缘节点,第二转发节点位于IPv6网络,第三转发节点位于第四代网络协议IPv4网络。In a second aspect, a message forwarding method is provided. The method is applied to a message forwarding system. The message forwarding system includes a first forwarding node, a second forwarding node and a third forwarding node. The first forwarding node is a sixth forwarding node. The first generation network protocol IPv6 network is an edge node, the second forwarding node is located in the IPv6 network, and the third forwarding node is located in the fourth generation network protocol IPv4 network.
需要说明的是,第二方面提供的方法的技术效果可以参考第一方面提供的方法的技术效果,在此不再赘述。It should be noted that the technical effects of the method provided in the second aspect may refer to the technical effects of the method provided in the first aspect, and will not be described again here.
在该方法中,第三转发节点在向第一转发节点发送第一报文后,接收第一转发节点发送的第二控制消息,第二控制消息为IPv4报文且第二控制消息携带第二转发节点的IPv6地址,第一报文为IPv4报文;第三转发节点基于第二控制消息确定第二转发节点转发第一报文的情况。In this method, after sending 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 second The IPv6 address of the forwarding node, the first message is an IPv4 message; the third forwarding node determines, based on the second control message, whether the second forwarding node forwards the first message.
基于第二方面提供的方法,在一种可能的实现方式中,第三转发节点基于第二控制消息确定第二转发节点转发第一报文的情况之后,方法还包括:Based on the method provided in the second aspect, in a possible implementation manner, after the third forwarding node determines that the second forwarding node forwards the first message based on the second control message, the method further includes:
第三转发节点解析第二控制消息,得到第二转发节点的IPv6地址;The third forwarding node parses the second control message and obtains the IPv6 address of the second forwarding node;
第三转发节点显示第二转发节点的IPv6地址。The third forwarding node displays the IPv6 address of the second forwarding node.
基于第二方面提供的方法,在一种可能的实现方式中,第二控制消息为网络控制消息协议ICMP报文;Based on the method provided in the second aspect, in a possible implementation manner, the second control message is a Network Control Message Protocol ICMP message;
第二控制消息包括第三扩展对象,第三扩展对象携带第二转发节点的IPv6地址,或者,第二控制消息包括第三ICMP报文头,第三ICMP报文头携带第二转发节点的IPv6地址。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 header, and the third ICMP header carries the IPv6 address of the second forwarding node. address.
基于第二方面提供的方法,在一种可能的实现方式中,第三转发节点基于第二控制消息确定第一转发节点转发第一报文的情况之后,方法还包括:Based on the method provided in the second aspect, in a possible implementation manner, after the third forwarding node determines that the first forwarding node forwards the first message based on the second control message, the method further includes:
第三转发节点确定IPv6专用网络标识,IPv6专用网络标识指示IPv6网络中的中间节点没有配置IPv4地址;The third forwarding node determines the IPv6 dedicated network identifier, and the IPv6 dedicated network identifier indicates that the intermediate node in the IPv6 network is not configured with an IPv4 address;
第三转发节点显示IPv6专用网络标识。The third forwarding node displays the IPv6 private network identification.
基于第二方面提供的方法,在一种可能的实现方式中,第三转发节点确定IPv6专用网络 标识,包括:Based on the method provided in the second aspect, in a possible implementation manner, the third forwarding node determines the IPv6 private network Logo, including:
第三转发节点解析第二控制消息,以得到IPv6专用网络标识。The third forwarding node parses the second control message to obtain the IPv6 dedicated network identifier.
基于第二方面提供的方法,在一种可能的实现方式中,第二控制消息为网络控制消息协议ICMP报文;Based on the method provided in the second aspect, in a possible implementation manner, the second control message is a Network Control Message Protocol ICMP message;
第二控制消息包括第四扩展对象,第四扩展对象携带IPv6专用网络标识,或者,第二控制消息包括第四ICMP报文头,第四ICMP报文头携带IPv6专用网络标识。The second control message includes a fourth extension object, and the fourth extension object carries the IPv6 dedicated network identifier. Alternatively, the second control message includes a fourth ICMP header, and the fourth ICMP header carries the IPv6 dedicated network identifier.
基于第二方面提供的方法,在一种可能的实现方式中,第二控制消息指示第一报文到达第二转发节点时,第一报文的生存时间TTL超时。Based on the method provided in the second aspect, in a possible implementation manner, the second control message indicates that when the first message reaches the second forwarding node, the time-to-live TTL of the first message times out.
基于第二方面提供的方法,在一种可能的实现方式中,第一报文为路径追踪报文。Based on the method provided in the second aspect, in a possible implementation manner, the first message is a path tracing message.
第三方面,提供了一种报文转发方法,该方法应用于报文转发系统,该报文转发系统包括第一转发节点和第二转发节点,第一转发节点为第六代网络协议IPv6网络的边缘节点,第二转发节点位于IPv6网络。In a third aspect, a message forwarding method is provided. The method is applied to a message forwarding system. The message forwarding system includes a first forwarding node and a second forwarding node. The first forwarding node is a sixth-generation network protocol IPv6 network. The edge node and the second forwarding node are located in the IPv6 network.
需要说明的是,第三方面提供的方法的技术效果同样可以参考第一方面提供的方法的技术效果,在此不再赘述。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, and will not be described again here.
在该方法中,第二转发节点接收第一转发节点发送的第二报文,第二报文为IPv6报文;In this method, the second forwarding node receives the second message sent by the first forwarding node, and the second message is an IPv6 message;
当第二转发节点确定当前不能继续转发第二报文,且确定第二报文具备IPv4报文头时,基于第二报文生成第一控制消息,第一控制消息指示第二转发节点转发第二报文的情况,且第一控制消息指示第二转发节点不具备IPv4地址;When the second forwarding node determines that it cannot continue to forward the second message and determines that the second message has an IPv4 header, it generates a first control message based on the second message, and the first control message instructs the second forwarding node to forward the second message. The situation of two messages, and the first control message indicates 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.
基于第三方面提供的方法,在一种可能的实现方式中,第一控制消息携带IPv6专用网络标识,IPv6专用网络标识指示IPv6网络中的中间节点没有配置IPv4地址。Based on the method provided in the third aspect, in a possible implementation manner, the first control message carries an IPv6 dedicated network identifier, and the IPv6 dedicated network identifier indicates that the intermediate node in the IPv6 network is not configured with an IPv4 address.
基于第三方面提供的方法,在一种可能的实现方式中,第一控制消息为网络控制消息协议ICMP报文;Based on the method provided in the third aspect, in a possible implementation manner, the first control message is a Network Control Message Protocol ICMP message;
第一控制消息包括第一扩展对象,第一扩展对象携带IPv6专用网络标识,或者,第一控制消息包括第一ICMP报文头,第一ICMP报文头携带IPv6专用网络标识。The first control message includes a first extension object, and the first extension object carries an IPv6 dedicated network identifier. Alternatively, the first control message includes a first ICMP header, and the first ICMP header carries an IPv6 dedicated network identifier.
基于第三方面提供的方法,在一种可能的实现方式中,第一控制消息携带第二转发节点的IPv6地址。Based on the method provided in the third aspect, in a possible implementation manner, the first control message carries the IPv6 address of the second forwarding node.
基于第三方面提供的方法,在一种可能的实现方式中,第一控制消息为网络控制消息协议ICMP报文;Based on the method provided in the third aspect, in a possible implementation manner, the first control message is a Network Control Message Protocol ICMP message;
第一控制消息包括第二扩展对象,第二扩展对象携带第二转发节点的IPv6地址,或者,第一控制消息包括第二ICMP报文头,第二ICMP报文头携带第二转发节点的IPv6地址。The first control message includes a second extension object, and the second extension object carries the IPv6 address of the second forwarding node. Alternatively, the first control message includes a second ICMP header, and the second ICMP header carries the IPv6 address of the second forwarding node. address.
基于第三方面提供的方法,在一种可能的实现方式中,第一控制消息包括第一IPv6报文头,第一IPv6报文头携带第二转发节点的IPv6地址。Based on the method provided in the third aspect, in a possible implementation manner, the first control message includes a first IPv6 header, and the first IPv6 header carries the IPv6 address of the second forwarding node.
基于第三方面提供的方法,在一种可能的实现方式中,第二转发节点确定当前不能继续转发第二报文,包括:Based on the method provided in the third aspect, in a possible implementation manner, the second forwarding node determines that it cannot continue to forward the second message currently, including:
当第二报文的生存时间TTL为1时,第二转发节点确定当前不能继续转发第二报文。When the lifetime TTL of the second message is 1, the second forwarding node determines that it cannot continue to forward the second message.
基于第三方面提供的方法,在一种可能的实现方式中,第二报文为路径追踪报文。 Based on the method provided in the third aspect, in a possible implementation manner, the second message is a path tracing message.
第四方面,提供了一种网络设备,该网络设备包括存储器和处理器;所述存储器用于存储程序指令;所述处理器被配置为调用所述存储器中存储的程序,以使得所述网络设备执行如第一方面所述的方法。In a fourth aspect, a network device is provided. The network device includes a memory and a processor; the memory is used to store program instructions; the processor is configured to call the program stored in the memory, so that the network The device performs the method as described in the first aspect.
第五方面,提供了一种网络设备,该网络设备包括存储器和处理器;所述存储器用于存储程序指令;所述处理器被配置为调用所述存储器中存储的程序,以使得所述网络设备执行如第二方面所述的方法。In a fifth aspect, a network device is provided. The network device includes a memory and a processor; the memory is used to store program instructions; the processor is configured to call the program stored in the memory, so that the network The device performs the method as described in the second aspect.
第六方面,提供了一种网络设备,该网络设备包括存储器和处理器;所述存储器用于存储程序指令;所述处理器被配置为调用所述存储器中存储的程序,以使得所述网络设备执行如第三方面所述的方法。In a sixth aspect, a network device is provided. The network device includes a memory and a processor; the memory is used to store program instructions; the processor is configured to call the program stored in the memory, so that the network The device performs the method as described in the third aspect.
第七方面,提供了一种网络设备,该网络设备包括收发模块和处理模块:In the seventh aspect, a network device is provided. The network device includes a transceiver module and a processing module:
收发模块用于执行如第一方面所述方法中收发相关的操作,处理模块用于执行如第一方面所述方法中除所述收发相关的操作之外的操作。The transceiving module is configured to perform transceiver-related operations in the method described in the first aspect, and the processing module is configured to perform operations other than the transceiver-related operations in the method described in the first aspect.
第八方面,提供了一种网络设备,该网络设备包括收发模块和处理模块:In an eighth aspect, a network device is provided, which includes a transceiver module and a processing module:
收发模块用于执行如第二方面所述方法中收发相关的操作,处理模块用于执行如第二方面所述方法中除所述收发相关的操作之外的操作。The transceiving module is configured to perform transceiver-related operations in the method described in the second aspect, and the processing module is configured to perform operations other than the transceiver-related operations in the method described in the second aspect.
第九方面,提供了一种网络设备,该网络设备包括收发模块和处理模块:In a ninth aspect, a network device is provided, which includes a transceiver module and a processing module:
收发模块用于执行如第三方面所述方法中收发相关的操作,处理模块用于执行如第三方面所述方法中除所述收发相关的操作之外的操作。The transceiving module is configured to perform transceiver-related operations in the method described in the third aspect, and the processing module is configured to perform operations other than the transceiver-related operations in the method described in the third aspect.
第十方面,提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当所述指令在处理器上运行时,实现第一方面所述的方法。In a tenth aspect, a computer-readable storage medium is provided. Instructions are stored in the computer-readable storage medium. When the instructions are run on a processor, the method described in the first aspect is implemented.
第十一方面,提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当所述指令在处理器上运行时,实现第二方面所述的方法。In an eleventh aspect, a computer-readable storage medium is provided. Instructions are stored in the computer-readable storage medium. When the instructions are run on a processor, the method described in the second aspect is implemented.
第十二方面,提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当所述指令在处理器上运行时,实现第三方面所述的方法。In a twelfth aspect, a computer-readable storage medium is provided. Instructions are stored in the computer-readable storage medium. When the instructions are run on a processor, the method described in the third aspect is implemented.
第十三方面,提供了一种计算机程序产品,该计算机程序产品包含指令,所述指令在处理器上运行时,实现第一方面所述的方法。In a thirteenth aspect, a computer program product is provided. The computer program product includes instructions that, when run on a processor, implement the method described in the first aspect.
第十四方面,提供了一种计算机程序产品,该计算机程序产品包含指令,所述指令在处理器上运行时,实现第二方面所述的方法。 A fourteenth aspect provides a computer program product, which includes instructions that, when run on a processor, implement the method described in the second aspect.
第十五方面,提供了一种计算机程序产品,该计算机程序产品包含指令,所述指令在处理器上运行时,实现第三方面所述的方法。In a fifteenth aspect, a computer program product is provided. The computer program product includes instructions that, when run on a processor, implement the method described in the third aspect.
上述第四方面至第十五方面所获得的技术效果,可以参考第一方面至第三方面中对应的技术手段获得的技术效果,在这里不再赘述。For the technical effects obtained by the above-mentioned fourth aspect to the fifteenth aspect, reference can be made to the technical effects obtained by the corresponding technical means in the first aspect to the third aspect, and will not be described again here.
附图说明Description of drawings
图1是本申请实施例提供的一种IPv4报文穿越IPv6网络的示意图;Figure 1 is a schematic diagram of an IPv4 packet traversing an IPv6 network provided by an embodiment of the present application;
图2是本申请实施例提供的一种路径追踪流程示意图;Figure 2 is a schematic diagram of a path tracking process provided by an embodiment of the present application;
图3是本申请实施例提供的另一种路径追踪流程示意图;Figure 3 is a schematic diagram of another path tracking process provided by an embodiment of the present application;
图4是本申请实施例提供的一种报文转发系统的架构示意图;Figure 4 is a schematic architectural diagram of a message forwarding system provided by an embodiment of the present application;
图5是本申请实施例提供的另一种报文转发系统的架构示意图;Figure 5 is a schematic architectural diagram of another message forwarding system provided by an embodiment of the present application;
图6是本申请实施例提供的一种报文转发方法流程图;Figure 6 is a flow chart of a message forwarding method provided by an embodiment of the present application;
图7是本申请实施例提供的一种ICMP报文的格式示意图;Figure 7 is a schematic diagram of the format of an ICMP message provided by an embodiment of the present application;
图8是本申请实施例提供的一种追踪结果示意图;Figure 8 is a schematic diagram of a tracking result provided by an embodiment of the present application;
图9是本申请实施例提供的另一种路径追踪流程示意图;Figure 9 is a schematic diagram of another path tracking process provided by an embodiment of the present application;
图10是本申请实施例提供的一种网络设备的结构示意图;Figure 10 is a schematic structural diagram of a network device provided by an embodiment of the present application;
图11是本申请实施例提供的另一种网络设备的结构示意图;Figure 11 is a schematic structural diagram of another network device provided by an embodiment of the present application;
图12是本申请实施例提供的另一种网络设备的结构示意图;Figure 12 is a schematic structural diagram of another network device provided by an embodiment of the present application;
图13是本申请实施例提供的另一种报文转发系统的架构示意图。Figure 13 is a schematic architectural diagram of another message forwarding system provided by an embodiment of the present application.
具体实施方式Detailed ways
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。In order to make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
应当理解的是,本文提及的“多个”是指两个或两个以上。在本申请的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,为了便于清楚描述本申请实施例的技术方案,在本申请的实施例中,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。It should be understood that "plurality" mentioned herein refers to two or more. In the description of this application, unless otherwise stated, "/" means or, for example, A/B can mean A or B; "and/or" in this article is just an association relationship describing related objects, It means that there can be three relationships, for example, A and/or B, which can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in order to facilitate a clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as “first” and “second” are used to distinguish identical or similar items with basically the same functions and effects. Those skilled in the art can understand that words such as "first" and "second" do not limit the number and execution order, and words such as "first" and "second" do not limit the number and execution order.
在对本申请实施例进行详细解释说明之前,先对本申请实施例的应用场景进行介绍。Before explaining the embodiments of the present application in detail, the application scenarios of the embodiments of the present application are first introduced.
路径追踪(traceroute)技术是一种用于探测报文转发路径所经过的各个转发节点的技术。在路径追踪技术中,路径探测节点可以发送目的地址相同但生存时间(time to live,TTL)不同的多个路径追踪报文,比如,TTL从1到10的10个不同的路径追踪报文。网络中任一转发节点在接收到某个路径追踪报文时,将该路径追踪报文中的TTL值减去1之后,继续转发该路径追踪报文。如果该转发节点接收到的路径追踪报文的TTL为1,则向路径探测节点返回网络控制消息协议(internet control message protocol,ICMP)差错报文,ICMP差错报文中 携带该转发节点的IP地址。通过这种方式,路径探测节点便可得到报文转发路径所经过的各个转发节点的IP地址,从而实现路径追踪的目的。Path tracing (traceroute) technology is a technology used to detect each forwarding node along which a packet forwarding path passes. In path tracing technology, a path detection node can send multiple path tracing messages with the same destination address but different time to live (TTL), for example, 10 different path tracing messages with TTL from 1 to 10. When any forwarding node in the network receives a path tracing message, it will continue to forward the path tracing message after subtracting 1 from the TTL value in the path tracing message. If the TTL of the path tracing message received by the forwarding node is 1, an Internet Control Message Protocol (ICMP) error message is returned to the path detection node. In the ICMP error message Carrying the IP address of the forwarding node. In this way, the path detection node can obtain the IP address of each forwarding node along the packet forwarding path, thereby achieving the purpose of path tracing.
目前,在第四代网络协议(Internet Protocol version 4,IPv4)网络中,转发节点在确定报文的TTL为1时,则向其他转发节点返回基于IPv4的网络控制消息协议(internet control message protocol,ICMP)差错报文,该ICMP差错报文为IPv4报文,且ICMP差错报文中携带该转发节点的IPv4地址,以使其他节点能够获悉到报文在该转发节点处转发出现差错。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 the IPv4-based network control message protocol (internet control message protocol) to other forwarding nodes. ICMP) error message, 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 there is an error in forwarding the message at the forwarding node.
随着网络技术的发展,第六代网络协议(Internet Protocol version 6,IPv6)网络正在逐渐取代IPv4网络。这种场景下,IPv4报文在网络中传输时,通常会穿越(over)IPv6网络。该报文可称为IPv4 over IPv6的数据。With the development of network technology, the sixth generation network protocol (Internet Protocol version 6, IPv6) network is gradually replacing the IPv4 network. In this scenario, when IPv4 packets are transmitted in the network, they usually traverse (over) the IPv6 network. This message can be called IPv4 over IPv6 data.
图1是本申请实施例提供的一种IPv4报文穿越IPv6网络的示意图。图1中CE用于标记用户边缘(customer edge)设备,PE用于标记运营商边缘(provider edge)设备,P用于标记运营商中间设备。如图1所示,CE1向CE2发送IPv4报文。CE1和CE2之间中间经过一个IPv6网络,CE1发送的报文在PE1节点上进入IPv6网络,PE1在该报文外层多封装一层IPv6报文头(图1中简写为IPv6头)。IPv6网络的中间P节点上走IPv6的转发,最终到达IPv6网络的出口节点PE2,PE2会将IPv6报文头剥离,将IPv4报文送CE2。Figure 1 is a schematic diagram of an IPv4 packet traversing an IPv6 network provided by an embodiment of the present application. In Figure 1, CE is used to mark customer edge equipment, PE is used to mark operator edge equipment, and P is used to mark operator intermediate equipment. As shown in Figure 1, CE1 sends an IPv4 packet to CE2. An IPv6 network passes between CE1 and CE2. The packet sent by CE1 enters the IPv6 network on the PE1 node. PE1 encapsulates an additional IPv6 header (abbreviated as IPv6 header in Figure 1) on the outer layer of the packet. IPv6 is forwarded on the intermediate P node of the IPv6 network, and finally reaches the egress node PE2 of the IPv6 network. PE2 will strip off the IPv6 packet header and send the IPv4 packet to CE2.
在图1所示的场景中,如果进行路径追踪,则具体的追踪流程可以如图2所示。图2是本申请实施例提供的一种路径追踪流程示意图。如图2所示,该路径追踪流程包括如下几个步骤。In the scenario shown in Figure 1, if path tracking is performed, the specific tracking process can be 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.
1、CE1向CE2发起路径追踪(Traceroute),也即分别发送TTL不同的多个路径追踪报文。1. CE1 initiates path tracing (Traceroute) to CE2, that is, it sends multiple path tracing messages with different TTLs.
2、在路径追踪报文中的TTL为1时,路径追踪报文到达PE1,PE1检查TTL超时,直接给CE1回复TTL超时的ICMP差错报文。2. When the TTL in the path tracing message is 1, the path tracing message reaches PE1. PE1 checks the TTL timeout and directly replies to CE1 with a TTL timeout ICMP error message.
3、在路径追踪报文中的TTL为2时,路径追踪报文到达PE1,PE1检查TTL的值,判断可以继续转发。然后将TTL减一(IPv4报文头中的TTL值变为1),并在路径追踪报文的外层封装IPv6报文头,将封装后的路径追踪报文继续转发。其中,IPv6网络的TTL模式可以为统一(Uniform)模式,此时封装的IPv6报文头中的TTL(实际IPv6报文头中的TTL字段叫Hop limit,为了跟IPV4统一,IPv6的Hop limt也统一用TTL来称呼)设置为跟内层IPv4报文头的TTL相同,也即IPv6报文头中的TTL也是1。路径追踪报文到达P节点,P节点根据外层IPv6报文头判断TTL超时,需要给CE1回复TTL超时的ICMP差错报文。3. When the TTL in the path tracing packet is 2, the path tracing packet reaches PE1. PE1 checks the TTL value and determines that forwarding can continue. Then the TTL is decremented by one (the TTL value in the IPv4 header becomes 1), and the IPv6 header is encapsulated in the outer layer of the path tracing message, and the encapsulated path tracing message is forwarded. Among them, the TTL mode of the IPv6 network can be the uniform mode. At this time, the TTL in the encapsulated IPv6 packet header (the TTL field in the actual IPv6 packet header is called Hop limit. In order to unify with IPV4, the Hop limit of IPv6 is also (Uniformly referred to as 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 tracing message reaches the P node. The P node determines the TTL timeout based on the outer IPv6 message header and needs to reply to CE1 with a TTL timeout ICMP error message.
4、在路径追踪报文中的TTL为3时的处理流程跟TTL为2时处理流程类似,在此不再重复说明。4. The processing flow when the TTL in the path tracing message is 3 is similar to the processing flow when the TTL is 2, and will not be repeated here.
5、在路径追踪报文中的TTL为4时,路径追踪报文到达PE1,PE1基于TTL的值判断需要继续转发。然后将TTL减一(IPv4报文头中的TTL值变为3),并在路径追踪报文外层封装IPv6报文头,IPv6报文头中的TTL也是3,将封装后的路径追踪报文继续转发。该路径追踪报文到达P节点,P节点基于IPv6继续转发路径追踪报文,并将路径追踪报文中的IPv6报文头的TTL减1(数值更新为2),将更新后的路径追踪报文转发给PE2。PE2收到路径追踪报文后判断需要继续转发,此时将IPv6的TTL减1,并且判断出自身是IPv6网络的出口节点,因此需要剥离IPv6报文头。同时由于PE2所在的IPv6网络的的TTL模式配置为统一(Uniform)模式,因此PE2将路径追踪报文中IPv6报文头的TTL数值写到IPv4报文头的 TTL中,也就是此时PE2将接收到的路径追踪报文中的IPv6报文头剥离,并将IPv4报文头中的TTL更新为1,将处理后的路径追踪报文送CE2。CE2收到路径追踪报文后,判断TTL为1,由于路径追踪报文的目的地址是CE2,也就是路径追踪报文已经到达目的地了,此时CE2会对该路径追踪报文进行其他处理(本申请实施例对此不做详细说明),同时CE2给CE1回复端口不可达的ICMP差错报文,CE1收到CE2的报文后,由于CE2是路径追踪的目的地,因此路径追踪过程结束。5. When the TTL in the path tracing packet is 4, the path tracing packet reaches PE1, and PE1 determines that it needs to continue forwarding based on the TTL value. Then reduce the TTL by one (the TTL value in the IPv4 packet header becomes 3), and encapsulate the IPv6 packet header in the outer layer of the path tracing packet. The TTL in the IPv6 packet header is also 3, and the encapsulated route tracing packet is The article continues to be forwarded. The path tracing message reaches the P node. The P node continues to forward the path tracing message based on IPv6, and decrements the TTL of the IPv6 header in the path tracing message by 1 (updates the value to 2), and updates the path tracing message to Forward the document to PE2. After receiving the path tracing packet, PE2 determines that it needs to continue forwarding. At this time, it decrements the IPv6 TTL by 1 and determines that it is the egress node of the IPv6 network, so it needs to strip off the IPv6 packet header. At the same time, because the TTL mode of the IPv6 network where PE2 is located is configured as Uniform mode, PE2 writes the TTL value of the IPv6 header in the path tracing packet to the IPv4 header. TTL, that is, at this time, PE2 strips off the IPv6 header in the received path tracing packet, updates the TTL in the IPv4 packet header to 1, and sends the processed path tracing packet to CE2. After CE2 receives the path tracing message, it determines that the TTL is 1. Since the destination address of the path tracing message is CE2, that is, the path tracing message has reached the destination. At this time, CE2 will perform other processing on the path tracing message. (This application embodiment will not describe this in detail). At the same time, CE2 replies to CE1 with an ICMP error message indicating that the port is unreachable. After CE1 receives the message from CE2, since CE2 is the destination of path tracing, the path tracing process ends. .
上述步骤2的详细流程可以如图3所示。The detailed process of the above step 2 can be shown in Figure 3.
在图3中,CE1发送TTL为2的路径追踪报文到PE1,该路径追踪报文包括IPv4报文头和载荷,其中,IPv4报文头携带源地址(source address,SA)1.1.1.1和目的地址(destination address,DA)2.2.2.2,且IPv4报文头中的TTL为2。PE1接收到该路径追踪报文后,将该路径追踪报文的IPv4报文头中的TTL减为1,并在外层封装IPv6报文头(图3中简写为IPv6头),并且该IPv6报文头的TTL也设置为1,继续向P节点转发处理后的路径追踪报文。P节点接收到该路径追踪报文时,判断出IPv6报文头中的TTL超时,并且P节点判断接收到的路径追踪报文中包括IPv4报文头,因此P节点在回复的TTL超时的ICMP差错报文中携带P节点的IPv4地址100.1.1.2,并将ICMP差错报文通过PE1发送给CE1。其中,如图3所示,P节点的IPv4地址100.1.1.2承载在ICMP差错报文的ICMP报文头(图3中简写为ICMP头)中。In Figure 3, CE1 sends a path tracing message with a TTL of 2 to PE1. The path tracing message includes an IPv4 header and a payload. The IPv4 header carries the source address (SA) 1.1.1.1 and The destination address (DA) is 2.2.2.2, and the TTL in the IPv4 header is 2. After receiving the path tracing message, PE1 reduces the TTL in the IPv4 header of the path tracing message to 1, and encapsulates the IPv6 header in the outer layer (abbreviated as IPv6 header in Figure 3), and the IPv6 message The TTL of the header is also set to 1, and the processed path tracing message continues to be forwarded to the P node. When the P node receives the path tracing message, it determines that the TTL in the IPv6 header has expired, and the P node determines that the received path tracing message includes the IPv4 header, so the P node responds with the ICMP TTL expired message. The error message carries the IPv4 address of the P node 100.1.1.2, and the ICMP error message is sent to CE1 through PE1. As shown in Figure 3, the IPv4 address 100.1.1.2 of the P node is carried in the ICMP header of the ICMP error message (abbreviated as ICMP header in Figure 3).
上述场景下,如果IPv6网络为IPv6专用网络,当IPv6专用网络中的转发节点接收到来自IPv4网络中的转发节点发送的报文,且确定报文的TTL为1时,由于IPv6专用网络中的转发节点仅仅配置有IPv6地址,没有配置IPv4地址,此时IPv6专用网络中的转发节点有两种处理方式。一种是:该转发节点直接丢弃该报文,并不会向IPv4网络中的转发节点发送基于IPv4的ICMP差错报文。另一种是:该转发节点向IPv6专用网络的边缘节点发送基于IPv6的ICMP差错报文,该基于IPv6的ICMP差错报文携带该转发节点的IPv6地址,边缘节点接收到基于IPv6的ICMP差错报文时,需要向IPv4网络中的转发节点继续转发该差错报文。但是由于该边缘节点接收到的是基于IPv6的ICMP差错报文,需要通告的网络为IPv4网络,因此此时边缘节点也会丢弃基于IPv6的ICMP差错报文。这两种处理方式均将导致IPv4网络中的转发节点无法感知到该报文在IPv6专用网络中转发出现差错。In the above scenario, if the IPv6 network is an IPv6 private network, when the forwarding node in the IPv6 private network receives a message from a forwarding node in the IPv4 network and determines that the TTL of the message is 1, due to The forwarding node is only configured with an IPv6 address and not an IPv4 address. At this time, the forwarding node in the IPv6 private network has two processing methods. One is: the forwarding node directly discards the message and does not send an IPv4-based ICMP error message to the forwarding node in the IPv4 network. The other is: the forwarding node sends an IPv6-based ICMP error message to the edge node of the IPv6 private network. The IPv6-based ICMP error message carries the IPv6 address of the forwarding node, and the edge node receives the IPv6-based ICMP error message. When the error message is sent, the error message needs to be forwarded to the forwarding node in the IPv4 network. However, since the edge node receives an IPv6-based ICMP error message and the network that needs to be advertised is an IPv4 network, the edge node will also discard the IPv6-based ICMP error message at this time. Both of these processing methods will cause the forwarding node in the IPv4 network to be unable to detect errors in forwarding the packet in the IPv6 private network.
基于此,本申请实施例提供了一种报文转发方法。该方法一方面能够实现IPv6专用网络中的转发节点向IPv4网络中的节点通告报文转发情况。另一方面如果IPv6网络中的转发节点配置有IPv4地址,但是该转发节点不愿意将该IPv4地址暴露在网络中,此时通过该方法也能实现该转发节点向IPv4网络中的节点通告报文转发情况。Based on this, embodiments of this application provide a message forwarding method. On the one hand, this method can realize the forwarding node in the IPv6 private network to notify the node in the IPv4 network of the packet forwarding situation. On the other hand, if the forwarding node in the IPv6 network is configured with an IPv4 address, but the forwarding node is unwilling to expose the IPv4 address to the network, this method can also be used to advertise packets to nodes in the IPv4 network. Forwarding status.
下面对本申请实施例提供的报文转发系统、报文转发方法以及相关装置进行详细解释说明。The message forwarding system, message forwarding method and related devices provided by the embodiments of the present application are explained in detail below.
图4是本申请实施例提供的一种报文转发系统的架构示意图。如图4所示,该报文转发系统包括第一转发节点401、第二转发节点402和第三转发节点403。第一转发节点401与第二转发节点402之间通信,第二转发节点402与第三转发节点403之间通信。Figure 4 is a schematic architectural diagram of a message forwarding system provided by an embodiment of the present application. As shown in Figure 4, the message 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.
其中,第一转发节点401为IPv6网络的边缘节点,第二转发节点402位于IPv6网络,第三转发节点403位于IPv4网络。第二转发节点402位于IPv6网络可以理解为:第二转发 节点402为IPv6网络的中间节点。也即是,IPv6网络中的转发节点包括边缘节点和中间节点,边缘节点用于和其他网络内的转发节点进行通信,中间节点只与同一网络中的转发节点进行通信。第三转发节点403位于IPv4网络同样可以理解为:第三转发节点403为IPv4网络的中间节点。Among them, the first forwarding node 401 is an edge node of the IPv6 network, the second forwarding node 402 is located in the IPv6 network, and the third forwarding node 403 is located in the IPv4 network. The second forwarding node 402 located in the IPv6 network can be understood as: 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 forwarding nodes in other networks, and the intermediate nodes only communicate with forwarding nodes in the same network. It can also be understood that the third forwarding node 403 is located in the IPv4 network: the third forwarding node 403 is an intermediate node of the IPv4 network.
在本申请实施例中,IPv6网络可以为IPv6专用网络。IPv6专用网络中的中间节点仅仅具备IPv6地址,不具备IPv4地址。IPv6专用网络中的边缘节点同时具备IPv4地址和IPv6地址。In this embodiment of the present application, the IPv6 network may be an IPv6 dedicated network. The intermediate nodes in the IPv6 private network only have IPv6 addresses and do not have IPv4 addresses. Edge nodes in IPv6 private networks have both IPv4 addresses and IPv6 addresses.
其中,中间节点不具备IPv4地址可以是指:在IP地址分配时,并没有为中间节点配置IPv4地址,这种情况下,中间节点自然不具备IPv4地址。换句话说,对于IPv6专用网络中的中间节点,并没有为该中间节点配置IPv4地址。Among them, the intermediate node does not have an IPv4 address may mean that when the IP address is allocated, the IPv4 address is not configured for the intermediate node. In this case, the intermediate node naturally does not have an IPv4 address. In other words, for the intermediate node in the IPv6 private network, the IPv4 address is not configured for the intermediate node.
需要说明的是,在本申请实施例中,转发节点不具备IPv4地址,除了可以为上述IPv6专用网络中的中间节点这种情况外,还可以包括另外一种情况。该情况为:为该转发节点配置有IPv4地址,但是该IPv4地址在某些场景下不对外使用,也即该IPv4地址并没有暴露在网络中。It should be noted that in the embodiment of the present application, the forwarding node does not have an IPv4 address. In addition to the above-mentioned intermediate node in the IPv6 dedicated network, it may also include another situation. This situation is: the forwarding node is configured with an IPv4 address, but the IPv4 address is not used externally in some scenarios, that is, the IPv4 address is not exposed on the network.
需要说明的是,图4所示的报文转发系统中的节点用于示例说明,该报文转发系统示例地还可以包括其他节点,在此不再一一举例说明。It should be noted that the nodes in the message forwarding system shown in Figure 4 are used for illustration. The message forwarding system may also include other nodes, and examples will not be given one by one here.
图5是本申请实施例提供的另一种报文转发系统的架构示意图。如图5所示,该报文转发系统包括五个转发节点,图5中分别标记为CE1、PE1、P、PE2、CE2。Figure 5 is a schematic architectural diagram of another message forwarding system provided by an embodiment of the present application. As shown in Figure 5, the message forwarding system includes five forwarding nodes, which are marked CE1, PE1, P, PE2, and CE2 in Figure 5.
其中,CE1和CE2位于IPv4网络,PE1和PE2为IPv6专用网络的边缘节点,P为IPv6专用网络的中间节点。基于此,CE1与PE1之间通信,PE1和PE2分别与P之间通信,PE2与CE2之间通信。Among them, CE1 and CE2 are located in the IPv4 network, PE1 and PE2 are edge nodes of the IPv6 private network, and P is the intermediate node of the IPv6 private network. Based on this, CE1 communicates with PE1, PE1 and PE2 communicate with P respectively, and PE2 communicates with CE2.
这种场景下,图4中的第一转发节点401可以为图5中的PE1,第二转发节点402可以为图5中的P,第三转发节点403可以为图5中的CE1。可选地,图4中的第一转发节点401可以为图5中的PE2,第二转发节点402可以为图5中的P,第三转发节点403可以为图5中的CE2。In this scenario, the first forwarding node 401 in Figure 4 can be PE1 in Figure 5 , the second forwarding node 402 can be P in Figure 5 , and the third forwarding node 403 can be CE1 in Figure 5 . Optionally, the first forwarding node 401 in Figure 4 may be PE2 in Figure 5, the second forwarding node 402 may be P in Figure 5, and the third forwarding node 403 may be CE2 in Figure 5.
需要说明的是,本申请实施例涉及的转发节点可以为具有网络层功能的网元,如路由器、三层交换机等。在此不再一一举例说明。It should be noted that the forwarding node involved in the embodiment of this application may be a network element with network layer functions, such as a router, a layer 3 switch, etc. No more examples will be given here.
图6是本申请实施例提供的一种报文转发方法流程图。如图6所示,该报文转发方法包括如下几个步骤。Figure 6 is a flow chart of a message forwarding method provided by an embodiment of the present application. As shown in Figure 6, the message forwarding method includes the following steps.
步骤601:第三转发节点向第一转发节点发送第一报文,第一报文为IPv4报文。其中,第三转发节点位于IPv4网络,第一转发节点为IPv6网络的边缘节点。Step 601: The third forwarding node sends a first message to the first forwarding node, and the first message is an IPv4 message. Among them, the third forwarding node is located in the IPv4 network, and the first forwarding node is an edge node of the IPv6 network.
第一报文可以为业务流中的业务报文,也可以为路径追踪场景下的路径追踪报文。The first message may be a service message in the service flow, or may be a path tracing message in a path tracing scenario.
第一报文为IPv4报文,可以理解为:第一报文包括IPv4报文头和载荷,IPv4报文头携带载荷对应的源地址和目的地址,该源地址和目的地址均为IPv4地址。基于此,第一报文为需要发送至IPv4网络的报文。其中,载荷对应的源地址可以理解为生成载荷对应的数据的通信端的地址。载荷对应的目的地址可以理解为需要将载荷发送到的目的通信端的地址。The first message is an IPv4 message, which can be understood as: the first message includes an IPv4 header and a payload. The IPv4 header carries the source address and destination address corresponding to the payload. The source address and destination address are both IPv4 addresses. Based on this, the first message is a message that needs to be sent to the IPv4 network. Among them, the source address corresponding to the payload can be understood as the address of the communication end that generates 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.
另外,由于第一转发节点为IPv6网络的边缘节点,因此第一报文为需要穿越IPv6网络发送至IPv4网络的报文。 In addition, since the first forwarding node is an edge node of the IPv6 network, the first packet is a packet that needs to be sent to the IPv4 network across the IPv6 network.
示例地,对于图5所示的报文转发系统,第三转发节点为CE1,第一转发节点为PE1。第一报文为CE1向CE2发送的报文,第一报文中载荷对应的源地址为CE1的IPv4地址,载荷对应的目的地址为CE2对应的IPv4地址。该报文需要通过PE1发送至CE2,因此当CE1确定出第一报文时,CE1将第一报文发送至PE1。For example, in the packet forwarding system shown in Figure 5, the third forwarding node is CE1 and the first forwarding node is PE1. The first message is a message sent by CE1 to CE2. 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. This message needs to be sent to CE2 through PE1, so when CE1 determines the first message, CE1 sends the first message to PE1.
步骤602:第一转发节点接收第一报文,基于第一报文生成第二报文,并向第二转发节点发送第二报文,第二报文为IPv6报文。其中,第二转发节点位于IPv6网络。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. Wherein, the second forwarding node is located in the IPv6 network.
由于第一报文为IPv4报文,而第一转发节点为IPv6网络的边缘节点,因此第一转发节点在接收到第一报文时,需要将第一报文发送至该IPv6网络中的第二转发节点,以通过第二转发节点将第一报文发送至IPv4网络中的目的地。Since the first message is an IPv4 message, and the first forwarding node is an edge node of the IPv6 network, when receiving the first message, the first forwarding node needs to send the first message to the third node in the IPv6 network. Two forwarding nodes, to send the first message to the destination in the IPv4 network through the second forwarding node.
在一些实施例中,第一报文可能只包括一个IPv4报文头和载荷,此时该IPv4报文头携带的源地址和目的地址分别为载荷对应的源地址和目的地址。这种场景下,第一转发节点基于第一报文生成第二报文的实现过程可以为:第一转发节点在第一报文的外层封装IPv6报文头,得到第二报文。该IPv6报文头携带的源地址为第一转发节点的IPv6地址,该IPv6报文头携带的目的地址为该IPv6网络中另一个转发节点的IPv6地址。第一转发节点基于IPv6报文头中的目的地址查找转发表得到转发第二报文的出接口(也即下一跳接口),该下一跳接口为第一转发节点上与第二转发节点进行通信的接口,然后第一转发节点将第二报文通过查找到的下一跳接口发送,以实现将第二报文发送至第二转发节点。In some embodiments, the first packet may only include an IPv4 packet header and a payload. In this case, the source address and destination address carried by the IPv4 packet header are the source address and destination address corresponding to the payload respectively. In this scenario, the implementation process of the first forwarding node generating the second message based on the first message may be: the first forwarding node encapsulates the IPv6 header in the outer layer of the first message to obtain the second message. The source address carried in the IPv6 packet header is the IPv6 address of the first forwarding node, and the destination address carried in the IPv6 packet header is the IPv6 address of another forwarding node in the IPv6 network. The first forwarding node searches the forwarding table based on the destination address in the IPv6 message header to obtain the outbound interface (that is, the next hop interface) for forwarding the second message. The next hop interface is between the first forwarding node and the second forwarding node. An interface for communication, 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.
示例地,对于图5所示的报文转发系统,第三转发节点为CE1,第一转发节点为PE1。第一报文为CE1向CE2发送的报文。PE1接收到第一报文时,基于第一报文生成的第二报文中的IPv6报文头的源地址为PE1的IPv6地址,目的地址为PE2的IPv6地址。第一转发节点基于IPv6报文头中的PE2的IPv6地址查找转发表得到下一跳接口,该下一跳接口为PE1上与P进行通信的接口,然后PE1将第二报文通过查找到的下一跳接口发送,以实现将第二报文发送至P,进而通过P发送至PE2。For example, in the packet forwarding system shown in Figure 5, 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 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 searches the forwarding table based on the IPv6 address of PE2 in the IPv6 packet header to obtain the next hop interface. The next hop interface is the interface on PE1 that communicates with P. Then PE1 passes the second packet through the found The next hop interface is used to send the second message to P, and then to PE2 through P.
在另一些实施例中,第一报文可能包括一个外层IPv4报文头,一个内层IPv4报文头和载荷,该内层IPv4报文头携带的源地址和目的地址分别为载荷对应的源地址和目的地址,该外层IPv4报文头携带的源地址和目的地址分别为报文转发路径上其他节点的地址。比如,在图5所示的场景中,如果CE1和PE1之间部署有VPN网络,则该外层IPv4报文头携带的源地址和目的地址可以为该VPN网络中的VPN隧道的源地址和目的地址。这种场景下,第一转发节点基于第一报文生成第二报文的实现过程可以为:第一转发节点剥掉第一报文的外层IPv4报文头,然后在内层IPv4报文头和载荷的外层封装IPv6报文头,得到第二报文。该IPv6报文头携带的源地址和目的地址相关解释可以参考上一段内容,在此不再赘述。In other embodiments, the first message may include an outer IPv4 message header, an inner IPv4 message header and a payload. The source address and destination address carried by the inner IPv4 message header are respectively corresponding to the payload. Source address and destination address. The source address and destination address carried in the outer IPv4 packet header are respectively the addresses of other nodes on the packet forwarding path. For example, in the scenario shown in Figure 5, if a VPN network is deployed between CE1 and PE1, the source address and destination address carried in the outer IPv4 packet header can be the source address and destination address of the VPN tunnel in the VPN network. Destination address. In this scenario, the implementation process for the first forwarding node to generate the second message based on the first message can be as follows: the first forwarding node peels off the outer IPv4 header of the first message, and then sends the inner IPv4 message The outer layer of the header and payload encapsulates the IPv6 message header to obtain the second message. For explanations about the source address and destination address carried in the IPv6 packet header, please refer to the previous paragraph and will not be repeated here.
基于上述两种实施例,基于第一报文生成第二报文,可以理解为第二报文包括第一报文中的载荷以及携带载荷对应的源地址和目的地址的IPv4报文头。Based on the above two embodiments, the second message is generated based on the first message. It can be understood that the second message includes the payload in the first message and the IPv4 header carrying the source address and destination address corresponding to the payload.
步骤603:第二转发节点接收第二报文,并在确定当前不能继续转发第二报文,且第二报文具备IPv4报文报文头的情况下,基于第二报文生成第一控制消息,并向第一转发节点发送第一控制消息,第一控制消息为IPv6报文,且第一控制消息用于通告第二转发节点转发第二报文的情况。Step 603: The second forwarding node receives the second message, and generates the first control based on the second message after determining that it cannot continue to forward the second message and the second message has an IPv4 message header. message, and sends a first control message to the first forwarding node, where the first control message is an IPv6 message, and the first control message is used to notify the second forwarding node of forwarding the second message.
当第二转发节点确定当前不能继续转发第二报文时,为了便于第二报文的发送方(也即第一转发节点)及时了解到该情况,第二转发节点可以生成用于通告第二报文转发情况的第 一控制消息,并向第二报文的发送方发送第一控制消息。When the second forwarding node determines that it cannot continue to forward the second message, in order to facilitate the sender of the second message (that is, the first forwarding node) to learn the situation in a timely manner, the second forwarding node may generate a notification for the second message. The message forwarding situation is a control message, and sends the first control message to the sender of the second message.
在一些实施例中,第二转发节点确定当前不能继续转发第二报文的实现过程可以为:当第二报文的TTL为1时,第二转发节点则确定当前不能继续转发第二报文。比如,在当前为路径追踪(traceroute)场景,第一报文和第二报文均为路径追踪报文。In some embodiments, the implementation process by which the second forwarding node determines that it cannot continue to forward the second message may be: when the TTL of the second message is 1, the second forwarding node determines that it cannot continue to forward the second message. . For example, in the current path tracing (traceroute) scenario, the first message and the second message are both path tracing messages.
可选地,第二转发节点也可以在其他场景下确定当前不能继续转发第二报文。比如,第二报文的数据大小超过了第二转发节点的转发能力,此时第二转发节点也可以生成第一控制消息,以通告第二转发节点转发第二报文的情况。本申请实施例对第二转发节点当前不能继续转发第二报文的各种场景不再一一举例说明。Optionally, the second forwarding node may also determine that it cannot continue to forward the second message in other scenarios. For example, if the data size of the second message exceeds the forwarding capability of the second forwarding node, the second forwarding node may also generate a first control message to notify the second forwarding node of forwarding the second message. The embodiments of this application will not give examples one by one for various scenarios in which the second forwarding node is currently unable to continue forwarding the second message.
另外,在一些实施例中,第二转发节点基于第二报文生成第一控制消息的实现过程可以为:第二转发节点将第二报文中的全部或部分作为待生成的第一控制消息的载荷,然后基于确定的载荷生成第一控制消息。如此,后续第一转发节点在接收到第一控制消息时,对第一控制消息的载荷进行解析,便可确定第一控制消息是针对第二报文的控制消息,也即获悉到第一控制消息用于通告第二报文的转发情况。In addition, in some embodiments, the implementation process of the second forwarding node generating the first control message based on the second message may be: the second forwarding node uses all or part of the second message as the first control message to be generated. payload, and then generates a first control message based on the determined payload. In this way, when the first forwarding node subsequently receives the first control message, it parses the payload of the first control message and determines that the first control message is a control message for the second message, that is, it learns the first control message. The message is used to notify the forwarding status of the second message.
可选地,第二转发节点也可以通过其他方式基于第二报文生成第一控制消息,本申请实施例在此不再一一举例说明。Optionally, the second forwarding node may also generate the first control message based on the second message through other methods. The embodiments of this application will not be explained one by one here.
另外,在本申请实施例中,第二转发节点可以通过网络控制消息协议(internet control message protocol,ICMP)生成第一控制消息,以通过ICMP通告第二转发节点的报文转发情况。这种情况下,第一控制消息为ICMP报文,示例地可以为ICMP差错报文。关于ICMP报文的格式后续有详细说明,在此先不展开。In addition, in this embodiment of the present application, the second forwarding node may generate a first control message through Internet Control Message Protocol (ICMP) to notify the second forwarding node of the packet forwarding status through ICMP. In this case, the first control message is an ICMP message, which may be an ICMP error message, for example. The format of the ICMP message will be explained in detail later, so we will not go into it here.
可选地,第二转发节点也可以通过其他协议生成第一控制消息,以通告第二转发节点的报文转发情况。本申请实施例在此不再一一举例说明。Optionally, the second forwarding node may also generate the first control message through other protocols to notify the second forwarding node of the packet forwarding status. The embodiments of the present application will not be described one by one here.
下面对第一控制消息进行详细解释说明。The first control message will be explained in detail below.
(1)第一控制消息携带IPv6专用网络标识。(1) The first control message carries the IPv6 dedicated network identifier.
基于图4所示的网络架构可知,如果第二转发节点所在的IPv6网络为IPv6专用网络,则第二转发节点上没有配置IPv4地址。这种场景下,为了触发第一转发节点采用本申请实施例提供的方法向第三转发节点通告第二转发节点转发第二报文的情况,第二转发节点可以在第一控制消息中携带IPv6网络的IPv6专用网络标识,以便于第一转发节点基于该IPv6专用网络标识确定出第二转发节点不具备IPv4地址,进而采用本申请实施例提供的方法向第三转发节点通告第二转发节点转发第二报文的情况。Based on the network architecture shown in Figure 4, it can be seen that if the IPv6 network where the second forwarding node is located is an IPv6 dedicated network, no IPv4 address is configured on the second forwarding node. In this scenario, in order to trigger the first forwarding node to use the method provided by the embodiment of the present application to notify the third forwarding node of the second forwarding node forwarding the second message, the second forwarding node can carry IPv6 in the first control message. The IPv6 dedicated network identifier of the network, so that the first forwarding node determines that the second forwarding node does not have an IPv4 address based on the IPv6 dedicated network identifier, and then uses the method provided by the embodiment of the present application to notify the third forwarding node of forwarding by the second forwarding node. The situation of the second message.
其中,该IPv6专用网络标识用于标识第二转发节点所在的IPv6网络为一个IPv6专用网络。也即是,该IPv6专用网络标识用于指示第二转发节点所在的IPv6网络中的中间节点没有配置IPv4地址。The IPv6 dedicated network identifier is used to identify the IPv6 network where the second forwarding node is located as an IPv6 dedicated network. That is, the IPv6 dedicated network identifier is used to indicate that the intermediate node in the IPv6 network where the second forwarding node is located is not configured with an IPv4 address.
下面以第一控制消息为ICMP报文为例说明第一控制消息如何携带IPv6专用网络标识。The following takes the first control message as an ICMP message as an example to illustrate how the first control message carries the IPv6 dedicated network identifier.
为了便于理解,在此先对ICMP报文的基本格式进行解释说明。图7是本申请实施例提供的一种ICMP报文的格式示意图。如图7所示,该ICMP报文通常包括IP报文头(图7中简写为IP头)、ICMP报文头(图7中简写为ICMP头)以及ICMP数据。In order to facilitate understanding, the basic format of ICMP messages is explained here. Figure 7 is a schematic diagram of the format of an ICMP message provided by an embodiment of the present application. As shown in Figure 7, the ICMP message usually includes an IP header (abbreviated as IP header in Figure 7), an ICMP message header (abbreviated as ICMP header in Figure 7) and ICMP data.
其中,IP报文头为IPv4报文头或IPv6报文头,IPv4报文头或IPv6报文头携带目的地址和源地址,以指导ICMP报文的转发。ICMP报文头包括整个ICMP数据的校验和。可选地,ICMP报文头还可以包括IP报文头中的源地址、目的地址以及下一报文头部等字段的校验和。 另外,ICMP报文头中的包内容字段通常还包括源地址和目的地址,其中,ICMP报文头中的源地址为生成ICMP报文的节点的地址,ICMP报文头中的目的地址为该ICMP报文需要通告的节点的地址。ICMP数据用于承载ICMP报文的载荷。Among them, the IP header is an IPv4 header or an IPv6 header, and the IPv4 header or IPv6 header carries the destination address and source address to guide the forwarding of ICMP messages. The ICMP header includes the checksum of the entire ICMP data. Optionally, the ICMP message header may also include a checksum of the source address, destination address, and next message header fields in the IP message header. In addition, the packet content field in the ICMP message header usually also includes the source address and destination address. The source address in the ICMP message header is the address of the node that generated the ICMP message, and the destination address in the ICMP message header is The address of the node that needs to be advertised in the ICMP message. ICMP data is used to carry the payload of ICMP messages.
可选地,在请求评论(request for comments,RFC)4884中,如图7所示,还可以在ICMP数据的尾部增加扩展数据结构(extension data structure)。该扩展数据结构包括一个扩展报文头部(图7中简写为扩展头)和以及可变数量个的扩展对象,以对ICMP报文的功能进行扩展。Optionally, in request for comments (RFC) 4884, as shown in Figure 7, an extension data structure (extension data structure) can also be added at the end of the ICMP data. The extended data structure includes an extended message header (abbreviated as extension header in Figure 7) and a variable number of extended objects to extend the functions of the ICMP message.
基于上述ICMP报文的基本格式,在一些实施例中,第一控制消息为ICMP报文,且第一控制消息包括第一扩展对象,第一扩展对象携带IPv6专用网络标识。Based on the basic format of the above ICMP message, in some embodiments, the first control message is an ICMP message, and the first control message includes a first extension object, and the first extension object carries an IPv6 dedicated network identifier.
也即是,当第一控制消息为网络控制消息协议ICMP报文时,可以通过在ICMP报文的载荷尾部增加的第一扩展对象来携带IPv6专用网络标识。That is, when the first control message is a Network Control Message Protocol ICMP message, the IPv6 dedicated network identifier can be carried by the first extension object added at the end of the payload of the ICMP message.
示例地,图7中还示出了本申请实施例提供的一种扩展对象的格式示意图。如图7所示,扩展对象包括长度字段,对象标识字段,对象类型字段,入接口索引字段以及入接口地址字段等。此时,第一扩展对象中的对象标识字段可以用来承载IPv6专用网络标识。By way of example, FIG. 7 also shows a schematic format diagram of an extension object provided by an embodiment of the present application. As shown in Figure 7, the extended object includes a length field, an object identification field, an object type field, an incoming interface index field, an incoming interface address field, etc. At this time, the object identification field in the first extension object can be used to carry the IPv6 dedicated network identification.
可选地,也可以通过第一扩展对象中的其他字段来承载IPv6专用网络标识,在此不再一一举例说明。关于第一扩展对象中各个字段的相关说明可以参考RFC4884。Optionally, the IPv6 dedicated network identifier can also be carried through other fields in the first extension object, which will not be explained one by one here. For relevant descriptions of each field in the first extension object, please refer to RFC4884.
在另一些实施例中,第一控制消息为网络控制消息协议ICMP报文,且第一控制消息包括第一ICMP报文头,第一ICMP报文头携带IPv6专用网络标识。In some other embodiments, the first control message is a Network Control Message Protocol ICMP message, and the first control message includes a first ICMP header, and the first ICMP header carries an IPv6 dedicated network identifier.
也即是,当第一控制消息为网络控制消息协议ICMP报文时,可以不在ICMP报文的载荷尾部增加的第一扩展对象来携带IPv6专用网络标识,而是对ICMP报文头中的字段进行扩展以承载IPv6专用网络标识。That is, when the first control message is a Network Control Message Protocol ICMP message, the IPv6 dedicated network identifier may not be carried in the first extension object added at the end of the payload of the ICMP message, but instead the field in the ICMP message header may be Extended to carry IPv6 private network identities.
示例地,基于图7所示的ICMP报文头的格式,可以对第一ICMP报文头中的类型字段或代码字段进行扩展,以使类型字段或代码字段能够承载IPv6专用网络标识。For example, based on the format of the ICMP message header shown in Figure 7, the type field or code field in the first ICMP message header can be extended so that the type field or code field can carry the IPv6 dedicated network identifier.
可选地,也可以通过第一ICMP报文头中的其他字段来承载IPv6专用网络标识,在此不再一一举例说明。Optionally, the IPv6 dedicated network identifier can also be carried through other fields in the first ICMP message header, which will not be explained one by one here.
(2)第一控制消息携带第二转发节点的IPv6地址。(2) The first control message carries the IPv6 address of the second forwarding node.
为了能够向第一转发节点通告当前是第二转发节点无法继续转发第二报文,在本申请实施例中,第二转发节点在生成第一控制消息时,还可以在第一控制消息中携带第二转发节点的IPv6地址。In order to be able to notify the first forwarding node that the second forwarding node is currently unable to continue forwarding the second message, in the embodiment of the present application, when generating the first control message, the second forwarding node may also carry The IPv6 address of the second forwarding node.
在一些实施例中,第一控制消息为ICMP报文,且第一控制消息包括第二扩展对象,第二扩展对象携带第二转发节点的IPv6地址。In some embodiments, the first control message is an ICMP message, and the first control message includes a second extension object, and the second extension object carries the IPv6 address of the second forwarding node.
也即是,当第一控制消息为网络控制消息协议ICMP报文时,可以通过在ICMP报文的载荷尾部增加的第二扩展对象来携带第二转发节点的IPv6地址。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 through a second extension object added at the end of the payload of the ICMP message.
示例地,第二扩展对象的格式如图7所示,则可以通过第二扩展对象中的入接口地址字段来承载第二转发节点的IPv6地址。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 through the incoming interface address field in the second extension object.
可选地,也可以通过第二扩展对象中的其他字段来承载二转发节点的IPv6地址,在此不再一一举例说明。Optionally, the IPv6 address of the second forwarding node can also be carried through other fields in the second extension object, which will not be explained one by one here.
其中,第二扩展对象和前述的第一扩展对象可以为同一扩展对象,也可以为不同的扩展对象。本申请实施例对此没有限定。The second extension object and the aforementioned first extension object may be the same extension object, or they may be different extension objects. The embodiments of the present application are not limited to this.
在另一些实施例中,第一控制消息为ICMP报文,且第一控制消息包括第二ICMP报文 头,第二ICMP报文头携带第二转发节点的IPv6地址;In other embodiments, the first control message is an ICMP message, and the first control message includes a second ICMP message header, the second ICMP message header carries the IPv6 address of the second forwarding node;
也即是,当第一控制消息为网络控制消息协议ICMP报文时,可以不在ICMP报文的载荷尾部增加的第二扩展对象来携带第二转发节点的IPv6地址,而是对ICMP报文头中的字段进行扩展以承载第二转发节点的IPv6地址。That is, when the first control message is a Network Control Message Protocol ICMP message, the second extension object may not be added at the end of the payload of the ICMP message to carry the IPv6 address of the second forwarding node, but the IPv6 address of the second forwarding node may be carried in the header of the ICMP message. The fields in are extended to carry the IPv6 address of the second forwarding node.
示例地,基于图7所示的ICMP报文头的格式,可以对第一ICMP报文头中包内容字段进行扩展,以使该字段能够承载第二转发节点的IPv6地址。For example, based on the format of the ICMP message header shown in Figure 7, the packet content field in the first ICMP message header can be extended so that the field can carry the IPv6 address of the second forwarding node.
可选地,也可以通过第二ICMP报文头中的其他字段来承载第二转发节点的IPv6地址,在此不再一一举例说明。Optionally, the IPv6 address of the second forwarding node may also be carried through other fields in the second ICMP message header, which will not be explained one by one here.
此外,如图3所示的ICMP报文的格式可知,当第一控制消息为ICMP报文时,第一控制消息包括第一IPv6报文头,而第一IPv6报文头中携带的源地址为第二转发节点的IPv6地址。基于此,在另一些实施例中,可以不对ICMP报文进行扩展,这种情况下,当第二转发节点确定当前不能继续转发第二报文时,可以通过不扩展ICMP报文的方式生成第一控制消息。In addition, from the format of the ICMP message shown in Figure 3, when the first control message is an ICMP message, the first control message includes the first IPv6 header, and the source address carried in the first IPv6 header is the IPv6 address of the second forwarding node. Based on this, in other embodiments, the ICMP message may not be extended. In this case, when the second forwarding node determines that it cannot continue to forward the second message, it may generate the third ICMP message without extending the message. A control message.
需要说明的是,上述第一控制消息携带IPv6专用网络标识的各种可选方案,可以和第一控制消息携带第二转发节点的IPv6地址的各种可选方案组合使用。示例地,第一控制消息包括图7所示的扩展对象,通过扩展对象中的对象标识字段来承载IPv6专用网络标识,通过扩展对象中的入接口地址字段来承载第二转发节点的IPv6地址。其他的组合方案在此不再一一举例说明。It should be noted that the various options in which the first control message carries the IPv6 dedicated network identifier can be used in combination with the various options in which the first control message carries the IPv6 address of the second forwarding node. For example, the first control message includes the extended object shown in Figure 7, the IPv6 dedicated network identifier is carried through the object identification field in the extended object, and the IPv6 address of the second forwarding node is carried through the incoming interface address field in the extended object. Other combination schemes will not be explained one by one here.
此外,第一控制消息还可以不携带IPv6专用网络标识,仅仅通过上述任一方案携带第二转发节点的IPv6地址。在此同样不再一一举例说明。In addition, the first control message may not carry the IPv6 dedicated network identifier, but may only carry the IPv6 address of the second forwarding node through any of the above solutions. Here again no examples will be given one by one.
步骤604:第一转发节点接收第一控制消息,当第一转发节点确定第二转发节点不具备IPv4地址时,基于第一控制消息生成第二控制消息,并向第三转发节点发送第二控制消息,第二控制消息为IPv4报文,且第二控制报文携带第二转发节点的IPv6地址。Step 604: The first forwarding node receives the first control message. When the first forwarding node determines that the second forwarding node does not have an IPv4 address, it generates a second control message based on the first control message and sends the second control message to the third forwarding node. message, the second control message is an IPv4 message, and the second control message carries the IPv6 address of the second forwarding node.
由于第一控制消息用于通告第二转发节点转发第二报文的情况,而第二报文是基于第一报文生成的,因此第一转发节点在接收到第一控制消息时,需要向第一报文的发送方第三转发节点通告该报文转发情况。基于此,第一转发节点在接收到第一控制消息时,基于第一控制消息生成第二控制消息,以向第三转发节点发送第二控制消息。并且为了能够实现向第三转发节点通告第二转发节点转发报文的情况,需要在第二控制消息中携带第二转发节点的IPv6地址。Since the first control message is used to notify the second forwarding node of forwarding the second message, and the second message is generated based on the first message, when receiving the first control message, the first forwarding node needs to The third forwarding node, the sender of the first message, announces the forwarding status of the 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 to send the second control message to the third forwarding node. And in order to notify the third forwarding node that the second forwarding node forwards the message, the second control message needs to carry the IPv6 address of the second forwarding node.
另外,由于第三转发节点是IPv4网络中的节点,因此第二控制消息需要为IPv4报文,这样才能将第二控制消息发送至第三转发节点。因此,本申请实施例提供了一种方案,能够实现在IPv4报文格式的第二控制消息中携带第二转发节点的IPv6地址,以实现对向IPv4网络中的第三转发节点通告IPv6网络中的第二转发节点转发报文的情况。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 that the second control message can be sent to the third forwarding node. Therefore, the embodiment of the present application provides a solution that 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 notification of the IPv6 address to the third forwarding node in the opposite IPv4 network. The second forwarding node forwards the message.
另外,需要说明的是,由于IPv6网络中的一些节点还可能配置有IPv4地址,这种场景下,则无需通过本申请实施例提供的方法生成第二控制消息。因此,第一转发节点接收第一控制消息后,第一转发节点先判断第二转发节点是否具备IPv4地址,如果具备IPv4地址,则直接基于该IPv4地址向第三转发节点通告即可。当第一转发节点确定第二转发节点不具备IPv4地址时,第一转发节点则通过本申请实施例提供的方法基于第一控制消息生成第二控制消息,以实现在IPv4报文格式的第二控制消息中携带第二转发节点的IPv6地址。 In addition, it should be noted that since some nodes in the IPv6 network may also be configured with IPv4 addresses, in this scenario, there is no need to generate the second control message through the method provided by the embodiments of this application. Therefore, after the first forwarding node receives the first control message, the first forwarding node first determines whether the second forwarding node has an IPv4 address. If it has an IPv4 address, it can directly notify 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 a second control message based on the first control message through the method provided in the embodiment of the present application, so as to implement the second control message in the IPv4 message format. The control message carries the IPv6 address of the second forwarding node.
在一些实施例中,在第一控制消息携带IPv6专用网络标识的场景中,由于该IPv6专用网络标识指示第二转发节点所在的IPv6网络中的中间节点没有配置IPv4地址,也即是,第二转发节点所在的IPv6网络为IPv6专用网络,因此第一转发节点可以通过该IPv6专用网络标识确定出第二转发节点不具备IPv4地址。In some embodiments, in the scenario where the first control message carries an IPv6 dedicated network identifier, since the IPv6 dedicated network identifier indicates that the intermediate node in the IPv6 network where the second forwarding node is located does not have an IPv4 address configured, that is, the second forwarding node The IPv6 network where the forwarding node is located is an IPv6 dedicated network, so the first forwarding node can determine that the second forwarding node does not have an IPv4 address through the IPv6 dedicated network identifier.
基于此,第一转发节点确定第二转发节点不具备IPv4地址的实现过程可以为:第一转发节点解析第一控制消息,得到IPv6专用网络标识;第一转发节点基于该IPv6专用网络标识确定第二转发节点不具备IPv4地址。Based on this, the implementation process of the first forwarding node determining that the second forwarding node does not have an IPv4 address may be: the first forwarding node parses the first control message to obtain the IPv6 dedicated network identifier; the first forwarding node determines the second forwarding node based on the IPv6 dedicated network identifier. The second forwarding node does not have an IPv4 address.
其中,第一转发节点解析第一控制消息得到IPv6专用网络标识的详细实现方式,与第一控制消息如何携带IPv6专用网络标识的相关。在此以下述两种场景为例说明,其他场景下的解析过程同样可以参考下述示例,不再一一举例说明。The detailed implementation method of the first forwarding node parsing the first control message to obtain the IPv6 dedicated network identifier is related to how the first control message carries the IPv6 dedicated network identifier. Here, the following two scenarios are used as examples. The parsing process in other scenarios can also refer to the following examples, and will not be explained one by one.
示例地,在第一控制消息为ICMP报文,且第一控制消息包括第一扩展对象,第一扩展对象携带IPv6专用网络标识的场景中,第一转发节点可以通过解析第一扩展对象得到IPv6专用网络标识。For example, in a scenario where the first control message is an ICMP message, and the first control message includes a first extension object, and the first extension object carries an IPv6 dedicated network identifier, the first forwarding node can obtain the IPv6 by parsing the first extension object. Private network identifier.
又示例地,在第一控制消息为ICMP报文,且第一控制消息包括第一ICMP报文头,第一ICMP报文头携带IPv6专用网络标识的场景中,第一转发节点可以通过解析第一ICMP报文头得到IPv6专用网络标识。As another example, in a scenario where the first control message is an ICMP message, and the first control message includes a first ICMP header, and the first ICMP header carries an IPv6 dedicated network identifier, the first forwarding node may parse the first An ICMP header obtains the IPv6 private network identification.
在另一些实施例中,网络管理员可以预先在第一转发节点上配置与第二转发节点所在的IPv6网络对应的IPv6专用网络标识。这种场景下,第一转发节点确定第二转发节点不具备IPv4地址的实现过程可以为:第一转发节点获取本地存储的IPv6专用网络标识,该IPv6专用网络标识指示第二转发节点所在的IPv6网络中的中间节点没有配置IPv4地址,如此第一转发节点基于该IPv6专用网络标识便可确定第二转发节点不具备IPv4地址。In other embodiments, the network administrator may configure the first forwarding node in advance with an IPv6 dedicated network identifier corresponding to the IPv6 network where the second forwarding node is located. In this scenario, the implementation process for the first forwarding node to determine that the second forwarding node does not have an IPv4 address may be: the first forwarding node obtains a locally stored IPv6 dedicated network identifier, and the IPv6 dedicated network identifier indicates the IPv6 address where the second forwarding node is located. The intermediate node in the network is not configured with 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 dedicated network identifier.
其中,第一转发节点获取本地存储的IPv6专用网络标识的实现方式可以为:第一转发节点基于第一控制消息确定第二转发节点所在的IPv6网络的网络前缀,然后从本地存储中获取与该网络前缀对应的IPv6专用网络标识。The implementation method for the first forwarding node to obtain the locally stored IPv6 dedicated network identifier may 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 network prefix corresponding to the IPv6 network identifier from the local storage. The IPv6 dedicated network identifier corresponding to the network prefix.
示例地,第一转发节点基于所述第一控制消息确定第二转发节点所在的IPv6网络的网络前缀的实现过程可以为:第一转发节点解析第一控制消息的IPv6报文头中的源地址,该源地址即为第二转发节点的IPv6地址,第一转发节点基于第二转发节点的IPv6地址便可确定该IPv6网络的网络前缀。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 may be: the first forwarding node parses the source address in the IPv6 header of the first control message. , the source address 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.
网络前缀是唯一标识一个网络的网络号,因此网络管理员在第一转发节点上配置与第二转发节点所在的IPv6网络对应的IPv6专用网络标识时,可以建立该IPv6网络的网络前缀和该IPv6专用网络标识之间的对应关系,以便于后续第一转发节点基于网络前缀索引到该IPv6专用网络标识。The network prefix is a network number that uniquely identifies a network. Therefore, when the network administrator configures the IPv6 dedicated network identifier corresponding to the IPv6 network where the second forwarding node is located on the first forwarding node, the network prefix of the IPv6 network and the IPv6 Correspondence between dedicated network identifiers, so that the first forwarding node can subsequently find the IPv6 dedicated network identifier based on the network prefix index.
可选地,在某些场景下,第二转发节点上配置有IPv4地址,但是第二转发节点在生成第一控制消息时出于某些原因并不愿意将IPv4地址暴露在网络中,此时第一控制消息并不会携带第二转发节点的IPv4地址。这种场景下,第一转发节点在接收到第一控制消息时,第一控制消息没有携带IPv6专用网络标识,且第一转发节点也没有从本地存储中获取到该IPv6专用网络标识,此时第一转发节点也可以确定第二转发节点不具备IPv4地址。Optionally, in some scenarios, the second forwarding node is configured with an IPv4 address, but when generating the first control message, the second forwarding node is unwilling to expose the IPv4 address to the network for some reasons. In this case 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 dedicated network identifier, and the first forwarding node does not obtain the IPv6 dedicated network identifier from local storage. At this time The first forwarding node may also determine that the second forwarding node does not have an IPv4 address.
因此,在本申请实施例中,第一转发节点确定出不具备IPv4地址的第二转发节点满足以下两种情况之一。一种是第二转发节点所在的IPv6网络中的中间节点没有配置IPv4地址。 另一种是第二转发节点配置有IPv4地址,但第二转发节点的IPv4地址不对外使用。Therefore, in this embodiment of the present application, the first forwarding node determines that the second forwarding node that does not have 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.
另外,在本申请实施例中,为了能够实现向第三转发节点通告第二转发节点转发报文的情况,需要在第二控制消息中携带第二转发节点的IPv6地址。基于此,第一转发节点在生成第二控制消息之前,需要先获取到第二转发节点的IPv6地址。In addition, in this embodiment of the present application, in order to notify the third forwarding node that the second forwarding node forwards the packet, the second control message needs to carry the IPv6 address of the second forwarding node. Based on this, before generating the second control message, the first forwarding node needs to obtain the IPv6 address of the second forwarding node.
下面对第一转发节点如何获取第二转发节点的IPv6地址并生成第二控制消息的过程进行详细说明。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.
在一些实施例中,在第一控制消息携带第二转发节点的IPv6地址的场景中,第一转发节点基于第一控制消息生成第二控制消息的实现过程可以为:第一转发节点从第一控制消息中获取第二转发节点的IPv6地址,以生成第二控制消息。In some embodiments, in a 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 may be: the first forwarding node generates the second control message from the first forwarding node. Obtain the IPv6 address of the second forwarding node from the control message to generate the second control message.
其中,第一转发节点从第一控制消息中获取第二转发节点的IPv6地址的实现方式,与第一控制消息携带第二转发节点的IPv6地址的方式有关。在此以下述三种场景为例说明,其他场景下的获取过程同样可以参考下述示例,不再一一举例说明。The implementation manner in which the first forwarding node obtains 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. Here, the following three scenarios are used as examples. The acquisition process in other scenarios can also refer to the following examples, and will not be explained one by one.
示例地,在第一控制消息为ICMP报文,且第一控制消息包括第二扩展对象,第二扩展对象携带第二转发节点的IPv6地址的场景中,第一转发节点从第一控制消息中获取第二转发节点的IPv6地址的实现过程可以为:第一转发节点从第二扩展对象中获取第二转发节点的IPv6地址。For example, in a scenario where the first control message is an ICMP message, and the first control message includes a second extension object, and the second extension object carries the IPv6 address of the second forwarding node, the first forwarding node obtains the IPv6 address from the first control message. The implementation process of obtaining the IPv6 address of the second forwarding node may be: the first forwarding node obtains the IPv6 address of the second forwarding node from the second extension object.
比如,当第二扩展对象包括入接口地址字段时,第一转发节点可以从第二扩展对象入接口地址字段中获取第二转发节点的IPv6地址。For example, when the second extension object includes the incoming interface address field, the first forwarding node can obtain the IPv6 address of the second forwarding node from the incoming interface address field of the second extension object.
又示例地,在第一控制消息为ICMP报文,且第一控制消息包括第二ICMP报文头,第二ICMP报文头携带第二转发节点的IPv6地址的场景中,第一转发节点从第一控制消息中获取第二转发节点的IPv6地址的实现方式可以为:第一转发节点从第二ICMP报文头中获取第二转发节点的IPv6地址。As another example, in a scenario where the first control message is an ICMP message, and the first control message includes a second ICMP header, and the second ICMP header carries the IPv6 address of the second forwarding node, the first forwarding node The implementation method of obtaining the IPv6 address of the second forwarding node in the first control message may be: the first forwarding node obtains the IPv6 address of the second forwarding node from the second ICMP message header.
比如,当第二ICMP报文头包括包内容字段时,第一转发节点可以从第二ICMP报文头的包内容字段中获取第二转发节点的IPv6地址。For example, when the second ICMP message header includes a packet content field, the first forwarding node may obtain the IPv6 address of the second forwarding node from the packet content field of the second ICMP message header.
又示例地,在第一控制消息包括第一IPv6报文头,第一IPv6报文头携带第二转发节点的IPv6地址的场景中,第一转发节点从第一控制消息中获取第二转发节点的IPv6地址的实现方式为:第一转发节点从第一IPv6报文头中获取第二转发节点的IPv6地址。As another example, in a scenario where the first control message includes a first IPv6 header and the first IPv6 header carries the IPv6 address of the second forwarding node, the first forwarding node obtains the second forwarding node from the first control message. The IPv6 address is implemented as follows: the first forwarding node obtains the IPv6 address of the second forwarding node from the first IPv6 message header.
其中,第一IPv6报文头的源地址即为第二转发节点的IPv6地址。Wherein, the source address of the first IPv6 message header is the IPv6 address of the second forwarding node.
在另一些实施例中,网络管理员可以预先在第一转发节点上配置第二转发节点的IPv6地址,也即,第一转发节点本地存储有第二转发节点IPv6地址。这种场景下,第一转发节点基于第一控制消息生成第二控制消息的实现过程为:第一转发节点获取本地存储的第二转发节点IPv6地址,以基于第一控制消息和第二转发节点的IPv6地址,生成第二控制消息。In other embodiments, the network administrator may configure the IPv6 address of the second forwarding node on the first forwarding node in advance, that is, the first forwarding node locally stores the IPv6 address of the second forwarding node. In this scenario, the implementation process of the first forwarding node generating the second control message based on the first control message is: 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 second forwarding node. The IPv6 address generates a second control message.
其中,网络管理员在第一转发节点上配置第二转发节点的IPv6地址时,可以建立第二转发节点的IPv6地址和入接口之间对应关系,第一转发节点基于接收第一控制消息的入接口,便可从本地存储中索引到第二转发节点的IPv6地址。可选地,第一转发节点也可以通过其他方式获取存储的第二转发节点的IPv6地址,本申请实施例对此不做限定。When the network administrator configures the IPv6 address of the second forwarding node on the first forwarding node, the network administrator can establish a corresponding relationship between the IPv6 address of the second forwarding node and the incoming interface. interface, the IPv6 address of the second forwarding node can be indexed from local storage. Optionally, the first forwarding node may also obtain the stored IPv6 address of the second forwarding node through other methods, which is not limited in this embodiment of the present application.
另外,在本申请实施例中,为了能够实现向第三转发节点通告第二转发节点转发报文的情况,需要在第二控制消息中携带第二转发节点的IPv6地址。第二控制消息中携带第二转发节点的IPv6地址的实现方式可以有以下几种。 In addition, in this embodiment of the present application, in order to notify the third forwarding node that the second forwarding node forwards the packet, the second control message needs to carry the IPv6 address of the second forwarding node. The following implementation methods may be used to carry the IPv6 address of the second forwarding node in the second control message.
在一些实施例中,第二控制消息为ICMP报文,且第二控制消息包括第三扩展对象,第三扩展对象携带第二转发节点的IPv6地址。In some embodiments, the second control message is an ICMP message, and the second control message includes a third extension object, and the third extension object carries the IPv6 address of the second forwarding node.
在另一些实施例中,第二控制消息为网络控制消息协议ICMP报文,且第一控制消息包括第三ICMP报文头,第三ICMP报文头携带第二转发节点的IPv6地址。In some other embodiments, the second control message is a Network Control Message Protocol ICMP message, and the first control message includes a third ICMP header, and the third ICMP header carries the IPv6 address of the second forwarding node.
上述第二控制消息携带第一转发节点的IPv6地址的具体实现方式,可以参考第一控制消息中通过扩展对象或ICMP报文头携带第二转发节点的IPv6地址的实现方式,在此不再赘述。For the specific implementation method of carrying the IPv6 address of the first forwarding node in the second control message, please refer to the implementation method of carrying the IPv6 address of the second forwarding node in the first control message through an extension object or ICMP message header, which will not be described again here. .
需要说明的是,由于第一控制消息包括第一IPv6报文头,因此第一控制消息还可以在第一IPv6报文头携带第二转发节点的IPv6地址。但是第二控制消息为IPv4报文,因此第二控制消息不包括IPv6报文头,如此第二控制消息需要通过扩展对象或扩展的ICMP报文头或其他扩展方式来携带第二转发节点的IPv6地址。It should be noted that, since the first control message includes the first IPv6 packet header, the first control message may also carry the IPv6 address of the second forwarding node in the first IPv6 packet header. However, the second control message is an IPv4 message, so the second control message does not include an IPv6 header. Therefore, the second control message needs to carry the IPv6 of the second forwarding node through an extended object or an extended ICMP header or other extension methods. address.
另外,在本申请实施例中,如果第二转发节点所在带IPv6网络为一个IPv6专用网络,第二控制消息中还可以携带IPv6专用网络标识,该IPv6专用网络标识指示第二转发节点所在IPv6网络中的中间节点没有配置IPv4地址。其中,第二转发节点携带IPv6专用网络标识的实现方式可以有以下几种。In addition, in this embodiment of the present application, if the IPv6 network where the second forwarding node is located is an IPv6 dedicated network, the second control message may also carry an IPv6 dedicated network identifier, and the IPv6 dedicated network identifier indicates the IPv6 network where the second forwarding node is located. The intermediate nodes in are not configured with IPv4 addresses. Among them, the second forwarding node can carry the IPv6 dedicated network identifier in the following ways.
在一些实施例中,第二控制消息为ICMP报文,且第二控制消息包括第四扩展对象,第四扩展对象携带IPv6专用网络标识。In some embodiments, the second control message is an ICMP message, and the second control message includes a fourth extension object, and the fourth extension object carries the IPv6 dedicated network identifier.
在另一些实施例中,第二控制消息为ICMP报文,且第二控制消息包括第四ICMP报文头,第四ICMP报文头携带IPv6专用网络标识。In some other embodiments, the second control message is an ICMP message, and the second control message includes a fourth ICMP header, and the fourth ICMP header carries the IPv6 dedicated network identifier.
上述第二控制消息携带IPv6专用网络标识的具体实现方式,可以参考第一控制消息中通过扩展对象或ICMP报文头携带IPv6专用网络标识的实现方式,在此不再赘述。For a specific implementation method of carrying the IPv6 dedicated network identifier in the second control message, please refer to the implementation method of carrying the IPv6 dedicated network identifier in the first control message through an extension object or an ICMP message header, which will not be described again here.
上述以第二控制消息为ICMP报文为例说明第二控制消息如何携带第二转发节点的IPv6地址和IPv6专用网络标识。可选地,当通过其他协议实现第二控制消息时,同样可以对其他协议下的第二控制消息进行扩展,以使第二控制消息携带第二转发节点的IPv6地址和IPv6专用网络标识,在此同样不做详细说明。The above description takes the second control message as an ICMP message as an example to illustrate how the second control message carries the IPv6 address and IPv6 dedicated network identifier of the second forwarding node. Optionally, when the second control message is implemented through other protocols, the second control message under other protocols can also be extended so that the second control message carries the IPv6 address and IPv6 dedicated network identifier of the second forwarding node. This is also not explained in detail.
步骤605:第三转发节点接收第二控制消息,并基于第二控制消息确定第二转发节点转发第一报文的情况。Step 605: The third forwarding node receives the second control message, and determines whether the second forwarding node forwards the first message based on the second control message.
第三转发节点在向第一转发节点发送第一报文后,基于前述步骤602-步骤604,第三转发节点将接收第一转发节点发送的第二控制消息。基于步骤604可知,第二控制消息为IPv4报文且第二控制消息携带第二转发节点的IPv6地址。After the third forwarding node sends the first message to the first forwarding node, based on the aforementioned steps 602 to 604, the third forwarding node will receive the second control message sent by the first forwarding node. Based on step 604, it can be seen that the second control message is an IPv4 message and the second control message carries the IPv6 address of the second forwarding node.
由于第二控制消息携带第二转发节点的IPv6地址,因此第三转发节点在接收到第一转发节点发送的第二控制消息时,基于第二转发节点的IPv6地址可以了解到是第二转发节点触发第一转发节点发送第二控制消息的,以借助第一转发节点通告第二转发节点转发第一报文的情况。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, it can know that it is the second forwarding node based on the IPv6 address of the second forwarding node. The first forwarding node is triggered to send the second control message to notify the second forwarding node of forwarding the first message through the first forwarding node.
示例地,第二控制消息指示第一报文到达第二转发节点时,第一报文的生存时间TTL超时。也即是,第二控制消息用于通告第二转发节点转发第一报文出错,且出错原因为第一报文的生存时间TTL超时。For example, the second control message indicates that when the first packet reaches the second forwarding node, the TTL of the first packet expires. That is, the second control message is used to notify the second forwarding node that there is an error in forwarding the first message, and the cause of the error is that the TTL of the first message has expired.
比如,路径追踪场景中,第一报文为路径追踪报文,第三转发节点在向第一转发节点发送一个路径追踪报文后,当第三转发节点接收到第二控制消息时,基于第二控制消息携带的 第二转发节点的IPv6地址便可确定该路径追踪报文传输至第二转发节点时路径追踪报文中的TTL为1,因此第二转发节点不能继续转发该路径追踪报文。也即基于第二控制消息携带的第二转发节点的IPv6地址便可确定第二转发节点未能继续转发第一报文。For example, in the path tracing scenario, the first message is a path tracing message. After the third forwarding node sends a path tracing message to the first forwarding node, when the third forwarding node receives the second control message, it will 2. Control messages carried The IPv6 address of the second forwarding node can determine that the TTL in the path tracing message is 1 when the path tracing message is transmitted to the second forwarding node, so the second forwarding node cannot continue to forward the path tracing message. That is, based on the IPv6 address of the second forwarding node carried in the second control message, it can be determined that the second forwarding node cannot continue to forward the first message.
此外,在为了便于网络管理员及时了解第二转发节点转发第一报文的情况,第三转发节点基于第二控制消息确定第二转发节点转发第一报文的情况之后,第三转发节点还可以进一步解析第二控制消息,得到第二转发节点的IPv6地址;然后第三转发节点显示第二转发节点的IPv6地址。In addition, after the third forwarding node determines the situation of the second forwarding node forwarding the first message based on the second control message in order to facilitate the network administrator to timely understand the situation of the second forwarding node forwarding the first message, the third forwarding node also The second control message can be further parsed to obtain the IPv6 address of the second forwarding node; and then the third forwarding node displays the IPv6 address of the second forwarding node.
示例地,在路径追踪场景中,第三转发节点在显示第二转发节点的IPv6地址时还可以显示第三转发节点发送的第一报文的初始TTL的数值。以便于网络管理员确定该TTL数值的路径追踪报文追踪的节点。For example, in a path tracing scenario, when displaying the IPv6 address of the second forwarding node, the third forwarding node may also display the value of the initial TTL of the first packet sent by the third forwarding node. This allows the network administrator to determine the node traced by the path tracing packet with this TTL value.
比如,假设第三转发节点为图5所示的架构中的CE1,第一转发节点为PE1,第二转发节点为P,则CE1在路径追踪场景中,可以显示图8所示的追踪结果。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 CE1 can display the tracking results shown in Figure 8 in the path tracing scenario.
如图8所示,路径追踪的目的地址为CE2的IPv4地址2.2.2.2(图8中显示为tracert 2.2.2.2)。也即,CE1发起的所有第一报文(也即路径追踪报文)中的载荷的目的地址均为2.2.2.2。As shown in Figure 8, the destination address of path tracing is the IPv4 address 2.2.2.2 of CE2 (shown as tracert 2.2.2.2 in Figure 8). That is, the destination address of the payload in all first messages (ie, path tracing messages) initiated by CE1 is 2.2.2.2.
当第一报文中的TTL为1时,追踪到的节点为PE1,因此显示PE1的IPv4地址100.1.1.1。图8中第二行的3个1毫秒(ms)指示CE1分别发送了三个TTL为1的第一报文,每个1ms指示发送相应第一报文后到接收到第二控制消息之间的时长。When the TTL in the first packet is 1, the tracked node is PE1, so the IPv4 address of PE1 is 100.1.1.1. The three 1 milliseconds (ms) in the second line in Figure 8 indicate that CE1 sent three first messages with a TTL of 1 respectively. Each 1ms indicates the time between sending the corresponding first message and receiving the second control message. of duration.
当第一报文中的TTL为2时,追踪到的节点为P,因此显示P的IPv6地址A2::2。图8中第三行的3个1毫秒(ms)同样指示CE1分别发送了三个TTL为2的第一报文。需要说明的是,图5中P所在的IPv6网络为SRv6网络,因此P的IPv6地址为SRv6网络为其分配的段标识(segment identity,SID),该SID为A2::2。When the TTL in the first packet is 2, the tracked node is P, so P's IPv6 address A2::2 is displayed. The three 1 milliseconds (ms) in the third row in Figure 8 also indicate that CE1 sent three first messages with a TTL of 2 respectively. It should be noted that the IPv6 network where P is located in Figure 5 is an SRv6 network, so the IPv6 address of P is the segment identity (SID) assigned to it by the SRv6 network, and the SID is A2::2.
其中,第三转发节点解析第二控制消息得到第二转发节点的IPv6地址的具体实现方式,与第二控制消息携带第二转发节点的IPv6地址的方式有关。详细内容可以参考步骤604中第二控制消息的相关内容,在此不再赘述。The specific implementation manner in which the third forwarding node parses 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, please refer to the relevant content of the second control message in step 604, which will not be described again here.
需要说明的是,由于第二转发节点的IPv6地址有128比特位,而某些场景下第三转发节点可能不具备显示128比特位的IPv6地址的能力,此时第三转发节点可以显示一个提示信息,该提示信息用于当前追踪到的第二转发节点为IPv6网络中的节点。It should be noted that since the IPv6 address of the second forwarding node has 128 bits, and in some scenarios the third forwarding node may not have the ability to display a 128-bit IPv6 address, in this case the third forwarding node may display a prompt. Information, this prompt information is used when the currently tracked second forwarding node is a node in the IPv6 network.
此外,在第二转发节点为IPv6专用网络中的中间节点的情况下,为了便于网络管理员及时了解第二转发节点所在的IPv6网络,第三转发节点基于第二控制消息确定第一转发节点转发第一报文的情况之后,第三转发节点还可以进一步确定IPv6网络的IPv6专用网络标识,该IPv6专用网络标识指示第二转发节点所在的IPv6网络中的中间节点配置IPv4地址;然后第三转发节点显示IPv6专用网络标识。In addition, when the second forwarding node is an intermediate node in the IPv6 dedicated network, in order to facilitate the network administrator to know the IPv6 network where the second forwarding node is located in a timely manner, the third forwarding node determines the forwarding by the first forwarding node based on the second control message. After the first message is received, the third forwarding node can further determine the IPv6 dedicated network identifier of the IPv6 network. The IPv6 dedicated network identifier indicates that the intermediate node in the IPv6 network where the second forwarding node is located configures an IPv4 address; then the third forwarding node The node displays the IPv6 private network identification.
在一些实施例中,第三转发节点确定IPv6网络的IPv6专用网络标识的实现过程可以为:第三转发节点解析第二控制消息,以得到IPv6专用网络标识。也即是,第三转发节点从第二控制消息中获取该IPv6专用网络标识。In some embodiments, the implementation process of the third forwarding node determining the IPv6 dedicated network identifier of the IPv6 network may be: the third forwarding node parses the second control message to obtain the IPv6 dedicated network identifier. That is, the third forwarding node obtains the IPv6 dedicated network identifier from the second control message.
其中,第三转发节点解析第二控制消息得到IPv6专用网络标识的具体实现方式,与第二控制消息携带IPv6专用网络标识的方式有关。详细内容可以参考步骤604中第二控制消息的相关内容,在此不再赘述。The specific implementation manner in which the third forwarding node parses the second control message to obtain the IPv6 dedicated network identifier is related to the manner in which the second control message carries the IPv6 dedicated network identifier. For details, please refer to the relevant content of the second control message in step 604, which will not be described again here.
可选地,在另一些实施例中,第三转发节点也可以从本地存储中获取IPv6专用网络标识。 具体实现方式可以参考第一转发节点从本地存储中获取该IPv6专用网络标识的过程,在此不再赘述。Optionally, in other embodiments, the third forwarding node may also obtain the IPv6 dedicated network identifier from local storage. For a specific implementation method, reference can be made to the process of the first forwarding node obtaining the IPv6 dedicated network identifier from local storage, which will not be described again here.
综上,基于图6所示的实施例,当IPv6网络的边缘节点第一转发节点接收到来自同一IPv6网络中的第二转发节点的第一控制消息时,由于第一控制消息用于通告第二转发节点转发第二报文的情况,而第二报文是基于来自IPv4网络的第一报文生成的,因此第一转发节点在接收到第一控制消息时,需要向第一报文的发送方(IPv4网络中的第三转发节点)通告该报文转发情况。基于此,第一转发节点在接收到第一控制消息时,第一转发节点基于第一控制消息生成第二控制消息,且第二控制消息为IPv4报文,以向IPv4网络中的第三转发节点发送第二控制消息。并且在第二转发节点不具备IPv4地址时,为了能够实现成功向IPv4网络中第三转发节点通告IPv6网络中第二转发节点转发报文的情况,本申请实施例对第二控制消息进行了扩展,以在第二控制消息中携带第二转发节点的IPv6地址。因此,通过本申请实施例提供的方法,IPv6网络中的中间节点在不具备IPv4地址时能够成功实现向IPv4网络中的转发节点通告报文转发情况。In summary, based on the embodiment shown in Figure 6, 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 notify the third The second forwarding node forwards the second message, and the second message is generated based on the first message from the IPv4 network. Therefore, when receiving the first control message, the first forwarding node needs to send a message to the first message. The sender (the third forwarding node in the IPv4 network) announces the forwarding status of the packet. Based on this, when the first forwarding node receives 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 forward to the third party in the IPv4 network. The node sends a second control message. And when the second forwarding node does not have an IPv4 address, in order to successfully notify the third forwarding node in the IPv4 network that the second forwarding node in the IPv6 network forwards the message, the embodiment of the present 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 embodiments of this application, the intermediate node in the IPv6 network can successfully notify the forwarding node in the IPv4 network of the packet forwarding status when it does not have an IPv4 address.
需要说明的是,图6所示的实施例的步骤601至步骤605中的各种可选方案可以基于需求进行组合,本申请实施例对此不再一一举例说明。It should be noted that various optional solutions in steps 601 to 605 in the embodiment shown in FIG. 6 can be combined based on requirements, and this embodiment of the present application will not illustrate this one by one.
下面以图9所示的路径追踪流程图为例对本申请实施例进一步解释说明。其中,图9是图6中各种可选方案的其中一种示例方案,并不构成对本申请实施例提供的方案的限定。The following uses the path tracking flow chart shown in FIG. 9 as an example to further explain the embodiment of the present application. Among them, FIG. 9 is an example solution of various optional solutions in FIG. 6 and does not constitute a limitation to the solution provided by the embodiment of the present application.
如图9所示。该路径追踪流程包括如下几个步骤。As shown in Figure 9. The path tracing process includes the following steps.
(1)CE1发送TTL为2的路径追踪报文到PE1,该路径追踪报文包括IPv4报文头和载荷,其中,IPv4报文头携带源地址(SA)1.1.1.1和目的地址(DA)2.2.2.2,且IPv4报文头中的TTL为2。(1) CE1 sends a path tracing message with a TTL of 2 to PE1. The path tracing message includes an IPv4 header and a payload. The IPv4 header carries the source address (SA) 1.1.1.1 and the destination address (DA). 2.2.2.2, and the TTL in the IPv4 header is 2.
(2)PE1接收到该路径追踪报文后,将该路径追踪报文的IPv4报文头中的TTL减为1,并在外层封装IPv6报文头(图9中简写为IPv6头),并且该IPv6报文头的TTL(实际为Hop)也设置为1,继续向P转发处理后的路径追踪报文。(2) After receiving the path tracing message, PE1 reduces the TTL in the IPv4 header of the path tracing message to 1, and encapsulates the IPv6 header in the outer layer (abbreviated as IPv6 header in Figure 9), and The TTL (actually Hop) of the IPv6 packet header is also set to 1, and the processed path tracing packet continues to be forwarded to P.
(3)P接收到该路径追踪报文时,判断出该路径追踪报文的IPv6报文头中的TTL超时,并且P判断接收到的路径追踪报文包括IPv4报文头,因此P基于本申请实施例提供的方案生成需要通告TTL超时的ICMP差错报文(也即第一控制消息)。(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, so P based on this The solution provided by the application embodiment generates an ICMP error message (that is, the first control message) that needs to notify the TTL timeout.
如图9所示,P生成的ICMP差错报文是直接将接收到的路径追踪报文作为ICMP数据(也即ICMP差错报文的载荷),然后在ICMP数据的尾部添加扩展对象,并在ICMP数据的外层依次添加ICMP报文头(图9中简写为ICMP头)和IPv6报文头(图9中简写为IPv6头)得到。其中,扩展对象携带IPv6专用网络标识以及P的IPv6地址。需要说明的是,图9中P所在的IPv6网络为SRv6网络,因此P的IPv6地址为SRv6网络为其分配的段标识(segment identity,SID),该SID为A2::2。As shown in Figure 9, the ICMP error message generated by P directly uses the received path tracing message as ICMP data (that is, the payload of the ICMP error message), and then adds an extension object at the end of the ICMP data and adds the The outer layer of the data is obtained by sequentially adding an ICMP header (abbreviated as ICMP header in Figure 9) and an IPv6 message header (abbreviated as IPv6 header in Figure 9). Among them, the extension object carries the IPv6 dedicated network identifier and the IPv6 address of P. It should be noted that the IPv6 network where P is located in Figure 9 is an SRv6 network, so the IPv6 address of P is the segment identity (SID) assigned to it by the SRv6 network, and the SID is A2::2.
另外,需要说明的是,P生成的ICMP差错报文中的ICMP报文头可以用于指示当前是IPv6网络转发出错,具体指示方式可以参考相关协议,在此不再详细说明。因此,P生成的ICMP差错报文中的ICMP报文头还可以称为ICMPv6报文头。In addition, it should be noted that the ICMP header in the ICMP error message generated by P can be used to indicate that the current IPv6 network forwarding error occurs. For the specific indication method, please refer to the relevant protocol, which will not be described in detail here. Therefore, the ICMP header in the ICMP error message generated by P can also be called an ICMPv6 header.
(4)PE1接收到P发送的ICMP差错报文时,剥掉该ICMP差错报文的外层IPv6报文头,以及ICMP数据中IPv6报文头,然后将剩下的IPv4报文头和载荷作为新的ICMP数据,基于新的ICMP数据以及扩展对象重新构造ICMP差错报文(也即第二控制消息),并将重新 构造的ICMP差错报文发送至CE1。(4) When PE1 receives the ICMP error message sent by P, it peels off the outer IPv6 header of the ICMP error message and the IPv6 header in the ICMP data, and then removes the remaining IPv4 header and payload. As new ICMP data, the ICMP error message (that is, the second control message) is reconstructed based on the new ICMP data and extended object, and will be re-constructed. The constructed ICMP error message is sent to CE1.
同样需要说明的是,由于重新构造的ICMP差错报文是需要发送至IPv4网络的,因此重新构造的ICMP差错报文中的ICMP报文头可以用于指示IPv4网络差错,具体指示方式可以参考相关协议,在此不再详细说明。因此,PE1重新构造的ICMP差错报文中的ICMP报文头还可以称为ICMPv4报文头。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. For specific instructions, please refer to the relevant The agreement will not be described in detail here. Therefore, the ICMP header in the ICMP error message reconstructed by PE1 can also be called an ICMPv4 header.
(5)CE1接收到PE1重新构造的ICMP差错报文时,基于接收到ICMP差错报文中的扩展对象得到P节点的IPv6地址,从而实现在TTL为2时,追踪到P节点的IPv6地址。(5) When CE1 receives the ICMP error message reconstructed by PE1, it obtains the IPv6 address of the P node based on the extended object in the received ICMP error message, thereby tracking the IPv6 address of the P node when the TTL is 2.
图10是本申请实施例提供的一种网络设备的结构示意图,该网络设备为图4所示的报文转发系统中的任一转发节点,比如第一转发节点或第二转发节点或第三转发节点。Figure 10 is a schematic structural diagram of a network device provided by an embodiment of the present application. The network device is any forwarding node in the message forwarding system shown in Figure 4, such as the first forwarding node or the second forwarding node or the third forwarding node. forwarding node.
具体地,如图10所示,网络设备1000包括收发模块1001和处理模块1002。Specifically, as shown in Figure 10, the network device 1000 includes a transceiver module 1001 and a processing module 1002.
其中,收发模块1002用于执行图6实施例中收发相关的操作;处理模块1001用于执行图6实施例中除收发相关的操作之外的操作。Among them, the transceiver module 1002 is used to perform transceiver-related operations in the embodiment of FIG. 6; the processing module 1001 is used to perform operations other than transceiver-related operations in the embodiment of FIG. 6.
在图10所示的网络设备1000为前述实施例中的第一转发节点的场景中,收发模块1001和处理模块1002的具体功能如下。In the scenario where the network device 1000 shown in Figure 10 is the first forwarding node in the previous embodiment, the specific functions of the transceiver module 1001 and the processing module 1002 are as follows.
收发模块1001,用于接收第三转发节点发送的第一报文,第一报文为IPv4报文。具体实现方式可以参考图6实施例中的步骤602。The transceiver module 1001 is configured to receive the first message sent by the third forwarding node, where the first message is an IPv4 message. For specific implementation, please refer to step 602 in the embodiment of Figure 6 .
处理模块1002,用于基于第一报文生成第二报文,并向第二转发节点发送第二报文,第二报文为IPv6报文。具体实现方式可以参考图6实施例中的步骤602。The processing module 1002 is configured to generate a second message based on the first message, and send the second message to the second forwarding node, where the second message is an IPv6 message. For specific implementation, please refer to step 602 in the embodiment of Figure 6 .
收发模块1001,用于接收第二转发节点发送的第一控制消息,第一控制消息为IPv6报文,第一控制消息用于通告第二转发节点转发第二报文的情况。具体实现方式可以参考图6实施例中的步骤604。The transceiver module 1001 is configured to receive a first control message sent by the second forwarding node, where the first control message is an IPv6 message, and the first control message is used to notify the second forwarding node of forwarding the second message. For specific implementation, please refer to step 604 in the embodiment of FIG. 6 .
处理模块1002,用于当确定第二转发节点不具备IPv4地址时,基于第一控制消息生成第二控制消息。具体实现方式可以参考图6实施例中的步骤604。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. For specific implementation, please refer to step 604 in the embodiment of FIG. 6 .
收发模块1001,用于向第三转发节点发送第二控制消息,第二控制消息为IPv4报文,且第二控制报文携带第二转发节点的IPv6地址。具体实现方式可以参考图6实施例中的步骤604。The transceiver module 1001 is configured to send a second control message to the third forwarding node, where the second control message is an IPv4 message, and the second control message carries the IPv6 address of the second forwarding node. For specific implementation, please refer to step 604 in the embodiment of FIG. 6 .
可选地,第一控制消息携带IPv6专用网络标识,IPv6专用网络标识指示IPv6网络中的中间节点没有配置IPv4地址;Optionally, the first control message carries an IPv6 dedicated network identifier, and the IPv6 dedicated network identifier indicates that the intermediate node in the IPv6 network is not configured with an IPv4 address;
处理模块1002用于:The processing module 1002 is used for:
解析第一控制消息,得到IPv6专用网络标识;Parse the first control message to obtain the IPv6 dedicated network identifier;
基于IPv6专用网络标识确定第二转发节点不具备IPv4地址。It is determined based on the IPv6 dedicated network identifier that the second forwarding node does not have an IPv4 address.
可选地,第一控制消息为网络控制消息协议ICMP报文;Optionally, the first control message is a Network Control Message Protocol ICMP message;
第一控制消息包括第一扩展对象,第一扩展对象携带IPv6专用网络标识,或者,第一控制消息包括第一ICMP报文头,第一ICMP报文头携带IPv6专用网络标识。The first control message includes a first extension object, and the first extension object carries an IPv6 dedicated network identifier. Alternatively, the first control message includes a first ICMP header, and the first ICMP header carries an IPv6 dedicated network identifier.
可选地,处理模块1002用于:Optionally, the processing module 1002 is used for:
获取本地存储的IPv6专用网络标识,IPv6专用网络标识指示IPv6网络中的中间节点没有配置IPv4地址;Obtain the locally stored IPv6 private network identifier. The IPv6 dedicated network identifier indicates that the intermediate node in the IPv6 network is not configured with an IPv4 address;
基于IPv6专用网络标识确定第二转发节点不具备IPv4地址。 It is determined based on the IPv6 dedicated network identifier that the second forwarding node does not have an IPv4 address.
可选地,第一控制消息携带第二转发节点的IPv6地址;Optionally, the first control message carries the IPv6 address of the second forwarding node;
处理模块1002用于:The processing module 1002 is used for:
从第一控制消息中获取第二转发节点的IPv6地址,以生成第二控制消息。Obtain the IPv6 address of the second forwarding node from the first control message to generate a second control message.
可选地,第一控制消息为网络控制消息协议ICMP报文,且第一控制消息包括第二扩展对象,第二扩展对象携带第二转发节点的IPv6地址;Optionally, the first control message is a Network Control Message Protocol ICMP message, and the first control message includes a second extension object, and the second extension object carries the IPv6 address of the second forwarding node;
处理模块1002用于:The processing module 1002 is used for:
从第二扩展对象中获取第二转发节点的IPv6地址。Obtain the IPv6 address of the second forwarding node from the second extension object.
可选地,第一控制消息为网络控制消息协议ICMP报文,且第一控制消息包括第二ICMP报文头,第二ICMP报文头携带第二转发节点的IPv6地址;Optionally, the first control message is a Network Control Message Protocol ICMP message, and the first control message includes a second ICMP message header, and the second ICMP message header carries the IPv6 address of the second forwarding node;
处理模块1002用于:The processing module 1002 is used for:
从第二ICMP报文头中获取第二转发节点的IPv6地址。Obtain the IPv6 address of the second forwarding node from the second ICMP message header.
可选地,第一控制消息包括第一IPv6报文头,第一IPv6报文头携带第二转发节点的IPv6地址;Optionally, the first control message includes a first IPv6 header, and the first IPv6 header carries the IPv6 address of the second forwarding node;
处理模块1002用于:The processing module 1002 is used for:
从第一IPv6报文头中获取第二转发节点的IPv6地址。Obtain the IPv6 address of the second forwarding node from the first IPv6 message header.
可选地,第一转发节点本地存储有第二转发节点IPv6地址;Optionally, the first forwarding node locally stores the IPv6 address of the second forwarding node;
处理模块1002用于:The processing module 1002 is used for:
获取存储的第二转发节点IPv6地址,以基于第一控制消息和第二转发节点的IPv6地址,生成第二控制消息。Obtain the stored IPv6 address of the second forwarding node to generate a second control message based on the first control message and the IPv6 address of the second forwarding node.
可选地,第二控制消息为网络控制消息协议ICMP报文;Optionally, the second control message is a Network Control Message Protocol ICMP message;
第二控制消息包括第三扩展对象,第三扩展对象携带第二转发节点的IPv6地址,或者,第二控制消息包括第三ICMP报文头,第三ICMP报文头携带第二转发节点的IPv6地址。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 header, and the third ICMP header carries the IPv6 address of the second forwarding node. address.
可选地,第二控制消息还携带IPv6专用网络标识,IPv6专用网络标识指示IPv6网络中的中间节点没有配置IPv4地址。Optionally, the second control message also carries an IPv6 dedicated network identifier, and the IPv6 dedicated network identifier indicates that the intermediate node in the IPv6 network is not configured with an IPv4 address.
可选地,第二控制消息为网络控制消息协议ICMP报文;Optionally, the second control message is a Network Control Message Protocol ICMP message;
第二控制消息包括第四扩展对象,第四扩展对象携带IPv6专用网络标识,或者,第二控制消息包括第四ICMP报文头,第四ICMP报文头携带IPv6专用网络标识。The second control message includes a fourth extension object, and the fourth extension object carries the IPv6 dedicated network identifier. Alternatively, the second control message includes a fourth ICMP header, and the fourth ICMP header carries the IPv6 dedicated network identifier.
可选地,第二转发节点满足以下两种情况之一:Optionally, the second forwarding node meets one of the following two conditions:
第二转发节点所在的IPv6网络中的中间节点没有配置IPv4地址;The intermediate node in the IPv6 network where the second forwarding node is located is not configured with an IPv4 address;
或者,第二转发节点配置有IPv4地址,但第二转发节点的IPv4地址不对外使用。Or, the second forwarding node is configured with an IPv4 address, but the IPv4 address of the second forwarding node is not used externally.
可选地,第一报文和第二报文均携带生存时间TTL,第一控制消息指示第二报文到达第二转发节点时第二报文的TTL超时。Optionally, both the first message and the second message carry a time-to-live TTL, and the first control message indicates that the TTL of the second message has expired when the second message reaches the second forwarding node.
可选地,第一报文和第二报文为路径追踪报文。Optionally, the first message and the second message are path tracing messages.
在图10所示的网络设备1000为前述实施例中的第二转发节点的场景中,收发模块1001和处理模块1002的具体功能如下。In the scenario where the network device 1000 shown in Figure 10 is the second forwarding node in the previous embodiment, the specific functions of the transceiver module 1001 and the processing module 1002 are as follows.
收发模块1001,用于接收第一转发节点发送的第二报文,第二报文为IPv6报文。具体实现方式可以参考图6实施例中的步骤603。The transceiver module 1001 is configured to receive a second message sent by the first forwarding node, where the second message is an IPv6 message. For specific implementation, please refer to step 603 in the embodiment of Figure 6 .
处理模块1002,用于当确定当前不能继续转发第二报文,且确定第二报文具备IPv4报文 头时,基于第二报文生成第一控制消息,第一控制消息指示第二转发节点转发第二报文的情况,且第一控制消息指示第二转发节点不具备IPv4地址。具体实现方式可以参考图6实施例中的步骤603。The processing module 1002 is used to determine that the second message cannot be forwarded currently and determine that the second message contains an IPv4 message. header, a first control message is generated based on the second message, the first control message indicates that the second forwarding node forwards the second message, and the first control message indicates that the second forwarding node does not have an IPv4 address. For specific implementation, please refer to step 603 in the embodiment of Figure 6 .
收发模块1001,用于向第一转发节点发送第一控制消息。具体实现方式可以参考图6实施例中的步骤603。The transceiver module 1001 is configured to send the first control message to the first forwarding node. For specific implementation, please refer to step 603 in the embodiment of Figure 6 .
可选地,第一控制消息携带IPv6专用网络标识,IPv6专用网络标识指示IPv6网络中的中间节点没有配置IPv4地址。Optionally, the first control message carries an IPv6 dedicated network identifier, and the IPv6 dedicated network identifier indicates that the intermediate node in the IPv6 network is not configured with an IPv4 address.
可选地,第一控制消息为网络控制消息协议ICMP报文;Optionally, the first control message is a Network Control Message Protocol ICMP message;
第一控制消息包括第一扩展对象,第一扩展对象携带IPv6专用网络标识,或者,第一控制消息包括第一ICMP报文头,第一ICMP报文头携带IPv6专用网络标识。The first control message includes a first extension object, and the first extension object carries an IPv6 dedicated network identifier. Alternatively, the first control message includes a first ICMP header, and the first ICMP header carries an IPv6 dedicated network identifier.
可选地,第一控制消息携带第二转发节点的IPv6地址。Optionally, the first control message carries the IPv6 address of the second forwarding node.
可选地,第一控制消息为网络控制消息协议ICMP报文;Optionally, the first control message is a Network Control Message Protocol ICMP message;
第一控制消息包括第二扩展对象,第二扩展对象携带第二转发节点的IPv6地址,或者,第一控制消息包括第二ICMP报文头,第二ICMP报文头携带第二转发节点的IPv6地址。The first control message includes a second extension object, and the second extension object carries the IPv6 address of the second forwarding node. Alternatively, the first control message includes a second ICMP header, and the second ICMP header carries the IPv6 address of the second forwarding node. address.
可选地,第一控制消息包括第一IPv6报文头,第一IPv6报文头携带第二转发节点的IPv6地址。Optionally, the first control message includes a first IPv6 header, and the first IPv6 header carries the IPv6 address of the second forwarding node.
可选地,处理模块1002用于:Optionally, the processing module 1002 is used for:
当第二报文的生存时间TTL为1时,确定当前不能继续转发第二报文。When the lifetime TTL of the second message is 1, it is determined that the second message cannot be forwarded at present.
可选地,第二报文为路径追踪报文。Optionally, the second message is a path tracing message.
在图10所示的网络设备1000为前述实施例中的第三转发节点的场景中,收发模块1001和处理模块1002的具体功能如下。In the scenario where the network device 1000 shown in Figure 10 is the third forwarding node in the previous embodiment, the specific functions of the transceiver module 1001 and the processing module 1002 are as follows.
收发模块1001,用于在向第一转发节点发送第一报文后,接收第一转发节点发送的第二控制消息,第二控制消息为IPv4报文且第二控制消息携带第二转发节点的IPv6地址,第一报文为IPv4报文。具体实现方式可以参考图6实施例中的步骤601和步骤605。The transceiver module 1001 is configured to receive a second control message sent by the first forwarding node after sending the first message to the first forwarding node. The second control message is an IPv4 message and the second control message carries the information of the second forwarding node. IPv6 address, the first packet is an IPv4 packet. For specific implementation methods, reference can be made to step 601 and step 605 in the embodiment of FIG. 6 .
处理模块1002,用于基于第二控制消息确定第二转发节点转发第一报文的情况。具体实现方式可以参考图6实施例中的步骤605。The processing module 1002 is configured to determine, based on the second control message, whether the second forwarding node forwards the first message. For specific implementation, please refer to step 605 in the embodiment of FIG. 6 .
可选地,处理模块1002还用于:Optionally, the processing module 1002 is also used to:
解析第二控制消息,得到第二转发节点的IPv6地址;Parse the second control message to obtain the IPv6 address of the second forwarding node;
显示第二转发节点的IPv6地址。Displays the IPv6 address of the second forwarding node.
可选地,第二控制消息为网络控制消息协议ICMP报文;Optionally, the second control message is a Network Control Message Protocol ICMP message;
第二控制消息包括第三扩展对象,第三扩展对象携带第二转发节点的IPv6地址,或者,第二控制消息包括第三ICMP报文头,第三ICMP报文头携带第二转发节点的IPv6地址。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 header, and the third ICMP header carries the IPv6 address of the second forwarding node. address.
可选地,处理模块1002还用于:Optionally, the processing module 1002 is also used to:
确定IPv6专用网络标识,IPv6专用网络标识指示IPv6网络中的中间节点没有配置IPv4地址;Determine the IPv6 dedicated network identifier, which indicates that the intermediate node in the IPv6 network is not configured with an IPv4 address;
显示IPv6专用网络标识。Displays the IPv6 private network identification.
可选地,处理模块1002用于:Optionally, the processing module 1002 is used for:
解析第二控制消息,以得到IPv6专用网络标识。 The second control message is parsed to obtain the IPv6 dedicated network identifier.
可选地,第二控制消息为网络控制消息协议ICMP报文;Optionally, the second control message is a Network Control Message Protocol ICMP message;
第二控制消息包括第四扩展对象,第四扩展对象携带IPv6专用网络标识,或者,第二控制消息包括第四ICMP报文头,第四ICMP报文头携带IPv6专用网络标识。The second control message includes a fourth extension object, and the fourth extension object carries the IPv6 dedicated network identifier. Alternatively, the second control message includes a fourth ICMP header, and the fourth ICMP header carries the IPv6 dedicated network identifier.
可选地,第二控制消息指示第一报文到达第二转发节点时,第一报文的生存时间TTL超时。Optionally, the second control message indicates that when the first packet reaches the second forwarding node, the TTL of the first packet expires.
可选地,第一报文为路径追踪报文。Optionally, the first message is a path tracing message.
下面对本申请实施例涉及的硬件结构进行介绍。The hardware structure involved in the embodiment of this application is introduced below.
图11是本申请实施例提供的一种设备1100的结构示意图。图12是本申请实施例提供的另一种设备1200的结构示意图。下面对这两个设备的结构进行解释说明。Figure 11 is a schematic structural diagram of a device 1100 provided by an embodiment of the present application. Figure 12 is a schematic structural diagram of another device 1200 provided by an embodiment of the present application. The structure of these two devices is explained below.
需要说明的是,以下介绍的设备1100或设备1200对应于上述方法实施例中的任一转发节点。设备1100或设备1200中的各硬件、模块和上述其他操作和/或功能分别为了实现方法实施例中任一转发节点所实施的各种步骤和方法,关于设备1100或设备1200如何处理报文的详细流程,具体细节可参见上述方法实施例,为了简洁,在此不再赘述。其中,上述方法实施例的各步骤通过设备1100或设备1200处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤,为避免重复,这里不再详细描述。It should be noted that the device 1100 or the device 1200 introduced below corresponds to any forwarding node in the above method embodiment. Each hardware, module and the above-mentioned other operations and/or functions in the device 1100 or the device 1200 are respectively used to implement the various steps and methods implemented by any forwarding node in the method embodiment. Regarding how the device 1100 or the device 1200 processes messages, For the detailed process, please refer to the above method embodiments for specific details. For the sake of simplicity, they will not be described again here. Each step of the above method embodiment is completed through the integrated logic circuit of the hardware in the processor of the device 1100 or the device 1200 or instructions in the form of software. The steps of the methods disclosed in conjunction with the embodiments of the present application can be directly implemented by a hardware processor for execution, or can be executed by a combination of hardware and software modules in the processor. The software module can be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other mature storage media in this field. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware. To avoid repetition, the details will not be described here.
设备1100对应于上述任一转发节点时,该转发节点中的每个功能模块采用设备1100的软件实现。换句话说,该转发节点包括的功能模块为设备1100的处理器读取存储器中存储的程序代码后生成的。When the device 1100 corresponds to any of the above forwarding nodes, each functional module in the forwarding node is implemented using the software of the device 1100. In other words, the functional module included in the forwarding node is generated by the processor of the device 1100 after reading the program code stored in the memory.
设备1200对应于上述任一转发节点时,该转发节点中的每个功能模块采用设备1200的软件实现。换句话说,该转发节点包括的功能模块为设备1200的处理器读取存储器中存储的程序代码后生成的。When the device 1200 corresponds to any of the above forwarding nodes, each functional module in the forwarding node is implemented using the software of the device 1200. In other words, the functional module included in the forwarding node is generated by the processor of the device 1200 after reading the program code stored in the memory.
参见附图11,图11是本申请实施例提供的一种设备1100的结构示意图。可选地,该设备1100配置为图4所示的第一转发节点或第二转发节点或第三转发节点。换句话说,上述方法实施例中的任一转发节点可选地通过设备1100实现。Referring to FIG. 11, FIG. 11 is a schematic structural diagram of a device 1100 provided by an embodiment of the present application. Optionally, the device 1100 is configured as the first forwarding node, the second forwarding node, or the third forwarding node shown in FIG. 4 . In other words, any forwarding node in the above method embodiment is optionally implemented through the device 1100.
该设备1100例如是网络设备,比如说设备1100是交换机、路由器等。或者,该设备1100例如是计算设备,比如说设备1100是主机、服务器或个人计算机等。该设备1100可以由一般性的总线体系结构来实现。The device 1100 is, for example, a network device. For example, the device 1100 is a switch, a router, etc. Alternatively, the device 1100 is, for example, a computing device. For example, the device 1100 is a host, a server or a personal computer. The device 1100 may be implemented by a general bus architecture.
设备1100包括至少一个处理器1101、通信总线1102、存储器1103以及至少一个通信接口1104。Device 1100 includes at least one processor 1101, a communication bus 1102, a memory 1103, and at least one communication interface 1104.
处理器1101例如是通用中央处理器(central processing unit,CPU)、网络处理器(network processer,NP)、图形处理器(Graphics Processing Unit,GPU)、神经网络处理器(neural-network processing units,NPU)、数据处理单元(Data Processing Unit,DPU)、微处理器或者一个或多个用于实现本申请方案的集成电路。例如,处理器1101包括专用集成电路(application-specific  integrated circuit,ASIC),可编程逻辑器件(programmable logic device,PLD)或其组合。PLD例如是复杂可编程逻辑器件(complex programmable logic device,CPLD)、现场可编程逻辑门阵列(field-programmable gate array,FPGA)、通用阵列逻辑(generic array logic,GAL)或其任意组合。The processor 1101 is, for example, a general-purpose central processing unit (CPU), a network processor (NP), a graphics processing unit (GPU), or a neural-network processing unit (NPU). ), a data processing unit (DPU), a microprocessor or one or more integrated circuits used to implement the solution of the present application. For example, the processor 1101 includes an application-specific integrated circuit (application-specific integrated circuit). integrated circuit (ASIC), programmable logic device (PLD) or a combination thereof. A PLD is, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a general array logic (GAL), or any combination thereof.
通信总线1102用于在上述组件之间传送信息。通信总线1102可以分为地址总线、数据总线、控制总线等。为便于表示,附图11中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。Communication bus 1102 is used to transfer information between the above-mentioned components. The communication bus 1102 can be divided into an address bus, a data bus, a control bus, etc. For ease of presentation, only one thick line is used in Figure 11, but this does not mean that there is only one bus or one type of bus.
存储器1103例如是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其它类型的静态存储设备,又如是随机存取存储器(random access memory,RAM)或者可存储信息和指令的其它类型的动态存储设备,又如是电可擦可编程只读存储器(electrically erasable programmable read-only Memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其它光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其它磁存储设备,或者是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其它介质,但不限于此。存储器1103例如是独立存在,并通过通信总线1102与处理器1101相连接。存储器1103也可以和处理器1101集成在一起。The memory 1103 is, for example, a read-only memory (ROM) or other type of static storage device that can store static information and instructions, or a random access memory (random access memory, RAM) or a device that can store information and instructions. Other types of dynamic storage devices, such as electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disk storage, optical discs Storage (including compressed optical discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store desired program code in the form of instructions or data structures and can Any other media accessed by a computer, without limitation. The memory 1103 exists independently, for example, and is connected to the processor 1101 through the communication bus 1102 . The memory 1103 may also be integrated with the processor 1101.
通信接口1104使用任何收发器一类的装置,用于与其它设备或通信网络通信。通信接口1104包括有线通信接口,还可以包括无线通信接口。其中,有线通信接口例如可以为以太网接口。以太网接口可以是光接口,电接口或其组合。无线通信接口可以为无线局域网(wireless local area networks,WLAN)接口,蜂窝网络通信接口或其组合等。Communication interface 1104 uses any transceiver-like device for communicating with other devices or communication networks. The communication interface 1104 includes a wired communication interface and may also include a wireless communication interface. The wired communication interface may be an Ethernet interface, for example. The Ethernet interface can be an optical interface, an electrical interface, or a combination thereof. The wireless communication interface may be a wireless local area networks (WLAN) interface, a cellular network communication interface or a combination thereof.
在具体实现中,作为一种实施例,处理器1101可以包括一个或多个CPU,如附图11中所示的CPU0和CPU1。In specific implementation, as an embodiment, the processor 1101 may include one or more CPUs, such as CPU0 and CPU1 shown in FIG. 11 .
在具体实现中,作为一种实施例,设备1100可以包括多个处理器,如附图11中所示的处理器1101和处理器1105。这些处理器中的每一个可以是一个单核处理器(single-CPU),也可以是一个多核处理器(multi-CPU)。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(如计算机程序指令)的处理核。In specific implementation, as an embodiment, the device 1100 may include multiple processors, such as the processor 1101 and the processor 1105 shown in FIG. 11 . Each of these processors can be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). A processor here may refer to one or more devices, circuits, and/or processing cores for processing data (such as computer program instructions).
在具体实现中,作为一种实施例,设备1100还可以包括输出设备和输入设备。输出设备和处理器1101通信,可以以多种方式来显示信息。例如,输出设备可以是液晶显示器(liquid crystal display,LCD)、发光二级管(light emitting diode,LED)显示设备、阴极射线管(cathode ray tube,CRT)显示设备或投影仪(projector)等。输入设备和处理器1101通信,可以以多种方式接收用户的输入。例如,输入设备可以是鼠标、键盘、触摸屏设备或传感设备等。In specific implementation, as an embodiment, the device 1100 may also include an output device and an input device. Output devices communicate with processor 1101 and can display information in a variety of 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 (projector), etc. Input devices communicate with processor 1101 and can receive user input in a variety of ways. For example, the input device may be a mouse, a keyboard, a touch screen device or a sensing device, etc.
在一些实施例中,存储器1103用于存储执行本申请方案的程序代码1110,处理器1101可以执行存储器1103中存储的程序代码1110。也即是,设备1100可以通过处理器1101以及存储器1103中的程序代码1110,来实现方法实施例提供的报文转发方法。In some embodiments, the memory 1103 is used to store the program code 1110 for executing the solution of the present application, and the processor 1101 can execute the program code 1110 stored in the memory 1103. That is, the device 1100 can implement the message forwarding method provided by the method embodiment through the processor 1101 and the program code 1110 in the memory 1103.
本申请实施例的设备1100可对应于上述各个方法实施例中的任一转发节点,并且,该设备1100中的处理器1101、通信接口1104等可以实现上述各个方法实施例中的任一转发节点所具有的功能和/或所实施的各种步骤和方法。为了简洁,在此不再赘述。The device 1100 in the embodiment of the present application can correspond to any forwarding node in the above method embodiments, and the processor 1101, communication interface 1104, etc. in the device 1100 can implement any forwarding node in the above method embodiments. functions and/or various steps and methods implemented. For the sake of brevity, no further details will be given here.
在本申请实施例采用设备1100实现的情况下,在一些实施例中,附图10所示的网络设备1000中的收发模块以及处理模块为设备1100中的程序代码1110中的软件模块,设备1100 中的处理器1101通过执行程序代码1110来实现附图10中的网络设备600中的收发模块以及处理模块的功能。When the embodiment of the present application is implemented using the device 1100, in some embodiments, the transceiver module and the processing module in the network device 1000 shown in Figure 10 are software modules in the program code 1110 in the device 1100. The device 1100 The processor 1101 in the processor implements the functions of the transceiver module and the processing module in the network device 600 in FIG. 10 by executing the program code 1110.
参见附图12,附图12是本申请实施例提供的一种设备1200的结构示意图,可选地,该设备1200配置为图4所示的第一转发节点或第二转发节点或第三转发节点。换句话说,上述方法实施例中的任一转发节点可选地通过设备1200实现。Referring to Figure 12, Figure 12 is a schematic structural diagram of a device 1200 provided by an embodiment of the present application. Optionally, the device 1200 is configured as the first forwarding node or the second forwarding node or the third forwarding node shown in Figure 4 node. In other words, any forwarding node in the above method embodiments is optionally implemented through the device 1200.
该设备1200例如是网络设备,比如说设备1200是交换机、路由器等。设备1200包括:主控板12010和接口板12030。The device 1200 is, for example, a network device. For example, the device 1200 is a switch, a router, etc. The device 1200 includes: a main control board 12010 and an interface board 12030.
主控板也称为主处理单元(main processing unit,MPU)或路由处理卡(route processor card),主控板12010用于对设备1200中各个组件的控制和管理,包括路由计算、设备管理、设备维护、协议处理功能。主控板12010包括:中央处理器12011和存储器12012。The main control board is also called the main processing unit (MPU) or route processor card. The main control board 12010 is used to control and manage various components in the device 1200, including route calculation, device management, Equipment maintenance and protocol processing functions. The main control board 12010 includes: a central processing unit 12011 and a memory 12012.
接口板12030也称为线路接口单元卡(line processing unit,LPU)、线卡(line card)或业务板。接口板12030用于提供各种业务接口并实现数据包的转发。业务接口包括而不限于以太网接口、POS(Packet over SONET/SDH)接口等,以太网接口例如是灵活以太网业务接口(Flexible Ethernet Clients,FlexE Clients)。接口板12030包括:中央处理器12031、网络处理器12032、转发表项存储器12034和物理接口卡(physical interface card,PIC)12033。The interface board 12030 is also called a line processing unit (LPU), line card or service board. The interface board 12030 is used to provide various service interfaces and implement data packet forwarding. Business interfaces include but are not limited to Ethernet interfaces, POS (Packet over SONET/SDH) interfaces, etc. Ethernet interfaces are, for example, Flexible Ethernet Clients (FlexE Clients). The interface board 12030 includes: a central processor 12031, a network processor 12032, a forwarding entry memory 12034, and a physical interface card (physical interface card, PIC) 12033.
接口板12030上的中央处理器12031用于对接口板12030进行控制管理并与主控板12010上的中央处理器12011进行通信。The central processor 12031 on the interface board 12030 is used to control and manage the interface board 12030 and communicate with the central processor 12011 on the main control board 12010.
网络处理器12032用于实现报文的转发处理。网络处理器12032的形态可以是转发芯片。具体而言,网络处理器12032用于基于转发表项存储器12034保存的转发表转发接收到的报文,如果报文的目的地址为设备1200的地址,则将该报文上送至CPU(如中央处理器12011)处理;如果报文的目的地址不是设备1200的地址,则根据该目的地址从转发表中查找到该目的地址对应的下一跳和出接口,将该报文转发到该目的地址对应的出接口。其中,上行报文的处理包括:报文入接口的处理,转发表查找;下行报文的处理:转发表查找等等。The network processor 12032 is used to implement packet forwarding processing. The network processor 12032 may be in the form of a forwarding chip. Specifically, the network processor 12032 is configured to forward the received message based on the forwarding table stored in the forwarding table memory 12034. If the destination address of the message is the address of the device 1200, then upload the message to the CPU (such as The central processor 12011) processes; if the destination address of the message is not the address of the device 1200, the next hop and outgoing interface corresponding to the destination address are found from the forwarding table based on the destination address, and the message is forwarded to the destination. The outbound interface corresponding to the address. Among them, the processing of uplink packets includes: processing of packet incoming interfaces, forwarding table search; processing of downlink packets: forwarding table search, etc.
物理接口卡12033用于实现物理层的对接功能,原始的流量由此进入接口板12030,以及处理后的报文从该物理接口卡12033发出。物理接口卡12033也称为子卡,可安装在接口板12030上,负责将光电信号转换为报文并对报文进行合法性检查后转发给网络处理器12032处理。在一些实施例中,中央处理器也可执行网络处理器12032的功能,比如基于通用CPU实现软件转发,从而物理接口卡12033中不需要网络处理器12032。The physical interface card 12033 is used to implement the docking function of the physical layer. The original traffic enters the interface board 12030 through this, and the processed packets are sent out from the physical interface card 12033. The physical interface card 12033 is also called a daughter card and can be installed on the interface board 12030. It is responsible for converting photoelectric signals into messages and checking the validity of the messages before forwarding them to the network processor 12032 for processing. In some embodiments, the central processor can also perform the functions of the network processor 12032, such as implementing software forwarding based on a general-purpose CPU, so that the network processor 12032 is not required in the physical interface card 12033.
可选地,设备1200包括多个接口板,例如设备1200还包括接口板12040,接口板12040包括:中央处理器12041、网络处理器12042、转发表项存储器12044和物理接口卡12043。Optionally, the device 1200 includes multiple interface boards. For example, the device 1200 also includes an interface board 12040. The interface board 12040 includes: a central processor 12041, a network processor 12042, a forwarding entry memory 12044, and a physical interface card 12043.
可选地,设备1200还包括交换网板12020。交换网板12020也可以称为交换网板单元(switch fabric unit,SFU)。在网络设备有多个接口板12030的情况下,交换网板12020用于完成各接口板之间的数据交换。例如,接口板12030和接口板12040之间可以通过交换网板12020通信。Optionally, the device 1200 also includes a switching network board 12020. The switching fabric unit 12020 can also be called a switching fabric unit (switch fabric unit, SFU). When the network device has multiple interface boards 12030, the switching network board 12020 is used to complete 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.
主控板12010和接口板12030耦合。例如。主控板12010、接口板12030和接口板12040,以及交换网板12020之间通过系统总线与系统背板相连实现互通。在一种可能的实现方式中,主控板12010和接口板12030之间建立进程间通信协议(inter-process communication,IPC)通道,主控板12010和接口板12030之间通过IPC通道进行通信。 The main control board 12010 and the interface board 12030 are coupled. For example. The main control board 12010, the interface board 12030, the interface board 12040, and the switching network board 12020 are connected to the system backplane through the system bus to achieve intercommunication. In a possible implementation, an inter-process communication protocol (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.
在逻辑上,设备1200包括控制面和转发面,控制面包括主控板12010和中央处理器12031,转发面包括执行转发的各个组件,比如转发表项存储器12034、物理接口卡12033和网络处理器12032。控制面执行路由器、生成转发表、处理信令和协议报文、配置与维护设备的状态等功能,控制面将生成的转发表下发给转发面,在转发面,网络处理器12032基于控制面下发的转发表对物理接口卡12033收到的报文查表转发。控制面下发的转发表可以保存在转发表项存储器12034中。在有些实施例中,控制面和转发面可以完全分离,不在同一设备上。Logically, device 1200 includes a control plane and a forwarding plane. The control plane includes a main control board 12010 and a central processor 12031. The forwarding plane includes various components that perform forwarding, such as forwarding entry memory 12034, physical interface card 12033, and network processor. 12032. The control plane executes functions such as router, generates forwarding tables, processes signaling and protocol messages, configures and maintains device status. The control plane sends the generated forwarding tables to the forwarding plane. On the forwarding plane, the network processor 12032 is based on the control plane. The delivered forwarding table looks up the table and forwards the packets received by the physical interface card 12033. The forwarding table delivered by the control plane can be stored in the forwarding table item storage 12034. In some embodiments, the control plane and forwarding plane may be completely separate and not on the same device.
在转发节点采用设备1200实现的情况下,在一些实施例中,附图10所示的网络设备600中的收发模块相当于设备1200中的物理接口卡12033;网络设备600的处理模块相当于网络处理器12032、中央处理器12031或中央处理器12011。In the case where the forwarding node is implemented using the device 1200, in some embodiments, the transceiver module in the network device 600 shown in Figure 10 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, CPU 12031 or CPU 12011.
应理解,本申请实施例中接口板12040上的操作与接口板12030的操作一致,为了简洁,不再赘述。应理解,本实施例的设备1200可对应于上述各个方法实施例中的任一转发节点,该设备1200中的主控板12010、接口板12030和/或12040可以实现上述各个方法实施例中的任一转发节点所具有的功能和/或所实施的各种步骤,为了简洁,在此不再赘述。It should be understood that the operations on the interface board 12040 in the embodiment of the present application are consistent with the operations on the interface board 12030, and will not be described again for the sake of simplicity. It should be understood that the device 1200 in this embodiment can correspond to any forwarding node in the above method embodiments, and the main control board 12010, interface board 12030 and/or 12040 in the device 1200 can implement the above method embodiments. For the sake of brevity, the functions of any forwarding node and/or the various steps implemented will not be described again here.
值得说明的是,主控板可能有一块或多块,有多块的时候可以包括主用主控板和备用主控板。接口板可能有一块或多块,网络设备的数据处理能力越强,提供的接口板越多。接口板上的物理接口卡也可以有一块或多块。交换网板可能没有,也可能有一块或多块,有多块的时候可以共同实现负荷分担冗余备份。在集中式转发架构下,网络设备可以不需要交换网板,接口板承担整个系统的业务数据的处理功能。在分布式转发架构下,网络设备可以有至少一块交换网板,通过交换网板实现多块接口板之间的数据交换,提供大容量的数据交换和处理能力。所以,分布式架构的网络设备的数据接入和处理能力要大于集中式架构的设备。可选地,网络设备的形态也可以是只有一块板卡,即没有交换网板,接口板和主控板的功能集成在该一块板卡上,此时接口板上的中央处理器和主控板上的中央处理器在该一块板卡上可以合并为一个中央处理器,执行两者叠加后的功能,这种形态设备的数据交换和处理能力较低(例如,低端交换机或路由器等网络设备)。具体采用哪种架构,取决于具体的组网部署场景,此处不做任何限定。It is worth mentioning that there may be one or more main control boards, and when there are multiple main control boards, they can include the main main control board and the backup main control board. There may be one or more interface boards. The stronger the data processing capability of the network device, the more interface boards are provided. There can also be one or more physical interface cards on the interface board. There may be no switching network board, or there may be one or more switching network boards. When there are multiple switching network boards, load sharing and redundant backup can be realized together. Under the centralized forwarding architecture, network equipment does not need switching network boards, and the interface boards are responsible for processing the business data of the entire system. Under the distributed forwarding architecture, network equipment can have at least one switching network board, which enables data exchange between multiple interface boards through the switching network board, providing large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of network equipment with a distributed architecture are greater than those with a centralized architecture. Optionally, the network device can also be in the form of only one board, that is, there is no switching network board. The functions of the interface board and the main control board are integrated on this board. In this case, the central processor and main control board on the interface board The central processor on the board can be combined into one central processor on this board to perform the superimposed functions of the two. This form of equipment has low data exchange and processing capabilities (for example, low-end switches or routers and other networks equipment). The specific architecture used depends on the specific networking deployment scenario and is not limited here.
在另一些实施例中,本申请实施例还提供了一种报文转发系统。如图13所示,该报文转发系统1300包括第一转发节点1301、第二转发节点1302以及第三转发节点1303。第一转发节点1301为IPv6网络的边缘节点,第二转发节点1302位于IPv6网络,第三转发节点1303位于IPv4网络;In other embodiments, embodiments of the present application also provide a message forwarding system. As shown in Figure 13, the message 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 the IPv6 network, the second forwarding node 1302 is located in the IPv6 network, and the third forwarding node 1303 is located in the IPv4 network;
第三转发节点1303用于:向第一转发节点发送第一报文,第一报文为IPv4报文;The third forwarding node 1303 is configured to: send the first message to the first forwarding node, where the first message is an IPv4 message;
第一转发节点1301用于:接收第一报文,基于第一报文生成第二报文,并向第二转发节点发送第二报文,第二报文为IPv6报文;The first forwarding node 1301 is configured to: receive the first message, generate a second message based on the first message, and send the second message to the second forwarding node, where the second message is an IPv6 message;
第二转发节点1302用于:接收第二报文,并在确定当前不能继续转发第二报文,且第二报文具备IPv4报文头的情况下,基于第二报文生成第一控制消息,第一控制消息为IPv6报文,且第一控制消息用于通告第二转发节点转发第二报文的情况;The second forwarding node 1302 is configured to: receive the second message, and generate a first control message based on the second message when it is determined that the second message cannot be forwarded currently and the second message has an IPv4 header. , the first control message is an IPv6 message, and the first control message is used to notify the second forwarding node of forwarding the second message;
第一转发节点1301还用于:接收第一控制消息,当第一转发节点确定第二转发节点不具备IPv4地址时,基于第一控制消息生成第二控制消息,并向第三转发节点发送第二控制消息,第二控制消息为IPv4报文,且第二控制报文携带第二转发节点的IPv6地址; The first forwarding node 1301 is also configured to: receive a first control message, and when the first forwarding node determines that the second forwarding node does not have an IPv4 address, generate a second control message based on the first control message, and send a third control message to the third forwarding node. Two control messages, the second control message is an IPv4 message, and the second control message carries the IPv6 address of the second forwarding node;
第三转发节点1303还用于:接收第二控制消息,基于第二控制消息确定第二转发节点转发第一报文的情况。The third forwarding node 1303 is also configured to receive a second control message and determine, based on the second control message, whether the second forwarding node forwards the first message.
上述报文转发系统各个转发节点的详细功能可以参考图6所示的实施例,在此不再赘述。The detailed functions of each forwarding node in the above message forwarding system can be referred to the embodiment shown in FIG. 6 and will not be described again here.
本领域普通技术人员可以意识到,结合本文中所公开的实施例中描述的各方法步骤和模块,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各实施例的步骤及组成。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。本领域普通技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can appreciate that the method steps and modules described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of both. In order to clearly illustrate the possible functions of hardware and software, Interchangeability, in the above description, the steps and compositions of each embodiment have been generally described according to functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. One of ordinary skill in the art may implement the described functionality using different methods for each specific application, but such implementations should not be considered beyond the scope of this application.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的系统、设备和模块的具体工作过程,可以参见前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, devices and modules described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be described again here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、设备和方法,可以通过其它的方式实现。例如,以上所描述的设备实施例仅仅是示意性的,例如,该模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口、设备或模块的间接耦合或通信连接,也可以是电的,机械的或其它的形式连接。In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the modules is only a logical function division. In actual implementation, there may be other division methods. For example, multiple modules or components may be combined or may be Integrated into another system, or some features can be ignored, or not implemented. In addition, the coupling or direct coupling or communication connection between each other shown or discussed may be indirect coupling or communication connection through some interfaces, devices or modules, or may be electrical, mechanical or other forms of connection.
该作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本申请实施例方案的目的。The modules described as separate components may or may not be physically separated. The components shown as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the embodiments of the present application.
另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以是两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。In addition, each functional module in each embodiment of the present application can be integrated into one processing module, or each module can exist physically alone, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software function modules.
该集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分,或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例中方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated module is implemented in the form of a software function 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 solution of the present application is essentially or contributes to the existing technology, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to cause 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 aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program code. .
本申请中术语“第一”“第二”等字样用于对作用和功能基本相同的相同项或相似项进行区分,应理解,“第一”、“第二”之间不具有逻辑或时序上的依赖关系,也不对数量和执行顺序进行限定。还应理解,尽管以下描述使用术语第一、第二等来描述各种元素,但这些元素不应受术语的限制。这些术语只是用于将一元素与另一元素区别分开。例如,在不脱离各种示例的范围的情况下,第一信息可以被称为第二信息,并且类似地,第二信息可以被称为第一信息。第一信息和第二信息都可以是信息,并且在某些情况下,可以是单独且不同的信息。In this application, the terms "first" and "second" are used to distinguish the same or similar items with basically the same functions and functions. It should be understood that there is no logic or timing between "first" and "second" There are no restrictions on the number and execution order of the dependencies. It should also be understood that, although the following description uses the terms first, second, etc. 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 may be referred to as second information, and similarly, the second information may be referred to as first information. Both the first information and the second information may be information, and in some cases, may be separate and different information.
本申请中术语“至少一个”的含义是指一个或多个,本申请中术语“多个”的含义是指两个或两个以上。本文中术语“系统”和“网络”经常可互换使用。 The term "at least one" in this application means one or more, and the term "plurality" in this application means two or more. The terms "system" and "network" are often used interchangeably in this article.
还应理解,术语“若”可被解释为意指“当...时”(“when”或“upon”)或“响应于确定”或“响应于检测到”。类似地,根据上下文,短语“若确定...”或“若检测到[所陈述的条件或事件]”可被解释为意指“在确定...时”或“响应于确定...”或“在检测到[所陈述的条件或事件]时”或“响应于检测到[所陈述的条件或事件]”。It should also be understood that the term "if" may be interpreted to mean "when" or "upon" or "in response to determining" or "in response to detecting." Similarly, depending on the context, the phrase "if it is determined..." or "if [stated condition or event] is detected" may be interpreted to mean "when it is determined..." or "in response to the determination... ” or “on detection of [stated condition or event]” or “in response to detection of [stated condition or event].”
以上描述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。The above description is only a specific implementation mode of the present application, but the protection scope of the present application is not limited thereto. Any person familiar with the technical field can easily think of various equivalent modifications within the technical scope disclosed in the present application. Or replacement, these modifications or replacements should be covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。该计算机程序产品包括一个或多个计算机程序指令。在计算机上加载和执行该计算机程序指令时,全部或部分地产生按照本申请实施例中的流程或功能。该计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。该计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,该计算机程序指令可以从一个网站站点、计算机、服务器或数据中心通过有线或无线方式向另一个网站站点、计算机、服务器或数据中心进行传输。该计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。该可用介质可以是磁性介质(例如软盘、硬盘、磁带)、光介质(例如,数字视频光盘(digital video disc,DVD)、或者半导体介质(例如固态硬盘)等。In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer program instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the embodiments of the present application are generated in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable device. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, e.g., the computer program instructions may be transmitted from a website, computer, server or data center to Wired or wireless transmission to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center integrated with one or more available media. The available media may be magnetic media (such as floppy disks, hard disks, magnetic tapes), optical media (such as digital video discs (DVD), or semiconductor media (such as solid state drives)), etc.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,该程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps to implement the above embodiments can be completed by hardware, or can be completed by instructing the relevant hardware through a program. The program can be stored in a computer-readable storage medium. As mentioned above, The storage medium can be read-only memory, magnetic disk or optical disk, etc.
以上描述仅为本申请的可选实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。 The above descriptions are only optional embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application. within.

Claims (36)

  1. 一种报文转发方法,其特征在于,所述方法应用于报文转发系统,所述报文转发系统包括第一转发节点、第二转发节点和第三转发节点,所述第一转发节点为第六代网络协议IPv6网络的边缘节点,所述第二转发节点位于所述IPv6网络,所述第三转发节点位于第四代网络协议IPv4网络;所述方法包括:A message forwarding method, characterized in that the method is applied to a message forwarding system, the message forwarding system includes a first forwarding node, a second forwarding node and a third forwarding node, and the first forwarding node is An edge node of the sixth generation network protocol IPv6 network, the second forwarding node is located in the IPv6 network, and the third forwarding node is located in the fourth generation network protocol IPv4 network; the method includes:
    所述第一转发节点接收所述第三转发节点发送的第一报文,所述第一报文为IPv4报文;The first forwarding node receives the first message sent by the third forwarding node, where the first message is an IPv4 message;
    所述第一转发节点基于所述第一报文生成第二报文,并向所述第二转发节点发送所述第二报文,所述第二报文为IPv6报文;The first forwarding node generates a second message based on the first message, and sends the second message to the second forwarding node, where the second message is an IPv6 message;
    所述第一转发节点接收所述第二转发节点发送的第一控制消息,所述第一控制消息为IPv6报文,所述第一控制消息用于通告所述第二转发节点转发所述第二报文的情况;The first forwarding node receives a first control message sent by the second forwarding node, where the first control message is an IPv6 message, and the first control message is used to notify the second forwarding node to forward the first The situation of the second message;
    当所述第一转发节点确定所述第二转发节点不具备IPv4地址时,基于所述第一控制消息生成第二控制消息,并向所述第三转发节点发送所述第二控制消息,所述第二控制消息为IPv4报文,且所述第二控制报文携带所述第二转发节点的IPv6地址。When the first forwarding node determines that the second forwarding node does not have an IPv4 address, it generates a second control message based on the first control message, and sends the second control message to the third forwarding node, so The second control message is an IPv4 message, and the second control message carries the IPv6 address of the second forwarding node.
  2. 如权利要求1所述的方法,其特征在于,所述第一控制消息携带IPv6专用网络标识,所述IPv6专用网络标识指示所述IPv6网络中的中间节点没有配置IPv4地址;The method of claim 1, wherein the first control message carries an IPv6 dedicated network identifier, and the IPv6 dedicated network identifier indicates that the intermediate node in the IPv6 network is not configured with an IPv4 address;
    所述第一转发节点确定所述第二转发节点不具备IPv4地址,包括:The first forwarding node determines that the second forwarding node does not have an IPv4 address, including:
    所述第一转发节点解析所述第一控制消息,得到所述IPv6专用网络标识;The first forwarding node parses the first control message to obtain the IPv6 dedicated network identifier;
    所述第一转发节点基于所述IPv6专用网络标识确定所述第二转发节点不具备IPv4地址。The first forwarding node determines that the second forwarding node does not have an IPv4 address based on the IPv6 dedicated network identifier.
  3. 如权利要求2所述的方法,其特征在于,所述第一控制消息为网络控制消息协议ICMP报文;The method of claim 2, wherein the first control message is a Network Control Message Protocol ICMP message;
    所述第一控制消息包括第一扩展对象,所述第一扩展对象携带所述IPv6专用网络标识,或者,所述第一控制消息包括第一ICMP报文头,所述第一ICMP报文头携带所述IPv6专用网络标识。The first control message includes a first extension object, and the first extension object carries the IPv6 dedicated network identifier, or the first control message includes a first ICMP message header, and the first ICMP message header Carrying the IPv6 dedicated network identifier.
  4. 如权利要求1所述的方法,其特征在于,所述第一转发节点确定所述第二转发节点不具备IPv4地址,包括:The method of claim 1, wherein the first forwarding node determines that the second forwarding node does not have an IPv4 address, including:
    所述第一转发节点获取本地存储的IPv6专用网络标识,所述IPv6专用网络标识指示所述IPv6网络中的中间节点没有配置IPv4地址;The first forwarding node obtains a locally stored IPv6 dedicated network identifier, and the IPv6 dedicated network identifier indicates that the intermediate node in the IPv6 network is not configured with an IPv4 address;
    所述第一转发节点基于所述IPv6专用网络标识确定所述第二转发节点不具备IPv4地址。The first forwarding node determines that the second forwarding node does not have an IPv4 address based on the IPv6 dedicated network identifier.
  5. 如权利要求1-4任一所述的方法,其特征在于,所述第一控制消息携带所述第二转发节点的IPv6地址;The method according to any one of claims 1-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, including:
    所述第一转发节点从所述第一控制消息中获取所述第二转发节点的IPv6地址,以生成所述第二控制消息。 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. 如权利要求5所述的方法,其特征在于,所述第一控制消息为网络控制消息协议ICMP报文,且所述第一控制消息包括第二扩展对象,所述第二扩展对象携带所述第二转发节点的IPv6地址;The method of claim 5, wherein the first control message is an ICMP message, and the first control message includes a second extension object, and the second extension object carries the The IPv6 address of the second forwarding node;
    所述第一转发节点从所述第一控制消息中获取所述第二转发节点的IPv6地址,包括:The first forwarding node obtains the IPv6 address of the second forwarding node from the first control message, including:
    所述第一转发节点从所述第二扩展对象中获取所述第二转发节点的IPv6地址。The first forwarding node obtains the IPv6 address of the second forwarding node from the second extension object.
  7. 如权利要求5所述的方法,其特征在于,所述第一控制消息为网络控制消息协议ICMP报文,且所述第一控制消息包括第二ICMP报文头,所述第二ICMP报文头携带所述第二转发节点的IPv6地址;The method of claim 5, wherein the first control message is a Network Control Message Protocol (ICMP) message, and the first control message includes a second ICMP message header, and the second ICMP message The header carries the IPv6 address of the second forwarding node;
    所述第一转发节点从所述第一控制消息中获取所述第二转发节点的IPv6地址,包括:The first forwarding node obtains the IPv6 address of the second forwarding node from the first control message, including:
    所述第一转发节点从所述第二ICMP报文头中获取所述第二转发节点的IPv6地址。The first forwarding node obtains the IPv6 address of the second forwarding node from the second ICMP message header.
  8. 如权利要求5所述的方法,其特征在于,所述第一控制消息包括第一IPv6报文头,所述第一IPv6报文头携带所述第二转发节点的IPv6地址;The method of claim 5, wherein the first control message includes a first IPv6 header, and the first IPv6 header carries the IPv6 address of the second forwarding node;
    所述第一转发节点从所述第一控制消息中获取所述第二转发节点的IPv6地址,包括:The first forwarding node obtains the IPv6 address of the second forwarding node from the first control message, including:
    所述第一转发节点从所述第一IPv6报文头中获取所述第二转发节点的IPv6地址。The first forwarding node obtains the IPv6 address of the second forwarding node from the first IPv6 message header.
  9. 如权利要求1-4任一所述的方法,其特征在于,所述第一转发节点本地存储有所述第二转发节点IPv6地址;The method according to any one of claims 1-4, characterized in that 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, including:
    所述第一转发节点获取本地存储的所述第二转发节点IPv6地址,以基于所述第一控制消息和所述第二转发节点的IPv6地址,生成所述第二控制消息。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. 如权利要求1-9任一所述的方法,其特征在于,所述第二控制消息为网络控制消息协议ICMP报文;The method according to any one of claims 1 to 9, characterized in that the second control message is a Network Control Message Protocol ICMP message;
    所述第二控制消息包括第三扩展对象,所述第三扩展对象携带所述第二转发节点的IPv6地址,或者,所述第二控制消息包括第三ICMP报文头,所述第三ICMP报文头携带所述第二转发节点的IPv6地址。The second control message includes a third extension object, the third extension object carries the IPv6 address of the second forwarding node, or the second control message includes a third ICMP header, and the third ICMP The message header carries the IPv6 address of the second forwarding node.
  11. 如权利要求1-10任一所述的方法,其特征在于,所述第二控制消息还携带IPv6专用网络标识,所述IPv6专用网络标识指示所述IPv6网络中的中间节点没有配置IPv4地址。The method according to any one of claims 1 to 10, characterized in that the second control message also carries an IPv6 dedicated network identifier, and the IPv6 dedicated network identifier indicates that the intermediate node in the IPv6 network is not configured with an IPv4 address.
  12. 如权利要求11所述的方法,其特征在于,所述第二控制消息为网络控制消息协议ICMP报文;The method of claim 11, wherein the second control message is a Network Control Message Protocol ICMP message;
    所述第二控制消息包括第四扩展对象,所述第四扩展对象携带所述IPv6专用网络标识,或者,所述第二控制消息包括第四ICMP报文头,所述第四ICMP报文头携带所述IPv6专用网络标识。 The second control message includes a fourth extension object, the fourth extension object carries the IPv6 dedicated network identifier, or the second control message includes a fourth ICMP message header, and the fourth ICMP message header Carrying the IPv6 dedicated network identifier.
  13. 如权利要求1-12任一所述的方法,其特征在于,所述第二转发节点满足以下两种情况之一:The method according to any one of claims 1-12, characterized in that the second forwarding node satisfies one of the following two conditions:
    所述第二转发节点所在的所述IPv6网络中的中间节点没有配置IPv4地址;The intermediate node in the IPv6 network where the second forwarding node is located is not configured with an IPv4 address;
    或者,所述第二转发节点配置有IPv4地址,但所述第二转发节点的IPv4地址不对外使用。Alternatively, the second forwarding node is configured with an IPv4 address, but the IPv4 address of the second forwarding node is not used externally.
  14. 如权利要求1-13任一所述的方法,其特征在于,所述第一报文和所述第二报文均携带生存时间TTL,所述第一控制消息指示所述第二报文到达所述第二转发节点时所述第二报文的TTL超时。The method according to any one of claims 1 to 13, characterized in that both the first message and the second message carry a time to live (TTL), and the first control message indicates the arrival of the second message. The TTL of the second message times out when the second forwarding node is used.
  15. 如权利要求14所述的方法,其特征在于,所述第一报文和所述第二报文为路径追踪报文。The method of claim 14, wherein the first message and the second message are path tracing messages.
  16. 一种报文转发方法,其特征在于,所述方法应用于报文转发系统,所述报文转发系统包括第一转发节点、第二转发节点和第三转发节点,所述第一转发节点为第六代网络协议IPv6网络的边缘节点,所述第二转发节点位于所述IPv6网络,所述第三转发节点位于第四代网络协议IPv4网络;所述方法包括:A message forwarding method, characterized in that the method is applied to a message forwarding system, the message forwarding system includes a first forwarding node, a second forwarding node and a third forwarding node, and the first forwarding node is An edge node of the sixth generation network protocol IPv6 network, the second forwarding node is located in the IPv6 network, and the third forwarding node is located in the fourth generation network protocol IPv4 network; the method includes:
    所述第三转发节点在向所述第一转发节点发送第一报文后,接收所述第一转发节点发送的第二控制消息,所述第二控制消息为IPv4报文且所述第二控制消息携带所述第二转发节点的IPv6地址,所述第一报文为IPv4报文;After sending the first message to the first forwarding node, the third forwarding node receives a second control message sent by the first forwarding node, where the second control message is an IPv4 message and the second The control message carries the IPv6 address of the second forwarding node, and the first message is an IPv4 message;
    所述第三转发节点基于所述第二控制消息确定所述第二转发节点转发所述第一报文的情况。The third forwarding node determines, based on the second control message, whether the second forwarding node forwards the first message.
  17. 如权利要求16所述的方法,其特征在于,所述第三转发节点基于所述第二控制消息确定所述第二转发节点转发所述第一报文的情况之后,所述方法还包括:The method of claim 16, wherein after the third forwarding node determines that the second forwarding node forwards the first message based on the second control message, the method further includes:
    所述第三转发节点解析所述第二控制消息,得到所述第二转发节点的IPv6地址;The third forwarding node parses the second control message to obtain the IPv6 address of the second forwarding node;
    所述第三转发节点显示所述第二转发节点的IPv6地址。The third forwarding node displays the IPv6 address of the second forwarding node.
  18. 如权利要求16或17所述的方法,其特征在于,所述第二控制消息为网络控制消息协议ICMP报文;The method of claim 16 or 17, wherein the second control message is a Network Control Message Protocol ICMP message;
    所述第二控制消息包括第三扩展对象,所述第三扩展对象携带所述第二转发节点的IPv6地址,或者,所述第二控制消息包括第三ICMP报文头,所述第三ICMP报文头携带所述第二转发节点的IPv6地址。The second control message includes a third extension object, the third extension object carries the IPv6 address of the second forwarding node, or the second control message includes a third ICMP header, and the third ICMP The message header carries the IPv6 address of the second forwarding node.
  19. 如权利要求16-18任一所述的方法,其特征在于,所述第三转发节点基于所述第二控制消息确定所述第一转发节点转发所述第一报文的情况之后,所述方法还包括:The method according to any one of claims 16 to 18, characterized in that after the third forwarding node determines that the first forwarding node forwards the first message based on the second control message, the Methods also include:
    所述第三转发节点确定IPv6专用网络标识,所述IPv6专用网络标识指示所述IPv6网络中的中间节点没有配置IPv4地址;The third forwarding node determines an IPv6 dedicated network identifier, and the IPv6 dedicated network identifier indicates that the intermediate node in the IPv6 network is not configured with an IPv4 address;
    所述第三转发节点显示所述IPv6专用网络标识。 The third forwarding node displays the IPv6 dedicated network identifier.
  20. 如权利要求19所述的方法,其特征在于,所述第三转发节点确定IPv6专用网络标识,包括:The method of claim 19, wherein the third forwarding node determines the IPv6 dedicated network identifier, including:
    所述第三转发节点解析所述第二控制消息,以得到所述IPv6专用网络标识。The third forwarding node parses the second control message to obtain the IPv6 dedicated network identifier.
  21. 如权利要求20所述的方法,其特征在于,所述第二控制消息为网络控制消息协议ICMP报文;The method of claim 20, wherein the second control message is a Network Control Message Protocol ICMP message;
    所述第二控制消息包括第四扩展对象,所述第四扩展对象携带所述IPv6专用网络标识,或者,所述第二控制消息包括第四ICMP报文头,所述第四ICMP报文头携带所述IPv6专用网络标识。The second control message includes a fourth extension object, the fourth extension object carries the IPv6 dedicated network identifier, or the second control message includes a fourth ICMP message header, and the fourth ICMP message header Carrying the IPv6 dedicated network identifier.
  22. 如权利要求16-21任一所述的方法,其特征在于,所述第二控制消息指示所述第一报文到达所述第二转发节点时,所述第一报文的生存时间TTL超时。The method according to any one of claims 16-21, characterized in that the second control message indicates that when the first message reaches the second forwarding node, the survival time TTL of the first message times out. .
  23. 如权利要求22所述的方法,其特征在于,所述第一报文为路径追踪报文。The method of claim 22, wherein the first message is a path tracing message.
  24. 一种报文转发方法,其特征在于,所述方法应用于报文转发系统,所述报文转发系统包括第一转发节点和第二转发节点,所述第一转发节点为第六代网络协议IPv6网络的边缘节点,所述第二转发节点位于所述IPv6网络;所述方法包括:A message forwarding method, characterized in that the method is applied to a message forwarding system, the message forwarding system includes a first forwarding node and a second forwarding node, the first forwarding node is a sixth generation network protocol An edge node of the IPv6 network, the second forwarding node is located in the IPv6 network; the method includes:
    所述第二转发节点接收所述第一转发节点发送的第二报文,所述第二报文为IPv6报文;The second forwarding node receives the second message sent by the first forwarding node, and the second message is an IPv6 message;
    当所述第二转发节点确定当前不能继续转发所述第二报文,且确定所述第二报文具备IPv4报文头时,基于所述第二报文生成第一控制消息,所述第一控制消息指示所述第二转发节点转发所述第二报文的情况,且所述第一控制消息指示所述第二转发节点不具备IPv4地址;When the second forwarding node determines that it cannot continue to forward the second message and determines that the second message has an IPv4 header, it generates a first control message based on the second message. A control message indicates that the second forwarding node forwards the second message, and the first control message indicates 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. 如权利要求24所述的方法,其特征在于,所述第一控制消息携带IPv6专用网络标识,所述IPv6专用网络标识指示所述IPv6网络中的中间节点没有配置IPv4地址。The method of claim 24, wherein the first control message carries an IPv6 dedicated network identifier, and the IPv6 dedicated network identifier indicates that the intermediate node in the IPv6 network is not configured with an IPv4 address.
  26. 如权利要求25所述的方法,其特征在于,所述第一控制消息为网络控制消息协议ICMP报文;The method of claim 25, wherein the first control message is a Network Control Message Protocol ICMP message;
    所述第一控制消息包括第一扩展对象,所述第一扩展对象携带所述IPv6专用网络标识,或者,所述第一控制消息包括第一ICMP报文头,所述第一ICMP报文头携带所述IPv6专用网络标识。The first control message includes a first extension object, and the first extension object carries the IPv6 dedicated network identifier, or the first control message includes a first ICMP message header, and the first ICMP message header Carrying the IPv6 dedicated network identifier.
  27. 如权利要求24-26任一所述的方法,其特征在于,所述第一控制消息携带所述第二转发节点的IPv6地址。The method according to any one of claims 24 to 26, characterized in that the first control message carries the IPv6 address of the second forwarding node.
  28. 如权利要求27所述的方法,其特征在于,所述第一控制消息为网络控制消息协议ICMP报文; The method of claim 27, wherein the first control message is a Network Control Message Protocol ICMP message;
    所述第一控制消息包括第二扩展对象,所述第二扩展对象携带所述第二转发节点的IPv6地址,或者,所述第一控制消息包括第二ICMP报文头,所述第二ICMP报文头携带所述第二转发节点的IPv6地址。The first control message includes a second extension object, the second extension object carries the IPv6 address of the second forwarding node, or the first control message includes a second ICMP header, and the second ICMP The message header carries the IPv6 address of the second forwarding node.
  29. 如权利要求27所述的方法,其特征在于,所述第一控制消息包括第一IPv6报文头,所述第一IPv6报文头携带所述第二转发节点的IPv6地址。The method of claim 27, wherein the first control message includes a first IPv6 header, and the first IPv6 header carries the IPv6 address of the second forwarding node.
  30. 如权利要求24-29任一所述的方法,其特征在于,所述第二转发节点确定当前不能继续转发所述第二报文,包括:The method according to any one of claims 24 to 29, characterized in that the second forwarding node determines that it cannot continue to forward the second message, including:
    当所述第二报文的生存时间TTL为1时,所述第二转发节点确定当前不能继续转发所述第二报文。When the lifetime TTL of the second message is 1, the second forwarding node determines that it cannot continue to forward the second message currently.
  31. 如权利要求30所述的方法,其特征在于,所述第二报文为路径追踪报文。The method of claim 30, wherein the second message is a path tracing message.
  32. 一种报文转发系统,其特征在于,所述报文转发系统包括第一转发节点、第二转发节点和第三转发节点,所述第一转发节点为第六代网络协议IPv6网络的边缘节点,所述第二转发节点位于所述IPv6网络,所述第三转发节点位于第四代网络协议IPv4网络;A message forwarding system, characterized in that the message forwarding system includes a first forwarding node, a second forwarding node and a third forwarding node, and the first forwarding node is an edge node of the sixth generation network protocol IPv6 network , the second forwarding node is located in the IPv6 network, and the third forwarding node is located in the fourth generation network protocol IPv4 network;
    所述第三转发节点用于:向所述第一转发节点发送第一报文,所述第一报文为IPv4报文;The third forwarding node is configured to: send a first message to the first forwarding node, where the first message is an IPv4 message;
    所述第一转发节点用于:接收所述第一报文,基于所述第一报文生成第二报文,并向所述第二转发节点发送所述第二报文,所述第二报文为IPv6报文;The first forwarding node is configured to: receive the first message, generate a second message based on the first message, and send the second message to the second forwarding node. The message is an IPv6 message;
    所述第二转发节点用于:接收所述第二报文,并在确定当前不能继续转发所述第二报文,且所述第二报文具备IPv4报文头的情况下,基于所述第二报文生成第一控制消息,所述第一控制消息为IPv6报文,且所述第一控制消息用于通告所述第二转发节点转发所述第二报文的情况;The second forwarding node is configured to: receive the second message, and when it is determined that the second message cannot be forwarded currently and the second message has an IPv4 header, based on the The second packet generates a first control message, the first control message is an IPv6 packet, and the first control message is used to notify the second forwarding node of forwarding the second packet;
    所述第一转发节点还用于:接收所述第一控制消息,当所述第一转发节点确定所述第二转发节点不具备IPv4地址时,基于所述第一控制消息生成第二控制消息,并向所述第三转发节点发送所述第二控制消息,所述第二控制消息为IPv4报文,且所述第二控制报文携带所述第二转发节点的IPv6地址;The first forwarding node is also configured to receive the first control message, and when the first forwarding node determines that the second forwarding node does not have an IPv4 address, generate a second control message based on the first control message. and send the second control message to the third forwarding node, where the second control message is an IPv4 message, and the second control message carries the IPv6 address of the second forwarding node;
    所述第三转发节点还用于:接收所述第二控制消息,基于所述第二控制消息确定所述第二转发节点转发所述第一报文的情况。The third forwarding node is further configured to receive the second control message and determine, based on the second control message, whether the second forwarding node forwards the first message.
  33. 一种网络设备,其特征在于,所述网络设备包括存储器和处理器;A network device, characterized in that the network device includes a memory and a processor;
    所述存储器用于存储程序指令;The memory is used to store program instructions;
    所述处理器被配置为调用所述存储器中存储的程序,以使得所述网络设备执行如权利要求1-15任一项所述的方法,或者执行如权利要求16-23任一项所述的方法,或者执行权利要求24-31任一项所述的方法。The processor is configured to call a program stored in the memory, so that the network device performs the method as described in any one of claims 1-15, or performs the method as described in any one of claims 16-23. method, or perform the method described in any one of claims 24-31.
  34. 一种网络设备,其特征在于,所述网络设备包括收发模块和处理模块:A network device, characterized in that the network device includes a transceiver module and a processing module:
    所述收发模块用于执行如权利要求1-15任一所述方法中收发相关的操作,所述处理模块 用于执行如权利要求1-15任一所述方法中除所述收发相关的操作之外的操作;或者,The transceiver module is used to perform transceiver-related operations in the method of any one of claims 1-15, and the processing module For performing operations other than the transceiver-related operations in the method of any one of claims 1-15; or,
    所述收发模块用于执行如权利要求16-23任一所述方法中收发相关的操作,所述处理模块用于执行如权利要求16-23任一所述方法中除所述收发相关的操作之外的操作;或者,The transceiver module is used to perform transceiver-related operations in the method of any one of claims 16-23, and the processing module is used to perform other transceiver-related operations in the method of any one of claims 16-23. operations other than; or,
    所述收发模块用于执行如权利要求24-31任一所述方法中收发相关的操作,所述处理模块用于执行如权利要求24-31任一所述方法中除所述收发相关的操作之外的操作。The transceiver module is used to perform transceiver-related operations in the method described in any one of claims 24-31, and the processing module is used to perform transceiver-related operations in the method described in any one of claims 24-31. operations outside.
  35. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有指令,当所述指令在处理器上运行时,实现权利要求1-15任一项所述的方法,或者实现权利要求16-23任一项所述的方法,或者实现权利要求24-31任一项所述的方法。A computer-readable storage medium, characterized in that instructions are stored in the computer-readable storage medium, and when the instructions are run on a processor, the method of any one of claims 1-15 is implemented, or Implement the method described in any one of claims 16-23, or implement the method described in any one of claims 24-31.
  36. 一种计算机程序产品,其特征在于,所述计算机程序产品包含指令,所述指令在处理器上运行时,实现权利要求1-15任一项所述的方法,或者实现权利要求16-23任一项所述的方法,或者实现权利要求24-31任一项所述的方法。 A computer program product, characterized in that the computer program product contains instructions, and when the instructions are run on a processor, the method of any one of claims 1-15 is implemented, or the method of any one of claims 16-23 is implemented. The method described in any one of claims 24-31, or the method described in any one of claims 24-31.
PCT/CN2023/089293 2022-07-12 2023-04-19 Message forwarding method, system, network device, storage medium and program product WO2024011982A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210818034.6A CN117440057A (en) 2022-07-12 2022-07-12 Message forwarding method, system, network device, storage medium and program product
CN202210818034.6 2022-07-12

Publications (1)

Publication Number Publication Date
WO2024011982A1 true WO2024011982A1 (en) 2024-01-18

Family

ID=89535377

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/089293 WO2024011982A1 (en) 2022-07-12 2023-04-19 Message forwarding method, system, network device, storage medium and program product

Country Status (2)

Country Link
CN (1) CN117440057A (en)
WO (1) WO2024011982A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012080168A (en) * 2010-09-30 2012-04-19 Brother Ind Ltd Information communication system, node device, information communication method, and program
CN102710802A (en) * 2012-05-07 2012-10-03 中兴通讯股份有限公司 IPv6 configuration information providing device and acquiring method thereof
US20150222528A1 (en) * 2014-01-31 2015-08-06 Edgecast Networks, Inc. Adapting network control messaging for anycast reliant platforms
CN112019433A (en) * 2019-05-29 2020-12-01 华为技术有限公司 Message forwarding method and device
CN112751763A (en) * 2019-10-30 2021-05-04 北京华为数字技术有限公司 Message forwarding method, device, storage medium and system
CN114513485A (en) * 2020-11-16 2022-05-17 华为技术有限公司 Method, device, equipment and system for obtaining mapping rule and readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012080168A (en) * 2010-09-30 2012-04-19 Brother Ind Ltd Information communication system, node device, information communication method, and program
CN102710802A (en) * 2012-05-07 2012-10-03 中兴通讯股份有限公司 IPv6 configuration information providing device and acquiring method thereof
US20150222528A1 (en) * 2014-01-31 2015-08-06 Edgecast Networks, Inc. Adapting network control messaging for anycast reliant platforms
CN112019433A (en) * 2019-05-29 2020-12-01 华为技术有限公司 Message forwarding method and device
CN112751763A (en) * 2019-10-30 2021-05-04 北京华为数字技术有限公司 Message forwarding method, device, storage medium and system
CN114513485A (en) * 2020-11-16 2022-05-17 华为技术有限公司 Method, device, equipment and system for obtaining mapping rule and readable storage medium

Also Published As

Publication number Publication date
CN117440057A (en) 2024-01-23

Similar Documents

Publication Publication Date Title
US20210218704A1 (en) Method, Device, and System for Obtaining SRV6 Tunnel Information
US20230078123A1 (en) Method for Forwarding Packet in SRV6 Service Function Chain and SF Device
EP3451595B1 (en) Method, device and system for data transmission
CN111988266B (en) Method for processing message
US20230137778A1 (en) Packet Sending Method and Apparatus, Network Device, System, and Storage Medium
US20220255857A1 (en) Packet Processing Method, Network Node, and System
WO2021143279A1 (en) Method and device for segment routing service processing, routing equipment, and storage medium
US11943099B2 (en) Capability notification method and related device
US11522792B2 (en) Method for discovering forwarding path and related device thereof
CN111669422B (en) Message transmission method and device
WO2022028216A1 (en) Network layer reachable information transmission method, system and apparatus, and network device
US11909650B2 (en) Internet protocol operations and management option
WO2024011982A1 (en) Message forwarding method, system, network device, storage medium and program product
JP2023539689A (en) Operation, management, and maintenance OAM packet processing methods and devices
CN114765589A (en) Network testing method, device and storage medium
WO2022199486A1 (en) Traceroute method and device, and storage medium
CN114025025B (en) SRv6SID publishing method and network equipment
JP7273130B2 (en) Communication method and device
US20240106748A1 (en) Packet processing method, apparatus, and system
WO2023078144A1 (en) Message processing method, apparatus and system
WO2023016110A1 (en) Method and apparatus for transmitting network layer readable information, device, system, and medium
WO2022194193A1 (en) Method and apparatus for acquiring path
CN114422435A (en) Notification method of interface address, verification method of network equipment accessibility and equipment
CN114915538A (en) Fault detection method, network device and system
CN115733790A (en) Message forwarding method, device, equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23838483

Country of ref document: EP

Kind code of ref document: A1