Routing transmission method, device and storage medium

By adding encapsulation type indication information to the RD field of BGP EVPN Category 4 routes, the problem of traffic backup and load balancing for different encapsulation types in EVPN multi-homing networks is solved, realizing efficient resource utilization and multi-homing functionality.

CN122437805APending Publication Date: 2026-07-21NEW H3C TECH CO LTD
0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NEW H3C TECH CO LTD
Filing Date
2026-06-23
Publication Date
2026-07-21

Smart Images

  • Figure CN122437805A_ABST
    Figure CN122437805A_ABST
Patent Text Reader

Abstract

The application provides a routing sending method, device and storage medium. The method comprises the following steps: for any ESI (Ethernet Segment Identifier) binding, generating a corresponding BGP EVPN (Border Gateway Protocol Ethernet Virtual Private Network) 4-type route according to the ESI of the ESI and any encapsulation type corresponding to the ESI; wherein the RD (Route Distinguisher) field of the BGP EVPN 4-type route comprises indication information used for indicating the encapsulation type; and sending the BGP EVPN 4-type route to a BGP EVPN peer, so that the BGP EVPN peer determines the corresponding encapsulation type according to the indication information included in the RD field of the BGP EVPN 4-type route, and participates in the DF (Designated Forwarder) election of the encapsulation type for the ESI, when it is determined that the BGP EVPN peer and the PE (Provider Edge) device belong to the same ESI according to the ESI information in the BGP EVPN 4-type route. The application can realize that different BGP EVPN 4-type routes are sent for different encapsulation types of the same ESI.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of network communication technology, and in particular to a routing and transmission method, device and storage medium. Background Technology

[0002] In a multi-homed EVPN (Ethernet Virtual Private Network) network, Customer Edge (CE) devices simultaneously connect to multiple Provider Edge (PE) devices on the home side via aggregated links to achieve uplink and downlink traffic backup or equal-cost load balancing. To identify uplinks originating from the same CE, each PE device on the home side must configure the same Ethernet Segment (ES) information, i.e., the same Ethernet Segment Identifier (ESI), for the physical links connected to the same CE device. Home-side PE devices synchronize ES information via BGP (Border Gateway Protocol) EVPN Type 4 routes (hereinafter referred to as Type 4 routes) to complete DF (Designated Forwarder) election or primary / backup negotiation between the home ends.

[0003] However, in some real-world deployment scenarios, traffic passing through the CE may originate from different EVPN instances (EVIs) on the home side, and these EVPN instances may use different packet encapsulation formats (or encapsulation types). For example, some EVPN instances may use VXLAN (Virtual Extensible Local Area Network) encapsulation, while others may use MPLS (Multiprotocol Label Switching) encapsulation. In this case, the home PE needs to send Type 4 routes to other home PEs for EVPN instances with the same ESI but different encapsulation types, so that the peers can correctly process the ES-related logic for different EVPN instances. However, according to existing protocol specifications, a single Type 4 route cannot carry multiple encapsulation information; therefore, different Type 4 routes need to be sent for different encapsulation types.

[0004] In existing solutions, to send different Type 4 routes to EVPN instances with different encapsulation types, multiple physical links are typically deployed or sub-interfaces are configured on the physical links, with different ESIs configured for each sub-interface. However, deploying multiple physical links results in duplicate deployment of interfaces (and even CE devices), leading to a waste of device resources; while configuring different ESIs for sub-interfaces can save physical links, it still consumes additional ESI resources. Summary of the Invention

[0005] This application provides a routing transmission method, device, and storage medium.

[0006] According to a first aspect of this application, a routing method is provided, applied to a PE device in an EVPN multi-homing scenario, the method comprising: For any ES with a non-zero ESI, a corresponding BGP EVPN Class 4 route is generated based on the ESI of the ES and any encapsulation type corresponding to the ES; wherein the RD field of the BGP EVPN Class 4 route includes indication information for indicating the encapsulation type. The BGP EVPN Type 4 route is sent to the BGP EVPN peer so that the BGP EVPN peer, based on the ESI information in the BGP EVPN Type 4 route, determines that it and the PE device belong to the same ES, and then determines the corresponding encapsulation type based on the indication information included in the RD field of the BGP EVPN Type 4 route, and participates in the DF election for that encapsulation type for that ES.

[0007] According to a second aspect of this application, a routing transmission device is provided, deployed in a PE device in an EVPN multi-homing scenario, the device comprising: The generation unit is used to generate a corresponding BGP EVPN Class 4 route for any ES with a non-zero ESI, based on the ESI of the ES and any encapsulation type corresponding to the ES; wherein the RD field of the BGP EVPN Class 4 route includes indication information for indicating the encapsulation type. The sending unit is configured to send the BGP EVPN Class 4 route to the BGP EVPN peer, so that the BGP EVPN peer, after determining that it and the PE device belong to the same ES based on the ESI information in the BGP EVPN Class 4 route, determines the corresponding encapsulation type based on the indication information included in the RD field of the BGP EVPN Class 4 route, and participates in the DF election for that encapsulation type for that ES.

[0008] According to a third aspect of this application, an electronic device is provided, including a processor and a memory, the memory storing machine-executable instructions executable by the processor, the processor being configured to execute the machine-executable instructions to implement the method provided in the first aspect.

[0009] According to a fourth aspect of this application, a machine-readable storage medium is provided, wherein machine-executable instructions are stored therein, and when executed by a processor, the machine-executable instructions implement the method provided in the first aspect.

[0010] By applying the technical solution disclosed in this application, for any ES with a non-zero ESI, the PE device can generate a corresponding BGP EVPN Type 4 route based on the ESI of the ES and any encapsulation type corresponding to the ES. The RD field of the BGP EVPN Type 4 route includes indication information for the encapsulation type. The BGP EVPN Type 4 route is then sent to the BGPEVPN peer. This allows the BGP EVPN peer to determine, based on the ESI information in the received BGP EVPN Type 4 route and the PE device, that it belongs to the same ES. The peer then determines the corresponding encapsulation type based on the indication information included in the RD field of the BGP EVPN Type 4 route and participates in the DF election for that encapsulation type of the ES. By adding indication information for the encapsulation type to the RD field of the BGP EVPN Type 4 route, in cases where the same ES corresponds to multiple encapsulation types, it is possible to send different BGP EVPN Type 4 routes for different encapsulation types of the same ES without configuring different physical links or different ESIs for different encapsulation types. This enables multi-homing functionality for traffic of different encapsulation types carried by the same ES. Attached Figure Description

[0011] Figure 1 This is a schematic diagram of a typical EVPN multi-homed network architecture; Figure 2 This is a flowchart illustrating a routing and sending method provided in an embodiment of this application; Figure 3 This is a schematic diagram of the physical link between CE and PE1 in an EVPN multi-homing scenario provided in an embodiment of this application; Figure 4 This is a schematic diagram of the structure of a routing transmission device provided in an embodiment of this application; Figure 5 This is a schematic diagram of another routing transmission device provided in an embodiment of this application; Figure 6 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0012] To enable those skilled in the art to better understand the technical solutions in the embodiments of this application, the architecture of EVPN multi-homed networking and the field structure of NLRI (Network Layer Reachability Information) of BGP EVPN Type 4 routes will be briefly explained below with reference to the accompanying drawings.

[0013] Please see Figure 1 This is a schematic diagram of a typical EVPN multi-homed network architecture, such as... Figure 1 As shown, the network consists of CE, PE1, PE2, and PE3, where PE1 and PE2 are home PEs, and PE3 is a remote PE. CE connects to PE1 and PE2 via two physical links, respectively. These two physical links belong to the same ES (Entity Provider Interface). That is, the physical links between CE and PE1, and between CE and PE2, together constitute the same ES. PE1 and PE2 are configured with the same ESI (Entity Service Identity) for this ES. Each physical link includes two access circuits: AC (Attachment Circuit) 1 and AC2. AC1 is associated with EVPN instance 1 (EVI 1), and AC2 is associated with EVPN instance 2 (EVI 2). PE1 and PE3 are associated with EVPN 1, and PE2 and PE3 are associated with EVPN 2. PE1 and PE2 synchronize ES information via BGP EVPN Type 4 routing for DF election and primary / backup negotiation, thereby achieving backup or equal-cost load balancing of uplink and downlink traffic.

[0014] exist Figure 1 In the network topology shown, assuming EVI 1 uses VXLAN encapsulation and EVI 2 uses MPLS encapsulation, this ESI corresponds to both VXLAN and MPLS encapsulation types. According to RFC 7432, a BGP EVPN Type 4 route can only carry one encapsulation type through its Encapsulation Extended Community. Therefore, PE devices (such as PE1 or PE2) need to send one Type 4 route for each of these two encapsulation types; that is, for EVI 1 and EVI 2, which have the same ESI but different encapsulation types, two independent Type 4 routes need to be sent respectively.

[0015] Taking PE1 as an example, PE1 needs to send two Type 4 routes to PE2, one for VXLAN encapsulation type and the other for MPLS encapsulation type. Specifically, the Type 4 routes sent for VXLAN encapsulation type carry VXLAN encapsulation information in the encapsulation extension community of its general BGP path attributes; the Type 4 routes sent for MPLS encapsulation type carry MPLS encapsulation information in its encapsulation extension community.

[0016] If all fields (including RD, ESI, etc.) in the NLRI of the two Type 4 routes sent by PE1 are identical, when PE2 receives these two Type 4 routes with the same NLRI, the BGP protocol will determine that they are different copies of the same route originating from the same neighbor (PE1) (e.g., due to configuration changes or route refreshes resulting in duplicate reception). According to the standard BGP routing procedure, PE2 will only select the best route to retain and discard the other route. This causes traffic of different encapsulation types carried on ES to be unable to simultaneously obtain backup or load balancing support in multi-homing scenarios, and the multi-homing function of one of the EVIs will fail.

[0017] As shown in Table 1, the NLRI of the four types of routes includes the following field: RD, which has a length of 8 Octets (bytes, also known as octets). ESI, 10 bytes in length; The IP address length is 1 byte. The IP address of the originating router is 4 bytes or 16 bytes long (corresponding to IPv4 address or IPv6 address respectively).

[0018] Table 1

[0019] To make the above-mentioned objectives, features and advantages of the embodiments of this application more apparent and understandable, the technical solutions of the embodiments of this application will be further described in detail below with reference to the accompanying drawings.

[0020] Please see Figure 2 This is a flowchart illustrating a routing transmission method provided in an embodiment of this application. This transmission method can be applied to PE devices in EVPN multi-homing scenarios, such as... Figure 2 As shown, the routing method may include the following steps: Step 201: For any ES with a non-zero ESI, generate a corresponding BGP EVPN Class 4 route based on the ESI of the ES and any encapsulation type corresponding to the ES; wherein the RD field of the BGP EVPN Class 4 route includes indication information for indicating the encapsulation type.

[0021] In this embodiment of the application, when a PE device detects that any ES is bound to a non-zero ESI (i.e., the ESI value is not 0, indicating that the ES actually belongs to a multi-homed network scenario), it can automatically generate a corresponding Class 4 route based on the ESI of the ES. The Class 4 route is used to announce to other PE devices that the device is connected to the ES.

[0022] One ES can be associated with multiple EVIs, and each EVI has a package type; different EVIs can have the same or different package types. Therefore, one ES can correspond to multiple package types.

[0023] by Figure 1 Taking the network topology shown as an example, assuming that EVI 1 uses VXLAN encapsulation and EVI 2 uses MPLS encapsulation, then this ES corresponds to both VXLAN and MPLS encapsulation types.

[0024] In this embodiment of the application, in order to send different four types of routes for different encapsulation types of the same ES, indication information for indicating the encapsulation type can be added to the RD field of the four types of routes.

[0025] Accordingly, when the same ES corresponds to multiple different encapsulation types, the PE device can send four types of routes for each encapsulation type separately, and add indication information corresponding to the encapsulation type to the RD field of the four types of routes for different encapsulation types. This indication information is used to notify the receiving device of the encapsulation type for which the four types of routes are targeted.

[0026] Taking the previous example, PE1 can send four types of routes for VXLAN encapsulation and MPLS encapsulation respectively. The RD field of the four types of routes for VXLAN encapsulation includes the corresponding VXLAN encapsulation indication information (such as indication information 1), and the RD field of the four types of routes for MPLS encapsulation includes the corresponding MPLS encapsulation indication information (such as indication information 2).

[0027] It should be noted that, in this embodiment of the application, the value used to indicate the encapsulation type in the encapsulation extension community of the four types of routes sent by the PE device in the manner described above is set to the default value. That is, when the PE device sends the four types of routes, it no longer indicates the encapsulation type through the encapsulation extension community, but instead indicates the encapsulation type through the indication information in the RD field.

[0028] Step 202: Send the BGP EVPN Type 4 route to the BGP EVPN peer so that the BGP EVPN peer, based on the ESI information in the BGP EVPN Type 4 route, determines the corresponding encapsulation type according to the indication information and participates in the DF election for that encapsulation type for that ES.

[0029] In this embodiment of the application, when the PE device generates BGP EVPN Type 4 routes in the manner described above, it can send the Type 4 routes to each peer (i.e., other PE devices, which can be referred to as BGP EVPN peers) that has established a BGP EVPN neighbor relationship with the PE device.

[0030] Since the RD fields of the four types of routes corresponding to the same ES with different encapsulation types are different, and the RD fields include indication information for indicating the encapsulation type, the PE device that receives the four types of routes can identify the four types of routes corresponding to the same ES with different encapsulation types.

[0031] In this embodiment of the application, for any BGP EVPN peer that receives the four types of routes, the ESI value included in the four types of routes can be compared with the ESI value bound to each Ethernet segment of the local device: if there is the same non-zero ESI, it is determined that the local device and the sending device of the four types of routes belong to the same ES (that is, the two are connected to the same Ethernet segment).

[0032] When the BGP EVPN peer determines that it belongs to the same Elasticsearch (ES) as the sending device of the Type 4 route, it can determine the encapsulation type targeted by the Type 4 route based on the indication information included in the RD field of the Type 4 route, and participate in the designated DF election for that encapsulation type for that ES. For example, it can participate in the designated DF election with the sending device of the Type 4 route, as well as other PE devices of the ES (if they exist).

[0033] Different package types of the same ES correspond to different EVIs. Different PE devices belonging to the same ES can implement the designated DF election for different package types of the same ES in the above manner, that is, implement the designated DF election for different EVIs of the same ES.

[0034] It can be seen that, in Figure 2In the illustrated method, for any ES with a non-zero ESI, the PE device can generate a corresponding BGP EVPN Type 4 route based on the ES's ESI and any encapsulation type corresponding to the ES. The RD field of the BGP EVPN Type 4 route includes indication information for the encapsulation type. This BGP EVPN Type 4 route is then sent to the BGPEVPN peer. This allows the BGP EVPN peer to determine, based on the ESI information in the received BGP EVPN Type 4 route and the PE device's ES, that it belongs to the same ES. The peer then determines the corresponding encapsulation type based on the indication information in the RD field of the BGP EVPN Type 4 route and participates in the DF election for that encapsulation type within the ES. By adding indication information for the encapsulation type to the RD field of the BGP EVPN Type 4 route, even with multiple encapsulation types for the same ES, different BGP EVPN Type 4 routes can be sent for different encapsulation types within the same ES without configuring different physical links or different ESIs. This enables multi-homing functionality for traffic of different encapsulation types carried by the same ES.

[0035] In some embodiments, generating the corresponding BGP EVPN Type 4 route based on the ESI of the ES and any encapsulation type corresponding to the ES may include: Based on the packaging type, determine the corresponding indication information; Based on this instruction information and the router identifier of the PE device, the RD field of the BGP EVPN Type 4 route is generated; Based on the ESI of the ES and the RD field, a corresponding BGP EVPN Class 4 route is generated. For example, indication information corresponding to different encapsulation types can be pre-set; for instance, a mapping relationship between encapsulation types and indication information can be pre-established.

[0036] For example, suppose the encapsulation types include VXLAN encapsulation type, MPLS encapsulation type, NVGRE (Network Virtualization using Generic Routing Encapsulation) encapsulation type, and SR Policy (Segment Routing Policy) encapsulation type, and their corresponding indication information can be 00, 01, 10 and 11 respectively.

[0037] For example, the RD field of the four types of routes can be generated based on the determined indication information corresponding to the encapsulation type and the Router ID of the PE device. Then, the corresponding four types of routes can be generated based on the ESI of the ES and the generated RD field.

[0038] In EVPN networking, devices capable of publishing BGP routes (such as PE devices) are assigned a globally unique router identifier, and according to protocol requirements, the length of the router identifier will not exceed 4 bytes.

[0039] The RD field of Type 4 routes is 8 bytes long. Therefore, after the router identifier is carried in the RD field, there are at least 4 bytes left to carry the above-mentioned indication information.

[0040] In one example, the above indication information is carried in the last 4 bytes of the RD field.

[0041] For example, the first 4 bytes of the RD field can be used to carry the router identifier, and the last 4 bytes can be used to carry the aforementioned indication information.

[0042] For example, if there are four encapsulation types, the above indication information can be carried using two bits (such as the last two bits) of the last four bytes of RD.

[0043] In some embodiments, the routing transmission method provided in this application may further include: Upon receiving a BGP EVPN Type 4 route from a BGP EVPN peer, obtain the ESI information included in that BGP EVPN Type 4 route; If, based on the ESI information included in the BGP EVPN Type 4 route, it is determined that this device and the sending device belong to the same ES, the corresponding encapsulation type is determined based on the indication information included in the RD field of the BGP EVPN Type 4 route, and the device participates in the DF election for that encapsulation type for that ES.

[0044] For example, when a PE device receives four types of routes sent by a BGP EVPN peer, it can obtain the ESI information included in those four types of routes.

[0045] When the PE device obtains the ESI information in the four types of routes, it can compare the ESI values ​​included in the four types of routes with the ESI values ​​bound to each Ethernet segment of the device. If there are the same non-zero ESI, it is determined that the device and the sending device of the four types of routes belong to the same ESI.

[0046] In this case, the PE device can determine the corresponding encapsulation type based on the indication information included in the RD field of the four types of routes, and participate in the DF election for that encapsulation type for the ES.

[0047] In one example, the PE device can parse the RD field included in the received four types of routes, obtain the indication information carried in the last four bytes of the RD field, and determine the corresponding encapsulation information based on the indication information.

[0048] To enable those skilled in the art to better understand the technical solutions provided in the embodiments of this application, the technical solutions provided in the embodiments of this application are described below with reference to specific examples.

[0049] In this embodiment, it is still based on Figure 1 The EVPN multi-homed networking architecture shown is an example, but as... Figure 3 As shown, assume the physical link between CE and PE1 contains N (N≥2) ACs (e.g., Figure 3 In the diagram, AC1~ACN. Each AC corresponds to a different package type, and different package types are associated with different EVIs. For example, AC1 is associated with EVI1 (corresponding to package type 1), AC2 is associated with EVI2 (corresponding to package type 2), ..., ACN is associated with EVIN (corresponding to package type N).

[0050] The two physical links between CE and PE1 and PE2 (PE2 and its links are in Figure 3 (Not shown repeatedly) belong to the same ES, and EVI1 to EVI N are all associated with this ES (the ESI is the same, and this ESI is a non-zero ESI).

[0051] For this ES, PE1 can generate the corresponding 4 types of routes based on the ES's ESI and any encapsulation type (any encapsulation type from encapsulation type 1 to encapsulation type N) corresponding to the ES.

[0052] For any package type corresponding to the ES, PE1 can determine the indication information corresponding to the package type. For example, package type 1 corresponds to 1, package type 2 corresponds to 2 (binary 10), package type 3 corresponds to 3 (binary 11)... package type N corresponds to N.

[0053] PE1 can generate RDs for four types of routes based on the indication information corresponding to the encapsulation type and the router identifier of PE1.

[0054] The RD can be split into two parts: one part is used to carry the router identifier, and the other part is used to carry the indication information corresponding to different encapsulation types, which is used to identify different encapsulation types.

[0055] For example, the first 4 bytes of RD are used to carry the router identifier, and the last 4 bytes are used to carry the indication information.

[0056] Based on the RD, PE1 generates four types of routes; the field structure of the NLRI of these four types of routes is shown in Table 1, and the value used to indicate the encapsulation type in the encapsulation extension community is set to the default value.

[0057] PE1 can send these four types of routes to PE2 and PE3 respectively.

[0058] When PE2 receives these four types of routes, it determines that it belongs to the same Elastic Encapsulation Type (ES) as PE1 based on the ESI information in these routes. In this case, PE2 can parse the RD field of these four types of routes, obtain the indication information carried in the RD field, determine the corresponding encapsulation type based on the indication information, and perform DF election with PE1 for this encapsulation type of the ES.

[0059] Based on the above scheme, for multiple ACs on the same physical link (such as...) Figure 3 In a network of ACs (AC1 to AC N), where each AC is associated with an EVI of a different encapsulation type, the PE can send multiple Type 4 routes (each Type 4 route has a different RD, indicating they are not the same Type 4 route) based on the encapsulation type associated with each AC. This allows ACs under different EVIs to independently elect a designated DF.

[0060] As can be seen, in this embodiment, for EVPN multi-homing networks and scenarios where multiple EVPN encapsulations coexist, independent RDs can be generated for ACs accessing different encapsulation types on the same link without configuring different physical links or different ESIs for different encapsulation types. This generates multiple Type 4 routes, enabling the sending of different Type 4 routes for different encapsulation types of the same ES. This achieves the multi-homing function for traffic of different encapsulation types carried by the same ES, saving the number of uplink physical links, CE devices, and ESI resources at the uplink homing end.

[0061] Please see Figure 4 This is a schematic diagram of a routing sending device provided in an embodiment of this application. This routing sending device can be deployed on PE devices in an EVPN multi-homing scenario, such as... Figure 4 As shown, the routing transmission device may include: The generation unit 410 is used to generate a corresponding BGP EVPN Class 4 route for any ES with a non-zero ESI, based on the ESI of the ES and any encapsulation type corresponding to the ES; wherein the RD field of the BGP EVPN Class 4 route includes indication information for indicating the encapsulation type. The sending unit 420 is used to send the BGP EVPN Class 4 route to the BGP EVPN peer, so that the BGP EVPN peer, after determining that it and the PE device belong to the same ES based on the ESI information in the BGP EVPN Class 4 route, determines the corresponding encapsulation type based on the indication information included in the RD field of the BGP EVPN Class 4 route, and participates in the DF election for that encapsulation type for that ES.

[0062] In some embodiments, the generation unit 410 generates a corresponding Border Gateway Protocol (BGP) Ethernet Virtual Private Network (EVPN) Type 4 route based on the ESI of the ES and any encapsulation type corresponding to the ES, including: Based on the packaging type, determine the corresponding indication information; Based on the instruction information and the router identifier of the PE device, the RD field of the BGP EVPN Class 4 route is generated; Based on the ESI of the ES and the RD field, the corresponding BGP EVPN Class 4 route is generated.

[0063] In some embodiments, the indication information is carried in the last 4 bytes of the RD field.

[0064] In some embodiments, such as Figure 5 As shown, the device further includes: The acquisition unit 430 is used to acquire the ESI information included in the BGP EVPN Class 4 route when it receives the BGP EVPN Class 4 route sent by the BGP EVPN peer. Election unit 440 is used to determine the corresponding encapsulation type based on the indication information included in the RD field of the BGP EVPN Class 4 route when it is determined that the device and the sending device belong to the same ES based on the ESI information included in the BGP EVPN Class 4 route, and to participate in the DF election for the encapsulation type for the ES.

[0065] In some embodiments, the election unit 440 determines the corresponding encapsulation type based on the indication information included in the RD field of the BGP EVPN Class 4 route, including: Parse the RD field of the BGP EVPN Type 4 route to obtain the indication information carried in the last 4 bytes of the RD field of the BGP EVPN Type 4 route; Based on this instruction, determine the corresponding package type.

[0066] This application provides an electronic device including a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the routing and transmission method described above.

[0067] Please see Figure 6 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. The electronic device may include a processor 601 and a memory 602 storing machine-executable instructions. The processor 601 and the memory 602 can communicate via a system bus 603. Furthermore, by reading and executing the machine-executable instructions corresponding to the routing transmission logic in the memory 602, the processor 601 can execute the routing transmission method described above.

[0068] The memory 602 mentioned in this document can be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, etc. For example, machine-readable storage media can be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drives (such as hard disk drives), solid-state drives, any type of storage disk (such as optical discs, DVDs, etc.), or similar storage media, or combinations thereof.

[0069] In some embodiments, a machine-readable storage medium, such as Figure 6 The memory 602 in the device stores machine-executable instructions, which, when executed by a processor, implement the routing transmission method described above. For example, the storage medium may be ROM, RAM, CD-ROM, magnetic tape, floppy disk, or optical data storage device.

Claims

1. A routing transmission method, characterized in that, The method, applied to a service provider network edge PE device in a multi-homed Ethernet Virtual Private Network (EVPN) scenario, includes: For any Ethernet segment ES bound to a non-zero Ethernet segment identifier ESI, a corresponding Border Gateway Protocol (BGP) EVPN Type 4 route is generated based on the ESI of the ES and any encapsulation type corresponding to the ES; wherein the route identifier (RD) field of the BGP EVPN Type 4 route includes indication information for indicating the encapsulation type. The BGP EVPN Type 4 route is sent to the BGP EVPN peer so that the BGP EVPN peer, based on the ESI information in the BGP EVPN Type 4 route, determines that it and the PE device belong to the same ES, and then determines the corresponding encapsulation type based on the indication information included in the RD field of the BGP EVPN Type 4 route, and participates in the election of the designated forwarder (DF) for that encapsulation type for that ES.

2. The method according to claim 1, characterized in that, The step of generating a corresponding Border Gateway Protocol (BGP) Ethernet Virtual Private Network (EVPN) Type 4 route based on the ESI of the ES and any encapsulation type corresponding to the ES includes: Based on the packaging type, determine the corresponding indication information; Based on the instruction information and the router identifier of the PE device, the RD field of the BGP EVPN Class 4 route is generated; Based on the ESI of the ES and the RD field, the corresponding BGP EVPN Class 4 route is generated.

3. The method according to claim 1 or 2, characterized in that, The indication information is carried in the last 4 bytes of the RD field.

4. The method according to claim 1, characterized in that, The method further includes: Upon receiving a BGP EVPN Type 4 route from a BGP EVPN peer, obtain the ESI information included in that BGP EVPN Type 4 route; If, based on the ESI information included in the BGP EVPN Type 4 route, it is determined that this device and the sending device belong to the same ES, the corresponding encapsulation type is determined based on the indication information included in the RD field of the BGP EVPN Type 4 route, and the device participates in the DF election for that encapsulation type for that ES.

5. The method according to claim 4, characterized in that, The determination of the corresponding encapsulation type based on the indication information included in the RD field of the BGP EVPN Type 4 route includes: Parse the RD field of the BGP EVPN Type 4 route to obtain the indication information carried in the last 4 bytes of the RD field of the BGP EVPN Type 4 route; Based on this instruction, determine the corresponding package type.

6. A routing transmission device, characterized in that, A service provider network edge PE device deployed in a multi-homed Ethernet Virtual Private Network (EVPN) scenario, the device comprising: The generation unit is used to generate a corresponding Border Gateway Protocol (BGP) EVPN Type 4 route for any Ethernet segment ES with a bound non-zero Ethernet segment identifier (ESI), based on the ESI of the ES and any encapsulation type corresponding to the ES; wherein the route identifier (RD) field of the BGP EVPN Type 4 route includes indication information for indicating the encapsulation type. The sending unit is configured to send the BGP EVPN Class 4 route to the BGP EVPN peer, so that the BGP EVPN peer, after determining that it and the PE device belong to the same ES based on the ESI information in the BGP EVPN Class 4 route, determines the corresponding encapsulation type based on the indication information included in the RD field of the BGP EVPN Class 4 route, and participates in the designated forwarder (DF) election for that encapsulation type for that ES.

7. The apparatus according to claim 6, characterized in that, The generation unit generates a corresponding BGP Ethernet Virtual Private Network (EVPN) Type 4 route based on the ESI of the ES and any encapsulation type corresponding to the ES, including: Based on the packaging type, determine the corresponding indication information; Based on the instruction information and the router identifier of the PE device, the RD field of the BGP EVPN Class 4 route is generated; Based on the ESI of the ES and the RD field, the corresponding BGP EVPN Class 4 route is generated.

8. The apparatus according to claim 6 or 7, characterized in that, The indication information is carried in the last 4 bytes of the RD field.

9. The apparatus according to claim 6, characterized in that, The device further includes: The acquisition unit is used to acquire the ESI information included in the BGP EVPN Type 4 route when it receives the BGP EVPN Type 4 route sent by the BGP EVPN peer. The election unit is used to determine the corresponding encapsulation type based on the indication information included in the RD field of the BGP EVPN Type 4 route, when it is determined that the device and the sending device belong to the same ES based on the ESI information included in the BGP EVPN Type 4 route, and to participate in the DF election for the encapsulation type for the ES.

10. The apparatus according to claim 9, characterized in that, The election unit determines the corresponding encapsulation type based on the indication information included in the RD field of the BGP EVPN Type 4 route, including: Parse the RD field of the BGP EVPN Type 4 route to obtain the indication information carried in the last 4 bytes of the RD field of the BGP EVPN Type 4 route; Based on this instruction, determine the corresponding package type.

11. An electronic device, characterized in that, The method includes a processor and a memory, the memory storing machine-executable instructions that can be executed by the processor, the processor executing the machine-executable instructions to implement the method as described in any one of claims 1-5.

12. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores machine-executable instructions, which, when executed by a processor, implement the method as described in any one of claims 1-5.