PACKET PROCESSING METHOD, NETWORK DEVICE, AND NETWORK SYSTEM

By updating IP addresses in SR packets and using TVCs with End.X-SD-WAN SIDs, the issue of packet drops in SR due to URPF failures is resolved, enabling flexible traffic planning and route management in SD-WAN networks.

JP2024534590AInactive Publication Date: 2024-09-20HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2024518495
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2021-09-23
Filing Date
2022-09-19
Publication Date
2024-09-20
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Segment Routing (SR) packets are dropped due to unicast reverse path forwarding (URPF) check failures when traversing multiple different routing domains in underlay networks.

Method used

Update the source and destination IP addresses of SR packets based on the endpoint IP addresses of connections, ensuring the source IP address is the headend IP address and avoiding reliance on underlay network routing protocols by using TVCs and End.X-SD-WAN SIDs to maintain route reachability.

Benefits of technology

Prevents packet drops due to URPF failures and allows flexible traffic planning across multiple sites without relying on underlay network routing protocols, enhancing route establishment and management in SD-WAN scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024534590000001
    Figure 2024534590000001
Patent Text Reader

Abstract

The present application provides a packet processing method, a network device, and a network system, and relates to the field of communication technology. In the method provided in the present application, an intermediate node updates a source IP address of a packet based on an IP address belonging to a local end of an endpoint IP address of a connection, and updates a destination IP address of a packet based on an IP address belonging to a remote end of an endpoint IP address of a connection. Thus, in a scenario in which an SR route traverses underlay transport networks in multiple different routing domains, the problem that the source IP address is always the IP address of the head end and the packet is discarded because the URPF check fails is avoided. In addition, the establishment of a forwarding route does not need to depend on the routing protocol of the underlay transport network.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] This application claims priority to Chinese Patent Application No. 202111115406.0, filed on September 23, 2021, entitled “PACKET PROCESSING METHOD, NETWORK DEVICE, AND NETWORK SYSTEM,” which is incorporated herein by reference in its entirety.

[0002] The present application relates to the field of communication technologies, and in particular to a packet processing method, a network device, and a network system. [Background technology]

[0003] Segment routing (SR) is a protocol designed based on the concept of source routing for forwarding packets in a network. SR divides a network path into segments and assigns segment identifiers (segment IDs, SIDs) to those segments and forwarding nodes in the network. The segments and network nodes are arranged to obtain a segment list, so that a forwarding path can be indicated by using the segment list.

[0004] Currently, the basic procedure of forwarding a packet based on SR technology is as follows: after a head-end device in the SR path receives an original packet sent by a source host, the head-end device encapsulates the original packet as an SR packet and sends the SR packet to a next-hop node in the SR path. The source IP address of the SR packet is the Internet Protocol (IP) address of the head-end. The destination IP address of the SR packet is the SID of the next-hop node. The SR packet contains the SID of each node in the SR path. After an intermediate node through which the SR path passes receives the SR packet, the intermediate node keeps the source IP address of the SR packet unchanged, updates the destination IP address of the SR packet to the SID of the next-hop node, and then forwards the SR packet to the next-hop node. When the SR packet is forwarded to the tail-end, the tail-end decapsulates the SR packet as an original packet and sends the original packet to the destination host.

[0005] If an SR path needs to traverse underlay networks in multiple different routing domains, packets may be dropped due to unicast reverse path forwarding (URPF) check failures. Summary of the Invention

[0006] The embodiments of the present application provide a packet processing method, a network device, and a network system to avoid the problem of packets being discarded due to failure of URPF check. The technical solutions are as follows: [Means for solving the problem]

[0007] According to a first aspect, a packet processing method is provided. Optionally, the method is performed by a network device that serves as an intermediate node in a SR path. For example, the first network device serves as an intermediate node. The method includes: the first network device receives a first packet from a second network device, an IP address of the first packet includes an endpoint IP address of a first connection, the first packet includes an SID, the SID indicates a second connection, the first connection is a connection from the second network device to the first network device, and the second connection is a connection from the first network device to a third network device. The first network device processes the first packet to obtain a second packet, a source IP address of the second packet is an IP address belonging to the first network device at the endpoint IP address of the second connection, and a destination IP address of the second packet is an IP address belonging to the third network device at the endpoint IP address of the second connection. The first network device transmits the second packet to the third network device.

[0008] According to the above method, the intermediate node updates the source IP address of the packet based on the IP address belonging to the local end of the connection's endpoint IP address, and updates the destination IP address of the packet based on the IP address belonging to the remote end of the connection's endpoint IP address. Thus, in a scenario where an SR route traverses underlay transport networks in multiple different routing domains, the problem that the source IP address is always the head end's IP address and the packet is discarded because the URPF check fails is avoided. In addition, the connection's endpoint IP address is different from the IP address named SID, the connection's endpoint IP address is usually the IP address of the WAN interface of the network device, and the connection's endpoint IP address is usually the IP address assigned by the operator of the underlay transport network, so that the underlay transport network can naturally guarantee the route reachability of the IP address, and the underlay network device does not need to run an IGP routing protocol that supports SR to learn the segment routing corresponding to the SID to guarantee the route reachability of the IP address. Therefore, the establishment of the forwarding route does not need to depend on the routing protocol of the underlay transport network.

[0009] Optionally, the first connection and / or the second connection are each a tunnel virtual connection (TVC). A TVC is typically distinct from a physical link, and a TVC is a logical virtual connection. A TVC typically passes through one or more underlay transport networks. For example, the first connection passes through a first underlay network, and the second connection passes through a second underlay network.

[0010] Optionally, the endpoint IP address of the first connection and / or the endpoint IP address of the second connection are each of a wide area network WAN interface and are IP addresses assigned by an operator of the underlay network.

[0011] Since the IP address of the WAN interface is assigned by the operator of the underlay network, the operator of the underlay network is responsible for ensuring route reachability of the IP address, and network devices do not need to advertise routes containing the IP address to devices in the underlay network by using a routing protocol to remove dependency on the routing protocol of the underlay network, thereby saving the overhead caused by route advertisement.

[0012] Optionally, the endpoint IP address of the first connection and / or the endpoint IP address of the second connection are each a public network IP address.

[0013] Optionally, the first connection and / or the second connection are connections between different sites, for example, the second network device is deployed at a first site, the first network device is deployed at a second site, and the third network device is deployed at a third site, the first connection is a connection from the first site to the second site, and the third connection is a connection from the second site to the third site.

[0014] In such implementations, forwarding paths can be established between multiple sites, allowing more flexible traffic planning to be performed.

[0015] Optionally, the endpoint IP address of the first connection is an Internet Protocol version 6 IPv6 address, the first packet includes a segment routing header SRH and the SID is located in the SRH of the first packet, the first packet includes an IPv6 header, the IPv6 header is encapsulated in an outer layer of the original packet, and the endpoint IP address of the first connection is located in the IPv6 header of the first packet.

[0016] Optionally, the endpoint IP address of the second connection is an IPv6 address, the second packet includes an IPv6 header, the IPv6 header is encapsulated in an outer layer of the original packet, and the endpoint IP address of the second connection is located in the IPv6 header of the second packet.

[0017] In the aforementioned implementation, packets are sent between two connected endpoints based on IPv6 addresses and the SRH is encapsulated in the packet, thus supporting the construction of SD-WAN SR tunnels in IPv6 transport networks.

[0018] Optionally, the endpoint IP address of the first connection is an Internet Protocol version 4 IPv4 address, the first packet includes an SRH and the SID is located in the SRH of the first packet, the first packet includes an IPv4 header, the IPv4 header is encapsulated in an outer layer of the original packet, and the endpoint IP address of the first connection is located in the IPv4 header of the first packet.

[0019] Optionally, the endpoint IP address of the second connection is an IPv4 address. The second packet includes an IPv4 header, the IPv4 header is encapsulated in an outer layer of the original packet, and the endpoint IP address of the second connection is located in the IPv4 header of the second packet.

[0020] In the aforementioned implementation, packets are sent between two connected endpoints based on IPv4 addresses, thus supporting the creation of SD-WAN SR tunnels in IPv4 transport networks.

[0021] Optionally, the first packet includes a type of protocol corresponding to the SRH.

[0022] Optionally, the first packet includes a GRE header, the GRE header is encapsulated in an outer layer of the SRH, and the type of the protocol corresponding to the SRH is located in the GRE header of the first packet.

[0023] Optionally, the first packet includes a VXLAN header, the VXLAN header is encapsulated in an outer layer of the SRH, and a type of protocol corresponding to the SRH is located in the VXLAN header of the first packet.

[0024] Optionally, the type of protocol corresponding to the SRH is located in the IPv4 header of the first packet.

[0025] In the above-mentioned implementation form, since the type of protocol corresponding to the SRH is included in the packet before the SRH, it is convenient for the intermediate node to identify the SRH based on the type of protocol and further perform processing based on the SID in the SRH, thereby reducing the implementation complexity.

[0026] Optionally, the method provided in the first aspect further includes a process of reporting endpoint IP addresses before the traffic forwarding phase. In a possible implementation, the network device acting as a source end reports the endpoint IP addresses of the connection to the controller device. For example, the second network device sends the endpoint IP address of the first connection to the controller device, and the first network device sends the endpoint IP address of the second connection to the controller device. In another possible implementation, the network device acting as a destination end reports the endpoint IP addresses of the connection to the controller device. For example, the first network device sends the endpoint IP address of the first connection to the controller device, and the third network device sends the endpoint IP address of the second connection to the controller device. In another possible implementation, the network device acting as a source end and the network device acting as a destination end each report the endpoint IP addresses of the connection to the controller device, and the controller device selects an IP address from the endpoint IP addresses of the connection reported by the two network devices. For example, the second network device sends an endpoint IP address of the first connection to the controller device, the first network device sends an endpoint IP address of the second connection and an endpoint IP address of the first connection to the controller device, and the third network device sends an endpoint IP address of the second connection to the controller device. After receiving the endpoint IP address of the first connection sent by the second network device and the endpoint IP address of the first connection sent by the first network device, the controller device selects one of the two endpoint IP addresses of the first connection for path calculation.After receiving the endpoint IP address of the second connection sent by the first network device and the endpoint IP address of the second connection sent by the third network device, the controller device selects one of the two endpoint IP addresses of the second connection for path calculation.

[0027] In the above-described implementation, the controller device is supported in recognizing the endpoint IP addresses of each connection in the network, thereby assisting the controller device in organizing an SR path that includes multiple connections, thereby reducing the difficulty of path calculation by the controller.

[0028] Optionally, the process of reporting the connection endpoint IP addresses includes the first network device generating a border gateway protocol link-state (BGP-LS) packet, the BGP-LS packet including the second connection endpoint IP address and / or the first connection endpoint IP address, the BGP-LS packet further including an SD-WAN protocol identifier. The first network device sends the BGP-LS packet to the controller device.

[0029] A new protocol identifier is extended from BGP-LS so that when a controller device receives a BGP-LS packet, it can identify that the data reported by a network device is SD-WAN topology data by using the protocol identifier.

[0030] Optionally, before the first network device receives the first packet from the second network device, the first network device further obtains an identifier of a site in which the first network device is located and transmits the identifier of the site in which the first network device is located to the controller device.

[0031] The network devices report the identifiers of the sites in which they are located to the controller device, so that the controller device performs path computation by using the sites as objects.

[0032] Optionally, before the first network device receives the first packet from the second network device, the first network device further detects a connection status of the first connection and / or a connection status of the second connection, and transmits the connection status of the first connection and / or the connection status of the second connection to the controller device. In a possible implementation, the first network device periodically transmits the connection status of the first connection and / or the connection status of the second connection to the controller device. In a possible implementation, when the connection status of the first connection is updated, the first network device transmits the connection status of the first connection to the controller device. In a possible implementation, when the connection status of the second connection is updated, the first network device transmits the connection status of the second connection to the controller device.

[0033] Since the network devices report the connection status of the connections to the controller device, the controller device can timely know the status of each connection in the SR path, thus implementing end-to-end path status knowledge. If the controller finds a failure on a connection in the SR path, the controller device can import traffic to another SR path by disabling the SR path, aborting the SR path, or recalculating the SR path to prevent traffic from being dropped during forwarding.

[0034] Optionally, before the first network device receives the first packet from the second network device, the method further includes service-level agreement (SLA) information of the first connection and / or the second connection, the SLA information including, but not limited to, at least one of a packet loss rate, a delay, a jitter, or a bandwidth utilization.

[0035] Since the network devices report the SLA information of the connections to the controller device, the controller device can timely know the SLA of each connection in the SR path and calculate a path whose SLA meets the service requirements.

[0036] Optionally, the controller device assigns an SID to the second connection. The controller device transmits the SID to the first network device. The first network device receives the SID from the controller device.

[0037] The controller device assigns a SID to a connection and ensures that the same SID is used to indicate the same connection to the two endpoints of the connection, thereby avoiding SID conflicts.

[0038] According to a second aspect, a packet processing method is provided. Optionally, the method is performed by a network device acting as a headend in an SR path. For example, a second network device acts as the headend. The method includes the second network device receiving an original packet. The second network device generates a first packet based on the original packet. A source IP address of the first packet is an IP address belonging to the second network device in an endpoint IP address of the first connection. A destination IP address of the first packet is an IP address belonging to the first network device in an endpoint IP address of the first connection. The first connection is a connection from the second network device to the first network device. The first packet includes a first SID. The first SID indicates a second connection. The second connection is a connection from the first network device to a third network device. The second network device transmits the first packet to the first network device.

[0039] Optionally, each of the first connection and / or the second connection is a TVC. Each of the first connection and / or the second connection is a connection between different sites.

[0040] According to the above method, the headend uses the endpoint IP address of the TVC as the IP address of the packet and adds a SID indicating the next TVC to the packet, so that the packet can be forwarded to the next site by routing by using the endpoint IP address, and the SID is used to indicate the intermediate node to forward the packet to the site after the next site, thereby solving the problem that a packet cannot pass through multiple specified sites in an SD-WAN scenario.

[0041] Optionally, before the second network device receives the original packet, the second network device receives an SR policy sent by the controller device. The SR policy includes the first SID. The second network device obtains the first SID from the SR policy.

[0042] Optionally, the SR policy further includes a second SID, where the second SID indicates the first connection.

[0043] Optionally, the first packet includes an IP header and an SRH encapsulated in an outer layer of the original packet. An endpoint IP address of the first connection is located in the IP header of the first packet. A first SID is located in the IP header of the first packet.

[0044] Optionally, the first packet includes a type of protocol corresponding to the SRH.

[0045] Optionally, the first packet includes a GRE header, the GRE header is encapsulated in an outer layer of the SRH, and the type of the protocol corresponding to the SRH is located in the GRE header of the first packet.

[0046] Optionally, the first packet includes a VXLAN header, the VXLAN header is encapsulated in an outer layer of the SRH, and a type of protocol corresponding to the SRH is located in the VXLAN header of the first packet.

[0047] Optionally, the type of protocol corresponding to the SRH is located in the IPv4 header of the first packet.

[0048] According to a third aspect, a route determination method is provided. In the method, a controller device obtains endpoint IP addresses of a plurality of connections. The controller device determines a segment routing SR route based on the endpoint IP addresses of the plurality of connections, the SR route including a first connection and a second connection of the plurality of connections, the first connection being a connection from a first network device to a second network device, and the second connection being a connection from the second network device to a third network device. The controller device sends an SR policy to the first network device, the SR policy indicating the SR route.

[0049] According to the aforementioned method, the controller device organizes an SR route including multiple connections by using the endpoint IP addresses of the multiple connections, distributes an SR policy indicating the SR route to a head end of the SR route, and makes the head end forward packets based on the SR policy. The method helps to establish an end-to-end route that can be organized across multiple sites and facilitates traffic planning.

[0050] Optionally, each of the multiple connections is a connection between different sites, and the process of the controller device determining the SR path includes the controller device determining the SR path based on endpoint IP addresses of the multiple connections by using the site as a path orchestration object.

[0051] Optionally, the process of the controller device determining the SR path includes the controller device selecting a target connection from connections established by different network devices at the same site, and determining the SR path based on the target connection. For example, a network includes site 1 and site 2, where site 1 includes network device a and network device b, and site 2 includes network device c and network device d. The controller device determines that the network includes four connections based on the endpoint IP addresses of the connections reported by the network devices. The four connections are a connection from network device a to network device c, a connection from network device a to network device d, a connection from network device b to network device c, and a connection from network device b to network device d. The controller device selects a target connection from the four connections based on the specified constraints, and determines the SR path based on the target connection.

[0052] In a possible implementation, the constraint is an SLA requirement. The controller device selects a connection whose SLA information satisfies the SLA requirement from multiple connections at the same site as a target connection based on the SLA information of the connection sent by the network device. The SLA requirement includes, but is not limited to, requirements such as delay less than a specified duration, packet loss rate less than a specified packet loss rate, jitter less than a specified value, bandwidth utilization greater than a specified bandwidth utilization rate, etc.

[0053] Optionally, the controller device obtaining endpoint IP addresses of the multiple connections includes the controller device receiving an endpoint IP address of the first connection sent by the first network device or the second network device.

[0054] Optionally, the SR policy includes a first SID, the first SID indicating the second connection.

[0055] Optionally, the SR policy further includes a second SID, where the second SID indicates the first connection.

[0056] Optionally, the method further includes the controller device assigning a first SID to the second connection and a second SID to the first connection, the first SID indicative of the second connection and the second SID indicative of the first connection, the controller device transmitting the first SID to the second network device and the second SID to the first network device.

[0057] The controller device collects the endpoint IP addresses of each connection, assigns a SID corresponding to each connection, and delivers the SID to a network device that requires the SID; in a traffic forwarding phase, the network device can send a packet by using the connection corresponding to the SID based on the SID carried in the packet, thereby enabling the forwarding path of the packet to be flexibly controlled by using the SID.

[0058] According to a fourth aspect, a network device is provided. The network device has a function of implementing a first network device in any one of the first aspect or the optional methods of the first aspect. The network device includes at least one unit, and the at least one unit is configured to implement the method provided in the first aspect or the optional methods of the first aspect. Alternatively, the network device has a function of implementing a second network device in any one of the second aspect or the optional methods of the second aspect. The network device includes at least one unit, and the at least one unit is configured to implement the method provided in the second aspect or the optional methods of the second aspect.

[0059] In some embodiments, the unit in the network device is implemented by using software, and the unit in the network device is a program module. In some other embodiments, the unit in the network device is implemented by using hardware or firmware. For specific details of the network device provided in the fourth aspect, please refer to the first aspect or any one of the optional methods of the first aspect, or the second aspect or any one of the optional methods of the second aspect. Details will not be described again in this specification.

[0060] According to a fifth aspect, a controller device is provided. The controller device has a function of implementing any one of the third aspect or the optional methods of the third aspect. The controller device includes at least one unit, and the at least one unit is configured to implement the method provided in the third aspect or the optional methods of the third aspect. In some embodiments, the unit in the controller device is implemented by using software, and the unit in the controller device is a program module. In some other embodiments, the unit in the controller device is implemented by using hardware or firmware. For specific details of the controller device provided in the fifth aspect, please refer to the third aspect or any one of the optional methods of the third aspect. Details will not be described again in this specification.

[0061] According to a sixth aspect, a network device is provided. The network device includes a processor. The processor is coupled to a memory, the memory stores at least one computer program instruction, and the at least one computer program instruction is loaded and executed by the processor, so that the network device implements the method provided in the first aspect or any one of the optional methods of the first aspect, or any one of the optional methods of the second aspect or any one of the optional methods of the second aspect. For specific details of the network device provided in the sixth aspect, please refer to the first aspect or any one of the optional methods of the first aspect, or any one of the optional methods of the second aspect or any one of the optional methods of the second aspect. Details will not be described again in this specification.

[0062] According to the seventh aspect, a controller device is provided. The controller device includes a processor. The processor is coupled to a memory, and the memory stores at least one computer program instruction, and the at least one computer program instruction is loaded and executed by the processor, so that the controller device implements the method provided in the third aspect or any one of the optional methods of the third aspect. For specific details of the controller device provided in the seventh aspect, please refer to the third aspect or any one of the optional methods of the third aspect. Details will not be described again in this specification.

[0063] According to an eighth aspect, a computer readable storage medium is provided, the storage medium storing at least one instruction, which when executed on a computer enables the computer to perform the method provided in the first aspect or any one of the optional methods of the first aspect or the second aspect or any one of the optional methods of the second aspect.

[0064] According to a ninth aspect, there is provided a computer-readable storage medium, the storage medium storing at least one instruction, which when executed on a computer enables the computer to perform the method provided in the third aspect or any one of the optional methods of the third aspect.

[0065] According to a tenth aspect, there is provided a computer program product, comprising one or more computer program instructions which, when loaded and executed by a computer, enable the computer to perform the method provided in the first aspect or any one of the optional methods of the first aspect, or the second aspect or any one of the optional methods of the second aspect.

[0066] According to an eleventh aspect, there is provided a computer program product, the computer program product comprising one or more computer program instructions, which when loaded and executed by a computer, enable the computer to perform the method provided in the third aspect or any one of the optional manners of the third aspect.

[0067] According to a twelfth aspect, a chip is provided. The chip includes a memory and a processor. The memory is configured to store computer instructions, and the processor is configured to retrieve and execute the computer instructions from the memory to perform the method of the first aspect or any one of the optional methods of the first aspect, or the method of the second aspect or any one of the optional methods of the second aspect.

[0068] According to a thirteenth aspect, a chip is provided. The chip includes a memory and a processor. The memory is configured to store computer instructions, and the processor is configured to call the computer instructions from the memory and execute the computer instructions to perform the method provided in the third aspect or any one of the possible implementations of the third aspect.

[0069] According to a fourteenth aspect, there is provided a network system, the network system including a network device according to the third aspect and a controller device according to the fourth aspect, or the network system including a network device according to the fifth aspect and a controller device according to the sixth aspect. [Brief description of the drawings]

[0070] [Figure 1] FIG. 1 is a schematic diagram of a system architecture of an SD-WAN according to an embodiment of the present application. [Diagram 2] FIG. 1 is a schematic diagram of a system architecture of SD-WAN applied to an enterprise network according to an embodiment of the present application. [Diagram 3] FIG. 1 is a schematic diagram of applying a system architecture of SD-WAN to operator POP networking according to an embodiment of the present application. [Figure 4] 2 is a flowchart of a packet processing method according to an embodiment of the present application. [Diagram 5] FIG. 2 is a schematic diagram of a packet format according to an embodiment of the present application. [Figure 6] 2 is a flowchart of a route determination method according to an embodiment of the present application; [Figure 7] FIG. 1 is a schematic diagram of calculating an SR path in an overlay network according to an embodiment of the present application; [Figure 8] FIG. 1 is a schematic diagram of establishing a TVC according to an embodiment of the present application. [Figure 9] FIG. 2 is a schematic diagram of topology collection and reporting according to an embodiment of the present application. [Figure 10] FIG. 2 is a schematic diagram of a SR policy distribution by a controller device according to an embodiment of the present application; [Figure 11] FIG. 1 is a schematic diagram of a system architecture of an SD-WAN according to an embodiment of the present application. [Figure 12]FIG. 1 is a schematic diagram of importing services into an SD-WAN SRv6 tunnel and forwarding services according to an embodiment of the present application. [Figure 13] FIG. 1 is a schematic diagram of importing services into an SD-WAN SRv4 tunnel and forwarding services according to an embodiment of the present application. [Figure 14] FIG. 1 is a schematic diagram of an SD-WAN SRv6 and SRv4 hybrid tunnel forwarding method according to an embodiment of the present application; [Figure 15] FIG. 1 is a schematic diagram of a method for forwarding L3 VPNv6 traffic by using an SD-WAN SR tunnel according to an embodiment of the present application. [Figure 16] FIG. 1 is a schematic diagram of a method for forwarding L2 VPN traffic by using an SD-WAN SR tunnel according to an embodiment of the present application. [Figure 17] FIG. 1 is a schematic diagram of implementing multi-domain forwarding by using SD-WAN SR according to an embodiment of the present application. [Figure 18] FIG. 2 is a schematic diagram of the structure of a network device according to an embodiment of the present application; [Figure 19] FIG. 2 is a schematic diagram of the structure of a controller device according to an embodiment of the present application; [Figure 20] 1 is a schematic diagram of the structure of a network device or controller device according to an embodiment of the present application; [Figure 21] 1 is a schematic diagram of the structure of a network device or controller device according to an embodiment of the present application; DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0071] In order to make the objectives, technical solutions and advantages of the present application clearer, the following further describes the implementation of the present application in detail with reference to the accompanying drawings.

[0072] In the following, some terms and concepts in the embodiments of the present application are explained and explained.

[0073] (1) Tunnel virtual connection (TVC) A TVC is a logical virtual connection that typically traverses one or more transport networks.

[0074] (2) Connection In the embodiments of the present application, the term "connection" can be replaced with a TVC, a tunnel, a path, a virtual connection, or a wide area network (WAN) link.

[0075] Optionally, the connection is between different sites, and the connection passes through one or more network devices in an underlay transport network between the sites.

[0076] Optionally, the connection's endpoint internet protocol (IP) address is the IP address of the WAN interface. Optionally, the connection is unidirectional, and the connection is directional. For example, a connection from network device a to network device b and a connection from network device b to network device a are not the same connection. A connection from network device a to network device b is indicated by using a segment identifier (SID), and a connection from network device b to network device a is indicated by using another SID. In other words, the forward connection and the reverse connection are indicated by using two different SIDs. Alternatively, the connection is a non-directional connection. For example, a connection from network device a to network device b and a connection from network device b to network device a are indicated by using the same SID.

[0077] (3) Segment routing (SR) SR is a protocol designed based on the concept of source routing to forward packets in a network. SR divides a network path into segments and assigns SIDs to these segments and forwarding nodes of the network. The segments and network nodes are arranged to obtain a segment list, so that a forwarding path can be indicated by using the segment list.

[0078] SR encodes a segment list representing a forwarding path into the header of a data packet, and the segment list is transmitted together with the data packet. After receiving the data packet, the receiver parses the segment list. If the active SID in the segment list is the SID of the current node, the receiver performs an operation corresponding to the SID in the data packet; or, if the active SID is not the SID of the current node, the receiver forwards the data packet to the next node in a conventional routing forwarding manner.

[0079] (4) Internet Protocol Version 6 for Segment Routing (SRv6) SRv6 is a method designed based on the concept of source routing to forward IPv6 packets in a network. Based on the IPv6 forwarding plane, SR inserts a routing extension header named segment routing header (SRH) into the IPv6 packet and pushes an explicit IPv6 address stack to the SRH. The intermediate node performs destination address update and address stack offset operations successively to complete the hop-by-hop forwarding. SRv6 technology implements network programmability using existing IPv6 forwarding technology and flexible IPv6 extension headers. SRv6 defines some IPv6 addresses as instantiated SIDs. Each SID has an explicit purpose and function. Different SID operations are performed to implement simplified virtual private network (VPN) and flexible route planning.

[0080] (5) WAN interface IP address The WAN interface is also called a transport network port (TNP). The IP address of the WAN interface is different from the IP address named SRv6 SID. The two IP addresses differ mainly in that the SRv6 SID is an address of the locator address pool of the network device, and the IP address of the WAN interface is an address assigned by the operator of the underlay network. For the IP address named SRv6 SID, an IPv6 internal gateway protocol (IGP) routing protocol needs to be executed between the network device and the device of the underlay network. The reachability of the IP address named SRv6 SID in the traffic forwarding phase can be guaranteed only when the network device advertises a locator route to the device of the underlay network using the IPv6 IGP routing protocol, so that the device of the underlay network can recognize the IP address named SID. Therefore, a technical problem may arise that depends on the routing protocol of the underlay network. For the IP address of the WAN interface, the operator of the underlay network guarantees the route reachability of the IP address of the WAN interface. Network devices do not need to advertise additional routes by using IPv6 IGP routing protocols, thus avoiding dependency on the routing protocols of the underlay network.

[0081] (6) Software-defined wide area network (SD-WAN) Software-defined wide area network (SD-WAN) is an important practice of software defined networking (SDN). SD-WAN uses network controllers and integrates network, security, and wide area network optimization technologies and other technologies to implement enterprise WAN network configuration and automatic service provisioning, and provides simple, flexible, and high-quality enterprise WAN interconnection capabilities. SD-WANs usually have the following basic characteristics:

[0082] 1. Implement flexible IP Overlay networking based on hybrid WAN links. SD-WAN implements independence between the SD-WAN network and the underlay transport network by using a method to establish end-to-end overlay tunnels between edge devices at two sites. The underlay network link can be a multi-protocol label switching (MPLS) leased line, the public Internet, a long term evolution (LTE) network, etc.

[0083] 2. Implement intelligent application routing selection to ensure application experience. There are various types of enterprise applications. Common enterprise applications include productivity, collaboration, cloud, and entertainment applications, etc. Different types of applications have different requirements for bandwidth and link quality. SD-WAN usually identifies enterprise traffic by using application identification technology such as deep packet inspection (DPI), and then performs type statistics collection, quality detection, and routing control based on the application dimension. For example, a high-value application traffic is preferentially transmitted on a route with high line quality but high cost, such as MPLS, and a low-value application traffic is preferentially transmitted on a route with low line quality but low cost, such as the Internet.

[0084] 3. Implement centralized management and control and visualization, which is simple and easy to operate and maintain. Centralized management is implemented through centralized network monitoring and visualization to improve end-to-end WAN management and operations and maintenance efficiency.

[0085] (7) IGP An IGP is a routing protocol that operates within an AS. IGP protocols are, for example, the open shortest path first (OSPF) protocol or the intermediate system-to-intermediate system (IS-IS) protocol.

[0086] In the following, an example is used to explain the system architecture in an embodiment of the present application.

[0087] 1 is a schematic diagram of a system architecture of an SD-WAN network according to an embodiment of the present application. The system architecture shown in FIG. 1 is optionally provided as an SD-WAN overlay SR architecture. The system architecture shown in FIG. 1 includes a management control plane 10, an overlay network 20, and an underlay network 30.

[0088] The management control plane 10 includes a controller device 11. Optionally, the management control plane 10 further includes a route reflector (RR) 12.

[0089] The controller device 11 is a manager of the SD-WAN network. The controller device 11 is configured to manage the network device 201, the network device 202, the network device 203, the network device 204, and the RR 12. The controller device 11 is further configured to perform functions such as SD-WAN network service orchestration and configuration, and SR path orchestration and calculation. The controller device 11 is, for example, a server, a host, a terminal, or a network device.

[0090] RR 12 is the control component of the SD-WAN network. RR 12 is responsible for collecting network topology between network device 201, network device 202, network device 203, and network device 204 of the SD-WAN network, distributing user routes, performing filtering, performing control, etc. RR 12 is, for example, a server, a host, a terminal, or a network device. In some other embodiments, the SD-WAN network does not include RR 12, and all functions of RR 12 are implemented by using controller device 11.

[0091] 1 is described by using an example in which the controller device 11 and the RR 12 are separately located, in other words, the controller device 11 and the RR 12 are implemented by different physical devices communicatively coupled to each other. In some other embodiments, the controller device 11 and the RR 12 are co-located, in other words, the controller device 11 and the RR 12 are integrated into the same physical device.

[0092] The presence of one controller device 11 and one RR 12 in the network shown in Figure 1 is merely an example. Optionally, there are more controller devices 11 and RRs 12, and the quantity of the controller devices 11 and the quantity of the RRs 12 are not limited in this embodiment.

[0093] The overlay network 20 includes a plurality of network devices. The network devices are forwarding executors of the SD-WAN service. The network devices are configured to collect physical network topology information and perform tunnel encapsulation, encryption, and policy-based routing for user traffic. For example, the network devices are routers, switches, or firewalls.

[0094] Optionally, the network devices of the overlay network 20 are edge devices, points of presence (POPs), or aggregation devices. The network devices of the overlay network 20 are deployed separately at multiple sites. The different network devices of the overlay network 20 are connected via TVCs.

[0095] FIG. 1 is explained by using an example where the network devices are network device 201, network device 202, network device 203, or network device 204. Network device 201 is deployed at a branch site 1. Network device 202 is deployed at an aggregation site. Network device 203 is deployed at a branch site 2. Network device 204 is deployed at a headquarters site. Network device 201 is connected to network device 202 via a TVC 212. Network device 202 is connected to network device 204 via a TVC 224. Network device 204 is connected to network device 203 via a TVC 243.

[0096] The scenario of one network device deployed at one site shown in FIG. 1 is merely an example. Optionally, more network devices can be deployed at one site. For example, tens, hundreds, or more network devices are deployed at one site. The quantity of network devices deployed at one site is not limited in this embodiment.

[0097] The case where there are four network devices in the network shown in Figure 1 is merely an example. Optionally, there are more or fewer network devices. For example, there are three network devices, or there are tens, hundreds, or more network devices. The quantity of network devices is not limited in this embodiment.

[0098] Optionally, each device in Figure 1 is an independent hardware device, a cluster or distributed system including multiple hardware devices, or a virtualized device implemented based on cloud computing and network functions virtualization (NFV) technologies. Virtualized devices include, but are not limited to, virtual machines or containers.

[0099] The underlay network 30 includes, but is not limited to, a private line of a carrier, the Internet, or a private network built by a company. The underlay network 30 includes at least one network device 301. The network device 301 of the underlay network 30 is separately connected to the network device of the overlay network via a physical link.

[0100] Optionally, the system architecture provided in this embodiment of the present application is applied to a scenario in which traffic needs to be controlled to pass through one or more designated sites. The controller device is configured to organize an SR route including network devices of multiple sites. For example, referring to FIG. 1, the SR route organized by the controller device is: network device 201 at branch site 1 → network device 202 at aggregation site → network device 204 at headquarters site → network device 203 at branch site 2. The endpoints of the SR route include network device 201 and network device 203. The intermediate nodes through which the SR route passes include network device 202 and network device 204. The SR route includes TVC 212, TVC 224, and VC 243.

[0101] The system architecture shown in Figure 1 is applicable to many application scenarios. In the following, an exemplary description is provided with reference to two typical application scenarios.

[0102] A typical application scenario of an embodiment of the present application is an enterprise SD-WAN scenario. FIG. 2 is a schematic diagram of a scenario in which the SD-WAN overlay SR architecture according to an embodiment of the present application is applied to an enterprise network. An enterprise uses an SD-WAN tunnel and a transport network, such as a leased line, the Internet, or a 5G network, to implement interconnection between branch sites, thereby meeting the requirements of enterprise networking, cloud access, and Internet access services. In some large-scale enterprise networking, there may be a hierarchical networking scenario with the requirement to go through an SD-WAN site to perform multi-node SR path orchestration and control. For example, referring to FIG. 2, to meet the requirement of a user at branch site 1 to access a public cloud, the SD-WAN controller 490 organizes two SR paths. The SR path 1 is branch site 1 → aggregation site → headquarters site → public cloud site 5. The SR path 2 includes branch site 1 → aggregation site → public cloud site 5.

[0103] Another typical application scenario of the embodiment of the present application is an operator SD-WAN POP networking scenario. Figure 3 is a schematic diagram of applying the SD-WAN overlay SR architecture to an operator SD-WAN POP networking scenario according to an embodiment of the present application. An operator or managed service provider (MSP) deploys SD-WAN devices as POP gateways (GW) in different regions, and uses inter-cloud Internet and cloud private line resources to quickly and flexibly build an SD-WAN backbone network covering the whole country or even the world. An enterprise's branch site is connected to the nearest POP access point of the operator / MSP via a local Internet line. When inter-region service access is implemented by using an SD-WAN backbone network, it is necessary to organize an SR route that passes through multiple POP points. For example, to meet the requirement that a user at site 1 of customer A accesses the enterprise headquarters, the SD-WAN controller 590 organizes two SR routes. The SR route 1 is customer A's site 1 → POP GW 502 → POP GW 504 → customer A's headquarters. SR route 2 is from customer A's site 1 → POP GW 502 → POP GW 503 → POP GW 504 → customer A's headquarters.

[0104] The following describes communication protocols in some embodiments of the present application.

[0105] The communication protocols in some embodiments of the present application include a border gateway protocol-link state (BGP LS) protocol, a border gateway protocol (BGP) SRv6 policy protocol, and a BGP Ethernet VPN (EVPN) protocol.

[0106] The BGP LS protocol is used to support network topology collection and traffic engineering (TE) database (DB) information collection functions.

[0107] The BGP LS protocol is used between the controller device and the network device, and between the network devices. Optionally, when the network includes a RR, the BGP LS protocol is further used between the controller and the RR, and between the RR and the network device.

[0108] The BGP SRv6 policy protocol is used to support the function of tunnel policy distribution. The BGP SRv6 policy protocol is used between the controller device and the network device, and between the network devices. Optionally, if the network includes a RR, the BGP SRv6 policy protocol is further used between the controller and the RR, and between the RR and the network device.

[0109] The BGP EVPN protocol is used to support the functions of advertising SD-WAN TNP routes and advertising VPN service routes. The BGP EVPN protocol is used between network devices. Optionally, if the network includes a RR, the BGP EVPN protocol is further used between the RR and the network devices.

[0110] In the following, an example is used to explain the method steps in the embodiments of the present application.

[0111] FIG. 4 is a flowchart of a packet processing method according to an embodiment of the present application.

[0112] The method illustrated in FIG. 4 involves interactions between multiple network devices. To distinguish between different network devices, "network device a," "network device b," and "network device c" are used to distinguishably describe the multiple different network devices. Network device b is an intermediate node through which the SR path passes. Network device a is a head end of the SR path or an intermediate node through which the SR path passes. Network device c is a tail end of the SR path or an intermediate node through which the SR path passes.

[0113] 4 includes connections between different network devices. To distinguish and describe the different connections, "connection ab" is used to refer to a connection from network device a to network device b, and "connection bc" is used to refer to a connection from network device b to network device c.

[0114] Optionally, a network deployment scenario based on the method shown in Figure 4 is shown in Figure 1. For example, referring to Figure 1, it can be learned that the network device a in the method shown in Figure 4 is the network device 201 in Figure 1, the network device b in the method shown in Figure 4 is the network device 202 in Figure 1, and the network device c in the method shown in Figure 4 is the network device 204 in Figure 1; or, the network device a in the method shown in Figure 4 is the network device 202 in Figure 1, the network device b in the method shown in Figure 4 is the network device 204 in Figure 1, and the network device c in the method shown in Figure 4 is the network device 203 in Figure 1.

[0115] The method illustrated in FIG. 4 is optionally applied to an SD-WAN network.

[0116] A typical application scenario of the method shown in FIG. 4 is the interconnection between branch sites of an enterprise network. The network scenario shown in FIG. 2 is used as an example. The method shown in FIG. 4 is applied to the scenario shown in FIG. 2. When the traffic of the user of the branch site 1 needs to be controlled to access the public cloud site 5 via the SR path 1, the network device a of the method shown in FIG. 4 is the edge device 401 of FIG. 2, the network device b of the method shown in FIG. 4 is the edge device 406 of FIG. 2, the network device c of the method shown in FIG. 4 is the edge device 404 of FIG. 2, the connection ab of the method shown in FIG. 4 is the TVC 416 of FIG. 2, and the connection bc of the method shown in FIG. 4 is the TVC 464 of FIG. 2. When traffic of users at branch site 1 needs to be controlled to access public cloud site 5 via SR path 2, network device a in the method shown in FIG. 4 is edge device 401 in FIG. 2, network device b in the method shown in FIG. 4 is edge device 406 in FIG. 2, network device c in the method shown in FIG. 4 is edge device 405 in FIG. 2, connection ab in the method shown in FIG. 4 is TVC 416 in FIG. 2, and connection bc in the method shown in FIG. 4 is TVC 465 in FIG. 2.

[0117] A typical application scenario of the method shown in FIG. 4 is operator SD-WAN POP networking. The network scenario shown in FIG. 3 is used as an example. The method shown in FIG. 4 is applied to the scenario shown in FIG. 3. If the traffic of customer A's site 1 needs to be controlled to access the enterprise headquarters via SR route 1, the network device a of the method shown in FIG. 4 is the edge device 501 of site 1 in FIG. 3, the network device b of the method shown in FIG. 4 is the POP GW 502 in FIG. 3, the network device c of the method shown in FIG. 4 is the POP GW 504 in FIG. 3, the connection ab of the method shown in FIG. 4 is the TVC 512 in FIG. 3, and the connection bc of the method shown in FIG. 4 is the TVC 524 in FIG. 3. If traffic of customer A at site 1 needs to be controlled to access the corporate headquarters via SR route 2, then network device a in the method shown in Figure 4 is edge device 501 at site 1 in Figure 3, network device b in the method shown in Figure 4 is POP GW 502 in Figure 3, network device c in the method shown in Figure 4 is POP GW 503 in Figure 3, connection ab in the method shown in Figure 4 is TVC 512 in Figure 3, and connection bc in the method shown in Figure 4 is TVC 523 in Figure 3.

[0118] The method shown in Fig. 4 is optionally applied to a scenario in which multiple packets are processed, for example, each packet of a data flow is processed. To facilitate the reader's understanding, the method shown in Fig. 4 is described by using the processing procedure of the first packet as an example. For the method of processing another packet, please refer to the method of processing the first packet.

[0119] S601: Network device a sends a first packet to network device b.

[0120] The IP address of the first packet includes an endpoint IP address of the connection ab. Specifically, the endpoint IP address of the connection ab includes an IP address belonging to the network device a and an IP address belonging to the network device b. The source IP address of the first packet is the IP address belonging to the network device a of the endpoint IP address of the connection ab. The destination IP address of the first packet is the IP address belonging to the network device b of the endpoint IP address of the connection ab.

[0121] In some embodiments, the first packet includes an original packet and an outer-layer IP header. The original packet is a data packet sent by the user equipment. The outer-layer IP header is an IP header encapsulated in the outer layer of the original packet. The endpoint IP address of the connection ab is located in the outer-layer IP header of the first packet. Specifically, the IP address belonging to the network device a of the endpoint IP address of the connection ab is located in a source address field of the outer-layer IP header of the first packet, and the IP address belonging to the network device b of the endpoint IP address of the connection ab is located in a destination address field of the outer-layer IP header of the first packet.

[0122] Optionally, the endpoint IP address of the connection ab is of a WAN interface and is an IP address assigned by an operator of the underlay network. A connection established through a WAN interface is also called a WAN link. In an exemplary embodiment, network device a has a WAN interface a, and network device b has a WAN interface b. The connection ab is a network connection established between the WAN interface a of network device a and the WAN interface b of network device b. The connection ab passes through one or more network devices in the underlay network 1. The endpoint IP address of the connection ab includes an IP address of the WAN interface a and an IP address of the WAN interface b. The IP addresses of the WAN interface a and the WAN interface b are IP addresses assigned by an operator of the underlay network 1. The source IP address of the first packet is the IP address of the WAN interface a. The destination IP address of the first packet is the IP address of the WAN interface b.

[0123] The first packet contains a SID bc, which is a SID used to indicate a connection bc. The SID bc can serve as an identifier for the connection bc.

[0124] Optionally, SID bc is in the form of an MPLS label, or SID bc is in the form of an SRv6 SID, or SID bc is in the form of a combination of a source site identifier, a destination site identifier, a source TNP identifier, and a destination TNP identifier. For example, network device b is a network device in site b, and network device c is a network device in site c. Connection bc is a network connection established between WAN interface b of network device b and WAN interface c of network device c. SID bc is in the form of a combination of a site b identifier, a site c identifier, a WAN interface b identifier, and a WAN interface c identifier. If SID is implemented in the form of an SRv6 SID, the existing SRv6 mechanism can be reused. If SID is implemented in the form of a short label, the number of bytes is small, the extra bandwidth consumption is low, and the transmission efficiency is higher.

[0125] In a possible implementation, the first packet includes a segment routing header. The SID bc is located in the segment routing header of the first packet. Optionally, the segment routing header of the first packet is an SRv6 header, the SRv6 header of the first packet includes a segment list, and the SID bc is located in the segment list in the SRv6 header of the first packet. Optionally, the segment routing header of the first packet is an SR-MPLS header, the SR-MPLS header of the first packet includes a label stack, and the SID bc is located in the label stack in the SR-MPLS header of the first packet. The SID bc is the top label of the label stack of the first packet.

[0126] Optionally, the first packet further includes a SID ab, where the SID ab indicates a connection ab.

[0127] S602: Network device b receives a first packet from network device a.

[0128] In some embodiments, after network device a sends a first packet via WAN interface a, the first packet first arrives at a network device in underlay network 1. The network device in underlay network 1 performs a query in a routing table based on the destination IP address of the first packet (i.e., the IP address of WAN interface b of network device b) to obtain an outbound interface and a next hop corresponding to the IP address of WAN interface b. The network device in underlay network 1 forwards the packet based on the outbound interface and the next hop corresponding to the IP address of WAN interface b, so that the first packet is forwarded to the WAN interface b of network device b. Network device b receives the first packet via the WAN interface b.

[0129] S603: Network device b processes the first packet to obtain a second packet.

[0130] Network device b obtains SID bc from the first packet. Network device b determines connection bc based on SID bc. Network device b obtains an endpoint IP address of connection bc. Network device b updates a source IP address of the first packet by using an IP address belonging to network device b in the endpoint IP address of connection bc, and updates a destination IP address of the first packet by using an IP address belonging to network device c in the endpoint IP address of connection bc, thereby updating the first packet to a second packet.

[0131] The IP address of the second packet includes an endpoint IP address of the connection bc. Specifically, the endpoint IP address of the connection bc includes an IP address belonging to the network device b and an IP address belonging to the network device c. The source IP address of the second packet is the IP address belonging to the network device b in the endpoint IP address of the connection bc. The destination IP address of the second packet is the IP address belonging to the network device c in the endpoint IP address of the connection bc.

[0132] In some embodiments, the second packet includes an original packet and an outer-layer IP header. The original packet in the second packet is the same as the original packet in the first packet. The endpoint IP address of the connection bc is located in the outer-layer IP header of the second packet. Specifically, the IP address belonging to the network device b in the endpoint IP address of the connection bc is located in a source address field in the outer-layer IP header of the second packet, and the IP address belonging to the network device c in the endpoint IP address of the connection bc is located in a destination address field in the outer-layer IP header of the second packet.

[0133] Optionally, the endpoint IP address of the connection bc is of a WAN interface and is an IP address assigned by an operator of the underlay network. In an exemplary embodiment, network device b has a WAN interface b, and network device c has a WAN interface c. The connection bc is a network connection established between the WAN interface b of network device b and the WAN interface c of network device c. The connection bc passes through one or more network devices in the underlay network 2. The endpoint IP address of the connection bc includes an IP address of the WAN interface b and an IP address of the WAN interface c. The IP addresses of the WAN interface c and the IP address of the WAN interface b are IP addresses assigned by an operator of the underlay network 2. The source IP address of the second packet is the IP address of the WAN interface b. The destination IP address of the second packet is the IP address of the WAN interface c.

[0134] There are multiple cases regarding whether the second packet includes a segment routing header and the content of the segment routing header when the second packet includes the segment routing header. Optionally, the second packet includes a segment routing header, and the segment list of the segment routing header in the second packet includes an SID of a downstream node of the network device c, so that the downstream node of the network device c continues to forward the packet based on the SID. Optionally, the segment list of the segment routing header in the second packet is the same as the segment list of the segment routing header in the first packet. For example, in the process of processing the packet, the network device b keeps the content of the segment list of the segment routing header unchanged and updates the SL field of the segment routing header such that the SID pointed to by the SL field in the packet changes from SID bc to the next SID of SID bc. The next SID of SID bc is the SID of the network device c. Optionally, the segment list of the segment routing header of the second packet is different from the segment list of the segment routing header of the first packet, and the segment list of the segment routing header of the second packet does not include SID bc. For example, in the process of processing the packet, network device b performs a label switching operation and updates SID bc to another label. Optionally, the second packet does not include a segment routing header. For example, network device b is a penultimate hop node in an SR path, network device c is a tail node in the SR path, and in the process of processing the packet, network device b enables the segment routing header of the first packet to pop up by using a penultimate hop popping function.

[0135] Optionally, the second packet further includes a SID ab, where the SID ab indicates the first connection.

[0136] Network device b can obtain the IP address belonging to network device c at the endpoint IP address of connection bc by using multiple implementations. In a possible implementation, network device c pre-advertises a TNP route. The TNP route includes the IP address belonging to network device c at the endpoint IP address of connection bc. Network device b receives the TNP route advertised by network device c, and network device b obtains the IP address of network device c from the TNP route. Optionally, network device c establishes a BGP protocol neighbor relationship with RR. Network device c reports the TNP route to RR based on BGP protocol. RR reflects the TNP route reported by network device c and sends the TNP route to network device b.

[0137] The value of the SID can be determined by using several implementations. In the following, an exemplary description is provided with reference to two implementations.

[0138] Implementation 1: The controller device assigns a SID to each connection.

[0139] For example, the controller device assigns SID ab to connection ab and SID bc to connection bc. The controller device sends SID ab to network device a, and the controller device sends SID bc to network device b. Network device a receives SID ab sent by the controller device. Network device b receives SID bc sent by the controller device.

[0140] Implementation 2: A network device assigns a SID to each connection established at the local end.

[0141] For example, network device a assigns SID ab to connection ab. Network device a sends SID ab to the controller device. Network device b assigns SID bc to connection bc. Network device b sends SID bc to the controller device.

[0142] S604: Network device b sends a second packet to network device c.

[0143] Optionally, the connection ab is a connection between different sites, for example, network device a is a network device at site a, network device b is a network device at site b, the connection ab is a connection between site a and site b, and the connection ab passes through an underlay network between site a and site b.

[0144] Optionally, the connection bc is a connection between different sites, for example, network device b is a network device in site b, network device c is a network device in site c, the connection bc is a connection between site b and site c, and the connection bc passes through an underlay network between site b and site c.

[0145] Optionally, the downstream node of the network device c in the SR path includes a network device d. The WAN interface c of the network device c is connected to the WAN interface d of the network device d through a connection cd. The first packet and the second packet further include a SID cd, where the SID cd indicates the connection cd.

[0146] According to the method provided in this embodiment, in the traffic forwarding phase, the network device serving as an intermediate node in the SR route updates the source IP address of the packet based on the IP address belonging to the local end of the endpoint IP address of the connection, and updates the destination IP address of the packet based on the IP address belonging to the remote end of the endpoint IP address of the connection. Thus, in a scenario in which the SR route traverses underlay transport networks in multiple different routing domains, the problem that the source IP address is always the IP address of the head end and the packet is discarded because the URPF check fails is avoided. In addition, the endpoint IP address of the connection is usually the IP address of the WAN interface of the network device, and the IP address is usually the IP address assigned by the operator of the transport network, and the transport network can naturally guarantee the route reachability of the IP address, and the underlay network device does not need to run an IGP protocol supporting SR-MPLS or an IGP protocol supporting SRv6 to guarantee the route reachability of the destination IP address. Therefore, there is no need to rely on the routing protocol of the underlay transport network.

[0147] Optionally, the SID bc in the method shown in FIG. 4 is an SID of type End.X-SD-WAN.

[0148] End.X-SD-WAN is a new type of SID provided in this embodiment of the present application. The endpoint behavior corresponding to End.X-SD-WAN includes updating the source IP address of the packet by using an IP address belonging to the local end of the connection's endpoint IP address, and updating the destination IP address of the packet by using an IP address belonging to the peer end of the connection's endpoint IP address. In some embodiments, the endpoint behavior corresponding to End.X-SD-WAN specifically includes: querying a TVC source IP address (i.e., an IP address belonging to the local end of the connection's endpoint IP address) in the TVC database and corresponding to the active SID, a TVC destination IP address (i.e., an IP address belonging to the peer end of the connection's endpoint IP address) in the TVC database and corresponding to the active SID based on the active SID in the packet; updating the source address of the packet by using the TVC source IP address and updating the destination address of the packet by using the TVC destination IP address to obtain an updated packet; and sending the updated packet through the TVC outbound interface corresponding to the active SID. The active SID is the SID to be processed by the current device. In the case of SRv6, the active SID is the SID in the segment list indicated by the SL field in the SRH in the packet. In the case of SR-MPLS, the active SID is the top label of the label stack in the packet.

[0149] In some embodiments, pseudocode for implementing End.X-SD-WAN is shown below: End.x-sdwan: S01.When an SRH is processed S02.If(Segments Left==0){ S03.Stop processing the SRH,and proceed to process the next header in the packet,whose type is identified by the Next Header field in the routing header. S04.} … S12.Decrement IPv6 Hop Limit by 1 S13.Decrement Segments Left by 1 S14.Lookup Tunnel virtual connection DB with Segment List[Segment Left], update IPv6 SA and DA with TVC source IP and destination ip S15.Submit the packet to the Tunnel virtual connection S16.}

[0150] The semantics of the above pseudocode is given below. End.X-SD-WAN: S01.When an SRH is processed S02.If(Segments Left==0){ S03. Stop processing the SRH and proceed to process the next header after the SRH in the packet, whose type is identified by the next header field in the Routing header. … S12. Decrement the IPv6 Hop Limit by 1. S13. Decrease the remaining segments by 1. S14. Search the TVC database by using the SID indicated by the segments left (SL) field of the segment list; update the IPv6 source address (SA) field of the packet by using the found TVC source IP address; update the IPv6 destination address (DA) field of the packet by using the found TVC destination IP address. S15. Send the packet to the IPv6 forwarding module, which forwards the packet to the new destination through the corresponding TVC outbound interface. S16.}

[0151] The process of network device b processing the first packet includes network device b executing an endpoint behavior corresponding to End.X-SD-WAN in the first packet to obtain a second packet. Specifically, network device b creates and stores a local SID table in advance. The local SID table is used to store the correspondence between SID, SID type, and outbound interface. In the local SID table, the SID type corresponding to SID bc is End.X-SD-WAN, and the outbound interface corresponding to SID bc is WAN interface b. After network device b receives the first packet, network device b executes a query in the local SID table based on SID bc in the first packet to find that the SID type corresponding to SID bc is End.X-SD-WAN, and the outbound interface is WAN interface b. Thus, network device b executes an endpoint behavior corresponding to End.X-SD-WAN. Specifically, network device b updates the source address and destination address of the first packet by using the endpoint IP address of connection bc, and sends the obtained second packet through WAN interface b.

[0152] Optionally, the network device establishes a correspondence relationship between the SID and TVC of the End.X-SD-WAN type, as well as a correspondence relationship between the TVC and the WAN interface. In a packet forwarding process, the network device first queries the corresponding TVC based on the SID in the packet, then queries the corresponding WAN interface based on the TVC, and forwards the packet through the WAN interface. For example, in the method shown in FIG. 4, the network device b first queries the corresponding outbound interface based on the SID bc to obtain the TVC bc (i.e., connection bc), and then queries the outbound interface corresponding to the TVC bc to obtain the WAN interface b.

[0153] Optionally, the SID ab in the method shown in FIG. 4 is an SID of End.X-SD-WAN type. The specific process of the network device a sending the first packet includes: the network device a receives an original packet from the user equipment; the network device a queries a routing table based on the destination IP address of the original packet; the network device a finds that the destination IP address of the original packet corresponds to the SR policy; the segment list in the SR policy includes a SID ab corresponding to the connection ab and a SID bc corresponding to the connection bc; the SID ab is the first SID in the segment list; the network device a queries a local SID table based on the SID ab to find that the connection corresponding to the SID ab is the connection ab, the outbound interface corresponding to the SID ab is the WAN interface a, and the endpoint behavior corresponding to the SID ab includes: updating the source IP address of the packet by using an IP address belonging to the local end in the endpoint IP address of the connection; and updating the destination IP address of the packet by using an IP address belonging to the peer end in the endpoint IP address of the connection. The network device a adds an outer layer IP header and an SRH to the original packet based on the endpoint behavior corresponding to SID ab to obtain a first packet. The source IP address of the outer layer IP header of the first packet is an IP address belonging to the network device a in the endpoint IP address of the connection, and the destination IP address of the outer layer IP header is an IP address belonging to the network device b in the endpoint IP address of the connection. The SRH includes SID bc. The network device a sends the first packet through the WAN interface a.

[0154] In this embodiment, an SID of End.X-SD-WAN type is provided, traffic forwarding based on an SR route including multiple TVCs is supported, and packets are encapsulated based on the endpoint IP address of the TVC (without using SIDs), thereby implementing an overlay SR tunneling technology separated from the underlay network. Specifically, in the existing SRv6 technology, End.X obtains the next hop SID of the segment list in the SRH, uses the next hop SID as the destination IP address of the IPv6 packet, and is used to send the packet whose destination IP address is the SID through the specified link. As a result, the edge device and the intermediate transport network device need to interact by using an IGP protocol, and the edge device needs to advertise the Locator prefix route corresponding to the SID to all devices in the transport network. Otherwise, the device in the transport network cannot find a route based on the destination IP address of the packet, and therefore cannot forward the packet to the edge device corresponding to the SID. However, in this embodiment, since End.X-SD-WAN includes searching the TVC database based on the next hop SID in the segment list in the SRH, updating the source IP address and destination IP address of the IPv6 packet based on the source IP address of the TVC and the destination IP address of the TVC in the TVC database, and then sending the updated packet through the physical link corresponding to the TVC. The source IP address of the TVC and the destination IP address of the TVC are the IP addresses of the WAN interface on the edge device, and the IP address of the WAN interface is usually assigned by the intermediate transport network, and the route can be naturally forwarded in the transport network. Therefore, the SR packet encapsulated in this way does not have the problem of route discovery and URPF check failure.

[0155] The following describes a specific implementation form in a scenario where the underlay network is an IPv6 network. The implementation form described below may be provided as an SD-WAN SRv6 tunneling technology.

[0156] If the underlay network is an IPv6 network, the endpoint IP addresses of the connection that are added to the packet by the network device are IPv6 addresses. The outer-layer IP header of the packet is an IPv6 header. The source IP address and destination IP address in the IPv6 header are IPv6 addresses.

[0157] The method shown in FIG. 4 is used as an example. When the underlay network 1 corresponding to the connection ab is an IPv6 network, optionally, both the network device a and the network device b are network devices that support IPv6. The endpoint IP address of the connection ab in the first packet is an IPv6 address. The first packet includes an outer-layer IPv6 header, an SRH, and an original packet. The endpoint IP address of the connection ab is located in the outer-layer IPv6 header of the first packet. Specifically, the IPv6 address belonging to the network device a in the endpoint IP address of the connection ab is located in the source address field in the outer-layer IPv6 header of the first packet. The IPv6 address belonging to the network device b in the endpoint IP address of the connection ab is located in the destination address field in the outer-layer IPv6 header of the first packet. The first packet includes an SRH. The SID bc is located in the SRH of the first packet.

[0158] Similarly, if the underlay network of the connection bc is an IPv6 network, optionally, both the network device b and the network device c are network devices that support IPv6. The endpoint IP address of the connection bc in the second packet is an IPv6 address. The second packet includes an outer-layer IPv6 header and an original packet. The endpoint IP address of the connection bc is located in the outer-layer IPv6 header of the second packet. Specifically, the IPv6 address belonging to the network device b in the endpoint IP address of the connection bc is located in a source address field in the outer-layer IPv6 header of the second packet. The IPv6 address belonging to the network device c in the endpoint IP address of the connection bc is located in a destination address field in the outer-layer IPv6 header of the second packet.

[0159] The following describes a specific implementation form in a scenario where the underlay network is an IPv4 network. The implementation form described below may be provided as an SD-WAN SRv4 tunneling technology.

[0160] If the underlay network is an internet protocol version 4 (IPv4) network, the endpoint IP address of the connection added to the packet by the network device is an IPv4 address. The outer layer IP header of the packet is an IPv4 header. The source IP address and the destination IP address in the IPv4 header are IPv4 addresses. The packet includes a type of protocol corresponding to the SRH, and the type of protocol corresponding to the SRH is located in the outer layer of the SRH in the packet. The specific location for carrying the type of protocol corresponding to the SRH includes multiple implementations. An exemplary description is provided below with reference to three implementations.

[0161] Implementation 1: A network device encapsulates a generic routing encapsulation (GRE) header between an outer layer IPv4 header and an SRH. The GRE header includes a type of protocol corresponding to the SRH. In a possible implementation, the type of protocol corresponding to the SRH is located in a payload protocol field in the GRE header. Figure 5 is a schematic diagram of a format for encapsulating an SD-WAN SRv4 tunnel packet via GRE. As shown in Figure 5, the packet includes an outer layer IP header, a GRE header, an SRH, and an original packet.

[0162] Implementation 2: The network device encapsulates a virtual extensible local area network (VXLAN) header between the outer-layer IPv4 header and the SRH. The VXLAN header includes the type of protocol that corresponds to the SRH. In a possible implementation, the type of protocol that corresponds to the SRH is located in a next protocol field in the VXLAN header.

[0163] Implementation form 3: The network device adds a protocol type corresponding to the SRH to the outer layer IPv4 header.

[0164] The method shown in FIG. 4 is used as an example. When the underlay network of the connection ab is an IPv4 network, optionally, both the network device a and the network device b are network devices that support IPv4. The endpoint IP address of the connection ab in the first packet is an IPv4 address. The first packet includes an outer-layer IPv4 header, an SRH, and an original packet. The endpoint IP address of the connection ab is located in the outer-layer IPv4 header of the first packet. Specifically, the IPv4 address belonging to the network device a in the endpoint IP address of the connection ab is located in the source address field in the outer-layer IPv4 header of the first packet. The IPv4 address belonging to the network device b in the endpoint IP address of the connection ab is located in the destination address field in the outer-layer IPv4 header of the first packet. The first packet includes an SRH. The SID bc is located in the SRH of the first packet. The first packet includes a type of protocol corresponding to the SRH.

[0165] When implementation form 1 is used, the first packet includes a GRE header. The GRE header of the first packet is positioned between the outer layer IPv4 header and the SRH. The type of protocol corresponding to the SRH is positioned in the GRE header of the first packet. When implementation form 2 is used, the first packet includes a VXLAN header. The VXLAN header of the first packet is positioned between the outer layer IPv4 header and the SRH, and the type of protocol corresponding to the SRH is positioned in the VXLAN header of the first packet. When implementation form 3 is used, the type of protocol corresponding to the SRH is positioned in the IPv4 header of the first packet.

[0166] Similarly, if the underlay network of the connection bc is an IPv4 network, optionally, both the network device b and the network device c are network devices that support IPv4. The endpoint IP address of the connection bc in the second packet is an IPv4 address. The second packet includes an outer-layer IPv4 header and an original packet. The endpoint IP address of the connection bc is located in the outer-layer IPv4 header of the second packet. Specifically, the IPv4 address belonging to the network device b in the endpoint IP address of the connection bc is located in a source address field in the outer-layer IPv4 header of the second packet. The IPv4 address belonging to the network device c in the endpoint IP address of the connection bc is located in a destination address field in the outer-layer IPv4 header of the second packet.

[0167] The following describes a specific implementation in a scenario where the underlay network includes an IPv6 network and an IPv4 network. The implementation described below may be provided as an SD-WAN SRv6 and SRv4 hybrid tunneling technology.

[0168] When the underlay network includes an IPv6 network and an IPv4 network, the network device converts the packet encapsulation format and updates the outer-layer IP header of the packet from an IPv4 header to an IPv6 header or updates the outer-layer IP header of the packet from an IPv6 header to an IPv4 header.

[0169] For example, in the method shown in FIG. 4, if the underlay network of the connection ab is an IPv4 network and the underlay network of the connection bc is an IPv6 network, optionally, the network device a is a device supporting an IPv4 network, the network device b is a device supporting both an IPv4 network and an IPv6 network, and the network device c is a device supporting an IPv6 network. The endpoint IP address of the connection ab in the first packet is an IPv4 address. The endpoint IP address of the connection bc in the second packet is an IPv6 address. The process of the network device b processing the packet includes: the network device b decapsulating an outer-layer IPv4 header including the endpoint IP address of the connection ab from the first packet; the network device b generating an outer-layer IPv6 header including the endpoint IP address of the connection bc; the network device b encapsulating the outer-layer IPv6 header including the endpoint IP address of the connection bc into the packet to obtain a second packet.

[0170] If the underlay network of the connection ab is an IPv6 network and the underlay network of the connection bc is an IPv4 network, optionally, the network device a is a device supporting an IPv6 network, the network device b is a device supporting both an IPv4 network and an IPv6 network, and the network device c is a device supporting an IPv4 network. An endpoint IP address of the connection ab in the first packet is an IPv6 address. An endpoint IP address of the connection bc in the second packet is an IPv4 address. The process of the network device b processing the packet includes: the network device b decapsulating an outer-layer IPv6 header including the endpoint IP address of the connection ab from the first packet; the network device b generating an outer-layer IPv4 header including the endpoint IP address of the connection bc; the network device b encapsulating the outer-layer IPv4 header including the endpoint IP address of the connection bc in the packet to obtain a second packet.

[0171] In a possible implementation, the network device stores a correspondence between the connection and the encapsulation type. The network device determines a packet header to be encapsulated in the original packet based on the encapsulation type corresponding to the connection. For example, after the network device b determines the connection corresponding to the SID, if the encapsulation type corresponding to the connection is SRv6, the network device b encapsulates an IPv6 header and an SRH in the first packet. If the encapsulation type corresponding to the connection is SRv4-GRE, the network device b encapsulates an IPv4 header, a GRE header, and an SRH in the first packet. If the encapsulation type corresponding to the connection is SRv4-VXLAN, the network device b encapsulates an IPv4 header, a VXLAN header, and an SRH in the first packet.

[0172] The embodiment shown in Figure 4 above provides a basic procedure in the forwarding plane. Some embodiments of the present application further provide a basic procedure in the control plane. A detailed description is provided below.

[0173] 6 is a flowchart of a route determination method according to an embodiment of the present application. The method shown in FIG. 6 includes the following steps S702 to S704.

[0174] Step S702: The controller device obtains endpoint IP addresses of multiple connections.

[0175] In some embodiments, to obtain the endpoint IP addresses of the multiple connections, the network device transmits the endpoint IP addresses of the connections to the controller device, and the controller device receives the endpoint IP addresses of the connections transmitted by the network device. The following provides an exemplary description with reference to three implementations.

[0176] Implementation A: A network device acting as the source end reports the endpoint IP addresses of the connection to a controller device.

[0177] For example, referring to the method shown in Fig. 4, network device a sends an endpoint IP address of connection ab to the controller device. Network device b sends an endpoint IP address of connection bc to the controller device. The controller device receives the endpoint IP address of connection ab sent by network device a and receives the endpoint IP address of connection bc sent by network device b to obtain the endpoint IP address of connection ab and the endpoint IP address of connection bc.

[0178] Implementation B: The network device acting as the destination end reports the end point IP address of the connection to the controller device.

[0179] For example, referring to the method shown in Figure 4, network device b sends the endpoint IP address of connection ab to the controller device, and network device c sends the endpoint IP address of connection bc to the controller device.

[0180] Implementation form C: A network device acting as a source end and a network device acting as a destination end each report an endpoint IP address of the connection to a controller device, and the controller device selects an IP address from the endpoint IP addresses of the connection reported by the two network devices.

[0181] For example, referring to the method shown in Figure 4, network device a sends the endpoint IP address of connection ab to the controller device, and network device b sends the endpoint IP address of connection ab and the endpoint IP address of connection bc to the controller device. Network device c sends the endpoint IP address of connection bc to the controller device. The controller device selects an IP address from the endpoint IP address of connection ab sent by network device a and the endpoint IP address of connection ab sent by network device b as the endpoint IP address of connection ab. The controller device selects an IP address from the endpoint IP address of connection bc sent by network device b and the endpoint IP address of connection bc sent by network device c as the endpoint IP address of connection bc.

[0182] In some embodiments, the network device further obtains an identifier (site ID) of a site where the network device is located, and reports the identifier of the site to the controller device. For example, network device a is deployed in site a, network device b is deployed in site b, and network device c is deployed in site c, and network device a sends the identifier of site a to the controller device, network device b sends the identifier of site b to the controller device, and network device c sends the identifier of site c to the controller device.

[0183] In some embodiments, the network device detects a connection status of the connection, and the network device further reports the connection status of the connection to the controller device. The connection status of the connection includes an up status and a down status. In a possible implementation, the network device periodically sends a probe packet to the peer end of the connection and determines the connection status of the connection depending on whether a response packet returned by the peer end is received within a predetermined period of time.

[0184] Optionally, a network device acting as a source end reports a connection status of the connection to the controller device. For example, referring to the method shown in FIG. 4, network device a sends a connection status of connection ab to the controller device. Network device b sends a connection status of connection bc to the controller device. Optionally, a network device acting as a destination end reports a connection status of the connection to the controller device. For example, referring to the method shown in FIG. 4, network device a sends a connection status of connection ab to the controller device. Network device c sends a connection status of connection bc to the controller device. Optionally, both the network device acting as a source end and the network device acting as a destination end report a connection status of the connection to the controller device.

[0185] In some embodiments, the network device detects service-level agreement (SLA) information of the connection, and the network device reports the SLA information of the connection to the controller device, the SLA information of the connection including, but not limited to, at least one of packet loss rate, delay, jitter, or bandwidth utilization.

[0186] Optionally, a network device acting as a source end reports SLA information of the connection to the controller device. For example, referring to the method shown in FIG. 4, network device a sends SLA information of connection ab to the controller device. Network device b sends SLA information of connection bc to the controller device. Optionally, a network device acting as a destination end reports SLA information of the connection to the controller device. For example, referring to the method shown in FIG. 4, network device b sends SLA information of connection ab to the controller device. Network device c sends SLA information of connection bc to the controller device. Optionally, both the network device acting as a source end and the network device acting as a destination end report SLA information of the connection to the controller device.

[0187] In some embodiments, the network device further reports a SID corresponding to the connection to the controller device. For example, referring to the method shown in Figure 4, the network device a sends a SID ab corresponding to the connection ab to the controller device. The network device b sends a SID bc corresponding to the connection bc to the controller device.

[0188] Optionally, when the network device establishes multiple connections to multiple peer ends, the network device sends to the controller device an endpoint IP address of each of the multiple connections, a connection status of each of the multiple connections, SLA information for each of the multiple connections, and a SID corresponding to each of the multiple connections.

[0189] In some embodiments, the network device reports various information to the controller device according to the BGP LS protocol, such as the connection end point IP address, the connection status, SID, and the site identifier. The following uses an example to describe a specific implementation of reporting the aforementioned various information according to the BGP LS protocol.

[0190] In a possible implementation, the protocol-ID definition is extended based on RFC 7752, and a new protocol-ID is defined to support reporting of various information, such as connection endpoint IP addresses, to support the BGP SD-WAN TVC topology database. The protocol-ID is, for example, a protocol number that indicates the source of the topology information. Table 1 shows the extended protocol-ID, and a new SD-WAN protocol-ID is added. The SD-WAN protocol-ID indicates that the source protocol in the network layer reachability information (NLRI) in the packet (i.e., various information such as connection endpoint IP addresses and connection status) is the SD-WAN protocol.

[0191] [Table 1]

[0192] For example, the process of network device b reporting the connection endpoint IP address includes network device b generating a BGP-LS packet, the BGP-LS packet including the connection bc endpoint IP address and / or the connection ab endpoint IP address, and the BGP-LS packet further including an SD-WAN protocol identifier. Network device b sends the BGP-LS packet to the controller device. The SD-WAN protocol identifier is extended so that the controller device can identify the BGP LS to collect new topology data provided in this embodiment by using the protocol identifier in the BGP LS packet.

[0193] In some embodiments, the BGP LS node route is extended based on RFC 7752. The BGP LS node route includes an identifier of the SD-WAN protocol and an SD-WAN site identifier (SD-WAN site ID). The SD-WAN site ID is used to identify a site corresponding to a network device in the SD-WAN. Other information in the BGP LS node route reuses the definitions in existing standards. For example, the contents of the BGP LS node route for SD-WAN are shown in Table 2.

[0194] [Table 2]

[0195] In some embodiments, the BGP LS link route is extended based on RFC 7752. The BGP LS link route includes an SD-WAN protocol identifier, a TVC status attribute, and a segment identifier attribute. The TVC status attribute is also referred to as the SD-WAN-TVC-status attribute. The TVC status attribute is used to carry the tunnel status of the SD-WAN TVC. The segment identifier attribute is also referred to as the SD-WAN-segment-id attribute. The segment identifier attribute is used to carry the SD-WAN TVC SID. For example, the contents of the BGP LS link route for SD-WAN are shown in Table 3.

[0196] [Table 3]

[0197] Step S703: The controller device determines an SR route based on the endpoint IP addresses of the multiple connections.

[0198] For example, the nodes in the SR path include network device a, network device b, and network device c. The connections in the SR path include connection ab and connection bc.

[0199] Optionally, instead of performing the path computation by using a single network device as an object, the controller device performs the path computation by using a site as an object. Next, features related to the path computation performed by using a site as an object are described.

[0200] For example, in step S702, the controller device specifically obtains endpoint IP addresses of connections between different sites in the multiple sites. In step S703, the controller device determines an SR route based on the endpoint IP addresses of the multiple connections by using the site as a route orchestration object. The endpoints in the SR policy sent by the controller device in step S704 correspond to the sites. Optionally, the values ​​of the endpoints in the SR policy may be identifiers of the sites instead of the IP addresses of specific devices.

[0201] When a site includes multiple network devices, each network device in the same site sends an endpoint IP address of a connection established by the network device and an identifier of the site to the controller device. The site identifier reported by all network devices in the same site is the same. Optionally, the endpoint IP addresses of connections reported by different network devices in the same site are different. The controller device performs path calculation by regarding multiple network devices in the same site as one node.

[0202] Optionally, the controller device selects a connection from connections established by different network devices at the same site to perform the path computation. For example, a network includes a site 1 and a site 2, where the site 1 includes a network device a and a network device b, and the site 2 includes a network device c and a network device d. The controller device determines that the network includes four connections based on topology information reported by the network devices. The four connections are a connection from the network device a to the network device c, a connection from the network device a to the network device d, a connection from the network device b to the network device c, and a connection from the network device b to the network device d. The controller device selects a connection from the four connections based on a specified constraint to perform the orchestration. The constraint is, for example, an SLA requirement on the path. The SLA requirement includes, but is not limited to, requirements such as delay is less than a specified duration, packet loss rate is less than a specified packet loss rate, jitter is less than a specified value, bandwidth utilization is greater than a specified bandwidth utilization, etc.

[0203] In a possible implementation, the user equipment obtains a path calculation intention set by a user, and the user equipment sends the path calculation intention to a controller device. The controller device receives the path calculation intention sent by the user equipment. The controller device performs path calculation based on the path calculation intention set by the user. The path calculation intention includes a source site, a destination site, and a constraint. The controller device selects multiple TVCs from a TVC topology database that satisfy the path calculation intention, and generates an SR path by using the selected multiple TVCs.

[0204] FIG. 7 is a schematic diagram of SR path calculation in an overlay network. As shown in FIG. 7, the headquarters site includes edge2-1 and edge2-2. The branch site includes edge1. The aggregation site includes edge3. A TVC is established between TNP 1 of edge1 and TNP 21 of edge2-1. The SID corresponding to the TVC between edge1 and edge2-1 is SID 1021. A TVC is established between TNP 1 of edge1 and TNP 3 of edge3. The SID corresponding to the TVC between edge1 and edge3 is SID 103. A TVC is established between TNP 3 of edge3 and TNP 22 of edge2-2. The SID corresponding to the TVC between edge3 and edge2-2 is SID 3022. Edge2-1, edge2-2, edge1, and edge3 report the topology information of the TVC to the controller device separately. The controller device performs policy orchestration based on the topology information of the TVC. Specifically, in the path computation intention, the source site is a branch site, the destination site is a headquarters site, and the constraint is that the delay is less than a specified duration or the packet loss rate is less than a specified packet loss rate. The controller device calculates an SR path from the branch site to the headquarters site based on the topology information of the TVC and the path computation intention to obtain two SR paths. The two SR paths calculated by the controller device are SR path (1) and SR path (2). SR path (1) includes a TVC from edge1 to edge2-1. SR path (1) satisfies the constraint that the delay is less than a specified duration. SR path (2) includes a TVC from edge1 to edge3 and a TVC from edge3 to edge2-2. SR path (2) satisfies the constraint that the packet loss rate is less than a specified packet loss rate. The controller device generates SR policy 1 and SR policy 2 based on the path computation result. SR policy 1 includes a segment list of SR path (1). SR policy 2 includes a segment list of SR route (2). The specific contents of SR policy 1 are shown in Table 4, and the specific contents of SR policy 2 are shown in Table 5.

[0205] [Table 4]

[0206] [Table 5]

[0207] Optionally, after the network device sends the status of the connection to the controller device, the network device further detects the status of the connection. If the status of the connection at the network device is updated, the network device sends the updated status of the connection to the controller device. The controller device updates the topology data stored in the topology database based on the updated status of the connection reported by the network device, and recalculates the SR policy based on the updated topology data. The update of the status of the connection includes, but is not limited to, updating the connection status of the connection from an up status to a down status, updating the connection status of the connection from a down status to an up status, and changing the SLA information of the connection (e.g., decreasing the SLA or increasing the SLA).

[0208] For example, the network device performs connection status detection for each TVC established by the network device. If the status of the TVC is updated from up status to down status due to a physical network link failure, the network device sends a BGP-LS packet to the controller device. The BGP-LS packet indicates that the TVC is in down status. After the controller device receives the BGP-LS packet, the controller device updates the status of the TVC in the topology database to down status, and disables the SR route including the TVC, or discontinues the SR route including the TVC, or recalculates a new SR route.

[0209] In the traditional SD-WAN solution, there is no end-to-end path status awareness. If a TVC is broken or the quality of the TVC is degraded, network devices other than the two network devices of the TVC cannot detect the failure or quality degradation of the TVC. As a result, traffic is dropped during forwarding. However, in this embodiment, the network device performs connection status detection or SLA detection for each TVC established by the network device, and reports the status of the TVC to the controller device after the status of the TVC is updated, so that the controller device can timely recognize the status of each TVC in the SR path, thereby implementing end-to-end path status awareness. If a TVC in the SR path is broken or the quality of the TVC is degraded, the controller device can disable the SR path, discontinue the SR path, or import the traffic to another SR path by recalculating the SR path to prevent traffic from being dropped during forwarding.

[0210] Step S704: The controller device sends the SR policy to the network device a.

[0211] The controller device generates an SR policy based on the determined SR path. The SR policy indicates the SR path. The SR policy includes a color, an endpoint, one or more candidate paths, a preference, and a segment list. The segment list in the SR policy includes one or more SIDs. Each SID indicates one connection. For example, the SR policy includes SID ab corresponding to connection ab and SID bc corresponding to connection bc. In some embodiments, the SR policy is applied to an SD-WAN, and the segment list in the SR policy indicates a path in an overlay network in the SD-WAN, and the SR policy is also referred to as an SD-WAN policy. Optionally, the controller sends the SR policy based on a BGP SR policy.

[0212] In a possible implementation, the controller device sends an SR policy to network device a based on the fact that the head end in the SR path is network device a. After network device a receives the SR policy, network device a obtains a segment list from the SR policy, and the SR policy uses the segment list to perform the method shown in FIG.

[0213] In the following, an example is used to describe the above-mentioned embodiments with reference to a specific application scenario: In the following application scenario, the network devices are edge devices, and the connection between the network devices is a TVC.

[0214] The following describes the process of dynamically establishing TVCs and allocating SIDs.

[0215] Figure 8 is a schematic diagram of establishing a TVC. As shown in Figure 8, the TVC establishment process includes steps (1) to (4).

[0216] Step (1): All edge devices establish a BGP session with the RR. The edge devices transmit TNP routing information by using the BGP SD-WAN protocol. Dynamic TVCs are established between edge devices. As shown in Figure 8, edge1 at the branch site establishes a one-way tunnel table (TVC table, i.e., an entry related to a connection) from the branch site to the HQ site by pairing with local TNP 1 and TNP 2 at the HQ site. Edge1 establishes a TVC table by pairing with local TNP 1 and TNP 3 at the aggregation site. Similarly, the enterprise's HQ site establishes a TVC from the HQ site to the branch site and a TVC from the HQ site to the aggregation site separately. The aggregation site establishes a TVC from the aggregation site to the branch site and a TVC from the aggregation site to the HQ site. Each edge device stores the TVC locally to form a distributed TVC database.

[0217] Step (2): The edge device automatically deploys an SLA discovery protocol on the TVC. The edge device discovers the connection status of the TVC and the SLA status of the TVC (packet loss rate, delay, and jitter). The edge device periodically stores the connection status of the TVC and the SLA information of the TVC in the TVC database.

[0218] For example, the contents of the TVC database for edge1 are shown in Table 6.

[0219] [Table 6]

[0220] For example, the contents of the TVC database for edge2 are shown in Table 7.

[0221] [Table 7]

[0222] For example, the contents of the TVC database for edge3 are shown in Table 8.

[0223] [Table 8]

[0224] Step (3): The edge device dynamically assigns a unique SID across the network to each TVC by using BGP EVPN. Optionally, the SID has multiple formats, for example, MPLS-like label, SRv6 SID address format, or a label format obtained by concatenating the source site identifier+source TNP ID+destination site identifier+destination TNP ID. Optionally, the SID is assigned by the source node of the TVC. As shown in FIG. 8, edge1 in the branch site assigns SID 102 to the TVC from the branch site to the headquarters site, and edge1 assigns SID 103 to the TVC from the branch site to the aggregation site. Edge2 in the enterprise's headquarters site assigns SID 201 and SID 203 to the TVC from the headquarters site to the branch site and the TVC from the headquarters site to the aggregation site. Edge3 in the aggregation site assigns SID 301 and SID 302 to the TVC from the aggregation site to the branch site and the TVC from the aggregation site to the headquarters site.

[0225] Step (4): The edge device sets the SID type of each SID to the customized End.X-SD-WAN, and stores the correspondence between SIDs, SID types, and outbound interfaces in the local SID table.

[0226] For example, the contents of the local SID table for edge1 are shown in Table 9.

[0227] [Table 9]

[0228] For example, the contents of the local SID table for edge2 are shown in Table 10.

[0229] [Table 10]

[0230] For example, the contents of the local SID table for edge3 are shown in Table 11.

[0231] [Table 11]

[0232] The following describes the topology collection and reporting process for the above scenario.

[0233] 9 is a schematic diagram of topology collection and reporting according to an embodiment of the present application. The topology collection and reporting process includes the following steps (1) and (2).

[0234] Step (1): Deploy the BGP LS protocol between the edge device and the RR. The edge device performs protocol interoperation with the BGP EVPN by using the BGP LS protocol extension. The edge device collects TVC information from the BGP EVPN and reports the TVC information to the RR. The TVC information includes, but is not limited to, the basic encapsulation information of the TVC (e.g., IP address), SID, status, SLA, and bandwidth utilization.

[0235] Step (2): Also deploy a BGP LS protocol between the RR and the controller device. The RR reports TVC information to the controller device by using the BGP LS protocol extension. The controller device receives and stores the TVC information reported by the RR. The controller device creates a TVC topology database based on the TVC information reported by the RR, and calculates a global SR route by using the TVC topology database.

[0236] For example, the contents of the TVC topology database created by the controller device are shown in Table 12.

[0237] [Table 12]

[0238] In the following, we describe the SR policy distribution process in the above scenario.

[0239] FIG. 10 is a schematic diagram of the distribution of an SR policy by a controller device according to an embodiment. In FIG. 10, edge1 is the head end of an SR route, and edge1 is an example of network device a. As shown in FIG. 10, the controller device distributes the SR policy of the SD-WAN using a BGP SR policy. The content of the SR policy is maximally compatible with the original SRv6 policy. The process in which the controller device distributes the SR policy specifically includes the following steps (1) and (2).

[0240] Step (1): Deploy the BGP SR policy protocol between the controller device and the RR. The controller device distributes the SD-WAN SR policy to the RR by using the BGP SR policy protocol extension.

[0241] For example, the controller device distributes the two SR policies shown in Table 13 and Table 14.

[0242] [Table 13]

[0243] [Table 14]

[0244] Step (2): Deploy the BGP SR policy protocol between the RR and edge devices. The RR distributes the SD-WAN SR policy to the head-end edge devices by using the BGP SR policy protocol extension.

[0245] The following provides an exemplary description of the method illustrated in FIGS. 4 and 6 with reference to five specific instances.

[0246] Please refer to FIG. 11 for the network architecture of the following instance 1 to instance 5. The head-end edge1 of the following instance 1 to instance 5 is the network device a in the manner shown in FIG. 4 and FIG. 6, the intermediate node edge3 of the following instance 1 to instance 5 is the network device b in the manner shown in FIG. 4 and FIG. 6, and the tail-end edge2 of the following instance 1 to instance 5 is the network device c in the manner shown in FIG. 4 and FIG. 6. The TVC 1-3 of the following instance 1 to instance 5 is the connection ab in the manner shown in FIG. 4 and FIG. 6, and the TVC 3-2 of the following instance 1 to instance 5 is the connection bc in the manner shown in FIG. 4 and FIG. 6. The SID 302 of the following instance 1 to instance 5 is the SID bc in the manner shown in FIG. 4 and FIG. 6, and the SID 103 of the following instance 1 to instance 5 is the SID ab in the manner shown in FIG. 4 and FIG. 6. IP 1 and IP 3 of Instance 1 to Instance 5 below are the endpoint IP addresses of connection ab in the manner shown in Figures 4 and 6. IP 3 and IP 2 of Instance 1 to Instance 5 below are the endpoint IP addresses of connection bc in the manner shown in Figures 4 and 6.

[0247] Instance 1 Instance 1 uses EVPNv4 as an example to describe the forwarding procedure of building an SD-WAN SRv6 tunnel to an IPv6 transport network for traffic. Figure 12 is a schematic diagram of importing a service into an SD-WAN SRv6 tunnel and forwarding the service in instance 1. As shown in Figure 12, instance 1 includes the following steps (1) to (5).

[0248] Step (1): The tail end edge2 advertises the private network route of the local user by using BGP EVPN. The RR receives the EVPN private network route advertised by the tail end edge2. The RR reflects the EVPN private network route to the head end edge1. The EVPN private network route includes information such as a route prefix, a VPN SID, a color, and a next hop. For example, the route prefix in the EVPN private network route is 10.1.1.0 / 24. For example, the VPN SID in the EVPN private network route is 10000. For example, the color of the EVPN private network route is 20. For example, the next hop of the EVPN private network route is the site identifier of the headquarters site.

[0249] Step (2): The controller device pre-distributes different SD-WAN SRv6 policies to the head-end edge1. The head-end edge1 learns the EVPN private network route advertised by the tail-end edge2 through step (1) from the RR. The head-end edge1 obtains the SR policy named "low packet loss rate from branch to headquarters" through iterations based on the color and next hop carried in the EVPN private network route.

[0250] Step (3): When the head-end edge1 receives traffic from user A (user A's IPv4 address is 10.2.1.1) to user Z (user Z's IPv4 address is 10.1.1.1) at the headquarters site, the head-end edge1 queries a private network route based on the destination address of the data packet in the traffic; Determine that the traffic needs to be imported into an SD-WAN SR tunnel for forwarding. Head-end edge1 gets the segment list <103,302> and VPN SID 10000 from the SR policy. Head-end edge1 adds an SRH label stack (10000, 302, 103) to the data packet, and head-end edge1 performs matching against its local SID table based on the top SID 103. Head-end edge1 finds that the endpoint behavior corresponding to SID 103 in the local SID table is End.X-SD-WAN, and the outbound interface corresponding to SID 103 is TVC 1-3. Therefore, head-end edge1 gets the information about TVC 1-3 and adds an SR tunnel encapsulation layer (i.e., outer layer IPv6 header and SRH) to the data packet based on the information about TVC 1-3.

[0251] The information about TVC 1-3 includes an interface IP address (IP 1) corresponding to source TNP 1 of TVC 1-3 and an interface IP address (IP 3) of destination TNP 3 of TVC 1-3. In the outer layer IPv6 header, the source address is IP 1 and the destination address is IP 3. Then, the head end edge1 allows SID 103 to pop up. The packet obtained after SID 103 pops up carries the SRH label stack (10000, 302). The head end edge1 sends the packet to the intermediate node edge3 via the link corresponding to TNP 1.

[0252] In some embodiments, the information about TVC 1-3 of head-end edge1 comes from the TNP route advertised by intermediate node edge3. Specifically, intermediate node edge3 pre-advertises the TNP route, and the TNP route includes the IP address of TNP 3 (IP 3). Head-end edge1 receives the TNP route advertised by intermediate node edge3 and obtains the IP address of TNP 3 from the TNP route. Head-end edge1 stores the correspondence between the identifiers of TVC 1-3, the IP address of TNP 1, and the IP address of TNP 3 in the TVC table. For example, head-end edge1 creates an entry in the TVC table, and the contents of the entry include ID: TVC 1-3; destination site: aggregation site; source TNP IP address: IP 1; and destination TNP IP address: IP 3. Based on TVC 1-3, the headend edge1 queries the IP addresses of the source TNPs and the IP addresses of the destination TNPs corresponding to TVC 1-3, and obtains IP 1 and IP 3.

[0253] Step (4): After the intermediate node edge3 receives the packet sent by the head-end edge1, the intermediate node edge3 obtains the top SID (i.e., SID 302) indicated by the SL field from the SRH header. The intermediate node edge3 performs a query in a local SID table based on SID 302, and finds that the endpoint behavior corresponding to SID 302 in the local SID table is End.X-SD-WAN, and the outgoing tunnel corresponding to SID 302 is TVC 3-2. The intermediate node edge3 modifies both the source IP address and the destination IP address of the packet based on the encapsulation information of TVC 3-2. The intermediate node edge3 forwards the modified packet to the tail-end edge2 via the physical link corresponding to TVC 3-2.

[0254] Step (5): The tail end edge2 receives the packet sent by the intermediate node edge3. The tail end edge2 searches the local SID table based on the remaining VPN SID 10000 of the SRH in the packet and determines that the VPN SID 10000 matches the End.DT4 SID. The tail end edge2 performs an SR tunnel decapsulation process on the packet, removing the SRH and the outer layer IPv6 packet header from the packet. The tail end edge2 searches for the private network route of the corresponding VPN instance based on the destination IP address (10.1.1.1) of the inner layer packet, and sends the route to host Z. In this way, control over the end-to-end SR forwarding path of A → edge1 → edge3 → edge2 → Z is implemented.

[0255] Instance 1 describes how to build an SD-WAN SRv6 tunnel in an IPv6 underlay transport network. If the underlay transport network is an IPv4 network, the tunnel encapsulation needs to be further improved to implement SD-WAN SRv4 tunneling technology. SD-WAN SRv4 tunnel encapsulation includes multiple types (GRE / VXLAN, etc.). The following uses GRE as an example to describe the method for importing services into an SD-WAN SRv4 tunnel and forwarding services. For details, see Instance 2.

[0256] Instance 2 Instance 2 is a method for importing services into an SD-WAN SRv4 tunnel based on GRE and forwarding services provided in an embodiment of the present application. Figure 13 is a flowchart of Instance 2. As shown in Figure 13, Instance 2 includes steps (1) to (5).

[0257] For step (1) and step (2) of instance 2, refer to step (1) and step (2) of instance 1. The difference is that when the edge device generates the TVC, the edge device defines the TVC encapsulation type as SRv4-GRE based on the fact that the TNP type is IPv4 GRE. In addition, if the TNP type is IPv4 VXLAN, the edge device defines the TVC encapsulation type as SRv4-VXLAN.

[0258] Step (3): When the head-end edge1 receives the traffic sent by user A (10.2.1.1) to user Z (10.1.1.1) at the headquarters site, the head-end edge1 performs matching against its local SID table based on the top SID 103, and finds that the outbound interface corresponding to SID 103 is TVC 1-3. The head-end edge1 adds a GRE header and an SRH to the data packet based on the fact that the TVC encapsulation type corresponding to TVC 1-3 is SRv4-GRE, and sends the packet with the GRE header and the SRH encapsulated to the intermediate node edge3 via the interface corresponding to TVC 1-3.

[0259] Step (4): After the intermediate node edge3 receives the packet, the intermediate node edge3 decapsulates the SRv4-GRE tunnel header. The intermediate node edge3 identifies the SRH header based on the payload protocol field of GRE, and then the intermediate node edge3 obtains the top-level SID 302 indicated by the SL field from the SRH. The intermediate node edge3 performs a query in the local SID table based on the SID 302, and finds that the endpoint behavior corresponding to the SID 302 is End.X-SD-WAN, and the designated outgoing tunnel is TVC 3-2. The intermediate node edge3 encapsulates the SRv4-GRE tunnel header into the packet based on the encapsulation information of TVC 3-2.

[0260] Step (5): After the tail end edge2 receives the packet, the tail end edge2 decapsulates the SRv4-GRE tunnel header, searches the local SID table based on the remaining VPN SID of the SRH, and obtains the End.DT4 SID by matching. The tail end edge2 removes the SRH and GRE packet header. The tail end edge2 searches for the private network route of the corresponding VPN instance based on the IP address (10.1.1.1) of the inner layer packet, and sends the route to host Z. In this way, the control over the end-to-end SR forwarding path of A → edge1 → edge3 → edge2 → Z is implemented.

[0261] When the SD-WAN underlay transport network includes multiple different regional networks that support IPv4 or IPv6 separately, the end-to-end heterogeneous SD-WAN overlay SR tunnel can be implemented in combination by using the methods described in Instance 1 and Instance 2. In the following, we provide a detailed explanation by using Instance 3.

[0262] Instance 3 Instance 3 is an SD-WAN SRv6 and SRv4 hybrid tunnel forwarding method provided in the embodiment.

[0263] 14 is a flowchart of Instance 3. Instance 3 includes steps (1) to (5). For steps (1) to (5) of Instance 3, please refer to steps (1) to (5) of Instance 1 and Instance 2. The difference is that in step (3) of Instance 3, the intermediate node edge3 performs conversion between the SRv6 tunnel encapsulation format and the SRv4 tunnel encapsulation format in the following implementation form (1) or implementation form (2).

[0264] Implementation form (1): The intermediate node edge3 performs a conversion from the SRv6 tunnel encapsulation format to the SRv4 tunnel encapsulation format. Specifically, the intermediate node edge3 receives a packet sent by edge1, the intermediate node edge3 decapsulates the SRv6 tunnel header, and the intermediate node edge3 obtains the top SID (SID 302) indicated by the SL field from the SRH. The intermediate node edge3 performs a query in the local SID table based on the SID 302, and finds that the endpoint behavior corresponding to the SID 302 is End.X-SD-WAN, and the outgoing tunnel corresponding to the SID 302 is TVC 3-2. The intermediate node edge3 encapsulates the SRv4-GRE tunnel header based on the encapsulation information of TVC 3-2.

[0265] Implementation form (2): The intermediate node edge3 performs a conversion from the SRv4 tunnel encapsulation format to the SRv6 tunnel encapsulation format. Specifically, when the intermediate node edge3 receives a packet sent by edge2, the intermediate node edge3 decapsulates the SRv4-GRE tunnel header, and the intermediate node edge3 obtains the top SID (SID 301) indicated by the SL field from the SRH. The intermediate node edge3 performs a query in the local SID table based on the SID 301, and finds that the endpoint behavior corresponding to the SID 301 is End.X-SD-WAN, and the outgoing tunnel corresponding to the SID 301 is TVC 3-1. The intermediate node edge3 encapsulates the SRv6 tunnel header based on the encapsulation information of TVC 3-1.

[0266] Instance 1 to Instance 3 describe how Layer 3 (L3) VPNv4 traffic is carried over an SD-WAN SR tunnel. In an embodiment of the present application, VPN services other than L3 VPNv4, such as L3 VPNv6 or Layer 2 VNP (L2 VPN), can be further carried over an SD-WAN SR tunnel. In the following, Instance 4 is used to describe an implementation in which L3 VPNv6 traffic is carried over an SD-WAN SR tunnel, and Instance 5 is used to describe an implementation in which L2 VPN traffic is carried over an SD-WAN SR tunnel.

[0267] Instance 4 Instance 4 is a method for forwarding L3 VPNv6 traffic by using an SD-WAN SR tunnel provided in an embodiment of the present application. FIG. 15 is a schematic diagram of instance 4. As shown in FIG. 15, in the procedure of route advertisement in the control plane, the route of the IPv6 user's private network is sent by using BGP EVPN based on instance 1. The SD-WAN SR tunnel is selected by iteration by using the color and next hop in the IPv6 user's private network route. In this way, the IPv6 L3 VPN traffic can be carried and forwarded on the SD-WAN SR tunnel. Specifically, as shown in FIG. 15, in step (1), the EVPN private network route advertised by edge2 is an IPv6 route. The prefix carried in the EVPN private network route is an IPv6 prefix, for example, FC00:1:1:: / 64. Regarding the procedure of packet forwarding in the forwarding plane, the packet encapsulation format of the L3 VPNv6 scenario is mainly different from that of the L3 VPNv4 scenario in that the IP header of the inner-layer data packet is an IPv6 header. Specifically, as shown in Fig. 15, the data packet sent by user A to edge1 is an IPv6 packet. The IP header in the data packet sent by user A is an IPv6 header. The source address carried in the IP header in the data packet sent by user A is the IPv6 address of user A, e.g., FC00:2:1::1. The destination address carried in the IP header in the data packet sent by user A is the IPv6 address of user Z, e.g., FC00:1:1::1.

[0268] Instance 5 Instance 5 is a method for forwarding L2 VPN traffic by using an SD-WAN SR tunnel provided in an embodiment of the present application. Figure 16 is a schematic diagram of Instance 5.

[0269] As shown in FIG. 16, based on instance 1, in step (1), by using BGP EVPN, an Ethernet auto-discovery (Ethernet AD) route, a MAC route advertisement route, an inclusive multicast route, an Ethernet segment (ES) route, etc., and an SD-WAN SR tunnel are selected by iteration using color and next hop. In this way, L2 VPN traffic can be carried and forwarded on the SD-WAN SR tunnel. Specifically, as shown in FIG. 16, in step (1), the EVPN private network route advertised by edge2 is an EVPN MAC route. The prefix carried in the EVPN private network route advertised by edge2 includes a MAC address, e.g., the MAC address (MAC 2) of user Z. Regarding the procedure of packet forwarding in the forwarding plane, the packet encapsulation format of the L2 VPN scenario is mainly different from the packet encapsulation format of the L3 VPN scenario in that the inner-layer data packet includes an Ethernet header, and the inner-layer data packet and the Ethernet header are encapsulated in the tunnel as a whole.

[0270] By summarizing the above embodiments, it can be learned that the beneficial effects brought about by the embodiments of the present application include, but are not limited to, the following (1) to (3).

[0271] (1) In the SR tunneling technology provided in the embodiment, only the underlay network needs to provide WAN link IP route reachability, and the underlay network devices do not need to run an IGP protocol supporting SR-MPLS or an IGP protocol supporting SRv6. The underlay network is separated from the overlay network, and the deployment of the protocol is simple, which can be adapted to various types of transport networks. For example, the overlay SR tunnel can be established in an IP public network, such as the Internet.

[0272] (2) In the existing SRv6 tunneling technology, the source IP address in the outer layer IP header is specified by the head-end device, and the source IP address does not change during forwarding by the intermediate network. If the tunnel needs to cross an underlay transport network in a different routing domain, the packet may be discarded because the URPF check fails. Figure 17 is a schematic diagram of forwarding an SR packet across multiple domains in an SD-WAN network. As shown in Figure 17, the intermediate node edge3 is connected to edge1 via transport network 1 and to edge2 via transport network 2. The intermediate node edge3 receives a packet sent by edge1, and the source IP address of the packet is IP1 (the IP address of TNP 1 of edge1). If the intermediate node edge3 keeps the source IP address of the packet unchanged, in other words, if the source IP address of the packet sent by the intermediate node edge3 to edge2 is still IP 1, when the packet reaches the transport network 2 between edge3 and edge2, the URPF check of the packet will fail because the network device in the transport network 2 cannot find a route for IP 1, and therefore the network device in the transport network 2 will discard the packet. However, in the embodiment, the intermediate node re-changes the source IP address of the SR tunnel packet based on the information about each TVC, so the problem of the cross-domain tunnel URPF check is solved. For example, as shown in FIG. 17, the source IP address of the packet received by the intermediate node edge3 is IP 1, and the source IP address of the packet sent by the intermediate node edge3 is updated to IP 4 (the address of TNP 4 of the intermediate node edge3).

[0273] (3) In the existing SRv6 tunneling technology, tunnels can be established only in transport networks that support IPv6 route forwarding. However, the SD-WAN SR tunnel in the embodiment is independent of the underlay transport network protocol, and therefore both the case where the underlay network is an IPv6 network and the case where the underlay network is an IPv4 network can be supported, and even end-to-end SR tunnels can be established across IPv4 and IPv6 heterogeneous transport networks.

[0274] In conclusion, in the SD-WAN SR tunneling method provided in the embodiment, only the relevant SD-WAN edge device needs to support the required protocols such as BGP EVPN, BGP LS, and BGP SR protocols, the underlay network is regarded as a black box IP transport network as a whole, and the devices in the underlay network do not need to run additional IGPs for SR extension protocols, such as OSPFv3 / ISISv6, to establish SR. Therefore, the method provided in the embodiment may be referred to as an underlay transport network protocol independent overlay SR method.

[0275] 18 is a schematic diagram of the structure of a network device 610 according to an embodiment of the present application. The network device 610 includes a receiving unit 611, a processing unit 612, and a sending unit 613.

[0276] Optionally, with reference to the application scenario shown in FIG. 1, the network device 610 shown in FIG. 18 is the network device 202 or the network device 204 in FIG.

[0277] Optionally, with reference to the application scenario shown in FIG. 2, the network device 610 shown in FIG. 18 is the edge device 406 in FIG.

[0278] Optionally, referring to the application scenario shown in FIG. 3, the network device 610 shown in FIG. 18 is the POP GW 502 in FIG.

[0279] Optionally, referring to Fig. 4, the network device 610 shown in Fig. 18 is the network device b in the method procedure shown in Fig. 4. The receiving unit 611 is configured to support the network device 610 in executing S602. The processing unit 612 is configured to support the network device 610 in executing S603. The sending unit 613 is configured to support the network device 610 in executing S604.

[0280] Optionally, referring to FIG. 7, the network device 610 shown in FIG. 18 is edge3 in FIG.

[0281] Optionally, referring to FIG. 8, the network device 610 shown in FIG. 18 is edge3 in FIG.

[0282] Optionally, referring to FIG. 9, the network device 610 shown in FIG. 18 is edge3 in FIG.

[0283] Optionally, referring to FIG. 10, the network device 610 shown in FIG. 18 is edge3 in FIG.

[0284] Optionally, referring to FIG. 11, the network device 610 shown in FIG. 18 is edge3 in FIG.

[0285] Optionally, referring to FIG. 12, the network device 610 shown in FIG. 18 is edge3 in FIG.

[0286] Optionally, referring to FIG. 13, the network device 610 shown in FIG. 18 is edge3 in FIG.

[0287] Optionally, referring to FIG. 14, the network device 610 shown in FIG. 18 is edge3 in FIG.

[0288] Optionally, referring to FIG. 15, the network device 610 shown in FIG. 18 is edge3 in FIG.

[0289] Optionally, referring to FIG. 16, the network device 610 shown in FIG. 18 is edge3 in FIG.

[0290] The device embodiment described in FIG. 18 is merely an example. For example, the division of units is merely a logical division of functions, and may be divided in other ways in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not implemented. The functional units of the embodiments of the present application may be integrated into one processing unit, and each unit may exist physically alone, or two or more units may be integrated into one unit.

[0291] All or some of the units in the network device 610 are implemented by using software, hardware, firmware, or any combination thereof.

[0292] If software is used for the implementation, the processing unit 612 is implemented by a software functional unit generated, for example, by at least one processor 801 of FIG. 20 by reading program code stored in memory 802. In another example, the processing unit 612 is implemented by a software functional unit generated by a central processing unit 911 on a main control board 910 of FIG. 21 by reading program code stored in memory 912.

[0293] When hardware is used for the implementation, for example, the aforementioned units in FIG. 18 are separately implemented by different hardware in the network device. For example, the processing unit 612 is implemented by some processing resources (for example, one core or two cores in a multi-core processor) in at least one processor 801 in FIG. 20. Alternatively, the processing unit 612 is implemented by a programmable device such as a field-programmable gate array (FPGA) or a coprocessor. For example, the receiving unit 611 and the transmitting unit 613 are implemented by the network interface 803 in FIG. 20. In another example, the receiving unit 611 and the transmitting unit 613 are implemented by the physical interface card 933 in FIG. 21.

[0294] 19 is a schematic diagram of the structure of a controller device 710 according to an embodiment of the present application. The controller device 710 includes: an acquiring unit 711, a processing unit 712, and a sending unit 713.

[0295] Optionally, with reference to the application scenario shown in FIG. 1, the controller device 710 shown in FIG. 19 is the controller device 11 in FIG.

[0296] Optionally, with reference to the application scenario shown in FIG. 2, the controller device 710 shown in FIG. 19 is the SD-WAN controller 490 in FIG. 2.

[0297] Optionally, with reference to the application scenario shown in FIG. 3, the controller device 710 shown in FIG. 19 is the SD-WAN controller 590 in FIG. 3.

[0298] Optionally, referring to Fig. 6, the controller device 710 shown in Fig. 19 is the controller device in the method procedure shown in Fig. 6. The obtaining unit 711 is configured to support the controller device 710 in performing S702. The processing unit 712 is configured to support the controller device 710 in performing S703. The sending unit 713 is configured to support the controller device 710 in performing S704.

[0299] Optionally, referring to FIG. 7, the controller device 710 shown in FIG. 19 is the SD-WAN controller of FIG. 7.

[0300] Optionally, referring to FIG. 9, the controller device 710 shown in FIG. 19 is the SD-WAN controller of FIG. 9.

[0301] Optionally, referring to FIG. 10, the controller device 710 shown in FIG. 19 is the SD-WAN controller of FIG. 10.

[0302] Optionally, referring to FIG. 11, the controller device 710 shown in FIG. 19 is the SD-WAN controller of FIG. 11.

[0303] The embodiment of the device described in FIG. 19 is merely an example. For example, the division of the units is merely a logical division of functions, and may be divided in other ways in an actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. The functional units of the embodiments of the present application may be integrated into one processing unit, and each unit may exist physically alone, or two or more units may be integrated into one unit.

[0304] All or some of the units in the controller device 710 are implemented by software, hardware, firmware, or any combination thereof.

[0305] If software is used for the implementation, the processing unit 712 is implemented by, for example, a software functional unit generated by at least one processor 801 of FIG. 20 by reading program code stored in memory 802.

[0306] When hardware is used for the implementation, for example, the aforementioned units in FIG. 19 are implemented separately by different hardware in the controller device. For example, the processing unit 712 is implemented by some processing resources (for example, one core or two cores in a multi-core processor) in at least one processor 801 in FIG. 20. Alternatively, the processing unit 712 is implemented by a programmable device such as a field-programmable gate array (FPGA) or a coprocessor. For example, the acquisition unit 711 and the transmission unit 713 are implemented by the network interface 803 in FIG. 20. In another example, the acquisition unit 711 and the transmission unit 713 are implemented by the physical interface card 933 in FIG. 21.

[0307] In the following, the basic hardware structures of a network device and a controller device are described by using an example.

[0308] 20 is a schematic diagram of a structure of a device 800 according to an embodiment of the present application. The device 800 shown in FIG. 20 can be provided as a network device or a controller device. The device 800 includes at least one processor 801, a memory 802, and at least one network interface 803.

[0309] Optionally, referring to the application scenario shown in FIG. 1, the device 800 shown in FIG. 20 is the network device 202, the network device 204, or the controller device 11 in FIG.

[0310] Optionally, with reference to the application scenario shown in FIG. 2, the device 800 shown in FIG. 20 is the edge device 406 or the SD-WAN controller 490 in FIG. 2.

[0311] Optionally, referring to the application scenario shown in FIG. 3, the device 800 shown in FIG. 20 is the POP GW 502 or the SD-WAN controller 590 in FIG. 3.

[0312] Optionally, referring to Fig. 4, the device 800 shown in Fig. 20 is the network device b in the method procedure shown in Fig. 4. The network interface 803 is configured to support the device 800 in executing S602 and S604. The processor 801 is configured to support the device 800 in executing S603.

[0313] Optionally, referring to Fig. 6, the device 800 shown in Fig. 20 is an SD-WAN controller in the method procedure shown in Fig. 6. The network interface 803 is configured to support the device 800 in executing S702 and S704. The processor 801 is configured to support the device 800 in executing S703.

[0314] Optionally, referring to FIG. 7, the device 800 shown in FIG. 20 is the edge3 or SD-WAN controller of FIG. 7.

[0315] Optionally, referring to FIG. 8, the device 800 shown in FIG. 20 is edge3 in FIG.

[0316] Optionally, referring to FIG. 9, the device 800 shown in FIG. 20 is the edge3 or SD-WAN controller of FIG. 9.

[0317] Optionally, referring to FIG. 10, the device 800 shown in FIG. 20 is the edge3 or SD-WAN controller of FIG. 10.

[0318] Optionally, referring to FIG. 11, the device 800 shown in FIG. 20 is the edge3 or SD-WAN controller of FIG. 11.

[0319] Optionally, with reference to FIG. 12, the device 800 shown in FIG. 20 is edge3 in FIG.

[0320] Optionally, with reference to FIG. 13, the device 800 shown in FIG. 20 is edge3 in FIG.

[0321] Optionally, with reference to FIG. 14, the device 800 shown in FIG. 20 is edge3 in FIG.

[0322] Optionally, referring to FIG. 15, the device 800 shown in FIG. 20 is edge3 in FIG.

[0323] Optionally, with reference to FIG. 16, the device 800 shown in FIG. 20 is edge3 in FIG.

[0324] The processor 801 may be, for example, a general-purpose central processing unit (CPU), a network processor (NP), a graphics processing unit (GPU), a neural-network processing unit (NPU), a data processing unit (DPU), a microprocessor, or one or more integrated circuits configured to implement the solutions in this application. For example, the processor 801 may include an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or a combination thereof.

[0325] The memory 802 may be, for example, a read-only memory (ROM) or another type of static storage device capable of storing static information and instructions, or a random access memory (RAM) or another type of dynamic storage device capable of storing information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other compact disc storage, an optical disc storage (including compressed optical discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), a magnetic disc storage medium or another magnetic storage device, or any other medium capable of carrying or storing the expected program code in the form of instructions or data structures and accessible by a computer. This is not limited thereto. Optionally, the memory 802 exists independently and is connected to the processor 801 through an internal connection 804. Alternatively, optionally, the memory 802 and the processor 801 are integrated together.

[0326] The network interface 803 is any device, such as a transceiver, configured to communicate with another device or a communication network. The network interface 803 includes, for example, at least one of a wired network interface and a wireless network interface. The wired network interface is, for example, an Ethernet interface. The Ethernet interface is, for example, an optical interface, an electrical interface, or a combination thereof. The wireless network interface is, for example, a wireless local area networks (WLAN) interface, a cellular network interface, or a combination thereof.

[0327] In some embodiments, the processor 801 includes one or more CPUs, such as CPU 0 and CPU 1 shown in FIG.

[0328] In some embodiments, device 800 optionally includes multiple processors, such as processor 801 and processor 805 shown in FIG. 20. Each of these processors is, for example, a single-core processor (single-CPU), or a multi-core processor (multi-CPU). Optionally, a processor herein is one or more devices, circuits, and / or processing cores configured to process data (e.g., computer program instructions).

[0329] In some embodiments, the device 800 further includes an internal connection 804. The processor 801, the memory 802, and the at least one network interface 803 are connected through the internal connection 804. The internal connection 804 includes a path for transmitting information between the aforementioned components. Optionally, the internal connection 804 is a board or a bus. Optionally, the internal connection 804 is classified as an address bus, a data bus, a control bus, or the like.

[0330] In some embodiments, the device 800 further includes an input / output interface 806. The input / output interface 806 is connected to the internal connection 804.

[0331] Optionally, the processor 801 implements the method of the foregoing embodiment by reading the program code 810 stored in the memory 802, or the processor 801 implements the method of the foregoing embodiment by using the program code stored therein. When the processor 801 implements the method of the foregoing embodiment by reading the program code 810 stored in the memory 802, the memory 802 stores the program code for implementing the method provided in the embodiment of the present application.

[0332] For more details about implementing the above functions by the processor 801, please refer to the description of the above method embodiment, and the details will not be repeated here.

[0333] 21 is a schematic diagram of the structure of a device 900 according to an embodiment of the present application. The device 900 shown in FIG. 21 can be provided as a network device or a controller device. The device 900 includes a main control board 910 and an interface board 930.

[0334] Optionally, with reference to the application scenario shown in FIG. 1, the device 900 shown in FIG. 21 is the network device 202, the network device 204, or the controller device 11 in FIG.

[0335] Optionally, with reference to the application scenario shown in FIG. 2, the device 900 shown in FIG. 21 is the edge device 406 or the SD-WAN controller 490 in FIG. 2.

[0336] Optionally, referring to the application scenario shown in FIG. 3, the device 900 shown in FIG. 21 is the POP GW 502 or the SD-WAN controller 590 in FIG. 3.

[0337] Optionally, referring to Fig. 4, the device 900 shown in Fig. 21 is the network device b in the method procedure shown in Fig. 4. The physical interface card 933 on the interface board 930 is configured to support the device 800 in executing S602 and S604. The network processor 932 on the interface board 930 and the central processing unit 911 on the main control board 910 are configured to support the device 800 in executing S603.

[0338] Optionally, referring to Fig. 6, the device 900 shown in Fig. 21 is an SD-WAN controller in the method procedure shown in Fig. 6. The physical interface card 933 on the interface board 930 is configured to support the device 800 in executing S702 and S704. The central processing unit 911 on the main control board 910 is configured to support the device 800 in executing S703.

[0339] Optionally, referring to FIG. 7, the device 900 shown in FIG. 21 is the edge3 or SD-WAN controller of FIG. 7.

[0340] Optionally, referring to FIG. 8, the device 900 shown in FIG. 21 is edge3 in FIG.

[0341] Optionally, referring to FIG. 9, the device 900 shown in FIG. 21 is the edge3 or SD-WAN controller of FIG. 9.

[0342] Optionally, referring to FIG. 10, the device 900 shown in FIG. 21 is the edge3 or SD-WAN controller of FIG. 10.

[0343] Optionally, referring to FIG. 11, the device 900 shown in FIG. 21 is the edge3 or SD-WAN controller of FIG. 11.

[0344] Optionally, with reference to FIG. 12, the device 900 shown in FIG. 21 is edge3 in FIG.

[0345] Optionally, with reference to FIG. 13, the device 900 shown in FIG. 21 is edge3 in FIG.

[0346] Optionally, with reference to FIG. 14, the device 900 shown in FIG. 21 is edge3 in FIG.

[0347] Optionally, referring to FIG. 15, the device 900 shown in FIG. 21 is edge3 in FIG.

[0348] Optionally, with reference to FIG. 16, the device 900 shown in FIG. 21 is edge3 in FIG.

[0349] The main control board is also called a main processing unit (MPU) or a route processor card. The main control board 910 is configured to control and manage the components in the device 900, including the functions of route calculation, device management, device maintenance, and protocol processing. The main control board 910 includes a central processing unit 911 and a memory 912.

[0350] The interface board 930 is also called a line processing unit (LPU), a line card, or a service board. The interface board 930 is configured to provide various service interfaces and implement data packet forwarding. The service interfaces include, but are not limited to, an Ethernet interface, a packet over SONET / SDH (POS) interface, and the like. The Ethernet interface is, for example, a flexible Ethernet service interface (flexible ethernet clients, FlexE clients). The interface board 930 includes a central processing unit 931, a network processor 932, a forwarding entry memory 934, and a physical interface card (PIC) 933.

[0351] A central processing unit 931 on the interface board 930 is configured to control and manage the interface board 930 and to communicate with the central processing unit 911 on the main control board 910 .

[0352] The network processor 932 is configured to implement packet forwarding processing. The form of the network processor 932 is, for example, a forwarding chip. Specifically, the network processor 932 is configured to forward the received packet based on the forwarding table stored in the forwarding entry memory 934, and if the destination address of the packet is the address of the device 900, send the packet for processing by the CPU (e.g., the central processing unit 911), or if the destination address of the packet is not the address of the device 900, find the outbound interface corresponding to the next hop and the destination address in the forwarding table based on the destination address, and forward the packet to the outbound interface corresponding to the destination address. Processing the upstream packet includes processing the inbound interface of the packet and searching the forwarding table. Processing the downstream packet is searching the forwarding table, etc.

[0353] The physical interface card 933 is configured to implement a physical layer interconnect function, so that original traffic enters the interface board 930 through the physical interface card 933, and processed packets are sent out from the physical interface card 933. The physical interface card 933, also called a sub card, may be installed on the interface board 930, and is responsible for converting optical / electrical signals into packets, performing validity checks on the packets, and forwarding the packets to the network processor 932 for processing. In some embodiments, the central processing unit may alternatively perform the functions of the network processor 932, for example, implementing software forwarding based on a general-purpose CPU, and therefore the network processor 932 is not required in the physical interface card 933.

[0354] Optionally, the device 900 includes multiple interface boards. For example, the device 900 further includes an interface board 940, which includes a central processing unit 941, a network processor 942, a forwarding entry memory 944, and a physical interface card 943.

[0355] Optionally, the device 900 further includes a switching board 920. The switching board 920 is, for example, called a switch fabric unit (SFU). When the network device has multiple interface boards 930, the switching board 920 is configured to complete data exchange between the interface boards. For example, the interface board 930 and the interface board 940 communicate with each other through, for example, the switching board 920.

[0356] The main control board 910 and the interface board 930 are coupled together. For example, the main control board 910, the interface board 930, the interface board 940, and the switching board 920 are connected to a system backplane via a system bus to implement interworking. In a possible implementation, an inter-process communication (IPC) channel is established between the main control board 910 and the interface board 930, and communication is performed between the main control board 910 and the interface board 930 by using the IPC channel.

[0357] Logically, device 900 includes a control plane and a forwarding plane. The control plane includes main control board 910 and central processing unit 931, and the forwarding plane includes components that perform forwarding, such as forwarding table entry memory 934, physical interface cards 933, and network processors 932. The control plane performs functions such as the function of a router, generating forwarding tables, processing signaling and protocol packets, and configuring and maintaining device status. The control plane distributes the generated forwarding tables to the forwarding plane. In the forwarding plane, network processors 932 look up the tables and forward packets received by physical interface cards 933 based on the forwarding tables distributed by the control plane. The forwarding tables distributed by the control plane are stored, for example, in forwarding entry memory 934. In some embodiments, for example, the control plane and the forwarding plane are completely separate and are not on the same device.

[0358] The operations on interface board 940 correspond to those on interface board 930. For the sake of brevity, the operations on interface board 940 will not be described.

[0359] The device 900 in this embodiment may correspond to the network device or controller device in the aforementioned method embodiments, and the main control board 910 and the interface board 930 and / or the interface board 940 in the device 900, for example, implement the functions of the network device or controller device in the aforementioned method embodiments and / or the steps implemented by the network device or controller device in the aforementioned method embodiments. For the sake of brevity, details will not be described again herein.

[0360] It should be noted that there may be one or more main control boards, and when there are multiple main control boards, for example, the multiple main control boards include an active main control board and a standby main control board. There may be one or more interface boards, and a network device with stronger data processing capability provides more interface boards. There may be one or more physical interface cards on the interface board. There may be no switching board, or there may be one or more switching boards. When there are multiple switching boards, the switching boards can implement load sharing and redundant backup together. In a centralized forwarding architecture, the network device may not need a switching board, and the interface board undertakes the function of processing service data in the entire system. In a distributed forwarding architecture, the network device may have at least one switching board, and data exchange between multiple interface boards is implemented by using a switching board to provide large-capacity data exchange and processing capability. Therefore, the data access and processing capability of the network device in the distributed architecture is better than that of the device in the centralized architecture. Optionally, the form of the network device may have only one card, in other words, there is no switching board, and the functions of the interface board and the main control board are integrated on the card. In this case, the central processing unit on the interface board and the central processing unit on the main control board may be combined into one central processing unit on the card to execute the functions obtained after the two central processing units are combined. Devices of this form (e.g., network devices such as low-end switches and routers) have relatively weak data exchange and processing capabilities. The specific architecture to be used depends on the specific networking deployment scenario. This is not limited herein.

[0361] The embodiments herein are described in an incremental manner, and the same or similar parts of the embodiments are referred to each other, with each embodiment focusing on the differences from the other embodiments.

[0362] As used herein, the term "and / or" refers to and encompasses any and all possible combinations of one or more of the associated listed items. The term "and / or" describes an association relationship between associated objects and represents that three relationships may exist. For example, A and / or B can represent the following three cases: only A is present, both A and B are present, and only B is present. In addition, the symbol " / " in this application typically represents an "or" relationship between associated objects.

[0363] When A refers to B, it means that A is the same as B or that A is a simple variation of B.

[0364] The terms "first", "second", etc. in the description and claims of the embodiments of the present application are used to distinguish between different objects, but are not used to describe a particular order of the objects, and cannot be understood to indicate or imply relative importance. For example, a first connection and a second connection are used to distinguish between different connections, but are not used to describe a particular order of the connections, and cannot mean that the first connection is more important than the second connection.

[0365] In the embodiments of the present application, unless otherwise specified, "at least one" means one or more, and "multiple" means two or more. For example, "multiple connections" refers to two or more connections.

[0366] All or part of the above embodiments may be implemented by using software, hardware, firmware, or any combination thereof. When software is used to implement the embodiments, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded into a computer and executed, all or part of the procedures or functions according to the embodiments of the present application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center in a wired manner (e.g., coaxial cable, optical fiber, or digital subscriber line (DSL)) or in a wireless manner (e.g., infrared, radio waves, or microwaves). A computer-readable storage medium may be any available medium accessible by a computer, or may be a data storage device, such as a server or data center, that integrates one or more available media. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, or a magnetic tape), an optical medium (e.g., a DVD), a semiconductor medium (e.g., a solid state disk (SSD)), etc.

[0367] The above embodiments are merely used to describe the technical solutions of the present application, and are not intended to limit the technical solutions. Although the present application has been described in detail with respect to the above embodiments, those skilled in the art should understand that the technical solutions described in the above embodiments can still be modified or some of the technical features can be equivalently substituted, but the essential part of the corresponding technical solutions does not depart from the scope of the technical solutions of the embodiments of the present application. [Explanation of symbols]

[0368] 10 Management Control Plane 11 Controller Device 12 Route Reflector 20 Overlay Network 21 TNP 22 TNP 30 underlay network 102SID 103SID 201SID 201 Network Devices 202 Network Devices 203 Network Devices 203SID 204 Network Devices 212 TVC 224 TVC 243 V.C. 243 TVC 301SID 301 Network Devices 302 SID 401 Edge Device 404 Edge Device 405 Edge Device 406 Edge Device 416 TVC 464 TVC 465 TVC 490 SD-WAN Controller 501 Edge device 502 POP GW 503 POP GW 504 POP Golden Week 512 TVC 523 TVC 524 TVC 590 SD-WAN Controller 610 Network Devices 611 Receiving unit 612 Processing Unit 613 Transmitter Unit 710 Controller Device 711 Acquired Units 712 Processing Unit 713 Transmitter Unit 800 devices 801 Processor 802 Memory 803 Network Interface 804 Internal Connection 805 Processor 806 Input / Output Interface 810 Program Code 900 devices 910 Main Control Board 911 Central Processing Unit 912 Memory 920 Switching Board 930 Interface Board 931 Central Processing Unit 932 Network Processor 933 Physical Interface Card 934 Forwarding Entry Memory 934 Forwarding Table Entry Memory 940 Interface Board 941 Central Processing Unit 942 Network Processor 943 Physical Interface Card 944 Forwarding Entry Memory

Claims

1. 1. A packet processing method, comprising: receiving, by a first network device, a first packet from a second network device, an Internet Protocol IP address of the first packet including an endpoint IP address of a first connection, the first packet including a segment identifier SID, the SID indicating a second connection, the first connection being a connection from the second network device to the first network device, and the second connection being a connection from the first network device to a third network device; processing, by the first network device, the first packet to obtain a second packet, a source IP address of the second packet being an IP address belonging to the first network device in an endpoint IP address of the second connection, and a destination IP address of the second packet being an IP address belonging to the third network device in the endpoint IP address of the second connection; transmitting, by the first network device, the second packet to the third network device; A packet processing method comprising:

2. the endpoint IP address of the first connection is an Internet Protocol version 6 IPv6 address, the first packet includes a segment routing header (SRH), and the SID is located in the SRH; The method of claim 1.

3. the endpoint IP address of the first connection is an Internet Protocol version 4 IPv4 address, the first packet includes an SRH, and the SID is located on the SRH; The method of claim 1.

4. 4. The method of claim 3, wherein the endpoint IP address of the first connection is located in an IPv4 header of the first packet, the first packet comprises a type of protocol corresponding to the SRH, the type of protocol is located in a Generic Routing Encapsulation (GRE) header of the first packet, or the type of protocol is located in a Virtual Extensible Local Area Network (VXLAN) header of the first packet, or the type of protocol is located in the IPv4 header of the first packet.

5. 5. The method of claim 1, wherein the endpoint IP address of the second connection is an IPv6 address or an IPv4 address.

6. A method according to any one of claims 1 to 5, wherein the endpoint IP address of the first connection and / or the endpoint IP address of the second connection are each of a wide area network WAN interface and are IP addresses assigned by an operator of an underlay network.

7. 7. The method according to claim 1, wherein the first connection and / or the second connection are connections between different sites.

8. Prior to the step of receiving, by the first network device, a first packet from a second network device, the method further comprises: transmitting, by the first network device, the endpoint IP address of the second connection and / or the endpoint IP address of the first connection to a controller device; 8. The method of claim 1, further comprising:

9. The step of transmitting, by the first network device, the endpoint IP address of the second connection and / or the endpoint IP address of the first connection to a controller device, further comprising: generating, by the first network device, a Border Gateway Protocol link state BGP-LS packet, the BGP-LS packet including the endpoint IP address of the second connection and / or the endpoint IP address of the first connection, the BGP-LS packet further including a Software Defined Wide Area Network (SD-WAN) protocol identifier; sending, by the first network device, the BGP-LS packet to the controller device; 9. The method of claim 8, comprising:

10. Prior to the step of receiving, by the first network device, a first packet from a second network device, the method further comprises: transmitting, by the first network device, to the controller device, an identifier of the site in which the first network device is located; or sending, by the first network device, a connection status of the first connection and / or a connection status of the second connection to the controller device; or transmitting, by the first network device, service level agreement (SLA) information of the first connection and / or the second connection to the controller device; The method of claim 1 , further comprising at least one of the following:

11. Prior to the step of receiving, by the first network device, a first packet from a second network device, the method further comprises: receiving, by the first network device, the SID from a controller device; 11. The method of claim 1, further comprising:

12. 1. A method for determining a route, the method comprising: obtaining, by a controller device, endpoint IP addresses of a plurality of connections; determining, by the controller device, a segment routing (SR) path based on the endpoint IP addresses of the plurality of connections, the SR path including a first connection and a second connection of the plurality of connections, the first connection being a connection from a first network device to a second network device, and the second connection being a connection from the second network device to a third network device; sending, by the controller device, an SR policy to the first network device, the SR policy indicating the SR path; A method for determining a route.

13. 13. The method of claim 12, wherein the SR policy includes a first SID, the first SID indicating the second connection.

14. The method further comprising: assigning, by the controller device, the first SID to the second connection and the second SID to the first connection, wherein the first SID indicates the second connection and the second SID indicates the first connection; transmitting, by the controller device, the first SID to the second network device and transmitting the second SID to the first network device; 14. The method of claim 12 or 13, further comprising:

15. Each of the plurality of connections is a connection between different sites, and the step of determining, by the controller device, an SR route based on the endpoint IP addresses of the plurality of connections, comprises: determining, by the controller device, the SR routes based on the endpoint IP addresses of the multiple connections by using sites as route orchestration objects; 15. The method of any one of claims 12 to 14, comprising:

16. obtaining, by the controller device, endpoint IP addresses of a plurality of connections; receiving, by the controller device, an endpoint IP address of the first connection sent by the first network device or the second network device; 16. The method of any one of claims 12 to 15, comprising:

17. A network device, the network device being a first network device, the network device comprising: a receiving unit configured to receive a first packet from a second network device, the first packet's Internet Protocol IP address including an endpoint IP address of a first connection, the first packet including a segment identifier SID, the SID indicating a second connection, the first connection being a connection from the second network device to the first network device, and the second connection being a connection from the first network device to a third network device; a processing unit configured to process the first packet to obtain a second packet, a source IP address of the second packet being an IP address belonging to the first network device in an endpoint IP address of the second connection, and a destination IP address of the second packet being an IP address belonging to the third network device in the endpoint IP address of the second connection; a transmitting unit configured to transmit the second packet to the third network device; A network device comprising:

18. The network device of claim 17 , wherein the sending unit is further configured to send the endpoint IP address of the second connection and / or the endpoint IP address of the first connection to a controller device.

19. the processing unit is further configured to generate a Border Gateway Protocol link state BGP-LS packet, the BGP-LS packet including the endpoint IP address of the second connection and / or the endpoint IP address of the first connection, the BGP-LS packet further including a Software Defined Wide Area Network SD-WAN protocol identifier; The sending unit is configured to send the BGP-LS packet to the controller device.

20. The network device of claim 18.

20. The transmitting unit comprises: transmitting to a controller device an identifier of the site in which the first network device is located; or sending a connection status of the first connection and / or a connection status of the second connection to the controller device; or sending service level agreement (SLA) information of the first connection and / or the second connection to the controller device; 20. The network device of claim 17, further configured to perform at least one of the following:

21. The receiving unit is further configured to receive the SID from the controller device. A network device according to any one of claims 17 to 20.

22. A controller device, the controller device comprising: an acquisition unit configured to acquire endpoint IP addresses of a plurality of connections; a processing unit configured to determine a segment routing (SR) path based on the endpoint IP addresses of the plurality of connections, the SR path including a first connection and a second connection of the plurality of connections, the first connection being a connection from a first network device to a second network device, and the second connection being a connection from the second network device to a third network device; a sending unit configured to send an SR policy to the first network device, the SR policy indicating the SR path; A controller device comprising:

23. the processing unit is further configured to assign a first SID to the second connection and a second SID to the first connection, the first SID indicative of the second connection and the second SID indicative of the first connection; the sending unit is further configured to send the first SID to the second network device and send the second SID to the first network device.

23. The controller device of claim 22.

24. 24. The controller device of claim 22 or 23, wherein each of the multiple connections is a connection between different sites, and the processing unit is configured to determine the SR route based on the endpoint IP addresses of the multiple connections by using a site as a route orchestration object.

25. 25. The controller device of claim 22, wherein the obtaining unit is configured to receive an endpoint IP address of the first connection sent by the first network device or the second network device.

26. A network system, said system comprising a network device according to any one of claims 17 to 21 and a controller device according to any one of claims 22 to 25.

27. 17. A computer-readable storage medium, the storage medium storing at least one computer program instruction, the computer being enabled to perform the method according to any one of claims 1 to 16, when the computer program instruction is executed on a computer.

28. 17. A computer program product comprising one or more computer program instructions which, when loaded and executed by a computer, enable the computer to carry out the method according to any one of claims 1 to 16.

29. 12. A network device, the network device comprising a processor, the processor coupled to a memory, the memory storing at least one computer program instruction, the at least one computer program instruction being loaded and executed by the processor to cause the network device to implement a method according to any one of claims 1 to 11.

30. 17. A controller device comprising a processor, the processor coupled to a memory, the memory storing at least one computer program instruction, the at least one computer program instruction being loaded and executed by the processor to cause the controller device to implement a method according to any one of claims 12 to 16.