Network optimization method, device and electronic equipment

By monitoring the AC link status of PE devices and updating the E-TREE extended community attributes, the problem of flooding traffic in EVPN VPLS networking was solved, and network performance was improved.

CN122457549APending Publication Date: 2026-07-24NEW H3C TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In EVPN VPLS and EVPN VPLS over SRv6 networks, there is unnecessary flooding traffic in the network, which affects network performance.

Method used

By monitoring the link status of the local AC on the PE device, when the link status of all ACs with the role of Root is abnormal, the E-TREE extended community attribute is updated to carry only the Leaf tag, and the updated EVPN route is sent to the second PE device to instruct the second PE device to prohibit the forwarding of traffic packets to the first PE device.

Benefits of technology

It effectively reduces flooding traffic in the network, improves network performance, and reduces network overhead for routing and forwarding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122457549A_ABST
    Figure CN122457549A_ABST
Patent Text Reader

Abstract

Embodiments of the present application relate to the technical field of communication, and provide a network optimization method and device and electronic equipment. In the embodiments of the present application, the link state of AC is introduced, and the role of AC is combined to control the flooding traffic in the network. Specifically, when the link state of all ACs with the local role of Root in the first PE device is abnormal, the local E-Tree extended community attribute is updated to carry only the Leaf label, and the second PE device is sent, to instruct the second PE device to directly prohibit forwarding the traffic message reported by the AC with the local role of Leaf to the first PE device according to the Leaf label when the traffic message needs to be sent to the first PE device. Compared with the existing mode of directly forwarding the message to the opposite PE device, the unnecessary message forwarding can be blocked in advance at the second PE device side, the flooding traffic in the network is effectively reduced, and the network performance is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to network optimization methods, apparatus and electronic devices. Background Technology

[0002] In EVPN VPLS and EVPN VPLS over SRv6 networking, the E-Tree mechanism is typically used. This involves dividing the Access Control Unit (AC) within the same EVPN instance into root and leaf roles. Two ACs in the leaf role cannot communicate with each other, thus achieving traffic isolation between specific ACs within the same EVPN instance. This ensures user access security and reduces traffic interference between users. Here, AC stands for Attachment Circuit, which is the physical or virtual circuit responsible for connecting CE (Content Provider) and PE (Provider Edge) devices. EVPN stands for Ethernet Virtual Private Network. VPLS stands for Virtual Private LAN Service. EVPN VPLS over SRv6 refers to carrying EVPN VPLS services through an SRv6 tunnel. E-Tree stands for EVPN Enhanced Ethernet Tree. CE stands for Customer Edge. PE stands for Provider Edge.

[0003] Currently, in the above network configuration, when the local PE device receives a traffic packet, such as a BUM traffic packet, from an AC with the local Leaf role, it directly forwards the traffic packet to the peer PE device. However, if the peer PE device does not have an AC with the Root role, the traffic packet will be directly discarded upon arrival at the peer PE device. This results in unnecessary packet forwarding in the network, increasing flooding traffic and thus affecting network performance. BUM stands for Broadcast, Unknown Unicast, and Multicast. Summary of the Invention

[0004] In view of this, this application provides network optimization methods, apparatus and electronic devices to minimize flooding traffic in the network and improve network performance.

[0005] This application provides a network optimization method, which is applied to a first PE device in an E-TREE network. The method includes: Monitor the link status of the AC local to the first PE device; When the link status of any AC with the role of Root is detected to change from normal to abnormal, if the link status of all ACs with the role of Root in the local area is detected to be abnormal, the local E-TREE extended community attribute is updated, and the first EVPN route carrying the updated E-TREE extended community attribute is sent to the second PE device. The updated E-TREE extended community attribute carries only the Leaf flag, which is used to indicate that there is no valid AC in the local area of ​​the first PE device that is in a normal state and has the role of Root, and to instruct the second PE device to prohibit forwarding the traffic packet to the first PE device according to the Leaf flag when it receives a traffic packet reported by an AC with the local role of Leaf that needs to be sent to the first PE device.

[0006] This application embodiment also provides a network optimization device, which is applied to a first PE device in an E-TREE network, and the device includes: The monitoring module is used to monitor the link status of the local AC of the first PE device; The sending module is used to update the local E-TREE extended community attribute when the link status of any AC with the role of Root changes from normal to abnormal. If the link status of all ACs with the role of Root in the local area is abnormal, the module will send the first EVPN route carrying the updated E-TREE extended community attribute to the second PE device. The updated E-TREE extended community attribute carries only the Leaf flag, which is used to indicate that there is no valid AC in the local area of ​​the first PE device that is in a normal state and has the role of Root, and to instruct the second PE device to prohibit forwarding the traffic packet to the first PE device according to the Leaf flag when it receives a traffic packet reported by an AC with the local role of Leaf that needs to be sent to the first PE device.

[0007] This application also provides an electronic device, which includes: Processor; and A computer-readable storage medium storing computer program instructions that, when executed by a processor, cause the processor to perform the steps of the method described above.

[0008] This application also provides a computer-readable storage medium storing computer program instructions that, when executed by a processor, cause the processor to perform the steps in the above method.

[0009] As can be seen from the above technical solutions, in this embodiment, the link state of the AC is introduced, and combined with the role of the AC for the control of flooding traffic in the network. Specifically, when the link state of all ACs with the role of Root in the local area is abnormal, the first PE device updates the local E-TREE extended community attribute to carry only the Leaf tag, and sends the updated E-TREE extended community attribute to the second PE device. This instructs the second PE device to directly prohibit the forwarding of the traffic packet to the first PE device based on the Leaf tag when it receives a traffic packet reported by an AC with the local role of Leaf that needs to be sent to the first PE device. Compared with the existing method of directly forwarding the packet to the peer PE device, this can block unnecessary packet forwarding in advance on the second PE device side, effectively reducing flooding traffic in the network and improving network performance.

[0010] Furthermore, in this embodiment, when the first PE device detects that the link status of any AC with the role of Root changes from normal to abnormal, it does not directly update the local E-TREE extended community attribute and send it to the second PE device. Instead, it only triggers the update and sending of the E-TREE extended community attribute when the link status of all ACs with the role of Root in the local device is abnormal. This can reduce unnecessary route advertising, further reduce the network overhead of route forwarding, and improve network performance. Attached Figure Description

[0011] The accompanying drawings, which are incorporated in and form part of this application, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0012] Figure 1 This is a flowchart illustrating a routing optimization method provided in an embodiment of this application.

[0013] Figure 2 This is a flowchart illustrating another routing optimization method provided in an embodiment of this application.

[0014] Figure 3 This is a network topology diagram provided for an embodiment of this application.

[0015] Figure 4 This is a schematic diagram of the structure of a routing optimization device provided in an embodiment of this application.

[0016] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0017] To facilitate understanding of the methods provided in the embodiments of this application, the application scenarios of the embodiments of this application are described below: Currently, in EVPN VPLS and EVPN VPLS over SRv6 networks, all ACs within the same EVPN instance can access each other by default. This means that users on the AC side (i.e., CE devices) within the same EVPN instance can also access each other, causing traffic interference between users and affecting user access security.

[0018] In practical applications, to ensure user access security and reduce traffic interference between users, it is usually necessary to control mutual access between users on the AC side. For example, the E-Tree function is usually used to divide ACs within the same EVPN instance into root and leaf roles. The AC in the root role can access ACs of any role, and the AC in the leaf role can access the AC in the root role. However, the two ACs in the leaf role cannot access each other, thereby achieving traffic isolation between specific ACs within the same EVPN instance.

[0019] In the above network configuration, when the local PE device receives a traffic packet, such as a BUM traffic packet, from an AC with the local Leaf role, it will directly forward the traffic packet to the peer PE device. However, if there is no AC with the Root role on the peer PE device side, the traffic packet will also be directly discarded after reaching the peer PE device. This results in unnecessary packet forwarding in the network, increases flooding traffic in the network, and thus affects network performance.

[0020] The aforementioned VPLS can refer to a point-to-multipoint Layer 2 Virtual Private Network (L2VPN) service provided on a Multiprotocol Label Switching (MPLS) or Internet Protocol (IP) backbone.

[0021] The aforementioned EVPN can refer to a Layer 2 VPN technology, in which the control plane uses Multiprotocol Border Gateway Protocol (MP-BGP) to advertise EVPN routing information, and the data plane uses Virtual Extensible LAN (VXLAN) or MPLS encapsulation to forward packets.

[0022] The aforementioned EVPN VPLS over SRv6 can refer to a networking architecture that transparently transmits user Layer 2 data over an IPv6 network, enabling user networks to establish point-to-multipoint connections across the IPv6 network.

[0023] The aforementioned CE device can refer to a user network-side device directly connected to the service provider's network. The aforementioned PE device can refer to a service provider network-side device connected to the CE device; the PE device is mainly responsible for the access of EVPN VPLS services, completing the mapping and forwarding of packets from the user network to the public network tunnel and from the public network tunnel back to the user network.

[0024] Therefore, to address the aforementioned problems, this application proposes a network optimization method to minimize flooding traffic in the network and improve network performance. To make the method provided in this application easier to understand, the method will be described in detail below with reference to the accompanying drawings and embodiments.

[0025] See Figure 1 , Figure 1 This is a flowchart illustrating a method provided in an embodiment of this application. In this embodiment, the method can be applied to any PE device (which may be referred to as the first PE device) in an E-TREE network. Optionally, in this embodiment, the E-TREE network may be, for example, an EVPN VPLS network with E-TREE functionality enabled, or an EVPN VPLS over SRv6 network with E-TREE functionality enabled, etc.

[0026] like Figure 1 As shown, the process may include the following steps: Step 101: Monitor the link status of the local AC of the first PE device.

[0027] In this embodiment, as one example, the link status of the AC can be determined by monitoring the status of the interface on the first PE device connected to the AC. For example, if the status of the interface on the first PE device connected to the AC is detected as abnormal, the link status of the AC is determined to be abnormal; if the status of the interface on the first PE device connected to the AC is detected as normal, the link status of the AC is determined to be normal. As to how specifically the status of the interface on the first PE device connected to the AC is monitored, please refer to the description of related technologies; it is not specifically limited here.

[0028] Optionally, in this embodiment, the method can be applied to scenarios such as EVPN VPLS single-homed scenarios and EVPN VPLS multi-homed scenarios, and is not specifically limited here. Specifically, an EVPN VPLS single-homed scenario refers to a situation where the same CE device connects to only one PE device in an E-TREE network; correspondingly, an EVPN VPLS multi-homed scenario refers to a situation where the same CE device can connect to multiple PE devices in an E-TREE network for redundancy backup / load sharing.

[0029] Therefore, in this embodiment, in a single-homed EVPN VPLS scenario, the AC in the UP state is identified as an AC with normal link status, and the AC in the DOWN state is identified as an AC with abnormal link status. In a multi-homed EVPN VPLS scenario, the AC in the UP state or the Bypass state is identified as an AC with normal link status, and the AC in the DOWN state is identified as an AC with abnormal link status.

[0030] Step 102: When the link status of any AC with the role of Root is detected to change from normal to abnormal, if the link status of all ACs with the role of Root in the local environment is detected to be abnormal, the local E-TREE extended community attribute is updated, and a first EVPN route carrying the updated E-TREE extended community attribute is sent to the second PE device. The updated E-TREE extended community attribute only carries the Leaf flag, which is used to indicate that there is no valid AC with the role of Root in the local environment of the first PE device, and to instruct the second PE device to prohibit forwarding the traffic packet to the first PE device according to the Leaf flag when it receives a traffic packet reported by an AC with the role of Leaf in the local environment that needs to be sent to the first PE device.

[0031] In this embodiment, the local E-TREE extended community attributes can be updated based on the role and link status of the local AC on the first PE device. For example, as an embodiment, when the link status of any AC with the role of Root is detected to change from normal to abnormal, it is first checked whether the link status of all ACs with the role of Root in the current local environment of the first PE device is abnormal.

[0032] If a valid Active Community (AC) with the role of Root exists locally on the first PE device, there is no need to update the local E-TREE extended community attributes again. It should be noted that in this case, the local E-TREE extended community attributes will either carry the Root flag or not carry any flag.

[0033] If the link status of all ACs with the role of Root in the local environment of the first PE device is abnormal, then the local E-TREE extended community attribute is updated to carry only the Leaf tag, and a first EVPN route carrying the updated E-TREE extended community attribute is sent to the second PE device. This allows the second PE device to prevent forwarding of traffic packets to the first PE device based on the Leaf tag indicated by the first EVPN route if it receives a traffic packet reported by an AC with the local role of Leaf that needs to be sent to the first PE device. This directly blocks unnecessary packet forwarding on the second PE device side in advance.

[0034] In this embodiment, the first PE device and the second PE device belong to the same EVPN instance.

[0035] Optionally, in this embodiment, the above-mentioned EVPN route can be, for example, a Type 3 route in BGP EVPN (i.e., a multicast Ethernet label route: Type 3 route).

[0036] Optionally, in this embodiment, the aforementioned traffic packets may be BUM traffic packets or known unicast packets, etc., and there is no specific limitation on this.

[0037] This concludes the process. Figure 1 The process is shown below.

[0038] pass Figure 1 As can be seen from the process shown, in this embodiment, the link state of the AC is introduced, and combined with the role of the AC for the control of flooding traffic in the network. Specifically, when the link state of all ACs with the role of Root in the local area is abnormal, the first PE device updates the local E-TREE extended community attribute to carry only the Leaf tag, and sends the updated E-TREE extended community attribute to the second PE device. This instructs the second PE device to directly prohibit the forwarding of the traffic packet to the first PE device based on the Leaf tag when it receives a traffic packet reported by an AC with the local role of Leaf that needs to be sent to the first PE device. Compared with the existing method of directly forwarding the packet to the peer PE device, this can block unnecessary packet forwarding in advance on the second PE device side, effectively reducing flooding traffic in the network and improving network performance.

[0039] Furthermore, in this embodiment, when the first PE device detects that the link status of any AC with the role of Root changes from normal to abnormal, it does not directly update the local E-TREE extended community attribute and send it to the second PE device. Instead, it only triggers the update and sending of the E-TREE extended community attribute when the link status of all ACs with the role of Root in the local device is abnormal. This can reduce unnecessary route advertising, further reduce the network overhead of route forwarding, and improve network performance.

[0040] The following is a summary of the above. Figure 1 The network optimization method shown will be further described below: In this embodiment, see Figure 2 As shown in the illustration, as an example, the method further includes the following steps: Step 201: When the link status of any AC with the role of Root is detected to change from abnormal to normal, check whether there is only one valid AC with the role of Root in the local storage of the first PE device. If yes (i.e., there is only one valid AC with the role of Root in the local storage), proceed to step 202; if no (i.e., there are multiple valid ACs with the role of Root in the local storage), proceed to step 203.

[0041] Step 202: Update the local E-TREE extended community attribute again to carry at least the Root tag or no AC role tag, and send a second EVPN route carrying the updated E-TREE extended community attribute to the second PE device. This will enable the second PE device to forward traffic packets to the first PE device if it receives a traffic packet reported by an AC with the local role of Leaf and needs to be sent to the first PE device, based on the Root tag indicated by the second EVPN route or without any tag.

[0042] The AC role markers mentioned above refer to the Root marker and Leaf marker. The absence of any AC role markers can be understood as not carrying the Root marker and Leaf marker.

[0043] Optionally, in this embodiment, if there is only one valid AC in normal state with the role of Root in the local area of ​​the first PE device, then if there is also an AC in normal state with the role of Leaf in the local area of ​​the first PE device, the local E-TREE extended community attribute is updated again to carry the Root tag and the Leaf tag. If there is no AC in normal state with the role of Leaf in the local area of ​​the first PE device, the local E-TREE extended community attribute is updated again to carry only the Root tag or not carry any tag.

[0044] Alternatively, in this embodiment, when sending an EVPN route to the second PE device, if there is only one valid AC in normal state with the role of Root in the local environment of the first PE device, then if there is no AC in normal state with the role of Leaf in the local environment of the first PE device, a second EVPN route without carrying the updated E-TREE extended community attribute is sent to the second PE device. This allows the second PE device, upon receiving the second EVPN route, to forward a traffic packet reported by the local AC with the role of Leaf that needs to be sent to the first PE device, based on the fact that the second EVPN route does not carry the E-TREE extended community attribute, to forward the traffic packet to the first PE device.

[0045] Step 203: No need to update the local E-TREE extended community properties.

[0046] In this embodiment, if there are multiple valid ACs in the local area of ​​the first PE device that are in a normal state and have the role of Root, it means that before the AC changes from abnormal to normal, the local E-TREE extended community attribute will carry the Root mark or will not carry any AC role mark. Therefore, in this case, there is no need to update the local E-TREE extended community attribute repeatedly.

[0047] In this embodiment, as an example, to prevent frequent updates and transmissions of E-TREE extended community attributes due to AC oscillations (such as repeated changes in AC status between normal and abnormal due to loose connections, network instability, etc.), if a change in the link status of any AC in the local environment of the first PE device is detected, the link status of that AC is first recorded, and after a set time, it is checked whether the current link status of that AC is the same as the link status of the latest recorded AC. If they are the same, when the change is from normal to abnormal (that is, the link status of that AC changes from normal to abnormal), the step of "if the link status of all ACs with the role of Root in the local environment is detected to be abnormal" is returned to be executed. When the change is from abnormal to normal (that is, the link status of that AC changes from abnormal to normal), the step of "if only one valid AC with the role of Root exists in the local environment in a normal state" is returned to be executed.

[0048] In this embodiment, as one example, after detecting that the first PE device and the second PE device have established a BGP neighbor relationship and completed the specified network configuration, the method further includes: If a valid AC with the role of Root is detected in the local machine of the first PE device, then the E-TREE extended community attribute, which carries at least the Root tag or no AC role tag, is recorded locally. For example, as described above, if a valid AC with the role of Root is detected in the local machine of the first PE device, then if an AC with the role of Leaf also exists in the local machine of the first PE device, the E-TREE extended community attribute, which carries both the Root and Leaf tags, is recorded locally. If no AC with the role of Leaf exists in the local machine of the first PE device, the E-TREE extended community attribute, which carries only the Root tag or no AC role tag, is recorded locally.

[0049] If no valid AC with the role of Root is detected in the local storage of the first PE device, then the E-TREE extended community attribute carrying only the Leaf tag is recorded locally.

[0050] Subsequently, a fourth EVPN route carrying the E-TREE extended community attribute of the record is sent to the second PE device. Upon receiving this fourth EVPN route, if the second PE device receives a traffic packet reported by an AC with a local role of Leaf that needs to be forwarded to the first PE device, it processes the traffic packet according to the markings carried in the E-TREE extended community attribute of the fourth EVPN route. For example, if the fourth EVPN route does not carry any AC role markings or at least carries a Root marking in its E-TREE extended community attribute, it forwards the traffic packet to the first PE device; conversely, if the fourth EVPN route only carries a Leaf marking in its E-TREE extended community attribute, it prohibits forwarding the traffic packet to the first PE device.

[0051] In this embodiment, the specified network configuration may include, for example, the Route Distinguisher (RD) configuration and the Route Tagert (RT) configuration.

[0052] The following describes the update of the local E-TREE extended community properties: In this embodiment, as one example, updating the local E-TREE extended community property can be implemented by setting the Root bitmap field in the local E-TREE extended community property to an invalid value and setting the Leaf bitmap field to a valid value.

[0053] In this embodiment, as an example, the above-mentioned updating of the local E-TREE extended community property can be implemented in the following ways: at least the Root bitmap field in the local E-TREE extended community property is set to a valid value; or, both the Root bitmap field and the Leaf bitmap field in the local E-TREE extended community property are set to invalid values.

[0054] Specifically, the Root bitmap field in the local E-TREE extended community attribute is set to an invalid value and a valid value, respectively indicating that the Root tag is not carried and the Root tag is carried. Correspondingly, the Leaf bitmap field in the local E-TREE extended community attribute is set to an invalid value and a valid value, respectively indicating that the Leaf tag is not carried and the Leaf tag is carried. This embodiment does not specifically limit the setting of the above invalid and valid values.

[0055] The following is a further description of the implementation of the first PE device after receiving the EVPN route: In this embodiment, as an example, after receiving the third EVPN route sent by the second PE device, if the first PE device detects that the E-TREE extended community attribute in the third EVPN route carries a Root tag or does not carry any AC role tag, then the attribute of the pseudo-wire (PW) established between the second PE device and the first PE device locally is updated to the Root attribute. This is so that when a traffic packet reported by an AC with the local role of Leaf is received and needs to be sent to the second PE device, the traffic packet is forwarded to the second PE device according to the Root attribute.

[0056] After receiving the third EVPN route sent by the second PE device, if the first PE device detects that the E-TREE extended community attribute in the third EVPN route only carries the Leaf tag, it updates the attribute of the PW established between the second PE device and the first PE device locally to the Leaf attribute. This is so that when it receives a traffic packet reported by an AC with the local role of Leaf that needs to be sent to the second PE device, it can prevent the forwarding of the traffic packet to the second PE device based on the Leaf attribute.

[0057] To facilitate understanding of the specific implementation process of the above network optimization method, specific examples are provided below.

[0058] In this embodiment, with Figure 3 For example, see the network architecture shown below. Figure 3 The network consists of: PE1 (i.e., service provider network edge device 1), and CE1 (i.e., user network edge device 1) and CE2 (i.e., user network edge device 2) connected to PE1; PE2 (i.e., service provider network edge device 2) and CE3 (i.e., user network edge device 3) connected to PE2. The AC (denoted as AC1, i.e., access circuit 1) connected to CE1 on the PE1 side acts as the Root; the AC (denoted as AC2, i.e., access circuit 2) connected to CE2 on the PE1 side acts as the Leaf; and the AC (denoted as AC3, i.e., access circuit 3) connected to CE3 on the PE2 side acts as the Leaf.

[0059] Based on this, as an example, the specific implementation process of the above routing optimization method is as follows: (1) Initially, BGP neighbors are established between PE1 and PE2, and VPLS EVPN networking is configured, while E-TREE enhancement is enabled on both. After the VPLS EVPN networking configuration is completed, PE1 records the corresponding E-TREE extended community attribute locally based on the role and link status of the local AC (i.e., AC1 and AC2), and sends a Type III route (denoted as the first route) carrying the E-TREE extended community attribute to PE2.

[0060] Specifically, if both AC1 and AC2 are in a normal state, the E-TREE extended community attribute carrying both Leaf and Root tags is recorded locally; if both AC1 and AC2 are in an abnormal state, the E-TREE extended community attribute carrying only the Leaf tag is recorded locally; if AC1 is in a normal state and AC2 is in an abnormal state, the E-TREE extended community attribute carrying only the Root tag or no AC role tag is recorded locally; if AC1 is in an abnormal state and AC2 is in a normal state, the E-TREE extended community attribute carrying only the Leaf tag is recorded locally.

[0061] Specifically, when sending a Type III route to PE2, if the link state of AC1 is normal and the link state of AC2 is abnormal, a Type III route without carrying the E-TREE extended community attribute can be sent to PE2, or a Type III route carrying the E-TREE extended community attribute can be sent to PE2.

[0062] It should also be noted that, under normal circumstances, the link states of AC1 and AC2 are both in a normal state initially.

[0063] Subsequently, upon receiving the first route sent by PE1, if PE2's E-TREE extended community attribute carries the Root flag (or both the Leaf and Root flags, or no AC role flag, or no E-TREE extended community attribute), then PE2 sets the attribute of the PW (denoted as PW1, i.e., the virtual link established between PE1 and PE2) between PE1 and PE2 locally to the Root attribute. If the E-TREE extended community attribute of the first route only carries the Leaf flag, then PE2 sets the attribute of PW1 locally to the Leaf attribute.

[0064] Based on this, when PE2 receives a BUM traffic packet reported by CE3 that needs to be sent to PE1, it processes the BUM traffic packet according to the attributes of PW1 recorded locally. Specifically, if the attribute of PW1 is Root, the BUM traffic packet is forwarded to PE1; if the attribute of PW1 is Leaf, the forwarding of the BUM traffic packet to PE1 is prohibited.

[0065] Subsequently, if PE1 receives the BUM traffic packet sent by PE2, since AC1 is the Root and AC2 is the Leaf, when the link status of AC1 is normal, it will forward the BUM traffic packet to CE1 and prevent the forwarding of the BUM traffic packet to CE2, thus completing the traffic isolation between ACs with Leaf roles.

[0066] (2) When CE1 on the PE1 side fails, the state of AC1 changes from UP to DOWN. In this case, there is no valid AC in PE1 that is in normal state and has the role of Root. Therefore, PE1 updates the local E-TREE extended community attribute to carry only the Leaf tag and sends a Type 3 route (denoted as the second route) carrying the E-TREE extended community attribute to PE2.

[0067] Subsequently, after receiving the second route sent by PE1, PE2 updates the attributes of PW1 in its local system to the Leaf attribute based on the Leaf tag carried in the E-TREE extended community attribute of the second route.

[0068] Based on this, when PE2 receives a BUM traffic packet reported by CE3 that needs to be sent to PE1, it prohibits forwarding the BUM traffic packet to PE1 according to the Leaf attribute recorded locally for PW1.

[0069] (3) When the CE1 fault on the PE1 side is recovered, the state of AC1 changes from DOWN to UP. In this case, there is a valid AC in the local PE1 that is in a normal state and has the role of Root. Therefore, if the link state of AC2 is in a normal state, PE1 updates the local E-TREE extended community attribute to carry the Leaf tag and the Root tag. If the link state of AC2 is in an abnormal state, PE1 updates the local E-TREE extended community attribute to carry only the Root tag or does not carry any AC role tag; and sends a Type III route (denoted as the third route) carrying the updated E-TREE extended community attribute to PE2.

[0070] Based on the above description, when sending a Type III route to PE2, if the link state of AC1 is normal and the link state of AC2 is abnormal, a Type III route without carrying the E-TREE extended community attribute can be sent to PE2, or a Type III route carrying the updated E-TREE extended community attribute can be sent to PE2.

[0071] Subsequently, after receiving the aforementioned third route sent by PE1, PE2 updates the attributes of PW1 in its local system to the Root attribute based on the Leaf and Root tags carried in the E-TREE extended community attributes of the third route (or the Root tag, or no AC role tag, or the E-TREE extended community attributes not carried in the first route).

[0072] Based on this, when PE2 receives a BUM traffic packet reported by CE3 that needs to be sent to PE1, it forwards the BUM traffic packet to PE1 according to the Root attribute recorded locally for PW1.

[0073] Subsequently, PE1 receives the BUM traffic packet sent by PE2. Since AC1 is the Root and AC2 is the Leaf, when the link status of AC1 is normal, it forwards the BUM traffic packet to CE1 and prohibits forwarding the BUM traffic packet to CE2, thus completing the traffic isolation between ACs with Leaf roles.

[0074] Optionally, in this embodiment, when the above-mentioned BUM traffic packets are transmitted between PE1 and PE2, they can be encapsulated as IPv6 packets with the SRv6 segment identifier (SID) as the destination address for transmission.

[0075] Optionally, in this embodiment, to prevent frequent refreshes of the three types of routes caused by AC oscillation, which would lead to frequent refreshes of PW attributes by the peer PE (i.e., PE2), the BGP Virtual Connection (BGPVC) module in PE1 does not immediately trigger the refresh operation of the three types of routes when it detects a change in the link state of the AC. Instead, it starts a timer. After the timer expires, it queries again whether the link state of the AC is the same as the previously detected link state. If so, it determines whether to refresh the three types of routes based on the role and link state of the local AC (i.e., AC1 and AC2).

[0076] For example, the above-mentioned determination of whether to refresh the three types of routes based on the roles and link states of the local ACs (i.e., AC1 and AC2) can be implemented as follows: If the markers determined based on the roles and link states of the local ACs (i.e., AC1 and AC2) are the same as the markers carried in the current local E-TREE extended community attributes, or both contain the Root marker, or neither carries any AC role markers, then there is no need to update the local E-TREE extended community attributes.

[0077] If the label determined based on the role and link state of the local AC (i.e., AC1 and AC2) is different from the label carried in the current local E-TREE extended community attribute, and one of them contains the Root label, then the local E-TREE extended community attribute is updated according to the determined label, and a Type III route carrying the updated E-TREE extended community attribute is sent to the peer PE, i.e., PE2.

[0078] As for how to determine the corresponding markers based on the roles and link states of the local ACs (i.e., AC1 and AC2), please refer to the relevant descriptions above, which will not be repeated here.

[0079] Based on the above description, the method provided in this embodiment can effectively reduce network flooding, thereby reducing the occupation of forwarding resources and improving network performance.

[0080] This concludes the description of the method provided in the embodiments of this application. The apparatus provided in the embodiments of this application will now be described: As an example, this embodiment also provides a network optimization device. For example, see... Figure 4 , Figure 4 This is a schematic diagram of a network optimization device provided in an embodiment of this application. The device corresponds to… Figure 1 The process is shown below. Figure 4 As shown, the network optimization device 400 is applied to the first PE device in an E-TREE network. The network optimization device 400 includes: Monitoring module 401 is used to monitor the link status of the local AC of the first PE device; The sending module 402 is used to update the local E-TREE extended community attribute when the link status of any AC with the role of Root changes from normal to abnormal. If the link status of all ACs with the role of Root in the local area is abnormal, the module will send the first EVPN route carrying the updated E-TREE extended community attribute to the second PE device. The updated E-TREE extended community attribute carries only the Leaf flag, which is used to indicate that there is no valid AC in the local area of ​​the first PE device that is in a normal state and has the role of Root, and to instruct the second PE device to prohibit forwarding the traffic packet to the first PE device according to the Leaf flag when it receives a traffic packet reported by an AC with the local role of Leaf that needs to be sent to the first PE device.

[0081] As one embodiment, the sending module 402 is further configured to: When the link status of any AC with the role of Root is detected to change from abnormal to normal, if only one valid AC with the role of Root exists in the local area and is in a normal state, the local E-TREE extended community attribute is updated again, and a second EVPN route carrying the updated E-TREE extended community attribute is sent to the second PE device. The updated E-TREE extended community attribute carries at least a Root flag or no AC role flag, indicating that there is a valid AC in the local environment of the first PE device that is in a normal state and has the role of Root. It also instructs the second PE device to forward the traffic packet to the first PE device according to the Root flag or without carrying any AC role flag when it receives a traffic packet reported by an AC with the local role of Leaf that needs to be sent to the first PE device.

[0082] As an example, updating the local E-TREE extended community property includes: setting the Root bitmap field in the local E-TREE extended community property to an invalid value and setting the Leaf bitmap field to a valid value; The step of updating the local E-TREE extended community property again includes: setting the Root bitmap field in the local E-TREE extended community property to a valid value; or setting both the Root bitmap field and the Leaf bitmap field in the local E-TREE extended community property to invalid values.

[0083] As one embodiment, the device further includes: The receiving module is used to receive the third EVPN route sent by the second PE device; The update module is used to update the attribute of the PW established between the first PE device and the second PE device in the local area to the Leaf attribute if the E-TREE extended community attribute in the third EVPN route only carries the Leaf tag. This is so that when a traffic packet reported by an AC with the role of Leaf in the local area is received and needs to be sent to the second PE device, the forwarding of the traffic packet to the second PE device is prohibited according to the Leaf attribute. If the E-TREE extended community attribute in the third EVPN route carries a Root tag or does not carry any AC role tag, then the attribute of the PW in the local machine will be updated to the Root attribute. When a traffic packet reported by an AC with the role of Leaf in the local machine is received and needs to be sent to the second PE device, the traffic packet will be forwarded to the second PE device according to the Root attribute.

[0084] As one embodiment, the device further includes: The recording module is used to record, when it is detected that the first PE device and the second PE device have established a Border Gateway Protocol (BGP) neighbor relationship and completed the specified network configuration, if it is detected that there is a valid AC in the local area in a normal state with the role of Root, then it records the E-TREE extended community attribute with at least the Root tag or without any AC role tag. If it is detected that there is no valid AC in the local area in a normal state with the role of Root, then it records the E-TREE extended community attribute with only the Leaf tag. The sending module 402 is further configured to: send a fourth EVPN route carrying the E-TREE extended community attributes of the record to the second PE device.

[0085] As one example, the recording module is further used for: If a change in the link status of any AC in the local system is detected, the link status of that AC is recorded, and after a set time, it is checked whether the current link status of that AC is the same as the link status of the latest recorded AC. If they are the same, when the link status of the AC changes from normal to abnormal, return to the step of "if the link status of all ACs with the role of Root in the local area is detected to be abnormal", and when the link status of the AC changes from abnormal to normal, return to the step of "if only one valid AC with the role of Root in the local area is detected to be in a normal state".

[0086] This concludes the process. Figure 4 Structural description of the device shown.

[0087] The specific implementation process of the functions and roles of each module in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.

[0088] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this application according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0089] Please see Figure 5 This is a schematic diagram of the hardware structure of an electronic device provided as an exemplary embodiment of this application. The electronic device includes a processor and a computer-readable storage medium; the computer-readable storage medium stores a plurality of computer program instructions, which, when executed by the processor, implement the method disclosed in the above example of this application. Depending on the actual function of the electronic device, other hardware may also be included, which will not be elaborated further.

[0090] Based on the same concept as the above method, this application also provides a computer-readable storage medium storing a plurality of computer program instructions, which, when executed by a processor, can implement the method disclosed in the above examples of this application.

[0091] For example, the aforementioned computer-readable storage medium can be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, messages, etc. For instance, computer-readable storage media can be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drives (such as hard disk drives), solid-state drives, any type of storage disk (such as optical discs, DVDs, etc.), or similar storage media, or combinations thereof.

[0092] The above are merely preferred embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A network optimization method, characterized in that, This method is applied to the first service provider network edge (PE) device in an Ethernet Virtual Private Network (VPN) Enhanced Ethernet Tree (E-TREE) network, and the method includes: Monitor the link status of the local access circuit AC of the first PE device; When the link status of any AC with the role of Root is detected to change from normal to abnormal, if the link status of all ACs with the role of Root in the local area is detected to be abnormal, the local E-TREE extended community attribute is updated, and the first Ethernet Virtual Private Network (EVPN) route carrying the updated E-TREE extended community attribute is sent to the second PE device. The updated E-TREE extended community attribute carries only the Leaf tag, which is used to indicate that there is no valid AC in the first PE device that is in a normal state and has the role of Root. It also instructs the second PE device to prohibit forwarding the traffic packet to the first PE device when it receives a traffic packet reported by an AC with the local role of Leaf that needs to be sent to the first PE device, based on the Leaf tag.

2. The method according to claim 1, characterized in that, The method further includes: When the link status of any AC with the role of Root is detected to change from abnormal to normal, if only one valid AC with the role of Root exists in the local area and is in a normal state, the local E-TREE extended community attribute is updated again, and a second EVPN route carrying the updated E-TREE extended community attribute is sent to the second PE device. The updated E-TREE extended community attribute carries at least a Root flag or no AC role flag, indicating that there is a valid AC in the local environment of the first PE device that is in a normal state and has the role of Root. It also instructs the second PE device to forward the traffic packet to the first PE device according to the Root flag or without carrying any AC role flag when it receives a traffic packet reported by an AC with the local role of Leaf that needs to be sent to the first PE device.

3. The method according to claim 2, characterized in that, The update of the local E-TREE extended community property includes: setting the Root bitmap field in the local E-TREE extended community property to an invalid value and setting the Leaf bitmap field to a valid value; The step of updating the local E-TREE extended community property again includes: setting the Root bitmap field in the local E-TREE extended community property to a valid value; or setting both the Root bitmap field and the Leaf bitmap field in the local E-TREE extended community property to invalid values.

4. The method according to claim 2, characterized in that, The method further includes: Receive the third EVPN route sent by the second PE device; If the E-TREE extended community attribute in the third EVPN route only carries the Leaf tag, then the attribute of the pseudowire PW established between the first PE device and the second PE device in the local area will be updated to the Leaf attribute, so that when a traffic packet reported by the AC with the role of Leaf in the local area is received and needs to be sent to the second PE device, the forwarding of the traffic packet to the second PE device will be prohibited according to the Leaf attribute. If the E-TREE extended community attribute in the third EVPN route carries a Root tag or does not carry any AC role tag, then the attribute of the PW in the local machine will be updated to the Root attribute. When a traffic packet reported by an AC with the role of Leaf in the local machine is received and needs to be sent to the second PE device, the traffic packet will be forwarded to the second PE device according to the Root attribute.

5. The method according to claim 1, characterized in that, After detecting that the first PE device and the second PE device have established a Border Gateway Protocol (BGP) neighbor relationship and completed the specified network configuration, the method further includes: If a valid AC in normal condition with the role of Root is detected locally, then the E-TREE extended community attribute carrying at least the Root tag or without any AC role tag is recorded locally. If no valid AC in normal condition with the role of Root is detected locally, then the E-TREE extended community attribute carrying only the Leaf tag is recorded locally. Then, a fourth EVPN route carrying the recorded E-TREE extended community attribute is sent to the second PE device.

6. The method according to claim 1 or 2, characterized in that, The method further includes: If a change in the link status of any AC in the local system is detected, the link status of that AC is recorded, and after a set time, it is checked whether the current link status of that AC is the same as the link status of the latest recorded AC. If they are the same, when the link status of the AC changes from normal to abnormal, return to the step of "if the link status of all ACs with the role of Root in the local area is detected to be abnormal", and when the link status of the AC changes from abnormal to normal, return to the step of "if only one valid AC with the role of Root in the local area is detected to be in a normal state".

7. A network optimization device, characterized in that, This device is used in the first service provider network edge (PE) device in an Ethernet Virtual Private Network (VPN) Enhanced Ethernet Tree (E-TREE) network. The device includes: The monitoring module is used to monitor the link status of the local access circuit AC of the first PE device; The sending module is used to update the local E-TREE extended community attribute when the link status of any AC with the role of Root changes from normal to abnormal. If the link status of all ACs with the role of Root in the local area is abnormal, the module will send the first Ethernet Virtual Private Network (EVPN) route carrying the updated E-TREE extended community attribute to the second PE device. The updated E-TREE extended community attribute carries only the Leaf tag, which is used to indicate that there is no valid AC in the first PE device that is in a normal state and has the role of Root. It also instructs the second PE device to prohibit forwarding the traffic packet to the first PE device when it receives a traffic packet reported by an AC with the local role of Leaf that needs to be sent to the first PE device, based on the Leaf tag.

8. The apparatus according to claim 7, characterized in that, The sending module is further configured to: When the link status of any AC with the role of Root is detected to change from abnormal to normal, if only one valid AC with the role of Root exists in the local area and is in a normal state, the local E-TREE extended community attribute is updated again, and a second EVPN route carrying the updated E-TREE extended community attribute is sent to the second PE device. The updated E-TREE extended community attribute carries at least a Root flag or no AC role flag, indicating that there is a valid AC in the local environment of the first PE device that is in a normal state and has the role of Root. It also instructs the second PE device to forward the traffic packet to the first PE device according to the Root flag or without carrying any AC role flag when it receives a traffic packet reported by an AC with the local role of Leaf that needs to be sent to the first PE device.

9. An electronic device, characterized in that, The electronic device includes: Processor; and A computer-readable storage medium storing computer program instructions that, when executed by the processor, cause the processor to perform the steps of the method according to any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions that, when executed by a processor, cause the processor to perform the steps of the method as described in any one of claims 1 to 6.