A method, device and system for determining DF of multicast stream

By determining the DF of the multicast stream based on the bandwidth occupancy of the Ethernet link in EVPN, the load imbalance caused by the hash algorithm election is solved, and a more balanced multicast stream transmission is achieved.

CN113824647BActive Publication Date: 2025-03-25HUAWEI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110931979.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-10-19
Publication Date
2025-03-25
Estimated Expiration
2038-10-19

AI Technical Summary

Technical Problem

In the EVPN scenario, the DF election mechanism based on the hash algorithm may lead to unbalanced load of Ethernet links, some links are overloaded and some links are insufficient for bandwidth utilization.

Method used

The PE device determines the DF of the multicast stream based on the bandwidth occupancy of multiple Ethernet links belonging to the same ES, thereby helping to improve the load sharing balance of the multicast stream.

Benefits of technology

By determining the link with the least bandwidth occupancy as DF, the load sharing balance of multicast streams transmitted in EVPN is improved, and the problems of link overload and insufficient bandwidth utilization are avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113824647B_ABST
    Figure CN113824647B_ABST
Patent Text Reader

Abstract

A method, device and system for determining the DF of a multicast stream. In an EVPN scenario, a CE device is dual-homed or multi-homed to multiple PE devices. The first PE device is any PE device among the multiple PE devices. After determining that the CE device connected to the Ethernet link joins the multicast group of the multicast stream, the first PE device determines the bandwidth occupancy of multiple Ethernet links included in the ES to which the Ethernet link belongs, and then, based on the multicast stream bandwidth occupancy of the multiple Ethernet links, determines the PE device corresponding to the Ethernet link with the least multicast stream bandwidth occupancy as the DF of the multicast stream. Thereby, it helps to improve the balance of load sharing for transmitting multicast streams in EVPN.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims a divisional application of the Chinese patent application with application number 201811222225.6 filed on October 19, 2018, and invention name “A method, device and system for determining DF of a multicast stream”, all contents of which are incorporated by reference in this application. Technical Field

[0002] The present application relates to the field of communication technology, and in particular to a method, device and system for determining the DF of a multicast stream. Background Art

[0003] Multicast is a data transmission method that uses a multicast address to send data to multiple receivers on a Transmission Control Protocol (TCP) / Internet Protocol (IP) network at the same time in an efficient manner. The multicast source sends a multicast stream to the multicast group members in the multicast group via the links in the network, and all the multicast group members in the multicast group can receive the multicast stream. The multicast transmission method realizes a point-to-multipoint data connection between the multicast source and the multicast group members. Since the multicast stream only needs to be transmitted once on each network link and the multicast stream will only be copied when a branch appears in the link, the multicast transmission method improves the data transmission efficiency and reduces the possibility of congestion in the backbone network.

[0004] Ethernet virtual private network (EVPN) is a Layer 2 virtual private network (VPN) technology. EVPN connects customer sites in different regions through a cross-Internet Protocol (IP) / multiprotocol label switching (MPLS) bearer network, which is equivalent to these customer sites being located in the same local area network (LAN).

[0005] In an EVPN scenario, a customer edge (CE) device can receive multicast streams from a remote multicast source via multiple provider edge (PE) devices. The CE device is connected to the multiple PE devices via multiple Ethernet links, and the multiple Ethernet links belong to the same Ethernet segment (ES). In order to avoid the waste of network resources caused by the CE device receiving duplicate traffic from the multiple PE devices, a designated forwarder (DF) election mechanism is introduced into EVPN. In the EVPN scenario, the multiple PE devices elect DF based on a hash algorithm. However, the hash-based DF election mechanism may cause some of the multiple Ethernet links to be overloaded and some of the multiple Ethernet links to have insufficient bandwidth utilization, thereby resulting in a decrease in load sharing performance. Summary of the invention

[0006] In view of this, an embodiment of the present application provides a method, device and system for determining the DF of a multicast stream. In EVPN, the PE device determines the DF of the multicast stream based on the bandwidth occupancy of multiple Ethernet links belonging to the same ES, thereby helping to improve the balance of load sharing for transmitting multicast streams in EVPN.

[0007] The technical solutions provided in the embodiments of the present application are as follows.

[0008] In a first aspect, a method for determining the DF of a multicast stream is provided, characterized in that the method is applied in an Ethernet virtual private network EVPN, and the EVPN includes a first PE device, a second PE device, and a CE device. The CE device is connected to the first PE device via a first Ethernet link, and the CE device is connected to the second PE device via a second Ethernet link, and the first Ethernet link and the second Ethernet link belong to the same ES. The method includes, the first PE device receiving a first join message, the first join message is used to indicate that the CE device requests to join a first multicast group receiving a first multicast stream, and the first multicast stream is a multicast stream transmitted by the multicast source of the EVPN to the multicast group members in the first multicast group. Then, the first PE device adds the CE device to the first multicast group according to the first join message. Furthermore, the first PE device determines whether the first ratio is less than the second ratio, wherein the first ratio is the ratio of the first allocated bandwidth and the first link bandwidth, the first allocated bandwidth indicates the allocated bandwidth in the total bandwidth that can be allocated to the multicast service on the first Ethernet link, the first link bandwidth indicates the total bandwidth that can be allocated to the multicast service on the first Ethernet link, and the second ratio is the ratio of the second allocated bandwidth and the second link bandwidth, the second allocated bandwidth indicates the allocated bandwidth in the total bandwidth that can be allocated to the multicast service on the second Ethernet link, and the second link bandwidth indicates the total bandwidth that can be allocated to the multicast service on the second Ethernet link. When the first PE device determines that the first ratio is less than the second ratio, the first PE device determines that the first PE device is the DF of the first multicast stream. In response to the first PE device determining that the first PE device is the DF of the first multicast stream, the first PE device allocates bandwidth to the first multicast stream.

[0009] Through the above implementation, in the EVPN scenario, after the PE device determines that the CE device connected to the Ethernet link joins the multicast group of the multicast stream, the PE device determines the bandwidth occupancy of multiple Ethernet links included in the ES to which the Ethernet link belongs. Then, according to the multicast stream bandwidth occupancy of the multiple Ethernet links, the PE device determines the PE device corresponding to the Ethernet link with the least multicast stream bandwidth occupancy as the DF of the multicast stream. Thus, it helps to improve the balance of load sharing of multicast streams transmitted in EVPN.

[0010] In a possible implementation of the first aspect, the EVPN further includes a third PE device, the CE device is connected to the third PE device via a third Ethernet link, and the third Ethernet link belongs to the ES. Before the first PE device determines whether the first ratio is less than the second ratio, the method further includes the first PE device determining that the first ratio is less than a third ratio, wherein the third ratio is a ratio of a third allocated bandwidth to a third link bandwidth, the third allocated bandwidth indicates an allocated bandwidth in a total bandwidth that can be allocated to a multicast service on the third Ethernet link, and the third link bandwidth indicates a total bandwidth that can be allocated to a multicast service on the third Ethernet link.

[0011] In another possible implementation of the first aspect, the method further includes, when the first PE device determines that the first ratio is not less than the second ratio, and the first ratio is greater than the second ratio, the first PE device determines that the first PE device is a non-designated forwarder (non-DF) of the first multicast stream. In response to the first PE device determining that the first PE device is a non-DF of the first multicast stream, the first PE device does not allocate bandwidth for the first multicast stream.

[0012] In another possible implementation of the first aspect, the method also includes, when the first PE device determines that the first ratio is not less than the second ratio, and the first ratio is equal to the second ratio, and when the first PE device determines that the value of the IP address of the first PE device is greater than the value of the IP address of the second PE device, the first PE device determines that the first PE device is the DF of the first multicast stream.

[0013] In another possible implementation of the first aspect, the method also includes, when the first PE device determines that the first ratio is not less than the second ratio, and the first ratio is equal to the second ratio, and when the first PE device determines that the first link bandwidth is greater than the second link bandwidth, the first PE device determines that the first PE device is the DF of the first multicast stream.

[0014] In another possible implementation of the first aspect, the method further includes: when the first PE device determines that the first ratio is not less than the second ratio, and the first ratio is equal to the second ratio, the first PE device determines, according to a Hash algorithm, that the first PE device is the DF of the first multicast stream.

[0015] In another possible implementation of the first aspect, before the first PE device determines whether the first ratio is less than the second ratio, the method further includes: the first PE device receiving a second Ethernet segment route sent by the second PE device, the second Ethernet segment route including a second link bandwidth extended community attribute, the second link bandwidth extended community attribute being used to carry the second link bandwidth. The first PE device sends a first Ethernet segment route to the second PE device, the first Ethernet segment route including a first link bandwidth extended community attribute, the first link bandwidth extended community attribute being used to carry the first link bandwidth.

[0016] Through the above implementation, the PE device can automatically obtain the link bandwidth of all Ethernet links included in the ES.

[0017] In still another possible implementation manner of the first aspect, the first join message is a multicast group join message sent by the CE device.

[0018] In another possible implementation manner of the first aspect, the method further includes the first PE device sending a first join synchronization route to the second PE device, where the first join synchronization route is used to indicate that the CE device requests to join the first multicast group that receives the first multicast stream.

[0019] In still another possible implementation manner of the first aspect, the first join synchronization route includes a first multicast DF extended community attribute, where the first multicast DF extended community attribute carries an IP address of a PE device serving as a DF of the first multicast stream.

[0020] In still another possible implementation manner of the first aspect, the first join message is a second join synchronization route sent by the second PE device.

[0021] In another possible implementation of the first aspect, the method further includes, the first PE device determining that the third Ethernet link exits the ES according to a revocation message of the first Ethernet automatic discovery per Ethernet segment route received from the third PE device, wherein the revocation message indicates that the third PE device revokes the first Ethernet automatic discovery per Ethernet segment route. The first PE device determines the PE device as the DF of the second multicast stream according to the first link bandwidth and the second link bandwidth, or the first PE device determines the PE device as the DF of the second multicast stream according to the value of the IP address of the first PE device and the value of the IP address of the second PE device, wherein before the third Ethernet link exits the ES, the DF of the second multicast stream is the third PE device, the second multicast stream is a multicast stream transmitted by the multicast source of the EVPN to the multicast group members in the second multicast group, and the CE device is a multicast group member in the second multicast group. The first PE device sends a third join synchronization route corresponding to the second multicast stream to the second PE device, the third join synchronization route includes a second multicast DF extended community attribute, and the second multicast DF extended community attribute carries the IP address of the PE device as the DF of the second multicast stream.

[0022] Through the above implementation, when an Ethernet link in an ES exits the ES, the multicast stream on the Ethernet link exiting the ES can be promptly transferred to other Ethernet links, ensuring that the forwarding of the multicast stream is not interrupted.

[0023] In another possible implementation of the first aspect, the method further includes, when the first PE device determines that the first ratio is not less than the second ratio, and the first ratio is greater than the second ratio, the first PE device determines that the first PE device is a non-DF of the first multicast stream. In response to the first PE device determining that the first PE device is a non-DF of the first multicast stream, the first PE device does not allocate bandwidth for the first multicast stream. The first PE device automatically discovers each Ethernet segment route based on the second Ethernet received from the fourth PE device, determines that the fourth Ethernet link joins the ES, and the CE device is connected to the fourth PE device via the fourth Ethernet link. The first PE device changes the PE device that serves as the DF of the third multicast stream from the first PE device to the fourth PE device, the third multicast stream being a multicast stream transmitted by the multicast source of the EVPN to the multicast group members in the third multicast group, and the CE device is a multicast group member in the third multicast group. The first PE device sends a fourth join synchronization route corresponding to the third multicast stream to the second PE device and the fourth PE device, the fourth join synchronization route including a third multicast DF extended community attribute, and the third multicast DF extended community attribute carries the IP address of the fourth PE device.

[0024] Through the above implementation, when a new Ethernet link is added to the ES, the multicast stream on the Ethernet link with higher bandwidth occupancy in the ES can be migrated to the new Ethernet link, thereby improving the balance of each Ethernet link in the ES.

[0025] In a second aspect, a first PE device is provided, wherein the first PE device has a function of implementing the behavior of the first PE device in the above method. The function can be implemented based on hardware, or can be implemented based on hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above function.

[0026] In one possible design, the structure of the first PE device includes a processor and an interface, and the processor is configured to support the first PE device to perform the corresponding functions in the above method. The interface is used to support the communication between the first PE device and the second network device or the calling end device or the listening end device, and to send the information or instructions involved in the above method to the second network device or the calling end device or the listening end device, or to receive the information or instructions involved in the above method from the second network device or the calling end device or the listening end device. The first PE device may also include a memory, which is used to couple with the processor and store the necessary program instructions and data of the first PE device.

[0027] In another possible design, the first PE device includes: a processor, a transmitter, a receiver, a random access memory, a read-only memory, and a bus. The processor is respectively coupled to the transmitter, the receiver, the random access memory, and the read-only memory through the bus. When the first PE device needs to be run, it is started by the basic input / output system solidified in the read-only memory or the bootloader boot system in the embedded system to guide the first PE device into a normal operating state. After the first PE device enters the normal operating state, the application program and the operating system are run in the random access memory, so that the processor executes the method in the first aspect or any possible implementation of the first aspect.

[0028] In a third aspect, a first PE device is provided, wherein the first PE device includes: a main control board and an interface board, and further, may also include a switching network board. The first PE device is used to execute the method in the first aspect or any possible implementation of the first aspect. Specifically, the first PE device includes a module for executing the method in the first aspect or any possible implementation of the first aspect.

[0029] In a fourth aspect, a first PE device is provided, wherein the first PE device includes a controller and a first forwarding sub-device. The first forwarding sub-device includes: an interface board, and further, may also include a switching network board. The first forwarding sub-device is used to perform the function of the interface board in the third aspect, and further, may also perform the function of the switching network board in the third aspect. The controller includes a receiver, a processor, a transmitter, a random access memory, a read-only memory, and a bus. The processor is respectively coupled to the receiver, the transmitter, the random access memory, and the read-only memory through the bus. When the controller needs to be run, it is started by the basic input / output system solidified in the read-only memory or the bootloader boot system in the embedded system, and the controller is guided to enter a normal operating state. After the controller enters the normal operating state, the application program and the operating system are run in the random access memory, so that the processor performs the function of the main control board in the third aspect.

[0030] In a fifth aspect, a computer storage medium is provided for storing programs, codes or instructions used for the above-mentioned first PE device. When a processor or hardware device executes these programs, codes or instructions, the functions or steps of the first PE network device in the above-mentioned first aspect can be completed.

[0031] In a sixth aspect, an EVPN system is provided, the EVPN system comprising a first PE device, wherein the first PE device is the first PE device in the second aspect, the third aspect, or the fourth aspect.

[0032] Through the above scheme, in the EVPN scenario, after the PE device determines that the CE device connected to the Ethernet link joins the multicast group of the multicast stream, the PE device determines the bandwidth occupancy of multiple Ethernet links included in the ES to which the Ethernet link belongs. Then, according to the multicast stream bandwidth occupancy of the multiple Ethernet links, the PE device determines the PE device corresponding to the Ethernet link with the least multicast stream bandwidth occupancy as the DF of the multicast stream. Thus, it helps to improve the balance of load sharing of multicast streams transmitted in EVPN. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 A schematic diagram of an EVPN structure according to an embodiment of the present application;

[0034] Figure 2 This is another schematic diagram of the EVPN structure of an embodiment of the present application;

[0035] Figure 3 A flow chart of a method for determining the DF of a multicast stream according to an embodiment of the present application;

[0036] Figure 4 This is a schematic diagram of the structure of the first PE device in an embodiment of the present application;

[0037] Figure 5 This is a schematic diagram of the hardware structure of the first PE device in an embodiment of the present application;

[0038] Figure 6 This is a schematic diagram of the hardware structure of another first PE device according to an embodiment of the present application. DETAILED DESCRIPTION

[0039] The following describes the embodiments in detail.

[0040] The EVPN technology involved in this application can refer to the description of Internet Engineering Task Force (English: Internet Engineering Task Force, abbreviation: IETF) Request For Comments (English: Request For Comments, abbreviation: RFC) 7432. The content of RFC7432 is generally incorporated by reference into this application as if copied as a whole.

[0041] Figure 1 Schematic diagram of an EVPN structure of an embodiment of the present application. Figure 1As shown, the EVPN includes an access side and a network side. The access side is used to receive multicast streams from the network side, and the access side communicates with the network side through an IP network. The IP network may be a metropolitan area network (MAN) or a data center (DC) network or a mobile bearer network or a fixed network. A typical mobile bearer network is an Internet Protocol radio access network (IP RAN).

[0042] The access side includes CE equipment 11, PE equipment 11 and PE equipment 12. CE equipment 11 is connected to PE equipment 11 via Ethernet link 11, and CE equipment 11 is connected to PE equipment 12 via Ethernet link 12. Ethernet link 11 and Ethernet link 12 belong to the same ES. Figure 1 In this way, CE device 11 is dual-homed to PE device 11 and PE device 12 via two Ethernet links. The Ethernet segment identifier (ESI) can be used to identify ES01. Figure 1 For example, the ESI value of ES01 of Ethernet link 11 and Ethernet link 12 is the same value, and the value is non-zero. ESI includes a type (Type) domain and an ESI value domain, wherein the Type domain is used to indicate the generation method of ESI. The two commonly used generation methods are Type0 and Type1, wherein Type0 indicates generation through manual configuration, and Type1 indicates generation through the link aggregation control protocol (LACP) running between the PE device and the CE device, and the value range of the ESI value domain is 0 to 0xFF, wherein "0x" indicates hexadecimal. The generation and setting of ES and ESI can refer to the description of Chapter 5 in RFC7432. Optionally, PE device 11 is connected to PE device 12 via an inter-frame link. PE device 11 and PE device 12 can be routers or layer 3 switches. CE device 11 can be a router or a switch or a host. PE device 11, PE device 12 and CE device 11 in the embodiment of the present application can be corresponding devices defined in RFC7432. When the CE device 11 is a router or a switch, it can be connected to one or more hosts, wherein the host can be a physical device or a virtual machine (VM).

[0043] In EVPN, PE device 11 and PE device 12 are a pair of border gateway protocol (BGP) peers (BGP peer). BGP peer can also be called EVPN peer. Among them, "a pair of BGP peers" can be understood as: one device is the BGP peer of another device. For example, PE device 11 and PE device 12 are a pair of BGP peers, which can be understood as PE device 11 is the BGP peer of PE device 12, or PE device 12 is the BGP peer of PE11 device. The BGP peer can also be called a BGP neighbor; accordingly, the EVPN peer can also be called an EVPN neighbor. In this application, for the convenience of explanation, BGP peer is uniformly used in subsequent embodiments. The BGP peer is established through the OPEN message specified in BGP, and the established BGP peer is maintained through the KEEPALIVE message. For the implementation of the OPEN message and the KEEPALIVE message, refer to the relevant description of IETF RFC2858 and IETF RFC1771. In addition, route reflectors (RR) can be deployed on the devices at both ends of the BGP peering process, thereby utilizing RR to complete the establishment of the BGP peering process.

[0044] The network side includes a PE device 21 and a CE device 22. The PE device 21 is connected to the CE device 21, the PE device 21 communicates with the PE device 11 through a first communication link, and the PE device 21 communicates with the PE device 12 through a second communication link.

[0045] Figure 2 A schematic diagram of another EVPN structure according to an embodiment of the present application. Figure 2 EVPN shown with Figure 1 The EVPN structure shown is similar. Figure 2 The EVPN structure shown can be understood as Figure 1 Based on the EVPN structure shown in FIG. 1 , a PE device 13 is added to obtain the EVPN. Figure 2 and Figure 1 The differences are explained. Figure 2 and Figure 1 The similarities are not repeated here.

[0046] CE device 11 is connected to PE device 13 via Ethernet link 13, and Ethernet link 13 belongs to ES01. Therefore, Ethernet link 11, Ethernet link 12, and Ethernet link 13 belong to the same ES. In this way, CE device 11 is multi-owned by PE device 11, PE device 12, and PE device 13 via three Ethernet links. PE device 13 is connected to PE device 11 via an inter-frame link, and PE device 13 is also connected to PE device 12 via an inter-frame link. PE device 13 communicates with PE device 21 via a third communication link. According to the above, Figure 2 In the embodiment, any two PE devices among PE device 11, PE device 12 and PE device 13 are a pair of BGP peers. Specifically, PE device 11 and PE device 12 are a pair of BGP peers, PE device 11 and PE device 13 are a pair of BGP peers, and PE device 12 and PE device 13 are a pair of BGP peers.

[0047] In the implementation mode of the present application, the CE device 21 is used as a multicast source device for sending multicast streams, and the CE device 11 can be used as a receiving device for multicast streams. For example, the CE device 21 sends multicast stream 01, and the PE device 21 is responsible for forwarding the multicast stream 01 to the IP network. Figure 1 In the example, both PE device 11 and PE device 12 receive multicast stream 01. If CE device 11 is a multicast group member in the multicast group corresponding to multicast stream 01, PE device 11 is used to forward multicast stream 01 to CE device 11 via Ethernet link 11, and PE device 12 is used to forward multicast stream 01 to CE device 11 via Ethernet link 12. Figure 2 In the example, PE device 11, PE device 12 and PE device 13 all receive multicast stream 01. If CE device 11 is a multicast group member in the multicast group corresponding to multicast stream 01, PE device 11 is used to forward multicast stream 01 to CE device 11 via Ethernet link 11, PE device 12 is used to forward multicast stream 01 to CE device 11 via Ethernet link 12, and PE device 13 is used to forward multicast stream 01 to CE device 11 via Ethernet link 13.

[0048] exist Figure 1 In the example, if both PE device 11 and PE device 12 forward multicast stream 01 to CE device 11, CE device 11 will receive traffic repeatedly. In the EVPN scenario, the DF mechanism can be used to prevent CE device 11 from receiving traffic repeatedly. Figure 1As shown, Ethernet link 11 and Ethernet link 12 belong to the same ES. Assume that PE device 11 is the DF of multicast stream 01, and PE device 12 is a non-designated forwarder (non-DF) of multicast stream 01. In this way, PE device 11, which is the DF of multicast stream 01, is responsible for forwarding multicast stream 01 to CE device 11, and PE device 12, which is the non-DF of multicast stream 01, does not forward multicast stream 01 to CE device 11.

[0049] In the same way, Figure 2 In the example, Ethernet link 11, Ethernet link 12, and Ethernet link 13 belong to the same ES. For the same multicast stream, only one of the Ethernet links belonging to the same ES is connected to a PE device as a DF. Figure 1 As shown in the figure, it is assumed that PE device 11 is the DF of multicast stream 01, and PE device 12 and PE device 13 are non-DF of multicast stream 01. In this way, PE device 11, which is the DF of multicast stream 01, is responsible for forwarding multicast stream 01 to CE device 11, and PE device 12 and PE device 13, which are non-DF of multicast stream 01, do not forward multicast stream 01 to CE device 11.

[0050] In the implementation method of determining the DF of the multicast stream, RFC 7432 provides a possible implementation method. That is, according to the IP address and virtual local area network (VLAN) identifier (ID) of the PE device belonging to the same ES, the DF and non-DF of the corresponding VLAN are elected. The specific implementation method can be found in the explanation and description of RFC 7432, which will not be repeated here.

[0051] In another possible implementation of determining the DF of a multicast stream, the PE device may determine the DF of a multicast stream based on a Highest Random Weight (HRW) algorithm, wherein the HRW algorithm is an implementation of a Hash algorithm. For a specific implementation, see the IETF working group draft draft-ietf-bess-evpn-df-election-framework-03 (Framework for EVPN Designated Forwarder Election Extensibility). The content of the working group draft draft-ietf-bess-evpn-df-election-framework-03 is incorporated by reference in this application as if copied in its entirety, and is not described in detail herein.

[0052] In another possible implementation of determining the DF of a multicast flow, a PE device may determine the DF of a multicast flow based on an extended HRW algorithm. For a specific implementation, see the IETF working group draft draft-sajassi-bess-evpn-per-mcast-flow-df-election-01 (Per multicast flow Designated ForwarderElection for EVPN). The content of the working group draft draft-sajassi-bess-evpn-per-mcast-flow-df-election-01 is incorporated by reference in this application as if copied in its entirety, and will not be repeated here.

[0053] However, the DF election mechanism based on the hash algorithm (for example, the aforementioned HRW and extended HRW) may cause overload of some of the multiple Ethernet links and insufficient bandwidth utilization of some of the multiple Ethernet links, thereby causing a degradation in load sharing performance. Figure 1 For example, assume that the multicast source of multicast streams G1-G9, a total of 9 multicast streams, is CE device 21, and CE device 11 is a multicast group member of each multicast stream. According to the HRW algorithm, PE device 11 is the DF of multicast streams G1-G7, a total of 7 multicast streams; PE device 12 is the DF of multicast streams G8-G9, a total of 2 multicast streams. Assuming that the required bandwidth of each multicast stream is 100Mbps, the transmission bandwidth load of Ethernet link 11 is 700Mbps, and the transmission bandwidth load of Ethernet link 12 is 200Mbps. As a result, Ethernet link 11 may cause congestion due to overload, and Ethernet link 12 may cause insufficient bandwidth utilization of the Ethernet link. Among them, Mbps means Mbit / s, that is, megabit per second.

[0054] Through the implementation method of the present application, in EVPN, the PE device no longer relies on the DF election mechanism of the Hash algorithm. The PE device determines the DF of the multicast stream based on the bandwidth occupancy of multiple Ethernet links belonging to the same ES, thereby helping to improve the balance of load sharing of multicast streams transmitted in EVPN.

[0055] Figure 3 The present invention is a flowchart of a method for determining the DF of a multicast stream according to an embodiment of the present application. Figure 2 The method shown can be applied to Figure 1 or Figure 2The EVPN shown in FIG. 1 includes a first PE device, a second PE device, and a CE device. The CE device is connected to the first PE device via a first Ethernet link. The CE device is connected to the second PE device via a second Ethernet link. The first Ethernet link and the second Ethernet link belong to the same ES. Figure 1 and Figure 2 , the first PE device is Figure 1 or Figure 2 The PE device 11 in the embodiment of the present invention is Figure 1 or Figure 2 The PE device 12 in the embodiment of the present invention is Figure 1 or Figure 2 In the CE device 11, the first Ethernet link is Figure 1 or Figure 2 The Ethernet link 11, the second Ethernet link is Figure 1 or Figure 2 The Ethernet link 12 in the ES is ES01. In the implementation manner of the present application, unless otherwise specified, the above features may be equivalent to the corresponding features. Figure 3 The method shown includes S101 to S104.

[0056] S101. The first PE device receives a first join message, where the first join message is used to instruct the CE device to request to join a first multicast group that receives a first multicast stream, where the first multicast stream is a multicast stream transmitted by the multicast source of the EVPN to multicast group members in the first multicast group.

[0057] S102: The first PE device adds the CE device to the first multicast group according to the first join message.

[0058] like Figure 1 As shown, the CE device 21 located on the EVPN network side can send a multicast stream to the EVPN access side through the IP network. Specifically, the CE device 21 is a multicast source on the EVPN network side. For example, the CE device 21 is a server of an operator that provides video services to users. The CE device 21 sends a first multicast stream to the PE device 21. The first multicast stream can be expressed as (S1, G1), where S1 represents the multicast source IP address of the first multicast stream, that is, the IP address of the CE device 21; G1 represents the IP address of the first multicast group. The PE device 21 can forward the first multicast stream to the PE device 11 and the PE device 12 via the IP network. The first multicast stream can reach the CE device 11 via the PE device 11 and the Ethernet link 11, or the first multicast stream can reach the CE device 11 via the PE device 12 and the Ethernet link 12.

[0059] In order for CE device 11 to receive the first multicast stream, CE device 11 needs to request to join the first multicast group of the first multicast. Specifically, in a possible implementation, CE device 11 sends a first multicast group join message to PE device 11 via Ethernet link 11. The first multicast group join message is a first join message, and the first join message is used to indicate that CE device 11 requests to join the first multicast group receiving the first multicast stream. After PE device 11 receives the first multicast group join message, it adds CE device 11 to the first multicast group of the first multicast stream according to the first multicast group join message. In this way, PE device 11 can confirm that CE device 11 becomes a multicast group member in the first multicast group, and CE device 11 can receive the first multicast stream forwarded by PE device 11 via Ethernet link 11. After PE device 11 receives the first multicast group join message, PE device 11 generates a first join synchronization route according to the first multicast group join message, and the first join synchronization route is used to indicate that CE device 11 requests to join the first multicast group receiving the first multicast stream. PE device 11 sends the first join synchronization route to PE device 12. After PE device 12 receives the first join synchronization route, it joins CE device 11 to the first multicast group of the first multicast stream according to the first join synchronization route. In this way, PE device 12 can confirm that CE device 11 becomes a multicast group member in the first multicast group, and CE device 11 can receive the first multicast stream forwarded by PE device 12 via Ethernet link 12.

[0060] In another possible implementation, the CE device 11 sends a second multicast group join message to the PE device 12 via the Ethernet link 12. After receiving the second multicast group join message, the PE device 12 adds the CE device 11 to the first multicast group of the first multicast stream according to the second multicast group join message. In this way, the PE device 12 can confirm that the CE device 11 becomes a multicast group member in the first multicast group, and the CE device 11 can receive the first multicast stream forwarded by the PE device 12 via the Ethernet link 12. After the PE device 12 receives the second multicast group join message, the PE device 12 generates a second join synchronization route according to the second multicast group join message. The second join synchronization route is the first join message, and the first join message is used to indicate that the CE device 11 requests to join the first multicast group receiving the first multicast stream. The PE device 12 sends the second join synchronization route to the PE device 11. After receiving the second join synchronization route, the PE device 11 adds the CE device 11 to the first multicast group of the first multicast stream according to the second join synchronization route. In this way, the PE device 11 can confirm that the CE device 11 becomes a multicast group member in the first multicast group, and the CE device 11 can receive the first multicast stream forwarded by the PE device 11 via the Ethernet link 11 .

[0061] In the above implementation, the first multicast group join message and the second multicast group join message can be Internet group management protocol (IGMP) messages. Correspondingly, the first join synchronization route and the second join synchronization route can be IGMP join synchronization routes (IGMP join synch route). Among them, the implementation method of the IGMP join synchronization route can refer to the IETF working group draft draft-ietf-bess-evpn-igmp-mld-proxy-02 (IGMP and MLD Proxy for EVPN). The content of the working group draft draft-ietf-bess-evpn-igmp-mld-proxy-02 is generally incorporated by reference in this application as if copied as a whole, and will not be repeated here.

[0062] In the above implementation, the first multicast group join message and the second multicast group join message can be protocol independent multicast (PIM) messages. Correspondingly, the first join synchronization route and the second join synchronization route can be PIM join synchronization routes (PIM join synch route). Among them, the implementation method of the PIM join synchronization route can refer to the IETF working group draft draft-skr-bess-evpn-pim-proxy-01 (PIMProxy in EVPN Networks). The content of the working group draft draft-skr-bess-evpn-pim-proxy-01 is generally incorporated by reference in this application as if copied as a whole, and will not be repeated here.

[0063] The above Figure 1 As an example, the implementation method of CE device 11 joining the first multicast group of the first multicast stream is described. EVPN may include more than two PE devices connected to CE device 11, for example Figure 3 .exist Figure 3 In the network scenario shown, the CE device 11 can join the first multicast group of the first multicast stream in accordance with the above implementation. For example, the CE device 11 sends a multicast group join message to the PE device 11, and the PE device 11 notifies the PE device 12 and the PE device 13 to join the synchronous route. Thus, the PE device 11, the PE device 12 and the PE device 13 can all confirm that the CE device 11 has joined the first multicast group of the first multicast stream. In the implementation mode of the present application, the CE device 11 is taken as an example to illustrate the network device receiving the multicast stream. In the actual scenario, the EVPN may include multiple CE devices 11, and each CE device 11 can implement the joining of the multicast group and the reception of the multicast stream in the above manner. In the implementation mode of the present application, the first multicast stream is taken as an example for explanation, and it should be understood that the EVPN can transmit multiple multicast streams. When the CE device 11 joins the multicast group corresponding to each multicast stream, it can be implemented in accordance with the above implementation mode.

[0064] S103. The first PE device determines whether the first ratio is less than the second ratio, wherein the first ratio is the ratio of the first allocated bandwidth and the first link bandwidth, the first allocated bandwidth indicates the allocated bandwidth in the total bandwidth that can be allocated to the multicast service on the first Ethernet link, the first link bandwidth indicates the total bandwidth that can be allocated to the multicast service on the first Ethernet link, the second ratio is the ratio of the second allocated bandwidth and the second link bandwidth, the second allocated bandwidth indicates the allocated bandwidth in the total bandwidth that can be allocated to the multicast service on the second Ethernet link, and the second link bandwidth indicates the total bandwidth that can be allocated to the multicast service on the second Ethernet link.

[0065] S104: When the first PE device determines that the first ratio is less than the second ratio, the first PE device determines that the first PE device is the DF of the first multicast flow.

[0066] S105: In response to the first PE device determining that the first PE device is the DF of the first multicast stream, the first PE device allocates bandwidth to the first multicast stream.

[0067] According to S101 and S102, see Figure 1 , CE device 11 can receive the first multicast stream forwarded by PE device 11 via Ethernet link 11, or CE device 11 can receive the first multicast stream forwarded by PE device 12 via Ethernet link 12. In actual scenarios, if CE device 11 receives the first multicast stream from PE device 11 and PE device 12 at the same time, CE device 11 will receive double traffic, resulting in waste of network resources. Therefore, the DF election mechanism in EVPN will avoid this double traffic. PE device 11 determines whether PE device 11 is the DF of the first multicast stream, thereby determining whether PE device 11 can forward the multicast message belonging to the first multicast stream to CE device 11 via Ethernet link 11. Similarly, PE device 12 determines whether PE device 12 is the DF of the first multicast stream, thereby determining whether PE device 12 can forward the multicast message belonging to the first multicast stream to CE device 11 via Ethernet link 12. The following takes PE device 11 as an example to illustrate the implementation process of PE device 11 determining the DF of the first multicast stream.

[0068] Before executing S103, PE device 11 needs to know the link bandwidth of all Ethernet links in ES01. Figure 1As shown, PE device 11 needs to know the link bandwidth of Ethernet link 11 and Ethernet link 12 belonging to ES01. Since PE device 11 is connected to Ethernet link 11, PE device 11 can determine the first link bandwidth of Ethernet link 11. The first link bandwidth indicates the total bandwidth that can be allocated to multicast services on Ethernet link 11, that is, the first link bandwidth is the total bandwidth of multicast services forwarded by PE device 11 to CE device 11 via Ethernet link 11. Specifically, PE device 11 may forward multiple types of services to CE device 11 via Ethernet link 11, such as unicast services, multicast services, and broadcast services. In an embodiment of the present application, the first link bandwidth refers to the allocable bandwidth for PE device 11 to forward multicast services to CE device 11 via Ethernet link 11, that is, the sum of the required bandwidth for PE device 11 to forward multicast streams to CE device 11 via Ethernet link 11. The specific value of the first link bandwidth can be determined by PE device 11 according to the forwarding capability of the line card of PE device 11. For example, the forwarding capacity of the line card of the PE device 11 is represented as a bandwidth of 2000Mbps, of which 500Mbps is allocated to unicast services, 1000Mbps is allocated to multicast services, and 500Mbps is allocated to broadcast services. Then, 1000Mbps is the specific value of the first link bandwidth. The specific value of the first link bandwidth can also be determined by the PE device 11 according to the physical bandwidth of the Ethernet link 11. For example, the physical bandwidth of the Ethernet link 11 is represented as 2000Mbps, of which 500Mbps is allocated to unicast services, 1000Mbps is allocated to multicast services, and 500Mbps is allocated to broadcast services. Then, 1000Mbps is the specific value of the first link bandwidth. Similarly, the PE device 12 can determine the second link bandwidth of the Ethernet link 12 through the above implementation method. The second link bandwidth indicates the allocable bandwidth of the PE device 12 for forwarding the multicast service to the CE device 11 via the Ethernet link 12, that is, the total bandwidth required for the PE device 12 to forward the multicast stream to the CE device 11 via the Ethernet link 12. Therefore, in the implementation manner of the present application, the link bandwidth of the Ethernet link refers to the bandwidth used to forward multicast services.

[0069] PE device 11 also needs to know the second link bandwidth of Ethernet link 12. In one possible implementation, PE device 11 can know the second link bandwidth by static configuration. Specifically, the network administrator directly configures the link bandwidth of the Ethernet link included in ES01 in PE device 11. In another possible implementation, EVPN may include a network management device, and the network management device sends the link bandwidth of the Ethernet link included in ES01 to PE device 11. In another possible implementation, PE device 11 receives a second Ethernet segment route sent by PE device 12, and the second Ethernet segment route includes a second link bandwidth extended community attribute, and the second link bandwidth extended community attribute is used to carry the second link bandwidth. PE device 11 can obtain the second link bandwidth according to the second Ethernet segment route. Among them, the implementation method of the second Ethernet segment route can refer to the corresponding explanation in RFC7432, and the implementation method of the second link bandwidth extended community can refer to the IETF working group draft draft-ietf-idr-link-bandwidth-07 (BGP Link Bandwidth Extended Community). The content of the working group draft draft-ietf-idr-link-bandwidth-07 is incorporated by reference in this application as if copied in its entirety, and will not be repeated here. Similarly, PE device 11 can also send a first Ethernet segment route to PE device 12, where the first Ethernet segment route includes a first link bandwidth extension group attribute, and the first link bandwidth extension group attribute is used to carry the first link bandwidth. PE device 12 can obtain the first link bandwidth according to the first Ethernet segment route.

[0070] Through the above implementation, PE device 11 can obtain the link bandwidth of all Ethernet links included in ES01. In the same way, PE device 12 can also obtain the link bandwidth of all Ethernet links included in ES01. Figure 1 As shown, after acquiring the first link bandwidth and the second link bandwidth, the PE device 11 may determine a first ratio and a second ratio according to the first link bandwidth and the second link bandwidth.

[0071] The first ratio is the ratio of the first allocated bandwidth to the first link bandwidth, the first allocated bandwidth indicates the allocated bandwidth in the total bandwidth that can be allocated to the multicast service on the Ethernet link 11, the first link bandwidth indicates the total bandwidth that can be allocated to the multicast service on the Ethernet link 11, the second ratio is the ratio of the second allocated bandwidth to the second link bandwidth, the second allocated bandwidth indicates the allocated bandwidth in the total bandwidth that can be allocated to the multicast service on the Ethernet link 12, and the second link bandwidth indicates the total bandwidth that can be allocated to the multicast service on the Ethernet link 12. The first allocated bandwidth refers to: the bandwidth that has been allocated to the multicast service in the total bandwidth that can be allocated to the multicast service on the Ethernet link 11. For example, the value of the first link bandwidth is 1000Mbps. The DF of the multicast stream G1 and the multicast stream G2 is the PE device 11, and the multicast group corresponding to the multicast stream G1 includes the CE device 11 and the multicast group corresponding to the multicast stream G2 includes the CE device 11. The multicast stream G1 and the multicast stream G2 do not include the aforementioned first multicast stream. The bandwidth of the multicast service allocated by PE device 11 to multicast stream G1 is 100 Mbps, and the bandwidth of the multicast service allocated by PE device 11 to multicast stream G2 is 200 Mbps. Therefore, in the above 1000 Mbps, the allocated bandwidth is 300 Mbps, and the remaining allocated bandwidth is 700 Mbps.

[0072] In combination with the above description, the first ratio and the second ratio can also be understood according to the following description. The first ratio is the ratio of the total bandwidth requirements of the multicast streams with PE device 11 as DF and CE device 11 as a multicast group member to the first link bandwidth. The second ratio is the ratio of the total bandwidth requirements of the multicast streams with PE device 12 as DF and CE device 11 as a multicast group member to the second link bandwidth. Among them, the total bandwidth requirements of the multicast streams with PE device 11 as DF and CE device 11 as a multicast group member specifically refers to: the multicast streams corresponding to the multicast group that CE device 11 has joined, and these multicast streams are forwarded to CE device 11 with PE device 11 as DF, and PE device 11 determines the total bandwidth requirements of these multicast streams. The total bandwidth requirement of the multicast streams with the PE device 12 as the DF and the CE device 11 as the multicast group member specifically refers to: the multicast streams corresponding to the multicast group to which the CE device 11 has joined, and these multicast streams are forwarded to the CE device 11 with the PE device 12 as the DF, and the PE device 11 determines the total bandwidth requirement of these multicast streams. Among them, the "total bandwidth requirement of the multicast streams" mentioned in the implementation mode of the present application is equivalent to the "allocated bandwidth in the total bandwidth that can be allocated to the multicast service" mentioned in the implementation mode of the present application, and the two are only expressed in different ways.

[0073] For example, assume that CE device 11 has joined the multicast group of multicast stream G1, the multicast group of multicast stream G2, the multicast group of multicast stream G3, and the multicast group of multicast stream G4, that is, CE device 11 becomes a member of the multicast group of G1, the multicast group of G2, the multicast group of G3, and the multicast group of G4, respectively. In addition, PE device 11 forwards the DF of G1 and G2 to CE device 11, and PE device 12 forwards the DF of G3 and G4 to CE device 11. The required bandwidth for transmitting G1 is 100Mbps, the required bandwidth for transmitting G2 is 50Mbps, the required bandwidth for transmitting G3 is 150Mbps, and the required bandwidth for transmitting G4 is 150Mbps. The first link bandwidth is 2000Mbps, and the second link bandwidth is 1000Mbps. After PE device 11 determines that CE device 11 joins the first multicast group of the first multicast stream, PE device 11 determines the first ratio as: (required bandwidth of G1 + required bandwidth of G2) / first link bandwidth, that is, the first ratio = (100Mbps+50Mbps) / 2000Mbps=0.075; PE device 11 determines the second ratio as: (required bandwidth of G3 + required bandwidth of G4) / second link bandwidth, that is, the second ratio = (150Mbps+150Mbps) / 1000Mbps=0.3.

[0074] After determining the first ratio and the second ratio, the PE device 11 determines whether the first ratio is less than the second ratio according to the calculated first ratio and the second ratio. For example, the first ratio is 0.075 and the second ratio is 0.3. The PE device 11 determines that the first ratio is less than the second ratio, and thus, the PE device 11 determines that the PE device 11 is the DF of the first multicast stream. In addition, the PE device 11 also determines that the PE device 12 is the non-DF of the first multicast stream. The PE device 11 stores the table entry information of the first multicast stream, and the PE device 11 marks the DF corresponding to the table entry information of the first multicast stream as the PE device 11, and marks the non-DF corresponding to the table entry information of the first multicast stream as the PE device 12. After the PE device 11 determines that the PE device 11 is the DF of the first multicast stream, the PE device 11 allocates bandwidth for the multicast service to the first multicast stream. Accordingly, the PE device 11 updates the value of the first allocated bandwidth. In this way, when the PE device 11 receives the multicast stream subsequently, it can determine the value of the first ratio and the value of the second ratio according to the latest bandwidth occupancy. The PE device 11 may also forward the multicast message belonging to the first multicast flow to the CE device 11 via the Ethernet link 11 according to the DF mark corresponding to the table entry information of the first multicast flow.

[0075] Through the above implementation, in the EVPN scenario, after the PE device determines that the CE device connected to the Ethernet link joins the multicast group of the multicast stream, the PE device determines the bandwidth occupancy of the multiple Ethernet links included in the ES to which the Ethernet link belongs. Then, the PE device determines the PE device corresponding to the Ethernet link with the least multicast stream bandwidth occupancy as the DF of the multicast stream based on the multicast stream bandwidth occupancy of the multiple Ethernet links. Thereby, it helps to improve the balance of load sharing for transmitting multicast streams in EVPN. It should be understood that the implementation method of the present application uses PE device 11 as an example to illustrate the implementation method of determining DF by PE devices connected to Ethernet links in ES. In actual scenarios, PE devices connected to Ethernet links in ES can implement the DF determination process according to the implementation method of PE device 11.

[0076] Optionally, the EVPN also includes a third PE device, the CE device is connected to the third PE device via a third Ethernet link, and the third Ethernet link belongs to the ES. Before the first PE device determines whether the first ratio is less than the second ratio, the method also includes: the first PE device determines that the first ratio is less than a third ratio, wherein the third ratio is the ratio of a third allocated bandwidth and a third link bandwidth, the third allocated bandwidth indicates the allocated bandwidth in the total bandwidth that can be allocated to multicast services on the third Ethernet link, and the third link bandwidth indicates the total bandwidth that can be allocated to multicast services on the third Ethernet link.

[0077] Combined with the above, Figure 3 The embodiment in which the ES in the EVPN includes two Ethernet links is shown. It should be understood that Figure 3 The implementation method can be applied in the scenario where the ES includes more than two Ethernet links, that is, Figure 3 The implementation can be applied in Figure 2 The EVPN further includes a third PE device, the CE device is connected to the third PE device via a third Ethernet link, and the third Ethernet link belongs to the ES. The third PE device is Figure 2 The PE device 13 in the embodiment of the present invention is Figure 2 The Ethernet link 13 in the embodiment of the present application. In the case of no special explanation, the above features can be equivalent to the corresponding features.

[0078] According to the aforementioned implementation, the CE device 11 sends a first multicast group join message to the PE device 11 via the Ethernet link 11. After the PE device 11 receives the first multicast group join message, it joins the CE device 11 to the first multicast group of the first multicast stream according to the first multicast group join message. After the PE device 11 receives the first multicast group join message, the PE device 11 also sends the first join synchronization route to the PE device 13. After the PE device 13 receives the first join synchronization route, it joins the CE device 11 to the first multicast group of the first multicast stream according to the first join synchronization route. In this way, the PE device 13 can confirm that the CE device 11 becomes a multicast group member in the first multicast group, and the CE device 11 can receive the first multicast stream forwarded by the PE device 13 via the Ethernet link 13. In another possible implementation, the CE device 11 can also send a multicast group join message to the PE device 13 via the Ethernet link 13, and then the PE device 13 generates a corresponding join synchronization route according to the multicast group join message, and sends the join synchronization route to the PE device 11 and the PE device 12. Therefore, PE device 11, PE device 12 and PE device 13 can all confirm that CE device 11 has joined the first multicast group of the first multicast stream.

[0079] Before the PE device 11 determines the third ratio, the PE device 11 may obtain the third link bandwidth of the Ethernet link 13 according to the aforementioned implementation. The third link bandwidth indicates the total bandwidth that can be allocated to the multicast service on the Ethernet link 13, that is, the third link bandwidth indicates the total bandwidth of the multicast service forwarded by the PE device 13 to the CE device 11 via the Ethernet link 13. Then, the PE device 11 determines the third ratio. The third ratio is the ratio of the third allocated bandwidth and the third link bandwidth, and the third allocated bandwidth indicates the allocated bandwidth in the total bandwidth that can be allocated to the multicast service on the Ethernet link 13. In other words, the third ratio is the ratio of the sum of the required bandwidths of the multicast streams with the PE device 13 as the DF and the CE device 11 as the multicast group member to the third link bandwidth. For the implementation method of the PE device 13 obtaining the third link bandwidth and determining the third ratio, please refer to the aforementioned implementation method of the present application, which will not be repeated here.

[0080] According to the aforementioned implementation, after PE device 11 determines the ratios corresponding to all Ethernet links included in ES01 (for example, the first ratio, the second ratio, and the third ratio mentioned above), PE device 11 determines the minimum ratio among the ratios corresponding to all Ethernet links, so that PE device 11 can determine the DF responsible for forwarding the first multicast stream based on the determined minimum ratio. In a specific implementation, PE device 11 can take out any two ratios from the ratios corresponding to all Ethernet links for comparison to obtain a smaller ratio. PE device 11 then takes out the ratio that is not involved in the comparison from the ratios corresponding to all Ethernet links, and compares the ratio with the smaller ratio until the minimum ratio among the ratios corresponding to all Ethernet links included in ES01 is obtained. Figure 3 As shown, PE device 11 first determines whether the first ratio is less than the third ratio. When PE device 11 determines that the first ratio is less than the third ratio, PE device 11 determines whether the first ratio is less than the second ratio. If PE device 11 determines that the first ratio is less than the second ratio, PE device 11 can determine that the first ratio is the minimum ratio among the ratios corresponding to all Ethernet links included in ES01. Thus, PE device 11 acts as a DF that forwards the first multicast stream to CE device 11. The implementation method of PE device 11 determining that the first ratio is less than the third ratio can refer to the description of the aforementioned implementation method of this application, which will not be repeated here.

[0081] It should be understood that Figure 3 The PE device 12 and the PE device 13 in the embodiment can determine the DF of the first multicast stream according to the implementation method of the PE device 11. For example, in combination with the aforementioned implementation method, the PE device 11 determines the PE device 11 as the DF of the first multicast stream, and determines the PE device 12 and the PE device 13 as the non-DF of the first multicast stream. Correspondingly, the PE device 12 determines the PE device 11 as the DF of the first multicast stream, and determines the PE device 12 and the PE device 13 as the non-DF of the first multicast stream; the PE device 13 determines the PE device 11 as the DF of the first multicast stream, and determines the PE device 12 and the PE device 13 as the non-DF of the first multicast stream. In this way, the DF results determined by the PE devices 11, PE devices 12 and PE devices 13 are consistent, thereby ensuring that the PE device 11 is responsible for forwarding the first multicast stream, and avoiding double or excessive traffic collection by the CE device 11.

[0082] Optionally, the method further includes, when the first PE device determines that the first ratio is not less than the second ratio, and the first ratio is greater than the second ratio, the first PE device determines that the first PE device is a non-DF of the first multicast stream. In response to the first PE device determining that the first PE device is a non-DF of the first multicast stream, the first PE device does not allocate bandwidth for the first multicast stream.

[0083] Combined with the above, Figure 1 In the scenario shown, if the first ratio is greater than the second ratio, PE device 11 determines PE device 11 as the non-DF of the first multicast stream and determines PE device 12 as the DF of the first multicast stream. Correspondingly, PE device 12 will also determine PE device 11 as the non-DF of the first multicast stream and determine PE device 12 as the DF of the first multicast stream in accordance with the aforementioned implementation method. Thus, the PE device 11 does not allocate bandwidth for the first multicast stream, that is, PE device 11 is used not to forward multicast packets belonging to the first multicast stream to the CE device, and PE device 12 is used to forward multicast packets belonging to the first multicast stream to the CE device. Accordingly, since PE device 11 determines PE device 12 as the DF of the first multicast stream, PE device 11 updates the value of the second allocated bandwidth stored in PE device 11, so that the value of the second allocated bandwidth includes the required bandwidth of the first multicast stream. Figure 2 In the scenario shown, if the first ratio is greater than the second ratio, and the first ratio is less than the third ratio, PE device 11 determines PE device 11 and PE device 13 as non-DF of the first multicast stream and determines PE device 12 as DF of the first multicast stream. Accordingly, the results determined by PE device 12 and PE device 13 are consistent with the result determined by PE device 11.

[0084] Among them, the PE device 11 is used to not forward the multicast message belonging to the first multicast stream to the CE device. In one possible implementation, after the PE device 11 determines that it is the non-DF of the first multicast stream, it sends a notification message to the PE device 21, and the notification message indicates that the PE device 11 is the non-DF of the first multicast stream. According to the notification message, the PE device 21 no longer forwards the multicast message of the first multicast stream to the PE device 11. In another possible implementation, after the PE device 11 determines that it is the non-DF of the first multicast stream, it continues to receive the multicast message of the first multicast stream forwarded by the PE device 21. After receiving the multicast message of the first multicast stream, the PE device 11 directly discards the multicast message of the first multicast stream, or waits for the multicast message of the first multicast stream to age before discarding it.

[0085] Optionally, the method also includes, when the first PE device determines that the first ratio is not less than the second ratio, and the first ratio is equal to the second ratio, and when the first PE device determines that the value of the IP address of the first PE device is greater than the value of the IP address of the second PE device, the first PE device determines that the first PE device is the DF of the first multicast stream, and the first PE device is used to forward multicast packets belonging to the first multicast stream to the CE device via the first Ethernet link.

[0086] In combination with the foregoing, if the first ratio is equal to the second ratio, the PE device 11 further determines whether the value of the IP address of the PE device 11 is greater than the value of the IP address of the PE device 12. The IP address of the PE device 11 and the IP address of the PE device 12 are IP addresses used when establishing BGP peers, and specifically, they may be the device IP address of the PE device 11 and the device IP address of the PE device 12. When the value of the IP address of the PE device 11 is greater than the value of the IP address of the PE device 12, the PE device 11 determines that the PE device 11 is the DF of the first multicast flow, and the PE device 11 is responsible for forwarding the multicast message belonging to the first multicast flow to the CE device 11.

[0087] Optionally, the method also includes, when the first PE device determines that the first ratio is not less than the second ratio, and the first ratio is equal to the second ratio, and when the first PE device determines that the first link bandwidth is greater than the second link bandwidth, the first PE device determines that the first PE device is the DF of the first multicast stream, and the first PE device is used to forward the multicast message belonging to the first multicast stream to the CE device via the first Ethernet link.

[0088] In combination with the foregoing, if the first ratio is equal to the second ratio, the PE device 11 further determines whether the first link bandwidth is greater than the second link bandwidth. When the first link bandwidth is greater than the second link bandwidth, the PE device 11 determines that the PE device 11 is the DF of the first multicast stream, and the PE device 11 is responsible for forwarding the multicast message belonging to the first multicast stream to the CE device 11.

[0089] Optionally, the method also includes, when the first PE device determines that the first ratio is not less than the second ratio, and the first ratio is equal to the second ratio, the first PE device determines according to a hash algorithm that the first PE device is the DF of the first multicast stream, and the first PE device is used to forward the multicast message belonging to the first multicast stream to the CE device via the first Ethernet link.

[0090] In combination with the foregoing, if the first ratio is equal to the second ratio, the PE device 11 further determines the DF of the first multicast flow according to a Hash algorithm.

[0091] Below Figure 2 Take the example to illustrate the implementation process of the implementation method of the present application.

[0092] Assumptions Figure 2 The EVPN scenario shown includes multicast streams G1 to G9, a total of 9 multicast streams. The required bandwidth of multicast streams G1 to G5 is 90 Mbps, and the required bandwidth of multicast streams G6 to G9 is 150 Mbps. Figure 2 The network side of the EVPN shown is transmitted to the access side of the EVPN. The first link bandwidth is 1000Mbps, the second link bandwidth is 2000Mbps, and the third link bandwidth is 1000Mbps. The IP address of PE device 13 is the largest. PE device 11, PE device 12 and PE device 13 can determine the DF of each multicast stream in sequence according to Table 1. When describing this embodiment, the DF election process shown in Table 1 executed by PE device 11 is taken as an example. In addition, according to the aforementioned embodiment, the first link bandwidth, the second link bandwidth and the third link bandwidth have been synchronized between PE device 11, PE device 12 and PE devices.

[0093] Multicast Stream First Ratio Second Ratio The third ratio Determined DF G1 0 / 1000 0 / 2000 0 / 1000 PE3 G2 0 / 1000 0 / 2000 90 / 1000 PE2 G7 0 / 1000 90 / 2000 90 / 1000 PE1 G8 150 / 1000 90 / 2000 90 / 1000 PE2 G3 150 / 1000 240 / 2000 90 / 1000 PE3 G6 150 / 1000 240 / 2000 180 / 1000 PE2 G5 150 / 1000 390 / 2000 180 / 1000 PE1 G4 240 / 1000 390 / 2000 180 / 1000 PE3 G9 240 / 1000 390 / 2000 270 / 1000 PE2 / 240 / 1000 540 / 2000 270 / 1000 /

[0094] Table 1

[0095] Refer to Table 1, in which the first column represents the multicast streams corresponding to the multicast groups joined by the CE device 11 in sequence; the second column, the third column and the fourth column respectively represent the first ratio, the second ratio and the third ratio determined according to the implementation method of the aforementioned embodiment; the fifth column represents the DF of the corresponding multicast stream determined by the PE device 11.

[0096] Referring to the first entry in Table 1, multicast stream G1 is the first multicast stream that CE device 11 requests to receive. Therefore, the required bandwidth of the multicast stream with PE device 11 as DF and CE device 11 as a multicast group member is always 0, the required bandwidth of the multicast stream with PE device 12 as DF and CE device 11 as a multicast group member is always 0, and the required bandwidth of the multicast stream with PE device 13 as DF and CE device 11 as a multicast group member is always 0. When CE device 11 joins the multicast group of multicast stream G1, PE device 11 determines that the first ratio, the second ratio and the third ratio are equal, all of which are 0. Further, PE device 11 determines that the value of the IP address of PE device 13 is the largest. Therefore, PE device 11 determines that PE device 13 is the DF of multicast stream G1.

[0097] Referring to the second entry of Table 1, after PE device 11 determines the DF for multicast stream G1, CE device 11 joins the multicast group of multicast stream G2. PE device 11 redetermines the first ratio, the second ratio, and the third ratio according to CE device 11 joining the multicast group of multicast stream G2. PE device 11 determines that both the first ratio and the second ratio are less than the third ratio, and the first ratio is equal to the second ratio. Further, PE device 11 determines that the second link bandwidth is greater than the first link bandwidth. Thus, PE device 11 determines that PE device 12 is the DF of multicast stream G2.

[0098] Referring to the second entry of Table 1, after PE device 11 determines the DF for multicast stream G2, CE device 11 joins the multicast group of multicast stream G7. PE device 11 re-determines the first ratio, the second ratio, and the third ratio according to CE device 11 joining the multicast group of multicast stream G7. PE device 11 determines that the first ratio is the minimum ratio. Thus, PE device 11 determines that PE device 11 is the DF of multicast stream G7.

[0099] The multicast streams G8, G3, G6, G5, G4 and G9 in Table 1 can perform DF election in sequence according to the above rules of this embodiment. No further description is given here. The last entry in Table 1 indicates that after the PE device 11 completes the DF election of the multicast stream G9, the table entry of the multicast stream G9 is stored in the PE device 11, so that when a CE device 11 joins the multicast group of the multicast stream later, the first ratio, the second ratio and the third ratio are re-determined. After PE device 11 completes DF election according to the implementation method shown in Table 1, Ethernet link 11 is responsible for transmitting multicast streams G7 and G5, and the total bandwidth required for multicast streams is 240Mbps; Ethernet link 12 is responsible for transmitting multicast streams G2, G8, G6 and G9, and the total bandwidth required for multicast streams is 540Mbps; Ethernet link 13 is responsible for transmitting multicast streams G1, G3 and G4, and the total bandwidth required for multicast streams is 270Mbps. In addition, PE device 12 and PE device 13 can also implement DF election according to the above implementation process, which will not be repeated here.

[0100] In the implementation shown in Table 1, the required bandwidth of the multicast stream is the actual bandwidth value. The actual bandwidth values ​​of the multicast streams G1 to G9 are pre-configured in PE devices 11, PE devices 12, and PE devices 13. In another possible implementation, PE devices 11, PE devices 12, and PE devices may not be able to know the actual bandwidth values ​​of each multicast stream. Therefore, the required bandwidth of the multicast stream can also be a bandwidth weight. As shown in Table 2, the bandwidth weight of each multicast stream is determined to be 1.

[0101] Multicast Stream First Ratio Second Ratio The third ratio Determined DF G1 0 / 1000 0 / 2000 0 / 1000 PE3 G2 0 / 1000 0 / 2000 1 / 1000 PE2 G7 0 / 1000 1 / 2000 1 / 1000 PE1 G8 1 / 1000 1 / 2000 1 / 1000 PE2 G3 1 / 1000 2 / 2000 1 / 1000 PE3 G6 1 / 1000 2 / 2000 2 / 1000 PE2 G5 1 / 1000 3 / 2000 2 / 1000 PE1 G4 2 / 1000 3 / 2000 2 / 1000 PE2 G9 2 / 1000 4 / 2000 2 / 1000 PE3 / 2 / 1000 4 / 2000 3 / 1000 /

[0102] Table 2

[0103] The process of PE device 11 implementing DF election according to Table 2 can refer to the description of the process of PE device 11 implementing DF election according to Table 1, which will not be repeated here. After PE device 11 completes DF election according to the implementation method shown in Table 2, the multicast streams responsible for transmission by Ethernet link 11 are multicast streams G7 and G5, and the total bandwidth required by the multicast streams is 2; the multicast streams responsible for transmission by Ethernet link 12 are multicast streams G2, G8, G6 and G4, and the total bandwidth required by the multicast streams is 4; the multicast streams responsible for transmission by Ethernet link 13 are multicast streams G1, G3 and G8, and the total bandwidth required by the multicast streams is 3.

[0104] Optionally, the first joining synchronization route includes a first multicast DF extended community attribute, and the first multicast DF extended community attribute carries an IP address of a PE device serving as a DF of the first multicast stream.

[0105] According to the description of the above embodiments, Figure 1 The PE device 11 and the PE device 12 can determine the DF respectively, and the results determined by the PE device 11 and the PE device 12 are consistent; Figure 2PE device 11, PE device 12 and PE device 13 in the ES can respectively determine the DF, and the results determined by PE device 11, PE device 12 and PE device 13 are consistent. In another possible implementation, the DF determination process can be implemented by a PE device connected by an Ethernet link in the ES, and other PE devices connected by an Ethernet link in the ES do not determine the DF. For example, PE device 11 determines the DF of the first multicast stream according to the aforementioned implementation, and PE device 11 determines that PE device 11 is the DF of the first multicast stream. PE device 11 generates a first multicast DF extended community attribute, and the first multicast DF extended community attribute is used to indicate the IP address of the DF of the first multicast stream, that is, the first multicast DF extended community attribute carries the IP address of PE device 11. PE device 11 can encapsulate the first multicast DF extended community attribute in the first join synchronization route mentioned in the aforementioned implementation. Then, PE device 11 sends the first join synchronization route to PE device 12 or to PE device 12 and PE device 13. After receiving the first joining synchronization route, PE device 12 and PE device 13 can not only determine the multicast group of the first multicast stream that CE device 11 joins according to the first joining synchronization route, but also learn that the DF of the first multicast stream is determined to be PE device 11 according to the IP address of PE device 11 carried by the first multicast DF extended group attribute in the first joining synchronization route. PE device 12 and PE device 13 directly record the mapping relationship between the first multicast stream table entry and DF, and PE device 12 and PE device 13 no longer perform the DF determination process for the first multicast stream. Therefore, the DF determination process of the first multicast stream is only completed by PE device 11, which further ensures the timing consistency between the multi-homing PE devices connected to CE device 11.

[0106] Optionally, the method also includes, the first PE device determining that the third Ethernet link exits the ES based on a revocation message of the first Ethernet automatic discovery of each Ethernet segment route received from the third PE device, wherein the revocation message instructs the third PE device to revoke the first Ethernet automatic discovery of each Ethernet segment route; the first PE device determining the PE device serving as the DF of the second multicast stream based on the first link bandwidth and the second link bandwidth, or the first PE device based on the value of the IP address of the first PE device and the value of the IP address of the second PE device, wherein before the third Ethernet link exits the ES, the DF of the second multicast stream is the third PE device, the second multicast stream is a multicast stream transmitted by the multicast source of the EVPN to the multicast group members in the second multicast group, and the CE device is a multicast group member in the second multicast group; the first PE device sends a third join synchronization route corresponding to the second multicast stream to the second PE device, the third join synchronization route includes a second multicast DF extended group attribute, and the second multicast DF extended group attribute carries the IP address of the PE device serving as the DF of the second multicast stream.

[0107] like Figure 2As shown, a certain Ethernet link in ES01 may request to exit ES01, and the reasons for exiting may include: the Ethernet link fails or the Ethernet link no longer bears the forwarding multicast service. For example, Ethernet link 13 requests to exit ES01, and accordingly, PE device 13 sends a revocation message of the first Ethernet AD per ES route to PE device 11 and PE device 12, and the revocation message indicates that PE device 13 revokes the first Ethernet AD per ES route. After receiving the revocation message, PE device 11 determines that the DF of the second multicast stream is PE device 13 according to the multicast stream table entry and DF mapping relationship stored in PE device 11. Among them, the second multicast stream is a multicast stream transmitted from the multicast source on the network side of the EVPN to the multicast group members in the second multicast group, and CE device 11 is a multicast group member in the second multicast group. PE device 11 determines whether the bandwidth of the first link is greater than the bandwidth of the second link, or PE device 11 determines whether the value of the IP address of PE device 11 is greater than the value of the IP address of PE device 12. When the bandwidth of the first link is greater than the bandwidth of the second link, or when the value of the IP address of PE device 11 is greater than the value of the IP address of PE device 12, PE device 11 determines that PE device 11 is the DF of the second multicast stream. PE device 11 updates the corresponding relationship between the second multicast stream entry and DF stored in PE device 11. PE device 11 also sends a third join synchronization route corresponding to the second multicast stream to PE device 12, the third join synchronization route includes a second multicast DF extended community attribute, and the second multicast DF extended community attribute carries the IP address of PE device 11. In this way, PE device 12 updates the corresponding relationship between the second multicast stream entry and DF stored in PE device 12 according to the third join synchronization route. Correspondingly, when the bandwidth of the first link is less than the bandwidth of the second link, or when the value of the IP address of PE device 11 is less than the value of the IP address of PE device 12, PE device 11 determines that PE device 12 is the DF of the second multicast stream. PE device 11 updates the corresponding relationship between the second multicast stream entry and DF stored in PE device 11. PE device 11 also sends a third join synchronization route corresponding to the second multicast flow to PE device 12, wherein the third join synchronization route includes a second multicast DF extended community attribute, and the second multicast DF extended community attribute carries the IP address of PE device 12. In this way, PE device 12 updates the correspondence between the second multicast flow table entry and DF stored in PE device 12 according to the third join synchronization route.

[0108] Through the above implementation, when the Ethernet link in the ES exits the ES, the multicast stream on the Ethernet link exiting the ES can be promptly transferred to other Ethernet links to ensure that the forwarding of the multicast stream is not interrupted. The Ethernet automatic discovery of each Ethernet segment route used in the above implementation can be referred to the corresponding explanation in RFC 7432, which is not repeated here.

[0109] Optionally, the method also includes: when the first PE device determines that the first ratio is not less than the second ratio, and the first ratio is greater than the second ratio, the first PE device determines that the first PE device is the non-DF of the first multicast stream; in response to the first PE device determining that the first PE device is the non-DF of the first multicast stream, the first PE device does not allocate bandwidth for the first multicast stream; the first PE device automatically discovers each Ethernet segment route based on the second Ethernet received from the fourth PE device, determines that the fourth Ethernet link joins the ES, and the CE device is connected to the fourth PE device via the fourth Ethernet link; the first PE device changes the PE device that serves as the DF of the third multicast stream from the first PE device to the fourth PE device, the third multicast stream is a multicast stream transmitted by the multicast source of the EVPN to the multicast group members in the third multicast group, and the CE device is a multicast group member in the third multicast group; the first PE device sends a fourth join synchronization route corresponding to the third multicast stream to the second PE device and the fourth PE device, the fourth join synchronization route includes a third multicast DF extended group attribute, and the third multicast DF extended group attribute carries the IP address of the fourth PE device.

[0110] Combined with the above, when a new Ethernet link is added to the ES, the multicast streams with a determined DF in the ES can be migrated to the new Ethernet link. Figure 1 Based on the network scenario shown, a new Ethernet link 13 is added to ES01, resulting in Figure 2 The network scenario shown in FIG. PE device 13 corresponds to the fourth PE device, and Ethernet link 13 corresponds to the fourth Ethernet link.

[0111] PE device 13 generates a second Ethernet automatic discovery per Ethernet segment route, and PE device 13 sends the second Ethernet automatic discovery per Ethernet segment route to PE device 11 and PE device 12, and the second Ethernet automatic discovery per Ethernet segment route is used to indicate that Ethernet link 13 requests to join ES01. PE device 11 receives the second Ethernet automatic discovery per Ethernet segment route, and determines that Ethernet link 13 joins ES01 according to the second Ethernet automatic discovery per Ethernet segment route. According to the aforementioned embodiment, when PE device 11 determines that the first ratio is greater than the second ratio, PE device 11 can change the PE device that serves as the DF of the third multicast stream from PE device 11 to PE device 13. Specifically, PE device 11 updates the corresponding relationship between the third multicast stream table entry and DF stored in PE device 11, and updates the DF of the third multicast stream from PE device 11 to PE device 13. Then, PE device 11 sends the fourth join synchronization route corresponding to the third multicast stream to PE device 12 and PE device 13, and the fourth join synchronization route includes the third multicast DF extended community attribute, and the third multicast DF extended community attribute carries the IP address of PE device 13. PE device 12 receives the fourth join synchronization route, and updates the DF of the third multicast flow from PE device 11 to PE device 13 according to the IP address of PE device 13 in the fourth join synchronization route. PE device 12 receives the fourth join synchronization route, and stores the correspondence between the third multicast flow table entry and the DF according to the IP address of PE device 13 in the fourth join synchronization route.

[0112] Through the above implementation, when a new Ethernet link is added to the ES, the multicast stream on the Ethernet link with higher bandwidth occupancy in the ES can be migrated to the new Ethernet link, thereby improving the balance of each Ethernet link in the ES.

[0113] Figure 4 This is a schematic diagram of the structure of the first PE device 1000 according to an embodiment of the present application. Figure 4 The first PE device 1000 shown can execute the corresponding steps executed by the first PE device in the method of the above embodiment. The first PE device is deployed in an EVPN, and the EVPN also includes a second PE device and a CE device. The CE device is connected to the first PE device via a first Ethernet link, and the CE device is connected to the second PE device via a second Ethernet link. The first Ethernet link and the second Ethernet link belong to the same ES. Figure 4 As shown, the first PE device 1000 includes a receiving unit 1002 and a processing unit 1004 .

[0114] The receiving unit 1002 is used to receive a first join message, where the first join message is used to indicate that the CE device requests to join a first multicast group that receives a first multicast stream, where the first multicast stream is a multicast stream transmitted by the multicast source of the EVPN to multicast group members in the first multicast group;

[0115] The processing unit 1004 is configured to add the CE device to the first multicast group according to the first join message;

[0116] The processing unit 1004 is further configured to determine whether the first ratio is less than a second ratio, wherein the first ratio is a ratio of a first allocated bandwidth to a first link bandwidth, the first allocated bandwidth indicates an allocated bandwidth in a total bandwidth that can be allocated to a multicast service on the first Ethernet link, the first link bandwidth indicates a total bandwidth that can be allocated to a multicast service on the first Ethernet link, the second ratio is a ratio of a second allocated bandwidth to a second link bandwidth, the second allocated bandwidth indicates an allocated bandwidth in a total bandwidth that can be allocated to a multicast service on the second Ethernet link, and the second link bandwidth indicates a total bandwidth that can be allocated to a multicast service on the second Ethernet link;

[0117] When the processing unit 1004 determines that the first ratio is less than the second ratio, the processing unit 1004 is further configured to determine that the first PE device is a DF of the first multicast flow;

[0118] In response to the processing unit 1004 determining that the first PE device is the DF of the first multicast stream, the processing unit 1004 is further configured to allocate bandwidth to the first multicast stream.

[0119] Optionally, the EVPN also includes a third PE device, the CE device is connected to the third PE device via a third Ethernet link, the third Ethernet link belongs to the ES, and before the processing unit 1004 determines whether the first ratio is less than the second ratio, the processing unit 1004 is also used to determine that the first ratio is less than a third ratio, wherein the third ratio is the ratio of the third allocated bandwidth and the third link bandwidth, the third allocated bandwidth indicates the allocated bandwidth in the total bandwidth that can be allocated to the multicast service on the third Ethernet link, and the third link bandwidth indicates the total bandwidth that can be allocated to the multicast service on the third Ethernet link.

[0120] Optionally, when the processing unit 1004 determines that the first ratio is not less than the second ratio, and the first ratio is greater than the second ratio, the processing unit 1004 is further configured to determine that the first PE device is a non-DF of the first multicast stream. In response to the processing unit 1004 determining that the first PE device is a non-DF of the first multicast stream, the processing unit 1004 is further configured to not allocate bandwidth for the first multicast stream.

[0121] Optionally, when the processing unit 1004 determines that the first ratio is not less than the second ratio, and the first ratio is equal to the second ratio, and when the processing unit 1004 determines that the value of the IP address of the first PE device is greater than the value of the IP address of the second PE device, the processing unit 1004 is also used to determine that the first PE device is the DF of the first multicast stream.

[0122] Optionally, when the processing unit 1004 determines that the first ratio is not less than the second ratio, and the first ratio is equal to the second ratio, and when the processing unit 1004 determines that the first link bandwidth is greater than the second link bandwidth, the processing unit 1004 is also used to determine that the first PE device is the DF of the first multicast stream.

[0123] Optionally, when the processing unit 1004 determines that the first ratio is not less than the second ratio, and the first ratio is equal to the second ratio, the processing unit 1004 is further configured to determine, according to a Hash algorithm, that the first PE device is the DF of the first multicast stream.

[0124] Optionally, the first PE device further includes a sending unit 1006, and before the processing unit 1004 determines whether the first ratio is less than the second ratio, the receiving unit 1002 is further used to receive a second Ethernet segment route sent by the second PE device, the second Ethernet segment route including a second link bandwidth extension group attribute, and the second link bandwidth extension group attribute is used to carry the second link bandwidth. And, the sending unit 1006 is used to send the first Ethernet segment route to the second PE device, the first Ethernet segment route including a first link bandwidth extension group attribute, and the first link bandwidth extension group attribute is used to carry the first link bandwidth.

[0125] Optionally, the first join message is a multicast group join message sent by the CE device. Further optionally, the sending unit 1002 is used to send a first join synchronization route to the second PE device, and the first join synchronization route is used to indicate that the CE device requests to join the first multicast group receiving the first multicast stream. Further optionally, the first join synchronization route includes a first multicast DF extended group attribute, and the first multicast DF extended group attribute carries the IP address of the PE device that serves as the DF of the first multicast stream.

[0126] Optionally, the first join message is a second join synchronization route sent by the second PE device.

[0127] Optionally, the processing unit 1004 is further configured to determine that the third Ethernet link exits the ES according to a revocation message of the first Ethernet automatic discovery per Ethernet segment route received from the third PE device, wherein the revocation message indicates that the third PE device revokes the first Ethernet automatic discovery per Ethernet segment route. The processing unit 1004 is further configured to determine the PE device that is the DF of the second multicast stream according to the first link bandwidth and the second link bandwidth, or the first PE device according to the value of the IP address of the first PE device and the value of the IP address of the second PE device, wherein before the third Ethernet link exits the ES, the DF of the second multicast stream is the third PE device, the second multicast stream is a multicast stream transmitted by the multicast source of the EVPN to the multicast group members in the second multicast group, and the CE device is a multicast group member in the second multicast group. The sending unit 1006 is configured to send a third join synchronization route corresponding to the second multicast stream to the second PE device, the third join synchronization route including a second multicast DF extended community attribute, and the second multicast DF extended community attribute carries the IP address of the PE device that is the DF of the second multicast stream.

[0128] Optionally, when the processing unit 1004 determines that the first ratio is not less than the second ratio, and the first ratio is greater than the second ratio, the processing unit 1004 is further used to determine that the first PE device is a non-DF of the first multicast stream. In response to the processing unit 1004 determining that the first PE device is a non-DF of the first multicast stream, the processing unit 1004 is further used to not allocate bandwidth for the first multicast stream. The processing unit 1004 is also used to automatically discover each Ethernet segment route based on the second Ethernet received from the fourth PE device, determine that the fourth Ethernet link joins the ES, and the CE device is connected to the fourth PE device via the fourth Ethernet link. The processing unit 1004 is also used to change the PE device that is the DF of the third multicast stream from the first PE device to the fourth PE device, the third multicast stream is a multicast stream transmitted by the multicast source of the EVPN to the multicast group members in the third multicast group, and the CE device is a multicast group member in the third multicast group. The sending unit 1006 is configured to send a fourth join synchronization route corresponding to the third multicast stream to the second PE device and the fourth PE device, wherein the fourth join synchronization route includes a third multicast DF extended community attribute, and the third multicast DF extended community attribute carries the IP address of the fourth PE device.

[0129] Figure 4 The first PE device shown can execute the corresponding steps executed by the first PE device in the method of the above embodiment. In the EVPN scenario, after the PE device determines that the CE device connected to the Ethernet link joins the multicast group of the multicast stream, the PE device determines the bandwidth occupancy of multiple Ethernet links included in the ES to which the Ethernet link belongs. Then, based on the multicast stream bandwidth occupancy of the multiple Ethernet links, the PE device determines the PE device corresponding to the Ethernet link with the least multicast stream bandwidth occupancy as the DF of the multicast stream. Thereby, it helps to improve the balance of load sharing for transmitting multicast streams in EVPN.

[0130] Figure 5 This is a schematic diagram of the hardware structure of the first PE device 1100 according to an embodiment of the present application. Figure 5 The first PE device 1100 shown can execute the corresponding steps executed by the first PE device in the method of the above embodiment.

[0131] like Figure 5 As shown, the first PE device 1100 includes a processor 1101, a memory 1102, an interface 1103 and a bus 1104. The interface 1103 can be implemented in a wireless or wired manner, and can be a network card. The processor 1101, the memory 1102 and the interface 1103 are connected via a bus 1104.

[0132] The interface 1103 may specifically include a transmitter and a receiver, which are used to send and receive information between the first PE device and the second PE device, the third PE device, the fourth PE device and the CE device in the above embodiment. For example, the interface 1103 is used to support receiving a join message sent by the CE device or the second PE device. For another example, the interface 1103 is used to support receiving an Ethernet segment route sent by the second PE device. For another example, the interface 1103 is used to support sending an Ethernet segment route to the second PE device or joining a synchronization route. As an example, the interface 1103 is used to support Figure 3 The processor 1101 is used to execute the processing performed by the first PE device in the above embodiment. For example, the processor 1101 is used to add the CE device to the first multicast group according to the join message; determine whether the first ratio is less than the second ratio; determine that the first PE device is the DF of the first multicast stream; allocate bandwidth to the first multicast stream; and / or other processes for the technology described in this document. As an example, the processor 1101 is used to support Figure 3 The memory 1102 includes an operating system 11021 and an application 11022, which are used to store programs, codes or instructions. When the processor or hardware device executes these programs, codes or instructions, the processing process involving the first PE device in the method embodiment can be completed. Optionally, the memory 1102 may include a read-only memory (English: Read-onlyMemory, abbreviated: ROM) and a random access memory (English: Random Access Memory, abbreviated: RAM). Among them, the ROM includes a basic input / output system (English: Basic Input / Output System, abbreviated: BIOS) or an embedded system; the RAM includes an application and an operating system. When it is necessary to run the first PE device 1100, it is started by the BIOS solidified in the ROM or the bootloader boot system in the embedded system, and the first PE device 1100 is guided to enter a normal operating state. After the first PE device 1100 enters a normal operating state, the application and operating system in the RAM are run, thereby completing the processing process involving the first PE device in the method embodiment.

[0133] Understandably, Figure 5 Only a simplified design of the first PE device 1100 is shown. In practical applications, the first PE device may include any number of interfaces, processors or memories.

[0134] Figure 6This is a schematic diagram of the hardware structure of another first PE device 1200 according to an embodiment of the present application. Figure 6 The first PE device 1200 shown can execute the corresponding steps executed by the first PE device in the method of the above embodiment.

[0135] like Figure 6 The first PE device 1200 includes: a main control board 1210, an interface board 1230, a switching network board 1220 and an interface board 1240. The main control board 1210, the interface boards 1230 and 1240, and the switching network board 1220 are connected to the system backplane through a system bus to achieve intercommunication. Among them, the main control board 1210 is used to complete functions such as system management, equipment maintenance, and protocol processing. The switching network board 1220 is used to complete data exchange between various interface boards (interface boards are also called line cards or service boards). The interface boards 1230 and 1240 are used to provide various service interfaces (for example, POS interfaces, GE interfaces, ATM interfaces, etc.) and realize data packet forwarding.

[0136] The interface board 1230 may include a central processor 1231, a forwarding table entry memory 1234, a physical interface card 1233, and a network processor 1232. The central processor 1231 is used to control and manage the interface board and communicate with the central processor on the main control board. The forwarding table entry memory 1234 is used to store forwarding table entries. The physical interface card 1233 is used to complete the reception and transmission of traffic. The network memory 1232 is used to control the physical interface card 1233 to receive and send traffic according to the forwarding table entries.

[0137] Specifically, the physical interface card 1233 is used to receive a join message sent by the CE device or the second PE device, or the physical interface card 1233 is used to receive an Ethernet segment route sent by the second PE device.

[0138] After the physical interface card 1233 receives the join message sent by the CE device or the second PE device, or after the physical interface card 1233 receives the Ethernet segment route sent by the second PE device, the join message or the Ethernet segment route is sent to the central processor 1211 via the central processor 1231, and the central processor 1211 processes the join message or the Ethernet segment route.

[0139] The central processor 1211 is further configured to add the CE device to the first multicast group according to the join message. The central processor 1211 is further configured to determine whether the first ratio is less than the second ratio. When the central processor 1211 determines that the first ratio is less than the second ratio, the central processor 1211 is further configured to determine that the first PE device is the DF of the first multicast stream. In response to the central processor 1211 determining that the first PE device is the DF of the first multicast stream, the central processor 1211 is further configured to allocate bandwidth to the first multicast stream.

[0140] The central processor 1231 is further configured to control the network memory 1232 to obtain the forwarding table entry in the forwarding table entry memory 1234, and the central processor 1231 is further configured to control the network memory 1232 to send the Ethernet segment route or join the synchronous route to the second PE device via the physical interface card 1233. The central processor 1231 is further configured to control the network memory 1232 to forward the multicast message of the first multicast stream to the CE device via the physical interface card 1233.

[0141] It should be understood that the operation on the interface board 1240 in the embodiment of the present invention is consistent with the operation of the interface board 1230, and for the sake of brevity, it will not be repeated. It should be understood that the first PE device 1200 of this embodiment can correspond to the functions and / or various steps implemented in the above method embodiment, and it will not be repeated here.

[0142] In addition, it should be noted that there may be one or more main control boards, and when there are multiple boards, they may include a primary main control board and a backup main control board. There may be one or more interface boards. The stronger the data processing capability of the first PE device, the more interface boards are provided. There may also be one or more physical interface cards on the interface board. There may be no switching network board, or there may be one or more switching network boards. When there are multiple switching network boards, load sharing redundant backup can be achieved together. Under the centralized forwarding architecture, the first PE device may not need a switching network board, and the interface board is responsible for the processing function of the business data of the entire system. Under the distributed forwarding architecture, the first PE device may have at least one switching network board, and the data exchange between multiple interface boards is realized through the switching network board, providing large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of the first PE device of the distributed architecture are greater than those of the device of the centralized architecture. Which architecture to adopt depends on the specific networking deployment scenario, and no limitation is made here.

[0143] In addition, an embodiment of the present application provides a computer storage medium for storing computer software instructions used for the above-mentioned first PE device, which includes a program designed for executing the above-mentioned method embodiment.

[0144] The embodiment of the present application also includes an EVPN system, wherein the EVPN system includes a first PE device, wherein the first PE device is the aforementioned Figure 4 or Figure 5 or Figure 6 The first PE device in.

[0145] The steps of the method or algorithm described in conjunction with the disclosure of the present application can be implemented in a hardware manner, or can be implemented by a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in a RAM memory, a flash memory, a ROM memory, an EPROM memory, an EEPROM memory, a register, a hard disk, a mobile hard disk, a CD-ROM or any other form of storage medium well known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and can write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC. In addition, the ASIC can be located in a user device. Of course, the processor and the storage medium can also be present in the user device as discrete components.

[0146] Those skilled in the art should be aware that in one or more of the above examples, the functions described in this application can be implemented in hardware or in a combination of hardware and software. When implemented using a combination of hardware and software, the software can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein the communication media includes any medium that is convenient for transmitting a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.

[0147] The specific implementations described above further describe the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only a specific implementation of the present application.

Claims

1. A method for determining a designated forwarder DF of a multicast stream, characterized in that: The method is applied in an Ethernet virtual private network EVPN, the EVPN includes a first operator edge PE device and a user edge CE device, the CE device is connected to the first PE device via a first Ethernet link, the first Ethernet link belongs to an Ethernet segment ES, and the method includes: The first PE device receives a first join message, where the first join message is used to instruct the CE device to request to join a first multicast group that receives a first multicast stream, where the first multicast stream is a multicast stream transmitted by the multicast source of the EVPN to multicast group members in the first multicast group; The first PE device adds the CE device to the first multicast group according to the first join message; The first PE device determines that the first ratio is the minimum ratio among the ratios corresponding to all Ethernet links included in the ES, wherein the first ratio is a ratio of a first allocated bandwidth and a first link bandwidth, the first allocated bandwidth indicates an allocated bandwidth in a total bandwidth that can be allocated to a multicast service on the first Ethernet link, and the first link bandwidth indicates a total bandwidth that can be allocated to a multicast service on the first Ethernet link; The first PE device determines that the first PE device is a designated forwarder DF of the first multicast flow.

2. The method according to claim 1, characterized in that The EVPN further includes a second PE device, the CE device is connected to the second PE device via a second Ethernet link, the second Ethernet link belongs to the ES, and the method further includes: The first PE device determines that the second ratio is not the minimum ratio among the ratios corresponding to all Ethernet links included in the ES, wherein the second ratio is a ratio of a second allocated bandwidth to a second link bandwidth, the second allocated bandwidth indicates an allocated bandwidth in a total bandwidth that can be allocated to a multicast service on the second Ethernet link, and the second link bandwidth indicates a total bandwidth that can be allocated to a multicast service on the second Ethernet link; The first PE device determines that the second PE device is a non-designated forwarder non-DF of the first multicast stream.

3. The method according to claim 1, characterized in that The EVPN further includes a second PE device, the CE device is connected to the second PE device via a second Ethernet link, the second Ethernet link belongs to the ES, and the first PE device determines that the first PE device is a designated forwarder DF of the first multicast stream, including: The first PE device determines that the first ratio is equal to a second ratio, wherein the second ratio is a ratio of a second allocated bandwidth to a second link bandwidth, the second allocated bandwidth indicates an allocated bandwidth in a total bandwidth that can be allocated to a multicast service on the second Ethernet link, and the second link bandwidth indicates a total bandwidth that can be allocated to a multicast service on the second Ethernet link; The first PE device determines that a value of the Internet Protocol IP address of the first PE device is greater than a value of the IP address of the second PE device.

4. The method according to claim 1, characterized in that The EVPN further includes a second PE device, the CE device is connected to the second PE device via a second Ethernet link, the second Ethernet link belongs to the ES, and the first PE device determines that the first PE device is a designated forwarder DF of the first multicast stream, including: The first PE device determines that the first ratio is equal to a second ratio, wherein the second ratio is a ratio of a second allocated bandwidth to a second link bandwidth, the second allocated bandwidth indicates an allocated bandwidth in a total bandwidth that can be allocated to a multicast service on the second Ethernet link, and the second link bandwidth indicates a total bandwidth that can be allocated to a multicast service on the second Ethernet link; The first PE device determines that the first link bandwidth is greater than the second link bandwidth.

5. The method according to claim 1, characterized in that The EVPN further includes a second PE device, the CE device is connected to the second PE device via a second Ethernet link, the second Ethernet link belongs to the ES, and the first PE device determines that the first ratio is the minimum ratio among the ratios corresponding to all Ethernet links included in the ES, including: the first PE device determines that the first ratio is equal to a second ratio, wherein the second ratio is a ratio of a second allocated bandwidth to a second link bandwidth, the second allocated bandwidth indicates an allocated bandwidth in a total bandwidth that can be allocated to a multicast service on the second Ethernet link, and the second link bandwidth indicates a total bandwidth that can be allocated to a multicast service on the second Ethernet link; The first PE device determines that the first PE device is a designated forwarder DF of the first multicast stream, including: the first PE device determines that the first PE device is a DF of the first multicast stream according to a Hash algorithm.

6. The method according to any one of claims 2 to 5, characterized in that: Before the first PE device determines that the first ratio is the minimum ratio among the ratios corresponding to all Ethernet links included in the ES, the method further includes: The first PE device sends a first Ethernet segment route to the second PE device, where the first Ethernet segment route includes a first link bandwidth extended community attribute, where the first link bandwidth extended community attribute is used to carry the first link bandwidth.

7. The method according to any one of claims 1 to 5, characterized in that: The first join message is a multicast group join message sent by the CE device.

8. The method according to any one of claims 2 to 5, characterized in that: The method further comprises: The first PE device sends a first join synchronization route to the second PE device, where the first join synchronization route is used to instruct the CE device to request to join the first multicast group that receives the first multicast stream.

9. The method according to claim 8, characterized in that The first join synchronization route includes a first multicast DF extended community attribute, and the first multicast DF extended community attribute carries the IP address of the PE device serving as the DF of the first multicast stream.

10. The method according to any one of claims 2 to 5, characterized in that: The first join message is a second join synchronization route sent by the second PE device.

11. The method according to any one of claims 1 to 5, characterized in that: The first allocated bandwidth includes an actual bandwidth value.

12. The method according to any one of claims 1 to 5, characterized in that: The first allocated bandwidth includes a bandwidth weight.

13. The method according to any one of claims 2 to 5, characterized in that: The method further comprises: The first PE device determines, according to a revocation message of the first Ethernet automatic discovery per Ethernet segment route received from the third PE device, that the third Ethernet link exits the ES, wherein the revocation message instructs the third PE device to revoke the first Ethernet automatic discovery per Ethernet segment route, the EVPN further includes the third PE device, the CE device is connected to the third PE device via the third Ethernet link, and the third Ethernet link belongs to the ES; The first PE device determines the PE device as the DF of the second multicast stream according to the first link bandwidth and the second link bandwidth, or the first PE device determines the PE device as the DF of the second multicast stream according to the value of the IP address of the first PE device and the value of the IP address of the second PE device, wherein before the third Ethernet link exits the ES, the DF of the second multicast stream is the third PE device, the second multicast stream is a multicast stream transmitted by the multicast source of the EVPN to the multicast group members in the second multicast group, and the CE device is a multicast group member in the second multicast group; The first PE device sends a third join synchronization route corresponding to the second multicast stream to the second PE device, where the third join synchronization route includes a second multicast DF extended community attribute, and the second multicast DF extended community attribute carries an IP address of a PE device serving as a DF of the second multicast stream.

14. A first operator edge PE device, characterized in that: The first PE device is applied in an Ethernet virtual private network EVPN, the EVPN further includes a customer edge CE device, the CE device is connected to the first PE device via a first Ethernet link, the first Ethernet link belongs to an Ethernet segment ES, and the first PE device includes: a receiver, configured to receive a first join message, wherein the first join message is used to instruct the CE device to request to join a first multicast group receiving a first multicast stream, wherein the first multicast stream is a multicast stream transmitted by the multicast source of the EVPN to multicast group members in the first multicast group; a processor, configured to add the CE device to the first multicast group according to the first join message; The processor is further configured to determine that the first ratio is the minimum ratio among the ratios corresponding to all Ethernet links included in the ES, wherein the first ratio is a ratio of a first allocated bandwidth and a first link bandwidth, the first allocated bandwidth indicates an allocated bandwidth in a total bandwidth that can be allocated to a multicast service on the first Ethernet link, and the first link bandwidth indicates a total bandwidth that can be allocated to a multicast service on the first Ethernet link; The processor is further configured to determine that the first PE device is a designated forwarder DF of the first multicast flow.

15. The first PE device according to claim 14, characterized in that: The EVPN further includes a second PE device, the CE device is connected to the second PE device via a second Ethernet link, the second Ethernet link belongs to the ES, The processor is further configured to determine that a second ratio is not a minimum ratio among ratios corresponding to all Ethernet links included in the ES, wherein the second ratio is a ratio of a second allocated bandwidth to a second link bandwidth, the second allocated bandwidth indicates an allocated bandwidth in a total bandwidth that can be allocated to a multicast service on the second Ethernet link, and the second link bandwidth indicates a total bandwidth that can be allocated to a multicast service on the second Ethernet link; The processor is further configured to determine that the first PE device is a non-designated forwarder (non-DF) of the first multicast flow.

16. The first PE device according to claim 14, characterized in that: The EVPN further includes a second PE device, the CE device is connected to the second PE device via a second Ethernet link, the second Ethernet link belongs to the ES, and in the processor determining that the first PE device is a designated forwarder DF of the first multicast stream, the processor is specifically configured to: Determine that the first ratio is equal to a second ratio, wherein the second ratio is a ratio of a second allocated bandwidth to a second link bandwidth, the second allocated bandwidth indicates an allocated bandwidth in a total bandwidth that can be allocated to a multicast service on the second Ethernet link, and the second link bandwidth indicates a total bandwidth that can be allocated to a multicast service on the second Ethernet link; It is determined that a value of the Internet Protocol IP address of the first PE device is greater than a value of the IP address of the second PE device.

17. The first PE device according to claim 14, characterized in that: The EVPN further includes a second PE device, the CE device is connected to the second PE device via a second Ethernet link, the second Ethernet link belongs to the ES, and in the processor determining that the first PE device is a designated forwarder DF of the first multicast stream, the processor is specifically configured to: Determine that the first ratio is equal to a second ratio, wherein the second ratio is a ratio of a second allocated bandwidth to a second link bandwidth, the second allocated bandwidth indicates an allocated bandwidth in a total bandwidth that can be allocated to a multicast service on the second Ethernet link, and the second link bandwidth indicates a total bandwidth that can be allocated to a multicast service on the second Ethernet link; It is determined that the first link bandwidth is greater than the second link bandwidth.

18. The first PE device according to claim 14, characterized in that: The EVPN further includes a second PE device, the CE device is connected to the second PE device via a second Ethernet link, the second Ethernet link belongs to the ES, and in the processor determining that the first ratio is the minimum ratio among the ratios corresponding to all Ethernet links included in the ES, the processor is specifically configured to: Determine that the first ratio is equal to a second ratio, wherein the second ratio is a ratio of a second allocated bandwidth to a second link bandwidth, the second allocated bandwidth indicates an allocated bandwidth in a total bandwidth that can be allocated to a multicast service on the second Ethernet link, and the second link bandwidth indicates a total bandwidth that can be allocated to a multicast service on the second Ethernet link; In the process in which the processor determines that the first PE device is a designated forwarder DF of the first multicast stream, the processor is specifically configured to: determine that the first PE device is a DF of the first multicast stream according to a Hash algorithm.

19. The first PE device according to any one of claims 15 to 18, characterized in that: The first PE device further includes a transmitter. The transmitter is configured to send a first Ethernet segment route to the second PE device, where the first Ethernet segment route includes a first link bandwidth extension community attribute, and the first link bandwidth extension community attribute is used to carry the first link bandwidth.

20. The first PE device according to any one of claims 14 to 18, characterized in that: The first join message is a multicast group join message sent by the CE device.

21. The first PE device according to any one of claims 15 to 18, characterized in that: The first PE device further includes a transmitter. The transmitter is configured to send a first join synchronization route to the second PE device, where the first join synchronization route is used to indicate that the CE device requests to join the first multicast group that receives the first multicast stream.

22. The first PE device according to claim 21, characterized in that: The first join synchronization route includes a first multicast DF extended community attribute, and the first multicast DF extended community attribute carries the IP address of the PE device serving as the DF of the first multicast stream.

23. The first PE device according to any one of claims 15 to 18, characterized in that: The first join message is a second join synchronization route sent by the second PE device.

24. The first PE device according to any one of claims 14 to 18, characterized in that: The first allocated bandwidth includes an actual bandwidth value.

25. The first PE device according to any one of claims 14 to 18, characterized in that: The first allocated bandwidth includes a bandwidth weight.

26. The first PE device according to any one of claims 15 to 18, characterized in that: The first PE device further includes a transmitter. The processor is further configured to determine that the third Ethernet link exits the ES according to a revocation message of the first Ethernet automatic discovery per Ethernet segment route received from the third PE device, wherein the revocation message indicates that the third PE device revokes the first Ethernet automatic discovery per Ethernet segment route, the EVPN further includes the third PE device, the CE device is connected to the third PE device via the third Ethernet link, and the third Ethernet link belongs to the ES; The processor is further configured to determine, according to the first link bandwidth and the second link bandwidth, or according to the first PE device, according to the value of the IP address of the first PE device and the value of the IP address of the second PE device, the PE device as the DF of the second multicast stream, wherein before the third Ethernet link exits the ES, the DF of the second multicast stream is the third PE device, the second multicast stream is a multicast stream transmitted by the multicast source of the EVPN to the multicast group members in the second multicast group, and the CE device is a multicast group member in the second multicast group; The transmitter is used to send a third join synchronization route corresponding to the second multicast stream to the second PE device, where the third join synchronization route includes a second multicast DF extended community attribute, and the second multicast DF extended community attribute carries an IP address of a PE device serving as a DF of the second multicast stream.

27. An Ethernet virtual private network EVPN system, characterized in that: The EVPN system includes a first PE device, and the first PE device is the first PE device described in any one of claims 14 to 26.

Citation Information

Patent Citations

  • A method, apparatus and system for determining the fundamental direction (DF) of a multicast stream.

    CN111083061B