Path tracking method, device and storage medium
By receiving and parsing SRv6 function information in SRv6 network nodes, constructing a processing function table, and intercepting double-layer IP packets, the problem of being unable to parse IP Traceroute packets in the SRv6 public network is solved, and the SRv6 public network path tracing is realized.
Patent Information
- Application Number
- CN202110322171.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-25
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2041-03-25
AI Technical Summary
In IP VPN networks based on SRv6 technology, existing technologies cannot intercept and parse IP Traceroute packets sent by the local CE, resulting in the local CE being unable to obtain information about the public network nodes through which the Traceroute packets in the SRv6 public network pass.
By receiving SRv6 function information sent by the second type of network node, a local processing function table is constructed. When a double-layer IP packet is received, the inner IP path tracing packet is intercepted and parsed according to the table, and the IPv4 time to live or IPv6 hop count limit field is viewed, thereby achieving the interception and parsing of IP Traceroute packets.
This enables nodes in the SRv6 public network to intercept and parse IP Traceroute packets sent by the local CE, ensuring that the local CE can obtain information about each hop P node through which the Traceroute packet passes in the SRv6 public network.
Smart Images

Figure CN115134285B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communications, specifically to a path tracking method, device, and storage medium. Background Technology
[0002] IP Virtual Private Networks (VPNs) based on IPv6 Segment Routing with IPv6 (SRv6) technology use IP-in-IPv6 packet encapsulation. The inner IP address (e.g., IPv4 or IPv6) uses an address within a private IP network interconnected via the SRv6 public network, while the outer IPv6 address uses an address within the SRv6 public network. Currently, when a customer edge device (CE, such as a host, router, or switch) initiates a traceroute to a device in a remote private network, public network nodes in the SRv6 public network cannot intercept and parse the IP traceroute packets sent by the local CE. This prevents the local CE from obtaining information about the public network nodes traversed by the traceroute packets in the SRv6 public network. Summary of the Invention
[0003] In view of this, embodiments of this application provide a path tracing method, device, and storage medium, which realizes the acquisition of public network node information traversed by path tracing messages in the SRv6 public network.
[0004] This application provides a path tracing method applied to a first type of network node, including:
[0005] Receive first IPv6 segment routing SRv6 function information sent by the second type of network node. The first SRv6 function information is used to instruct the first type of network node to parse the inner IP path tracing packet corresponding to the received double-layer IP packet.
[0006] A local processing function table is constructed based on the first SRv6 function information;
[0007] Upon receiving a double-layer IP packet forwarded by a third type of network node, the double-layer IP packet is intercepted according to the local processing function table, and the local processing function indicated by the first SRv6 function information is executed. The local processing function includes parsing the inner IP path tracing packet corresponding to the double-layer IP packet and viewing the IPv4 time to live or IPv6 hop count limit field of the IP path tracing packet.
[0008] This application provides a path tracking device applied to a first type of network node, comprising:
[0009] The first receiver is configured to receive the first IPv6 segment routing SRv6 function information sent by the second type of network node. The first SRv6 function information is used to instruct the first type of network node to parse the inner IP path tracing message corresponding to the received double-layer IP packet.
[0010] The first builder is configured to construct a local processing function table based on the first SRv6 function information;
[0011] The first executor is configured to, upon receiving a double-layer IP packet forwarded by a third type of network node, intercept the double-layer IP packet according to the local processing function table and execute the local processing function indicated by the first SRv6 function information. The local processing function includes: parsing the inner IP path tracing packet corresponding to the double-layer IP packet and viewing the IPv4 time to live or IPv6 hop count limit field of the IP path tracing packet.
[0012] This application provides a path tracking device, including: a communication module, a memory, and one or more processors;
[0013] The communication module is configured to perform communication interactions between various network nodes;
[0014] The memory is configured to store one or more programs;
[0015] When the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any of the above embodiments.
[0016] This application provides a storage medium storing a computer program, which, when executed by a processor, implements the methods described in any of the above embodiments. Attached Figure Description
[0017] Figure 1 This is a schematic diagram of an IP VPN network structure based on SRv6 technology provided in the prior art;
[0018] Figure 2 This is a schematic diagram of an IP VPN network structure based on MPLS technology provided in the prior art;
[0019] Figure 3 This is a schematic diagram of the path tracing process in an IP VPN network based on MPLS technology, provided in the prior art;
[0020] Figure 4This is a schematic diagram of the path tracing process in an IP VPN network based on SRv6 technology, provided in the prior art;
[0021] Figure 5 This is a flowchart of a path tracing method provided in an embodiment of this application;
[0022] Figure 6 This is a flowchart of another path tracing method provided in the embodiments of this application;
[0023] Figure 7 This is a structural block diagram of a path tracking device provided in an embodiment of this application;
[0024] Figure 8 This is a schematic diagram of the structure of a path tracking device provided in an embodiment of this application. Detailed Implementation
[0025] The embodiments of this application will be described below with reference to the accompanying drawings. The examples given are for illustrative purposes only and are not intended to limit the scope of this application.
[0026] A Virtual Private Network (VPN) is a widely used network type that connects multiple private IP networks of a telecom customer through the public network managed by the telecom operator. This allows the local private IP network of the telecom customer and the remote private IP network to communicate with each other and form a large private IP network.
[0027] There are two public network forwarding technologies for IP VPNs: Multiprotocol Label Switching (MPLS) and Segment Routing with IPv6 (SRv6). MPLS is a more mature public network forwarding technology for IP VPNs, while SRv6, as an emerging technology, is less mature and still in a rapid development phase. Figure 1 This is a schematic diagram of an IP VPN network structure based on SRv6 technology provided in the prior art, such as... Figure 1As shown, an IP VPN network based on SRv6 technology includes three different types of network devices: CE (Customer Edge device), PE (Provider Edge device), and P (Provider device). CE devices are customer devices in the private network, such as hosts, routers, or switches. PE devices are edge devices in the public network, and P devices are intermediate devices in the public network; both PE and P devices are routers. In an SRv6-based IP VPN network, the local PE device encapsulates single-layer IP (IPv4 or IPv6) packets sent from the local CE device into double-layer IP (IP-in-IPv6) packets carrying a VPN identifier. The inner IP (IPv4 or IPv6) address uses an address from the private IP network interconnected via the SRv6 public network, while the outer IPv6 address uses an address from the SRv6 public network. Then, the local PE device and P device forward the double-layer IP packets to the remote PE device via SRv6 forwarding. Finally, the remote PE device decapsulates the received double-layer IP packets into single-layer IP packets and sends the single-layer IP packets to the correct remote CE based on the VPN identifier in the double-layer IP packets.
[0028] Figure 2 This is a schematic diagram of an IP VPN network structure based on MPLS technology provided in the prior art. For example... Figure 2 As shown, similar to IP VPN networks based on SRv6 technology, IP VPN networks based on MPLS technology also include three different types of network devices: CE devices, PE devices, and P devices. The difference lies in the encapsulation process. In an MPLS-based IP VPN network, the local PE device encapsulates single-layer IP (IPv4 or IPv6) packets from the local CE device into MPLS (IP-in-MPLS) packets carrying a VPN identifier. The inner IP (IPv4 or IPv6) address uses an address from a private IP network interconnected via the MPLS public network, while the outer MPLS label uses a label assigned in the MPLS public network. Then, the local PE and P devices forward the MPLS packets to the remote PE device via MPLS forwarding. Finally, the remote PE device decapsulates the received MPLS packets into single-layer IP packets and, based on the VPN identifier in the MPLS packets, forwards them to the correct remote CE.
[0029] In an IP VPN network based on MPLS technology, when a local CE initiates an IP path tracing (Traceroute) against a remote CE, nodes in the MPLS public network can intercept and parse the IP Traceroute packets sent by the local CE, enabling the local CE to obtain information about each hop P node through which the Traceroute packets pass in the MPLS public network. Figure 3 This is a schematic diagram of the path tracing process in an IP VPN network based on MPLS technology, as provided in the prior art. Figure 3 As shown, after the IP Traceroute packet sent by CE1 arrives at PE1, it is encapsulated into an MPLS packet by PE1 adding an MPLS label to the outer layer. During the encapsulation process, PE1 copies the hop count limit field (TTL in IPv4 packets or Hop Limit in IPv6 packets) from the IP Traceroute packet to the TTL field of the outer MPLS label. Thus, P1 and P2 nodes in the MPLS network can intercept the IP Traceroute packet sent by CE1 based on the TTL of the outer MPLS label. According to the forwarding plane resolution rules specified by MPLS technology, after receiving an MPLS packet with a TTL equal to 1, P1 and P2 nodes remove the MPLS label and parse the IP Traceroute packet located inside the MPLS label. In this way, P1 and P2 can make the correct response based on the resolution result, enabling CE1 to obtain information about the P1 and P2 nodes that the Traceroute packet in the MPLS public network has passed through.
[0030] In an IP VPN network based on SRv6 technology, when a path tracing (Traceroute) is initiated from a local CE to a remote CE, it is not possible to use methods similar to those in the MPLS public network to achieve the goal of intercepting and parsing IP Traceroute packets sent by the local CE from nodes in the SRv6 public network. Figure 4 This is a schematic diagram of the path tracing process in an IP VPN network based on SRv6 technology, as provided in the prior art. Figure 4As shown, after the IP Traceroute packet sent by CE1 arrives at PE1, PE1 encapsulates it into a double-layer IP packet by adding an IPv6 header to the outer layer. During the encapsulation process, if a method similar to that used in public MPLS networks is adopted, where PE1 copies the hop count limit field (TTL in IPv4 packets or Hop Limit in IPv6 packets) from the IP Traceroute packet to the Hop Limit field in the outer IPv6 header, then although nodes P1 and P2 in the SRv6 network can also intercept the IP Traceroute packet sent by CE1 based on the Hop Limit in the outer IPv6 header, according to the forwarding plane resolution rules specified by IPv6 technology, after receiving the double-layer IP packet with a Hop Limit of 1 in the outer IPv6 header, nodes P1 and P2 directly send an ICMPv6 packet to PE1 pointed to by the IPv6 source address in the outer IPv6 header, without considering the IP address inside the outer IPv6 header. The Traceroute message is parsed, so P1 and P2 cannot respond correctly based on the parsing result, resulting in CE1 being unable to obtain information about the P1 and P2 nodes that the Traceroute message passes through in the SRv6 public network.
[0031] In view of this, this application provides a path tracing method for an SRv6-based IP VPN, which is used in an SRv6-based IP VPN network. When a path tracing is initiated from a local CE to a remote CE, nodes in the SRv6 public network can intercept and parse the IP Traceroute packets sent by the local CE, thereby enabling the local CE to obtain information about each hop P node traversed by the Traceroute packets in the SRv6 public network.
[0032] In one embodiment, Figure 5 This is a flowchart illustrating a path tracing method provided in an embodiment of this application. This embodiment can be executed by a first type of network node. The first type of network node refers to a public network node in an SRv6 network. For example, the first type of network node can be a P node in an SRv6 network. Figure 5 As shown, this embodiment includes S110-S130.
[0033] S110: Receive the first IPv6 segment routing SRv6 function information sent by the second type of network node.
[0034] The first SRv6 functional information is used to instruct the first type of network node to parse the inner IP path tracing packet corresponding to the received two-layer IP packet. The second type of network node refers to the remote PE, i.e. Figure 4The PE2 node is shown in the example. In this embodiment, the second type of network node advertises its own SRv6 functionality information within the network via an intra-domain routing protocol. This second type of network node's SRv6 functionality information is used as the first SRv6 functionality information. In this embodiment, the first SRv6 functionality information is used to instruct the first type of network node to parse the inner IP path tracing packet of a double-layer IP packet. Specifically, the first SRv6 functionality information is used to instruct the first type of network node to examine the IPv4 time-to-live or IPv6 hop count limit fields of the IP tracing packet within the outer IPv6 header.
[0035] S120. Construct a local processing function table based on the first SRv6 function information.
[0036] In one embodiment, after the first type of network node receives the first SRv6 function information announced by the second type of network node, it constructs a local processing function table based on the first SRv6 function information.
[0037] S130. Upon receiving a double-layer IP packet forwarded by a third-type network node, intercept the double-layer IP packet according to the local processing function table and execute the local processing function indicated by the first SRv6 function information.
[0038] The local processing functions include: parsing the inner IP path tracing packet corresponding to the double-layer IP packet, and viewing the IPv4 time-to-live or IPv6 hop limit fields of the IP path tracing packet. The third type of network node refers to the local PE node, i.e. Figure 4 The PE1 node is shown. In this embodiment, after the second type of network node receives the double-layer IP packet forwarded by the third type of network node, it intercepts the double-layer IP packet according to the local processing function table and executes the local processing function indicated by the first SRv6 function information. That is, it checks whether the IPv4 time-to-live or IPv6 hop count limit field of the IP tracking packet inside the outer IPv6 header is 1. If it is 1, it terminates the forwarding of the double-layer IP packet and sends a response packet to the local CE node pointed to by the IP source address in the inner IP tracking packet; if it is not 1, it decrements the IPv4 time-to-live or IPv6 hop count limit field by one and forwards the double-layer IP packet to the remote PE node according to the pre-created forwarding table. In this embodiment, by configuring the first SRv6 function information, nodes in the SRv6 public network can intercept and parse the IP tracking packets sent by the local CE, so that the local CE can obtain the information of each public network node traversed by the path tracking packet in the SRv6 public network.
[0039] In one embodiment, the path tracing method applied to a first type of network node further includes: receiving first routing prefix information sent by a second type of network node; and constructing a forwarding table with the first routing prefix information as the matching key. In this embodiment, the first routing prefix information refers to the routing prefix information of the second type of network node. In this embodiment, after receiving the first routing prefix information advertised by the second type of network node, the first type of network node constructs a forwarding table with the first routing prefix information as the matching key. In this embodiment, after receiving the first SRv6 function information and the first routing prefix information advertised by the second type of network node, the first type of network node constructs an encapsulation table with the first routing prefix information plus the first SRv6 function information as the outer IPv6 destination address. Table 1 is a schematic table illustrating the format of an encapsulation table constructed according to an embodiment of this application. As shown in Table 1, the matching field of the encapsulation table (i.e. the matching key value in the above embodiment) is the characteristic field of the IP tracing packet. The encapsulation operation includes: performing IP-in-IPv6 encapsulation, encapsulating the IP path tracing packet into an inner IP packet, adding an IPv6 header to the outer layer, and setting the outer IPv6 destination address to the first routing prefix information plus the first SRv6 function information.
[0040] Table 1. Schematic diagram of a constructed encapsulation table format.
[0041]
[0042] In one embodiment, when a double-layer IP packet is received from a third type of network node, the path tracing method applied to the first type of network node further includes: forwarding the double-layer IP packet to a second type of network node according to a forwarding table.
[0043] In one embodiment, constructing a local processing function table based on the first SRv6 function information includes: constructing a local processing function table with the first routing prefix information and the first SRv6 function information as matching keys. In this embodiment, after the first type of network node receives the first routing prefix information and the first SRv6 function information advertised by the second type of network node, it constructs a local processing function table with the first routing prefix information and the first SRv6 function information as matching keys. Table 2 is a format diagram of a local processing function table constructed by a first type of network node according to an embodiment of this application. As shown in Table 2, the matching field of the local processing function table is the outer IPv6 destination address, wherein the outer IPv6 destination address is the first routing prefix information and the first SRv6 function information. In one embodiment, the local processing function includes: if the IPv4 time-to-live or IPv6 hop count limit field is a first value, terminating the forwarding of the two-layer IP packet and sending a response packet to the fourth type of network node pointed to by the IP source address in the inner IP path tracing packet; if the IPv4 time-to-live or IPv6 hop count limit field is not a first value, decrementing the IPv4 time-to-live or IPv6 hop count limit field by one and forwarding the two-layer IP packet to the second type of network node according to the forwarding table. In the embodiment, the local processing function in Table 2 includes: executing the local processing function corresponding to the first SRv6 function information, parsing the inner IP path tracing packet of the double-layer IP packet, and checking the IPv4 time to live or IPv6 hop count limit field of the IP path tracing packet; if the IPv4 time to live or IPv6 hop count limit field is 1, then terminating the forwarding of the double-layer IP packet and sending a response packet to the local CE node pointed to by the IP source address in the inner IP path tracing packet; if the IPv4 time to live or IPv6 hop count limit field is not 1, then decrementing the IPv4 time to live or IPv6 hop count limit field by one and continuing to forward the double-layer IP packet.
[0044] Table 2. Schematic diagram of the format of a local processing function table constructed by a first type of network node.
[0045]
[0046] In one embodiment, the IP path tracing message includes one of the following: an IPv4 Internet Control Message Protocol (ICMP) Echo Request message; an IPv6 ICMP Echo Request message; an IPv4 message using User Datagram Protocol (UDP) as the transport layer protocol; or an IPv6 message using UDP as the transport layer protocol.
[0047] In one embodiment, when a double-layer IP packet carries an IPv6 segment routing header, the IPv6 segment routing header includes at least: the IPv6 address of a first-type network node; and the IPv6 address of a second-type network node. In another embodiment, when a double-layer IP packet encapsulated by a third-type network node carries an IPv6 segment routing header, the IPv6 segment routing header contains at least two entries: the IPv6 address of the first-type network node and the IPv6 address of the second-type network node. Of course, a fifth-type network node can exist between the third-type and first-type network nodes, and also between the first-type and second-type network nodes. The fifth-type network node and the first-type network node have the same node type; both are public network nodes in the SRv6 network.
[0048] In one embodiment, when the double-layer IP packet carries an IPv6 segment routing header, the tracking method applied to the first type of network node further includes: announcing the second routing prefix information and the second SRv6 function information of the first type of network node in the current network. In this embodiment, the second routing prefix information refers to the routing prefix information of the first type of network node; the second SRv6 function information refers to the SRv6 function information of the first type of network node. In this embodiment, according to the specifications of SRv6 technology, the IPv6 segment routing header containing the IPv6 address of the first type of network node and the IPv6 address of the second type of network node indicates that the packet must first reach the first type of network node; then the first type of network node modifies the IPv6 destination address from its own IPv6 address to the second type of network node's IPv6 address according to the segment routing header; and then forwards the packet to the second type of network node. This can be understood as follows: in order to forward packets to the second type of network node through the first type of network node, while the second type of network node advertises its own routing prefix information and SRv6 function information in the network through the intra-domain routing protocol, the first type of network node also advertises its own routing prefix information and SRv6 function information in the network through the intra-domain routing protocol.
[0049] In one embodiment, when the double-layer IP packet carries an IPv6 segment routing header, the path tracing method applied to the first type of network node further includes: receiving a double-layer IP packet containing an outer IPv6 segment routing header forwarded by a fifth type of network node; wherein the outer IPv6 segment routing header includes: second routing prefix information and second SRv6 function information of the first type of network node, and first routing prefix information and first SRv6 function information of the second type of network node; the fifth type of network node has the same node type as the first type of network node. In this embodiment, the fifth type of network node and the first type of network node can be public network nodes in an SRv6 network, such as P nodes. In this embodiment, after the fifth type network node receives the routing prefix information and SRv6 function information advertised by the second type network node and the first type network node, it constructs local processing function tables with the second routing prefix information and second SRv6 function information of the fifth type network node, and the first routing prefix information and first SRv6 function information of the second type network node as matching keys, and also constructs forwarding tables with the second routing prefix information and second SRv6 function information of the fifth type network node, and the first routing prefix information and first SRv6 function information of the second type network node as matching keys. After the third type network node receives an IP or UDP path tracing packet sent by the local CE node with an IP source address pointing to the local CE node and an IP destination address pointing to the second type network node, it determines whether the IPv4 time-to-live or IPv6 hop count limit field in the IP or UDP path tracing packet is 1. If it is not 1, it uses the second routing prefix information and second SRv6 function information of the first type network node as the outer IPv6 destination address, and adds the second routing prefix information and second SRv6 function information of the first type network node to the first routing prefix information of the second type network node. The first SRv6 function information is an encapsulation table of the outer IPv6 segment routing header. It encapsulates IP or UDP path tracing packets into outer IPv6 destination address set as the first routing prefix information and the first SRv6 function information. The outer IPv6 segment routing header contains the second routing prefix information and the second SRv6 function information of the first type of network node, as well as two entries of the first routing prefix information and the first SRv6 function information of the second type of network node. Based on the forwarding table with the first routing prefix information of the first type of network node as the matching key value, the two-layer IP packets are forwarded to the first type of network node.
[0050] In one embodiment, the path tracing method applied to the first type of network node further includes: performing an outer IPv6 destination address replacement operation on the double-layer IP packet according to the outer IPv6 segment routing header. In this embodiment, according to the SRv6 technology specification, the IPv6 segment routing header containing both the IPv6 address of the first type of network node and the IPv6 address of the second type of network node indicates that the packet must first reach the first type of network node; then the first type of network node modifies the IPv6 destination address from its own IPv6 address to the second type of network node's IPv6 address according to the segment routing header; and then forwards the packet to the second type of network node.
[0051] In one embodiment, Figure 6 This is a flowchart of another path tracing method provided in an embodiment of this application. In this embodiment, the path tracing process is described using a first type of network node as a P node, a second type of network node as a remote PE node, and a third type of network node as a local PE node as examples. In this embodiment, the first routing prefix information is denoted as the first Locator information, and the first SRv6 function information is denoted as the first Function information. Figure 6 As shown, the path tracking method in this embodiment includes S210-S250.
[0052] S210, Announce the first Locator and the first Function via IGP.
[0053] In this embodiment, network nodes advertise their first routing prefix (Locator) information and first SRv6 function information within the network via an Intradomain Routing Protocol (IGP). The first function information instructs the node to parse the inner IP Traceroute packet of the double-layer IP packet. Specifically, the first function information instructs the node to check if the hop count limit field (e.g., TTL in an IPv4 packet or Hop Limit in an IPv6 packet) of the IP Traceroute packet inside the outer IPv6 header is 1. If it is 1, the forwarding of this double-layer IP packet is terminated, and a response packet is sent to the local CE node pointed to by the IP source address in the inner IP Traceroute header. If it is not 1, the hop count limit field is decremented by 1, and the forwarding of this double-layer IP packet continues.
[0054] S220, the local PE node constructs the encapsulation table and forwarding table according to the first Locator and first Function announced, and the P node constructs the local processing function table and forwarding table according to the first Locator and first Function announced.
[0055] In this embodiment, after receiving the first Locator information and the first Function information advertised by the network node, the local PE node constructs an encapsulation table with the characteristic fields of the IP Traceroute packet as the matching key and the first Locator information plus the first Function information as the outer IPv6 destination address, and also constructs a forwarding table with the first Locator information as the matching key. The format of the encapsulation table constructed by the local PE is illustrated in Table 1 of the above embodiment. After receiving the first Locator information and the first Function information advertised by the network node, the P node constructs a local processing function table with the first Locator information and the first Function information as the matching key, and also constructs a forwarding table with the first Locator information as the matching key. The format of the local processing function table constructed by the P node is illustrated in Table 2 of the above embodiment.
[0056] S230. After receiving the IP Traceroute packet sent by the local CE node, if the hop count limit field is not 1, the local PE node decrements the hop count limit field by 1, encapsulates the IP Traceroute packet into a double-layer IP packet according to the encapsulation table, and then forwards the double-layer IP packet according to the forwarding table.
[0057] In this embodiment, after receiving an IP Traceroute packet sent by a local CE node with an IP source address pointing to the local CE node and an IP destination address pointing to a remote CE node, the local PE node first determines whether the hop count limit field in the IP Traceroute packet is 1. If it is 1, the local PE terminates the IP Traceroute packet and sends a response packet to the local CE node pointed to by the IP source address in the IP Traceroute header. If it is not 1, the hop count limit field is decremented by 1. Then, according to the encapsulation table with the IP Traceroute packet characteristics as the matching key and the first Locator information plus the first Function information as the outer IPv6 destination address, the IP Traceroute packet is encapsulated into a double-layer IP packet with the outer IPv6 destination address set to the first Locator information plus the first Function information. The double-layer IP packet is then forwarded to the remote PE node according to the forwarding table with the first Locator information as the matching key. Table 3 is a schematic table of the format of a two-layer IP packet formed after a local PE node encapsulates an IP Traceroute packet according to an embodiment of this application. As shown in Table 3, the outer IPv6 hop limit of the two-layer IP packet is set to 255, and the SRv6 segment routing header (SRH) is optional.
[0058] Table 3. Schematic diagram of a two-layer IP packet format formed after a local PE node encapsulates an IP Traceroute packet.
[0059]
[0060] After receiving the double-layer IP packet forwarded by the local PE, the S240 and P nodes intercept the IP Traceroute packet according to the local processing function table and execute the first function to view and process the hop count limit field of the inner IP Traceroute packet.
[0061] In this embodiment, after receiving a double-layer IP packet forwarded by the local PE, the P node intercepts the double-layer IP packet according to the local processing function table with the first Locator information and the first Function information as matching keys, and executes the local processing function indicated by the first Function information. That is, it checks whether the hop count limit field of the IP Traceroute packet inside the outer IPv6 header is 1. If it is 1, it terminates the forwarding of this double-layer IP packet and sends a response packet to the local CE node pointed to by the IP source address in the inner IP Traceroute header. If it is not 1, it decrements the hop count limit field by 1, and then forwards the double-layer IP packet to the remote PE node according to the forwarding table with the Locator information as the longest matching key.
[0062] After receiving the double-layer IP packet forwarded by the P node, the remote PE node performs a decapsulation operation on the double-layer IP packet, stripping the outer IPv6 header to view and process the hop count limit field of the IP Traceroute packet.
[0063] In this embodiment, after receiving the double-layer IP packet forwarded by the P node, the remote PE node performs a decapsulation operation on the double-layer IP packet, stripping the outer IPv6 header and parsing the inner IP Traceroute packet. It checks whether the hop count limit field of the IP Traceroute packet is 1. If it is 1, it terminates the forwarding of the double-layer IP packet and sends a response packet to the local CE node pointed to by the IP source address in the IP Traceroute header. If it is not 1, it decrements the hop count limit field by 1 and then forwards the packet to the remote CE node pointed to by the IP destination address in the IP Traceroute header.
[0064] In one embodiment, taking a first type of network node as a P node, a second type of network node as a remote PE node, and a third type of network node as a local PE node as an example, the path tracing process is described. In this embodiment, the first routing prefix information is denoted as the first Locator information, and the first SRv6 function information is denoted as the first Function information. In this embodiment, this embodiment... Figure 6 Based on this, the path tracing process is explained using a local PE node-encapsulated double-layer IP packet without an IPv6 segment routing header, and an IPTraceroute packet that is an IPv4 ICMP Echo Request packet. This embodiment includes the following steps:
[0065] Step 11: The remote PE node advertises its first routing prefix (denoted as the first Locator) and first SRv6 function (first Function) information in the network through the Intradomain Routing Protocol (IGP).
[0066] In this embodiment, the first Function information is used to instruct the node to check whether the TTL field of the ICMP Echo Request message inside the outer IPv6 header is 1. If it is 1, the forwarding of this double-layer IP message is terminated, and an ICMP Echo Reply message is sent to the local CE node pointed to by the IP source address in the inner ICMP Echo Request header. If it is not 1, the TTL field is decremented by 1, and the forwarding of this double-layer IP message continues.
[0067] Step 12: After receiving the first Locator information and first Function information from the remote PE node, the local PE node constructs an encapsulation table with the ICMP echo request message feature field as the matching key and the first Locator information plus the first Function information as the outer IPv6 destination address. It also constructs a forwarding table with the first Locator information as the longest matching key. After receiving the first Locator information and first Function information from the remote PE node, the intermediate P node constructs a local processing function table with the first Locator information and first Function information as matching keys, and constructs a forwarding table with the first Locator information as the longest matching key.
[0068] Step 13: After receiving an ICMP echo request message from the local CE node with an IP source address pointing to the local CE node and an IP destination address pointing to the remote CE node, the local PE node first checks whether the TTL in the ICMP echo request message is 1. If it is 1, the local PE terminates the ICMP echo request message and sends an ICMP echo response message to the local CE node. If it is not 1, the TTL is decremented by 1. Then, according to the encapsulation table with the ICMP echo request message feature field as the matching key and the first Locator information and the first Function information as the outer IPv6 destination address, the ICMP echo request message is encapsulated into a double-layer IP message with the outer IPv6 destination address set to the first Locator information and the first Function information. And according to the forwarding table with the first Locator information of the remote PE node as the longest matching key, the double-layer IP message is forwarded to the remote PE node.
[0069] Step 14: After receiving the double-layer IP packet forwarded by the local PE, the intermediate P node intercepts the double-layer IP packet according to the local processing function table with the first Locator information and the first Function information as matching key values, and executes the local processing function indicated by the first Function information.
[0070] In this embodiment, the local processing function indicated by the first Function information is executed, that is, checking whether the TTL of the ICMP Echo Request message inside the outer IPv6 header is 1. If it is 1, the forwarding of this double-layer IP packet is terminated, and an ICMP Echo Response message is sent to the local CE node. The ICMP Echo Response message is first encapsulated in a double-layer IP packet by the P node and sent to the local PE node. Then, the local PE node decapsulates it into an ICMP Echo Response message and sends it to the local CE node. If it is not 1, the TTL of the ICMP Echo Request message inside the outer IPv6 header is decremented by 1. Then, according to the forwarding table with the first Locator information of the remote PE node as the longest matching key value, the double-layer IP packet is forwarded to the remote PE node.
[0071] Step 15: After receiving the double-layer IP packet forwarded by the P node, the remote PE node performs a decapsulation operation on the double-layer IP packet, stripping the outer IPv6 header and parsing the inner ICMP echo request packet. It checks whether the TTL of the ICMP echo request packet is 1. If it is 1, it terminates the forwarding of the packet and sends an ICMP echo response packet to the local CE node. This ICMP echo response packet is first encapsulated in a double-layer IP packet by the remote PE node and sent to the local PE node. Then, the local PE node decapsulates it into an ICMP echo response packet and sends it to the local CE node. If it is not 1, it decrements the TTL of the ICMP echo request packet by 1 and then forwards it to the remote CE node.
[0072] In one embodiment, taking a first type of network node as a P node, a second type of network node as a remote PE node, and a third type of network node as a local PE node as an example, the path tracing process is described. In this embodiment, the first routing prefix information is denoted as the first Locator information, and the first SRv6 function information is denoted as the first Function information. In this embodiment, this embodiment... Figure 6 Based on this, the double-layer IP packets encapsulated by the local PE node do not carry the IPv6 segment routing header, and the IPTraceroute packets are IPv4 packets using User Datagram Protocol (UDP) as the transport layer protocol, and these packets use a special UDP destination port number, to illustrate the path tracing process. This embodiment includes the following steps:
[0073] Step 21: The remote PE node advertises its first routing prefix (denoted as the first Locator) and first SRv6 function (denoted as the first Function) information in the network through the Intradomain Routing Protocol (IGP).
[0074] In this embodiment, the first Function information is used to instruct the node to check whether the TTL field of the IP or UDP path tracking packet inside the outer IPv6 header is 1. If it is 1, the forwarding of this double-layer IP packet is terminated, and an ICMP Time Exceeded message is sent to the local CE node pointed to by the IP source address in the inner IP / UDP header. If it is not 1, the TTL field is decremented by 1, and the double-layer IP packet is continued to be forwarded.
[0075] Step 22: After receiving the first Locator information and first Function information from the remote PE node, the local PE node constructs an encapsulation table with a specific UDP destination port number as the matching key and the first Locator information plus the first Function information as the outer IPv6 destination address. It also constructs a forwarding table with the first Locator information as the longest matching key. After receiving the first Locator information and first Function information from the remote PE node, the intermediate P node constructs a local processing function table with the first Locator information and first Function information as matching keys, and constructs a forwarding table with the first Locator information as the longest matching key.
[0076] Step 23: After receiving an IP or UDP path tracing packet sent by the local CE node with an IP source address pointing to the local CE node and an IP destination address pointing to the remote CE node, the local PE node first checks whether the TTL in the IP or UDP path tracing packet is 1. If it is 1, the local PE terminates the IP or UDP path tracing packet and sends an ICMP timeout message to the local CE node. If it is not 1, the TTL is decremented by 1. Then, according to the encapsulation table with a special UDP destination port number as the matching key and the first Locator information plus the first Function information as the outer IPv6 destination address, the IP or UDP path tracing packet is encapsulated into a double-layer IP packet with the outer IPv6 destination address set to the first Locator information plus the first Function information. And according to the forwarding table with the first Locator information of the remote PE node as the longest matching key, the double-layer IP packet is forwarded to the remote PE node.
[0077] Step 24: After receiving the double-layer IP packet forwarded from the local PE, the intermediate P node intercepts the double-layer IP packet according to the local processing function table with the first Locator information and the first Function information as matching keys. It executes the local processing function indicated by the first Function information, that is, it checks whether the TTL of the IP or UDP path tracking packet inside the outer IPv6 header is 1. If it is 1, it terminates the forwarding of this double-layer IP packet and sends an ICMP timeout message to the local CE node. This ICMP timeout message is first encapsulated by the P node in the double-layer IP packet and sent to the local PE node. Then, the local PE node decapsulates it into an ICMP timeout message and sends it to the local CE node. If it is not 1, it decrements the TTL of the IP / UDP path tracking packet inside the outer IPv6 header by 1. Then, according to the forwarding table with the first Locator information of the remote PE node as the longest matching key, it forwards the double-layer IP packet to the remote PE node.
[0078] Step 25: After receiving the double-layer IP packet forwarded by the P node, the remote PE node performs a decapsulation operation on the double-layer IP packet, stripping the outer IPv6 header and parsing the inner IP or UDP path tracking packet. It checks whether the TTL of the IP or UDP path tracking packet is 1. If it is 1, it terminates the forwarding of the packet and sends an ICMP timeout message to the local CE node. This ICMP timeout message is first encapsulated in a double-layer IP packet by the remote PE node and sent to the local PE node. Then, the local PE node decapsulates it into an ICMP timeout message and sends it to the local CE node. If it is not 1, it decrements the TTL of the IP or UDP path tracking packet by 1 and then forwards it to the remote CE node.
[0079] In one embodiment, the path tracing process is described using an example of a first type of network node as an intermediate P1 node, a second type of network node as a remote PE node, a third type of network node as a local PE node, a fourth type of network node as a local CE node, and a fifth type of network node as a P node. In this embodiment, the first routing prefix information is denoted as the first Locator information, the first SRv6 function information as the first Function information, the second routing prefix information as the second Locator information, and the second SRv6 function information as the second Function information. In this embodiment, this embodiment... Figure 6 Based on this, a double-layer IP packet encapsulated by the local PE node carries an IPv6 segment routing header. The segment routing header contains two entries: the IPv6 address of the intermediate P1 node and the IPv6 address of the remote PE node. There are P nodes between the local PE node and P1 node, and also between P1 node and the remote PE node, illustrating the path tracing process. According to SRv6 technology specifications, the IPv6 segment routing header containing the P1 address and remote PE address entries indicates that the packet must first reach the intermediate P1 node. Then, the P1 node, based on the segment routing header, modifies the IPv6 destination address from its own IPv6 address to the remote PE node's IPv6 address before forwarding the packet to the remote PE node. The IP Traceroute packet is an IPv4 ICMP Echo Request packet.
[0080] This embodiment includes the following steps:
[0081] Step 31: The remote PE node announces its first routing prefix (first Locator) and first SRv6 function (first Function) information in the network through the intra-domain routing protocol (IGP). The intermediate P1 node also announces its second routing prefix (second Locator) and second SRv6 function (second Function) information in the network through the intra-domain routing protocol (IGP).
[0082] In this embodiment, both the first Function information and the second Function information are used to instruct the node to check whether the TTL field of the ICMP Echo Request message inside the outer IPv6 header is 1. If it is 1, the forwarding of this double-layer IP message is terminated, and an ICMP Echo Reply message is sent to the local CE node pointed to by the IP source address in the inner ICMP Echo Request header. If it is not 1, the TTL field is decremented by 1, and the forwarding of this double-layer IP message continues.
[0083] Step 32: After receiving the first Locator information and first Function information advertised by the remote PE node, and the second Locator information and second Function information advertised by the intermediate P1 node, the local PE node constructs an encapsulation table with the ICMP echo request message feature field as the matching key value, the second Locator information and second Function information of the intermediate P1 node as the outer IPv6 destination address, and the second Locator information plus the second Function information of the intermediate P1 node and the first Locator information plus the first Function information of the remote PE node as the outer IPv6 segment routing header. It also constructs a forwarding table with the first Locator information of the intermediate P1 node as the longest matching key value. After receiving the first Locator and first Function information from the remote PE node, and the second Locator and second Function information from the intermediate P1 node, the intermediate P node constructs local processing function tables with the second Locator and second Function information of the intermediate P1 node and the first Locator and first Function information of the remote PE node as matching keys, respectively. It also constructs forwarding tables with the second Locator information of the intermediate P1 node and the first Locator information of the remote PE node as the longest matching key. After receiving the first Locator and first Function information from the remote PE node, the intermediate P1 node constructs local processing function tables with the first Locator and first Function information of the remote PE node as matching keys, and constructs a forwarding table with the first Locator information of the remote PE node as the longest matching key.
[0084] Step 33: After receiving an ICMP echo request message from the local CE node with an IP source address pointing to the local CE node and an IP destination address pointing to the remote CE node, the local PE node first checks whether the TTL in the ICMP echo request message is 1. If it is 1, the local PE terminates the ICMP echo request message and sends an ICMP echo response message to the local CE node. If it is not 1, the TTL is decremented by 1. Then, based on the ICMP echo request message characteristics as the matching key, the second Locator information and second Function information of the intermediate P1 node as the outer IPv6 destination address, and the second Locator information of the intermediate P1 node plus the second Function information, the local PE node first determines the TTL. The ICMP echo request message is encapsulated into a double-layer IP packet with the outer IPv6 segment routing header containing the second Locator and second Function information of the intermediate P1 node, and the first Locator and first Function information of the remote PE node. The outer IPv6 segment routing header contains two entries: the outer IPv6 destination address is set to the Locator and Function information, and the outer IPv6 segment routing header contains the second Locator and second Function information of the intermediate P1 node, and the outer IPv6 segment routing header contains the first Locator and first Function information of the remote PE node. The double-layer IP packet is then forwarded to the intermediate P1 node according to the forwarding table with the second Locator information of the intermediate P1 node as the longest matching key value.
[0085] Step 34: After receiving the double-layer IP packet forwarded by the local PE node and P1 node, the P node between the local PE node and P1 node intercepts the double-layer IP packet according to the local processing function table with the second Locator information and the second Function information of the intermediate P1 node as the matching key value. It executes the local processing function indicated by the second Function information, that is, it checks whether the TTL of the ICMP echo request message inside the outer IPv6 header is 1. If it is 1, it terminates the forwarding of this double-layer IP packet and sends an ICMP echo response message to the local CE node. The ICMP echo response message is first encapsulated by the P node in the double-layer IP packet and sent to the local PE node. Then, the local PE node decapsulates it into an ICMP echo response message and sends it to the local CE node. If it is not 1, it decrements the TTL of the ICMP echo request message inside the outer IPv6 header by 1. Then, according to the forwarding table with the second Locator information of the intermediate P1 node as the longest matching key value, it forwards the double-layer IP packet to the intermediate P1 node.
[0086] Step 35: After receiving the double-layer IP packet forwarded by the P node, the P1 node performs the operation of replacing the outer IPv6 destination address in the double-layer IP packet according to the outer IPv6 segment routing header. The outer IPv6 destination address is replaced from the second Locator information and the second Function information of the intermediate P1 node with the first Locator information and the first Function information of the remote PE node. Then, based on the local processing function table with the first Locator information and the first Function information of the remote PE node as the matching key, the double-layer IP packet is intercepted, and the local processing function indicated by the first Function information is executed. That is, it checks whether the TTL of the ICMP echo request message inside the outer IPv6 header is 1. If it is 1, the forwarding of this double-layer IP packet is terminated, and an ICMP echo response message is sent to the local CE node. This ICMP echo response message is first encapsulated in a double-layer IP packet by the P1 node and sent to the local PE node. Then, the local PE node decapsulates it into an ICMP echo response message and sends it to the local CE node. If it is not 1, the TTL of the ICMP echo request message inside the outer IPv6 header is decremented by 1. Then, based on the forwarding table with the first Locator information of the remote PE node as the longest matching key, the double-layer IP packet is forwarded to the remote PE node.
[0087] Step 36: After receiving the double-layer IP packet forwarded by P1 node, P node between P1 node and remote PE node intercepts the double-layer IP packet according to the local processing function table with the first Locator information and the first Function information of the remote PE node as matching keys. It executes the local processing function indicated by the first Function, that is, it checks whether the TTL of the ICMP echo request message inside the outer IPv6 header is 1. If it is 1, it terminates the forwarding of this double-layer IP packet and sends an ICMP echo response message to the local CE node. The ICMP echo response message is first encapsulated by P node in the double-layer IP packet and sent to the local PE node. Then, the local PE node decapsulates it into an ICMP echo response message and sends it to the local CE node. If it is not 1, it decrements the TTL of the ICMP echo request message inside the outer IPv6 header by 1. Then, according to the forwarding table with the first Locator information of the remote PE node as the longest matching key, it forwards the double-layer IP packet to the remote PE node.
[0088] Step 37: After receiving the double-layer IP packet forwarded by the P node, the remote PE node performs a decapsulation operation on the double-layer IP packet, stripping the outer IPv6 header and parsing the inner ICMP echo request packet. It checks whether the TTL of the ICMP echo request packet is 1. If it is 1, it terminates the forwarding of the packet and sends an ICMP echo response packet to the local CE node. This ICMP echo response packet is first encapsulated in a double-layer IP packet by the remote PE node and sent to the local PE node. Then, the local PE node decapsulates it into an ICMP echo response packet and sends it to the local CE node. If it is not 1, it decrements the TTL of the ICMP echo request packet by 1 and then forwards it to the remote CE node.
[0089] In one embodiment, the path tracing process is described using an example of a first type of network node as an intermediate P1 node, a second type of network node as a remote PE node, a third type of network node as a local PE node, a fourth type of network node as a local CE node, and a fifth type of network node as a P node. In this embodiment, the first routing prefix information is denoted as the first Locator information, the first SRv6 function information as the first Function information, the second routing prefix information as the second Locator information, and the second SRv6 function information as the second Function information. In this embodiment, this embodiment... Figure 6 Based on this, a double-layer IP packet encapsulated by the local PE node carries an IPv6 segment routing header. The segment routing header contains two entries: the IPv6 address of the intermediate P1 node and the IPv6 address of the remote PE node. There are P nodes between the local PE node and P1 node, and also between P1 node and the remote PE node, illustrating the path tracing process. According to SRv6 technology specifications, the IPv6 segment routing header containing the P1 address and remote PE address indicates that the packet must first reach the intermediate P1 node. Then, P1 node, based on the segment routing header, modifies the IPv6 destination address from its own IPv6 address to the remote PE node's IPv6 address before forwarding the packet to the remote PE node. The IP Traceroute packet is an IPv4 packet using User Datagram Protocol (UDP) as the transport layer protocol, and it uses a special UDP destination port number.
[0090] This embodiment includes the following steps:
[0091] Step 41: The remote PE node announces its first routing prefix (first Locator) and first SRv6 function (first Function) information in the network through the intra-domain routing protocol (IGP). The intermediate P1 node also announces its second routing prefix (second Locator) and second SRv6 function (second Function) information in the network through the intra-domain routing protocol (IGP).
[0092] In this embodiment, both the first Function information and the second Function information are used to instruct the node to check whether the TTL field of the IP or UDP path tracing packet inside the outer IPv6 header is 1. If it is 1, the forwarding of this double-layer IP packet is terminated, and an ICMP timeout message is sent to the local CE node pointed to by the IP source address in the inner IP / UDP path tracing header. If it is not 1, the TTL field is decremented by 1, and the double-layer IP packet is continued to be forwarded.
[0093] Step 42: After receiving the first Locator information and first Function information advertised by the remote PE node, and the second Locator information and second Function information advertised by the intermediate P1 node, the local PE node constructs an encapsulation table with two entries: a special UDP destination port number as the matching key, the second Locator information and second Function information of the intermediate P1 node as the outer IPv6 destination address, the second Locator information plus the second Function information of the intermediate P1 node, and the first Locator information plus the first Function information of the remote PE node as the outer IPv6 segment routing header. It also constructs a forwarding table with the second Locator information of the intermediate P1 node as the longest matching key. After receiving the first Locator and first Function information from the remote PE node, and the second Locator and second Function information from the intermediate P1 node, the intermediate P node constructs local processing function tables with the second Locator and second Function information of the intermediate P1 node and the first Locator and first Function information of the remote PE node as matching keys, respectively. It also constructs forwarding tables with the second Locator information of the intermediate P1 node and the first Locator information of the remote PE node as the longest matching key. After receiving the first Locator and first Function information from the remote PE node, the intermediate P1 node constructs local processing function tables with the first Locator and first Function information of the remote PE node as matching keys, and constructs a forwarding table with the first Locator information of the remote PE node as the longest matching key.
[0094] Step 43: After receiving an IP or UDP path tracing packet sent by the local CE node with an IP source address pointing to the local CE node and an IP destination address pointing to the remote CE node, the local PE node first checks whether the TTL in the IP or UDP path tracing packet is 1. If it is 1, the local PE terminates this IP or UDP path tracing packet and sends an ICMP timeout message to the local CE node; if it is not 1, it decrements the TTL by 1, and then uses a specific UDP destination port number as the matching key, the second Locator information and the second Function information of the intermediate P1 node as the outer IPv6 destination address, and the second Locator information and the second Function information of the intermediate P1 node as the matching key. The encapsulation table, which includes the tion information, the first Locator information of the remote PE node, and the first Function information, forms the outer IPv6 segment routing header. It encapsulates the IP or UDP path tracing message into a double-layer IP packet with the outer IPv6 destination address set to the Locator information plus the Function information, the outer IPv6 segment routing header containing the second Locator information and the second Function information of the intermediate P1 node, and the first Locator information and the first Function information of the remote PE node. Based on the forwarding table with the second Locator information of the intermediate P1 node as the longest matching key, the double-layer IP packet is forwarded to the intermediate P1 node.
[0095] Step 44: After receiving the double-layer IP packet forwarded by the local PE node, the P node between the local PE node and the P1 node intercepts the double-layer IP packet according to the local processing function table with the second Locator information and the second Function information of the P1 node as the matching key value. It executes the local processing function indicated by the Function, that is, it checks whether the TTL of the IP / UDP path tracking packet inside the outer IPv6 header is 1. If it is 1, it terminates the forwarding of this double-layer IP packet and sends an ICMP timeout message to the local CE node. The ICMP timeout message is first encapsulated by the P node in the double-layer IP packet and sent to the local PE node. Then, the local PE node decapsulates it into an ICMP timeout message and sends it to the local CE node. If it is not 1, it decrements the TTL of the IP or UDP path tracking packet inside the outer IPv6 header by 1. Then, according to the forwarding table with the second Locator of the P1 node as the longest matching key value, it forwards the double-layer IP packet to the intermediate P1 node.
[0096] Step 45: After receiving the double-layer IP packet forwarded by node P, node P1 performs the operation of replacing the outer IPv6 destination address in the double-layer IP packet according to the outer IPv6 segment routing header. The outer IPv6 destination address is replaced from the second Locator information and the second Function information of node P1 with the first Locator information and the first Function information of the remote PE node. Then, based on the local processing function table with the first Locator information and the first Function information of the remote PE node as matching keys, the double-layer IP packet is intercepted, and the local processing function indicated by the first Function information is executed. That is, it checks whether the TTL of the IP or UDP path tracking packet inside the outer IPv6 header is 1. If it is 1, the forwarding of this double-layer IP packet is terminated, and an ICMP timeout message is sent to the local CE node. This ICMP timeout message is first encapsulated in a double-layer IP packet by the P1 node and sent to the local PE node. Then, the local PE node decapsulates it into an ICMP timeout message and sends it to the local CE node. If it is not 1, the TTL of the IP or UDP path tracking packet inside the outer IPv6 header is decremented by 1. Then, based on the forwarding table with the Locator of the remote PE node as the longest matching key, the double-layer IP packet is forwarded to the remote PE node.
[0097] Step 46: After receiving the double-layer IP packet forwarded by P1 node, P node between P1 node and remote PE node intercepts the double-layer IP packet according to the local processing function table with the first Locator information and the first Function information of the remote PE node as matching keys. It executes the local processing function indicated by the first Function information, that is, it checks whether the TTL of the IP or UDP path tracking packet inside the outer IPv6 header is 1. If it is 1, it terminates the forwarding of this double-layer IP packet and sends an ICMP timeout message to the local CE node. The ICMP timeout message is first encapsulated by P node in the double-layer IP packet and sent to the local PE node. Then, the local PE node decapsulates it into an ICMP timeout message and sends it to the local CE node. If it is not 1, it decrements the TTL of the IP / UDP path tracking packet inside the outer IPv6 header by 1. Then, according to the forwarding table with the first Locator information of the remote PE node as the longest matching key, it forwards the double-layer IP packet to the remote PE node.
[0098] Step 47: After receiving the double-layer IP packet forwarded by the P node, the remote PE node performs a decapsulation operation on the double-layer IP packet, stripping the outer IPv6 header and parsing the inner IP or UDP path tracking packet. It checks whether the TTL of the IP or UDP path tracking packet is 1. If it is 1, it terminates the forwarding of the packet and sends an ICMP timeout message to the local CE node. This ICMP timeout message is first encapsulated in a double-layer IP packet by the remote PE node and sent to the local PE node. Then, the local PE node decapsulates it into an ICMP timeout message and sends it to the local CE node. If it is not 1, it decrements the TTL of the IP or UDP path tracking packet by 1 and then forwards it to the remote CE node.
[0099] In one embodiment, Figure 7 This is a structural block diagram of a path tracking device provided in an embodiment of this application. This embodiment is applied to a first type of network node. The first type of network node can be a public network node in an SRv6 network. For example, the first type of network node can be an intermediate P node. Figure 7 As shown, this embodiment includes: a first receiver 310, a first builder 320, and a first executor 330.
[0100] The first receiver 310 is configured to receive the first IPv6 segment routing SRv6 function information sent by the second type of network node. The first SRv6 function information is used to instruct the first type of network node to parse the inner IP path tracing packet corresponding to the received double-layer IP packet.
[0101] The first builder 320 is configured to build a local processing function table based on the first SRv6 function information;
[0102] The first executor 330 is configured to intercept the double-layer IP packet according to the local processing function table when it receives a double-layer IP packet forwarded by a third type of network node, and execute the local processing function indicated by the first SRv6 function information. The local processing function includes parsing the inner IP path tracing packet corresponding to the double-layer IP packet and viewing the IPv4 time to live or IPv6 hop limit field of the IP path tracing packet.
[0103] In one embodiment, the path tracking device applied to the first type of network node further includes:
[0104] The second receiver is configured to receive the first routing prefix information sent by the second type of network node;
[0105] The second builder is configured to construct a forwarding table with the first route prefix information as the matching key.
[0106] In one embodiment, when a double-layer IP packet forwarded by a third-type network node is received, the path tracing device applied to the first-type network node further includes:
[0107] The repeater is configured to forward two-layer IP packets to a second-type network node based on a forwarding table.
[0108] In one embodiment, the first builder includes:
[0109] Construct a local processing function table with the first routing prefix information and the first SRv6 function information as matching keys.
[0110] In one embodiment, the local processing function further includes:
[0111] If the IPv4 time to live or IPv6 hop count limit field is set to the first value, terminate the forwarding of the two-layer IP packets and send a response packet to the fourth type network node pointed to by the IP source address in the inner IP path tracing packet.
[0112] If the IPv4 Time to Live or IPv6 Hop Limit field is not the first value, decrement the IPv4 Time to Live or IPv6 Hop Limit field by one, and forward the double-layer IP packet to the second type of network node according to the forwarding table.
[0113] In one embodiment, the IP path tracing message includes one of the following: an IPv4 Internet Control Message Protocol (ICMP) Echo Request message; an IPv6 ICMP Echo Request message; an IPv4 message using User Datagram Protocol (UDP) as the transport layer protocol; or an IPv6 message using UDP as the transport layer protocol.
[0114] In one embodiment, when a double-layer IP packet carries an IPv6 segment routing header, the IPv6 segment routing header includes at least: the IPv6 address of a first type of network node; and the IPv6 address of a second type of network node.
[0115] In one embodiment, when the double-layer IP packet carries an IPv6 segment routing header, the tracking device applied to the first type of network node further includes:
[0116] The announcement module is configured to announce the second routing prefix information and the second SRv6 function information of the first type of network nodes in the current network.
[0117] In one embodiment, when the double-layer IP packet carries an IPv6 segment routing header, the path tracing device applied to the first type of network node further includes:
[0118] The third receiver is configured to receive double-layer IP packets forwarded by the fifth type of network node, which include an outer IPv6 segment routing header. The outer IPv6 segment routing header includes: the second routing prefix information and the second SRv6 function information of the first type of network node, and the first routing prefix information and the first SRv6 function information of the second type of network node. The fifth type of network node has the same node type as the first type of network node.
[0119] In one embodiment, the path tracking device applied to the first type of network node further includes:
[0120] The second executor is configured to perform an outer IPv6 destination address replacement operation on the double-layer IP packet based on the outer IPv6 segment routing header.
[0121] The path tracking device provided in this embodiment is configured to achieve... Figure 5 The path tracking method in the illustrated embodiment is similar in principle and technical effect to the path tracking device provided in this embodiment, and will not be described again here.
[0122] Figure 8 This is a schematic diagram of the structure of a path tracking device provided in an embodiment of this application. Figure 8 As shown, the device provided in this application includes: a processor 410, a memory 420, and a communication module 430. The device may contain one or more processors 410. Figure 8 Taking a processor 410 as an example, the number of memories 420 in this device can be one or more. Figure 8 Taking a memory 420 as an example, the processor 410, memory 420, and communication module 430 of this device can be connected via a bus or other means. Figure 8 Taking a bus connection as an example, in this embodiment, the device can be a first type of network node. For example, the first type of network node can be a P-node in the SRv6 public network.
[0123] Memory 420, as a computer-readable storage medium, may be configured to store software programs, computer-executable programs, and modules, such as program instructions / modules corresponding to the device in any embodiment of this application (e.g., the first receiver 310, the first builder 320, and the first executor 330 in the path tracking device). Memory 420 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application program required for at least one function; the data storage area may store data created based on the use of the device, etc. Furthermore, memory 420 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some instances, memory 420 may further include memory remotely located relative to processor 410, and these remote memories may be connected to the device via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0124] Communication module 430 is configured to perform communication interaction among various synchronization nodes.
[0125] When the communication device is a first type of network node, the device provided above can be configured to execute the communication method for the first type of network node provided in any of the above embodiments, and has the corresponding functions and effects.
[0126] This application embodiment also provides a storage medium containing computer-executable instructions. When executed by a computer processor, the computer-executable instructions are used to perform a path tracing method applied to a first type of network node. The method includes: receiving first IPv6 segment routing SRv6 function information sent by a second type of network node, the first SRv6 function information being used to instruct the first type of network node to parse the inner IP path tracing packet corresponding to the received double-layer IP packet; constructing a local processing function table based on the first SRv6 function information; and, upon receiving a double-layer IP packet forwarded by a third type of network node, intercepting the double-layer IP packet according to the local processing function table and executing the local processing function indicated by the first SRv6 function information. The local processing function includes: parsing the inner IP path tracing packet corresponding to the double-layer IP packet and viewing the IPv4 time-to-live or IPv6 hop count limit field of the IP path tracing packet.
[0127] Those skilled in the art will understand that the term user equipment covers any suitable type of wireless user equipment, such as mobile phones, portable data processing devices, portable web browsers, or vehicle-mounted mobile stations.
[0128] Generally, the various embodiments of this application can be implemented in hardware or dedicated circuitry, software, logic, or any combination thereof. For example, some aspects can be implemented in hardware, while others can be implemented in firmware or software that can be executed by a controller, microprocessor, or other computing device, although this application is not limited thereto.
[0129] Embodiments of this application can be implemented by executing computer program instructions through the data processor of a mobile device, for example, in a processor entity, or through hardware, or through a combination of software and hardware. The computer program instructions can be assembly instructions, Instruction Set Architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages.
[0130] Any block diagram of logical flow in the accompanying drawings of this application may represent program steps, or may represent interconnected logic circuits, modules, and functions, or may represent a combination of program steps and logic circuits, modules, and functions. The computer program may be stored on memory. Memory may be of any type suitable to the local technical environment and may be implemented using any suitable data storage technology, such as, but not limited to, read-only memory (ROM), random access memory (RAM), optical storage devices and systems (Digital Video Disc (DVD) or Compact Disk (CD)), etc. Computer-readable media may include non-transitory storage media. The data processor may be of any type suitable to the local technical environment, such as, but not limited to, general-purpose computers, special-purpose computers, microprocessors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), and processors based on multi-core processor architectures.
[0131] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A path tracing method, characterized in that, Applied to the first type of network nodes, including: Receive first IPv6 segment routing SRv6 function information sent by the second type of network node. The first SRv6 function information is used to instruct the first type of network node to parse the inner IP path tracing packet corresponding to the received double-layer IP packet. A local processing function table is constructed based on the first SRv6 function information; Upon receiving a double-layer IP packet forwarded by a third type of network node, the double-layer IP packet is intercepted according to the local processing function table, and the local processing function indicated by the first SRv6 function information is executed. The local processing function includes: parsing the inner IP path tracing packet corresponding to the double-layer IP packet, and viewing the IPv4 time to live or IPv6 hop count limit field of the IP path tracing packet. The first type of network node is a public P node in the SRv6 network, the second type of network node is a remote PE, and the third type of network node is a local PE node.
2. The method according to claim 1, characterized in that, The method further includes: Receive the first routing prefix information sent by the second type of network node; Construct a forwarding table with the first routing prefix information as the matching key.
3. The method according to claim 2, characterized in that, When receiving a double-layer IP packet forwarded by a third-type network node, the method further includes: The two-layer IP packets are forwarded to the second type of network node according to the forwarding table.
4. The method according to claim 1 or 2, characterized in that, The step of constructing a local processing function table based on the first SRv6 function information includes: Construct a local processing function table with the first routing prefix information and the first SRv6 function information as matching key values.
5. The method according to claim 1, characterized in that, The local processing function also includes: If the IPv4 time to live or IPv6 hop count limit field is a first value, the forwarding of the two-layer IP packet is terminated, and a response packet is sent to the fourth type of network node pointed to by the IP source address in the inner IP path tracing packet. If the IPv4 time to live or IPv6 hop count limit field is not a first value, the IPv4 time to live or IPv6 hop count limit field is decremented by one, and the double-layer IP packet is forwarded to the second type of network node according to the forwarding table.
6. The method according to claim 1, characterized in that, The IP path tracing message includes one of the following: an IPv4 Internet Control Message Protocol (ICMP) Echo Request message; an IPv6 ICMP Echo Request message; an IPv4 message using User Datagram Protocol (UDP) as the transport layer protocol; or an IPv6 message using UDP as the transport layer protocol.
7. The method according to claim 1, characterized in that, When the double-layer IP packet carries an IPv6 segment routing header, the IPv6 segment routing header includes at least: the IPv6 address of the first type of network node; and the IPv6 address of the second type of network node.
8. The method according to claim 1 or 2, characterized in that, When the double-layer IP packet carries an IPv6 segment routing header, the method further includes: In the current network, announce the second routing prefix information and the second SRv6 function information of the first type of network nodes.
9. The method according to claim 1, characterized in that, When the double-layer IP packet carries an IPv6 segment routing header, the method further includes: The system receives a double-layer IP packet forwarded by a fifth type of network node, which includes an outer IPv6 segment routing header. The outer IPv6 segment routing header includes: the second routing prefix information and the second SRv6 function information of the first type of network node, and the first routing prefix information and the first SRv6 function information of the second type of network node. The fifth type of network node has the same node type as the first type of network node.
10. The method according to claim 9, characterized in that, The method further includes: The outer IPv6 segment routing header is used to perform an outer IPv6 destination address replacement operation on the double-layer IP packet.
11. A path tracking device, characterized in that, include: A communication module, a memory, and one or more processors; The communication module is configured to perform communication interactions between various network nodes; The memory is configured to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors perform the method as described in any one of claims 1-10.
12. A storage medium, characterized in that, The storage medium stores a computer program that, when executed by a processor, implements the method as described in any one of claims 1-10.
Citation Information
Patent Citations
Method and device for detecting path
CN107248941A
Method, device and system for obtaining SRv6 tunnel information
CN110971433A