WO2022199486A1 - 路径跟踪方法、设备和存储介质 - Google Patents

路径跟踪方法、设备和存储介质 Download PDF

Info

Publication number
WO2022199486A1
WO2022199486A1 PCT/CN2022/081704 CN2022081704W WO2022199486A1 WO 2022199486 A1 WO2022199486 A1 WO 2022199486A1 CN 2022081704 W CN2022081704 W CN 2022081704W WO 2022199486 A1 WO2022199486 A1 WO 2022199486A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
packet
layer
ipv6
double
Prior art date
Application number
PCT/CN2022/081704
Other languages
English (en)
French (fr)
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 WO2022199486A1 publication Critical patent/WO2022199486A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/34Source routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • 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/22Parsing or analysis of headers

Definitions

  • the present application relates to the field of communications, for example, to a path tracking method, device and storage medium.
  • IP Internet Protocol, Internet Protocol
  • VPN Virtual Private Network
  • IPv6 Internet Protocol Version 6
  • Segment Routing with IPv6, SRv6 technology uses the IP-in-IPv6 packet encapsulation method.
  • the inner IP for example, IPv4 (Internet Protocol Version 4) or IPv6 address uses the address in the IP private network interconnected through the SRv6 public network
  • the outer IPv6 address uses the address in the SRv6 public network .
  • a customer edge device CE, such as a host, router, or switch
  • a traceroute for devices in the remote private network
  • the public network in the SRv6 public network The node cannot intercept and parse the IP Traceroute packets sent by the local CE, so that the local CE cannot obtain the public network node information on the SRv6 public network through which the Traceroute packets pass.
  • the embodiments of the present application provide a path tracking method, device, and storage medium, which realize the acquisition of public network node information passed by a path tracking message in an SRv6 public network.
  • An embodiment of the present application provides a path tracking method, which is applied to a first type of network node, including:
  • the The local processing function includes: parsing the inner layer IP path tracking message corresponding to the double-layer IP message, and checking the IPv4 lifetime or IPv6 hop limit field of the IP path tracking message.
  • An embodiment of the present application provides a path tracking apparatus, which is applied to a first type of network node, including:
  • a first receiver configured to receive first IPv6 segment routing SRv6 function information sent by the second type network node, where the first SRv6 function information is used to instruct the first type network node to respond to the received double-layer IP packet
  • the corresponding inner IP path tracking packet is parsed;
  • a first builder configured to build a local processing function table according to the first SRv6 function information
  • the local processing function includes: parsing the inner layer IP path tracking message corresponding to the double-layer IP message, and checking the IPv4 time-to-live or IPv6 hop count of the IP path tracking message Limit fields.
  • An embodiment of the present application provides a path tracking device, including: a communication module, a memory, and one or more processors;
  • the communication module is configured to perform communication interaction among multiple network nodes
  • the memory configured to store one or more programs
  • the one or more processors 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.
  • An embodiment of the present application provides a storage medium, where a computer program is stored in the storage medium, and when the computer program is executed by a processor, the method described in any of the foregoing embodiments is implemented.
  • Fig. 1 is a kind of IP VPN network structure schematic diagram based on SRv6 technology provided in the prior art
  • Fig. 2 is a kind of IP VPN network structure schematic diagram based on MPLS technology provided in the prior art
  • Fig. 3 is a kind of schematic diagram of path tracing process in IP VPN network based on MPLS technology provided in the prior art
  • FIG. 4 is a schematic diagram of a path tracing process in an IP VPN network based on SRv6 technology provided in the prior art
  • FIG. 5 is a flowchart of a path tracking method provided by an embodiment of the present application.
  • FIG. 6 is a flowchart of another path tracking method provided by an embodiment of the present application.
  • FIG. 7 is a structural block diagram of a path tracking apparatus provided by an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a path tracking device provided by an embodiment of the present application.
  • IP Virtual Private Network is a widely used network type. It connects multiple IP private networks of telecom customers through the public network managed by telecom operators, so that telecom customers are located in the local IP private network.
  • the network and the remote IP private network can communicate with each other, and together they form a large IP private network.
  • Fig. 1 is a kind of IP VPN network structure schematic diagram based on SRv6 technology provided in the prior art, as shown in Fig.
  • the IP VPN network based on SRv6 technology includes three different types of network equipment, namely CE equipment (Customer Edge device), PE device (Provider Edge device) and P device (Provider device), where CE device is a client device in the private network, such as a host, router or switch, PE device is an edge device in the public network, P device It is an intermediate device in the public network.
  • the PE device and the P device are both routers.
  • the local PE device encapsulates the single-layer IP (IPv4 or IPv6) packet sent by the local CE device into a double-layer IP (IP-in-IPv6) packet carrying the VPN identifier.
  • the inner IP (IPv4 or IPv6) address is the address in the private IP network interconnected through the SRv6 public network
  • the outer IPv6 address is the address in the SRv6 public network.
  • Fig. 2 is a kind of IP VPN network structure schematic diagram based on MPLS technology provided in the prior art.
  • the IP VPN network based on MPLS technology like the IP VPN network based on SRv6 technology, the IP VPN network based on MPLS technology also includes three different types of network equipment: CE equipment, PE equipment and P equipment. The difference is that based on MPLS technology
  • the local PE device encapsulates the single-layer IP (IPv4 or IPv6) packet sent by the local CE device into an MPLS (IP-in-MPLS) packet carrying the VPN identifier, wherein the inner layer IP (IPv4 or IPv6) address is the address in the IP private network interconnected through the MPLS public network, and the outer MPLS label uses the label allocated in the MPLS public network.
  • IPv4 or IPv6 IP-in-MPLS
  • the local PE device and the P device forward the MPLS packet to the remote PE device through MPLS forwarding.
  • the remote PE device decapsulates the received MPLS packet into a single-layer IP packet.
  • the VPN ID sends single-layer IP packets to the correct remote CE.
  • FIG. 3 is a schematic diagram of a path tracing process in an MPLS technology-based IP VPN network provided in the prior art. As shown in Figure 3, after the IP Traceroute packet sent by CE1 reaches PE1, it is encapsulated by PE1 by adding MPLS labels on the outer layer. It is an MPLS packet.
  • PE1 copies the hop limit field in the IP Traceroute packet (TTL (Time to Live) in IPv4 packets or Hop Limit (hop limit) in IPv6 packets) to the outside world. Therefore, the P1 and P2 nodes in the MPLS network can intercept the IP Traceroute packets sent by CE1 based on the TTL of the outer MPLS label.
  • TTL Time to Live
  • hop limit Hop Limit
  • the P1 and P2 nodes strip off the MPLS label and parse the IP Traceroute packet inside the MPLS label, so that P1 and P2 can Make a correct response according to the parsing result, so that CE1 can obtain the information of the P1 and P2 nodes through which the Traceroute packet in the MPLS public network passes.
  • FIG. 4 is a schematic diagram of a path tracing process in an IP VPN network based on SRv6 technology provided in the prior art. As shown in Figure 4, after the IP Traceroute packet sent by CE1 reaches PE1, it is encapsulated by PE1 by adding an IPv6 header in the outer layer. It is a double-layer IP packet.
  • the hop limit field in the IP Traceroute packet (TTL in IPv4 packet or Hop Limit in IPv6 packet) is set by PE1.
  • TTL in IPv4 packet or Hop Limit in IPv6 packet is set by PE1.
  • the P1 and P2 nodes in the SRv6 network can also intercept the IP Traceroute message sent by CE1 based on the Hop Limit of the outer IPv6 header, according to the forwarding specified by the IPv6 technology Plane parsing rules, after receiving the double-layer IP packet with Hop Limit equal to 1 in the outer IPv6 header, the P1 and P2 nodes directly send ICMPv6 packets to PE1 pointed to by the IPv6 source address in the outer IPv6 header, without Parse the IP Traceroute packet inside the outer IPv6 header, so that P1 and P2 cannot respond correctly according to the parsing result, so that CE1 cannot obtain the information of the P1 and P2 nodes that the Traceroute packet
  • an embodiment of the present application provides a SRv6-based IP VPN path tracking method, which is used in an SRv6-based IP VPN network, so that when a path tracking for a remote CE is initiated from a local CE, the SRv6 public network
  • the node can intercept and parse the IP Traceroute packets sent by the local CE, so that the local CE can obtain the information of each hop P node passed by the Traceroute packets in the SRv6 public network.
  • FIG. 5 is a flowchart of a path tracking method provided by an embodiment of the present application. This embodiment may be performed by a first type of network node.
  • the first type of network node refers to a public network node in the SRv6 network.
  • the first type of network node may be a P node in an SRv6 network.
  • this embodiment includes S110-S130.
  • the first SRv6 function information is used to instruct the first type of network node to parse the inner layer IP path tracking packet corresponding to the received double-layer IP packet.
  • the second type of network node refers to the remote PE, that is, the PE2 node shown in FIG. 4 .
  • the second type of network node advertises the SRv6 function information of its own node in the network through an intra-domain routing protocol.
  • the SRv6 function information of the second type of network node is used as the first SRv6 function information.
  • the first SRv6 function information is used to instruct the first type of network node to parse the inner layer IP path tracking packet of the double-layer IP packet.
  • the first SRv6 function information is used to instruct the first type of network node to check the IPv4 time-to-live or IPv6 hop limit field of the IP path trace packet inside the outer IPv6 header.
  • the local processing function table is constructed according to the first SRv6 function information.
  • the local processing function includes: parsing the inner IP path trace packet corresponding to the double-layer IP packet, and checking the IPv4 lifetime or IPv6 hop limit field of the IP path trace packet.
  • the third type of network node refers to the local PE node, that is, the PE1 node shown in FIG. 4 .
  • the first-type network node receives the double-layer IP packet forwarded by the third-type network node, it intercepts the double-layer IP packet according to the local processing function table, and executes the instructions indicated by the first SRv6 function information.
  • the local processing function is to check whether the IPv4 time-to-live or IPv6 hop limit field of the IP path trace packet in the outer IPv6 header is 1.
  • the forwarding of the double-layer IP packet is terminated, and the internal The local CE node pointed to by the IP source address in the layer IP path tracking packet sends a response packet; if it is not 1, the IPv4 lifetime or IPv6 hop limit field is decremented by one, and the forwarding table will be forwarded according to the pre-created forwarding table.
  • Layer IP packets are forwarded to the remote PE node.
  • the nodes in the SRv6 public network can intercept and parse the IP path tracking packets sent by the local CE, so that the local CE can obtain the path tracking packets in the SRv6 public network. The purpose of each hop public network node information passed by the text.
  • the path tracing method applied to the first type of network node further includes: receiving first routing prefix information sent by the second type of network node; and constructing a forwarding table using the first routing prefix information as a matching key.
  • the first routing prefix information refers to routing prefix information of the second type of network node.
  • the first type network node constructs a forwarding table using the first routing prefix information as a matching key.
  • the first type network node after receiving the first SRv6 function information and the first routing prefix information advertised by the second type network node, constructs the outer IPv6 by adding the first routing prefix information and the first SRv6 function information
  • Table 1 is a schematic diagram of the format of a constructed encapsulation table provided by an embodiment of the present application.
  • the matching field of the encapsulation table (that is, the matching key in the above-mentioned embodiment) is the characteristic field of the IP path tracking packet, and the encapsulation operation includes: performing IP-in-IPv6 encapsulation, converting the IP path tracking packet
  • the encapsulation is an inner layer IP packet, an IPv6 packet header is added to the outer layer, and the outer layer IPv6 destination address is set as the first routing prefix information plus the first SRv6 function information.
  • Table 1 Schematic diagram of the format of a constructed encapsulation table
  • the path tracing method applied to the first-type network node further includes: forwarding the double-layer IP packet to the third-type network node according to the forwarding table. Two types of network nodes.
  • constructing a local processing function table according to the first SRv6 function information includes: constructing a local processing function table using the first routing prefix information and the first SRv6 function information as matching keys.
  • the first type of network node after receiving the first routing prefix information and the first SRv6 function information advertised by the second type network node, constructs a matching key with the first routing prefix information and the first SRv6 function information Local processing function table.
  • Table 2 is a schematic diagram of the format of a local processing function table constructed by a network node of the first type provided by an embodiment of the present application.
  • the matching field of the local processing function table is the outer layer IPv6 destination address, wherein the outer layer IPv6 destination address is the first routing prefix information and the first SRv6 function information.
  • the local processing function includes: in response to the IPv4 time-to-live or the IPv6 hop limit field being the first value, terminating the forwarding of the double-layer IP packet, and tracing the IP source address in the packet to the inner IP path.
  • the local processing functions in Table 2 include: executing the local processing function corresponding to the first SRv6 function information, parsing the inner IP path tracking packet of the double-layer IP packet, checking the IP path tracking packet IPv4 time-to-live or IPv6 hop limit field; in response to the IPv4 time-to-live or IPv6 hop limit field being 1, terminate the forwarding of the double-layer IP packet, and trace the local IP source address in the inner IP path trace packet to the local address.
  • the CE node sends a response packet; in response to that the IPv4 lifetime or IPv6 hop limit field is not 1, the IPv4 lifetime or IPv6 hop limit field is decremented by one, and continues to forward the double-layer IP packet.
  • Table 2 A schematic diagram of the format of the local processing function table constructed by the first type of network node
  • the IP path tracking message includes one of the following: the Internet Control Message Protocol (ICMP) echo request message of IPv4; the ICMP echo request message of IPv6; the user datagram protocol ( User Datagram Protocol, UDP) is used as the IPv4 message of the transport layer protocol; UDP is used as the IPv6 message of the transport layer protocol.
  • ICMP Internet Control Message Protocol
  • UDP User Datagram Protocol
  • the IPv6 segment routing header when the double-layer IP packet carries an 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.
  • the IPv6 segment routing header when the double-layer IP packet encapsulated by the third-type network node carries an IPv6 segment routing header, contains at least two entries, which are the IPv6 address of the first-type network node and the second-type network node's IPv6 address respectively. The IPv6 address of the network node.
  • the fifth type of network node may be a fifth type of network node between the third type of network node and the first type of network node, and there may also be a fifth type of network node between the first type of network node and the second type of network node.
  • the fifth type of network node and the first type of network node are of the same node type, and both are public network nodes in the SRv6 network.
  • the tracking method applied to the first type of network node further includes: in response to the double-layer IP packet carrying the IPv6 segment routing header, advertising the second routing prefix information of the first type of network node in the current network and the second SRv6 function information.
  • the second routing prefix information refers to 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.
  • the IPv6 segment routing header including 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 needs to reach the first type of network node first; Then, the first type network node modifies the IPv6 destination address from the IPv6 address of the first type network node to the IPv6 address of the second type network node according to the segment routing header; and then forwards the packet to the second type network node.
  • the second type network node advertises its own routing prefix information and SRv6 function information in the network through the intra-domain routing protocol.
  • a type of network node also advertises its own routing prefix information and SRv6 function information in the network through the intra-domain routing protocol.
  • the path tracing method applied to the first type of network node further includes: in response to the double-layer IP packet carrying the IPv6 segment routing header, receiving a packet containing the outer IPv6 segment routing header forwarded by the fifth type of network node.
  • Double-layer IP packet wherein, the outer layer IPv6 segment routing header includes: second routing prefix information and second SRv6 function information of the first type network node, and first routing prefix information and first SRv6 information of the second type network node Functional information; the fifth type of network node is the same node type as the first type of network node.
  • the fifth type of network node and the first type of network node may be public network nodes in an SRv6 network, for example, a P node.
  • 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
  • the second routing prefix information and SRv6 function information of the first-type network node are respectively constructed.
  • the second SRv6 function information, as well as the first routing prefix information and the first SRv6 function information of the second type network node are local processing function tables with matching keys, and the second routing prefix information of the first type network node and the first SRv6 function information are respectively constructed.
  • the second SRv6 function information, and the first routing prefix information and the first SRv6 function information of the second type of network node are forwarding tables with matching keys.
  • the third-type network node receives the IP or UDP path tracking packet sent by the local CE node with the IP source address pointing to the local CE node and the IP destination address pointing to the second-type network node, it determines the path tracking packet in the IP or UDP path tracking packet. Whether the IPv4 time-to-live or IPv6 hop count limit field is 1, if not 1, take the second routing prefix information and second SRv6 function information of the first type network node as the outer IPv6 destination address, and use the first type network node as the outer IPv6 destination address.
  • the second routing prefix information and the second SRv6 function information of the network node, and the first routing prefix information of the second type network node plus the first SRv6 function information are the encapsulation table of the outer IPv6 segment routing header, and the IP or UDP path
  • the trace packet is encapsulated with the outer IPv6 destination address set as the first routing prefix information and the first SRv6 function information, and 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, and
  • the path tracing method applied to the first type of network node further includes: performing an outer layer IPv6 destination address replacement operation on the double-layer IP packet according to the outer layer IPv6 segment routing header.
  • the IPv6 segment routing header including 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 needs to reach the first type of network node first; Then, the first type network node modifies the IPv6 destination address from the IPv6 address of the first type network node to the IPv6 address of the second type network node according to the segment routing header; and then forwards the packet to the second type network node.
  • FIG. 6 is a flowchart of another path tracking method provided by an embodiment of the present application.
  • the path tracing process is described by taking the first type of network node as a P node, the second type of network node as a remote PE node, and the third type of network node as a local PE node as an example.
  • the first routing prefix information is recorded as the first Locator information
  • the first SRv6 function information is recorded as the first Function information.
  • the path tracking method in this embodiment includes S210-S250.
  • the network node advertises the first routing prefix (Locator) information and the first SRv6 function (Function) information of the node in the network through an intra-domain routing protocol (IGP, Interior Gateway Protocol).
  • the first Function information is used to instruct the node to parse the inner IP Traceroute (path tracing) packet of the double-layer IP packet.
  • the first Function information is used to instruct the node to view the IP address inside the outer IPv6 header.
  • the hop limit field of Traceroute packets (for example, TTL in IPv4 packets or Hop Limit in IPv6 packets) is 1, if it is 1, the forwarding of this double-layer IP packet is terminated, and the inner IP The local CE node pointed to by the IP source address in the Traceroute header sends a response packet; if it is not 1, the hop limit field is decremented by 1, and the double-layer IP packet is forwarded.
  • the local PE node builds the encapsulation table and the forwarding table according to the first Locator and the first Function announced, and the P node builds the local processing function table and the forwarding table according to the first Locator and the first Function announced.
  • the local PE node after receiving the first Locator information and the first Function information advertised by the network node, the local PE node constructs a matching key value with the feature field of the IP Traceroute packet, and the first Locator information plus the first Function information. It is the encapsulation table of the outer IPv6 destination address, and constructs a forwarding table with the first Locator information as the matching key value.
  • the schematic format of the encapsulation table constructed by the local PE is shown in Table 1 in the foregoing embodiment.
  • the P node 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 matching keys, and constructs the first Locator information as the matching key A forwarding table of values.
  • the schematic format of the local processing function table constructed by the P node is shown in Table 2 in the above-mentioned embodiment.
  • the local PE node After the local PE node receives the IP Traceroute packet sent by the local CE node, if the hop count limit field is not 1, the hop count limit field is decremented by 1, and the IP Traceroute packet is encapsulated into double Layer IP packets, and then forward the double-layer IP packets according to the forwarding table.
  • the local PE node After the local PE node receives the IP Traceroute message sent by the local CE node with the IP source address pointing to the local CE node and the IP destination address pointing to the remote CE node, it first determines the hop count limit field in the IP Traceroute message Whether it 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 not 1, executes the hop count limit field.
  • Table 3 is a schematic diagram of the format of a double-layer IP packet formed after a local PE node encapsulates an IP Traceroute packet provided by the embodiment of the present application. As shown in Table 3, the outer layer IPv6 hop count limit of the double-layer IP packet When set to 255, the SRv6 Segment Routing Header (SRH) is optional.
  • SSH SRv6 Segment Routing Header
  • Table 3 A schematic diagram of the format of a double-layer IP packet formed after the local PE node encapsulates the IP Traceroute packet
  • the P node After receiving the double-layer IP packet forwarded by the local PE, the P node intercepts the IP Traceroute packet according to the local processing function table, and executes the hop limit field for viewing and processing the inner IP Traceroute packet indicated by the first Function. .
  • the P node after receiving the 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 first A local processing function indicated by the Function information, that is, check whether the hop limit field of the IP Traceroute packet in the outer IPv6 header is 1. If it is 1, the forwarding of the double-layer IP packet is terminated, and the internal Layer IP The local CE node pointed to by the IP source address in the Traceroute header sends a response packet; if it is not 1, the hop limit field is decremented by 1, and then the forwarding table with the Locator information as the longest matching key is forwarded. The double-layer IP packet is forwarded to the remote PE node.
  • the remote PE node 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, and strips off the outer IPv6 header, so as to view and process the hop limit field of the IP Traceroute packet .
  • the remote PE node after receiving the double-layer IP message forwarded by the P node, performs a decapsulation operation on the double-layer IP message, strips the outer IPv6 header and parses the inner IP Traceroute message, Check whether the hop limit field of the IP Traceroute packet is 1. If it is 1, the forwarding of the 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 IP Traceroute header; 1, the hop limit field is decremented by 1, and then forwarded according to the remote CE node pointed to by the IP destination address in the IP Traceroute header.
  • the path tracing process is described by taking the first type of network node as a P node, the second type of network node as a remote PE node, and the third type of network node as a local PE node as an example.
  • the first routing prefix information is recorded as the first Locator information
  • the first SRv6 function information is recorded as the first Function information.
  • the double-layer IP packet encapsulated by the local PE node does not carry the IPv6 segment routing header
  • the IP Traceroute packet is an IPv4 ICMP Echo Request (ICMP Echo Request) packet.
  • Step 11 The remote PE node advertises the first routing prefix (referred to as the first Locator) information and the first SRv6 function (first Function) information of the node in the network through the intra-domain routing protocol (IGP).
  • the first Locator referred to as the first Locator
  • the first SRv6 function first Function
  • the first Function information is used to instruct the node to check whether the TTL field of the ICMP echo request packet inside the outer IPv6 header is 1. If it is 1, the forwarding of the double-layer IP packet is terminated, and the internal The local CE node pointed to by the IP source address in the layer ICMP echo request header sends an ICMP echo response (ICMP Echo Reply) message; if it is not 1, the TTL field is decremented by 1 and continues to forward the double-layer IP message .
  • ICMP Echo Reply ICMP Echo Reply
  • Step 12 After receiving the first Locator information and the first Function information advertised by the remote PE node, the local PE node constructs a matching key value with the ICMP echo request message feature field, and the first Locator information plus the first Function information. It is the encapsulation table of the outer IPv6 destination address, and constructs a forwarding table with the first Locator information as the longest matching key value.
  • the intermediate P node After receiving the first Locator information and the first Function information advertised by the remote PE node, the intermediate P node constructs a local processing function table with the first Locator information and the first Function information as matching key values, and constructs a local processing function table with the first Locator information and the first Function information as matching keys. The information is the forwarding table with the longest matching key value.
  • Step 13 After the local PE node receives the ICMP echo request message sent by the local CE node with the IP source address pointing to the local CE node and the IP destination address pointing to the remote CE node, it first determines 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, and then the ICMP echo request message is sent to the local CE node.
  • the feature field is a matching key value
  • the first Locator information and the first Function information are the encapsulation table of the outer IPv6 destination address
  • the ICMP echo request message is encapsulated as the outer IPv6 destination address and set as the first Locator information and the first Function. information, and forward the double-layer IP packet to the remote PE node according to the forwarding table with the first Locator information of the remote PE node as the longest matching key value.
  • 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 first step.
  • the local processing function indicated by the Function information is
  • the local processing function indicated by the first Function information is executed, that is, it is checked whether the TTL of the ICMP echo request packet in the outer IPv6 header is 1, and if it is 1, the TTL of the double-layer IP packet is terminated. Forward, and send an ICMP echo response packet to the local CE node.
  • the ICMP echo response packet is first encapsulated in a double-layer IP packet by the P node and sent to the local PE node, and then decapsulated by the local PE node into an ICMP echo response packet.
  • the message is then sent to the local CE node; if it is not 1, the TTL of the ICMP echo request message in the outer IPv6 header is decremented by 1, and then the first Locator information of the remote PE node is used as the longest matching key.
  • the forwarding table of the value forwards the double-layer IP packet to the remote PE node.
  • 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, strips the outer IPv6 header and parses the inner layer ICMP echo request packet, and checks Whether the TTL of the ICMP echo request message is 1, if it is 1, the forwarding of the message is terminated, and an ICMP echo response message is sent to the local CE node.
  • the ICMP echo response message is first encapsulated by the remote PE node in a double layer.
  • the IP packet is sent to the local PE node, and 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, the TTL of the ICMP echo request packet is decremented by 1. Then forward to the remote CE node.
  • the path tracing process is described by taking the first type of network node as a P node, the second type of network node as a remote PE node, and the third type of network node as a local PE node as an example.
  • the first routing prefix information is recorded as the first Locator information
  • the first SRv6 function information is recorded as the first Function information.
  • the double-layer IP message encapsulated by the local PE node does not carry the IPv6 segment routing header, and the IP Traceroute message uses the User Datagram Protocol (UDP)
  • UDP User Datagram Protocol
  • the IPv4 packet which is a transport layer protocol, uses a special UDP destination port number, and describes the path tracing process. This embodiment includes the following steps:
  • Step 21 The remote PE node advertises the first routing prefix (denoted as the first Locator) information and the first SRv6 function (denoted as the first Function) information of the node in the network through the intra-domain routing protocol (IGP).
  • IGP intra-domain routing protocol
  • 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, and if it is 1, terminate the forwarding of the double-layer IP packet, and Send an ICMP Time Exceeded packet to the local CE node pointed to by the IP source address in the inner IP/UDP header; if it is not 1, decrement the TTL field by 1 and continue to forward the double-layer IP packet arts.
  • Step 22 After receiving the first Locator information and the first Function information advertised by the remote PE node, the local PE node constructs the matching key value with the special UDP destination port number, and the first Locator information plus the first Function information as An encapsulation table of the outer IPv6 destination address, and a forwarding table with the first Locator information as the longest matching key is constructed.
  • the intermediate P node After receiving the first Locator information and the first Function information advertised by the remote PE node, the intermediate P node constructs a local processing function table with the first Locator information and the first Function information as matching keys, and constructs the first Locator information. Forwarding table for the longest matching key value.
  • Step 23 After the local PE node receives the IP or UDP path tracking packet sent by the local CE node, the IP source address points to the local CE node and the IP destination address points to the remote CE node, and firstly determines the IP or UDP path tracking packet in the IP or UDP path tracking packet.
  • the local PE terminates the IP or UDP path tracking packet and sends an ICMP timeout packet to the local CE node; if it is not 1, the TTL is decremented by 1, and then the The special UDP destination port number is the matching key value, and the first Locator information plus the first Function information is the encapsulation table of the outer IPv6 destination address, and the IP or UDP path trace packet is encapsulated as the outer IPv6 destination address.
  • a double-layer IP packet with Locator information plus the first Function information and forward the double-layer IP packet to the remote PE node according to the forwarding table with the first Locator information of the remote PE node as the longest matching key value .
  • Step 24 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 keys, and executes the first step.
  • the local processing function indicated by the Function information that is, check whether the TTL of the IP or UDP path trace packet in the outer IPv6 header is 1. If it is 1, the forwarding of the double-layer IP packet is terminated and sent to the local CE.
  • the node sends an ICMP timeout message.
  • the ICMP timeout message is first encapsulated in a double-layer IP message by the P node and sent to the local PE node, and then decapsulated by the local PE node into an ICMP timeout message before being sent to the local CE node. If it is not 1, the TTL of the IP/UDP path tracking packet in the outer IPv6 header is decremented by 1, and 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 packets are forwarded to the remote PE node.
  • 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, strips the outer IPv6 header and parses the inner IP or UDP path tracking packet , check whether the TTL of the IP or UDP path tracking packet is 1. If it is 1, the forwarding of the packet is terminated, and an ICMP timeout packet is sent to the local CE node.
  • the ICMP timeout packet is first encapsulated by the remote PE node in the
  • the double-layer IP packet is sent to the local PE node, and then the local PE node decapsulates it into an ICMP timeout packet and sends it to the local CE node; if it is not 1, the TTL of the IP or UDP path tracking packet is decremented. 1 operation, and then forward it to the remote CE node.
  • the first type of network node is an intermediate P1 node
  • the second type of network node is a remote PE node
  • the third type of network node is a local PE node
  • the fourth type of network node is a local CE node
  • the fifth type of network node is a local CE node.
  • the first routing prefix information is marked as the first Locator information
  • the first SRv6 function information is marked as the first Function information
  • the second routing prefix information is marked as the second Locator information
  • the second SRv6 function information is marked as Second Function information.
  • the double-layer IP packet encapsulated by the local PE node carries an IPv6 segment routing header, and the segment routing header contains two entries, which are the IPv6 address of the intermediate P1 node and the The IPv6 address of the remote PE node, there is a P node between the local PE node and the P1 node, and there is also a P node between the P1 node and the remote PE node, and the path tracing process is described.
  • the IPv6 segment routing header including the P1 address and the remote PE address indicates that the packet must first reach the intermediate P1 node, and then the P1 node will transfer the IPv6 destination address from the IPv6 node of the P1 node according to the segment routing header. Change the address to the IPv6 address of the remote PE node, and then forward the packet to the remote PE node.
  • the IP Traceroute packet is an IPv4 ICMP Echo Request (ICMP Echo Request) packet.
  • Step 31 The remote PE node advertises the first routing prefix (first Locator) information and the first SRv6 function (first Function) information of the node in the network through the intra-domain routing protocol (IGP), and the intermediate P1 node also passes the intra-domain routing information.
  • the protocol (IGP) advertises the node's second routing prefix (second Locator) information and second SRv6 function (second Function) information in the network.
  • the first Function information and the second Function information are both used to instruct the node to check whether the TTL field of the ICMP echo request packet inside the outer IPv6 header is 1, and if it is 1, the double-layer IP packet is terminated forwarding, and send an ICMP echo response (ICMP Echo Reply) message to the local CE node pointed to by the IP source address in the inner ICMP echo request header; if it is not 1, decrement the TTL field by 1 and continue forwarding This double-layer IP packet.
  • ICMP Echo Reply ICMP Echo Reply
  • Step 32 After receiving the first Locator information and the first Function information advertised by the remote PE node, and the second Locator information and the second Function information advertised by the intermediate P1 node, the local PE node constructs the ICMP echo request message feature field. In order to match the key value, take the second Locator information and the second Function information of the intermediate P1 node as the outer IPv6 destination address, add the second Function information to the second Locator information of the intermediate P1 node, and the first function information of the remote PE node.
  • the Locator information plus the first Function information is an encapsulation table of two entries of the outer IPv6 segment routing header, and a forwarding table is constructed with the first Locator information of the intermediate P1 node as the longest matching key value.
  • the intermediate P node After receiving the first Locator information and the first Function information advertised by the remote PE node, and the second Locator information and the second Function information advertised by the intermediate P1 node, the intermediate P node constructs the second Locator information and the second Function information of the intermediate P1 node respectively.
  • the second Function information, as well as the first Locator information and the first Function information of the remote PE node are local processing function tables with matching key values, and the second Locator information of the intermediate P1 node and the first Locator information of the remote PE node are constructed respectively. Locator information is the forwarding table with the longest matching key value.
  • the intermediate P1 node After receiving the first Locator information and the first Function information advertised by the remote PE node, the intermediate P1 node constructs a local processing function table with the first Locator information and the first Function information of the remote PE node as matching key values, and constructs The forwarding table with the longest matching key value of the first Locator information of the remote PE node.
  • Step 33 After the local PE node receives the ICMP echo request message sent by the local CE node with the IP source address pointing to the local CE node and the IP destination address pointing to the remote CE node, it first determines 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, and then the ICMP echo request message is sent to the local CE node.
  • the features are the matching key value, the second Locator information and the second Function information of the intermediate P1 node as the outer IPv6 destination address, the second Locator information of the intermediate P1 node plus the second Function information, and the second function information of the remote PE node.
  • the Locator information plus the first Function information is the encapsulation table of the outer IPv6 segment routing header, and the ICMP echo request message is encapsulated into the outer IPv6 destination address.
  • the outer IPv6 segment routing header contains the intermediate P1
  • the second Locator information and the second Function information of the node and the first Locator information and the first Function information of the remote PE node are double-layer IP packets with two entries, and according to the second Locator information of the intermediate P1 node is the longest.
  • the forwarding table matching the key value forwards the double-layer IP packet to the intermediate P1 node.
  • Step 34 After the P node between the local PE node and the P1 node receives the double-layer IP message forwarded by the local PE, it performs local processing based on the second Locator information and the second Function information of the intermediate P1 node as the matching key value.
  • the function table intercepts the double-layer IP packet and executes the local processing function indicated by the second Function information, that is, to check whether the TTL of the ICMP echo request packet in the outer IPv6 header is 1, and if it is 1, terminate the function. Forwarding of double-layer IP packets, and sending an ICMP echo response packet to the local CE node.
  • the ICMP echo response packet is first encapsulated in a double-layer IP packet by the P node and sent to the local PE node, and then decoded by the local PE node. It is encapsulated as an ICMP echo response message and then sent to the local CE node; if it is not 1, the TTL of the ICMP echo request message in the outer IPv6 header is decremented by 1, and then based on the second Locator information of the intermediate P1 node For the forwarding table with the longest matching key, forward the double-layer IP packet to the intermediate P1 node.
  • Step 35 After receiving the double-layer IP packet forwarded by the P node, the P1 node performs the operation of replacing the outer layer IPv6 destination address on the double-layer IP packet according to the outer layer IPv6 segment routing header, and replaces the outer layer IPv6 destination address from the middle layer.
  • the second Locator information and the second Function information of the P1 node are replaced with the first Locator information and the first Function information of the remote PE node. Then, intercept 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 key values, and execute the local processing function indicated by the first Function information, that is, view the external processing function.
  • the TTL of the ICMP echo request packet in the IPv6 header of the layer is 1, if it is 1, the forwarding of the double-layer IP packet is terminated, and the ICMP echo response packet is sent to the local CE node. It is encapsulated in a double-layer IP packet by the P1 node and sent to the local PE node, and then decapsulated by the local PE node into an ICMP echo response packet and sent to the local CE node; The TTL of the ICMP echo request packet is decremented by 1, and then the double-layer IP packet is forwarded to the remote PE node according to the forwarding table with the first Locator information of the remote PE node as the longest matching key value.
  • Step 36 After the P node between the P1 node and the remote PE node receives the double-layer IP packet forwarded by the P1 node, it uses the first Locator information and the first Function information of the remote PE node as the matching key value.
  • the local processing function table intercepts double-layer IP packets and executes the local processing function indicated by the first Function, that is, to check whether the TTL of the ICMP echo request packet in the outer IPv6 header is 1, and if it is 1, terminate the double-layer IP packet. Layer IP packets are forwarded, and an ICMP echo response packet is sent to the local CE node.
  • the ICMP echo response packet is first encapsulated in a double-layer IP packet by the P node and sent to the local PE node, and then decapsulated by the local PE node. It is the ICMP echo response packet and then sent to the local CE node; if it is not 1, the TTL of the ICMP echo request packet in the outer IPv6 header is decremented by 1, and then based on the first Locator information of the remote PE node For the forwarding table with the longest matching key, forward the double-layer IP packet to the remote PE node.
  • 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, strips the outer IPv6 header and parses the inner layer ICMP echo request packet, and checks Whether the TTL of the ICMP echo request message is 1, if it is 1, the forwarding of the message is terminated, and an ICMP echo response message is sent to the local CE node.
  • the ICMP echo response message is first encapsulated by the remote PE node in a double layer.
  • the IP packet is sent to the local PE node, and 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, the TTL of the ICMP echo request packet is decremented by 1. Then forward to the remote CE node.
  • the first type of network node is an intermediate P1 node
  • the second type of network node is a remote PE node
  • the third type of network node is a local PE node
  • the fourth type of network node is a local CE node
  • the fifth type of network node is a local CE node.
  • the first routing prefix information is marked as the first Locator information
  • the first SRv6 function information is marked as the first Function information
  • the second routing prefix information is marked as the second Locator information
  • the second SRv6 function information is marked as Second Function information.
  • the double-layer IP packet encapsulated by the local PE node carries an IPv6 segment routing header, and the segment routing header contains two entries, which are the IPv6 address of the intermediate P1 node and the The IPv6 address of the remote PE node, there is a P node between the local PE node and the P1 node, and there is also a P node between the P1 node and the remote PE node, and the path tracing process is described.
  • the IPv6 segment routing header including the P1 address and the remote PE address indicates that the packet must first reach the intermediate P1 node, and then the P1 node will transfer the IPv6 destination address from the IPv6 node of the P1 node according to the segment routing header. Change the address to the IPv6 address of the remote PE node, and then forward the packet to the remote PE node.
  • the IP Traceroute message is an IPv4 message that uses the User Datagram Protocol (UDP) as the transport layer protocol, and the message uses a special UDP destination port number.
  • UDP User Datagram Protocol
  • Step 41 The remote PE node advertises the first routing prefix (first Locator) information and the first SRv6 function (first Function) information of the node in the network through the intra-domain routing protocol (IGP), and the intermediate P1 node also passes the intra-domain routing information.
  • the protocol (IGP) advertises the node's second routing prefix (second Locator) information and second SRv6 function (second Function) information in the network.
  • the first Function information and the second Function information are both used to instruct the node to check whether the TTL field of the IP or UDP path trace packet inside the outer IPv6 header is 1, and if it is 1, terminate the double-layer IP The forwarding of the packet, and send an ICMP timeout packet to the local CE node pointed to by the IP source address in the inner IP/UDP path trace header; if it is not 1, decrement the TTL field by 1, and continue to forward the double Layer IP packets.
  • Step 42 After receiving the first Locator information and the first Function information advertised by the remote PE node, and the second Locator information and the second Function information advertised by the intermediate P1 node, the local PE node constructs a special UDP destination port number as The matching key value, taking the second Locator information and the second Function information of the intermediate P1 node as the outer IPv6 destination address, using the second Locator information of the intermediate P1 node plus the second Function information, and the first The Locator information plus the first Function information is an encapsulation table of two entries in the outer IPv6 segment routing header, and a forwarding table is constructed with the second Locator information of the intermediate P1 node as the longest matching key value.
  • the intermediate P node After receiving the first Locator information and the first Function information advertised by the remote PE node, and the second Locator information and the second Function information advertised by the intermediate P1 node, the intermediate P node constructs the second Locator information and the second Function information of the intermediate P1 node respectively.
  • the second Function information, as well as the first Locator information and the first Function information of the remote PE node are local processing function tables with matching key values, and the second Locator information of the intermediate P1 node and the first Locator information of the remote PE node are constructed respectively. Locator information is the forwarding table with the longest matching key value.
  • the intermediate P1 node After receiving the first Locator information and the first Function information advertised by the remote PE node, the intermediate P1 node constructs a local processing function table with the first Locator information and the first Function information of the remote PE node as matching key values, and constructs The forwarding table with the longest matching key value of the first Locator information of the remote PE node.
  • Step 43 After the local PE node receives the IP or UDP path tracking packet sent by the local CE node, the IP source address points to the local CE node and the IP destination address points to the remote CE node, and firstly determines the IP or UDP path tracking packet in the IP or UDP path tracking packet.
  • the local PE terminates the IP or UDP path tracking packet and sends an ICMP timeout packet to the local CE node; if it is not 1, the TTL is decremented by 1, and then the The special UDP destination port number is the matching key value
  • the second Locator information and the second Function information of the intermediate P1 node are the outer IPv6 destination address
  • the second Locator information and the second Function information of the intermediate P1 node are the remote
  • the first Locator information and the first Function information of the PE node are the encapsulation table of the routing header of the outer IPv6 segment
  • the IP or UDP path trace packet is encapsulated as the outer IPv6 destination address, which is set as the Locator information plus the Function information, the outer IPv6
  • the segment routing header contains the second Locator information and the second Function information of the intermediate P1 node, and the double-layer IP packet with two entries of the first Locator information and the first Function information of the remote PE node.
  • the second Locator information is the forwarding
  • Step 44 After the P node between the local PE node and the P1 node receives the double-layer IP message forwarded by the local PE, according to the local processing function that takes the second Locator information and the second Function information of the P1 node as the matching key value
  • the table intercepts the double-layer IP packets and executes the local processing function indicated by the Function, that is, checks whether the TTL of the IP/UDP path tracking packet inside the outer IPv6 header is 1, and if it is 1, the double-layer is terminated. Forwards IP packets, and sends ICMP timeout packets to the local CE node.
  • the ICMP timeout packets are first encapsulated in double-layer IP packets by the P node and sent to the local PE node, and then decapsulated by the local PE node as ICMP timeout packets.
  • the message is then sent to the local CE node; if it is not 1, the TTL of the IP or UDP path tracking message in the outer IPv6 header is decremented by 1, and then the second Locator of the P1 node is used as the longest matching key.
  • the forwarding table of the value forwards the double-layer IP packet to the intermediate P1 node.
  • Step 45 After receiving the double-layer IP packet forwarded by the P node, the P1 node performs the operation of replacing the outer layer IPv6 destination address on the double-layer IP packet according to the outer layer IPv6 segment routing header, and changes the outer layer IPv6 destination address from the P1 layer.
  • the second Locator information and the second Function information of the node are replaced with the first Locator information and the first Function information of the remote PE node.
  • the local processing function table with the first Locator information and the first Function information of the remote PE node as matching key values, and execute the local processing function indicated by the first Function information, that is, check the outer layer Whether the TTL of the IP or UDP path trace packet in the IPv6 header is 1, if it is 1, the forwarding of the double-layer IP packet is terminated, and an ICMP timeout packet is sent to the local CE node.
  • the P1 node encapsulates a double-layer IP packet and sends it to the local PE node, and then the local PE node decapsulates it into an ICMP timeout packet and sends it to the local CE node;
  • the TTL of the UDP path tracking packet is decremented by 1, and then the double-layer IP packet is forwarded to the remote PE node according to the forwarding table with the Locator of the remote PE node as the longest matching key value.
  • Step 46 After the P node between the P1 node and the remote PE node receives the double-layer IP packet forwarded by the P1 node, it uses the first Locator information and the first Function information of the remote PE node as the matching key value.
  • the local processing function table intercepts double-layer IP packets and executes the local processing function indicated by the first Function information, that is, to check whether the TTL of the IP or UDP path trace packets in the outer IPv6 header is 1. If it is 1, then Terminate the forwarding of the double-layer IP packet, and send an ICMP timeout packet to the local CE node.
  • the ICMP timeout packet is first encapsulated in a double-layer IP packet by the P node and sent to the local PE node, and then decoded by the local PE node. It is encapsulated as an ICMP timeout packet and then sent to the local CE node; if it is not 1, the TTL of the IP/UDP path tracing packet in the outer IPv6 header is decremented by 1, and then the TTL of the IP/UDP path tracing packet in the outer IPv6 header is decremented by 1.
  • the Locator information is the forwarding table with the longest matching key value, and forwards the double-layer IP packet to the remote PE node.
  • 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, strips the outer IPv6 header and parses the inner IP or UDP path tracking packet , check whether the TTL of the IP or UDP path tracking packet is 1. If it is 1, the forwarding of the packet is terminated, and an ICMP timeout packet is sent to the local CE node.
  • the ICMP timeout packet is first encapsulated by the remote PE node in the
  • the double-layer IP packet is sent to the local PE node, and then the local PE node decapsulates it into an ICMP timeout packet and sends it to the local CE node; if it is not 1, the TTL of the IP or UDP path tracking packet is decremented. 1 operation, and then forward it to the remote CE node.
  • FIG. 7 is a structural block diagram of a path tracking apparatus provided by an embodiment of the present application. This embodiment is applied to the first type of network node.
  • the first type of network node may be a public network node in the SRv6 network.
  • the first type of network node may be an intermediate P node.
  • this embodiment includes: a first receiver 310 , a first builder 320 and a first executor 330 .
  • the first receiver 310 is configured to receive the first IPv6 segment routing SRv6 function information sent by the second type network node, and the first SRv6 function information is used to indicate that the first type network node is used for the received double-layer IP packet.
  • the corresponding inner IP path tracking packet is parsed;
  • a first builder 320 configured to build a local processing function table according to the first SRv6 function information
  • the first executor 330 is configured to, in response to receiving the double-layer IP packet forwarded by the 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,
  • the local processing function includes: parsing the inner IP path trace packet corresponding to the double-layer IP packet, and checking the IPv4 lifetime or IPv6 hop limit field of the IP path trace packet.
  • the path tracing apparatus applied to the first type of network node further includes:
  • a second receiver configured to receive the first routing prefix information sent by the second type of network node
  • the second builder is configured to build a forwarding table with the first routing prefix information as a matching key value.
  • the path tracing device applied to the first-type network node in response to receiving the double-layer IP packet forwarded by the third-type network node, the path tracing device applied to the first-type network node further includes:
  • the forwarder is configured to forward the double-layer IP packet to the second-type network node according to the forwarding table.
  • the first builder is configured to:
  • the local processing function further includes:
  • the forwarding of the double-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 trace packet;
  • the IPv4 lifetime 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.
  • the IP path tracking message includes one of the following: the Internet Control Message Protocol ICMP echo request message of IPv4; the ICMP echo request message of IPv6; the IPv4 message using the User Datagram Protocol UDP as the transport layer protocol. message; IPv6 message using UDP as the transport layer protocol.
  • the IPv6 segment routing header when the double-layer IP packet carries an 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.
  • the tracking device applied to the first type of network node further includes:
  • the advertising module is configured to advertise the second routing prefix information and the second SRv6 function information of the first type of network node in the currently located network.
  • the path tracing device applied to the first type of network node further includes:
  • the third receiver is configured to receive the double-layer IP packet including the outer layer IPv6 segment routing header and forwarded by the fifth type network node; wherein, the outer layer IPv6 segment routing header includes: the second routing prefix information of the first type network node and second SRv6 function information, as well as first routing prefix information and first SRv6 function information of the second type of network node; the fifth type of network node and the first type of network node have the same node type.
  • the path tracing apparatus applied to the first type of network node further includes:
  • the second executor is configured to perform the replacement operation of the outer layer IPv6 destination address on the double-layer IP packet according to the outer layer IPv6 segment routing header.
  • the path tracking apparatus provided in this embodiment is configured to implement the path tracking method of the embodiment shown in FIG. 5 .
  • the implementation principle and technical effect of the path tracking apparatus provided in this embodiment are similar, and details are not described herein again.
  • FIG. 8 is a schematic structural diagram of a path tracking device provided by an embodiment of the present application.
  • the device provided by this application includes: a processor 410 , a memory 420 and a communication module 430 .
  • the number of processors 410 in the device may be one or more, and one processor 410 is taken as an example in FIG. 8 .
  • the number of memories 420 in the device may be one or more, and one memory 420 is taken as an example in FIG. 8 .
  • the processor 410, the memory 420, and the communication module 430 of the device may be connected by a bus or in other ways, and the connection by a bus is taken as an example in FIG. 8 .
  • the device may be a network node of the first type.
  • the first type of network node may be a P node in the SRv6 public network.
  • the memory 420 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 the present application (for example, the first receiving builder 310, first builder 320 and first executor 330).
  • the memory 420 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the device, and the like.
  • memory 420 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device.
  • memory 420 may further include memory located remotely from processor 410, which may be connected to the device through a network.
  • networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
  • the communication module 430 is configured to perform communication interaction among multiple synchronization nodes.
  • the above-mentioned device may be configured to execute the communication method provided by any of the above-mentioned embodiments and applied to the first type of network node, and has corresponding functions and effects.
  • Embodiments of the present application also provide a storage medium containing computer-executable instructions, where the computer-executable instructions are used to execute a path tracing method applied to a first-type network node when executed by a computer processor, the method comprising: receiving SRv6 function information of the first IPv6 segment route sent by the second type network node, where the first SRv6 function information is used to instruct the first type network node to parse the inner IP path tracking packet corresponding to the received double-layer IP packet Build a local processing function table according to the first SRv6 function information; In response to receiving the double-layer IP message forwarded by the third type network node, intercept the double-layer IP message according to the local processing function table, and execute the first SRv6 function information instruction
  • the local processing function includes: parsing the inner IP path trace packet corresponding to the double-layer IP packet, and checking the IPv4 time-to-live or IPv6 hop limit field of the IP path trace packet.
  • user equipment encompasses any suitable type of wireless user equipment such as a mobile telephone, portable data processing device, portable web browser or vehicle mounted mobile station.
  • the various embodiments of the present application may be implemented in hardware or special purpose circuits, software, logic, or any combination thereof.
  • some aspects may be implemented in hardware, while other aspects may be implemented in firmware or software that may be executed by a controller, microprocessor or other computing device, although the application is not limited thereto.
  • Embodiments of the present application may be implemented by the execution of computer program instructions by a data processor of a mobile device, eg in a processor entity, or by hardware, or by a combination of software and hardware.
  • Computer program instructions may be assembly instructions, Instruction Set Architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or written in any combination of one or more programming languages source or object code.
  • ISA Instruction Set Architecture
  • the block diagrams of any logic flow in the figures of the present 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.
  • Computer programs can be stored on memory.
  • the memory may be of any type suitable for 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 Memory 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 for the local technical environment, such as, but not limited to, a general purpose computer, a special purpose computer, a microprocessor, a Digital Signal Processing (DSP), an Application Specific Integrated Circuit (ASIC) ), programmable logic devices (Field-Programmable Gate Array, FGPA) and processors based on multi-core processor architecture.
  • DSP Digital Signal Processing
  • ASIC Application Specific Integrated Circuit
  • FGPA programmable logic devices
  • processors based on multi-core processor architecture.

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

本申请提出一种路径跟踪方法、设备和存储介质。该方法包括:接收第二类型网络节点发送的第一IPv6段路由SRv6功能信息,所述第一SRv6功能信息用于指示所述第一类型网络节点对接收到的双层IP报文所对应的内层IP路径跟踪报文进行解析;根据所述第一SRv6功能信息构建本地处理功能表;响应于接收到第三类型网络节点转发的双层IP报文,根据所述本地处理功能表拦截所述双层IP报文,并执行所述第一SRv6功能信息指示的本地处理功能,所述本地处理功能包括:对所述双层IP报文所对应的内层IP路径跟踪报文进行解析,并查看所述IP路径跟踪报文的IPv4生存时间或IPv6跳数限制字段。

Description

路径跟踪方法、设备和存储介质
本申请要求在2021年03月25日提交中国专利局、申请号为202110322171.6的中国专利申请的优先权,以上申请的全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信领域,例如涉及一种路径跟踪方法、设备和存储介质。
背景技术
基于IPv6(Internet Protocol Version 6)段路由(Segment Routing with IPv6,SRv6)技术的IP(Internet Protocol,互联网协议)虚拟专用网络(Virtual Private Network,VPN)使用IP-in-IPv6的报文封装方式。其中,内层IP(比如,IPv4(Internet Protocol Version 4)或IPv6)地址使用的是通过SRv6公网互联在一起的IP私网中的地址,外层IPv6地址使用的是SRv6公网中的地址。目前,从本地私网中的客户边缘设备(Customer Edge device,CE,比如主机、路由器或交换机)发起针对远端私网中设备的路径跟踪(Traceroute)的情况下,SRv6公网中的公网节点无法对本地CE发出的IP Traceroute报文进行拦截和解析,使得本地CE无法获取SRv6公网中Traceroute报文所经过的公网节点信息。
发明内容
有鉴于此,本申请实施例提供一种路径跟踪方法、设备和存储介质,实现了获取SRv6公网中路径跟踪报文所经过的公网节点信息。
本申请实施例提供一种路径跟踪方法,应用于第一类型网络节点,包括:
接收第二类型网络节点发送的第一IPv6段路由SRv6功能信息,所述第一SRv6功能信息用于指示所述第一类型网络节点对接收到的双层IP报文所对应的内层IP路径跟踪报文进行解析;
根据所述第一SRv6功能信息构建本地处理功能表;
响应于接收到第三类型网络节点转发的双层IP报文,根据所述本地处理功能表拦截所述双层IP报文,并执行所述第一SRv6功能信息指示的本地处理功能,所述本地处理功能包括:对所述双层IP报文所对应的内层IP路径跟踪报文进行解析,并查看所述IP路径跟踪报文的IPv4生存时间或IPv6跳数限制字段。
本申请实施例提供一种路径跟踪装置,应用于第一类型网络节点,包括:
第一接收器,配置为接收第二类型网络节点发送的第一IPv6段路由SRv6 功能信息,所述第一SRv6功能信息用于指示所述第一类型网络节点对接收到的双层IP报文所对应的内层IP路径跟踪报文进行解析;
第一构建器,配置为根据所述第一SRv6功能信息构建本地处理功能表;
第一执行器,配置为响应于接收到第三类型网络节点转发的双层IP报文,根据所述本地处理功能表拦截所述双层IP报文,并执行所述第一SRv6功能信息指示的本地处理功能,所述本地处理功能包括:对所述双层IP报文所对应的内层IP路径跟踪报文进行解析,并查看所述IP路径跟踪报文的IPv4生存时间或IPv6跳数限制字段。
本申请实施例提供一种路径跟踪设备,包括:通信模块,存储器,以及一个或多个处理器;
所述通信模块,配置为在多个网络节点之间进行通信交互;
所述存储器,配置为存储一个或多个程序;
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现上述任一实施例所述的方法。
本申请实施例提供一种存储介质,所述存储介质存储有计算机程序,所述计算机程序被处理器执行时实现上述任一实施例所述的方法。
附图说明
图1是现有技术中提供的一种基于SRv6技术的IP VPN网络结构示意图;
图2是现有技术中提供的一种基于MPLS技术的IP VPN网络结构示意图;
图3是现有技术中提供的一种基于MPLS技术的IP VPN网络中路径跟踪过程示意图;
图4是现有技术中提供的一种基于SRv6技术的IP VPN网络中路径跟踪过程示意图;
图5是本申请实施例提供的一种路径跟踪方法的流程图;
图6是本申请实施例提供的另一种路径跟踪方法的流程图;
图7是本申请实施例提供的一种路径跟踪装置的结构框图;
图8是本申请实施例提供的一种路径跟踪设备的结构示意图。
具体实施方式
下文中将结合附图对本申请的实施例进行说明。以下结合实施例附图对本申请进行描述,所举实例仅用于解释本申请,并非用于限定本申请的范围。
IP虚拟专用网络(Virtual Private Network,VPN)是一种应用十分广泛的网络类型,通过电信运营商所管理的公网把电信客户的多个IP私网连接起来,使得电信客户位于本地的IP私网和位于远端的IP私网能够相互通信,共同组成了一个大的IP私网。
IP VPN的公网转发面技术有两种,分别是多协议标签交换(MultiProtocol Label Switching,MPLS)技术和IPv6段路由(Segment Routing with IPv6,SRv6)技术。相比来说,MPLS技术作为IP VPN的公网转发技术较为成熟,SRv6技术作为IP VPN的新兴公网转发技术则不够成熟,仍处于快速发展阶段。图1是现有技术中提供的一种基于SRv6技术的IP VPN网络结构示意图,如图1所示,基于SRv6技术的IP VPN网络中包含三种不同类型的网络设备,分别是CE设备(Customer Edge device)、PE设备(Provider Edge device)和P设备(Provider device),其中,CE设备是私网中的客户设备,比如主机、路由器或交换机,PE设备是公网中的边缘设备,P设备是公网中的中间设备,PE设备和P设备都是路由器。在基于SRv6技术的IP VPN网络中,本地PE设备把本地CE设备发过来的单层IP(IPv4或IPv6)报文封装为携带VPN标识的双层IP(IP-in-IPv6)报文,其中,内层IP(IPv4或IPv6)地址使用的是通过SRv6公网互联在一起的IP私网中的地址,外层IPv6地址使用的是SRv6公网中的地址。然后本地PE设备和P设备通过SRv6转发方式把双层IP报文转发到远端PE设备,最后远端PE设备把接收到的双层IP报文解封装为单层IP报文,并基于双层IP报文中的VPN标识把单层IP报文发往正确的远端CE。
图2是现有技术中提供的一种基于MPLS技术的IP VPN网络结构示意图。如图2所示,与基于SRv6技术的IP VPN网络一样,基于MPLS技术的IP VPN网络中也包含CE设备、PE设备和P设备三种不同类型的网络设备,区别之处在于,基于MPLS技术的IP VPN网络中,本地PE设备把本地CE设备发过来的单层IP(IPv4或IPv6)报文封装为携带VPN标识的MPLS(IP-in-MPLS)报文,其中,内层IP(IPv4或IPv6)地址使用的是通过MPLS公网互联在一起的IP私网中的地址,外层MPLS标签使用的是MPLS公网中分配的标签。然后本地PE设备和P设备通过MPLS转发方式把MPLS报文转发到远端PE设备,最后远端PE设备把接收到的MPLS报文解封装为单层IP报文,并基于MPLS报文中的VPN标识把单层IP报文发往正确的远端CE。
基于MPLS技术的IP VPN网络中,从本地CE发起针对远端CE的IP路径跟踪(Traceroute)时,MPLS公网中的节点能够对本地CE发出的IP Traceroute 报文进行拦截和解析,使得本地CE能够获取MPLS公网中Traceroute报文所经过的每一跳P节点的信息。图3是现有技术中提供的一种基于MPLS技术的IP VPN网络中路径跟踪过程示意图,如图3所示,CE1发出的IP Traceroute报文到达PE1后,被PE1在外层增加MPLS标签而封装为MPLS报文,封装过程中,PE1把IP Traceroute报文中的跳数限制字段(IPv4报文中的TTL(Time to Live)或IPv6报文中的Hop Limit(跳数限制))复制到外层MPLS标签的TTL字段,于是,MPLS网络中的P1和P2节点能够基于外层MPLS标签的TTL来拦截CE1发出的IP Traceroute报文。根据MPLS技术所规定的转发平面解析规则,P1和P2节点在接收到TTL等于1的MPLS报文后,剥去MPLS标签,对位于MPLS标签内部的IP Traceroute报文进行解析,这样P1和P2能够根据解析的结果作出正确的响应,使得CE1能够获取MPLS公网中Traceroute报文所经过的P1和P2节点的信息。
基于SRv6技术的IP VPN网络中,从本地CE发起针对远端CE的路径跟踪(Traceroute)时,无法采用类似MPLS公网中的方法,达到SRv6公网中的节点对本地CE发出的IP Traceroute报文进行拦截和解析的目的。图4是现有技术中提供的一种基于SRv6技术的IP VPN网络中路径跟踪过程示意图,如图4所示,CE1发出的IP Traceroute报文到达PE1后,被PE1在外层增加IPv6报头而封装为双层IP报文,封装过程中,如果采用类似MPLS公网中的方法,由PE1把IP Traceroute报文中的跳数限制字段(IPv4报文中的TTL或IPv6报文中的Hop Limit)复制到外层IPv6报头的Hop Limit字段,则SRv6网络中的P1和P2节点虽然也能够基于外层IPv6报头的Hop Limit来拦截CE1发出的IP Traceroute报文,但是,根据IPv6技术所规定的转发平面解析规则,P1和P2节点在接收到外层IPv6报头的Hop Limit等于1的双层IP报文后,直接向外层IPv6报头中IPv6源地址所指向的PE1发送ICMPv6报文,而不会对位于外层IPv6报头内部的IP Traceroute报文进行解析,这样P1和P2也就无法根据解析的结果作出正确的响应,导致CE1无法获取SRv6公网中Traceroute报文所经过的P1和P2节点的信息。
有鉴于此,本申请实施例提供一种基于SRv6的IP VPN的路径跟踪方法,用于基于SRv6技术的IP VPN网络中,使得从本地CE发起针对远端CE的路径跟踪时,SRv6公网中的节点能够对本地CE发出的IP Traceroute报文进行拦截和解析,达成本地CE能够获取SRv6公网中Traceroute报文所经过的每一跳P节点的信息的目的。
在一实施例中,图5是本申请实施例提供的一种路径跟踪方法的流程图。本实施例可以由第一类型网络节点执行。其中,第一类型网络节点指的是SRv6网络中的公网节点。示例性地,第一类型网络节点可以为SRv6网络中的P节点。如图5所示,本实施例包括S110-S130。
S110、接收第二类型网络节点发送的第一IPv6段路由SRv6功能信息。
其中,第一SRv6功能信息用于指示第一类型网络节点对接收到的双层IP报文所对应的内层IP路径跟踪报文进行解析。其中,第二类型网络节点指的是远端PE,即图4中所示的PE2节点。在实施例中,第二类型网络节点通过域内路由协议在网络中通告自身节点的SRv6功能信息。其中,将第二类型网络节点的SRv6功能信息作为第一SRv6功能信息。在实施例中,第一SRv6功能信息用于指示第一类型网络节点对双层IP报文的内层IP路径跟踪报文进行解析。例如,第一SRv6功能信息用于指示第一类型网络节点查看外层IPv6报头内部的IP路径跟踪报文的IPv4生存时间或IPv6跳数限制字段。
S120、根据第一SRv6功能信息构建本地处理功能表。
在实施例中,在第一类型网络节点接收到第二类型网络节点通告的第一SRv6功能信息之后,根据第一SRv6功能信息构建本地处理功能表。
S130、响应于接收到第三类型网络节点转发的双层IP报文,根据本地处理功能表拦截双层IP报文,并执行第一SRv6功能信息指示的本地处理功能。
其中,本地处理功能包括:对双层IP报文所对应的内层IP路径跟踪报文进行解析,并查看IP路径跟踪报文的IPv4生存时间或IPv6跳数限制字段。其中,第三类型网络节点指的是本地PE节点,即图4所示的PE1节点。在实施例中,在第一类型网络节点接收到第三类型网络节点转发的双层IP报文之后,根据本地处理功能表将双层IP报文拦截下来,并执行第一SRv6功能信息所指示的本地处理功能,即查看外层IPv6报头内部的IP路径跟踪报文的IPv4生存时间或IPv6跳数限制字段是否为1,如果为1,则终止该双层IP报文的转发,并对内层IP路径跟踪报文中IP源地址指向的本地CE节点发送响应报文;如果不为1,则对IPv4生存时间或IPv6跳数限制字段执行减一操作,并根据预先创建的转发表将双层IP报文向远端PE节点转发。本实施例中,通过对第一SRv6功能信息的配置,使得SRv6公网中的节点能够对本地CE发出的IP路径跟踪报文进行拦截和解析,达成本地CE能够获取SRv6公网中路径跟踪报文所经过的每一跳公网节点信息的目的。
在一实施例中,应用于第一类型网络节点的路径跟踪方法,还包括:接收 第二类型网络节点发送的第一路由前缀信息;构建以第一路由前缀信息为匹配键值的转发表。在实施例中,第一路由前缀信息指的是第二类型网络节点的路由前缀信息。在实施例中,第一类型网络节点接收到第二类型网络节点通告的第一路由前缀信息之后,构建以第一路由前缀信息为匹配键值的转发表。在实施例中,第一类型网络节点接收到第二类型网络节点通告的第一SRv6功能信息和第一路由前缀信息之后,构建以第一路由前缀信息加上第一SRv6功能信息为外层IPv6目的地址的封装表。表1是本申请实施例提供的一种构建的封装表的格式示意图。如表1所示,封装表的匹配字段(即上述实施例中的匹配键值)为IP路径跟踪报文的特征字段,封装操作包括:执行IP-in-IPv6封装,把IP路径跟踪报文封装为内层IP报文,以及外层添加IPv6包头,并把外层IPv6目的地址设置为第一路由前缀信息加上第一SRv6功能信息。
表1 一种构建的封装表的格式示意图
Figure PCTCN2022081704-appb-000001
在一实施例中,响应于接收到第三类型网络节点转发的双层IP报文,应用于第一类型网络节点的路径跟踪方法,还包括:根据转发表将双层IP报文转发至第二类型网络节点。
在一实施例中,根据第一SRv6功能信息构建本地处理功能表,包括:构建以第一路由前缀信息和第一SRv6功能信息为匹配键值的本地处理功能表。在实施例中,第一类型网络节点接收到第二类型网络节点通告的第一路由前缀信息和第一SRv6功能信息之后,构建以第一路由前缀信息和第一SRv6功能信息为匹配键值的本地处理功能表。表2是本申请实施例提供的一种第一类型网络节点构建的本地处理功能表的格式示意图。如表2所示,本地处理功能表的匹配字段为外层IPv6目的地址,其中,外层IPv6目的地址为第一路由前缀信息和第一SRv6功能信息。在一实施例中,本地处理功能,包括:响应于IPv4生存时间或IPv6跳数限制字段为第一数值,终止双层IP报文的转发,并对内层IP路径跟踪报文中IP源地址指向的第四类型网络节点发送响应报文;响应于IPv4生存时间或IPv6跳数限制字段不为第一数值,对IPv4生存时间或IPv6跳数限制 字段执行减一操作,并根据转发表将双层IP报文转发至第二类型网络节点。在实施例中,表2中的本地处理功能包括:执行第一SRv6功能信息对应的本地处理功能,对双层IP报文的内层IP路径跟踪报文进行解析,查看IP路径跟踪报文的IPv4生存时间或IPv6跳数限制字段;响应于IPv4生存时间或IPv6跳数限制字段为1,终结该双层IP报文的转发,并对内层IP路径跟踪报文中IP源地址指向的本地CE节点发送响应报文;响应于IPv4生存时间或IPv6跳数限制字段不为1,对该IPv4生存时间或IPv6跳数限制字段执行减一操作,并继续转发该双层IP报文。
表2 一种第一类型网络节点构建的本地处理功能表的格式示意图
Figure PCTCN2022081704-appb-000002
在一实施例中,IP路径跟踪报文包括下述之一:IPv4的互联网控制消息协议(Internet Control Message Protocol,ICMP)回声请求报文;IPv6的ICMP回声请求报文;采用用户数据报协议(User Datagram Protocol,UDP)作为传输层协议的IPv4报文;采用UDP作为传输层协议的IPv6报文。
在一实施例中,当双层IP报文携带IPv6段路由头时,IPV6段路由头至少包括:第一类型网络节点的IPv6地址;第二类型网络节点的IPv6地址。在实施例中,当第三类型网络节点封装的双层IP报文携带IPv6段路由头时,IPv6段路由头中至少包含两个条目,分别为第一类型网络节点的IPv6地址以及第二类型 网络节点的IPv6地址。在第三类型网络节点与第一类型网络节点之间可以有第五类型网络节点,第一类型网络节点与第二类型网络节点之间也可以存在第五类型网络节点。其中,第五类型网络节点与第一类型网络节点的节点类型相同,均为SRv6网络中的公网节点。
在一实施例中,应用于第一类型网络节点的跟踪方法,还包括:响应于双层IP报文携带IPv6段路由头,在当前所在网络中通告第一类型网络节点的第二路由前缀信息和第二SRv6功能信息。在实施例中,第二路由前缀信息指的是第一类型网络节点的路由前缀信息;第二SRv6功能信息指的是第一类型网络节点的SRv6功能信息。在实施例中,根据SRv6技术的规定,包含第一类型网络节点的IPv6地址和第二类型网络节点的IPv6地址这两个条目的IPv6段路由头指示报文需先到达第一类型网络节点;然后再由第一类型网络节点根据段路由头将IPv6目的地址从第一类型网络节点的IPv6地址修改为第二类型网络节点的IPv6地址;然后再把报文转发至第二类型网络节点。可以理解为,为了能够通过第一类型网络节点将报文转发至第二类型网络节点,在第二类型网络节点通过域内路由协议在网络中通告自身的路由前缀信息和SRv6功能信息的同时,第一类型网络节点也通过域内路由协议在网络中通告自身的路由前缀信息和SRv6功能信息。
在一实施例中,应用于第一类型网络节点的路径跟踪方法,还包括:响应于双层IP报文携带IPv6段路由头,接收第五类型网络节点转发的包含外层IPv6段路由头的双层IP报文;其中,外层IPv6段路由头包括:第一类型网络节点的第二路由前缀信息和第二SRv6功能信息,以及第二类型网络节点的第一路由前缀信息和第一SRv6功能信息;第五类型网络节点与第一类型网络节点的节点类型相同。在实施例中,第五类型网络节点和第一类型网络节点可以为SRv6网络中的公网节点,比如,P节点。在实施例中,在第五类型网络节点接收到第二类型网络节点和第一类型网络节点通告的路由前缀信息和SRv6功能信息之后,分别构建以第一类型网络节点的第二路由前缀信息和第二SRv6功能信息,以及第二类型网络节点的第一路由前缀信息和第一SRv6功能信息为匹配键值的本地处理功能表,并分别构建以第一类型网络节点的第二路由前缀信息和第二SRv6功能信息,以及第二类型网络节点的第一路由前缀信息和第一SRv6功能信息为匹配键值的转发表。在第三类型网络节点接收到本地CE节点发送的IP源地址指向本地CE节点、IP目的地址指向第二类型网络节点的IP或UDP路径跟踪报文之后,判断IP或UDP路径跟踪报文中的IPv4生存时间或IPv6跳数限制字段 是否为1,在不为1的情况下,以第一类型网络节点的第二路由前缀信息和第二SRv6功能信息为外层IPv6目的地址,以第一类型网络节点的第二路由前缀信息和第二SRv6功能信息,以及第二类型网络节点的第一路由前缀信息加上第一SRv6功能信息为外层IPv6段路由头的封装表,将IP或UDP路径跟踪报文封装为外层IPv6目的地址设置为第一路由前缀信息和第一SRv6功能信息,外层IPv6段路由头包含第一类型网络节点的第二路由前缀信息和第二SRv6功能信息,以及第二类型网络节点的第一路由前缀信息和第一SRv6功能信息这两个条目的双层IP报文,并根据以第一类型网络节点的第一路由前缀信息为匹配健值的转发表,将双层IP报文转发至第一类型网络节点。
在一实施例中,应用于第一类型网络节点的路径跟踪方法,还包括:根据外层IPv6段路由头对双层IP报文执行外层IPv6目的地址的替换操作。在实施例中,根据SRv6技术的规定,包含第一类型网络节点的IPv6地址和第二类型网络节点的IPv6地址这两个条目的IPv6段路由头指示报文需先到达第一类型网络节点;然后再由第一类型网络节点根据段路由头将IPv6目的地址从第一类型网络节点的IPv6地址修改为第二类型网络节点的IPv6地址;然后再把报文转发至第二类型网络节点。
在一实施例中,图6是本申请实施例提供的另一种路径跟踪方法的流程图。本实施例中,以第一类型网络节点为P节点,第二类型网络节点为远端PE节点,第三类型网络节点为本地PE节点为例,对路径跟踪过程进行说明。本实施例中,将第一路由前缀信息记为第一Locator信息,第一SRv6功能信息记为第一Function信息。如图6所示,本实施例实施例中的路径跟踪方法包括S210-S250。
S210、通过IGP通告第一Locator和第一Function。
在实施例中,网络节点通过域内路由协议(IGP,Interior Gateway Protocol)在网络中通告该节点的第一路由前缀(Locator)信息和第一SRv6功能(Function)信息。其中,第一Function信息用于指示节点对双层IP报文的内层IP Traceroute(路径跟踪)报文进行解析,具体来说,第一Function信息用于指示节点查看外层IPv6报头内部的IP Traceroute报文的跳数限制字段(比如,IPv4报文中的TTL或IPv6报文中的Hop Limit)是否为1,如果为1,则终结此双层IP报文的转发,并对内层IP Traceroute报头中IP源地址指向的本地CE节点发送响应报文;如果不为1,则对该跳数限制字段执行减1操作,并继续转发此双层IP报文。
S220、本地PE节点根据通告的第一Locator和第一Function构建封装表和 转发表,以及P节点根据通告的第一Locator和第一Function构建本地处理功能表和转发表。
在实施例中,本地PE节点接收到网络节点通告的第一Locator信息和第一Function信息后,构建以IP Traceroute报文的特征字段为匹配键值、以第一Locator信息加上第一Function信息为外层IPv6目的地址的封装表,并构建以第一Locator信息为匹配键值的转发表。其中,本地PE构建的封装表的格式示意表如上述实施例中的表1所示。P节点接收到网络节点通告的第一Locator信息和第一Function信息后,构建以第一Locator信息和第一Function信息为匹配键值的本地处理功能表,并构建以第一Locator信息为匹配键值的转发表。其中,P节点构建的本地处理功能表的格式示意表如上述实施例中的表2所示。
S230、本地PE节点接收到本地CE节点发送的IP Traceroute报文后,如果跳数限制字段不为1,则对该跳数限制字段执行减1操作,根据封装表把IP Traceroute报文封装为双层IP报文,然后根据转发表对双层IP报文进行转发。
在实施例中,本地PE节点接收到本地CE节点发送的IP源地址指向本地CE节点、IP目的地址指向远端CE节点的IP Traceroute报文后,先判断IP Traceroute报文中的跳数限制字段是否为1,如果为1,则本地PE终结此IP Traceroute报文,并对IP Traceroute报头中IP源地址指向的本地CE节点发送响应报文;如果不为1,则对该跳数限制字段执行减1操作,然后根据以IP Traceroute报文特征为匹配键值、以第一Locator信息加上第一Function信息为外层IPv6目的地址的封装表,把IP Traceroute报文封装为外层IPv6目的地址设置为第一Locator信息加上第一Function信息的双层IP报文,并根据以第一Locator信息为匹配键值的转发表把双层IP报文向远端PE节点转发。表3是本申请实施例提供的一种本地PE节点封装IP Traceroute报文后形成的双层IP报文的格式示意表,如表3所示,双层IP报文的外层IPv6跳数限制设置为255,SRv6段路由头(Segment Routing Header,SRH)是可选携带的。
表3 一种本地PE节点封装IP Traceroute报文后形成的双层IP报文的格式示意表
Figure PCTCN2022081704-appb-000003
Figure PCTCN2022081704-appb-000004
S240、P节点接收到本地PE转发过来的双层IP报文之后,根据本地处理功能表拦截IP Traceroute报文,执行第一Function所指示的查看和处理内层IP Traceroute报文的跳数限制字段。
在实施例中,P节点接收到本地PE转发过来的双层IP报文后,根据以第一Locator信息和第一Function信息为匹配键值的本地处理功能表拦截双层IP报文,执行第一Function信息所指示的本地处理功能,也即查看外层IPv6报头内部的IP Traceroute报文的跳数限制字段是否为1,如果为1,则终结此双层IP报文的转发,并对内层IP Traceroute报头中IP源地址指向的本地CE节点发送响应报文;如果不为1,则对该跳数限制字段执行减1操作,然后根据以Locator信息为最长匹配键值的转发表把双层IP报文向远端PE节点转发。
S250、远端PE节点接收到P节点转发的双层IP报文之后,对双层IP报文执行解封装操作,剥去外层IPv6报头,以查看和处理IP Traceroute报文的跳数限制字段。
在实施例中,远端PE节点接收到P节点转发过来的双层IP报文后,对双层IP报文执行解封装操作,剥去外层IPv6报头并解析内层的IP Traceroute报文,查看IP Traceroute报文的跳数限制字段是否为1,如果为1,则终结双层IP报文的转发,并对IP Traceroute报头中IP源地址指向的本地CE节点发送响应报文;如果不为1,则对该跳数限制字段执行减1操作,然后根据IP Traceroute报头中IP目的地址指向的远端CE节点转发。
在一实施例中,以第一类型网络节点为P节点,第二类型网络节点为远端PE节点,第三类型网络节点为本地PE节点为例,对路径跟踪过程进行说明。本实施例中,将第一路由前缀信息记为第一Locator信息,第一SRv6功能信息记为第一Function信息。在实施例中,本实施例在图6的基础上,以本地PE节点封装的双层IP报文未携带IPv6段路由头,IP Traceroute报文为IPv4的ICMP回声请求(ICMP Echo Request)报文,对路径跟踪过程进行说明。本实施例包括如下步骤:
步骤11、远端PE节点通过域内路由协议(IGP)在网络中通告该节点的第一路由前缀(记为第一Locator)信息和第一SRv6功能(第一Function)信息。
在实施例中,第一Function信息用于指示节点查看外层IPv6报头内部的ICMP回声请求报文的TTL字段是否为1,如果为1,则终结此双层IP报文的转发,并对内层ICMP回声请求报头中IP源地址指向的本地CE节点发送ICMP回声响应(ICMP Echo Reply)报文;如果不为1,则对该TTL字段执行减1操作,并继续转发此双层IP报文。
步骤12、本地PE节点接收到远端PE节点通告的第一Locator信息和第一Function信息后,构建以ICMP回声请求报文特征字段为匹配键值、以第一Locator信息加上第一Function信息为外层IPv6目的地址的封装表,并构建以第一Locator信息为最长匹配键值的转发表。中间P节点在接收到远端PE节点通告的第一Locator信息和第一Function信息后,构建以第一Locator信息和第一Function信息为匹配键值的本地处理功能表,并构建以第一Locator信息为最长匹配键值的转发表。
步骤13、本地PE节点接收到本地CE节点发送的IP源地址指向本地CE节点、IP目的地址指向远端CE节点的ICMP回声请求报文后,先判断ICMP回声请求报文中的TTL是否为1,如果为1,则本地PE终结此ICMP回声请求报文,并向本地CE节点发送ICMP回声响应报文;如果不为1,则对该TTL执行减1操作,然后根据以ICMP回声请求报文特征字段为匹配键值、以第一Locator信息和第一Function信息为外层IPv6目的地址的封装表,把ICMP回声请求报文封装为外层IPv6目的地址设置为第一Locator信息和第一Function信息的双层IP报文,并根据以远端PE节点的第一Locator信息为最长匹配键值的转发表,把双层IP报文向远端PE节点转发。
步骤14、中间P节点接收到本地PE转发过来的双层IP报文后,根据以第一Locator信息和第一Function信息为匹配键值的本地处理功能表拦截双层IP报文,执行第一Function信息所指示的本地处理功能。
在实施例中,执行第一Function信息所指示的本地处理功能,也即查看外层IPv6报头内部的ICMP回声请求报文的TTL是否为1,如果为1,则终结此双层IP报文的转发,并向本地CE节点发送ICMP回声响应报文,该ICMP回声响应报文先被P节点封装在双层IP报文中向本地PE节点发送,然后由本地PE节点解封装为ICMP回声响应报文后再向本地CE节点发送;如果不为1,则对外层IPv6报头内部的ICMP回声请求报文的TTL执行减1操作,然后根据以 远端PE节点的第一Locator信息为最长匹配键值的转发表,把双层IP报文向远端PE节点转发。
步骤15、远端PE节点接收到P节点转发过来的双层IP报文后,对双层IP报文执行解封装操作,剥去外层IPv6报头并解析内层的ICMP回声请求报文,查看ICMP回声请求报文的TTL是否为1,如果为1,则终结报文的转发,并向本地CE节点发送ICMP回声响应报文,该ICMP回声响应报文先被远端PE节点封装在双层IP报文中向本地PE节点发送,然后由本地PE节点解封装为ICMP回声响应报文后再向本地CE节点发送;如果不为1,则对ICMP回声请求报文的TTL执行减1操作,然后向远端CE节点转发。
在一实施例中,以第一类型网络节点为P节点,第二类型网络节点为远端PE节点,第三类型网络节点为本地PE节点为例,对路径跟踪过程进行说明。本实施例中,将第一路由前缀信息记为第一Locator信息,第一SRv6功能信息记为第一Function信息。在实施例中,本实施例在图6的基础上,以本地PE节点封装的双层IP报文未携带IPv6段路由头,IP Traceroute报文为使用用户数据报协议(User Datagram Protocol,UDP)作为传输层协议的IPv4报文,且该报文使用的是特殊的UDP目的端口号,对路径跟踪过程进行说明。本实施例包括如下步骤:
步骤21、远端PE节点通过域内路由协议(IGP)在网络中通告该节点的第一路由前缀(记为第一Locator)信息和第一SRv6功能(记为第一Function)信息。
在实施例中,第一Function信息用于指示节点查看外层IPv6报头内部的IP或UDP路径跟踪报文的TTL字段是否为1,如果为1,则终结此双层IP报文的转发,并对内层IP/UDP报头中IP源地址指向的本地CE节点发送ICMP超时(ICMP Time Exceeded)报文;如果不为1,则对该TTL字段执行减1操作,并继续转发此双层IP报文。
步骤22、本地PE节点接收到远端PE节点通告的第一Locator信息和第一Function信息后,构建以特殊的UDP目的端口号为匹配键值、以第一Locator信息加上第一Function信息为外层IPv6目的地址的封装表,并构建以第一Locator信息为最长匹配键值的转发表。中间P节点接收到远端PE节点通告的第一Locator信息和第一Function信息后,构建以第一Locator信息和第一Function信息为匹配键值的本地处理功能表,并构建以第一Locator信息为最长 匹配键值的转发表。
步骤23、本地PE节点接收到本地CE节点发送的IP源地址指向本地CE节点、IP目的地址指向远端CE节点的IP或UDP路径跟踪报文后,先判断IP或UDP路径跟踪报文中的TTL是否为1,如果为1,则本地PE终结此IP或UDP路径跟踪报文,并向本地CE节点发送ICMP超时报文;如果不为1,则对该TTL执行减1操作,然后根据以特殊的UDP目的端口号为匹配键值、以第一Locator信息加上第一Function信息为外层IPv6目的地址的封装表,把IP或UDP路径跟踪报文封装为外层IPv6目的地址设置为第一Locator信息加上第一Function信息的双层IP报文,并根据以远端PE节点的第一Locator信息为最长匹配键值的转发表,把双层IP报文向远端PE节点转发。
步骤24、中间P节点接收到本地PE转发过来的双层IP报文后,根据以第一Locator信息和第一Function信息为匹配键值的本地处理功能表拦截双层IP报文,执行第一Function信息所指示的本地处理功能,也即查看外层IPv6报头内部的IP或UDP路径跟踪报文的TTL是否为1,如果为1,则终结此双层IP报文的转发,并向本地CE节点发送ICMP超时报文,该ICMP超时报文先被P节点封装在双层IP报文中向本地PE节点发送,然后由本地PE节点解封装为ICMP超时报文后再向本地CE节点发送;如果不为1,则对外层IPv6报头内部的IP/UDP路径跟踪报文的TTL执行减1操作,然后根据以远端PE节点的第一Locator信息为最长匹配键值的转发表,把双层IP报文向远端PE节点转发。
步骤25、远端PE节点接收到P节点转发过来的双层IP报文后,对双层IP报文执行解封装操作,剥去外层IPv6报头并解析内层的IP或UDP路径跟踪报文,查看IP或UDP路径跟踪报文的TTL是否为1,如果为1,则终结报文的转发,并向本地CE节点发送ICMP超时报文,该ICMP超时报文先被远端PE节点封装在双层IP报文中向本地PE节点发送,然后由本地PE节点解封装为ICMP超时报文后再向本地CE节点发送;如果不为1,则对IP或UDP路径跟踪报文的TTL执行减1操作,然后向远端CE节点转发。
在一实施例中,以第一类型网络节点为中间P1节点,第二类型网络节点为远端PE节点,第三类型网络节点为本地PE节点,第四类型网络节点为本地CE节点,第五类型网络节点为P节点为例,对路径跟踪过程进行说明。本实施例中,将第一路由前缀信息记为第一Locator信息,第一SRv6功能信息记为第一Function信息,第二路由前缀信息记为第二Locator信息,以及第二SRv6功能 信息记为第二Function信息。在实施例中,本实施例在图6的基础上,以本地PE节点封装的双层IP报文携带IPv6段路由头,段路由头中包含两个条目,分别是中间P1节点的IPv6地址和远端PE节点的IPv6地址,本地PE节点与P1节点之间有P节点,P1节点与远端PE节点之间也有P节点,对路径跟踪过程进行说明。根据SRv6技术的规定,包含P1地址和远端PE地址两个条目的IPv6段路由头指示报文必须先到达中间P1节点,然后由P1节点根据段路由头,把IPv6目的地址从P1节点的IPv6地址修改为远端PE节点的IPv6地址,再把报文转发到远端PE节点。IP Traceroute报文为IPv4的ICMP回声请求(ICMP Echo Request)报文。
本实施例包括如下步骤:
步骤31、远端PE节点通过域内路由协议(IGP)在网络中通告该节点的第一路由前缀(第一Locator)信息和第一SRv6功能(第一Function)信息,中间P1节点也通过域内路由协议(IGP)在网络中通告该节点的第二路由前缀(第二Locator)信息和第二SRv6功能(第二Function)信息。
在实施例中,第一Function信息和第二Function信息均用于指示节点查看外层IPv6报头内部的ICMP回声请求报文的TTL字段是否为1,如果为1,则终结此双层IP报文的转发,并对内层ICMP回声请求报头中IP源地址指向的本地CE节点发送ICMP回声响应(ICMP Echo Reply)报文;如果不为1,则对该TTL字段执行减1操作,并继续转发此双层IP报文。
步骤32、本地PE节点接收到远端PE节点通告的第一Locator信息和第一Function信息,以及中间P1节点通告的第二Locator信息和第二Function信息后,构建以ICMP回声请求报文特征字段为匹配键值、以中间P1节点的第二Locator信息和第二Function信息为外层IPv6目的地址、以中间P1节点的第二Locator信息加上第二Function信息,以及远端PE节点的第一Locator信息加上第一Function信息为外层IPv6段路由头两个条目的封装表,并构建以中间P1节点的第一Locator信息为最长匹配键值的转发表。中间P节点接收到远端PE节点通告的第一Locator信息和第一Function信息,以及中间P1节点通告的第二Locator信息和第二Function信息后,分别构建以中间P1节点的第二Locator信息和第二Function信息,以及远端PE节点的第一Locator信息和第一Function信息为匹配键值的本地处理功能表,并分别构建以中间P1节点的第二Locator信息和远端PE节点的第一Locator信息为最长匹配键值的转发表。中间P1节点接收到远端PE节点通告的第一Locator信息和第一Function信息后,构建以远 端PE节点的第一Locator信息和第一Function信息为匹配键值的本地处理功能表,并构建以远端PE节点的第一Locator信息为最长匹配键值的转发表。
步骤33、本地PE节点接收到本地CE节点发送的IP源地址指向本地CE节点、IP目的地址指向远端CE节点的ICMP回声请求报文后,先判断ICMP回声请求报文中的TTL是否为1,如果为1,则本地PE终结此ICMP回声请求报文,并向本地CE节点发送ICMP回声响应报文;如果不为1,则对该TTL执行减1操作,然后根据以ICMP回声请求报文特征为匹配键值、以中间P1节点的第二Locator信息和第二Function信息为外层IPv6目的地址、以中间P1节点的第二Locator信息加上第二Function信息,以及远端PE节点的第一Locator信息加上第一Function信息为外层IPv6段路由头的封装表,把ICMP回声请求报文封装为外层IPv6目的地址设置为Locator信息和Function信息、外层IPv6段路由头包含中间P1节点的第二Locator信息和第二Function信息以及远端PE节点的第一Locator信息和第一Function信息两个条目的双层IP报文,并根据以中间P1节点的第二Locator信息为最长匹配键值的转发表,把双层IP报文向中间P1节点转发。
步骤34、本地PE节点与P1节点之间的P节点接收到本地PE转发过来的双层IP报文后,根据以中间P1节点的第二Locator信息和第二Function信息为匹配键值的本地处理功能表把双层IP报文拦截下来,执行第二Function信息所指示的本地处理功能,也即查看外层IPv6报头内部的ICMP回声请求报文的TTL是否为1,如果为1,则终结此双层IP报文的转发,并向本地CE节点发送ICMP回声响应报文,该ICMP回声响应报文先被P节点封装在双层IP报文中向本地PE节点发送,然后由本地PE节点解封装为ICMP回声响应报文后再向本地CE节点发送;如果不为1,则对外层IPv6报头内部的ICMP回声请求报文的TTL执行减1操作,然后根据以中间P1节点的第二Locator信息为最长匹配键值的转发表,把双层IP报文向中间P1节点转发。
步骤35、P1节点接收到P节点转发过来的双层IP报文后,根据外层IPv6段路由头对双层IP报文执行替换外层IPv6目的地址的操作,把外层IPv6目的地址从中间P1节点的第二Locator信息和第二Function信息替换为远端PE节点的第一Locator信息和第一Function信息。然后,根据以远端PE节点的第一Locator信息和第一Function信息为匹配键值的本地处理功能表拦截双层IP报文,执行第一Function信息所指示的本地处理功能,也即查看外层IPv6报头内部的ICMP回声请求报文的TTL是否为1,如果为1,则终结此双层IP报文的 转发,并向本地CE节点发送ICMP回声响应报文,该ICMP回声响应报文先被P1节点封装在双层IP报文中向本地PE节点发送,然后由本地PE节点解封装为ICMP回声响应报文后再向本地CE节点发送;如果不为1,则对外层IPv6报头内部的ICMP回声请求报文的TTL执行减1操作,然后根据以远端PE节点的第一Locator信息为最长匹配键值的转发表,把双层IP报文向远端PE节点转发。
步骤36、P1节点与远端PE节点之间的P节点接收到P1节点转发过来的双层IP报文后,根据以远端PE节点的第一Locator信息和第一Function信息为匹配键值的本地处理功能表拦截双层IP报文,执行第一Function所指示的本地处理功能,也即查看外层IPv6报头内部的ICMP回声请求报文的TTL是否为1,如果为1,则终结此双层IP报文的转发,并向本地CE节点发送ICMP回声响应报文,该ICMP回声响应报文先被P节点封装在双层IP报文中向本地PE节点发送,然后由本地PE节点解封装为ICMP回声响应报文后再向本地CE节点发送;如果不为1,则对外层IPv6报头内部的ICMP回声请求报文的TTL执行减1操作,然后根据以远端PE节点的第一Locator信息为最长匹配键值的转发表,把双层IP报文向远端PE节点转发。
步骤37、远端PE节点接收到P节点转发过来的双层IP报文后,对双层IP报文执行解封装操作,剥去外层IPv6报头并解析内层的ICMP回声请求报文,查看ICMP回声请求报文的TTL是否为1,如果为1,则终结报文的转发,并向本地CE节点发送ICMP回声响应报文,该ICMP回声响应报文先被远端PE节点封装在双层IP报文中向本地PE节点发送,然后由本地PE节点解封装为ICMP回声响应报文后再向本地CE节点发送;如果不为1,则对ICMP回声请求报文的TTL执行减1操作,然后向远端CE节点转发。
在一实施例中,以第一类型网络节点为中间P1节点,第二类型网络节点为远端PE节点,第三类型网络节点为本地PE节点,第四类型网络节点为本地CE节点,第五类型网络节点为P节点为例,对路径跟踪过程进行说明。本实施例中,将第一路由前缀信息记为第一Locator信息,第一SRv6功能信息记为第一Function信息,第二路由前缀信息记为第二Locator信息,以及第二SRv6功能信息记为第二Function信息。在实施例中,本实施例在图6的基础上,以本地PE节点封装的双层IP报文携带IPv6段路由头,段路由头中包含两个条目,分别是中间P1节点的IPv6地址和远端PE节点的IPv6地址,本地PE节点与P1 节点之间有P节点,P1节点与远端PE节点之间也有P节点,对路径跟踪过程进行说明。根据SRv6技术的规定,包含P1地址和远端PE地址两个条目的IPv6段路由头指示报文必须先到达中间P1节点,然后由P1节点根据段路由头,把IPv6目的地址从P1节点的IPv6地址修改为远端PE节点的IPv6地址,再把报文转发到远端PE节点。IP Traceroute报文为使用用户数据报协议(User Datagram Protocol,UDP)作为传输层协议的IPv4报文,且该报文使用的是特殊的UDP目的端口号。
本实施例包括如下步骤:
步骤41、远端PE节点通过域内路由协议(IGP)在网络中通告该节点的第一路由前缀(第一Locator)信息和第一SRv6功能(第一Function)信息,中间P1节点也通过域内路由协议(IGP)在网络中通告该节点的第二路由前缀(第二Locator)信息和第二SRv6功能(第二Function)信息。
在实施例中,第一Function信息和第二Function信息均用于指示节点查看外层IPv6报头内部的IP或UDP路径跟踪报文的TTL字段是否为1,如果为1,则终结此双层IP报文的转发,并对内层IP/UDP路径跟踪报头中IP源地址指向的本地CE节点发送ICMP超时报文;如果不为1,则对该TTL字段执行减1操作,并继续转发此双层IP报文。
步骤42、本地PE节点接收到远端PE节点通告的第一Locator信息和第一Function信息,以及中间P1节点通告的第二Locator信息和第二Function信息之后,构建以特殊的UDP目的端口号为匹配键值、以中间P1节点的第二Locator信息和第二Function信息为外层IPv6目的地址、以中间P1节点的第二Locator信息加上第二Function信息,以及和远端PE节点的第一Locator信息加上第一Function信息为外层IPv6段路由头两个条目的封装表,并构建以中间P1节点的第二Locator信息为最长匹配键值的转发表。中间P节点接收到远端PE节点通告的第一Locator信息和第一Function信息,以及中间P1节点通告的第二Locator信息和第二Function信息后,分别构建以中间P1节点的第二Locator信息和第二Function信息,以及远端PE节点的第一Locator信息和第一Function信息为匹配键值的本地处理功能表,并分别构建以中间P1节点的第二Locator信息和远端PE节点的第一Locator信息为最长匹配键值的转发表。中间P1节点接收到远端PE节点通告的第一Locator信息和第一Function信息后,构建以远端PE节点的第一Locator信息和第一Function信息为匹配键值的本地处理功能表,并构建以远端PE节点的第一Locator信息为最长匹配键值的转发表。
步骤43、本地PE节点接收到本地CE节点发送的IP源地址指向本地CE节点、IP目的地址指向远端CE节点的IP或UDP路径跟踪报文后,先判断IP或UDP路径跟踪报文中的TTL是否为1,如果为1,则本地PE终结此IP或UDP路径跟踪报文,并向本地CE节点发送ICMP超时报文;如果不为1,则对该TTL执行减1操作,然后根据以特殊的UDP目的端口号为匹配键值、以中间P1节点的第二Locator信息和第二Function信息为外层IPv6目的地址、以中间P1节点的第二Locator信息和第二Function信息,以及远端PE节点的第一Locator信息和第一Function信息为外层IPv6段路由头的封装表,把IP或UDP路径跟踪报文封装为外层IPv6目的地址设置为Locator信息加上Function信息、外层IPv6段路由头包含中间P1节点的第二Locator信息和第二Function信息,以及远端PE节点的第一Locator信息和第一Function信息两个条目的双层IP报文,并根据以中间P1节点的第二Locator信息为最长匹配键值的转发表,把双层IP报文向中间P1节点转发。
步骤44、本地PE节点与P1节点之间的P节点接收到本地PE转发过来的双层IP报文后,根据以P1节点的第二Locator信息和第二Function信息为匹配键值的本地处理功能表把双层IP报文拦截下来,执行Function所指示的本地处理功能,也即查看外层IPv6报头内部的IP/UDP路径跟踪报文的TTL是否为1,如果为1,则终结此双层IP报文的转发,并向本地CE节点发送ICMP超时报文,该ICMP超时报文先被P节点封装在双层IP报文中向本地PE节点发送,然后由本地PE节点解封装为ICMP超时报文后再向本地CE节点发送;如果不为1,则对外层IPv6报头内部的IP或UDP路径跟踪报文的TTL执行减1操作,然后根据以P1节点的第二Locator为最长匹配键值的转发表,把双层IP报文向中间P1节点转发。
步骤45、P1节点接收到P节点转发过来的双层IP报文后,根据外层IPv6段路由头对双层IP报文执行替换外层IPv6目的地址的操作,把外层IPv6目的地址从P1节点的第二Locator信息和第二Function信息替换为远端PE节点的第一Locator信息和第一Function信息。然后,根据以远端PE节点的第一Locator信息和第一Function信息为匹配键值的本地处理功能表拦截双层IP报文,执行第一Function信息指示的本地处理功能,也即查看外层IPv6报头内部的IP或UDP路径跟踪报文的TTL是否为1,如果为1,则终结此双层IP报文的转发,并向本地CE节点发送ICMP超时报文,该ICMP超时报文先被P1节点封装在双层IP报文中向本地PE节点发送,然后由本地PE节点解封装为ICMP超时报 文后再向本地CE节点发送;如果不为1,则对外层IPv6报头内部的IP或UDP路径跟踪报文的TTL执行减1操作,然后根据以远端PE节点的Locator为最长匹配键值的转发表,把双层IP报文向远端PE节点转发。
步骤46、P1节点与远端PE节点之间的P节点接收到P1节点转发过来的双层IP报文后,根据以远端PE节点的第一Locator信息和第一Function信息为匹配键值的本地处理功能表拦截双层IP报文,执行第一Function信息所指示的本地处理功能,也即查看外层IPv6报头内部的IP或UDP路径跟踪报文的TTL是否为1,如果为1,则终结此双层IP报文的转发,并向本地CE节点发送ICMP超时报文,该ICMP超时报文先被P节点封装在双层IP报文中向本地PE节点发送,然后由本地PE节点解封装为ICMP超时报文后再向本地CE节点发送;如果不为1,则对外层IPv6报头内部的IP/UDP路径跟踪报文的TTL执行减1操作,然后根据以远端PE节点的第一Locator信息为最长匹配键值的转发表,把双层IP报文向远端PE节点转发。
步骤47、远端PE节点接收到P节点转发过来的双层IP报文后,对双层IP报文执行解封装操作,剥去外层IPv6报头并解析内层的IP或UDP路径跟踪报文,查看IP或UDP路径跟踪报文的TTL是否为1,如果为1,则终结报文的转发,并向本地CE节点发送ICMP超时报文,该ICMP超时报文先被远端PE节点封装在双层IP报文中向本地PE节点发送,然后由本地PE节点解封装为ICMP超时报文后再向本地CE节点发送;如果不为1,则对IP或UDP路径跟踪报文的TTL执行减1操作,然后向远端CE节点转发。
在一实施例中,图7是本申请实施例提供的一种路径跟踪装置的结构框图。本实施例应用于第一类型网络节点。其中,第一类型网络节点可以为SRv6网络中的公网节点。示例性地,第一类型网络节点可以为中间P节点。如图7所示,本实施例包括:第一接收器310、第一构建器320和第一执行器330。
其中,第一接收器310,配置为接收第二类型网络节点发送的第一IPv6段路由SRv6功能信息,第一SRv6功能信息用于指示第一类型网络节点对接收到的双层IP报文所对应的内层IP路径跟踪报文进行解析;
第一构建器320,配置为根据第一SRv6功能信息构建本地处理功能表;
第一执行器330,配置为响应于接收到第三类型网络节点转发的双层IP报文,根据本地处理功能表拦截双层IP报文,并执行第一SRv6功能信息指示的本地处理功能,本地处理功能包括:对双层IP报文所对应的内层IP路径跟踪报 文进行解析,并查看IP路径跟踪报文的IPv4生存时间或IPv6跳数限制字段。
在一实施例中,应用于第一类型网络节点的路径跟踪装置,还包括:
第二接收器,配置为接收第二类型网络节点发送的第一路由前缀信息;
第二构建器,配置为构建以第一路由前缀信息为匹配键值的转发表。
在一实施例中,响应于接收到第三类型网络节点转发的双层IP报文,应用于第一类型网络节点的路径跟踪装置,还包括:
转发器,配置为根据转发表将双层IP报文转发至第二类型网络节点。
在一实施例中,第一构建器,配置为:
构建以第一路由前缀信息和第一SRv6功能信息为匹配键值的本地处理功能表。
在一实施例中,本地处理功能,还包括:
响应于IPv4生存时间或IPv6跳数限制字段为第一数值,终止双层IP报文的转发,并对内层IP路径跟踪报文中IP源地址指向的第四类型网络节点发送响应报文;
响应于IPv4生存时间或IPv6跳数限制字段不为第一数值,对IPv4生存时间或IPv6跳数限制字段执行减一操作,并根据转发表将双层IP报文转发至第二类型网络节点。
在一实施例中,IP路径跟踪报文包括下述之一:IPv4的互联网控制消息协议ICMP回声请求报文;IPv6的ICMP回声请求报文;采用用户数据报协议UDP作为传输层协议的IPv4报文;采用UDP作为传输层协议的IPv6报文。
在一实施例中,当双层IP报文携带IPv6段路由头时,IPV6段路由头至少包括:第一类型网络节点的IPv6地址;第二类型网络节点的IPv6地址。
在一实施例中,在双层IP报文携带IPv6段路由头的情况下,应用于第一类型网络节点的跟踪装置,还包括:
通告模块,配置为在当前所在网络中通告第一类型网络节点的第二路由前缀信息和第二SRv6功能信息。
在一实施例中,在双层IP报文携带IPv6段路由头的情况下,应用于第一类型网络节点的路径跟踪装置,还包括:
第三接收器,配置为接收第五类型网络节点转发的包含外层IPv6段路由头的双层IP报文;其中,外层IPv6段路由头包括:第一类型网络节点的第二路由前缀信息和第二SRv6功能信息,以及第二类型网络节点的第一路由前缀信息和第一SRv6功能信息;第五类型网络节点与第一类型网络节点的节点类型相同。
在一实施例中,应用于第一类型网络节点的路径跟踪装置,还包括:
第二执行器,配置为根据外层IPv6段路由头对双层IP报文执行外层IPv6目的地址的替换操作。
本实施例提供的路径跟踪装置设置为实现图5所示实施例的路径跟踪方法,本实施例提供的路径跟踪装置实现原理和技术效果类似,此处不再赘述。
图8是本申请实施例提供的一种路径跟踪设备的结构示意图。如图8所示,本申请提供的设备,包括:处理器410、存储器420和通信模块430。该设备中处理器410的数量可以是一个或者多个,图8中以一个处理器410为例。该设备中存储器420的数量可以是一个或者多个,图8中以一个存储器420为例。该设备的处理器410、存储器420和通信模块430可以通过总线或者其他方式连接,图8中以通过总线连接为例。在该实施例中,该设备为可以为第一类型网络节点。示例性地,第一类型网络节点可以为SRv6公网中的P节点。
存储器420作为一种计算机可读存储介质,可设置为存储软件程序、计算机可执行程序以及模块,如本申请任意实施例的设备对应的程序指令/模块(例如,路径跟踪装置中的第一接收器310、第一构建器320和第一执行器330)。存储器420可包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序;存储数据区可存储根据设备的使用所创建的数据等。此外,存储器420可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实例中,存储器420可进一步包括相对于处理器410远程设置的存储器,这些远程存储器可以通过网络连接至设备。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
通信模块430,配置为在多个同步节点进行通信交互。
在通信设备为第一类型网络节点的情况下,上述提供的设备可设置为执行上述任意实施例提供的应用于第一类型网络节点的通信方法,具备相应的功能和效果。
本申请实施例还提供一种包含计算机可执行指令的存储介质,计算机可执行指令在由计算机处理器执行时用于执行一种应用于第一类型网络节点的路径跟踪方法,该方法包括:接收第二类型网络节点发送的第一IPv6段路由SRv6功能信息,第一SRv6功能信息用于指示第一类型网络节点对接收到的双层IP报文所对应的内层IP路径跟踪报文进行解析;根据第一SRv6功能信息构建本地处理功能表;响应于接收到第三类型网络节点转发的双层IP报文,根据本地 处理功能表拦截双层IP报文,并执行第一SRv6功能信息指示的本地处理功能,本地处理功能包括:对双层IP报文所对应的内层IP路径跟踪报文进行解析,并查看IP路径跟踪报文的IPv4生存时间或IPv6跳数限制字段。
本领域内的技术人员应明白,术语用户设备涵盖任何适合类型的无线用户设备,例如移动电话、便携数据处理装置、便携网络浏览器或车载移动台。
一般来说,本申请的多种实施例可以在硬件或专用电路、软件、逻辑或其任何组合中实现。例如,一些方面可以被实现在硬件中,而其它方面可以被实现在可以被控制器、微处理器或其它计算装置执行的固件或软件中,尽管本申请不限于此。
本申请的实施例可以通过移动装置的数据处理器执行计算机程序指令来实现,例如在处理器实体中,或者通过硬件,或者通过软件和硬件的组合。计算机程序指令可以是汇编指令、指令集架构(Instruction Set Architecture,ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码。
本申请附图中的任何逻辑流程的框图可以表示程序步骤,或者可以表示相互连接的逻辑电路、模块和功能,或者可以表示程序步骤与逻辑电路、模块和功能的组合。计算机程序可以存储在存储器上。存储器可以具有任何适合于本地技术环境的类型并且可以使用任何适合的数据存储技术实现,例如但不限于只读存储器(Read-Only Memory,ROM)、随机访问存储器(Random Access Memory,RAM)、光存储器装置和系统(数码多功能光碟(Digital Video Disc,DVD)或光盘(Compact Disk,CD))等。计算机可读介质可以包括非瞬时性存储介质。数据处理器可以是任何适合于本地技术环境的类型,例如但不限于通用计算机、专用计算机、微处理器、数字信号处理器(Digital Signal Processing,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程逻辑器件(Field-Programmable Gate Array,FGPA)以及基于多核处理器架构的处理器。
以上所述仅为本申请的一些实施例而已,并不用于限制本申请,对于本领域的技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (12)

  1. 一种路径跟踪方法,应用于第一类型网络节点,包括:
    接收第二类型网络节点发送的第一IPv6段路由SRv6功能信息,所述第一SRv6功能信息用于指示所述第一类型网络节点对接收到的双层互联网协议IP报文所对应的内层IP路径跟踪报文进行解析;
    根据所述第一SRv6功能信息构建本地处理功能表;
    响应于接收到第三类型网络节点转发的双层IP报文,根据所述本地处理功能表拦截所述双层IP报文,并执行所述第一SRv6功能信息指示的本地处理功能,所述本地处理功能包括:对所述双层IP报文所对应的内层IP路径跟踪报文进行解析,并查看所述IP路径跟踪报文的IPv4生存时间或IPv6跳数限制字段。
  2. 根据权利要求1所述的方法,还包括:
    接收第二类型网络节点发送的第一路由前缀信息;
    构建以所述第一路由前缀信息为匹配键值的转发表。
  3. 根据权利要求2所述的方法,响应于接收到第三类型网络节点转发的双层IP报文,所述方法,还包括:
    根据所述转发表将所述双层IP报文转发至所述第二类型网络节点。
  4. 根据权利要求1或2所述的方法,其中,所述根据所述第一SRv6功能信息构建本地处理功能表,包括:
    构建以第一路由前缀信息和所述第一SRv6功能信息为匹配键值的本地处理功能表。
  5. 根据权利要求1所述的方法,其中,所述本地处理功能,还包括:
    响应于所述IPv4生存时间或IPv6跳数限制字段为第一数值,终止所述双层IP报文的转发,并对所述内层IP路径跟踪报文中IP源地址指向的第四类型网络节点发送响应报文;
    响应于所述IPv4生存时间或IPv6跳数限制字段不为第一数值,对所述IPv4生存时间或IPv6跳数限制字段执行减一操作,并根据转发表将所述双层IP报文转发至所述第二类型网络节点。
  6. 根据权利要求1所述的方法,其中,所述IP路径跟踪报文包括下述之一:IPv4的互联网控制消息协议ICMP回声请求报文;IPv6的ICMP回声请求报文;采用用户数据报协议UDP作为传输层协议的IPv4报文;采用UDP作为传输层协议的IPv6报文。
  7. 根据权利要求1所述的方法,其中,当所述双层IP报文携带IPv6段路由头时,所述IPV6段路由头至少包括:所述第一类型网络节点的IPv6地址;所 述第二类型网络节点的IPv6地址。
  8. 根据权利要求1或2所述的方法,还包括:
    响应于所述双层IP报文携带IPv6段路由头,在当前所在网络中通告所述第一类型网络节点的第二路由前缀信息和第二SRv6功能信息。
  9. 根据权利要求1所述的方法,还包括:
    响应于所述双层IP报文携带IPv6段路由头,接收第五类型网络节点转发的包含外层IPv6段路由头的双层IP报文;其中,所述外层IPv6段路由头包括:所述第一类型网络节点的第二路由前缀信息和第二SRv6功能信息,以及所述第二类型网络节点的第一路由前缀信息和第一SRv6功能信息;所述第五类型网络节点与所述第一类型网络节点的节点类型相同。
  10. 根据权利要求9所述的方法,还包括:
    根据所述外层IPv6段路由头对所述双层IP报文执行外层IPv6目的地址的替换操作。
  11. 一种路径跟踪设备,包括:通信模块,存储器,以及一个或多个处理器;
    所述通信模块,配置为在多个网络节点之间进行通信交互;
    所述存储器,配置为存储一个或多个程序;
    当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如上述权利要求1-10中任一项所述的方法。
  12. 一种存储介质,所述存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如上述权利要求1-10中任一项所述的方法。
PCT/CN2022/081704 2021-03-25 2022-03-18 路径跟踪方法、设备和存储介质 WO2022199486A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110322171.6 2021-03-25
CN202110322171.6A CN115134285A (zh) 2021-03-25 2021-03-25 路径跟踪方法、设备和存储介质

Publications (1)

Publication Number Publication Date
WO2022199486A1 true WO2022199486A1 (zh) 2022-09-29

Family

ID=83374338

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/081704 WO2022199486A1 (zh) 2021-03-25 2022-03-18 路径跟踪方法、设备和存储介质

Country Status (2)

Country Link
CN (1) CN115134285A (zh)
WO (1) WO2022199486A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103139077A (zh) * 2011-11-28 2013-06-05 百度在线网络技术(北京)有限公司 扩展IPv6虚拟路由器的方法、系统及装置
US20180026880A1 (en) * 2016-07-21 2018-01-25 Cisco Technology, Inc. Target fec (forwarding equivalence class) stack based fec query in segment routing environments
US20190280960A1 (en) * 2016-05-20 2019-09-12 Telefonaktiebolaget Lm Ericsson (Publ) Method And Apparatus For Segment Routing And RSVP-TE Routing In Transport SDN Networks
CN110557316A (zh) * 2018-05-30 2019-12-10 中国电信股份有限公司 报文传输方法、系统、装置及计算机可读存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103139077A (zh) * 2011-11-28 2013-06-05 百度在线网络技术(北京)有限公司 扩展IPv6虚拟路由器的方法、系统及装置
US20190280960A1 (en) * 2016-05-20 2019-09-12 Telefonaktiebolaget Lm Ericsson (Publ) Method And Apparatus For Segment Routing And RSVP-TE Routing In Transport SDN Networks
US20180026880A1 (en) * 2016-07-21 2018-01-25 Cisco Technology, Inc. Target fec (forwarding equivalence class) stack based fec query in segment routing environments
CN110557316A (zh) * 2018-05-30 2019-12-10 中国电信股份有限公司 报文传输方法、系统、装置及计算机可读存储介质

Also Published As

Publication number Publication date
CN115134285A (zh) 2022-09-30

Similar Documents

Publication Publication Date Title
US11533249B2 (en) Route processing method and apparatus, and data transmission method and apparatus
WO2021063232A1 (zh) 建立bier转发表项的方法、装置和系统
US11979322B2 (en) Method and apparatus for providing service for traffic flow
US9281955B2 (en) Interoperability of data plane based overlays and control plane based overlays in a network environment
EP3471347B1 (en) Vxlan packet processing method, device and system
US11902049B2 (en) BIER packet sending method and apparatus
EP3863237A1 (en) Packet forwarding method, packet transmission device, and packet reception device
US7953097B2 (en) Neighbour discovery protocol mediation
US9467376B2 (en) Method and device for sending internet protocol packets
WO2020244651A1 (zh) 一种bier报文的发送方法和装置
US20180262458A1 (en) Address resolution suppression in a logical network
US11522792B2 (en) Method for discovering forwarding path and related device thereof
CN111669422B (zh) 报文的传输方法和设备
WO2022117018A1 (zh) 报文传输的方法和装置
US20220247598A1 (en) Packet Detection Method, Connectivity Negotiation Relationship Establishment Method, and Related Device
WO2022199486A1 (zh) 路径跟踪方法、设备和存储介质
JP7322088B2 (ja) パケット検出方法および第1のネットワーク機器
US20240056389A1 (en) Information processing method, and device and storage medium
WO2024011982A1 (zh) 报文转发方法、系统、网络设备、存储介质及程序产品
US20240171510A1 (en) Packet transmission method and related device
US20220345986A1 (en) Selective Importing of UE Addresses to VRF in 5g Networks

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: 22774147

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE