Message transmission method, device and system

By forwarding or discarding BUM messages based on the message SID and device role in the EVPN system, the flexibility and reliability issues of message transmission in the EVPN multi-home multi-active networking mode are solved, ensuring that CE devices receive correct BUM messages.

CN114915601BActive Publication Date: 2025-09-05HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110185415.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-02-10
Publication Date
2025-09-05
Estimated Expiration
2041-02-10

AI Technical Summary

Technical Problem

In EVPN multi-homing multi-active networking mode, when the SRv6 mirror FRR mechanism is applied, BUM message transmission has flexibility and reliability issues, which may cause message loss or duplication.

Method used

In the EVPN system, network devices decide whether to forward or discard packets based on the packet's SID and their own role (DF or NDF), ensuring that the receiving end receives only correct BUM packets.

Benefits of technology

This improves the flexibility and reliability of message transmission and prevents CE devices from receiving duplicate or lost BUM messages.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114915601B_ABST
    Figure CN114915601B_ABST
Patent Text Reader

Abstract

A message transmission method, device, and system belong to the field of network technology. The EVPN system includes a third network device that is multi-homed to a first network device and a second network device. The first network device receives a first message including a first SID and a second SID. The first message is a message belonging to BUM traffic. The first SID is a SID used by the first network device to protect the second network device. The second SID is used to indicate the first service to which the first message belongs. The first network device forwards the first message to the third network device based on the first SID in the first message and the fact that the first network device is an NDF used to carry the first service. Alternatively, the first network device discards the first message based on the first SID in the first message and the fact that the first network device is a DF used to carry the first service. This application helps to improve the accuracy and flexibility of message transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] In a virtual private network (VPN), service forwarding can be performed through a segment routing internet protocol version 6 (SRv6) traffic engineering (TE) policy tunnel. To prevent service forwarding failures caused by failures in the tail node device of the SRv6 TE policy tunnel, a protection device is usually deployed for the tail node device of the SRv6 TE policy tunnel based on the SRv6 mirror fast re-route (FRR) mechanism to protect the tail node device (for example, a function for protecting the tail node device of the SRv6 TE policy tunnel is configured in the devices in the VPN network). When a device connected to the tail node device in the SRv6 TE policy tunnel senses that the tail node device of the SRv6 TE policy tunnel is unreachable, the penultimate hop device forwards the message that should have been forwarded to the tail node device to the protection device of the tail node device, so that the protection device can forward the message. The tail node device and the protection device can both be provider edge (PE) devices, and the tail node device and the protection device are connected to the same customer edge (CE) device. In the SRv6 mirror FRR mechanism, the protection device forwards the message that should be forwarded by the tail node device to the CE device to the CE device.

[0003] An Ethernet virtual private network (EVPN) is a typical VPN network. In the EVPN multi-homed multi-active networking mode, a CE device can connect to multiple PE devices. To prevent the CE device from receiving duplicate broadcast, unknown unicast, and multicast (BUM) messages from these multiple PE devices, one PE device can be identified among the multiple PE devices as the designated forwarder (DF) carrying a specific service (for ease of description, this service will be referred to as service A). The PE devices other than the DF are designated as non-designated forwarders (NDFs) carrying service A. The DF is responsible for forwarding BUM messages for service A destined for the CE device, while the NDF does not need to forward BUM messages for service A destined for the CE device.

[0004] However, when the SRv6 mirror FRR mechanism is applied to BUM message forwarding in an EVPN multi-homing, multi-active networking scenario, if the egress device of the SRv6 TE policy tunnel is determined as the DF carrying service A, and the protection device of the egress device is determined as the NDF carrying service A, upon receiving a BUM message for service A from the previous hop device in the SRv6 TE policy tunnel according to the FRR mechanism, the protection device of the egress device will discard the BUM message, resulting in BUM message loss. If the egress device of the SRv6 TE policy tunnel is determined as the NDF carrying service A, and the protection device of the egress device is determined as the DF carrying service A, upon receiving a BUM message for service A from the previous hop device in the SRv6 TE policy tunnel, the protection device of the egress device will forward the BUM message to the CE device, potentially causing the CE device to receive duplicate BUM messages. Therefore, the above message transmission scheme will result in message forwarding errors. Summary of the Invention

[0005] This application provides a message transmission method, device, and system that help improve the accuracy and flexibility of message transmission. The technical solution of this application is as follows:

[0006] In a first aspect, a message transmission method is provided, which is applied to an EVPN system including a first network device, a second network device and a third network device, wherein the third network device is multi-homed to the first network device and the second network device, the method comprising: the first network device receives a first message including a first segment identifier (SID) and a second SID, the first message being a message belonging to BUM traffic, the first SID being a SID used by the first network device to protect the second network device, and the second SID being used to indicate a first service to which the first message belongs; the first network device forwards the first message to the third network device based on the first SID in the first message and the fact that the first network device is an NDF used to carry the first service; or the first network device discards the first message based on the first SID in the first message and the fact that the first network device is a DF used to carry the first service.

[0007] The technical solution provided by the present application is that after the first network device used to protect the second network device receives the first message belonging to the BUM traffic, if the first network device is an NDF used to carry the first service (the service to which the first message belongs), the first network device forwards the first message to the third network device, thereby avoiding the third network device from being unable to receive the first message; if the first network device is a DF used to carry the first service, the first network device discards the first message, thereby avoiding the third network device from receiving duplicate first messages. In the technical solution provided by the present application, regardless of whether the first network device used to protect the second network device is a DF or an NDF that carries the first service, it can ensure that the third network device that is multi-homed to the first network device and the second network device receives the first message belonging to the first service, and can avoid the third network device from receiving duplicate first messages. The flexibility and reliability of this message transmission solution are both high.

[0008] Optionally, the first network device forwards the first message to the third network device based on the first SID in the first message and the fact that the first network device is an NDF for carrying the first service, including: the first network device determines that the first SID in the first message matches the first SID table in the first network device; the first network device determines that the first network device is an NDF for carrying the first service; the first network device forwards the first message to the determined third network device based on the first SID in the first message matches the first SID table in the first network device and the fact that the first network device is an NDF for carrying the first service. The first SID table is a local SID table of the first network device, and the first SID table includes at least one protection table entry. Each protection table entry may record a mirror SID issued by the first network device for protecting other devices (referring to devices other than the first network device) and a corresponding relationship between the locator of the other device. The mirror SID in each protection table entry is used to protect the device indicated by the locator corresponding to the mirror SID by the first network device.

[0009] Optionally, before the first network device receives the first message including the first segment identifier SID and the second SID, the method further includes: the first network device allocating and publishing the first SID.

[0010] In the technical solution provided by this application, a first network device publishing a first SID can facilitate other devices in the EVPN system to learn the first SID, which is used by the first network device to protect a second network device. For example, this facilitates the other devices to learn that the first network device is a protection device for the second network device, or that the first network device can provide protection for the second network device.

[0011] Optionally, the second network device is an end node device on a first forwarding path to the third network device, and the first network device is an end node device on a second forwarding path to the third network device. The first forwarding path and the second forwarding path may be, for example, paths in an SRv6 TE policy tunnel.

[0012] Optionally, the first SID is a mirror SID used by the first network device to form egress protection for the second network device. The mirror SID used to form egress protection can be, for example, the End.M SID defined in the working group draft draft-ietf-rtgwg-srv6-egress-protection-02 published by the Internet Engineering Task Force (IETF).

[0013] Optionally, the third network device is dual-homed to the first network device and the second network device, wherein the third network device may be a CE device, and the first network device and the second network device may both be PE devices.

[0014] In a second aspect, a first network device is provided, comprising modules for executing the method provided in the first aspect or any optional embodiment of the first aspect. The modules may be implemented based on software, hardware, or a combination of software and hardware, and the modules may be arbitrarily combined or divided based on the specific implementation.

[0015] According to a third aspect, an EVPN system is provided, comprising a first network device, a second network device, and a third network device, wherein the third network device is multi-homed and connected to the first network device and the second network device. The first network device is configured to receive a first message including a first SID and a second SID, wherein the first message is a message belonging to BUM traffic, the first SID is a SID used by the first network device to protect the second network device, and the second SID is used to indicate the first service to which the first message belongs; the first network device is further configured to forward the first message to the third network device based on the first SID in the first message and the fact that the first network device is an NDF used to carry the first service; or the first network device is further configured to discard the first message based on the first SID in the first message and the fact that the first network device is a DF used to carry the first service.

[0016] The technical solution provided by the present application is that after the first network device used to protect the second network device receives the first message belonging to the BUM traffic, if the first network device is an NDF used to carry the first service (the service to which the first message belongs), the first network device forwards the first message to the third network device, thereby avoiding the third network device from being unable to receive the first message; if the first network device is a DF used to carry the first service, the first network device discards the first message, thereby avoiding the third network device from receiving duplicate first messages. In the technical solution provided by the present application, regardless of whether the first network device used to protect the second network device is a DF or an NDF that carries the first service, it can ensure that the third network device that is multi-homed to the first network device and the second network device receives the first message belonging to the first service, and can avoid the third network device from receiving duplicate first messages. The flexibility and reliability of this message transmission solution are both high.

[0017] Optionally, the first network device is specifically used to: determine that the first SID in the first message matches the first SID table in the first network device; determine that the first network device is an NDF used to carry the first service; and forward the first message to a determined third network device based on the first SID in the first message matching the first SID table in the first network device and the first network device being an NDF used to carry the first service.

[0018] Optionally, the first network device is further configured to allocate and publish the first SID before receiving the first message including the first SID and the second SID.

[0019] The technical solution provided by the present application enables the first network device to publish the first SID, which can facilitate other devices in the EVPN system to learn the first SID for the first network device to protect the second network device.

[0020] Optionally, the EVPN system also includes a fourth network device, which is located on the same forwarding path as the second network device to the third network device. The fourth network device is used to receive the first SID issued by the first network device, and generate an FRR table entry for protecting the second network device based on the first SID, which is the SID used by the first network device to protect the second network device.

[0021] Optionally, the fourth network device is further configured to determine that the second network device is unreachable, and send a first message including the first SID and the second SID to the first network device according to the FRR table entry. The unreachability of the second network device may be, for example, a failure of the second network device or a failure of a link between the fourth network device and the second network device.

[0022] The technical solution provided in the present application is that the fourth network device generates an FRR table entry for protecting the second network device. In this way, when the fourth network device determines that the second network device is unreachable, it can send a first message including the first SID and the second SID to the first network device according to the FRR table entry, so that the first network device can forward the first message to the third network device or discard the first message according to the first SID carried in the first message and the NDF or DF of the first network device for carrying the first service, which helps to improve the flexibility and reliability of message transmission.

[0023] Optionally, the second network device is an end node device on a first forwarding path to the third network device, and the first network device is an end node device on a second forwarding path to the third network device. The fourth network device may be the penultimate hop device on the first forwarding path.

[0024] Optionally, the first SID is a mirror SID used by the first network device to form tail node protection for the second network device.

[0025] Optionally, the third network device is dual-homed to the first network device and the second network device. The third network device may be a CE device, and the first network device and the second network device may both be PE devices.

[0026] In a fourth aspect, a network device is provided, the network device including a memory and a processor;

[0027] Memory is used to store computer programs;

[0028] The processor is used to execute the computer program stored in the memory so that the network device executes the message transmission method provided by the first aspect or any optional manner of the first aspect.

[0029] In a fifth aspect, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed, the message transmission method provided in the first aspect or any optional method of the first aspect is implemented.

[0030] In a sixth aspect, a computer program product is provided, which includes a program or code. When the program or code is run on a computer, the computer executes the message transmission method provided in the first aspect or any optional method of the first aspect.

[0031] In a seventh aspect, a chip is provided, which includes a programmable logic circuit and / or program instructions, and when the chip is running, it is used to implement the message transmission method provided by the first aspect or any optional method of the first aspect.

[0032] In an eighth aspect, an EVPN system is provided, comprising: a first network device, a second network device, and a third network device, wherein the third network device is multi-homed and connected to the first network device and the second network device; the first network device is the first network device provided in the second aspect above; or, the first network device is the network device provided in the fourth aspect above.

[0033] Optionally, the first network device and the second network device are PE devices, and the third network device is a CE device.

[0034] The beneficial effects of the technical solution provided by this application are:

[0035] The technical solution provided by the present application is applied to an EVPN system including a first network device, a second network device and a third network device, wherein the third network device is multi-homed to the first network device and the second network device, and the first network device is used to protect the second network device. After the first network device receives the first message belonging to the BUM traffic, if the first network device is an NDF for carrying the first service, the first network device forwards the first message to the third network device, thereby avoiding the third network device from being unable to receive the first message. If the first network device is a DF for carrying the first service, the first network device discards the first message, thereby avoiding the third network device from receiving duplicate first messages. In the message transmission solution provided by the present application, regardless of whether the first network device is a DF or an NDF for carrying the first service, it can ensure that the third network device multi-homed to the first network device and the second network device receives the first message belonging to the first service, and can avoid the third network device from receiving duplicate first messages. The flexibility and reliability of this message transmission solution are both high. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 This is a schematic diagram of the structure of a VPN network provided in an embodiment of the present application;

[0037] Figure 2 This is a schematic diagram of message transmission in an EVPN network provided by an embodiment of the present application;

[0038] Figure 3 This is a schematic diagram of a message transmission involved in an embodiment of the present application;

[0039] Figure 4 This is a schematic diagram of another message transmission involved in an embodiment of the present application;

[0040] Figure 5 This is a flow chart of a message transmission method provided by an embodiment of the present application;

[0041] Figure 6 This is a schematic diagram of a message transmission method provided in an embodiment of the present application;

[0042] Figure 7 This is a schematic diagram of another message transmission method provided in an embodiment of the present application;

[0043] Figure 8 This is a flowchart of another message transmission method provided by an embodiment of the present application;

[0044] Figure 9 This is a schematic diagram of the logical structure of a first network device provided in an embodiment of the present application;

[0045] Figure 10This is a schematic diagram of the hardware structure of a network device provided in an embodiment of the present application;

[0046] Figure 11 This is a schematic diagram of the hardware structure of another network device provided in an embodiment of the present application;

[0047] Figure 12 This is a schematic diagram of the structure of an EVPN system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0048] In order to make the principles, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0049] The embodiments of the present application relate to an egress node protection solution. Before describing the embodiments of the present application, the relevant contents of the egress node protection solution are first introduced.

[0050] The egress protection solution can be applied to VPN networks, such as Layer 2 virtual private networks (L2VPN), Layer 3 virtual private networks (L3VPN), or EVPN networks. A VPN network includes multiple PE devices, and tunnels can be established between them to forward traffic. In some scenarios, tunnels are also referred to as paths, and the two concepts can be synonymous. Alternatively, in other scenarios, a tunnel can include multiple optional paths, so the path mentioned here can also refer to a specific forwarding path within the tunnel.

[0051] Typically, a VPN network includes edge access devices and core devices. PE devices are connected via the core devices, and edge access devices are connected to PE devices. PE devices can forward traffic between edge access devices via tunnels. Edge access devices can be CE devices, and core devices can be provider (P) devices. PE, CE, and P devices can all be packet transport network (PTN) devices, routers, switches, virtual routers, or virtual switches.

[0052] The tunnel established between PE devices can be an SRv6 TE policy tunnel. SRv6 TE policy is a new tunnel traffic diversion technology developed based on SRv6 technology. An SRv6 TE policy tunnel is represented as a segment list of a specified path, called a SID list. Each SID list indicates the end-to-end path from the source to the destination and instructs devices in the network to follow the specified path (that is, it instructs devices in the network to forward services along the specified path). If a message is imported into an SRv6 TE policy tunnel, the SID list is typically added to the message by the head node device of the SRv6 TE policy tunnel. Other devices in the SRv6 TE policy tunnel forward the message by executing the instructions embedded in the SID list. For example, the head node device of the SRv6 TE policy tunnel can encapsulate a segment routing header (SRH) extension header in the message, and the SID list is located in the SRH extension header.

[0053] After a service iterates through an SRv6 TE policy tunnel (for example, after a SID list is added to a packet), the packet is forwarded along the path specified by the SID list and forwarded to the user side by the egress device of the SRv6 TE policy tunnel. If the egress device of the SRv6 TE policy tunnel becomes unreachable (for example, if the egress device fails or the link between the previous-hop device and the egress device fails), service forwarding may fail. Therefore, the egress device of the SRv6 TE policy tunnel must be protected. Typically, a protection device can be deployed in a VPN network for the egress device of an SRv6 TE policy tunnel based on the SRv6 mirror FRR mechanism. This allows the previous-hop device of the SRv6 TE policy tunnel to detect that the egress device of the SRv6 TE policy tunnel is unreachable. The SRv6 mirror FRR mechanism can be used to forward packets intended for the egress device to the egress device's protection device, which then forwards the packets, thereby avoiding service forwarding failures. The protection device for the egress device refers to a device used to protect the egress. A device in the VPN network can be configured to protect the egress device of an SRv6 TE policy tunnel. A device that protects the egress device of an SRv6 TE policy tunnel is referred to as the protection device for the egress device.

[0054] For example, please refer to Figure 1 , which shows a schematic diagram of the structure of a VPN network provided by an embodiment of the present application. The VPN network can be an L2VPN network, an L3VPN network or an EVPN network. The VPN network includes multiple PE devices, multiple CE devices and multiple P devices. For example Figure 1 The figure shows three PE devices, PE1 to PE3, two CE devices, CE1 to CE2, and two P devices, P1 to P2. CE1 is connected to PE3, PE1 to PE3 are connected to P1 to P2, PE1 is connected to PE2, and CE2 is connected to PE1 and PE2. A tunnel can be established between PE3 and PE2 to forward traffic between CE1 and CE2. The devices on this tunnel include PE3, P1, and PE2. PE3 can be the head node device of the tunnel, PE2 can be the tail node device of the tunnel, and P1 is the penultimate hop device on the tunnel and the previous hop device connected to PE1 and PE2, respectively. When forwarding services between CE1 and CE2, CE1 can forward a packet to PE3. PE3 then adds a SID list to the packet, indicating path W1 (path W1 is PE3->P1->PE2, which can be an SRv6 TE policy tunnel). PE3, P1, and PE2 forward the packet based on this SID list to CE2. This SID list can indicate either a strict explicit path or a loose path.

[0055] The tunnel between PE3 and PE2 can be an SRv6 TE policy tunnel. To prevent service forwarding failure caused by unreachable egress device of the SRv6 TE policy tunnel (for example, failure of the egress device of the SRv6 TE policy tunnel or failure of the link between the egress device of the SRv6 TE policy tunnel and the penultimate hop device), PE1 can be configured as the protection device for PE2 based on the SRv6 mirror FRR mechanism (that is, PE1 is configured to protect PE2). In this way, when forwarding services through the SRv6 TE policy tunnel, if P1 detects that PE2 is unreachable, P1 forwards the packet originally intended for PE2 to PE1 based on the SRv6 mirror FRR mechanism. PE1 then forwards the packet to CE2, preventing packet loss and thus avoiding service forwarding failure and improving service forwarding reliability.

[0056] The method of providing protection for the egress device of an SRv6 TE policy tunnel is called egress protection. Figure 1This section introduces the principles of tail node protection. To facilitate understanding, we first introduce SIDs.

[0057] A SID is a 128-bit value that can be an instantiated Internet Protocol version 6 (IPv6) address. A SID can identify a node / link, a Layer 2 / Layer 3 VPN instance, such as an EVPN instance, or a service. A SID is a network instruction. A SID consists of a locator and a function. Its structure is shown in Table 1 below:

[0058] Table 1

[0059] locator function

[0060] The locator portion primarily performs routing functions, routing packets to the device that publishes the SID, thus enabling network addressing. The location portion has two important properties: routing and aggregation. The location portion of a SID is a variable-length portion.

[0061] The function part identifies the function of the device, such as a forwarding behavior or a service of the device. It instructs the device that publishes the SID to perform the corresponding action, which is equivalent to the operation code of a calculation instruction.

[0062] As an optional implementation, the SID also includes an argument portion, which is a parameter, service, or any other related information required when executing the instruction.

[0063] SIDs typically have a type, and the functional components of different SID types indicate different actions. For example, SIDs in SRv6 include End SID, End.X SID, End.DT4 SID, End.DT6 SID, End.DX2 SID, End.DT2U SID, End.DT2M SID, End.OP SID, and End.M SID. The End.M SID is primarily used in tail node protection scenarios. As a possible example, the mirrored SID used to form tail node protection in the embodiments of the present application may be the End.M SID.

[0064] The following uses the SRv6 TE policy tunnel in the EVPN network as an example. Figure 1 This section describes the principle of tail node protection.

[0065] refer to Figure 1An SRv6 TE policy tunnel (PE3—>P1—>PE2) can be established between PE3 and PE2. PE3 is the head node device of this SRv6 TE policy tunnel, PE2 is the tail node device of this SRv6 TE policy tunnel, and P1 is the penultimate hop device of this SRv6 TE policy tunnel. IPv6 EVPN neighbors are deployed between PE2 and PE3, and between PE2 and PE1. The process of configuring PE1 as a protection device for PE2 (that is, configuring PE1 to provide protection for PE2) is as follows:

[0066] S101. Configure locators on PE1 and PE2. For example, configure the locator on PE1 as A1:: / 64 and the locator on PE2 as A2:: / 64. For ease of description, the locator configured on PE1 is referred to as PE1's locator, and the locator configured on PE2 is referred to as PE2's locator.

[0067] S102: Configure an EVPN instance and VPN SID on PE1 and PE2, respectively, and enable the IPv6 prefix SID information publishing capability on PE1 and PE2 so that PE1 and PE2 carry the VPN SID when publishing IPv6 prefix information. The VPN SID configured on PE1 is bound to the EVPN instance configured on PE1, and the VPN SID configured on PE2 is bound to the EVPN instance configured on PE2. For ease of description, this document refers to the EVPN instance configured on PE1 as EVPN instance 1A, and the VPN SID configured on PE1 and bound to EVPN instance 1A as the SID of EVPN instance 1A (referred to as VPN SID 1A). The EVPN instance configured on PE2 is referred to as EVPN instance 2A, and the VPN SID configured on PE2 and bound to EVPN instance 2A is referred to as the SID of EVPN instance 2A (referred to as VPN SID 2A). EVPN instance 1A and EVPN instance 2A can be used to carry the same service. This embodiment uses the VPN SID generated by configuration as an example. In actual applications, the VPN SID can also be dynamically generated or dynamically obtained from other devices, which is not limited in this application.

[0068] S103: CE2 publishes the private network route to PE2. After receiving the private network route, PE2 encapsulates the private network route into an EVPN route and publishes it to PE3 and PE1. The EVPN route carries the SID of EVPN instance 2A (e.g., VPN SID 2A), route target (RT), route distinguisher (RD), and color information.

[0069] S104: Configure End.M SID in PE1 to enable PE1 to protect PE2. For example, configure a protection entry for protecting PE2 in the local SID table of PE1. The protection entry can be<End.M SID,locator> The locator in the protection entry refers to the locator of the device to be protected by the device (e.g., PE1) that publishes the End.M SID in the protection entry. For example, the locator in the protection entry is the locator configured in PE2 in S101 (i.e., the locator of PE2, e.g., A2:: / 64), indicating that the device to be protected by the device (e.g., PE1) that publishes the End.M SID in the protection entry is PE2. For example, the End.M SID is A1::100, and the protection entry is specifically<A1::100,A2:: / 64> .

[0070] S105, PE1 floods the End.M SID used by PE1 to protect PE2 based on the interior gateway protocol (IGP). For example, PE1 protects the entry<End.MSID,locator> After PE1 floods the End.M SID, all devices in the IGP network can receive the End.M SID.

[0071] S106, after P1 receives the End.M SID issued by PE1 for protecting PE2 (for example, P1 receives the protection entry<End.M SID,locator> Afterwards, an FRR entry for the PE2 locator segment is generated based on the End.M SID. This FRR entry indicates that PE1 is the backup next-hop device for P1. The action (or instruction) corresponding to this FRR entry is to push the End.M SID (for example, A2::100) into the message. This FRR entry is used to enable PE1 to protect PE2.

[0072] S107, after PE1 receives the EVPN route from PE2, it matches the RT carried in the EVPN route with the RT of EVPN instance 1A in PE1 and crosses the EVPN route to EVPN instance 1A in PE1. Then, PE1 matches the VPN SID carried in the EVPN route (that is, the SID of EVPN instance 2A, for example, VPN SID 2A) with the protection table entry of PE1.<End.M SID,locator> The locator in the EVPN route is matched (e.g., the longest match). If the VPN SID carried in the EVPN route matches the protection entry<End.M SID,locator> locator matches, PE1 generates a mapping table between the remote SID and the local EVPN instance based on the VPN SID carried in the EVPN route and the EVPN instance 1A in PE1. In the mapping table between the remote SID and the local EVPN instance generated by PE1, the remote SID refers to the SID issued by the remote device of PE1 (including but not limited to PE2), and the local EVPN instance refers to the EVPN instance configured in PE1. For example, the mapping table between the remote SID and the local EVPN instance generated by PE1 is<remote VPN SID,local EVPN> The mapping table, where the local EVPN in the mapping table refers to identification information used to identify the local EVPN instance of PE1, for example, the identifier of the local EVPN instance.

[0073] After S101 to S107, the process of configuring PE1 as the protection device of PE2 is completed (that is, after S101 to S107, PE1 has the function of protecting PE2). Figure 1Under normal circumstances (for example, if the link between P1 and PE2 is intact), PE3 forwards the packet from CE1 to PE2 via path W1 (path W1 can be an SRv6 TEpolicy tunnel, and path W1 is: PE3->P1->PE2) (for example, the path indicated by the SID list added by PE3 in the packet is path W1). During packet forwarding on path W1, if P1 detects that its next-hop device (that is, PE2) on path W1 is unreachable, P1, based on the SRv6 mirror FRR mechanism and the FRR entry recorded in P1 for protecting PE2, inserts the End.M SID used by PE1 to protect PE2 (for example, A2::100 described above) into the packet and forwards the packet to PE1 based on this End.M SID. After such processing, P1 switches the forwarding path of the message from path W1 to path W2 (path W2 is: PE3->P1->PE1). Path W2 can be called the protection path or FRR path of path W1. After PE1 receives the message, it determines that the End.MSID in the message is the SID issued by PE1 by searching the local SID table in PE1. PE1 searches the mapping table between the remote SID and the local EVPN instance in PE1 (for example, the mapping table described above) based on the SID in the message indicating the service to which the message belongs (for example, service A) (the SID in the message indicating the service to which the message belongs can be the SID of EVPN instance 2A in PE2, for example, VPNSID2A).<remote VPN SID,local EVPN> Mapping table) to determine the EVPN instance used to carry service A in PE1 (that is, the EVPN instance corresponding to the SID carried in the message for indicating that the message belongs to service A, such as EVPN instance 1A), and PE1 forwards the message to CE2 through the EVPN instance 1A.

[0074] In the EVPN multi-home multi-active networking mode, a CE device can be connected to multiple PE devices, that is, a CE device can be multi-homed to multiple PE devices. In this way, there can be multiple paths to the CE device in the EVPN network (for example, SRv6TE policy tunnels), the head node devices of the multiple paths can be the same device, and the tail node devices of the multiple paths are the multiple PE devices to which the CE device is multi-homed. For the scenario of transmitting BUM messages, the head node device copies the BUM message and then forwards the BUM message to the CE device through the multiple paths (for example, the head node device sends the BUM message to the tail node device of the multiple paths). It can be understood that if the BUM messages forwarded through the multiple paths all reach the CE device, the CE device will receive duplicate BUM messages. To prevent CE devices connected to multiple PEs from receiving duplicate BUM messages from these multiple PEs, the EVPN network introduces a DF election mechanism. This mechanism determines one PE device among the multiple PEs connected to the same CE device as the DF carrying a specific service (for example, service A). The PE devices other than this DF in the multiple PEs serve as the NDFs carrying service A. The DF is responsible for forwarding BUM messages belonging to service A sent to the CE device, while the NDF does not need to forward BUM messages belonging to service A sent to the CE device. BUM messages refer to messages belonging to BUM traffic. For ease of description, this application will refer to messages belonging to BUM traffic as BUM messages.

[0075] For example, please refer to Figure 2 , which shows a schematic diagram of message transmission in an EVPN network provided by an embodiment of the present application, the networking mode of the EVPN network can be an EVPN dual-home dual-active networking mode. Figure 2 As shown, CE2 is connected to PE1 and PE2, dual-homed to both PE1 and PE2 (that is, dual-homed to PE1 and PE2). CE1 is connected to PE3, single-homed to PE3. PE1 and PE2 deploy EVPN dual-homing and active-active. Two paths can exist from CE1 to CE2 in this EVPN network: path W1 (PE3—>P1—>PE2) and path W3 (PE3—>P2—>PE1). The head node of both paths W1 and W3 is PE3, the tail node of path W1 is PE2, and the tail node of path W3 is PE1. PE2 and PE1 are the two PE devices to which CE2 is multi-homed. After PE3 receives the BUM message belonging to service A sent by CE1 to CE2, it copies the BUM message to obtain two copies of the BUM message, and then forwards the BUM message to CE2 through path W1 and path W3 respectively (for example, PE3 forwards the BUM message to PE2 and PE1 respectively). Figure 2For example, PE2 is the DF carrying service A, and PE1 is the NDF carrying service A. After receiving the BUM message for service A, PE2 forwards it to CE2. After receiving the BUM message for service A, PE1 discards it. This way, CE2 only receives the copy of the BUM message forwarded by PE2 and does not receive duplicate BUM messages.

[0076] However, when the SRv6 mirror FRR mechanism is applied to the BUM message forwarding scenario in the EVPN multi-homing multi-active networking mode, if the tail node device of the path (such as the SRv6 TE policy tunnel) is the DF carrying service A, and the protection device of the tail node device (that is, the device used to protect the tail node device) is the NDF carrying service A, the penultimate hop device of the path will forward the BUM message belonging to service A that should have been forwarded to the tail node device to the protection device of the tail node device based on the SRv6 mirror FRR mechanism when the tail node device is unreachable. Since the protection device of the tail node device is the NDF carrying service A, the protection device of the tail node device will discard the BUM message. Moreover, as a device in another path to the CE device, the protection device of the tail node device will discard the BUM message belonging to service A received from the other path, resulting in the loss of the BUM message. If the tail device of a path is an NDF carrying service A, and its protection device is a DF carrying service A, then the penultimate hop on the path will, when the tail device is unreachable, forward the BUM message for service A that should have been forwarded to the tail device to its protection device based on the SRv6 mirror FRR mechanism. Since the tail device's protection device is the DF carrying service A, the tail device's protection device will forward the BUM message to the CE device. Furthermore, as a device on another path to the CE device, the tail device's protection device will forward the BUM message for service A received from this other path to the CE device. Consequently, the tail device's protection device will forward two copies of the BUM message to the CE device, causing the CE device to receive duplicate BUM messages. Therefore, applying the SRv6 mirror FRR mechanism to BUM message forwarding in EVPN multi-homing, multi-active networking mode results in low flexibility and poor reliability in BUM message transmission.

[0077] For example, see Figure 3 and Figure 4 , which shows a schematic diagram of two message transmissions involved in the embodiment of this application. Figure 3 and Figure 4As shown in the figure, the path from CE1 to CE2 in the EVPN network includes path W1 (PE3—>P1—>PE2) and path W3 (PE3—>P2—>PE1). PE3 is the head node device of path W1 and path W3, PE2 is the tail node device of path W1, P1 is the penultimate hop device of path W1, PE1 is the tail node device of path W3, and PE1 is the protection device of PE2 (that is, PE1 has the function of protecting PE2). During the process of forwarding BUM messages on path W1, when P1 senses that PE2 is unreachable (for example, Figure 3 and Figure 4 When the link between P1 and PE2 fails, P1 forwards the BUM message to PE1 based on the SRv6 mirror FRR mechanism and the FRR table entry used to protect PE2 recorded in P1. Figure 3 As shown in FIG, PE1 is the NDF that carries the service to which the BUM message belongs (for example, service A). PE1 will discard the BUM message received from P1, and PE1 will also discard the BUM message received from P2. Therefore, the BUM message cannot reach CE2, that is, the BUM message is lost. In another possible situation, such as Figure 4 As shown in the figure, PE1 is the DF that carries the service to which the BUM message belongs (for example, service A). PE1 will forward the BUM message received from P1 to CE2, and PE1 will also forward the BUM message received from P2 to CE, causing CE2 to receive duplicate BUM messages. As can be seen, when the SRv6 mirror FRR mechanism is applied to the BUM message forwarding scenario in the EVPN multi-homing multi-active networking mode, the CE device that is multi-homed to multiple PE devices will either receive duplicate BUM messages from these multiple PE devices or not receive BUM messages from these multiple PE devices. As a result, the flexibility and reliability of BUM message transmission are low.

[0078] It should be noted that the tail node protection solution is a protection solution implemented before the network fails and converges. After the network converges, the devices in the network can determine the new forwarding path for service forwarding. Figure 1As shown in the figure, a tunnel (for example, an SRv6 TE policy tunnel) is established between PE3 and PE2. PE3 forwards packets destined for CE2 to PE2 through this tunnel. During packet forwarding in this tunnel, P1 detects a failure in the link between P1 and PE2. Before route convergence, P1 forwards the packet to PE1 using the egress protection mechanism. After route convergence, PE3 can forward packets destined for CE2 to PE1 through path W2 (PE3->P1->PE1) according to the normal forwarding process. After route convergence, P1 can directly forward packets destined for CE2 through PE1 based on the converged route, without having to push the End.M SID to forward packets using egress protection.

[0079] It should also be noted that for the sake of convenience of description, the above text takes service A as an example. Those skilled in the art should understand that the above description of service A is only for example and does not limit service A to a specific service. The service A described in the embodiment of the present application can be any VPN service (such as EVPN service) that can be carried by a VPN network (such as an EVPN network).

[0080] In addition, in the present application, a network and a system may be equivalent concepts. For example, the EVPN system described below and the EVPN network described in the foregoing description may be equivalent concepts.

[0081] In view of the above-mentioned problems existing in applying the SRv6 mirror FRR mechanism to the BUM message forwarding scenario in the EVPN multi-home multi-active networking mode, an embodiment of the present application provides a message transmission solution, which can be applied to the BUM message forwarding scenario in the EVPN multi-home multi-active networking mode, and can be combined with the SRv6 mirror FRR mechanism to perform tail node protection. The message transmission solution of the present application can be applied to an EVPN system, which includes a first network device, a second network device, and a third network device, the third network device is multi-homed to the first network device and the second network device, the second network device can be the tail node device on the forwarding path to the third network device, and the first network device can be the protection device of the second network device (meaning that the first network device can protect the second network device, for example Figure 1As shown, the first network device is PE1, the second network device is PE2, and the third network device is CE2). After the first network device receives the first message belonging to the BUM traffic, if the first network device is an NDF for carrying the first service (referring to the service to which the first message belongs), the first network device forwards the first message to the third network device, thereby avoiding the third network device from failing to receive the first message; if the first network device is a DF for carrying the first service, the first network device discards the first message, thereby avoiding the third network device from receiving duplicate first messages. In the message transmission scheme provided in the present application, regardless of whether the protection device of the tail node device on the forwarding path is the DF or NDF that carries the service to which the BUM message belongs, it can ensure that the CE devices that are multi-homed connected to the tail node device and the protection device of the tail node device receive the BUM message belonging to the service, and can avoid the CE device from receiving duplicate BUM messages. The flexibility and reliability of the message transmission scheme are both high.

[0082] The message transmission method of the embodiment of the present application is described below with reference to the accompanying drawings. The message transmission method described below can be applied to an EVPN system including a first network device, a second network device and a third network device, wherein the third network device is multi-homed to the first network device and the second network device, for example, the third network device is dual-homed to the first network device and the second network device. The second network device can be an end node device on the first forwarding path to the third network device, the first network device can be an end node device on the second forwarding path to the third network device, the first forwarding path and the second forwarding path are two different forwarding paths to the third network device, and the first forwarding path and the second forwarding path can both be SRv6TE policy tunnels. The first network device is a device for forming protection for the second network device (for example, the first network device can be configured to have the function of forming protection for the second network device, and the first network device can be called a protection device for the second network device). As an optional implementation method, the EVPN system also includes a fourth network device, and the fourth network device and the second network device are located on the same forwarding path to the third network device. For example, the fourth network device and the second network device are both located on the first forwarding path, and the fourth network device can be the penultimate hop device of the first forwarding path. For example, Figure 1 As shown, the first network device may be PE1, the second network device may be PE2, the third network device may be CE2, and the fourth network device may be P1.

[0083] Please refer to Figure 5 , which shows a flow chart of a message transmission method provided by an embodiment of the present application. The method may include:

[0084] S501. A first network device receives a first message including a first SID and a second SID. The first message is a message belonging to BUM traffic. The first SID is a SID used by the first network device to protect a second network device. The second SID is used to indicate a first service to which the first message belongs.

[0085] The first network device may receive a first message including the first SID and the second SID from the fourth network device.

[0086] The first message is a message belonging to BUM traffic, and the first message can also be called a BUM message.

[0087] The first SID is the SID used by the first network device to provide protection for the second network device. For example, if the second network device is an egress device on a first forwarding path to a third network device, and the first network device is an egress device on a second forwarding path to the third network device, the first SID is the mirror SID used by the first network device to provide egress protection for the second network device. The mirror SID used to provide egress protection is also called the End.MSID. The first SID can be a SID issued by the first network device.

[0088] The second SID is used to indicate the first service to which the first message belongs. The second SID may be a SID issued by the second network device, bound to an EVPN instance in the second network device, or a VPN SID. The second SID may be inserted into the first message by a head node device on the first forwarding path.

[0089] In an embodiment of the present application, the fourth network device and the second network device may both be located on a first forwarding path to the third network device, the second network device may be an end node device of the first forwarding path, the fourth network device may be a device connected to the end node device on the first forwarding path, and the first network device may be an end node device of the second forwarding path to the third network device. During the process of forwarding the first message on the first forwarding path, when the fourth network device determines that the second network device is unreachable, the fourth network device sends a first message including the first SID and the second SID to the first network device. For example, when the fourth network device senses a failure of the second network device, or senses a failure of the link between the fourth network device and the second network device on the first forwarding path, the fourth network device determines that the second network device is unreachable.

[0090] Optionally, the first message sent by the fourth network device to the first network device is obtained by processing the first message received by the fourth network device. The first message received by the fourth network device includes the second SID. The fourth network device may maintain a protection table entry for protecting the second network device. When the fourth network device determines that the second network device is unreachable, the fourth network device pushes the first SID into the received first message including the second SID based on the protection table entry for protecting the second network device, thereby obtaining a first message including the first SID and the second SID. Subsequently, the fourth network device sends the first message including the first SID and the second SID to the first network device based on the protection table entry for protecting the second network device recorded in the fourth network device. For example, the protection table entry for protecting the second network device in the fourth network device is an FRR table entry. The protection table entry records a correspondence between action indication information and backup next hop information. The action indicated by the action indication information is to push the first SID into the message. The backup next hop information indicates that the backup next hop device for the fourth network device is the first network device. The fourth network device pushes the first SID into the received first message including the second SID according to the action indication information recorded in the protection table entry, and sends the first message including the first SID and the second SID to the first network device according to the backup next hop information recorded in the protection table entry.

[0091] S502: The first network device forwards the first message to the third network device according to the first SID in the first message and the fact that the first network device is an NDF for carrying the first service.

[0092] Optionally, the first network device determines whether the first SID in the first message matches the first SID table in the first network device. If the first SID in the first message matches the first SID table in the first network device, the first network device determines whether the first network device is an NDF or DF used to carry the first service (if the first SID in the first message does not match the first SID table in the first network device, the first network device does not perform this step and directly discards the first message). If the first network device is an NDF used to carry the first service, the first network device forwards the first message to the third network device. If the first network device is a DF used to carry the first service, the first network device discards the first message.

[0093] The following describes the process of the first network device determining whether the first SID in the first message matches the first SID table in the first network device. In an embodiment of the present application, the first SID table is a local SID table of the first network device. The first SID table includes at least one protection table entry. Each protection table entry records the correspondence between the mirror SID (for example, End.M SID) issued by the first network device for protecting other devices (referring to devices other than the first network device) and the locator of the other device. The mirror SID in each protection table entry is used by the first network device to protect the device indicated by the locator corresponding to the mirror SID. The first network device can determine whether there is a SID in the first SID table that matches the first SID in the first message (for example, the first network device determines whether there is a SID in the first SID table that is the same as the first SID in the first message). If there is a SID in the first SID table that matches the first SID in the first message, the first network device determines that the first SID in the first message matches the first SID table. If there is no SID in the first SID table that matches the first SID in the first message, the first network device determines that the first SID in the first message does not match the first SID table.

[0094] For example, the first SID table in the first network device is shown in Table 2 below:

[0095] Table 2

[0096] Mirror SID (End.M SID) locator End.M SID-1 locator-1 End.M SID-2 locator-2 End.M SID-3 locator-3 ...... ......

[0097] Each row in Table 2 is a protection table entry. End.M SID-1, End.M SID-2, and End.MSID-3 are all End.M SIDs issued by the first network device. End.M SID-1 is the SID used by the first network device to protect the device indicated by locator-1. End.M SID-2 is the SID used by the first network device to protect the device indicated by locator-2. End.M SID-3 is the SID used by the first network device to protect the device indicated by locator-3.

[0098] Assume that the first SID in the first message is End.M SID-1, as shown in Table 2, since a SID matching the first SID in the first message exists in the first SID table of the first network device (for example, the first SID table contains a SID identical to the first SID in the first message), the first network device determines that the first SID in the first message matches the first SID table.

[0099] The following describes a process by which a first network device determines whether the first network device is an NDF or a DF for carrying a first service. Optionally, the first network device determines whether the first network device is an NDF or a DF for carrying the first service based on a second SID in the first message. As an example, the first network device includes a second SID table, and the first network device can determine whether the second SID in the first message matches the second SID table in the first network device. If the second SID in the first message matches the second SID table in the first network device, the first network device determines an EVPN instance in the first network device for carrying the first service based on the second SID in the first message and the second SID table (for ease of description, the EVPN instance for carrying the first service will be referred to as the first EVPN instance). Subsequently, the first network device determines whether the first network device is an NDF or a DF for carrying the first service based on the first EVPN instance in the first network device.

[0100] In an embodiment of the present application, the second SID table may be a remote SID table of the first network device. The second SID table is used to record the correspondence between the remote SID and the indication information of the local EVPN instance. The remote SID refers to the SID issued by the remote device of the first network device, and the local EVPN instance refers to the EVPN instance in the first network device. The first network device can determine whether there is a SID in the second SID table that matches the second SID in the first message (for example, whether there is a SID in the second SID table that is the same as the second SID in the first message). If there is a SID in the second SID table that matches the second SID in the first message, the first network device determines the indication information of the local EVPN instance corresponding to the SID matching the second SID in the first message based on the second SID table. Based on the indication information of the local EVPN instance corresponding to the SID matching the second SID in the first message, the first network device determines the EVPN instance (i.e., the first EVPN instance) used to carry the first service in the first network device.

[0101] For example, the second SID table in the first network device is shown in Table 3 below:

[0102] Table 3

[0103] Remote SID Indications for the local EVPN instance SID-11 EVPN instance 1A SID-12 EVPN instance 1B SID-13 EVPN instance 1C ...... ......

[0104] Each row in Table 3 contains a table entry. SID-11, SID-12, and SID-13 are SIDs issued by a remote device of the first network device. "EVPN Instance 1A" indicates EVPN Instance 1A in the first network device, "EVPN Instance 1B" indicates EVPN Instance 1B in the first network device, and "EVPN Instance 1C" indicates EVPN Instance 1C in the first network device.

[0105] Assume that the second SID in the first message is SID-11, as shown in Table 3, since there is a SID (that is, SID-11) matching the second SID in the first message in the second SID table of the first network device, the first network device determines, according to the second SID table, that the indication information of the local EVPN instance corresponding to the SID (that is, SID-11) matching the second SID in the first message is "EVPN instance 1A". Then, according to the indication information "EVPN instance 1A" of the local EVPN instance, the first network device determines in the first network device that the first EVPN instance used to carry the first service is EVPN instance 1A.

[0106] The above method of determining the corresponding EVPN instance based on the second SID by the first network device is only one possible example, and other possible implementation methods may also be used. For example, a correspondence between the second SID, which is the remote VPN SID, and the VPN SID locally allocated by the first network device for the EVPN instance is established. Then, upon receiving a message including the second SID, the first network device determines the corresponding EVPN instance based on the correspondence between the second SID and the local VPN SID.

[0107] In an embodiment of the present application, at least one EVPN instance is configured in the first network device, each EVPN instance in the first network device is used to carry a service, and the role of the local EVPN instance is recorded in the first network device (the role of the EVPN instance includes DF or NDF). After the first network device determines the first EVPN instance in the first network device for carrying the first service, it determines the role of the first EVPN instance in the first network device based on the local role record (that is, it determines whether the first EVPN instance in the first network device is an NDF for carrying the first service or a DF for carrying the first service). If the first EVPN instance in the first network device is a DF for carrying the first service, the first network device determines that the first network device is a DF for carrying the first service. If the first EVPN instance in the first network device is an NDF for carrying the first service, the first network device determines that the first network device is an NDF for carrying the first service.

[0108] The role of the EVPN instance can be determined through DF election. For example, the role of the first EVPN instance in the first network device is determined through DF election. In an embodiment of the present application, the third network device is dual-homed to the first network device and the second network device, and the link between the third network device and the first network device and the link between the third network device and the second network device are indicated by the same Ethernet segment identifier (ESI). The link between the third network device and the first network device and the link between the third network device and the second network device constitute an Ethernet segment (ES). The first network device and the second network device are both configured with a first EVPN instance for carrying the first service. After the first network device and the second network device establish an EVPN neighbor relationship, the Ethernet segment (ES) route of the first EVPN instance is sent to each other, and the ES route carries the ESI. For example, the first network device sends the ES route of the first EVPN instance in the first network device to the second network device, and the second network device sends the ES route of the first EVPN instance in the second network device to the first network device. The first network device and the second network device perform DF election based on the ES route of the first EVPN instance in the first network device and the ES route of the first EVPN instance in the second network device, determine the DF for carrying the first service and the NDF for carrying the first service in the first EVPN instance in the first network device and the first EVPN instance in the second network device (that is, determine the roles of the first EVPN instance in the first network device and the first EVPN instance in the second network device), and the first network device and the second network device each record the role of the first EVPN instance.

[0109] As previously described, if the first network device is an NDF for carrying the first service, the first network device forwards the first message to the third network device. S502 uses the example of the first network device being an NDF for carrying the first service as an example, in which the first network device forwards the first message to the third network device. The first network device may forward the first message to the third network device via the first EVPN instance in the first network device. In the process of forwarding the first message to the third network device, the first network device may strip the first SID and the second SID from the first message. That is, the first message forwarded by the first network device to the third network device may not include the first SID and the second SID.

[0110] Optionally, the first network device determines a routing table for a first EVPN instance in the first network device, searches the routing table for the first EVPN instance based on the destination address carried in the first message, determines an egress port for the first message in the first network device, and forwards the first message to a third network device through the egress port of the first message. The routing table for the first EVPN instance may record a correspondence between addresses and port indication information (e.g., a port identifier, a port number, etc.). The first network device determines, in the routing table for the first EVPN instance, an address that matches the destination address carried in the first message, determines port indication information corresponding to the address that matches the destination address carried in the first message, and determines the port indicated by the port indication information corresponding to the address that matches the destination address carried in the first message as the egress port for the first message.

[0111] The following describes S502 with reference to specific examples. Figure 6, which shows a schematic diagram of a message transmission method provided by an embodiment of the present application. The path from CE1 to CE2 in the EVPN network includes path W1 (PE3—>P1—>PE2, path W1 is, for example, the first forwarding path) and path W3 (PE3—>P2—>PE1, path W3 is, for example, the first forwarding path). PE3 is the head node device of path W1 and path W3, PE2 is the tail node device of path W1, P1 is the penultimate hop device of path W1, PE2 is the tail node device of path W2, and P2 is the penultimate hop device of path W3. Take the example where the first forwarding path is path W1, the first network device is PE1, the second network device is PE2, the third network device is CE2, and the fourth network device is P1. After PE3 receives the first message belonging to BUM traffic sent by CE1 to CE2, it copies the first message to obtain two copies of the first message. PE3 then forwards the first message to CE2 via paths W1 and W3 respectively (that is, PE3 forwards the first message to PE2 and PE1 respectively). While the first message is being forwarded on path W1, P1 detects a link failure between P1 and PE2. Based on the SRv6 mirror FRR mechanism and the FRR table entry recorded in P1 for protecting PE2, P1 pushes the first SID into the first message. P1 then sends a first message including the first SID and the second SID to PE1 (the first SID is pushed into the first message by P1, and the second SID is carried in the first message received by P1. The second SID may be pushed into the first message by PE3). After receiving the first message including the first SID and the second SID, PE1 determines that PE1 is the NDF carrying the first service (that is, the service to which the first message belongs), and PE1 forwards the first message to CE2. PE1, as a device on path W3, also receives the first message from P2 (the first message does not include the first SID). Since PE1 is the NDF carrying the first service, PE1 discards the first message received from P2. That is, PE1, as the NDF carrying the first service, only forwards the first message received from P1 and does not forward the first message received from P2. In this way, PE1 only forwards one copy of the first message to CE2, preventing CE2 from receiving duplicate first messages and preventing CE2 from not receiving the first message.

[0112] S503: The first network device discards the first message according to the first SID in the first message and the fact that the first network device is a DF used to carry the first service.

[0113] The implementation process of S503 can refer to S502 and will not be repeated here. Different from S502, in S503, the first network device determines that the first network device is a DF for carrying the first service, and the first network device discards the first message.

[0114] The following describes S503 with a specific example. Figure 7 , which shows a schematic diagram of another message transmission method provided by an embodiment of the present application. The path from CE1 to CE2 in the EVPN network includes path W1 (PE3—>P1—>PE2, path W1 is, for example, the first forwarding path) and path W3 (PE3—>P2—>PE1, path W3 is, for example, the first forwarding path). PE3 is the head node device of path W1 and path W3, PE2 is the tail node device of path W1, P1 is the penultimate hop device of path W1, PE2 is the tail node device of path W2, and P2 is the penultimate hop device of path W3. Take the example that the first forwarding path is path W1, the first network device is PE1, the second network device is PE2, the third network device is CE2, and the fourth network device is P1. After PE3 receives the first message belonging to BUM traffic sent by CE1 to CE2, it copies the first message to obtain two copies of the first message. PE3 then forwards the first message to CE2 via paths W1 and W3 respectively (that is, PE3 forwards the first message to PE2 and PE1 respectively). While the first message is being forwarded on path W1, P1 detects a link failure between P1 and PE2. Based on the SRv6 mirror FRR mechanism and the FRR table entry recorded in P1 for protecting PE2, P1 pushes the first SID into the first message. P1 then sends a first message including the first SID and the second SID to PE1 (the first SID is pushed into the first message by P1, and the second SID is carried in the first message received by P1. The second SID may be pushed into the first message by PE3). After receiving the first message including the first SID and the second SID, PE1 determines that PE1 is the DF carrying the first service (that is, the service to which the first message belongs), and PE1 discards the first message. PE1, as a device on path W3, also receives the first message from P2 (the first message does not include the first SID). Since PE1 is the DF carrying the first service, PE1 forwards the first message received from P2 to CE2. That is, PE1, as the DF carrying the first service, only forwards the first message received from P2 and does not forward the first message received from P1. In this way, PE1 only forwards one copy of the first message to CE2, preventing CE2 from receiving duplicate first messages or missing the first message.

[0115] It should be noted that the first network device, as a protection device for the second network device on the first forwarding path to the third network device, and as a device on the second forwarding path to the third network device, will receive multiple first messages sent to the third network device. The first network device determines which received first message to forward based on whether the received first message includes a mirrored SID used by the first network device to protect the second network device and the role of the first network device when carrying the first service (DF or NDF). For example, if the first network device is an NDF carrying the first service, the first network device forwards received first messages that include the mirrored SID used by the first network device to protect the second network device, and discards received messages that do not include the mirrored SID used by the first network device to protect the second network device. For another example, if the first network device is a DF carrying the first service, the first network device discards received first messages that include the mirrored SID used by the first network device to protect the second network device, and forwards received messages that do not include the mirrored SID used by the first network device to protect the second network device. Therefore, no matter whether the first network device serving as the protection device of the second network device is a DF or an NDF carrying the first service, it is possible to ensure that the third network device receives the first message and avoid the third network device receiving repeated first messages.

[0116] It should also be noted that the embodiments of this application take into account the integrity of the solution. Figure 5 In the illustrated embodiment, S502 and S503 are described simultaneously. Those skilled in the art should understand that, in the actual process of forwarding the first message, the first network device selectively executes S502 and S503 instead of executing both simultaneously.

[0117] In summary, the message transmission method provided in the embodiment of the present application is applied to an EVPN system including a first network device, a second network device, and a third network device. The third network device is multi-homed to the first network device and the second network device. The second network device can be an end node device on the forwarding path to the third network device. The first network device is used to protect the second network device. After the first network device receives the first message belonging to the BUM traffic, if the first network device is an NDF used to carry the first service, the first network device forwards the first message to the third network device, thereby avoiding the third network device from not being able to receive the first message; if the first network device is a DF used to carry the first service, the first network device discards the first message, thereby avoiding the third network device from receiving duplicate first messages. In the message transmission scheme provided in the present application, regardless of whether the first network device is a DF or an NDF carrying the first service, it can ensure that the third network device multi-homed to the first network device and the second network device receives the first message belonging to the first service, and can avoid the third network device from receiving duplicate first messages, which helps to improve the flexibility and reliability of message transmission.

[0118] In the embodiment of the present application, the first SID is a SID published by the first network device. Before the first network device receives the first message including the first SID and the second SID, the method further includes: the first network device allocates and publishes the first SID.

[0119] Optionally, the first network device allocates the first SID according to the configuration instruction issued by the controller. After allocating the first SID, the first network device publishes the first SID to the EVPN network where the first network device is located.

[0120] As an example, a configuration instruction includes a protection entry for a first network device to provide protection to a second network device, the protection entry including a first SID and a locator of the second network device, and the first network device assigns the first SID based on the protection entry. The protection entry indicates that the first SID is used by the first network device to provide protection to the second network device.

[0121] As an example, the first network device floods the first SID based on the IGP to publish the first SID. For example, the first network device floods the protection entry including the first SID and the locator of the second network device based on the IGP.

[0122] In an embodiment of the present application, after the first network device publishes the first SID, all devices in the IGP network can receive the first SID. After the fourth network device (for example, the penultimate hop device of the first forwarding path) receives the first SID, it generates an FRR table entry for protecting the second network device based on the first SID, so that when the fourth network device determines that the second network device is unreachable, it sends a first message including the first SID and the second SID to the first network device according to the FRR table entry.

[0123] To facilitate understanding of the technical solution of the present application, the message transmission method of the present application is introduced below in conjunction with the interaction between devices.

[0124] Please refer to Figure 8 , which shows a schematic diagram of another message transmission method provided by an embodiment of the present application. This embodiment of the present application takes the message transmission method as an example of an EVPN system including a first network device, a second network device, a third network device, and a fourth network device. Figure 8 , the method may include:

[0125] S801: A first network device allocates a first SID, where the first SID is a SID used by the first network device to protect a second network device.

[0126] Optionally, the first network device allocates the first SID according to a configuration instruction sent by the controller.

[0127] As an example, a configuration instruction includes a protection entry for a first network device to provide protection to a second network device, the protection entry including a first SID and a locator of the second network device, and the first network device assigns the first SID based on the protection entry. The protection entry indicates that the first SID is used by the first network device to provide protection to the second network device.

[0128] S802: The first network device publishes a first SID.

[0129] As an example, the first network device floods the first SID based on the IGP to publish the first SID. For example, the first network device floods the protection entry including the first SID and the locator of the second network device based on the IGP.

[0130] S803: The fourth network device receives the first SID issued by the first network device.

[0131] After the first network device publishes the first SID, all devices in the IGP network can receive the first SID. A fourth network device can also receive the first SID. For example, the fourth network device receives a protection entry published by the first network device for the first network device to provide protection to the second network device. The protection entry includes the first SID and the locator of the second network device, and indicates that the first SID is used by the first network device to provide protection to the second network device.

[0132] S804: The fourth network device generates an FRR entry for protecting the second network device according to the first SID, which is a SID used by the first network device to protect the second network device.

[0133] After receiving the first SID, the fourth network device determines that the first SID is the SID used by the first network device to provide protection for the second network device. Based on the first SID, the fourth network device generates an FRR table entry for providing protection for the second network device. The FRR table entry records a correspondence between action indication information and backup next hop information. The action indicated by the action indication information is to push the first SID into the message, and the backup next hop information indicates that the backup next hop device for the fourth network device is the first network device.

[0134] S805: The fourth network device receives a first message including a second SID, where the second SID is used to indicate a first service to which the first message belongs.

[0135] The fourth network device may receive a first message including a second SID from a previous hop device of the fourth network device on the first forwarding path, wherein the second SID is used to indicate the first service to which the first message belongs. Figure 1 As shown, the fourth network device is P1, the previous hop device of P1 on the first forwarding path is PE3, and P1 receives a first message including the second SID from PE3.

[0136] S806: The fourth network device determines that the second network device is unreachable, and pushes the first SID into the first message according to the FRR entry.

[0137] The fourth network device can determine whether the second network device is reachable through network perception. For example, the fourth network device perceives that the port connected to the second network device on the fourth network device is down, and the fourth network device determines that the second network device is unreachable. Subsequently, the fourth network device pushes the first SID into the first message based on the FRR table entry used to protect the second network device, recorded in the fourth network device. For example, the fourth network device pushes the first SID into the first message based on the action indication information recorded in the FRR table entry used to protect the second network device.

[0138] S807: The fourth network device sends a first message including the first SID and the second SID to the first network device according to the FRR entry.

[0139] The FRR table entry in the fourth network device used to protect the second network device records backup next hop information, and the backup next hop information indicates that the backup next hop device of the fourth network device is the first network device. The fourth network device sends a first message including the first SID and the second SID to the first network device based on the backup next hop information recorded in the FRR table entry.

[0140] S808: The first network device receives a first message including a first SID and a second SID.

[0141] Corresponding to the fourth network device sending the first message including the first SID and the second SID to the first network device, the first network device receives the first message including the first SID and the second SID from the fourth network device.

[0142] S809: The first network device forwards the first message to the third network device according to the first SID in the first message and the fact that the first network device is an NDF for carrying the first service.

[0143] The implementation process of S809 can refer to the aforementioned S502, and will not be repeated here in this embodiment of the present application.

[0144] S810. The third network device receives a first message.

[0145] The first network device forwards the first message to the third network device, and the third network device receives the first message from the first network device. It should be noted that, in the process of forwarding the first message to the third network device, the first network device strips the first SID and the second SID from the first message, and the first message received by the third network device does not include the first SID and the second SID.

[0146] In a possible implementation of this embodiment of the present application, as an alternative to steps S809 and S810, the first network device discards the first message based on the first SID in the first message and the fact that the first network device is a DF used to carry the first service. The specific implementation process can be referenced to the aforementioned S503 and will not be further described in this embodiment of the present application.

[0147] The above method embodiments take the dual-homing and dual-active scenario as an example. It can be understood that the above method embodiments can also be applied to possible scenarios with three or more homing.

[0148] In summary, the message transmission method provided in the embodiment of the present application is applied to an EVPN system including a first network device, a second network device, a third network device, and a fourth network device. The third network device is multi-homed to the first network device and the second network device. The second network device can be an end node device on the forwarding path to the third network device. The fourth network device is the penultimate hop device on the forwarding path. The first network device is used to protect the second network device. When the second network device is unreachable, the fourth network device sends a first message belonging to BUM traffic to the first network device. After the first network device receives the first message belonging to BUM traffic, if the first network device is an NDF used to carry the first service, the first network device forwards the first message to the third network device, thereby avoiding the third network device from being unable to receive the first message. If the first network device is a DF used to carry the first service, the first network device discards the first message, thereby avoiding the third network device from receiving duplicate first messages. In the message transmission solution provided in the present application, regardless of whether the first network device is a DF or NDF carrying the first service, it can ensure that the third network device that is multi-homed to the first network device and the second network device receives the first message belonging to the first service, and can avoid the third network device from receiving duplicate first messages, which helps to improve the flexibility and reliability of message transmission.

[0149] The following describes an embodiment of the device of the present application, which can be used to perform the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.

[0150] Please refer to Figure 9 , which shows a logical structure diagram of a first network device 900 provided in an embodiment of the present application. The first network device 900 is located in an EVPN system. The EVPN system also includes a second network device and a third network device. The third network device is multi-homed to the first network device and the second network device. Figure 9 The first network device 900 may include but is not limited to:

[0151] Receiving module 910 is configured to receive a first message including a first SID and a second SID. The first message is a message for BUM traffic. The first SID is a SID used by the first network device to protect the second network device. The second SID indicates the first service to which the first message belongs. The functional implementation of receiving module 910 can be referenced in the description of S501 above.

[0152] Forwarding module 920 is configured to forward the first message to a third network device based on the first SID in the first message and the fact that the first network device is an NDF used to carry the first service. Alternatively, discarding module 930 is configured to discard the first message based on the first SID in the first message and the fact that the first network device is a DF used to carry the first service. For the functional implementation of forwarding module 920, refer to the description of S502 above. For the functional implementation of discarding module 930, refer to the description of S503 above.

[0153] Optionally, the forwarding module 920 is configured to:

[0154] Determining that a first SID in the first message matches a first SID table in the first network device;

[0155] Determining that the first network device is an NDF for carrying a first service;

[0156] According to the matching between the first SID in the first message and the first SID table in the first network device, and the fact that the first network device is an NDF for carrying the first service, the first message is forwarded to the determined third network device.

[0157] Optionally, please continue to refer to Figure 7 , the first network device 900 further includes:

[0158] An allocating module 940 is configured to allocate the first SID before the receiving module 910 receives the first message including the first SID and the second SID;

[0159] The publishing module 950 is configured to publish the first SID.

[0160] Optionally, the second network device is an end-node device on a first forwarding path to the third network device, and the first network device is an end-node device on a second forwarding path to the third network device.

[0161] Optionally, the first SID is a mirror SID used by the first network device to form tail node protection for the second network device.

[0162] Optionally, the third network device is dual-homed to the first network device and the second network device.

[0163] In summary, the first network device provided in the embodiment of the present application is located in an EVPN system, and the EVPN system further includes a second network device and a third network device. The third network device is multi-homed to the first network device and the second network device. The second network device can be an end node device on the forwarding path to the third network device. The first network device is used to protect the second network device. After the first network device receives the first message belonging to the BUM traffic, if the first network device is an NDF used to carry the first service, the first network device forwards the first message to the third network device, thereby avoiding the third network device from not being able to receive the first message; if the first network device is a DF used to carry the first service, the first network device discards the first message, thereby avoiding the third network device from receiving duplicate first messages. In the message transmission scheme provided in the present application, regardless of whether the first network device is a DF or an NDF carrying the first service, it can ensure that the third network device multi-homed to the first network device and the second network device receives the first message belonging to the first service, and can avoid the third network device from receiving duplicate first messages, which helps to improve the flexibility and reliability of message transmission.

[0164] It should be understood that the network device provided in the embodiments of the present application can also be implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD), and the above-mentioned PLD can be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. The message transmission method provided in the above-mentioned method embodiment can also be implemented by software. When the message transmission method provided in the above-mentioned method embodiment is implemented by software, each module in the network device can also be a software module.

[0165] Please refer to Figure 10 , which shows a hardware structure diagram of a network device 1000 provided in an embodiment of the present application. The network device 1000 may be the first network device in the above embodiment, and the network device 1000 may be a PE device. Figure 10 As shown, the network device 1000 includes: a main control board 1010, an interface board 1030 and an interface board 1040. In the case of multiple interface boards, a switching network board ( Figure 10 The switching network board is used to complete data exchange between the interface boards (the interface board is also called a line card or a service board).

[0166] The main control board 1010 performs system management, device maintenance, and protocol processing. The interface boards 1030 and 1040 provide various service interfaces (e.g., POS, GE, and ATM) and implement packet forwarding. The main control board 1010 primarily houses three functional units: the system management and control unit, the system clock unit, and the system maintenance unit. The main control board 1010, interface boards 1030, and interface boards 1040 are interconnected via a system bus and the system backplane. The interface boards 1030 include one or more processors 1031. Processors 1031 control and manage the interface boards 1030 and communicate with the central processing unit 1012 on the main control board 1010. The memory 1032 on the interface board 1030 is used to store SID tables, for example, the first SID table and / or the second SID table described in the aforementioned embodiment. The processor 1031 determines whether the first SID carried in the message matches the first SID table by searching the first SID table stored in the memory 1032, and determines whether the second SID carried in the message matches the second SID table by searching the second SID table. When the second SID matches the second SID table, the network device 1000 determines the EVPN instance that carries the service to which the message belongs, and determines whether the network device 1000 is a DF or NDF that carries the service to which the message belongs based on the EVPN instance that carries the service to which the message belongs. Figure 10 As shown, the main control board 1010 may include a memory 1014 , and the memory 1014 on the main control board 1010 may also be used to store the SID table, which is not limited in this embodiment of the present application.

[0167] The interface board 1030 includes one or more network interfaces 1033 for receiving and forwarding messages. The processor 1031 determines whether the network device 1000 is a DF or NDF carrying the service to which the message belongs based on the first SID and second SID carried in the message received by the network interface 1033. The specific implementation process is not detailed here. The specific functions of the processor 1031 are also not detailed here.

[0168] It is understandable that Figure 10 As shown, this embodiment includes multiple interface boards and adopts a distributed forwarding mechanism. Under this mechanism, the operation on the interface board 1040 is basically similar to that of the interface board 1030. For the sake of brevity, it will not be repeated. In addition, it can be understood that Figure 10The processor 1031 in interface board 1030 and / or the processor 1041 in interface board 1040 can be dedicated hardware or chips, such as a network processor or an application-specific integrated circuit, to implement the aforementioned functions. This implementation is commonly referred to as employing dedicated hardware or chip processing on the forwarding plane. In other embodiments, the processor 1031 in interface board 1030 and / or the processor 1041 in interface board 1040 can also be a general-purpose processor, such as a general-purpose central processing unit (CPU), to implement the aforementioned functions.

[0169] It should also be noted that there may be one or more main control boards, including a primary and backup main control board. There may also be one or more interface boards. The higher the data processing capabilities of a network device, the more interface boards it provides. With multiple interface boards, they can communicate with each other through one or more switching fabric boards, enabling load balancing and redundant backup. In a centralized forwarding architecture, the network device may not require a switching fabric board; the interface board handles the entire system's service data processing. In a distributed forwarding architecture, the network device includes multiple interface boards, which can exchange data between them through the switching fabric board, providing high-capacity data exchange and processing capabilities. Therefore, network devices with a distributed architecture have greater data access and processing capabilities than those with a centralized architecture. The specific architecture to adopt depends on the specific network deployment scenario and is not limited here.

[0170] In a specific embodiment, the memory 1032 can be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, an optical disc storage (including a compact disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 1032 can exist independently and be connected to the processor 1031 via a communication bus. The memory 1032 can also be integrated with the processor 1031.

[0171] The memory 1032 is used to store program codes, and is controlled by the processor 1031 to execute part or all of the steps of the message transmission method provided in the above embodiment. The processor 1031 is used to execute the program codes stored in the memory 1032. The program codes may include one or more software modules. The one or more software modules may be the above Figure 9 Functional modules provided in the embodiments. The memory 1014 can also be used to store program codes, and the central processing unit 1012 controls the execution to execute part or all of the steps of the message transmission method provided in the above embodiments.

[0172] In a specific embodiment, the network interface 1033 may be a device such as any transceiver for communicating with other devices or communication networks, such as Ethernet, radio access networks (RAN), wireless local area networks (WLAN), etc.

[0173] Please refer to Figure 11 , which shows a hardware structure diagram of another network device 1100 provided in an embodiment of the present application. The network device 1100 may be the first network device in any of the above embodiments, and the network device 1100 may be a PE device. Figure 11 The network device 1100 includes a processor 1102, a memory 1104, a communication interface 1106, and a bus 1108. The processor 1102, the memory 1104, and the communication interface 1106 are communicatively connected to each other via the bus 1108. Figure 11 The connection method between the processor 1102, memory 1104 and communication interface 1106 shown is merely exemplary. During implementation, the processor 1102, memory 1104 and communication interface 1106 may also be communicatively connected to each other using other connection methods besides the bus 1108.

[0174] The memory 1104 may be used to store a computer program 11042, which may include instructions and data. In embodiments of the present application, the memory 1104 may be various types of storage media, such as RAM, ROM, non-volatile RAM (NVRAM), programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), flash memory, optical storage, and registers. Furthermore, the memory 1104 may include a hard disk and / or memory.

[0175] Processor 1102 may be a general-purpose processor. A general-purpose processor may be a processor that performs specific steps and / or operations by reading and executing a computer program (e.g., computer program 11042) stored in a memory (e.g., memory 1104). The general-purpose processor may utilize data stored in the memory (e.g., memory 1104) during the execution of the aforementioned steps and / or operations. The stored computer program may, for example, be executed to implement the related functions of the aforementioned discard module 930 and allocation module 940. A general-purpose processor may be, for example, but not limited to, a CPU. Furthermore, processor 1102 may be a dedicated processor. A dedicated processor may be a processor specifically designed to perform specific steps and / or operations. A dedicated processor may be, for example, but not limited to, a digital signal processor (DSP), an ASIC, or an FPGA. Furthermore, processor 1102 may be a combination of multiple processors, such as a multi-core processor. Processor 1102 may include at least one circuit to execute all or part of the steps of the message transmission method provided in the above-described embodiment.

[0176] The communication interface 1106 may include input / output (I / O) interfaces, physical interfaces, and logical interfaces, etc., for interconnecting components within the network device 1100, as well as interfaces for interconnecting the network device 1100 with other devices (e.g., network devices). The physical interface may be a gigabit Ethernet (GE) interface, which may be used to interconnect the network device 1100 with other devices. The logical interface is an interface within the network device 1100, which may be used to interconnect components within the network device 1100. It will be readily understood that the communication interface 1106 may be used for communication between the network device 1100 and other devices. For example, the communication interface 1106 may be used to send and receive messages between the network device 1100 and other devices. The communication interface 1106 may implement the related functions of the aforementioned receiving module 910 and publishing module 950. Furthermore, the communication interface 1106 may also include a transceiver for transmitting and receiving messages. The transceiver may also implement the related functions of the aforementioned receiving module 910, forwarding module 920, and publishing module 950.

[0177] The bus 1108 may be any type of communication bus for interconnecting the processor 1102 , the memory 1104 , and the communication interface 1106 , such as a system bus.

[0178] The above-mentioned devices can be provided on separate chips, or at least partially or entirely on the same chip. Whether to provide each device independently on different chips or to integrate them on one or more chips often depends on the product design requirements. The embodiments of this application do not limit the specific implementation of the above-mentioned devices.

[0179] Figure 11 The network device 1100 shown is merely exemplary. During implementation, the network device 1100 may further include other components, which are not listed one by one herein. Figure 11 The network device 1100 shown can forward messages by executing all or part of the steps of the message transmission method provided by the above embodiment.

[0180] Please refer to Figure 12 , which shows a schematic structural diagram of an EVPN system 1200 provided in an embodiment of the present application. The EVPN system 1200 includes a first network device 1210, a second network device 1220, and a third network device 1230. The third network device 1230 is multi-homed to the first network device 1210 and the second network device 1220.

[0181] The first network device 1210 is configured to receive a first message including a first SID and a second SID, where the first message is a message belonging to BUM traffic, the first SID is a SID used by the first network device 1210 to protect the second network device 1220, and the second SID is used to indicate a first service to which the first message belongs;

[0182] The first network device 1210 is further used to forward the first message to the third network device 1230 based on the first SID in the first message and the fact that the first network device 1210 is an NDF used to carry the first service; or, the first network device 1210 is further used to discard the first message based on the first SID in the first message and the fact that the first network device 1210 is a designated forwarder DF used to carry the first service.

[0183] Optionally, the first network device 1210 is specifically configured to:

[0184] Determine that the first SID in the first message matches the first SID table in the first network device 1210;

[0185] Determining that the first network device 1210 is an NDF for carrying a first service;

[0186] According to the matching between the first SID in the first message and the first SID table in the first network device 1210 , and the fact that the first network device 1210 is an NDF for carrying the first service, the first message is forwarded to the determined third network device 1230 .

[0187] Optionally, the first network device 1210 is further configured to allocate and publish the first SID before receiving the first message including the first SID and the second SID.

[0188] Optionally, the EVPN system 1200 further includes a fourth network device 1240 , where the fourth network device 1240 and the second network device 1220 are located on the same forwarding path to the third network device 1230 ;

[0189] The fourth network device 1240 is configured to receive the first SID issued by the first network device 1210 , and generate an FRR entry for protecting the second network device 1220 based on the first SID used by the first network device 1210 to protect the second network device 1220 .

[0190] Optionally, the fourth network device 1240 is further configured to determine that the second network device 1220 is unreachable, and send a first message including the first SID and the second SID to the first network device 1210 according to the FRR table entry.

[0191] Optionally, the second network device 1220 is an end-node device on a first forwarding path to the third network device 1230 , and the first network device 1210 is an end-node device on a second forwarding path to the third network device 1230 .

[0192] Optionally, the first SID is a mirror SID used by the first network device 1210 to form tail node protection for the second network device 1220 .

[0193] Optionally, the third network device 1230 is dual-homed to the first network device 1210 and the second network device 1220 .

[0194] In summary, the EVPN system provided in the embodiment of the present application includes a first network device, a second network device, and a third network device. The third network device is multi-homed to the first network device and the second network device. The second network device can be an end node device on the forwarding path to the third network device. The first network device is used to protect the second network device. After the first network device receives the first message belonging to the BUM traffic, if the first network device is an NDF for carrying the first service, the first network device forwards the first message to the third network device, thereby avoiding the third network device from not being able to receive the first message; if the first network device is a DF for carrying the first service, the first network device discards the first message, thereby avoiding the third network device from receiving duplicate first messages. In the message transmission scheme provided in the present application, regardless of whether the first network device is a DF or an NDF for carrying the first service, it can ensure that the third network device multi-homed to the first network device and the second network device receives the first message belonging to the first service, and can avoid the third network device from receiving duplicate first messages, which helps to improve the flexibility and reliability of message transmission.

[0195] The embodiment of the present application provides an EVPN system, including a first network device, a second network device and a third network device, wherein the third network device is multi-homed and connected to the first network device and the second network device. In a possible implementation, the first network device is as follows: Figure 9 In another possible implementation, the first network device is as follows: Figure 10 The network device 1000 shown may be Figure 11 Network device 1100 is shown.

[0196] Optionally, the first network device and the second network device are PE devices, and the third network device is a CE device.

[0197] An embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed, all or part of the steps of the message transmission method provided in the above method embodiment are implemented.

[0198] An embodiment of the present application provides a computer program product, which includes a program or code. When the program or code is run on a computer, the computer executes all or part of the steps of the message transmission method provided in the above method embodiment.

[0199] An embodiment of the present application provides a chip, which includes a programmable logic circuit and / or program instructions, and when the chip is running, is used to implement all or part of the steps of the message transmission method provided in the above method embodiment.

[0200] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product, which 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 can be a general-purpose computer, a computer network, or other programmable device. The computer instructions can 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 can be transmitted from a website, computer, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium, or a semiconductor medium (e.g., a solid-state hard disk).

[0201] It should be understood that "at least one" in this document refers to one or more, and "plurality" refers to two or more. "At least two" refers to two or more. In this application, unless otherwise specified, " / " means or. For example, A / B can mean A or B. "And / or" in this application is merely a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, for the sake of clarity of description, in this application, words such as "first", "second", and "third" are used to distinguish between identical or similar items with substantially the same functions and effects. Those skilled in the art will understand that words such as "first", "second", and "third" do not limit the quantity and order of execution.

[0202] The different types of embodiments, such as the method embodiments and device embodiments provided in the embodiments of this application, can refer to each other, and the embodiments of this application are not limited thereto. The order of the operations of the method embodiments provided in the embodiments of this application can be appropriately adjusted, and the operations can be increased or decreased in response to the circumstances. Any person skilled in the art who can easily think of a method of variation within the technical scope disclosed in this application should be included in the scope of protection of this application, and therefore will not be described in detail.

[0203] In the corresponding embodiments provided in this application, it should be understood that the disclosed devices, etc. can be implemented through other structural methods. For example, the device embodiments described above are merely schematic. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

[0204] The units described as separate components may or may not be physically separate, and the components described as units may or may not be physical units, and may be located in one place or distributed across multiple network devices (e.g., terminal devices). Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0205] The above description is merely an exemplary embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and such modifications or substitutions should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A message transmission method, characterized in that: Applied to an Ethernet virtual private network (EVPN) system including a first network device, a second network device, and a third network device, wherein the third network device is multi-homed to the first network device and the second network device, the method includes: The first network device receives a first message including a first segment identifier SID and a second SID, where the first message is a message belonging to broadcast, unknown unicast, or multicast BUM traffic, the first SID is a SID used by the first network device to protect the second network device, and the second SID is used to indicate a first service to which the first message belongs; The first network device forwards the first message to the third network device based on the first SID in the first message and the fact that the first network device is a non-designated forwarder NDF for carrying the first service; or, the first network device discards the first message based on the first SID in the first message and the fact that the first network device is a designated forwarder DF for carrying the first service.

2. The method according to claim 1, characterized in that The first network device forwards the first message to the third network device according to the first SID in the first message and that the first network device is an NDF for carrying the first service, including: Determining, by the first network device, that the first SID in the first message matches a first SID table in the first network device; Determining, by the first network device, that the first network device is an NDF for carrying the first service; The first network device forwards the first message to the determined third network device based on the matching of the first SID with the first SID table and the fact that the first network device is an NDF for carrying the first service.

3. The method according to claim 1, characterized in that Before the first network device receives the first message including the first segment identifier SID and the second SID, the method further includes: The first network device allocates and publishes the first SID.

4. The method according to any one of claims 1 to 3, characterized in that The second network device is an end node device on a first forwarding path to the third network device, and the first network device is an end node device on a second forwarding path to the third network device.

5. The method according to any one of claims 1 to 3, characterized in that The first SID is a mirror SID used by the first network device to form tail node protection for the second network device.

6. The method according to any one of claims 1 to 3, characterized in that The third network device is dual-homed to the first network device and the second network device.

7. A first network device, characterized in that: The first network device is located in an Ethernet virtual private network (EVPN) system. The EVPN system further includes a second network device and a third network device. The third network device is multi-homed and connected to the first network device and the second network device. The first network device includes: a receiving module, configured to receive a first message including a first segment identifier SID and a second SID, wherein the first message is a message belonging to broadcast, unknown unicast, or multicast BUM traffic, the first SID is a SID used by the first network device to protect the second network device, and the second SID is used to indicate a first service to which the first message belongs; A forwarding module, used to forward the first message to the third network device according to the first SID in the first message and the first network device is a non-designated forwarder NDF for carrying the first service; or, a discarding module, used to discard the first message according to the first SID in the first message and the first network device is a designated forwarder DF for carrying the first service.

8. The first network device according to claim 7, characterized in that The forwarding module is specifically configured to: Determining that the first SID in the first message matches a first SID table in the first network device; Determining that the first network device is an NDF for carrying the first service; According to the matching between the first SID and the first SID table and the fact that the first network device is an NDF for carrying the first service, the first message is forwarded to the determined third network device.

9. The first network device according to claim 7, characterized in that The first network device further includes: An allocating module, configured to allocate the first SID before the receiving module receives the first message including the first segment identifier SID and the second SID; A publishing module is configured to publish the first SID.

10. The first network device according to any one of claims 7 to 9, characterized in that: The second network device is an end node device on a first forwarding path to the third network device, and the first network device is an end node device on a second forwarding path to the third network device.

11. The first network device according to any one of claims 7 to 9, characterized in that: The first SID is a mirror SID used by the first network device to form tail node protection for the second network device.

12. The first network device according to any one of claims 7 to 9, characterized in that: The third network device is dual-homed to the first network device and the second network device.

13. An Ethernet virtual private network (EVPN) system, characterized in that: The EVPN system includes a first network device, a second network device, and a third network device, wherein the third network device is multi-homed and connected to the first network device and the second network device. The first network device is configured to receive a first message including a first segment identifier SID and a second SID, where the first message is a message belonging to broadcast, unknown unicast, or multicast BUM traffic, the first SID is a SID used by the first network device to protect the second network device, and the second SID is used to indicate a first service to which the first message belongs; The first network device is further used to forward the first message to the third network device based on the first SID in the first message and the fact that the first network device is a non-designated forwarder NDF used to carry the first service; or, the first network device is further used to discard the first message based on the first SID in the first message and the fact that the first network device is a designated forwarder DF used to carry the first service.

14. The EVPN system according to claim 13, wherein: The first network device is specifically configured to: Determining that the first SID in the first message matches a first SID table in the first network device; Determining that the first network device is an NDF for carrying the first service; According to the matching between the first SID and the first SID table and the fact that the first network device is an NDF for carrying the first service, the first message is forwarded to the determined third network device.

15. The EVPN system according to claim 13, wherein: The first network device is further configured to allocate and publish the first SID before receiving the first message including the first segment identifier SID and the second SID.

16. The EVPN system according to claim 15, wherein: The EVPN system further includes a fourth network device, wherein the fourth network device and the second network device are located on the same forwarding path to the third network device; The fourth network device is used to receive the first SID issued by the first network device, and generate a fast reroute FRR table entry for protecting the second network device based on the first SID being the SID used by the first network device to protect the second network device.

17. The EVPN system according to claim 16, wherein: The fourth network device is further configured to determine that the second network device is unreachable, and send the first message including the first SID and the second SID to the first network device according to the FRR table entry.

18. The EVPN system according to any one of claims 13 to 17, wherein: The second network device is an end node device on a first forwarding path to the third network device, and the first network device is an end node device on a second forwarding path to the third network device.

19. The EVPN system according to any one of claims 13 to 17, wherein: The first SID is a mirror SID used by the first network device to form tail node protection for the second network device.

20. The EVPN system according to any one of claims 13 to 17, wherein: The third network device is dual-homed to the first network device and the second network device.

21. A network device, characterized in that: The network device includes a memory and a processor; The memory is used to store computer programs; The processor is configured to execute the computer program stored in the memory so that the network device executes the message transmission method according to any one of claims 1 to 6.

22. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed, the message transmission method according to any one of claims 1 to 6 is implemented.

23. A computer program product, characterized in that The computer program product includes a program or code, and when the program or code is run on a computer, the computer is enabled to execute the message transmission method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Message sending method and device, message processing method and device, PE node and node

    CN109861926A

  • Aliasing in an active-active multi-homed PBB-EVPN network

    US10523466B1