Communication method and device

By adjusting the overhead value in the routing information according to the working status of the network equipment in the multi-machine backup network, the problems of wasted bandwidth and low forwarding efficiency caused by message bypass are solved, and more efficient message forwarding is achieved.

CN119583423AActive Publication Date: 2025-03-07NEW H3C TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411742386.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-03-07
Estimated Expiration
2044-11-29

AI Technical Summary

Technical Problem

In the multi-machine backup network of EVPN VPLS over SRv6 BE, message bypass leads to bandwidth waste and message forwarding inefficient efficiency.

Method used

By obtaining its current working state in the first network device and sending or not sending routing information according to the state, including an overhead value, so that the second network device can select the SRv6 PW tunnel with the smallest overhead value as the forwarding target.

Benefits of technology

It effectively solves the problem of packet detours in multi-machine backup network, reduces bandwidth waste, and improves message forwarding efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119583423A_ABST
    Figure CN119583423A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a communication method and device, and relates to the technical field of communication, the method is applied to a first network device, the first network device is located in a multi-machine backup group, each network device included in the multi-machine backup group establishes an SRv6 PW tunnel with a second network device, and the multiple SRv6 PW tunnels form an equivalent path. Comprising the steps of obtaining a current working state of first network equipment; according to the current working state, routing information reaching the first network equipment is sent or not sent, and the routing information comprises an overhead value, so that second network equipment receiving at least one piece of routing information selects an SRv6 PW tunnel with the minimum overhead value as a path for forwarding a target message, the SRv6 PW tunnel with the minimum overhead value is the SRv6 PW tunnel between the second network equipment and the primary equipment in the multi-machine backup group. According to the scheme, the problems of bandwidth waste and low message forwarding efficiency caused by message bypassing in multi-machine backup networking can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a communication method and device. Background Art

[0002] In the multi-machine backup networking of EVPN VPLS over SRv6 BE, multiple network devices join the same backup group, such as the Virtual Router Redundancy Protocol (VRRP) backup group, which includes one active device and one or more standby devices. These multiple network devices are connected to the remote network device (i.e., headend device) through the Segment Routing Over Internet Protocol Version6 Best Effort (SRv6 BE) tunnel based on the IPv6 forwarding plane, and these multiple network devices publish routing information with the same locator routing segment and cost value through IGP. The remote network device (i.e., headend device) cannot perceive the active and standby status of these multiple network devices. When the headend device calculates the route based on the received routing information, it takes these multiple network devices as equal next hops, adds them to the routing table, and sends the forwarding table.

[0003] Accordingly, when forwarding messages through the SRv6 BE tunnel, the headend device distributes the message load to these multiple network devices based on equal-cost routing. For messages sent to the backup device, the backup device needs to re-check the table and send the message back to the primary device via a detour. This causes a waste of bandwidth and affects the efficiency of message forwarding. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a communication method and device to solve the problems of bandwidth waste and low message forwarding efficiency caused by message detour in multi-machine backup networking. The specific technical solution is as follows:

[0005] In a first aspect, an embodiment of the present application provides a communication method, which is applied to a first network device, where the first network device is in a multi-machine backup group, and each network device included in the multi-machine backup group establishes an SRv6 PW tunnel with a second network device, and multiple SRv6 PW tunnels form an equivalent path, and the method includes:

[0006] Obtaining a current working status of the first network device;

[0007] According to the current working state, routing information reaching the first network device is sent or not sent, the routing information including a cost value, so that the second network device that receives at least one routing information selects the SRv6 PW tunnel with the smallest cost value as the path for forwarding the target message, and the SRv6 PW tunnel with the smallest cost value is the SRv6 PW tunnel between the second network device and the active device in the multi-machine backup group.

[0008] In some embodiments, the first network device has a tracking item stored therein;

[0009] The sending or not sending the routing information to the first network device according to the current working state specifically includes:

[0010] According to the current working state, setting the value of the tracking item;

[0011] The routing information reaching the first network device is sent or not sent according to the value of the tracking item.

[0012] In some embodiments, setting the value of the tracking item according to the current working state includes:

[0013] If the current working state is a first preset state, setting the tracking item in the first network device to a first preset value, the first preset state indicating that the first network device is an active device;

[0014] If the current working state is a second preset state or a third preset state, setting the tracking item to a second preset value, the second preset state indicates that the first network device is a standby device, and the third preset state indicates that the first network device is in an initialization stage;

[0015] If the current working state is a fourth preset state, the tracking item is set to the third preset value, and the fourth preset state indicates that the first network device is abnormal, or indicates that the multi-machine backup group does not exist.

[0016] In some embodiments, before sending or not sending the routing information to the first network device, the method further includes:

[0017] If the value of the tracking item is the first preset value or the third preset value, or the tracking item does not exist, setting the cost value in the routing information reaching the first network device to the original cost value;

[0018] If the value of the tracking item is the second preset value, setting the cost value in the routing information reaching the first network device to a target cost value, wherein the target cost value is greater than the original cost value;

[0019] The sending or not sending the routing information reaching the first network device according to the value of the tracking item specifically includes:

[0020] If the tracking item is the first preset value, sending the routing information to the second network device, the cost value included in the routing information being the original cost value;

[0021] If the tracking item is the second preset value, sending the routing information to the second network device, the cost value included in the routing information being the target cost value;

[0022] If the tracking item is the third preset value, the routing information is sent to the second network device, and the cost value included in the routing information is the original cost value.

[0023] In some embodiments, setting the cost value in the routing information reaching the first network device to a target cost value specifically includes:

[0024] The original cost value is increased by a preset offset value; if the increased cost value is less than the maximum cost value, the increased cost value is used as the target cost value; if the increased cost value is greater than or equal to the maximum cost value, the maximum cost value is used as the target cost value; the cost value in the routing information reaching the first network device is set to the target cost value; or,

[0025] The preset cost value is used as the target cost value; and the cost value in the routing information reaching the first network device is set as the target cost value.

[0026] In some embodiments, sending or not sending routing information to the first network device according to the value of the tracking item specifically includes:

[0027] If the value of the tracking item is the first preset value or the third preset value, sending routing information to the first network device to the second network device;

[0028] If the value of the tracking item is the second preset value, the routing information reaching the first network device is suppressed from being sent to the second network device.

[0029] In a second aspect, an embodiment of the present application provides a communication device, which is applied to a first network device, wherein the first network device is in a multi-machine backup group, each network device included in the multi-machine backup group establishes an SRv6 PW tunnel with a second network device, and multiple SRv6 PW tunnels form an equivalent path, and the device includes:

[0030] An acquisition module, used to acquire the current working status of the first network device;

[0031] A processing module, used for sending or not sending routing information reaching the first network device according to the current working state, the routing information including a cost value, so that the second network device that receives at least one routing information selects an SRv6 PW tunnel with a minimum cost value as a path for forwarding a target message, and the SRv6 PW tunnel with a minimum cost value is an SRv6 PW tunnel between the second network device and a master device in the multi-machine backup group.

[0032] In some embodiments, the first network device has a tracking item stored therein;

[0033] The processing module comprises:

[0034] A tracking submodule, used for setting the value of the tracking item according to the current working state;

[0035] The application submodule is used to send or not send the routing information to the first network device according to the value of the tracking item.

[0036] In some embodiments, the tracking submodule is specifically configured to:

[0037] If the current working state is a first preset state, setting the tracking item to a first preset value, the first preset state indicating that the first network device is an active device;

[0038] If the current working state is a second preset state or a third preset state, setting the tracking item to a second preset value, the second preset state indicates that the first network device is a standby device, and the third preset state indicates that the first network device is in an initialization stage;

[0039] If the current working state is a fourth preset state, the tracking item is set to the third preset value, and the fourth preset state indicates that the first network device is abnormal, or indicates that the multi-machine backup group does not exist.

[0040] In some embodiments, the application submodule is further used to: before sending or not sending the routing information arriving at the first network device, if the value of the tracking item is the first preset value or the third preset value, set the cost value in the routing information arriving at the first network device to the original cost value; if the value of the tracking item is the second preset value, set the cost value in the routing information arriving at the first network device to the target cost value, and the target cost value is greater than the original cost value;

[0041] The application submodule is specifically used to: if the tracking item is the first preset value, send the routing information to the second network device, and the cost value included in the routing information is the original cost value; if the tracking item is the second preset value, send the routing information to the second network device, and the cost value included in the routing information is the target cost value; if the tracking item is the third preset value, send the routing information to the second network device, and the cost value included in the routing information is the original cost value.

[0042] In some embodiments, the application submodule is specifically used to:

[0043] The original cost value is increased by a preset offset value; if the increased cost value is less than the maximum cost value, the increased cost value is used as the target cost value; if the increased cost value is greater than or equal to the maximum cost value, the maximum cost value is used as the target cost value; the cost value in the routing information reaching the first network device is set to the target cost value; or,

[0044] The preset cost value is used as the target cost value; and the cost value in the routing information reaching the first network device is set as the target cost value.

[0045] In some embodiments, the application submodule is specifically used to:

[0046] If the value of the tracking item is the first preset value or the third preset value, sending routing information to the first network device to the second network device;

[0047] If the value of the tracking item is the second preset value, the routing information reaching the first network device is suppressed from being sent to the second network device.

[0048] In a third aspect, an embodiment of the present application provides a network device, including a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor, and the processor is prompted by the machine-executable instructions to implement any of the method steps described above.

[0049] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any of the method steps described above is implemented.

[0050] In a fifth aspect, an embodiment of the present application further provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute any of the methods described above.

[0051] Beneficial effects of the embodiments of the present application:

[0052] In the technical solution provided in the embodiment of the present application, the first network device included in the multi-machine backup group and the second network device outside the multi-machine backup group are located in the multi-machine backup network. The first network device obtains its own current working status, and uses its own current working status to send or not send routing information to itself, wherein the routing information includes a cost value, and the SRv6 PW tunnel with the smallest cost value is the SRv6 PW tunnel between the second network device and the main device in the multi-machine backup group. In this way, the second network device can distinguish the main device and the backup device included in the multi-machine backup group by the cost value in the routing information, so that the messages sent by the second network device to the multi-machine backup group side are all sent to the main device included in the multi-machine backup group, and will not be sent to the backup device included in the multi-machine backup group. This solves the problem of message detour in the multi-machine backup network, thereby reducing bandwidth waste and improving message forwarding efficiency.

[0053] Of course, implementing any product or method of the present application does not necessarily require achieving all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other embodiments can also be obtained based on these drawings.

[0055] Figure 1 The following is a schematic diagram of EVPN VPLS over SRv6 networking.

[0056] Figure 2 A schematic diagram of the SRv6 PW establishment process;

[0057] Figure 3 A schematic diagram of the process of learning MAC address table entries;

[0058] Figure 4 A schematic diagram of a multi-homing network;

[0059] Figure 5 A schematic diagram of a multi-machine backup network;

[0060] Figure 6 A flow chart of a communication method provided in an embodiment of the present application;

[0061] Figure 7 A schematic diagram of a multi-machine backup network provided in an embodiment of the present application;

[0062] Figure 8A schematic diagram of a first structure of a communication device provided in an embodiment of the present application;

[0063] Fig. 9 A second structural diagram of a communication device provided in an embodiment of the present application;

[0064] Fig.10 A schematic diagram of the structure of a network device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0065] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field based on the present application belong to the scope of protection of the present application.

[0066] The following is an explanation of the terms that appear in the embodiments of the present application.

[0067] EVPN: A Layer 2 virtual private network (VPN) technology based on an overlay network. The control plane uses the extended Border Gateway Protocol (BGP) to advertise routing information, and the data plane uses the Virtual eXtensible Local Area Network (VXLAN) or Multi-Protocol Label Switching (MPLS) encapsulation to forward packets. When the user's sites are scattered in different locations, EVPN can provide Layer 2 interconnection for different sites of the user based on the existing service provider or enterprise network. When using VXLAN encapsulation, EVPN can also achieve Layer 3 interconnection between different sites of the user. EVPN is widely used in data center networks, campus access networks, and wide area networks.

[0068] The control plane of the EVPN Virtual Private Lan Service (VPLS) network uses the Multi-Protocol Border Gateway Protocol (MP-BGP) to advertise routing information, and the data plane uses MPLS encapsulation to forward packets. In the EVPN VPLS network, the provider edge (PE) device forwards packets by looking up the multimedia access control (MAC) address table to provide users with point-to-multipoint Layer 2 services.

[0069] An EVPN VPLS network can include the following parts:

[0070] Attachment Circuit (AC): The connection between the Customer Edge (CE) device and the PE device.

[0071] EVPN Pseudo Wire (PW): A virtual bidirectional connection between two PE devices.

[0072] Public network tunnel: A tunnel that passes through the Internet Protocol (IP) or MPLS backbone network and is used to carry PWs, such as Layered Service Provider (LSP) and MPLS Traffic Engineering (TE) tunnels. Public network tunnel labels ensure that packets are forwarded from one PE device to another in the backbone network.

[0073] Virtual Switch Instance (VSI): A virtual instance on a PE device that provides Layer 2 services. It can be understood as a virtual switching device on a PE device. Each VSI provides Layer 2 services for an EVPN VPLS network.

[0074] SRv6: A protocol designed based on the source routing concept to forward IPv6 packets on the network. In SRv6 technology, the first node inserts a segment routing header (SRH) into the IPv6 packet and pushes an explicit IPv6 address stack into the SRH; the intermediate nodes continuously update the destination address and offset address stack to complete hop-by-hop forwarding.

[0075] SRv6 BE messages have SRH representing path constraints. The message format of SRv6 BE messages is consistent with that of ordinary IPv6 messages, and their forwarding behavior is also consistent with that of ordinary IPv6 messages. This means that ordinary IPv6 nodes can also process SRv6 BE messages, making SRv6 compatible with ordinary IPv6 devices. The difference between SRv6 BE messages and ordinary IPv6 messages is that the destination address of ordinary IPv6 messages is the IP address or network segment of a host, but the destination address of SRv6 BE messages is a service SID. The service SID can guide the message to be forwarded along the shortest path to the node that generates the SID, and the node executes the instructions of the service SID. SRv6 BE messages are messages forwarded by SRv6 BE tunnels.

[0076] EVPN VPLS over SRv6 networking Figure 1 As shown in the figure. EVPN VPLS over SRv6 carries EVPN VPLS services through SRv6 PW. PE1 and PE2 advertise SIDs such as End.DT2M SID, End.DT2USID, and End.DT2UL SID through EVPN routing to establish an SRv6 tunnel (such as the above-mentioned SRv6 BE tunnel). The SRv6 tunnel acts as a PW (such as the above-mentioned EVPN PW) to encapsulate and forward Layer 2 packets between sites CE1 and CE2, enabling sites to traverse the IPv6 network to establish a point-to-multipoint connection. On the backbone network, the provider (Provider, P) device forwards the packets encapsulated in the SRv6 tunnel according to the optimal path calculated by the Interior Gateway Protocol (Interior Gateway Protocol, IGP), thereby transparently transmitting Layer 2 packets through the backbone network. CE1 and CE2 are connected to PE1 and PE2 respectively through the AC.

[0077] SRv6 PW establishment process: PE devices exchange SIDs through EVPN routes such as Inclusive Multicast Ethernet Tag Route (IMET) routing, Auto-Discovery per Ethernet Virtual Interconnect (AD per EVI) routing, and MAC / IP advertising routing to establish SRv6 PW. Figure 2 The SRv6 PW establishment process shown is as follows:

[0078] 1) PE1 and PE2 publish IMET routes to each other. The IMET routes carry the End.DT2M SID allocated by the local end to the VSI. For example, Figure 2 As shown, A1 of PE1 and B1 of PE2.

[0079] 2) After receiving the IMET route, PE1 and PE2 establish a single-hop SRv6 tunnel from the local end to the remote end (such as the above-mentioned SRv6 BE tunnel). The SID of this SRv6 tunnel is the End.DT2M SID in the IMET route. These two SRv6 tunnels form an SRv6 PW to carry user Layer 2 messages.

[0080] like Figure 2In the example, PE1 establishes a single-hop SRv6 tunnel from the local end (PE1 device) to the remote end (PE2 device), and the SID of the SRv6 tunnel is B1; PE2 uses the same method to establish a single-hop SRv6 tunnel from the local end (PE2 device) to the remote end (PE1 device), and the SID of the SRv6 tunnel is A1. These two SRv6 tunnels form an SRv6 PW1, which is used to carry the Layer 2 messages between the user CE1 on the PE1 device side and the user CE2 on the PE2 device side. CE1 is connected to PE1 through AC1, and CE1 is connected to PE2 through AC2.

[0081] Figure 2 In the example, the End.DT2M SID assigned by PE3 to VSI is C1. In the same way, PE1 and PE3 mutually advertise IMET routes and establish SRv6 PW2 to carry Layer 2 messages between user CE1 on the PE1 side and user CE3 on the PE3 side. PE2 and PE3 mutually advertise IMET routes and establish SRv6 PW3 to carry Layer 2 messages between user CE2 on the PE2 side and user CE3 on the PE3 side. CE3 is connected to PE3 through AC3.

[0082] In the EVPN VPLS over SRv6 network, PE devices forward Layer 2 packets based on the learned MAC address entries. Figure 2 The SRv6 PW establishment process shown in the figure and the MAC address table learning process of the PE device are as follows: Figure 3 As shown, it is divided into two parts:

[0083] 1) Local MAC address table learning: After receiving a message from a local CE device, the PE device determines the VSI to which the message belongs and adds the source MAC address in the message (the MAC address of the local CE device) to the MAC address table of the VSI. The outbound interface of the MAC address is the AC that received the message.

[0084] 2) Remote MAC address table learning: The PE device advertises the locally learned MAC address to the remote PE device through MAC / IP advertising routing. After receiving the MAC address, the remote PE device adds the MAC address to the MAC address table of the corresponding VSI. The outbound interface of the MAC address is the SRv6 PW between the two PE devices.

[0085] CE1~CE3 belong to the same VSI 0. The MAC address table learned by PE1~PE3 is as follows: Figure 3 shown.

[0086] EVPN VPLS over SRv6 supports SRv6 BE packet forwarding. The EVPN VPLS over SRv6 BE tunnel establishment process includes:

[0087] 1) Configure basic SRv6 functions, enable the intermediate system to intermediate system (IS-IS) SRv6 capability, and establish an SRv6 BE forwarding path through the IS-IS protocol. When a network failure occurs, the switching speed of the packet forwarding path depends on the routing convergence speed, and the reliability is high.

[0088] 2) Configure BGP EVPN peer relationships between PE devices to implement EVPN routing interoperability.

[0089] 3) Configure the EVPN route to carry the SID attribute, and configure the EVPN route to iterate the SRv6 BE tunnel based on the carried SID, and send the EVPN route carrying the SRv6 encapsulation attribute to the neighboring device.

[0090] When PE devices use SRv6 BE to forward packets, they forward packets in a load-balanced manner based on locator routing.

[0091] As users have higher and higher requirements for network reliability, how to ensure uninterrupted network transmission has become a problem that must be solved. The multi-machine backup function provides a device-level network reliability solution through the Virtual Service Redundancy Protocol (VSRP). In the scenario where the master-slave protocol (such as VRRP, Smart-Trunk, S-Trunk) is deployed, VSRP backs up the user service data on the master device to the backup device. When the master device or the link between the master device and the master device fails, the user service is quickly switched to the backup device; when the master device or the link between the master device and the master device is restored, the user service is switched back from the backup device to the master device to ensure uninterrupted user service.

[0092] In actual applications, the most common multi-machine backup network is 1+1 device-level redundant backup, also known as dual-machine hot standby, which means deploying two devices of the same model and software and hardware configuration at important nodes of the network to improve network reliability. Among them, one device is used as the main device, which processes services, forwards service messages, and backs up service module data; the other device is used as the backup device. When the main device works normally, the backup device does not forward service messages, but only backs up service module data. When the main device fails, the backup device takes over the work of the main device to ensure uninterrupted services.

[0093] In a multi-machine backup network, two issues need to be resolved: one is to determine which device processes the message, and the other is how to back up the service data. In a dual-machine backup network:

[0094] 1) Use VRRP or S-Trunk to determine which device is the active device and which is the standby device in dual-machine backup, and forward messages through the active device.

[0095] 2) VSRP acts as a bridge module, associating VRRP, S-Trunk and service modules, and establishing a unified backup platform for redundant backup of multiple user services between active and standby devices.

[0096] 3) The service module implements service data backup, so that after the traffic is switched to another device, the other device has the corresponding service data to process the service message, so that the service is not interrupted. Currently, the service modules that support multi-machine backup include Address Resolution Protocol (ARP), Point-to-Point Protocol over Ethernet (PPPoE), etc.

[0097] Take VRRP as an example. VRRP groups a group of routers (such as two routers) in a LAN together to form a VRRP backup group. The VRRP backup group is functionally equivalent to a virtual router. The VRRP backup group divides physical devices into two roles: the master router (i.e., the master device) and the backup router (i.e., the backup device). The VRRP backup group supports two working modes: standard protocol mode and load balancing mode.

[0098] In the standard protocol mode, the active router forwards messages, and the hosts (or sites) in the LAN communicate with the outside world through the active router; the standby router is in a listening state and cannot forward messages.

[0099] In load balancing mode, both the active router and the standby router can forward packets.

[0100] Regardless of whether it is the standard protocol mode or the load balancing mode, in a multi-machine backup network, after VSRP and VRRP are linked, the master and backup roles of the two devices in the VSRP instance are determined by the roles of the devices in the VRRP backup group. The master router in the VRRP backup group serves as the master device in the multi-machine backup group, and the backup router in the VRRP backup group serves as the backup device in the multi-machine backup group.

[0101] VRRP active-standby networking means that the VRRP backup group works in standard protocol mode, where only the active router forwards messages, and the standby router does not forward messages. The implementation principle is as follows:

[0102] (1) The administrator specifies the gateway as the VRRP backup group on the host (or site). That is, the administrator specifies the IP address of the gateway as the virtual IP address of the VRRP backup group.

[0103] (2) The host (or station) sends an ARP / Neighbor Discovery (ND) request to the gateway, requesting the gateway's MAC address.

[0104] (3) The active router uses its own virtual MAC address to respond to the ARP / ND request from the host (or site). The standby router does not respond to the ARP / ND request from the host (or site).

[0105] (4) The host (or site) maintains the correspondence between the virtual MAC address of the primary router and the IP address of the gateway in the ARP table and sends the message to the primary router for processing.

[0106] In order to avoid single point failures causing interruption of message forwarding, Figure 4 In the networking shown, multiple VXLAN Tunnel Endpoints (VTEP) or PEs form a backup group, such as a VRRP backup group. The site simultaneously accesses EVPN through multiple network devices included in the backup group to form redundant backup. This type of networking can be called multi-homed site networking; a site that is connected to multiple network devices at the same time is called a multi-homed site. Messages from multi-homed sites can form active-standby backup between multiple network devices, that is, only one network device forwards the message; or they can be load-balanced between multiple network devices, that is, all network devices forward the message.

[0107] The locator has a positioning function and is unique in the segment routing (SR) domain. After the node is configured with a locator, a locator route is generated and spread in the SR domain using IGP. Other nodes in the network can locate this node through the locator route, that is, the messages sent by other nodes using any SID published by this node can reach this node through this locator route.

[0108] However, in anycast scenarios or other special scenarios, multiple network devices may be configured with the same Locator and publish the same SID.

[0109] Nodes that support SRv6 (i.e., SRv6 nodes) use IGP to advertise routing information such as topology information, prefix information, Locator and SID information. Taking the IS-IS protocol as an example: Locator must be published through SRv6 Locator TLV. After receiving the TLV, other network devices that support SRv6 send the corresponding Locator route to the local forwarding table.

[0110] by Figure 5 Taking the multi-machine backup networking shown in the figure as an example, the serving gateway (SGW) represents the network element in the communication network, the Layer 2 Virtual Ethernet (L2VE) interface is used to terminate the Layer 2 (L2) VPN, and the Layer 3 Virtual Ethernet (L3VE) interface is used to access the L2VPN.

[0111] In the multi-machine backup network of EVPN VPLS over SRv6 BE, two SGWs (SGW1 and SGW2) form a multi-machine backup group. SGW1 and SGW2 publish the same anycast SID to implement traffic load balancing. The solution deployment is described as follows:

[0112] 1) The L3VE interface between SGWs establishes VRRP and VSRP connections and synchronizes PPPOE user information, such as anycast SID.

[0113] SGW1 and SGW2 create the same VRRP backup group and specify different priorities. VRRP selects the SGW with a higher priority as the primary router and the others as backup routers. The primary and backup roles of VSRP are the same as the VRRP backup group selection results, realizing the multi-machine backup protection function. Take SGW1 as the primary router and SGW2 as the backup router as an example.

[0114] 2) SGWs use EVPN VPLS to synchronize the MAC addresses of the gateways learned through the L2VE ports.

[0115] 3) SGW implements load sharing among SGWs by publishing the same anycast SID.

[0116] SGW1 and SGW2 are respectively configured with SRv6 function and anycast Locator is enabled, and the same Locator routing information is published through IGP. That is, the network segment and cost value of the Locator routing information are the same.

[0117] 4) After receiving the locator route information of the same network segment and the same cost value issued by SGW1 and SGW2, the customer-premises equipment (CPE) uses IGP to calculate the route and generates two equal-cost locator routes as SRv6 BE tunnels. The SRv6 BE tunnel on the CPE corresponds to the equal-cost locator routes with the next hops of SGW1 and SGW2 respectively.

[0118] 5) CPE uses equal-cost locator routing to send messages to SGW1 and SGW2 through the SRv6 BE tunnel of the leaf device using load balancing, such as Figure 5 If the message sent by CPE is load-shared to SGW2, SGW2 searches the MAC table and redirects the message to SGW1, which then forwards it. For example, SGW1 forwards the message to the local CE of SGW1.

[0119] After the SRv6 BE tunnel (PW) is established, Figure 5 As shown in the figure, the forwarding process of unicast packets in the multi-machine backup network of EVPN VPLS overSRv6 BE is taken as an example. The following is the description:

[0120] 1) After receiving the Layer 2 message from the connected AC, the CPE searches the MAC address table in the VSI associated with the AC, finds the corresponding outbound interface as the SRv6 PW, and obtains the SID of the tunnel, that is, the SID assigned by SGW1 using the anycast locator, such as End.DT2U SID A1 or End.DX2 SID B1.

[0121] 2) The CPE encapsulates the outer IPv6 header for the message. The destination IPv6 address is the SID, and the source IPv6 address is the source address of the IPv6 header encapsulated by the configured EVPN VPLS over SRv6.

[0122] 3) The CPE searches the IPv6 routing table according to the SID of the destination IPv6 address and forwards the message through the optimal Locator route. At this time, the Locator route is an equal-cost route, and the next hops are SGW1 and SGW2 respectively.

[0123] 4) After receiving the message, SGW2 searches the MAC address table again and sends the message to SGW1.

[0124] 5) After receiving the message, SGW1 searches the local SID table according to the SID of the destination IPv6 address and executes the forwarding action corresponding to the SID.

[0125] The forwarding action corresponding to the End.DT2U SID is: decapsulate the message to remove the IPv6 message header, search the MAC address table in the VSI to which the End.DT2USID belongs, and forward the message to the user-side device according to the table search result.

[0126] Forwarding action corresponding to End.DX2 SID: decapsulate the packet, remove the IPv6 header, and forward the packet to the AC associated with End.DX2 SID.

[0127] In a multi-machine backup network, when two SGWs join a VRRP backup group and publish the same Locator route through IGP, the remote network device (i.e., the head-end device) cannot perceive the primary and backup status of the two SGWs, and the network segments and cost values ​​of the sent Locator routes are the same. When calculating the Locator route, the head-end device uses the two SGWs as equivalent next hops, adds them to the routing table, and sends the forwarding table. When forwarding messages, the head-end device shares the message load between the two SGWs. For messages sent to the backup SGW, the backup SGW needs to re-look up the table and send the message back to the primary SGW. This causes a waste of bandwidth and affects the efficiency of message forwarding.

[0128] To solve the above problems, the present application provides a communication method, such as Figure 6 As shown, the method is applied to a first network device, the first network device is in a multi-machine backup group, each network device included in the multi-machine backup group establishes an SRv6 PW tunnel with a second network device, and multiple SRv6 PW tunnels form an equivalent path. The method includes the following steps:

[0129] Step S61, obtaining the current working status of the first network device;

[0130] Step S62: Send or not send routing information to the first network device according to the current working status, the routing information includes a cost value, so that the second network device that receives at least one routing information selects the SRv6PW tunnel with the smallest cost value as the path for forwarding the target message, and the SRv6 PW tunnel with the smallest cost value is the SRv6 PW tunnel between the second network device and the active device in the multi-machine backup group.

[0131] In the technical solution provided in the embodiment of the present application, the first network device included in the multi-machine backup group and the second network device outside the multi-machine backup group are located in the multi-machine backup networking of SRv6 BE. The first network device obtains its own current working status, and uses its own current working status to send or not send routing information to itself, wherein the routing information includes a cost value, and the SRv6 PW tunnel with the smallest cost value is the SRv6 PW tunnel between the second network device and the main device in the multi-machine backup group. In this way, the second network device can distinguish the main device and the backup device included in the multi-machine backup group by the cost value in the routing information, so that the messages sent by the second network device to the multi-machine backup group side are all sent to the main device included in the multi-machine backup group, and will not be sent to the backup device included in the multi-machine backup group. This solves the problem of message detour in the multi-machine backup networking, thereby reducing bandwidth waste and improving message forwarding efficiency.

[0132] In the embodiment of the present application, the multi-machine backup group may be a VRRP backup group or an S-Trunk backup group, and the multi-machine backup group may use VSRP to implement the multi-machine backup function. The multi-machine backup group includes at least two network devices, such as Figure 5 SGW1 and SGW2 in the multi-machine backup group, at least two network devices have the same SID. The first network device is any network device included in the multi-machine backup group, and the first network device can be a primary device or a backup device. The second network device is a remote network device, that is, a head-end device. The first network device and the second network device are located in the multi-machine backup network of EVPN VPLS over SRv6 BE. Each network device included in the multi-machine backup group establishes an SRv6 PW tunnel, such as an SRv6BE tunnel, with the second network device. There are a total of multiple SRv6 PW tunnels. When the routing overhead values ​​are the same, the multiple SRv6 PW tunnels form an equivalent path.

[0133] In the above step S61, the working state of the network device can be recorded by a state machine in the network device. The working state of the network device can include a master state, a backup state, an initialize state, and an inactive state.

[0134] In the embodiment of the present application, after the first network device is powered on, it can obtain its own working status in real time to obtain the current working status.

[0135] In step S62, the routing information to the network device may include Locator routing information, SID information, etc., and may specifically include Locator routing network segment and routing cost value, etc. The SID corresponding to the multi-machine backup group indicates that each network device included in the multi-machine backup group is the SID, such as anycast SID.

[0136] After obtaining the current working state of the first network device, the first network device may send or not send routing information to the second network device according to the current working state, so that the routing information received by the second network device matches the current working state. The SRv6 PW tunnel with the smallest overhead value is the SRv6 PW tunnel between the second network device and the active device in the multi-machine backup group.

[0137] The second network device can sense the active and standby status of the network device through routing information (such as the cost value in the routing information), and then use IGP to calculate routes of different priorities and send forwarding tables. The priority of the route corresponding to the active device is higher than the priority of the route corresponding to the standby device.

[0138] The second network device uses routes with different priorities to give priority to the routes (i.e., paths) corresponding to the primary devices included in the multi-machine backup group, and sends all messages sent to the multi-machine backup group to the primary devices instead of the backup devices. This solves the problem of message detours in multi-machine backup networking, thereby reducing bandwidth waste and improving message forwarding efficiency.

[0139] In the embodiment of the present application, the first network device may implement the above step S62 in any of the following ways.

[0140] Method 1: Use the current working status obtained to directly adjust the routing information.

[0141] In an embodiment of the present application, the state machine of the first network device may include four working states, namely, a first preset state (such as Master state), a second preset state (such as Backup state), a third preset state (such as Initialize state), and a fourth preset state; wherein the first preset state indicates that the first network device is a master device, the second preset state indicates that the first network device is a backup device, the third preset state indicates that the first network device is in the initialization stage, and the fourth preset state (such as Inactive state) indicates that the first network device is abnormal, or indicates that the VRRP backup group does not exist.

[0142] In the first method, the first network device can adjust the routing information in the following two ways:

[0143] Method a, raising the cost value. For example, before sending or not sending routing information to the first network device, if the current working state obtained is the first preset state or the fourth preset state, the first network device sets the cost value in the routing information to the first network device to be the original cost value; if the current working state obtained is the second preset state or the third preset state, the cost value in the routing information to the first network device is set to be the target cost value, and the target cost value is greater than the original cost value. The first network sends the set routing information to the second network device, which can be specifically: if the current working state is the first preset state or the fourth preset state, the routing information is sent to the second network device, and the cost value included in the routing information is the original cost value; if the current working state is the second preset state or the third preset state, the routing information is sent to the second network device, and the cost value included in the routing information is the target cost value.

[0144] The first network device may adopt the following two implementation methods to set the cost value in the routing information reaching the first network device as the target cost value:

[0145] Implementation method a1, the original cost value is relatively increased by a configured cost value (i.e., a preset offset value): the first network device increases the original cost value by the preset offset value; if the increased cost value is less than the maximum cost value, the increased cost value is used as the target cost value; if the increased cost value is greater than or equal to the maximum cost value, the maximum cost value is used as the target cost value; the cost value in the routing information reaching the first network device is set as the target cost value.

[0146] Implementation a2: The cost value is adjusted to the configured absolute value (i.e., the preset cost value): the first network device uses the preset cost value as the target cost value; the cost value in the routing information reaching the first network device is set as the target cost value. The preset cost value is greater than the original cost value.

[0147] Method b, lowering the cost value. For example, before sending or not sending routing information to the first network device, if the current working state obtained is the first preset state or the fourth preset state, the first network device sets the cost value in the routing information to the first network device to be the target cost value; if the current working state obtained is the second preset state or the third preset state, the cost value in the routing information to the first network device is set to be the original cost value, and the target cost value is less than the original cost value. The first network sends the set routing information to the second network device, which can be specifically: if the current working state is the first preset state or the fourth preset state, the routing information is sent to the second network device, and the cost value included in the routing information is the target cost value; if the current working state is the second preset state or the third preset state, the routing information is sent to the second network device, and the cost value included in the routing information is the original cost value.

[0148] The first network device may adopt the following two implementation methods to set the cost value in the routing information reaching the first network device as the target cost value:

[0149] Implementation method b1, the original cost value is relatively reduced by a configured cost value (i.e., a preset offset value): the first network device reduces the original cost value by the preset offset value; if the reduced cost value is greater than the minimum cost value, the reduced cost value is used as the target cost value; if the reduced cost value is less than or equal to the minimum cost value, the minimum cost value is used as the target cost value; the cost value in the routing information reaching the first network device is set as the target cost value.

[0150] Implementation b2: The cost value is adjusted to the configured absolute value (i.e., the preset cost value): the first network device uses the preset cost value as the target cost value; the cost value in the routing information reaching the first network device is set as the target cost value. The preset cost value is greater than the original cost value.

[0151] In the present method a and method b, the first network device directly adjusts the routing information using the acquired current working status, thereby improving the efficiency of adjusting the routing information.

[0152] In the embodiment of the present application, the first network device can use IGP to quickly adjust the cost value in the Locator routing information to a cost value that matches the working state through the working state. After the second network device receives the routing information published by the first network device, when using IGP to calculate the route of the SRv6 PW tunnel, it calculates the route of the corresponding priority according to the cost value and sends the forwarding table. Here, since the cost value in the routing information of the active device is lower than the cost value in the routing information of the standby device, the routing priority of the active device is higher than the routing priority of the standby device, that is, the active and standby routes (i.e., active and standby paths) are formed in the second network device. Therefore, when the second network device sends a message (such as a target message) to the multi-machine backup group side, when querying the routing table according to the target IPv6 address of the message (i.e., the SID corresponding to the multi-machine backup group), the route of the active device with a high priority (i.e., the main route) is preferentially selected, and the main route is used to send the message to the active device, thereby avoiding detours.

[0153] Mode c, suppressing the publishing of routes. For example, if the current working state obtained is the first preset state or the fourth preset state, the first network device can normally send the routing information reaching the first network device to the second network device; if the current working state obtained is the second preset state or the third preset state, the first network device can suppress sending the routing information reaching the first network device to the second network device.

[0154] In the embodiment of the present application, the second network device will receive the routing information of the active device but will not receive the routing information of the backup device. That is, the second network device uses IGP to calculate the route of the SRv6 PW tunnel (such as the SRv6 BE tunnel) and only has the main route. Therefore, when the second network device sends a message (such as a target message) to the multi-machine backup group side, when querying the routing table according to the target IPv6 address of the message (that is, the SID corresponding to the multi-machine backup group), only the route of the active device (that is, the main route) can be found, and the main route is used to send the message to the active device, thereby avoiding detours.

[0155] Method 2: Use the tracking item to associate the working state with the routing information, that is, use the tracking item to adjust the routing information. The tracking item is a table item used to carry the preset value associated with the working state.

[0156] In the embodiment of the present application, the first network device can configure a tracking item associated with the working state and routing information. The first network device sets the value of the tracking item according to the current working state, which can be specifically: if the current working state is the first preset state, the first network device can set the tracking item to the first preset value, and the first preset state indicates that the first network device is the main device; if the current working state is the second preset state or the third preset state, the tracking item is set to the second preset value, the second preset state indicates that the first network device is a backup device, and the third preset state indicates that the first network device is in the initialization stage; if the current working state is the fourth preset state, the tracking item is set to the third preset value, and the fourth preset state indicates that the first network device is abnormal, or indicates that the multi-machine backup group does not exist.

[0157] After setting the value of the tracking item, the first network device sends or does not send the routing information to the first network device according to the value of the tracking item. The first preset value, the second preset value, and the third preset value can be set according to actual needs. For example, the first preset value can be Positive, the second preset value can be Negative, and the third preset value can be NotReady.

[0158] In the scenario where a multi-machine backup group is used as a user gateway, since the path of the uplink message depends on the active / standby status of the device, and the path of the downlink message is generally determined by a dynamic routing protocol (such as IGP) through routing, the forwarding paths of the uplink and downlink messages may be inconsistent. Inconsistent forwarding paths of uplink and downlink messages will increase unnecessary difficulty and cost. In an embodiment of the present application, by configuring a multi-machine backup group association tracking item, and configuring the routing of each network device in the multi-machine backup group to the downstream device to be associated with the tracking item, each network device in the multi-machine backup group sets the routing overhead value according to the active / standby status, so that the active / standby status affects the routing result of the dynamic routing protocol to solve the above problem.

[0159] In the second method, the first network device may process the routing information through the above method a or method b, as follows:

[0160] Method a, raising the cost value. For example, before sending or not sending routing information to the first network device, if the value of the tracking item is the first preset value or the third preset value, or the tracking item does not exist, the first network device sets the cost value in the routing information to the first network device to be the original cost value; if the value of the tracking item is the second preset value, the cost value in the routing information to the first network device is set to be the target cost value, and the target cost value is greater than the original cost value. The first network sends the set routing information to the second network device, specifically: if the tracking item is the first preset value, the routing information is sent to the second network device, and the cost value included in the routing information is the original cost value; if the tracking item is the second preset value, the routing information is sent to the second network device, and the cost value included in the routing information is the target cost value; if the tracking item is the third preset value, the routing information is sent to the second network device, and the cost value included in the routing information is the original cost value.

[0161] The first network device may adopt the following two implementation methods to set the cost value in the routing information reaching the first network device as the target cost value:

[0162] Implementation method a1, the original cost value is relatively increased by a configured cost value (i.e., a preset offset value): the first network device increases the original cost value by the preset offset value; if the increased cost value is less than the maximum cost value, the increased cost value is used as the target cost value; if the increased cost value is greater than or equal to the maximum cost value, the maximum cost value is used as the target cost value; the cost value in the routing information reaching the first network device is set as the target cost value.

[0163] Implementation method a2, the cost value is adjusted to the configured absolute value (ie, the preset cost value): the first network device uses the preset cost value as the target cost value; and sets the cost value in the routing information reaching the first network device as the target cost value.

[0164] Method b, lowering the cost value. For example, before sending or not sending routing information to the first network device, if the value of the tracking item is the first preset value or the third preset value, or the tracking item does not exist, the first network device sets the cost value in the routing information to the first network device to be the target cost value; if the value of the tracking item is the second preset value, the cost value in the routing information to the first network device is set to be the original cost value, and the target cost value is less than the original cost value. The first network sends the set routing information to the second network device, which can be specifically: if the tracking item is the first preset value, the routing information is sent to the second network device, and the cost value included in the routing information is the target cost value; if the tracking item is the second preset value, the routing information is sent to the second network device, and the cost value included in the routing information is the original cost value; if the tracking item is the third preset value, the routing information is sent to the second network device, and the cost value included in the routing information is the target cost value.

[0165] The first network device may adopt the following two implementation methods to set the cost value in the routing information reaching the first network device as the target cost value:

[0166] Implementation method b1, the original cost value is relatively reduced by a configured cost value (i.e., a preset offset value): the first network device reduces the original cost value by the preset offset value; if the reduced cost value is greater than the minimum cost value, the reduced cost value is used as the target cost value; if the reduced cost value is less than or equal to the minimum cost value, the minimum cost value is used as the target cost value; the cost value in the routing information reaching the first network device is set as the target cost value.

[0167] Implementation mode b2, the cost value is adjusted to the configured absolute value (ie, the preset cost value): the first network device uses the preset cost value as the target cost value; and sets the cost value in the routing information reaching the first network device as the target cost value.

[0168] In the embodiment of the present application, the first network device uses the tracking item to associate the working state with the routing information, thereby realizing the linkage and cooperation between the information. The tracking item is used to shield the differences between different state machines, and the monitoring results of the working state are notified to the application module in a unified form, thereby simplifying the processing of the routing information by the application module.

[0169] In an embodiment of the present application, the first network device can use IGP to quickly adjust the cost value in the Locator routing information to a cost value that matches the working state through the working state. After the second network device receives the routing information published by the first network device, when using IGP to calculate the route of the SRv6 PW tunnel, it calculates the route of the corresponding priority according to the cost value and sends down the forwarding table. Here, because the cost value in the routing information of the active device is lower than the cost value in the routing information of the standby device, the routing priority of the active device is higher than the routing priority of the standby device. Therefore, when the second network device sends a message (such as a target message) to the multi-machine backup group side, when querying the routing table according to the target IPv6 address of the message (that is, the SID corresponding to the multi-machine backup group), the route of the active device with a high priority is preferentially selected, and the message is sent to the active device, thereby avoiding detours.

[0170] In an embodiment of the present application, if the multi-machine backup group adopts VSRP to implement the multi-machine backup function, then after the main device fails, it can quickly switch to the backup device to continue forwarding messages, and after the main device recovers, it can switch back to the main device to forward messages, thereby meeting the high reliability requirements of the network.

[0171] Mode c, suppressing the publishing of routes. For example, if the value of the tracking item is the first preset value or the third preset value, the first network device can send the routing information reaching the first network device to the second network device; if the value of the tracking item is the second preset value, the first network device can suppress sending the routing information reaching the first network device to the second network device.

[0172] In the embodiment of the present application, the second network device will receive the routing information of the active device but will not receive the routing information of the backup device. That is, the second network device uses IGP to calculate the route of the SRv6 PW tunnel, which only has the primary route. Therefore, when the second network device sends a message (such as a target message) to the multi-machine backup group side, when querying the routing table according to the target IPv6 address of the message (that is, the SID corresponding to the multi-machine backup group), only the route of the active device (that is, the primary route) can be found, and the primary route is used to send the message to the active device, thereby avoiding detours.

[0173] Combine the following Figure 5 The networking shown is a detailed description of the communication method provided in the embodiment of the present application. SGW1 and SGW2 join a multi-machine backup group.

[0174] 1) The L3VE interface between SGWs establishes VRRP and VSRP connections and synchronizes PPPOE user information, such as anycast SID. Figure 7As shown. The anycast SID is the SID corresponding to the multi-machine backup group. SGW1 and SGW2 create the same VRRP backup group and specify different priorities respectively. VRRP prefers the SGW with a high priority as the primary router and the others as backup routers. The primary and backup roles of VSRP are the same as the VRRP backup group's preferred results, realizing the multi-machine backup protection function. Take SGW1 as the primary router and SGW2 as the backup router as an example.

[0175] 2) SGWs use EVPN VPLS to synchronize the MAC address of the gateway learned by the L2VE port, such as Figure 7 shown.

[0176] 3) SGW publishes the locator routing information with the same anycast SID but different cost values ​​by associating the active and standby status of the devices in the VRRP backup group, thus realizing the active and standby protection relationship between SGWs, such as Figure 7 shown.

[0177] SGW1 and SGW2 are configured with SRv6 functions respectively, and anycast Locator routing information is enabled to associate with the master and backup status of the devices in the VRRP backup group. Routing information with the same Locator network segment but different cost values ​​is published through the IGP protocol.

[0178] 4) After receiving the Locator routing information of the same network segment and different cost values ​​issued by SGW1 and SGW2, CPE generates the primary and backup routes (primary and backup Locator routes) according to the cost value of the Locator routing information when calculating the route using IGP and sends the forwarding table. On CPE, the SRv6 BE tunnel corresponds to the primary and backup Locator routes, that is, the next hop is the primary route of SGW1, and the next hop is the backup route of SGW2, forming a backup protection relationship between SGWs.

[0179] 5) When CPE uses the primary and backup routes to send a message to the VRRP backup group through the SRv6 BE tunnel of the leaf device, CPE searches the routing table to obtain the primary route and then sends the message to SGW1. Figure 7 The solid line of the single arrow is shown. SGW1 is the master device of the VRRP backup group, so SGW1 forwards the message normally, and the message does not need to be detoured.

[0180] 6) After SGW1 fails, the Locator route converges to SGW2, as shown in Figure 7 The dashed line of the single arrow is shown; after SGW1 is restored, the Locator route is recalculated and switched back to the main SGW1.

[0181] In the embodiment of the present application, SGW1 can use VSRP to back up service data in SGW2. After SGW1 fails, CPE will delete the main route, and then when sending a message, CPE will look up the routing table to obtain the backup route, and then send the message to SGW2. After SGW1 recovers, SGW1 can republish the Locator routing information, and then CPE will recalculate and generate the main route. When sending a message, CPE will look up the routing table to obtain the main route, and then send the message to SGW1.

[0182] In the embodiment of the present application, after the SRv6 BE tunnel (ie, PW) is established, the forwarding process of unicast packets in the EVPN VPLS overSRv6 BE network is taken as an example, as follows:

[0183] 1) After receiving the Layer 2 message from the connected AC, the CPE searches the MAC address table in the VSI associated with the AC, finds the corresponding outbound interface as the SRv6 PW, and obtains the SID of the tunnel, that is, the SID assigned by SGW1 using the anycast locator, such as End.DT2U SID A1 or End.DX2 SID B1.

[0184] 2) The CPE encapsulates the outer IPv6 header for the message. The destination IPv6 address is the SID, and the source IPv6 address is the source address of the IPv6 header encapsulated by the configured EVPN VPLS over SRv6.

[0185] 3) CPE searches the IPv6 routing table according to the SID of the destination IPv6 address and forwards the message through the optimal Locator route. At this time, the Locator route is the primary and backup route. The next hop of the primary route is SGW1, and the next hop of the backup route is SGW2. The message is sent to SGW1.

[0186] 4) After receiving the message, SGW1 searches the local SID table according to the SID of the destination IPv6 address and executes the forwarding action corresponding to the SID.

[0187] The forwarding action corresponding to the End.DT2U SID is: decapsulate the message to remove the IPv6 message header, search the MAC address table in the VSI to which the End.DT2USID belongs, and forward the message to the user-side device according to the table search result.

[0188] Forwarding action corresponding to End.DX2 SID: decapsulate the packet, remove the IPv6 header, and forward the packet to the AC associated with End.DX2 SID.

[0189] When SGW1 fails, the message will be switched to SGW2; when SGW1 recovers, the message will be switched back to SGW1 to implement primary and backup path protection.

[0190] Corresponding to the above communication method, the embodiment of the present application also provides a communication device, such as Figure 8 As shown, it is applied to a first network device, the first network device is in a multi-machine backup group, each network device included in the multi-machine backup group establishes an SRv6 PW tunnel with the second network device respectively, and multiple SRv6 PW tunnels form an equivalent path. The device includes:

[0191] An acquisition module 81 is used to acquire the current working status of the first network device;

[0192] The processing module 82 is used to send or not send routing information to the first network device according to the current working state, and the routing information includes a cost value, so that the second network device that receives at least one routing information selects the SRv6 PW tunnel with the smallest cost value as the path for forwarding the target message, and the SRv6 PW tunnel with the smallest cost value is the SRv6 PW tunnel between the second network device and the active device in the multi-machine backup group.

[0193] In some embodiments, Fig. 9 As shown, the processing module 82 may include:

[0194] The tracking submodule 821 is used to set the value of the tracking item according to the current working state;

[0195] The application submodule is used to send or not send the routing information to the first network device according to the value of the tracking item.

[0196] In some embodiments, the tracking submodule 821 may be specifically used to:

[0197] If the current working state is a first preset state, setting the tracking item in the first network device to a first preset value, the first preset state indicating that the first network device is an active device;

[0198] If the current working state is the second preset state or the third preset state, the tracking item is set to the second preset value, the second preset state indicates that the first network device is a standby device, and the third preset state indicates that the first network device is in the initialization stage;

[0199] If the current working state is the fourth preset state, the tracking item is set to the third preset value, and the fourth preset state indicates that the first network device is abnormal, or indicates that the multi-machine backup group does not exist.

[0200] In some embodiments, the application submodule 822 may also be used to: before sending or not sending the routing information arriving at the first network device, if the value of the tracking item is the first preset value or the third preset value, set the cost value in the routing information arriving at the first network device to the original cost value; if the value of the tracking item is the second preset value, set the cost value in the routing information arriving at the first network device to the target cost value, and the target cost value is greater than the original cost value;

[0201] The application submodule 822 can be specifically used for: if the tracking item is a first preset value, routing information is sent to the second network device, and the cost value included in the routing information is the original cost value; if the tracking item is a second preset value, routing information is sent to the second network device, and the cost value included in the routing information is the target cost value; if the tracking item is a third preset value, routing information is sent to the second network device, and the cost value included in the routing information is the original cost value.

[0202] In some embodiments, the application submodule 822 may be specifically used to:

[0203] The original cost value is increased by a preset offset value; if the increased cost value is less than the maximum cost value, the increased cost value is used as the target cost value; if the increased cost value is greater than or equal to the maximum cost value, the maximum cost value is used as the target cost value; the cost value in the routing information reaching the first network device is set as the target cost value; or,

[0204] The preset cost value is used as the target cost value; and the cost value in the routing information reaching the first network device is set as the target cost value.

[0205] In some embodiments, the application submodule 822 may be specifically used to:

[0206] If the value of the tracking item is the first preset value or the third preset value, sending routing information to the first network device to the second network device;

[0207] If the value of the tracking item is a second preset value, the routing information reaching the first network device is suppressed from being sent to the second network device.

[0208] In the embodiment of the present application, when the multi-machine backup group is a VRRP backup group, the acquisition module 81 can be a VRRP module, and the application submodule 822 can be an IGP module. The tracking submodule 821 is used to associate the acquisition module 81 with the application submodule 822 to achieve joint actions between these modules. The linkage function adds a tracking submodule 821 between the application submodule 822 and the acquisition module 81, shields the differences between different acquisition modules 81 through the tracking submodule 821, and notifies the application submodule 822 of the monitoring results of the working status in a unified form, thereby simplifying the processing of the application submodule 822.

[0209] The linkage between the acquisition module 81 and the tracking submodule 821 can be seen in the following description:

[0210] The tracking submodule 821 associates the monitoring item in the acquisition module 81. The monitoring item is a table item used to record the working status of the device. The acquisition module 81 notifies the tracking submodule 821 of the value of the monitoring item, that is, the monitoring result.

[0211] When the acquisition module 81 detects that the device is in the Master state (the first preset state), the tracking submodule 821 sets the corresponding tracking item to the Positive state (the first preset value);

[0212] When the acquisition module 81 detects that the device is in the Backup state (the second preset state) or the Initialize state (the third preset state), the tracking submodule 821 sets the corresponding tracking item to the Negative state (the second preset value);

[0213] When the acquisition module 81 detects that the device is in the Inactive state or the VRRP backup group does not exist at all, the tracking submodule 821 sets the corresponding tracking item to the NotReady state (third preset value).

[0214] The linkage between the tracking submodule 821 and the application submodule 822 can be seen in the following description:

[0215] The application submodule 822 associates the tracking item in the tracking submodule 821 , and the tracking submodule 821 notifies the application submodule 822 of the value of the tracking item.

[0216] When the tracking item does not exist, there is no need to adjust the cost value of the routing information;

[0217] When the tracking item is in Positive state, there is no need to adjust the cost value of the routing information;

[0218] When the tracking item is in the NotReady state, there is no need to adjust the cost value of the routing information;

[0219] When the tracking item is in Negative state, it means that the device is in backup state. The cost value of the routing information is adjusted according to the user configuration, or the related TLV of the routing information is suppressed, thereby suppressing the sending of routing information.

[0220] In the technical solution provided in the embodiment of the present application, the first network device included in the multi-machine backup group and the second network device outside the multi-machine backup group are located in the multi-machine backup networking of SRv6 BE. The first network device obtains its own current working status, and uses its own current working status to send or not send routing information to itself, wherein the routing information includes a cost value, and the SRv6 PW tunnel with the smallest cost value is the SRv6 PW tunnel between the second network device and the main device in the multi-machine backup group. In this way, the second network device can distinguish the main device and the backup device included in the multi-machine backup group by the cost value in the routing information, so that the messages sent by the second network device to the multi-machine backup group side are all sent to the main device included in the multi-machine backup group, and will not be sent to the backup device included in the multi-machine backup group. This solves the problem of message detour in the multi-machine backup networking, thereby reducing bandwidth waste and improving message forwarding efficiency.

[0221] The present application also provides a network device, such as Fig.10 As shown, it includes a processor 101 and a machine-readable storage medium 102, wherein the machine-readable storage medium 102 stores machine-executable instructions that can be executed by the processor 101, and the processor 101 is prompted by the machine-executable instructions to implement any of the above-mentioned communication methods.

[0222] The machine-readable storage medium may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk storage. Optionally, the machine-readable storage medium may also be at least one storage device located away from the aforementioned processor.

[0223] The processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.

[0224] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, any of the above-mentioned communication methods is implemented.

[0225] In another embodiment provided in the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any of the communication methods described in the above embodiments.

[0226] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part 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 and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.

[0227] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0228] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, network device, storage medium and program product embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0229] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims

1. A communication method, characterized in that: Applied to a first network device, the first network device is in a multi-machine backup group, each network device included in the multi-machine backup group establishes an SRv6 PW tunnel with a second network device respectively, and multiple SRv6 PW tunnels form an equivalent path, the method includes: Obtaining a current working status of the first network device; According to the current working state, routing information reaching the first network device is sent or not sent, the routing information including a cost value, so that the second network device that receives at least one routing information selects the SRv6 PW tunnel with the smallest cost value as the path for forwarding the target message, and the SRv6 PW tunnel with the smallest cost value is the SRv6 PW tunnel between the second network device and the active device in the multi-machine backup group.

2. The method according to claim 1, characterized in that The first network device stores a tracking item; The sending or not sending the routing information to the first network device according to the current working state specifically includes: According to the current working state, setting the value of the tracking item; The routing information reaching the first network device is sent or not sent according to the value of the tracking item.

3. The method according to claim 2, characterized in that The step of setting the value of the tracking item according to the current working state includes: If the current working state is a first preset state, setting the tracking item in the first network device to a first preset value, the first preset state indicating that the first network device is an active device; If the current working state is a second preset state or a third preset state, setting the tracking item to a second preset value, the second preset state indicates that the first network device is a standby device, and the third preset state indicates that the first network device is in an initialization stage; If the current working state is a fourth preset state, the tracking item is set to the third preset value, and the fourth preset state indicates that the first network device is abnormal, or indicates that the multi-machine backup group does not exist.

4. The method according to claim 3, characterized in that Before sending or not sending the routing information reaching the first network device, the method further includes: If the value of the tracking item is the first preset value or the third preset value, or the tracking item does not exist, setting the cost value in the routing information reaching the first network device to the original cost value; If the value of the tracking item is the second preset value, setting the cost value in the routing information reaching the first network device to a target cost value, wherein the target cost value is greater than the original cost value; The sending or not sending the routing information reaching the first network device according to the value of the tracking item includes: If the tracking item is the first preset value, sending the routing information to the second network device, the cost value included in the routing information being the original cost value; If the tracking item is the second preset value, sending the routing information to the second network device, the cost value included in the routing information being the target cost value; If the tracking item is the third preset value, the routing information is sent to the second network device, and the cost value included in the routing information is the original cost value.

5. The method according to claim 4, characterized in that The step of setting the cost value in the routing information reaching the first network device as a target cost value specifically includes: The original cost value is increased by a preset offset value; if the increased cost value is less than the maximum cost value, the increased cost value is used as the target cost value; if the increased cost value is greater than or equal to the maximum cost value, the maximum cost value is used as the target cost value; the cost value in the routing information reaching the first network device is set to the target cost value; or, The preset cost value is used as the target cost value; and the cost value in the routing information reaching the first network device is set as the target cost value.

6. The method according to claim 2, characterized in that The sending or not sending the routing information reaching the first network device according to the value of the tracking item specifically includes: If the value of the tracking item is the first preset value or the third preset value, sending routing information to the first network device to the second network device; If the value of the tracking item is the second preset value, the routing information reaching the first network device is suppressed from being sent to the second network device.

7. A communication device, characterized in that: Applied to a first network device, the first network device is in a multi-machine backup group, each network device included in the multi-machine backup group establishes an SRv6 PW tunnel with a second network device respectively, and multiple SRv6 PW tunnels form an equivalent path, the device includes: An acquisition module, used to acquire the current working status of the first network device; A processing module, used for sending or not sending routing information reaching the first network device according to the current working state, the routing information including a cost value, so that the second network device that receives at least one routing information selects an SRv6 PW tunnel with a minimum cost value as a path for forwarding a target message, and the SRv6 PW tunnel with a minimum cost value is an SRv6 PW tunnel between the second network device and a master device in the multi-machine backup group.

8. The device according to claim 7, characterized in that The first network device stores a tracking item; The processing module comprises: A tracking submodule, used for setting the value of the tracking item according to the current working state; The application submodule is used to send or not send the routing information to the first network device according to the value of the tracking item.

9. The device according to claim 8, characterized in that The tracking submodule is specifically used for: If the current working state is a first preset state, setting the tracking item to a first preset value, the first preset state indicating that the first network device is an active device; If the current working state is a second preset state or a third preset state, setting the tracking item to a second preset value, the second preset state indicates that the first network device is a standby device, and the third preset state indicates that the first network device is in an initialization stage; If the current working state is a fourth preset state, the tracking item is set to the third preset value, and the fourth preset state indicates that the first network device is abnormal, or indicates that the multi-machine backup group does not exist.

10. The device according to claim 9, characterized in that The application submodule is further configured to: before sending or not sending the routing information reaching the first network device, if the value of the tracking item is the first preset value or the third preset value, set the cost value in the routing information reaching the first network device to the original cost value; If the value of the tracking item is the second preset value, setting the cost value in the routing information reaching the first network device to a target cost value, wherein the target cost value is greater than the original cost value; The application submodule is specifically used to: if the tracking item is the first preset value, send the routing information to the second network device, and the cost value included in the routing information is the original cost value; if the tracking item is the second preset value, send the routing information to the second network device, and the cost value included in the routing information is the target cost value; if the tracking item is the third preset value, send the routing information to the second network device, and the cost value included in the routing information is the original cost value.

11. The device according to claim 10, characterized in that The application submodule is specifically used for: The original cost value is increased by a preset offset value; if the increased cost value is less than the maximum cost value, the increased cost value is used as the target cost value; if the increased cost value is greater than or equal to the maximum cost value, the maximum cost value is used as the target cost value; the cost value in the routing information reaching the first network device is set as the target cost value; or, The preset cost value is used as the target cost value; and the cost value in the routing information reaching the first network device is set as the target cost value.

12. The device according to claim 8, characterized in that The application submodule is specifically used for: If the value of the tracking item is the first preset value or the third preset value, the routing information reaching the first network device is sent to the second network device; if the value of the tracking item is the second preset value, the routing information reaching the first network device is suppressed from being sent to the second network device.

Citation Information

Patent Citations

  • Method and device for determining backup path and nonvolatile storage medium

    CN117857437A

  • Routing method and routing device

    WO2020200200A1

  • Message forwarding method, routing information publishing method, apparatus and system

    WO2021169258A1

  • Traffic steering for service function chaining (SEC) in next generation cellular networks

    WO2023034517A1

  • Network device and network manager for a network and methods for load balancing in a network

    WO2023147884A1