Traffic filtering method, and route advertisement method and apparatus
By carrying the leaf identifier in the unicast message, the traffic filtering between unvisited devices in the communication network is solved, and network resource waste and security issues are improved, and network efficiency and security are improved.
Patent Information
- Application Number
- PCT/CN2024/098820
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-06-14
- Filing Date
- 2024-06-13
- Publication Date
- 2024-12-19
AI Technical Summary
In communication networks, there is still traffic interaction between network devices that do not have mutual access requirements, resulting in waste of network resources and potential network security issues.
By carrying the leaf identifier in the unicast message, the traffic filtering of unicast traffic is realized, the forwarding interface is determined and unnecessary traffic is discarded, and unreasonable transmission is avoided.
Use network resources rationally, avoid network security issues, and improve network efficiency and security.
Smart Images

Figure CN2024098820_19122024_PF_FP_ABST
Abstract
Description
Traffic filtering method, routing notification method and device
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on June 14, 2023, with application number 202310709303.X and invention name “A traffic filtering method, route notification method and device”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of communications, and in particular to a traffic filtering method, a routing notification method, and a device. Background Art
[0003] With the advancement of communications technology, communications networks are carrying more and more services, and accordingly, the amount of traffic transmitted within these networks is also increasing. In some scenarios, network devices that don't need to communicate with each other still exchange traffic. For example, two network devices in the same broadcast domain that don't need to communicate with each other still exchange traffic. This situation not only wastes network resources, but also poses potential network security risks.
[0004] Therefore, a solution is urgently needed to solve the above problems.
[0005] Summary of the Invention
[0006] The embodiments of the present application provide a traffic filtering method, a route announcement method, and an apparatus, which can implement traffic filtering.
[0007] On the first aspect, an embodiment of the present application provides a traffic filtering method, which can be applied to a first communication device, and the first communication device can receive a unicast message sent by a second communication device, wherein the unicast message includes a leaf identifier. The leaf identifier indicates that the unicast message comes from a leaf interface. After the first communication device receives the unicast message, it can perform traffic filtering on the unicast message according to the leaf identifier. It can be seen that by utilizing the solution of the embodiment of the present application, traffic filtering of unicast traffic can be achieved by carrying a leaf identifier in the unicast message. On the one hand, network resources can be used reasonably, and on the other hand, network security problems caused by unreasonable transmission of unicast traffic can be avoided.
[0008] In one possible implementation, the unicast message is obtained by the second communication device encapsulating a leaf identifier in the outer layer of the first message, and the first message may be a message received by the second communication device through its leaf interface. In one example, the first message may be a unicast message. In this scenario, the leaf identifier may indicate that traffic filtering is performed on unicast traffic. In another example, the first message may be a broadcast unknown-unicast multicast (BUM) message. In this scenario, the leaf identifier may indicate that traffic filtering is performed on BUM traffic. That is, in one example, the leaf identifier may indicate that traffic filtering is performed on both unicast traffic and BUM traffic.
[0009] In one possible implementation, the first communication device performs traffic filtering on the unicast message based on the leaf identifier. In a specific implementation, the first communication device may determine the outbound interface for forwarding the unicast message. For example, the first communication device may determine the outbound interface for forwarding the unicast message based on the destination address of the unicast message. After determining the outbound interface for forwarding the unicast message, the first communication device may further determine the attributes of the outbound interface. In one example, the first communication device may pre-store the attributes of its respective access-side interfaces. If, based on the pre-stored attributes of the respective access-side interfaces, the attribute of the outbound interface is determined to be leaf, that is, the outbound interface is a leaf interface, the first communication device may discard the unicast message. In one possible implementation, if, based on the pre-stored attributes of the respective access-side interfaces, the first communication device determines that the attribute of the outbound interface is root, that is, the outbound interface is a root interface, the first communication device may forward the unicast message through the outbound interface to forward the unicast message to the destination device of the unicast message.
[0010] In one possible implementation, the leaf identifier may be pre-configured on the second communication device. In this way, the second communication device may obtain the unicast message based on the pre-configured leaf identifier and send the unicast message to the first communication device, so that the first communication device may perform traffic filtering on the unicast message based on the leaf identifier.
[0011] In another possible implementation, the leaf identifier may be announced by the first communication device to the second communication device. In a specific example, the first communication device may announce at least one route to the second communication device, and the at least one route is used to announce the leaf identifier, thereby achieving the purpose of announcing the leaf identifier to the second communication device. In one possible implementation, the at least one route may include a first unknown media access control route (unknown MAC route, UMR). In this case, the leaf identifier is used to perform traffic filtering on unicast traffic. In this way, the first communication device can announce the leaf identifier to the second communication device at the same time as announcing the first UMR.
[0012] In one possible implementation, the at least one route may include a MAC-specific route. In this case, the leaf identifier is used to perform traffic filtering on unicast traffic. In this manner, the first communication device may notify the second communication device of the leaf identifier while notifying the MAC-specific route.
[0013] In a possible implementation, the first UMR includes the leaf identifier. In this case, the first communication device can directly send the leaf identifier to the second communication device via the first UMR, and the second communication device can obtain the leaf identifier by analyzing the first UMR.
[0014] In a possible implementation, in a network scenario where packet forwarding is performed based on MPLS, the leaf identifier may be a first Multi-Protocol Label Switching (MPLS) label.
[0015] In one possible implementation, the first MPLS label may be carried via a corresponding field in the first UMR. In one example, the first UMR may include a first Ethernet-tree (E-tree) extended community attribute, which is used to carry the first MPLS label. In this case, after receiving the first UMR, the second communication device may parse the first E-tree extended community attribute in the first UMR to obtain the first MPLS label.
[0016] In a possible implementation, in a network scenario where message forwarding is performed based on SRv6, the leaf identifier may be a first Internet Protocol Version 6 Segment Routing Internet Protocol Version 6 Segment Identifier (SRv6 SID).
[0017] In one possible implementation, the first SRv6 SID may be carried via a corresponding field in the first UMR. In one example, the first UMR may include a Border Gateway Protocol (BGP) prefix SID attribute, where the BGP prefix SID attribute is used to carry the first SRv6 SID. In this case, after receiving the first UMR, the second communication device may parse the BGP prefix SID attribute in the first UMR to obtain the first SRv6 SID.
[0018] In one possible implementation, the first UMR may further include first indication information indicating that the first SRv6 SID is used to perform traffic filtering. In a specific example, both the first indication information and the first SRv6 SID may be carried by the BGP prefix SID attribute. In this case, the second communication device may obtain the first indication information and the first SRv6 SID when parsing the BGP prefix SID attribute.
[0019] In one possible implementation, the first indication information can be carried by an available field in the BGP prefix SID attribute. In one example, considering that the reserved field in the BGP prefix SID attribute is an available field, the reserved field in the BGP prefix SID attribute can be used to carry the first indication information. In another example, considering that the SRv6 service (Service) SID identifier (Flags) in the BGP prefix SID attribute is an available field, the SRv6 Service SID Flags field can be used to carry the first indication information. In another example, considering that the SRv6 endpoint behavior (Endpoint Behavior) in the BGP prefix SID attribute is an available field, the SRv6 Endpoint Behavior field can be used to carry the first indication information. For example, a new Endpoint Behavior can be defined to correspond to the first indication information.
[0020] In one possible implementation, the BGP prefix SID attribute may include at least one SRv6 Service subtype length value (Sub-TLV). The first SRv6 SID and the first indication information may be carried by the SRv6 Service Sub-TLV in the BGP prefix SID attribute. In a specific example, the first SRv6 SID and the first indication information may be carried by the same SRv6 Service Sub-TLV.
[0021] In one possible implementation, the leaf identifier is a second MPLS label. In this case, the at least one route may include an Ethernet Auto-Discovery route, and the Ethernet Auto-Discovery route includes the second MPLS label, which is used to perform traffic filtering on unicast traffic. In one example, the second communication device may be locally pre-configured with a policy for processing MPLS labels advertised via Ethernet Auto-Discovery routes. This policy may be used to indicate that the second MPLS label is used to perform traffic filtering on unicast traffic.
[0022] In one possible implementation, the leaf identifier is a second SRv6 SID. In this case, the at least one route includes an Ethernet virtual private network (EVPN) Ethernet Auto-Discovery route and an EVPN media access control (MAC) advertisement route, and the EVPN Ethernet Auto-Discovery route includes a third SRv6 SID. In one example, the third SRv6 SID can be used to identify a first EVPN instance deployed by the first communication device. The EVPN MAC advertisement route includes a fourth SRv6 SID, and the fourth SRv6 SID indicates traffic filtering. The third SRv6 SID and the fourth SRv6 SID are used by the second communication device to generate the second SRv6 SID. In this case, the first communication device notifies the second communication device of the third SRv6 SID and the fourth SRv6 SID by notifying the second communication device of the EVPN MAC advertisement route and the EVPN Ethernet Auto-Discovery route, so that the second communication device generates the second SRv6 SID based on the third SRv6 SID and the fourth SRv6 SID. Correspondingly, the first communication device itself may also generate the second SRv6 SID based on the third SRv6 SID and the fourth SRv6 SID, so as to perform traffic filtering based on the second SRv6 SID during the message forwarding phase.
[0023] In one possible implementation, the SID type of the second SRv6 SID is End.DT2U combined with Arg.FE2. End.DT2U is used to determine a corresponding forwarding operation, such as searching the Layer 2 forwarding table to determine the outbound interface for packet forwarding. Arg.FE2 is used to determine whether traffic filtering is required.
[0024] In one possible implementation, the first communication device is deployed with the first EVPN instance, and the leaf identifier is associated with the first EVPN. In this case, the leaf identifier can be used to perform traffic filtering on traffic corresponding to the first EVPN instance.
[0025] In one possible implementation, in addition to indicating the execution of traffic filtering, the leaf identifier can also be used to identify the first EVPN instance. In this case, during the message forwarding stage, if the leaf identifier has been encapsulated in the service message, the service message does not need to be encapsulated with identification information for identifying the first EVPN instance, thereby simplifying the encapsulation format of the service message.
[0026] In one possible implementation, the first communication device may also be deployed with a second EVPN instance. In one example, to reduce the MAC address learning pressure of the first communication device, the first communication device may notify the second communication device of the second UMR associated with the second EVPN. In an embodiment of the present application, if all access-side interfaces associated with the second EVPN of the first communication device are leaf interfaces, the second UMR includes second indication information, and the second indication information indicates that the second UMR has a leaf attribute. The second UMR has a leaf attribute, indicating that all access-side interfaces associated with the second EVPN of the first communication device are leaf interfaces. In this manner, the second communication device can perform traffic filtering on the portion of traffic matching the second UMR locally on the second communication device based on the second indication information.
[0027] In a possible implementation, the second UMR includes a second E-tree extended community attribute, and the second E-tree extended community attribute carries the second indication information, wherein the flags field of the second E-tree extended community attribute is set to a bit position of 1 for carrying the second indication information.
[0028] In a possible implementation, the value of the leaf tag field of the second E-tree extended community attribute is 0, and the flags field and the leaf tag field jointly carry the second indication information.
[0029] On the second aspect, an embodiment of the present application provides a traffic filtering method, and in one example, the method can be applied to a second communication device. The second communication device can receive a first message from a leaf interface. After the second communication device receives the first message, it can encapsulate a leaf identifier in the outer layer of the first message to obtain a first unicast message, and the leaf identifier indicates that the first unicast message comes from the leaf interface. After the second communication device obtains the first unicast message, it can send the first unicast message to the first communication device. Correspondingly, after the first communication device receives the first unicast message, it can perform traffic filtering on the unicast message according to the leaf identifier. It can be seen that by utilizing the solution of the embodiment of the present application, traffic filtering of unicast traffic can be achieved by carrying a leaf identifier in the first unicast message. On the one hand, network resources can be used reasonably, and on the other hand, network security problems caused by unreasonable transmission of unicast traffic can be avoided.
[0030] In a possible implementation manner, the method further includes: receiving at least one route sent by the first communication device, where the at least one route is used to advertise the leaf identifier.
[0031] In a possible implementation manner, the at least one route includes a first unknown media access control route UMR.
[0032] In a possible implementation manner, the first UMR includes the leaf identifier.
[0033] In a possible implementation manner, the leaf identifier is a first Multi-Protocol Label Switching (MPLS) label.
[0034] In a possible implementation, the first UMR includes a first Ethernet tree E-tree extended community attribute, and the first E-tree extended community attribute includes the first MPLS label.
[0035] In a possible implementation, the leaf identifier is a first Internet Protocol version 6 segment routing segment identifier SRv6 SID.
[0036] In a possible implementation, the first UMR includes a Border Gateway Protocol (BGP) prefix SID attribute, and the BGP prefix SID attribute includes the first SRv6 SID.
[0037] In a possible implementation, the BGP prefix SID attribute further includes first indication information, where the first indication information indicates that the first SRv6 SID is used to perform traffic filtering.
[0038] In a possible implementation, the first indication information is carried through a reserved field in the BGP prefix SID attribute, an SRv6 service Service SID identifier Flags field, or an SRv6 endpoint behavior Endpoint Behavior field.
[0039] In a possible implementation, the BGP prefix SID attribute includes an SRv6 Service subtype length value Sub-TLV, and the SRv6 Service Sub-TLV is used to carry the first SRv6 SID and the first indication information.
[0040] In a possible implementation, the leaf identifier is a second MPLS label, the at least one route includes an Ethernet automatic discovery route, the Ethernet automatic discovery route includes the second MPLS label, and the second MPLS label is used to perform traffic filtering on unicast traffic.
[0041] In one possible implementation, the leaf identifier is a second SRv6 SID, the at least one route includes an Ethernet Virtual Private Network (EVPN) Ethernet Auto-Discovery route and an EVPN Media Access Control (MAC) advertisement route, the EVPN Ethernet Auto-Discovery route includes a third SRv6 SID, the EVPN MAC advertisement route includes a fourth SRv6 SID, and the third SRv6 SID and the fourth SRv6 SID are used by the second communication device to generate the second SRv6 SID.
[0042] In a possible implementation, the SID type of the second SRv6 SID is End.DT2U combined with Arg.FE2.
[0043] In a possible implementation, the leaf identifier is used to perform traffic filtering on traffic corresponding to a first Ethernet virtual private network (EVPN) instance, and the first communication device is deployed with the first EVPN instance.
[0044] In a possible implementation, the leaf identifier is also used to identify the first EVPN instance.
[0045] In a possible implementation, the first message includes a unicast message or a BUM message.
[0046] In one possible implementation, the method also includes: receiving a second UMR associated with a second EVPN instance announced by a third communication device, the second UMR including second indication information, the second indication information indicating that the second UMR has a leaf attribute, the second UMR having a leaf attribute, indicating that all access side interfaces associated with the second EVPN of the third communication device are leaf interfaces, and the third communication device is deployed with the second EVPN instance; after receiving the second UMR, the second communication device can obtain the second UMR and generate a default MAC address table entry based on the second UMR, the default MAC address table entry including a leaf attribute identifier and a MAC address of all 0s.
[0047] In a possible implementation, the second route advertisement message includes a second E-tree extended community attribute, and the second E-tree extended community attribute carries the second indication information, wherein a flags field of the second E-tree extended community attribute is used to carry the second indication information, and a bit position thereof is 1.
[0048] In a possible implementation, the value of the leaf tag field in the second E-tree extended community attribute is 0, and the flags field and the leaf tag field jointly carry the second indication information.
[0049] In one possible implementation, the second communication device can also receive a second unicast message through the first access side interface of the second communication device with a leaf attribute. After the second communication device receives the second unicast message, it can match the destination MAC address of the second unicast message with the local MAC forwarding table. If the destination MAC address of the second unicast message matches the default MAC address table entry, then because the default MAC address table entry has a leaf attribute, the second communication device can discard the second unicast message. In this way, the second communication device does not need to forward the second unicast message to the first communication device. The second communication device itself can perform traffic filtering on the second unicast message, thereby saving the network resources required to forward the second unicast message to the first communication device.
[0050] In one possible implementation, after receiving the second indication information, the second communication device may add third indication information to the first communication device based on the second indication information, where the third indication information indicates traffic filtering. Specifically, the third indication information is used to indicate that traffic filtering is to be performed on traffic destined for the first communication device. In one example, the second communication device may save a correspondence between the first communication device and the third indication information. In another example, the second communication device may assign the third indication information to a forwarding entry in a broadcast forwarding table or a multicast forwarding table destined for the first communication device.
[0051] In one possible implementation, the second communication device may also receive a second message through a second access-side interface of the second communication device with a leaf attribute, where the second message is a broadcast message or a multicast message. Accordingly, the second communication device may match the second message with a corresponding forwarding table entry. When the second message matches the forwarding table entry of the first communication device, the second communication device may discard the second message based on the third indication information. In this manner, the second communication device does not need to forward the second message to the first communication device; the second communication device itself can perform traffic filtering on the second message, thereby saving the network resources required to forward the second message to the first communication device.
[0052] On the third aspect, an embodiment of the present application provides a route announcement method, which can be applied to a first communication device. In one example, the first communication device can obtain at least one route, and the at least one route is used to announce a leaf identifier, and the leaf identifier is used to perform traffic filtering on unicast traffic, and the leaf identifier is an MPLS label or an SRv6 SID. After the first communication device obtains the at least one route, it can announce the at least one route to the second communication device, so that in the traffic forwarding stage, the second communication device and the first communication device can use the leaf identifier to perform traffic filtering on unicast traffic. It can be seen that by utilizing the solution of the embodiment of the present application, traffic filtering of unicast traffic can be achieved. On the one hand, network resources can be used reasonably, and on the other hand, network security problems caused by unreasonable transmission of unicast traffic can be avoided.
[0053] In a possible implementation manner, the at least one route includes a first unknown media access control route UMR.
[0054] In a possible implementation manner, the first UMR includes the leaf identifier.
[0055] In a possible implementation manner, the leaf identifier is a first Multi-Protocol Label Switching (MPLS) label.
[0056] In a possible implementation, the first UMR includes a first Ethernet tree E-tree extended community attribute, and the first E-tree extended community attribute includes the first MPLS label.
[0057] In a possible implementation, the leaf identifier is a first Internet Protocol version 6 segment routing segment identifier SRv6 SID.
[0058] In a possible implementation, the first UMR includes a Border Gateway Protocol (BGP) prefix SID attribute, and the BGP prefix SID attribute includes the first SRv6 SID.
[0059] In a possible implementation, the BGP prefix SID attribute further includes first indication information, where the first indication information indicates that the first SRv6 SID is used to perform traffic filtering.
[0060] In a possible implementation, the first indication information is carried through a reserved field in the BGP prefix SID attribute, an SRv6 service Service SID identifier Flags field, or an SRv6 endpoint behavior Endpoint Behavior field.
[0061] In a possible implementation, the BGP prefix SID attribute includes an SRv6 Service subtype length value Sub-TLV, and the SRv6 Service Sub-TLV is used to carry the first SRv6 SID and the first indication information.
[0062] In a possible implementation, the leaf identifier is a second MPLS label, the at least one route includes an Ethernet automatic discovery route, the Ethernet automatic discovery route includes the second MPLS label, and the second MPLS label is used to perform traffic filtering on unicast traffic.
[0063] In one possible implementation, the leaf identifier is a second SRv6 SID, the at least one route includes an Ethernet Virtual Private Network (EVPN) Ethernet Auto-Discovery route and an EVPN Media Access Control (MAC) advertisement route, the EVPN Ethernet Auto-Discovery route includes a third SRv6 SID, the EVPN MAC advertisement route includes a fourth SRv6 SID, and the third SRv6 SID and the fourth SRv6 SID are used by the second communication device to generate the second SRv6 SID.
[0064] In a possible implementation, the SID type of the second SRv6 SID is End.DT2U combined with Arg.FE2.
[0065] In a possible implementation, the leaf identifier is used to perform traffic filtering on traffic corresponding to a first Ethernet virtual private network (EVPN) instance, and the first communication device is deployed with the first EVPN instance.
[0066] In a possible implementation, the leaf identifier is also used to identify the first EVPN instance.
[0067] In one possible implementation, the method further includes: notifying the second communication device of a second UMR associated with a second EVPN instance, the second UMR including second indication information, the second indication information indicating that the second UMR has a leaf attribute, the second UMR having a leaf attribute, indicating that all access side interfaces associated with the second EVPN of the first communication device are leaf interfaces, and the first communication device is deployed with the second EVPN instance.
[0068] In a possible implementation, the second UMR includes a second E-tree extended community attribute, and the second E-tree extended community attribute carries the second indication information, wherein the flags field of the second E-tree extended community attribute is used to carry the second indication information and the bit position is 1.
[0069] In a possible implementation, the value of the leaf tag field in the second E-tree extended community attribute is 0, and the flags field and the leaf tag field jointly carry the second indication information.
[0070] In the fourth aspect, an embodiment of the present application provides a route announcement method, which can be applied to a second communication device. In one example, the second communication device can receive at least one route announced by the first communication device, and the first route announcement message of the at least one route is used to announce a leaf identifier, and the leaf identifier is used to perform traffic filtering on unicast traffic, and the leaf identifier is an MPLS label or an SRv6 SID. After the second communication device receives the at least one route, it can obtain the leaf identifier so that in the traffic forwarding stage, the second communication device can use the leaf identifier to perform operations related to traffic filtering on the unicast traffic, thereby realizing traffic filtering of the unicast traffic. It can be seen that by utilizing the solution of the embodiment of the present application, traffic filtering of unicast traffic can be realized. On the one hand, network resources can be used reasonably, and on the other hand, network security problems caused by unreasonable transmission of unicast traffic can be avoided.
[0071] In a possible implementation manner, the at least one route includes a first unknown media access control route UMR.
[0072] In a possible implementation manner, the first UMR includes the leaf identifier.
[0073] In a possible implementation manner, the leaf identifier is a first Multi-Protocol Label Switching (MPLS) label.
[0074] In a possible implementation, the first UMR includes a first Ethernet tree E-tree extended community attribute, and the first E-tree extended community attribute includes the first MPLS label.
[0075] In a possible implementation, the leaf identifier is a first Internet Protocol version 6 segment routing segment identifier SRv6 SID.
[0076] In a possible implementation, the first UMR includes a Border Gateway Protocol (BGP) prefix SID attribute, and the BGP prefix SID attribute includes the first SRv6 SID.
[0077] In a possible implementation, the BGP prefix SID attribute further includes first indication information, where the first indication information indicates that the first SRv6 SID is used to perform traffic filtering.
[0078] In a possible implementation, the first indication information is carried through a reserved field in the BGP prefix SID attribute, an SRv6 service Service SID identifier Flags field, or an SRv6 endpoint behavior Endpoint Behavior field.
[0079] In a possible implementation, the BGP prefix SID attribute includes an SRv6 Service subtype length value Sub-TLV, and the SRv6 Service Sub-TLV is used to carry the first SRv6 SID and the first indication information.
[0080] In a possible implementation, the leaf identifier is a second MPLS label, the at least one route includes an Ethernet automatic discovery route, the Ethernet automatic discovery route includes the second MPLS label, and the second MPLS label is used to perform traffic filtering on unicast traffic.
[0081] In one possible implementation, the leaf identifier is a second SRv6 SID, the at least one route includes an Ethernet Virtual Private Network (EVPN) Ethernet Auto-Discovery route and an EVPN Media Access Control (MAC) advertisement route, the EVPN Ethernet Auto-Discovery route includes a third SRv6 SID, the EVPN MAC advertisement route includes a fourth SRv6 SID, and the third SRv6 SID and the fourth SRv6 SID are used by the second communication device to generate the second SRv6 SID.
[0082] In a possible implementation, the SID type of the second SRv6 SID is End.DT2U combined with Arg.FE2.
[0083] In a possible implementation, the leaf identifier is used to perform traffic filtering on traffic corresponding to a first Ethernet virtual private network (EVPN) instance, and the first communication device is deployed with the first EVPN instance.
[0084] In a possible implementation, the leaf identifier is also used to identify the first EVPN instance.
[0085] In one possible implementation, the method also includes: receiving a second UMR associated with a second EVPN instance announced by a third communication device, the second UMR including second indication information, the second indication information indicating that the second UMR has a leaf attribute, the second UMR having a leaf attribute, indicating that all access side interfaces associated with the second EVPN of the third communication device are leaf interfaces, and the third communication device is deployed with the second EVPN instance; obtaining the second UMR; generating a default MAC address table entry based on the second UMR, the default MAC address table entry including a leaf attribute identifier and a MAC address of all 0s.
[0086] In a possible implementation, the second route advertisement message includes a second E-tree extended community attribute, and the second E-tree extended community attribute carries the second indication information, wherein a flags field of the second E-tree extended community attribute is used to carry the second indication information, and a bit position thereof is 1.
[0087] In one possible implementation, the method further includes: receiving a second unicast message through a first access side interface with a leaf attribute of the second communication device; and discarding the second unicast message in response to the destination MAC address of the second unicast message matching the default MAC address table entry.
[0088] In a possible implementation manner, the method further includes: adding third indication information to the first communication device according to the second indication information, where the third indication information indicates traffic filtering.
[0089] In one possible implementation, the method also includes: receiving a second message through a second access side interface with a leaf attribute of the second communication device, the second message being a broadcast message or a multicast message; when the second message matches the forwarding entry arriving at the first communication device, discarding the second message according to the third indication information.
[0090] In the fifth aspect, an embodiment of the present application provides a traffic filtering device, which is applied to a first communication device, and the device includes: a transceiver unit and a processing unit; the transceiver unit is used to perform the receiving and / or sending operations performed by the first communication device as described in the first aspect above; the processing unit is used to perform operations other than the receiving and / or sending operations performed by the first communication device as described in the first aspect above.
[0091] In a specific example, the apparatus includes: a receiving unit and a processing unit. The receiving unit is configured to receive a unicast message from a second communication device, the unicast message including a leaf identifier, the leaf identifier indicating that the unicast message originates from a leaf interface; and the processing unit is configured to perform traffic filtering on the unicast message based on the leaf identifier.
[0092] In a possible implementation, the processing unit is configured to: in response to determining that an outgoing interface for forwarding the unicast message is a leaf interface, discard the unicast message.
[0093] In a possible implementation, the apparatus further includes: a sending unit, configured to notify at least one route to the second communication apparatus, where the at least one route is used to notify the leaf identifier.
[0094] In a possible implementation manner, the at least one route includes a first unknown media access control route UMR.
[0095] In a possible implementation manner, the first UMR includes the leaf identifier.
[0096] In a possible implementation manner, the leaf identifier is a first Multi-Protocol Label Switching (MPLS) label.
[0097] In a possible implementation, the first UMR includes a first Ethernet tree E-tree extended community attribute, and the first E-tree extended community attribute includes the first MPLS label.
[0098] In a possible implementation, the leaf identifier is a first Internet Protocol version 6 segment routing segment identifier SRv6 SID.
[0099] In a possible implementation, the first UMR includes a Border Gateway Protocol (BGP) prefix SID attribute, and the BGP prefix SID attribute includes the first SRv6 SID.
[0100] In a possible implementation, the BGP prefix SID attribute further includes first indication information, where the first indication information indicates that the first SRv6 SID is used to perform traffic filtering.
[0101] In a possible implementation, the first indication information is carried through a reserved field in the BGP prefix SID attribute, an SRv6 service Service SID identifier Flags field, or an SRv6 endpoint behavior Endpoint Behavior field.
[0102] In a possible implementation, the BGP prefix SID attribute includes an SRv6 Service subtype length value Sub-TLV, and the SRv6 Service Sub-TLV is used to carry the first SRv6 SID and the first indication information.
[0103] In a possible implementation, the leaf identifier is a second MPLS label, the at least one route includes an Ethernet automatic discovery route, the Ethernet automatic discovery route includes the second MPLS label, and the second MPLS label is used to perform traffic filtering on unicast traffic.
[0104] In one possible implementation, the leaf identifier is a second SRv6 SID, the at least one route includes an Ethernet Virtual Private Network (EVPN) Ethernet Auto-Discovery route and an EVPN Media Access Control (MAC) advertisement route, the EVPN Ethernet Auto-Discovery route includes a third SRv6 SID, the EVPN MAC advertisement route includes a fourth SRv6 SID, and the third SRv6 SID and the fourth SRv6 SID are used by the second communication device to generate the second SRv6 SID.
[0105] In a possible implementation, the SID type of the second SRv6 SID is End.DT2U combined with Arg.FE2.
[0106] In a possible implementation, the leaf identifier is used to perform traffic filtering on traffic corresponding to a first Ethernet virtual private network (EVPN) instance, and the first communication device is deployed with the first EVPN instance.
[0107] In a possible implementation, the leaf identifier is also used to identify the first EVPN instance.
[0108] In a possible implementation, the payload of the unicast message is a unicast message or a broadcast unknown unicast multicast (BUM) message.
[0109] In one possible implementation, the device includes a sending unit that is further used to: notify the second communication device of a second UMR associated with a second EVPN instance, the second UMR including second indication information, the second indication information indicating that the second UMR has a leaf attribute, the second UMR has a leaf attribute, indicating that all access side interfaces associated with the second EVPN of the first communication device are leaf interfaces, and the first communication device is deployed with the second EVPN instance.
[0110] In a possible implementation, the second UMR includes a second E-tree extended community attribute, and the second E-tree extended community attribute carries the second indication information, wherein the flags field of the second E-tree extended community attribute is used to carry the second indication information and the bit position is 1.
[0111] In a possible implementation, the value of the leaf tag field of the second E-tree extended community attribute is 0, and the flags field and the leaf tag field jointly carry the second indication information.
[0112] In the sixth aspect, an embodiment of the present application provides a traffic filtering device, which is applied to a second communication device, and the device includes: a transceiver unit and a processing unit; the transceiver unit is used to perform the receiving and / or sending operations performed by the second communication device as described in the second aspect above; the processing unit is used to perform operations other than the receiving and / or sending operations performed by the second communication device as described in the second aspect above.
[0113] In a specific example, the device includes a receiving unit, a processing unit, and a sending unit. The receiving unit is configured to receive a first message from a leaf interface; the processing unit is configured to encapsulate a leaf identifier in an outer layer of the first message to obtain a first unicast message, wherein the leaf identifier indicates that the first unicast message comes from the leaf interface; and the sending unit is configured to send the first unicast message to a first communication device.
[0114] In a possible implementation, the receiving unit is further configured to receive at least one route sent by the first communication device, where the at least one route is used to advertise the leaf identifier.
[0115] In a possible implementation manner, the at least one route includes a first unknown media access control route UMR.
[0116] In a possible implementation manner, the first UMR includes the leaf identifier.
[0117] In a possible implementation manner, the leaf identifier is a first Multi-Protocol Label Switching (MPLS) label.
[0118] In a possible implementation, the first UMR includes a first Ethernet tree E-tree extended community attribute, and the first E-tree extended community attribute includes the first MPLS label.
[0119] In a possible implementation, the leaf identifier is a first Internet Protocol version 6 segment routing segment identifier SRv6 SID.
[0120] In a possible implementation, the first UMR includes a Border Gateway Protocol (BGP) prefix SID attribute, and the BGP prefix SID attribute includes the first SRv6 SID.
[0121] In a possible implementation, the BGP prefix SID attribute further includes first indication information, where the first indication information indicates that the first SRv6 SID is used to perform traffic filtering.
[0122] In a possible implementation, the first indication information is carried through a reserved field in the BGP prefix SID attribute, an SRv6 service Service SID identifier Flags field, or an SRv6 endpoint behavior Endpoint Behavior field.
[0123] In a possible implementation, the BGP prefix SID attribute includes an SRv6 Service subtype length value Sub-TLV, and the SRv6 Service Sub-TLV is used to carry the first SRv6 SID and the first indication information.
[0124] In a possible implementation, the leaf identifier is a second MPLS label, the at least one route includes an Ethernet automatic discovery route, the Ethernet automatic discovery route includes the second MPLS label, and the second MPLS label is used to perform traffic filtering on unicast traffic.
[0125] In one possible implementation, the leaf identifier is a second SRv6 SID, the at least one route includes an Ethernet Virtual Private Network (EVPN) Ethernet Auto-Discovery route and an EVPN Media Access Control (MAC) advertisement route, the EVPN Ethernet Auto-Discovery route includes a third SRv6 SID, the EVPN MAC advertisement route includes a fourth SRv6 SID, and the third SRv6 SID and the fourth SRv6 SID are used by the second communication device to generate the second SRv6 SID.
[0126] In a possible implementation, the SID type of the second SRv6 SID is End.DT2U combined with Arg.FE2.
[0127] In a possible implementation, the leaf identifier is used to perform traffic filtering on traffic corresponding to a first Ethernet virtual private network (EVPN) instance, and the first communication device is deployed with the first EVPN instance.
[0128] In a possible implementation, the leaf identifier is also used to identify the first EVPN instance.
[0129] In a possible implementation, the first message includes: a unicast message or a broadcast unknown unicast multicast (BUM) message.
[0130] In one possible implementation, the receiving unit is further used to receive a second UMR associated with a second EVPN instance announced by a third communication device, the second UMR including second indication information, the second indication information indicating that the second UMR has a leaf attribute, the second UMR having a leaf attribute, indicating that all access side interfaces associated with the second EVPN of the third communication device are leaf interfaces, and the third communication device is deployed with the second EVPN instance; the processing unit is further used to obtain the second UMR, and generate a default MAC address table entry based on the second UMR, the default MAC address table entry including a leaf attribute identifier and a MAC address of all 0s.
[0131] In a possible implementation, the second route advertisement message includes a second E-tree extended community attribute, and the second E-tree extended community attribute carries the second indication information, wherein a flags field of the second E-tree extended community attribute is used to carry the second indication information, and a bit position thereof is 1.
[0132] In one possible implementation, the receiving unit is further used to receive a second unicast message through the first access side interface with a leaf attribute of the second communication device; the processing unit is used to discard the second unicast message in response to the destination MAC address of the second unicast message matching the default MAC address table entry.
[0133] In a possible implementation manner, the processing unit is further configured to add third indication information to the first communication device according to the second indication information, where the third indication information indicates traffic filtering.
[0134] In one possible implementation, the receiving unit is further used to receive a second message through a second access side interface with a leaf attribute of the second communication device, where the second message is a broadcast message or a multicast message; the processing unit is further used to discard the second message according to the third indication information when the second message matches the forwarding table entry arriving at the first communication device.
[0135] In the seventh aspect, an embodiment of the present application provides a routing announcement device, which is applied to a first communication device, and the device includes: a transceiver unit and a processing unit; the transceiver unit is used to perform the receiving and / or sending operations performed by the first communication device as described in the third aspect above; the processing unit is used to perform operations other than the receiving and / or sending operations performed by the first communication device as described in the third aspect above.
[0136] In a specific example, the apparatus includes a processing unit and a sending unit. The processing unit is configured to obtain at least one route, the at least one route being used to advertise a leaf identifier, the leaf identifier being used to perform traffic filtering on unicast traffic, the leaf identifier being a Multi-Protocol Label Switching (MPLS) label or an Internet Protocol version 6 (Internet Protocol version 6) Segment Routing Segment Identifier (SRv6) SID; and the sending unit is configured to advertise the at least one route to a second communication apparatus.
[0137] In a possible implementation manner, the at least one route includes a first unknown media access control route UMR.
[0138] In a possible implementation manner, the first UMR includes the leaf identifier.
[0139] In a possible implementation manner, the leaf identifier is a first Multi-Protocol Label Switching (MPLS) label.
[0140] In a possible implementation, the first UMR includes a first Ethernet tree E-tree extended community attribute, and the first E-tree extended community attribute includes the first MPLS label.
[0141] In a possible implementation, the leaf identifier is a first Internet Protocol version 6 segment routing segment identifier SRv6 SID.
[0142] In a possible implementation, the first UMR includes a Border Gateway Protocol (BGP) prefix SID attribute, and the BGP prefix SID attribute includes the first SRv6 SID.
[0143] In a possible implementation, the BGP prefix SID attribute further includes first indication information, where the first indication information indicates that the first SRv6 SID is used to perform traffic filtering.
[0144] In a possible implementation, the first indication information is carried through a reserved field in the BGP prefix SID attribute, an SRv6 service Service SID identifier Flags field, or an SRv6 endpoint behavior Endpoint Behavior field.
[0145] In a possible implementation, the BGP prefix SID attribute includes an SRv6 Service subtype length value Sub-TLV, and the SRv6 Service Sub-TLV is used to carry the first SRv6 SID and the first indication information.
[0146] In a possible implementation, the leaf identifier is a second MPLS label, the at least one route includes an Ethernet automatic discovery route, the Ethernet automatic discovery route includes the second MPLS label, and the second MPLS label is used to perform traffic filtering on unicast traffic.
[0147] In one possible implementation, the leaf identifier is a second SRv6 SID, the at least one route includes an Ethernet Virtual Private Network (EVPN) Ethernet Auto-Discovery route and an EVPN Media Access Control (MAC) advertisement route, the EVPN Ethernet Auto-Discovery route includes a third SRv6 SID, the EVPN MAC advertisement route includes a fourth SRv6 SID, and the third SRv6 SID and the fourth SRv6 SID are used by the second communication device to generate the second SRv6 SID.
[0148] In a possible implementation, the SID type of the second SRv6 SID is End.DT2U combined with Arg.FE2.
[0149] In a possible implementation, the leaf identifier is used to perform traffic filtering on traffic corresponding to a first Ethernet virtual private network (EVPN) instance, and the first communication device is deployed with the first EVPN instance.
[0150] In a possible implementation, the leaf identifier is also used to identify the first EVPN instance.
[0151] In one possible implementation, the sending unit is further used to notify the second communication device of a second UMR associated with a second EVPN instance, wherein the second UMR includes second indication information, wherein the second indication information indicates that the second UMR has a leaf attribute, and the second UMR has a leaf attribute, indicating that all access side interfaces associated with the second EVPN of the first communication device are leaf interfaces, and the first communication device is deployed with the second EVPN instance.
[0152] In a possible implementation, the second UMR includes a second E-tree extended community attribute, and the second E-tree extended community attribute carries the second indication information, wherein the flags field of the second E-tree extended community attribute is used to carry the second indication information and the bit position is 1.
[0153] In a possible implementation, the value of the leaf tag field in the second E-tree extended community attribute is 0, and the flags field and the leaf tag field jointly carry the second indication information.
[0154] In the eighth aspect, an embodiment of the present application provides a routing announcement device, which is applied to a second communication device, and the device includes: a transceiver unit and a processing unit; the transceiver unit is used to perform the receiving and / or sending operations performed by the second communication device as described in the fourth aspect above; the processing unit is used to perform operations other than the receiving and / or sending operations performed by the second communication device as described in the fourth aspect above.
[0155] In a specific example, the communication device includes a receiving unit and a processing unit. The receiving unit is configured to receive at least one route advertised by a first communication device, the at least one route being used to advertise a leaf identifier, the leaf identifier being used to perform traffic filtering on unicast traffic, the leaf identifier being a Multi-Protocol Label Switching (MPLS) label or an Internet Protocol version 6 (Internet Protocol version 6) Segment Routing Segment Identifier (SRv6 SID); and the processing unit is configured to obtain the leaf identifier.
[0156] In a possible implementation manner, the at least one route includes a first unknown media access control route UMR.
[0157] In a possible implementation manner, the first UMR includes the leaf identifier.
[0158] In a possible implementation manner, the leaf identifier is a first Multi-Protocol Label Switching (MPLS) label.
[0159] In a possible implementation, the first UMR includes a first Ethernet tree E-tree extended community attribute, and the first E-tree extended community attribute includes the first MPLS label.
[0160] In a possible implementation, the leaf identifier is a first Internet Protocol version 6 segment routing segment identifier SRv6 SID.
[0161] In a possible implementation, the first UMR includes a Border Gateway Protocol (BGP) prefix SID attribute, and the BGP prefix SID attribute includes the first SRv6 SID.
[0162] In a possible implementation, the BGP prefix SID attribute further includes first indication information, where the first indication information indicates that the first SRv6 SID is used to perform traffic filtering.
[0163] In a possible implementation, the first indication information is carried through a reserved field in the BGP prefix SID attribute, an SRv6 service Service SID identifier Flags field, or an SRv6 endpoint behavior Endpoint Behavior field.
[0164] In a possible implementation, the BGP prefix SID attribute includes an SRv6 Service subtype length value Sub-TLV, and the SRv6 Service Sub-TLV is used to carry the first SRv6 SID and the first indication information.
[0165] In a possible implementation, the leaf identifier is a second MPLS label, the at least one route includes an Ethernet automatic discovery route, the Ethernet automatic discovery route includes the second MPLS label, and the second MPLS label is used to perform traffic filtering on unicast traffic.
[0166] In one possible implementation, the leaf identifier is a second SRv6 SID, the at least one route includes an Ethernet Virtual Private Network (EVPN) Ethernet Auto-Discovery route and an EVPN Media Access Control (MAC) advertisement route, the EVPN Ethernet Auto-Discovery route includes a third SRv6 SID, the EVPN MAC advertisement route includes a fourth SRv6 SID, and the third SRv6 SID and the fourth SRv6 SID are used by the second communication device to generate the second SRv6 SID.
[0167] In a possible implementation, the SID type of the second SRv6 SID is End.DT2U combined with Arg.FE2.
[0168] In a possible implementation, the leaf identifier is used to perform traffic filtering on traffic corresponding to a first Ethernet virtual private network (EVPN) instance, and the first communication device is deployed with the first EVPN instance.
[0169] In a possible implementation, the leaf identifier is also used to identify the first EVPN instance.
[0170] In one possible implementation, the receiving unit is further used to receive a second UMR associated with a second EVPN instance announced by a third communication device, the second UMR including second indication information, the second indication information indicating that the second UMR has a leaf attribute, the second UMR having a leaf attribute, indicating that all access side interfaces associated with the second EVPN of the third communication device are leaf interfaces, and the third communication device is deployed with the second EVPN instance; the processing unit is further used to obtain the second UMR, and generate a default MAC address table entry based on the second UMR, the default MAC address table entry including a leaf attribute identifier and a MAC address of all 0s.
[0171] In a possible implementation, the second route advertisement message includes a second E-tree extended community attribute, and the second E-tree extended community attribute carries the second indication information, wherein a flags field of the second E-tree extended community attribute is used to carry the second indication information, and a bit position thereof is 1.
[0172] In one possible implementation, the receiving unit is further used to receive a second unicast message through the first access side interface with a leaf attribute of the second communication device; the processing unit is further used to discard the second unicast message in response to the destination MAC address of the second unicast message matching the default MAC address table entry.
[0173] In a possible implementation manner, the processing unit is further configured to add third indication information to the first communication device according to the second indication information, where the third indication information indicates traffic filtering.
[0174] In one possible implementation, the receiving unit is further used to receive a second message through a second access side interface with a leaf attribute of the second communication device, where the second message is a broadcast message or a multicast message; the processing unit is further used to discard the second message according to the third indication information when the second message matches the forwarding table entry arriving at the first communication device.
[0175] In a ninth aspect, an embodiment of the present application provides a communication device, characterized in that it includes: a processor and a memory;
[0176] The memory is used to store instructions; the processor is used to execute the instructions, so that the communication device performs the method described in any one of the first aspects above, or the communication device performs the method described in any one of the second aspects above, or the communication device performs the method described in any one of the third aspects above, or the communication device performs the method described in any one of the fourth aspects above.
[0177] In the tenth aspect, an embodiment of the present application provides a computer-readable storage medium, including instructions or computer programs. When the instructions or computer programs are run on a processor, they implement the method described in any one of the first aspects above, or implement the method described in any one of the second aspects above, or implement the method described in any one of the third aspects above, or implement the method described in any one of the fourth aspects above.
[0178] In the eleventh aspect, an embodiment of the present application provides a computer program product, including a computer program product, which, when running on a processor, implements the method described in any one of the first aspect above, or implements the method described in any one of the second aspect above, or implements the method described in any one of the third aspect above, or implements the method described in any one of the fourth aspect above.
[0179] In the twelfth aspect, an embodiment of the present application provides a communication system, which includes: a first communication device that executes the method described in any one of the above first methods and / or executes the method described in any one of the above third methods, and a second communication device that executes the method described in any one of the above second methods and / or executes the method described in any one of the above fourth methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0180] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0181] FIG1a is a schematic diagram of an example application scenario provided by an embodiment of the present application;
[0182] FIG1b is a schematic diagram of another exemplary application scenario provided by an embodiment of the present application;
[0183] FIG1c is a schematic diagram of another exemplary application scenario provided in an embodiment of the present application;
[0184] FIG2a is a signaling interaction diagram of a route advertisement method provided in an embodiment of the present application;
[0185] FIG2 b is a schematic diagram of the structure of a UMR E-tree extended community attribute provided in an embodiment of the present application;
[0186] FIG2c is a signaling interaction diagram of a traffic filtering method provided in an embodiment of the present application;
[0187] FIG2d is a signaling interaction diagram of another route advertisement method provided in an embodiment of the present application;
[0188] FIG2e is a signaling interaction diagram of another traffic filtering method provided in an embodiment of the present application;
[0189] FIG2f is a signaling interaction diagram of another route advertisement method provided in an embodiment of the present application;
[0190] FIG2g is a schematic diagram of the structure of an SRv6 L2 service TLV provided in an embodiment of the present application;
[0191] FIG2h is a signaling interaction diagram of another traffic filtering method provided in an embodiment of the present application;
[0192] FIG2i is a signaling interaction diagram of another route advertisement method provided in an embodiment of the present application;
[0193] FIG2j is a signaling interaction diagram of another traffic filtering method provided in an embodiment of the present application;
[0194] FIG2k is a flow chart of another routing advertisement method provided in an embodiment of the present application;
[0195] FIG3a is a flow chart of a flow filtering method provided in an embodiment of the present application;
[0196] FIG3 b is a flow chart of another flow filtering method provided in an embodiment of the present application;
[0197] FIG3c is a flow chart of a routing advertisement method provided in an embodiment of the present application;
[0198] FIG3 d is a flow chart of another routing advertisement method provided in an embodiment of the present application;
[0199] FIG4a is a schematic structural diagram of a communication device provided in an embodiment of the present application;
[0200] FIG4b is a schematic structural diagram of another communication device provided in an embodiment of the present application;
[0201] FIG4c is a schematic structural diagram of another communication device provided in an embodiment of the present application;
[0202] FIG5 is a schematic structural diagram of a communication device provided in an embodiment of the present application;
[0203] FIG6 is a schematic structural diagram of another communication device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0204] The embodiments of the present application provide a traffic filtering method, a route announcement method, and an apparatus, which can implement traffic filtering, especially traffic filtering for unicast traffic.
[0205] For ease of understanding, the possible application scenarios of the embodiments of the present application are first introduced.
[0206] See Figure 1a, which is a schematic diagram of an example application scenario provided in an embodiment of the present application.
[0207] Customer edge devices (CE) 1 and CE6 are connected to provider edge device (PE) 1, respectively. PE1 is connected to PE2 and PE3, respectively. CE2 and CE4 are connected to PE2, respectively. CE3 and CE5 are connected to PE3, respectively. In one example, traffic filtering is required between the three CEs: CE2, CE3, and CE6. The requirement for traffic filtering between the three CEs: CE2, CE3, and CE6, means that traffic filtering is required between any two of these three CEs. In a specific example, PE1, PE2, and PE3 can be deployed with EVPN instance 1. The access-side interface between PE1 and CE1, the access-side interface between PE1 and CE6, the access-side interface between PE2 and CE2, the access-side interface between PE2 and CE4, the access-side interface between PE3 and CE3, and the access-side interface between PE3 and CE5 are all interfaces associated with the aforementioned EVPN instance 1.
[0208] In one example, to implement traffic filtering between CE2, CE3, and CE6, the EVPN E-Tree function may be enabled on the aforementioned PE1, PE2, and PE3.
[0209] The EVPN E-Tree function implements traffic filtering by setting root or leaf attributes for interfaces on the access side of network devices. Specifically, interfaces with leaf attributes can only send traffic to and from interfaces with root attributes, and traffic between leaf attribute interfaces is mutually filtered. Interfaces with root attributes can communicate with other interfaces with root attributes, as well as with interfaces with leaf attributes. In the embodiments of the present application, interfaces with leaf attributes are referred to as leaf interfaces, and interfaces with root attributes are referred to as root interfaces.
[0210] In the scenario shown in Figure 1a, the interface between PE1 and CE1 can be set as the root interface, the interface between PE1 and CE6 can be set as a leaf interface, the interface between PE2 and CE4 can be set as the root interface, the interface between PE2 and CE2 can be set as a leaf interface, the interface between PE3 and CE5 can be set as the root interface, and the interface between PE3 and CE3 can be set as a leaf interface. This implements traffic filtering between CE2, CE3, and CE6.
[0211] Using EVPN E-Tree, unicast traffic filtering and BUM traffic filtering can be implemented. The standard protocol corresponding to EVPN E-Tree defines an E-Tree extended community attribute. The E-Tree extended community attribute mainly includes the Leaf label and the flags field, where the flags field has a total of 8 bits, the first 7 bits are 0, and the last bit is the L flag bit. The L flag bit is used to identify the EVPN MAC route whether it comes from the leaf interface. If the MAC address carried in the MAC route comes from the interface of the leaf attribute, the L flag bit of the flags field is set to 1. The extended community attribute can be carried by EVPN's Ethernet automatic discovery route in the EVPN network, or it can be carried by the MAC address announcement route. For the specific structure of the E-Tree extended community attribute, please refer to the relevant description part of the request for comments (RFC) 8317, which will not be described in detail here.
[0212] Next, using traffic filtering between CE6 and CE2 as an example, this article describes how to use EVPN E-Tree to filter unicast and BUM traffic.
[0213] First, the specific implementation method of using EVPN E-Tree to filter unicast traffic is introduced.
[0214] PE1 and PE2 communicate their access-side MAC addresses through MAC routing. After PE1 learns CE6's MAC address 1 through its interface connecting to CE6, because this interface is a leaf interface, PE1 can advertise CE6's MAC address 1 to PE2 using a MAC address advertisement route. This MAC address advertisement route can include the EVPN E-Tree extended community attribute. The leaf tag field of this EVPN E-Tree extended community attribute is set to all 0s, and the L bit of the Flags field is set to 1.
[0215] After receiving the MAC address advertisement route from PE1, PE2 parses the L flag in the flags field of the EVPN E-Tree extended community attribute carried in the MAC address advertisement route. Because the L flag is set to 1, PE2 marks the entry corresponding to MAC address 1 in its local MAC forwarding table. In some examples, the MAC forwarding table is also referred to as the MAC address table entry.
[0216] When PE2 receives traffic destined for CE6 from its leaf interface, it determines based on the marking in its local MAC forwarding table that the traffic needs to be sent to the remote leaf interface and then discards the traffic. This implements filtering of known unicast traffic between leaf interfaces.
[0217] The above-mentioned method of using EVPN E-Tree to implement unicast traffic filtering is applicable to both MPLS-based forwarding network scenarios and SRv6-based forwarding network scenarios.
[0218] Next, we will introduce the specific implementation method of using EVPN E-Tree to filter BUM traffic.
[0219] In MPLS-based network scenarios:
[0220] PE1 can send an Ethernet auto-discovery route to PE2. The ESI attribute value in this Ethernet auto-discovery route is all 0s, and this Ethernet auto-discovery route also carries the EVPN E-Tree extended community attribute. The leaf label field of this EVPN E-Tree extended community attribute is a specific MPLS label value. Here, the leaf label value is MPLS label 1. In addition, the L bit of the flags field in the EVPN E-Tree extended community attribute is set to 0.
[0221] When PE2 receives the Ethernet auto-discovery route from PE1, it determines that the Ethernet auto-discovery route is used to transmit leaf labels because the ESI value is all 0s and the route carries the EVPN E-Tree extended community attribute. PE2 then saves MPLS label 1.
[0222] When PE2 needs to send BUM traffic to PE1 and the traffic comes from the leaf interface of PE2, PE2 will perform MPLS encapsulation on the traffic and encapsulate the MPLS label 1 saved in the previous step before sending it to PE1.
[0223] After PE1 receives the BUM traffic from PE2, it finds that the BUM traffic is encapsulated with the locally assigned MPLS label 1. Therefore, PE1 does not send the BUM traffic to CE6 but only to CE1, thus implementing BUM traffic filtering between leaf interfaces.
[0224] In a network scenario based on SRv6 forwarding:
[0225] PE1 can send an Ethernet auto-discovery route to PE2. The ESI attribute value in this Ethernet auto-discovery route is all 0s, and this route also carries the BGP Prefix-SID attribute. The SRv6 SID1 value in the SRv6 Service Sub-TLV of the BGP Prefix SID attribute carries the filtering argument, which indicates that leaf interface filtering is to be performed on received traffic. PE1 can also send an IMET route to PE2. The IMET route carries the SRv6 SID2 in the BGP Prefix SID attribute.
[0226] After PE2 receives the Ethernet auto-discovery route and the inclusive multicast Ethernet tag route (IMET) route sent by PE1, it can obtain SRv6 SID3 according to SRv6 SID1 and SRv6 SID2, and store the SRv6 SID3.
[0227] When PE2 needs to send BUM traffic to PE1 and the traffic comes from PE2's leaf interface, PE2 encapsulates the traffic with SRv6 and the SRv6 SID3 saved in the previous step before sending it to PE1.
[0228] After PE1 receives the BUM traffic from PE2, it finds that the BUM traffic is encapsulated with SRv6 SID3. Therefore, PE1 does not send the BUM traffic to CE6 but only to CE1, thus implementing BUM traffic filtering between leaf interfaces.
[0229] Although Figure 1a shows only CE1 and CE6 connected to PE1, in practice, the number of CEs connected to PE1 may be significant. In some scenarios, to reduce MAC address learning pressure on PE1, PE1 can advertise an Unified Routing Message (UMR) route to PE2. A UMR is an EVPN MAC route with a MAC address length of 48 characters and containing all zeros. Unlike explicit MAC routes, UMRs guide packet forwarding when no table entry matches the destination MAC address of the packet being forwarded.
[0230] In one example, PE1 can generate and publish a UMR to PE2 and PE3 instead of publishing detailed MAC routes to them, thereby reducing the pressure on PE1 to learn MAC addresses. After receiving the UMR route, PE2 and PE3 generate a default MAC address table to guide forwarding. This, in turn, reduces the pressure on PE2 and PE3 to learn MAC addresses and prevents the MAC capacity of PE2 and PE3 from limiting the number of connected users.
[0231] However, in the scenario where PE1 advertises UMR routes, the traditional EVPN E-Tree cannot filter unicast traffic between CE2, CE3, and CE6.
[0232] Refer to Figure 1b, which is a schematic diagram of another exemplary application scenario provided by an embodiment of the present application. As shown in Figure 1b, in addition to being able to communicate with PE1, PE2 and PE3 can also interact with PE4. PE4 can also publish UMR routes to PE2 and PE3. PE4 is deployed with ENPN instance 2, and the access-side interfaces associated with PE4 and EVPN instance 2 are all leaf interfaces. For ease of understanding, Figure 1b only shows one of the leaf interfaces used to communicate with CE7. Assuming that the access-side interfaces for PE2 to interact with CE2, the access-side interfaces for PE2 to interact with CE4, the access-side interfaces for PE3 to interact with CE3, and the access-side interfaces for PE3 to interact with CE5 are also interfaces associated with the aforementioned EVPN instance 2, then in the scenario shown in Figure 1b, using the traditional EVPN E-Tree, it is impossible to filter the unicast traffic between CE2, CE3, CE6, and CE7.
[0233] See Figure 1c, which is a schematic diagram of another exemplary application scenario provided by an embodiment of the present application. The difference between the scenario shown in Figure 1c and the scenario shown in Figure 1b is that: in the scenario shown in Figure 1c, PE1 is deployed with two EVPN instances, namely EVPN instance 1 and EVPN instance 2. In one example, the interface used by PE1 to interact with CE1 and CE6 is an interface associated with EVPN instance 1, and the interface used by PE1 to interact with CE7 is an interface associated with EVPN instance 2. The access-side interface for PE2 to interact with CE2, the access-side interface for PE2 to interact with CE4, the access-side interface for PE3 to interact with CE3, and the access-side interface for PE3 to interact with CE5 are simultaneously associated with EVPN instance 1 and EVPN instance 2.
[0234] In the scenario shown in Figure 1c, using the traditional EVPN E-Tree, it is impossible to filter the unicast traffic between CE2, CE3, and CE6, nor is it possible to filter the unicast traffic between CE2, CE3, and CE7.
[0235] In order to solve the above problems, an embodiment of the present application provides a traffic filtering method and a route announcement method. Next, the traffic filtering method and the route announcement method provided by the embodiment of the present application are introduced in conjunction with the accompanying drawings.
[0236] The communication devices mentioned in the embodiments of the present application can be network devices such as switches and routers, or can be components of network devices, such as single boards or line cards on network devices, or can be functional modules on network devices, or can be chips used to implement the methods of the present application. The embodiments of the present application do not specifically limit this. Communication devices can be directly connected, for example, but not limited to, via Ethernet cables or optical cables. In a specific example, the communication devices in the embodiments of the present application can be PEs.
[0237] The traffic filtering method and route announcement method provided in the embodiments of the present application can be applied to the application scenarios shown in Figures 1a to 1c. In one example, in the following methods 100 to 800, the communication device 1 can correspond to the PE1 shown in Figure 1a, and the communication device 2 can correspond to the PE2 or PE3 shown in Figure 1a. In another example, in the following methods 100 to 800, the communication device 1 can correspond to the PE1 shown in Figure 1b, and the communication device 2 can correspond to the PE2 or PE3 shown in Figure 1b. In another example, in the following methods 100 to 800, the communication device 1 can correspond to the PE1 shown in Figure 1c, and the communication device 2 can correspond to the PE2 or PE3 shown in Figure 1c. In the embodiment of the present application, after the communication device 2 receives a unicast message from the access side interface, it encapsulates the unicast message as a payload and sends it to the communication device 1. That is, the message received by the communication device 1 from the communication device 2 is a unicast message, which can be understood as the payload part of the message being a unicast message. Correspondingly, after receiving the BUM message from the access side interface, the communication device 2 encapsulates the BUM message as a payload and sends it to the communication device 1. That is to say, the message received by the communication device 1 from the communication device 2 is a BUM message, and it can be understood that the payload part of the message is a BUM message.
[0238] See Figure 2a, which is a signaling interaction diagram of a route announcement method provided in an embodiment of the present application.
[0239] The route advertisement method 100 shown in FIG. 2 a may include the following S101 - S104 .
[0240] S101: Communication device 1 obtains route advertisement message 1, where route advertisement message 1 is used to advertise MAC address advertisement route 1. Route advertisement message 1 includes leaf identifier 1, which is MPLS label 1.
[0241] In one example, the MAC address advertisement route 1 can be used to advertise a MAC specific route. In another example, the MAC address advertisement route 1 is used to advertise UMR 1. In this case, UMR 1 can be a UMR generated by communication device 1 for EVPN instance 1. In this manner, communication device 1 does not need to advertise all MAC specific routes learned through the access-side interface associated with EVPN instance 1 to other communication devices, thereby reducing the MAC address learning burden on communication devices receiving UMR 1 and the MAC routing table capacity requirements of communication devices receiving UMR 1. Furthermore, the number of MAC specific routes transmitted in the network is reduced, which means that the number of routes advertised using BGP is reduced, alleviating the pressure on BGP route advertisements.
[0242] In one example, the route advertisement message 1 may include an extended community attribute 1, which may be used to carry the leaf identifier 1. In a specific example, the extended community attribute 1 may be a newly extended community attribute. When the MAC address advertisement route 1 is used to advertise UMR 1, the newly extended extended community attribute may be called a UMR E-tree extended community attribute.
[0243] In one example, the structure of the UMR E-tree extended community attribute may be as shown in Figure 2b, which is a schematic diagram of the structure of a UMR E-tree extended community attribute provided in an embodiment of the present application. As shown in Figure 2b, the newly extended community attribute includes a type field, a sub-type field, an identifier field, a reserved field, and a UMR leaf label field.
[0244] In one example, the type field and / or subtype field indicates that the extended community attribute is used to carry leaf identifier 1. For example, the type field indicates EVPN service, the subtype field indicates UMR E-tree, and the type field and subtype field together indicate that the extended community attribute is an EVPN UMR E-tree extended community attribute. For another example, the type field is used to indicate that the extended community attribute is a UMR E-tree extended community attribute. In one example, the leaf identifier 1 can be carried by the UMR leaf label field of the extended community attribute.
[0245] In another specific example, the extended community attribute may be E-tree extended community attribute 1. In this case, there is no need to extend a new extended community attribute to carry leaf identifier 1. Instead, a traditional E-tree extended community attribute may be used to carry leaf identifier 1. In one example, leaf identifier 1 may be carried in the leaf label field of E-tree extended community attribute 1.
[0246] In an example, the MAC address advertisement route 1 may further include an MPLS label 2 , where the MPLS label 2 is used to indicate the EVPN instance 1 .
[0247] In an embodiment of the present application, leaf identifier 1 is used to indicate traffic filtering. In a specific example, leaf identifier 1 is used to indicate that traffic filtering is performed on unicast traffic. In another example, leaf identifier 1 can be used to indicate EVPN instance 1 in addition to indicating that traffic filtering is performed on unicast traffic. In this case, leaf identifier 1 can have two semantics: one indicating EVPN instance 1 and the other indicating that traffic filtering is performed on unicast traffic.
[0248] S102: Communication device 1 sends the routing advertisement message 1 to communication device 2.
[0249] S103 : Communication device 2 receives route advertisement message 1 sent by communication device 1 .
[0250] S104: The communication device 2 obtains and saves the leaf identifier 1 according to the routing advertisement message 1.
[0251] After obtaining the route announcement message 1, the communication device 1 can send the route announcement message 1 to the communication device 2. Accordingly, the communication device 2 can receive the route announcement message 1 sent by the communication device 1. After receiving the route announcement message 1 sent by the communication device 1, the communication device 2 can parse the route announcement message 1 to obtain the MAC address announcement route 1 and the leaf identifier 1. After obtaining the MAC address announcement route 1 and the leaf identifier 1, the communication device 2 can save the MAC address announcement route 1 and the leaf identifier 1 accordingly. In a specific example, the communication device 2 can save the MAC address announcement route 1 and the leaf identifier 1 accordingly in the routing table.
[0252] After executing method 100, in the message forwarding phase, communication device 1 and communication device 2 may execute method 200 shown in Figure 2c. Figure 2c is a signaling interaction diagram of a traffic filtering method provided by an embodiment of the present application.
[0253] The traffic filtering method 200 shown in FIG. 2 c may include the following S201 - S205 .
[0254] S201: The communication device 2 receives a service message 1 through the access side interface 1, where the access side interface 1 is a leaf interface and the service message 1 is a unicast message.
[0255] In one example, after the communication device 2 receives the service message 1, it can use the destination MAC address of the service message 1 and the local MAC forwarding table for matching. When the destination MAC address matches the MAC address announced by the aforementioned MAC address announcement route 1, it can further obtain the leaf identifier 1 corresponding to the MAC address announcement route 1 based on the corresponding saved MAC address announcement route 1 and leaf identifier 1, thereby determining that traffic filtering needs to be performed on the service message 1.
[0256] S202: The communication device 2 obtains the service message 2 including the leaf identifier 1 according to the service message 1.
[0257] After determining that traffic filtering needs to be performed on service message 1, communication device 2 may encapsulate service message 1 using leaf identifier 1. In a specific example, communication device 2 may perform MPLS encapsulation on service message 1 using leaf identifier 1, thereby obtaining service message 2 encapsulated using MPLS. A service message encapsulated using MPLS may be referred to as an MPLS message. In other words, service message 2 is an MPLS message.
[0258] In one example, when performing MPLS encapsulation on the service packet 1, the communication device 2 may also encapsulate the aforementioned MPLS label 2, so that the communication device receiving the service packet 2 can determine the EVPN instance 1 based on the MPLS label 2 and further determine how to process the service packet 2 based on the forwarding table entry corresponding to the EVPN instance 1. When the service packet 2 includes both the leaf identifier 1 and the MPLS label 2, the leaf identifier 1 may, for example, be located within the inner layer of the MPLS label 2.
[0259] As mentioned above, in one example, the leaf identifier 1 can also be used to indicate the EVPN instance 1. In this case, when the communication device 2 performs MPLS encapsulation on the service message 1, it is not necessary to encapsulate the aforementioned MPLS label 2.
[0260] S203: Communication device 2 sends service message 2 to communication device 1.
[0261] S204: Communication device 1 receives service message 2 sent by communication device 2.
[0262] S205: The communication device 1 performs traffic filtering on the service message 2 according to the leaf identifier 1 carried in the service message 2.
[0263] After receiving the service message 2, the communication device 2 may further send the service message 2 to the communication device 1. Accordingly, the communication device 1 may receive the service message 2 sent by the communication device 2. The communication device 1 may parse the service message 2 to determine how to process the service message 2.
[0264] In one example, if the service packet 2 includes the aforementioned MPLS label 2, the communication device 1 may first determine EVPN instance 1 based on the MPLS label 2, and further determine the outbound interface for forwarding the service packet 2 based on the forwarding table entry corresponding to the EVPN instance 1. Furthermore, the communication device 1 may determine to perform traffic filtering on the service packet 2 based on the leaf identifier 1. In a specific example, if the outbound interface for forwarding the service packet 2 is a leaf interface, the communication device 1 may discard the service packet 2. In another specific example, if the outbound interface for forwarding the service packet 2 is a root interface, the communication device 1 may forward the service packet 2 through the root interface. In this embodiment of the present application, the communication device 1 forwards the service packet through the outbound interface, which may mean that the communication device 1 performs operations such as decapsulating the service packet before forwarding it through the outbound interface. The service packet mentioned herein may include the service packet 2 mentioned herein, as well as the service packet 4, service packet 6, or service packet 8 mentioned in the following embodiments.
[0265] In another example, if leaf identifier 1 can also be used to indicate EVPN instance 1, communication device 1 can determine EVPN instance 1 based on leaf identifier 1, and further determine the outbound interface for forwarding service packet 2 based on the forwarding table entry corresponding to EVPN instance 1. Furthermore, communication device 1 can also determine to perform traffic filtering on service packet 2 based on leaf identifier 1.
[0266] See Figure 2d, which is a signaling interaction diagram of another route announcement method provided in an embodiment of the present application.
[0267] The routing advertisement method 300 shown in FIG. 2 d may include the following S301 - S304 .
[0268] S301: Communication device 1 obtains route advertisement message 2 and route advertisement message 3, wherein route advertisement message 2 is used to advertise MAC address advertisement route 2, and route advertisement message 3 is used to advertise Ethernet automatic discovery route 1. Route advertisement message 3 includes leaf identifier 2, which is MPLS label 3.
[0269] In one example, the MAC address advertisement route 2 can be used to advertise MAC specific routes. In another example, the MAC address advertisement route 2 is used to advertise UMR 2. In this case, UMR 2 can be a UMR generated by communication device 1 for EVPN instance 1. In this manner, communication device 1 does not need to advertise all MAC specific routes learned through the access-side interface associated with EVPN instance 1 to other communication devices, thereby reducing the MAC address learning burden on communication devices receiving UMR 2 and the MAC routing table capacity requirements of communication devices receiving UMR 2. Furthermore, the number of MAC specific routes transmitted in the network is reduced, that is, the number of routes advertised using BGP is reduced, alleviating the pressure on BGP route advertisements.
[0270] In one example, the route advertisement message 3 may include an extended community attribute 2, which may be used to carry the leaf identifier 2. In a specific example, the extended community attribute 2 may be a newly extended community attribute. When the MAC address advertisement route 2 is used to announce UMR 2, the newly extended extended community attribute may be referred to as a UMR E-tree extended community attribute. For details about the newly extended extended community attribute, please refer to the relevant description in method 100 and will not be repeated here.
[0271] In another specific example, the extended community attribute 2 may be an E-tree extended community attribute 2. In this case, there is no need to extend a new extended community attribute to carry the leaf identifier 2. Instead, a traditional E-tree extended community attribute may be used to carry the leaf identifier 2. In one example, the leaf identifier 2 may be carried in the leaf label field of the E-tree extended community attribute 2.
[0272] In an example, the MAC address advertisement route 2 includes an MPLS label 4 , and the MPLS label 4 is used to indicate the EVPN instance 1 .
[0273] In the embodiment of the present application, the leaf identifier 2 is used to indicate traffic filtering. In a specific example, the leaf identifier 2 is used to indicate that traffic filtering is performed on unicast traffic.
[0274] S302: Communication device 1 sends the route advertisement message 2 and the route advertisement message 3 to communication device 2.
[0275] S303 : Communication device 2 receives route advertisement message 2 and route advertisement message 3 sent by communication device 1 .
[0276] S304: The communication device 2 obtains and saves the leaf identifier 2 according to the routing advertisement message 3.
[0277] After communication device 1 obtains route advertisement message 2 and route advertisement message 3, it can send route advertisement message 2 and route advertisement message 3 to communication device 2. Correspondingly, communication device 2 can receive route advertisement message 2 and route advertisement message 3 sent by communication device 1. After communication device 2 receives route advertisement message 2 sent by communication device 1, it can parse route advertisement message 2 to obtain MAC address advertisement route 2, and further save MAC address advertisement route 2. After communication device 2 receives route advertisement message 3 sent by communication device 1, it can parse route advertisement message 3 to obtain leaf identifier 2, and further save leaf identifier 2.
[0278] After executing method 300, in the message forwarding phase, communication device 1 and communication device 2 may execute method 400 shown in Figure 2e. Figure 2e is a signaling interaction diagram of another traffic filtering method provided by an embodiment of the present application.
[0279] The traffic filtering method 400 shown in FIG. 2 e may include the following S401 - S405 .
[0280] S401: The communication device 2 receives a service message 3 through the access side interface 2, where the access side interface 2 is a leaf interface.
[0281] In an example, the service message 3 is a unicast message.
[0282] In one example, after the communication device 2 receives the service message 3, since the service message 3 is received through a leaf interface, the communication device 2 determines that traffic filtering needs to be performed on the service message 3.
[0283] S402: The communication device 2 obtains the service message 4 including the leaf identifier 2 according to the service message 3.
[0284] After determining that traffic filtering needs to be performed on the service message 3, the communication device 2 can encapsulate the service message 3 using the leaf identifier 2. In a specific example, the communication device 2 can perform MPLS encapsulation on the service message 3 using the leaf identifier 2, thereby obtaining a service message 4 using MPLS encapsulation.
[0285] In one example, when performing MPLS encapsulation on the service packet 3, the communication device 2 may also encapsulate the aforementioned MPLS label 4, so that the communication device receiving the service packet 4 can determine the EVPN instance 1 based on the MPLS label 4 and further determine how to process the service packet 4 based on the forwarding table entry corresponding to the EVPN instance 1. When the service packet 4 includes both the leaf identifier 2 and the MPLS label 4, the leaf identifier 2 may, for example, be located within the inner layer of the MPLS label 4.
[0286] S403: Communication device 2 sends service message 4 to communication device 1.
[0287] S404: Communication device 1 receives service message 4 sent by communication device 2.
[0288] S405 : The communication device 1 performs traffic filtering on the service message 4 according to the leaf identifier 2 carried in the service message 4 .
[0289] After receiving the service message 4, the communication device 2 may further send the service message 4 to the communication device 1. Accordingly, the communication device 1 may receive the service message 4 sent by the communication device 2. The communication device 1 may parse the service message 4 to determine how to process the service message 4.
[0290] In one example, if the service packet 4 includes the aforementioned MPLS label 4, the communication device 1 may first determine the EVPN instance 1 based on the MPLS label 4, and further determine the outbound interface for forwarding the service packet 4 based on the forwarding table entry corresponding to the EVPN instance 1. Furthermore, the communication device 1 may determine to perform traffic filtering on the service packet 4 based on the leaf identifier 2. In a specific example, if the outbound interface for forwarding the service packet 4 is a leaf interface, the communication device 1 may discard the service packet 4. In another specific example, if the outbound interface for forwarding the service packet 4 is a root interface, the communication device 1 may forward the service packet 4 through the outbound interface.
[0291] See Figure 2f, which is a signaling interaction diagram of another route announcement method provided in an embodiment of the present application.
[0292] The routing advertisement method 500 shown in FIG. 2f may include the following S501 - S504 .
[0293] S501: The communication device 1 obtains a route advertisement message 4, where the route advertisement message 4 is used to advertise a MAC address advertisement route 3. The route advertisement message 3 includes a leaf identifier 3, which is an SRv6 SID1.
[0294] In one example, the MAC address advertisement route 3 can be used to advertise MAC specific routes. In another example, the MAC address advertisement route 3 is used to advertise UMR 3. In this case, UMR 3 can be a UMR generated by communication device 1 for EVPN instance 1. In this manner, communication device 1 does not need to advertise all MAC specific routes learned through the access-side interface associated with EVPN instance 1 to other communication devices, thereby reducing the MAC address learning burden on communication devices receiving UMR 3 and the MAC routing table capacity requirements of communication devices receiving UMR 3. Furthermore, the number of MAC specific routes transmitted in the network is reduced, which means that the number of routes advertised using BGP is reduced, alleviating the pressure on BGP route advertisements.
[0295] In one example, the routing advertisement message 4 may include a BGP prefix SID attribute 1, which may be used to carry the leaf identifier 3. In one example, the BGP prefix SID attribute 1 may include an SRv6 Layer 2 service (L2 service) TLV, which may be used to carry the leaf identifier 3.
[0296] See Figure 2g, which is a structural diagram of an SRv6 L2 service TLV provided in an embodiment of the present application.
[0297] As shown in Figure 2g, the SRv6 L2 service TLV includes a TLV type field 201, a TLV length field 202, a reserved field, and an SRv6 service sub TLV field 203. In one example, the SRv6 service sub TLV field 203 can be an SRv6 SID information Sub-TLV. As shown in Figure 2g, the SRv6 SID information Sub-TLV includes the corresponding type field, length field, reserved field, and value field. The value field of the SRv6 service sub TLV field includes: an SRv6 SID value field, an SRv6 Service SID Flags field, an SRv6 Endpoint Behavior field, and a reserved field. In addition, the value field of the SRv6 service sub TLV field may also include an SRv6 service data sub-sub-TLV field. For the meaning of each field in the SRv6 L2 service TLV, please refer to the relevant description in RFC9252, which will not be described in detail here.
[0298] In one example, the SRv6 L2 service TLV may include at least one sub TLV. FIG2g illustrates the SRv6 L2 service TLV including one sub TLV as an example. In a specific example, the SRv6 L2 service TLV may include a sub TLV1, where the sub TLV1 is used to carry the leaf identifier 3. The leaf identifier 3 may be carried, for example, via the SRv6 SID value field of the sub TLV1.
[0299] In an embodiment of the present application, the leaf identifier 3 is used to indicate traffic filtering. In a specific example, the leaf identifier 3 is used to indicate that traffic filtering is performed on unicast traffic. In an example, the BGP prefix SID attribute 1 may also include indication information 1, and the indication information 1 is used to indicate that the leaf identifier 3 is used to indicate traffic filtering. In a specific example, both the indication information 1 and the leaf identifier 3 can be carried by the aforementioned sub TLV1. Among them, the indication information 1 can be carried by the available fields in the sub TLV1. As can be seen from the previous description of the SRv6 L2 service TLV, the reserved field, SRv6 Service SID Flags field and SRv6 Endpoint Behavior field in the sub TLV1 are all available fields. Therefore, in an example, the indication information 1 can be carried by the reserved field, SRv6 Service SID Flags field or SRv6 Endpoint Behavior field in the sub TLV1.
[0300] In a specific example, when the indication information 1 is carried through the reserved field or the SRv6 Service SID Flags field in the sub TLV1, one or more bits in the reserved field or the SRv6 Service SID Flags field can be used to carry the indication information 1. For example, the last bit of the reserved field or the SRv6 Service SID Flags field can be used to carry the indication information 1. When the value of the last bit is 1, it indicates that the indication information 1 is carried in the sub TLV1, and accordingly, it indicates that the leaf identifier 3 carried in the sub TLV1 is used to indicate traffic filtering.
[0301] In another specific example, when the indication information 1 is carried by the SRv6 Endpoint Behavior field in the sub TLV1, the indication information 1 may be embodied as the Endpoint Behavior indicated by the SRv6 Endpoint Behavior field. In a specific example, the Endpoint Behavior indicated by the SRv6 Endpoint Behavior field may be, for example, a newly defined Endpoint Behavior to indicate the indication information 1.
[0302] In one example, in addition to indicating that traffic filtering is performed on unicast traffic, leaf identifier 3 can also be used to indicate EVPN instance 1. In this case, leaf identifier 3 can have two semantics: one indicating EVPN instance 1 and the other indicating that traffic filtering is performed on unicast traffic.
[0303] In an example, the MAC address advertisement route 3 may further include an SRv6 SID2, where the SRv6 SID2 is used to indicate the EVPN instance 1. For example, the aforementioned SRv6 L2 service TLV may further include a sub TLV2, where the sub TLV2 is used to carry the SRv6 SID2.
[0304] S502: Communication device 1 sends the routing advertisement message 3 to communication device 2.
[0305] S503 : Communication device 2 receives the route advertisement message 3 sent by communication device 1 .
[0306] S504: The communication device 2 obtains and saves the leaf identifier 3 according to the routing advertisement message 3.
[0307] After obtaining the route announcement message 3, the communication device 1 can send the route announcement message 3 to the communication device 2. Accordingly, the communication device 2 can receive the route announcement message 3 sent by the communication device 1. After receiving the route announcement message 3 sent by the communication device 1, the communication device 2 can parse the route announcement message 3 to obtain the MAC address announcement route 3 and the leaf identifier 3. After obtaining the MAC address announcement route 3 and the leaf identifier 3, the communication device 2 can save the MAC address announcement route 3 and the leaf identifier 3 accordingly. In a specific example, the communication device 2 can save the MAC address announcement route 3 and the leaf identifier 3 in the routing table accordingly.
[0308] After executing method 500, in the message forwarding phase, communication device 1 and communication device 2 may execute method 600 shown in Figure 2h. Figure 2h is a signaling interaction diagram of another traffic filtering method provided in an embodiment of the present application.
[0309] The traffic filtering method 600 shown in FIG2h may include the following S601-S605.
[0310] S601: The communication device 2 receives a service message 5 through the access side interface 3, where the access side interface 3 is a leaf interface and the service message 5 is a unicast message.
[0311] In one example, after the communication device 2 receives the service message 5, it can use the destination MAC address of the service message 5 and the local MAC forwarding table for matching. When the destination MAC address matches the MAC address announced by the aforementioned MAC address announcement route 3, it can further obtain the leaf identifier 3 corresponding to the MAC address announcement route 3 based on the corresponding saved MAC address announcement route 3 and leaf identifier 3, thereby determining that traffic filtering needs to be performed on the service message 5.
[0312] S602: The communication device 2 obtains the service message 6 including the leaf identifier 3 according to the service message 5.
[0313] After determining that traffic filtering needs to be performed on the service message 5, the communication device 2 may encapsulate the service message 5 using the leaf identifier 3. In a specific example, the communication device 2 may perform SRv6 encapsulation on the service message 5 using the leaf identifier 3, thereby obtaining a service message 6 encapsulated using SRv6. A service message encapsulated using SRv6 can be understood as an SRv6 message. In other words, the service message 6 is an SRv6 message.
[0314] In one example, when performing SRv6 encapsulation on the service message 5, the communication device 2 may also encapsulate the aforementioned SRv6 SID2, so that the communication device receiving the service message 6 can determine the EVPN instance 1 based on the SRv6 SID2, and further determine how to process the service message 6 based on the forwarding table entry corresponding to the EVPN instance 1. In an embodiment of the present application, when performing SRv6 encapsulation on the service message 5, the communication device 2 may encapsulate a segment list for the service message 5, the segment list including the leaf identifier 3 and the SRv6 SID2, and the leaf identifier 3 may be the next segment of the SRv6 SID2 in the segment list.
[0315] As mentioned above, in one example, the leaf identifier 3 may also be used to indicate the EVPN instance 1. In this case, when the communication device 2 performs SRv6 encapsulation on the service message 1, it is not necessary to encapsulate the aforementioned SRv6 SID 2.
[0316] S603: Communication device 2 sends service message 6 to communication device 1.
[0317] S604: Communication device 1 receives service message 6 sent by communication device 2.
[0318] S605: The communication device 1 performs traffic filtering on the service message 6 according to the leaf identifier 3 carried in the service message 6.
[0319] After receiving the service message 6, the communication device 2 may further send the service message 6 to the communication device 1. Accordingly, the communication device 1 may receive the service message 6 sent by the communication device 2. The communication device 1 may parse the service message 6 to determine how to process the service message 6.
[0320] In one example, if the service packet 6 includes the aforementioned SRv6 SID2, the communication device 1 may first determine EVPN instance 1 based on the SRv6 SID2, and further determine the outbound interface for forwarding the service packet 6 based on the forwarding table entry corresponding to the EVPN instance 1. Furthermore, the communication device 1 may determine to perform traffic filtering on the service packet 6 based on the leaf identifier 3. In a specific example, if the outbound interface for forwarding the service packet 6 is a leaf interface, the communication device 1 may discard the service packet 6. In another specific example, if the outbound interface for forwarding the service packet 6 is a root interface, the communication device 1 may forward the service packet 6 through the root interface.
[0321] In another example, if leaf identifier 3 can also be used to indicate EVPN instance 1, communication device 1 can determine EVPN instance 1 based on leaf identifier 3 and further determine the outbound interface for forwarding service packet 6 based on the forwarding table entry corresponding to EVPN instance 1. Furthermore, communication device 1 can also determine to perform traffic filtering on service packet 6 based on leaf identifier 3.
[0322] See Figure 2i, which is a signaling interaction diagram of another route announcement method provided in an embodiment of the present application.
[0323] The routing advertisement method 700 shown in FIG. 2i may include the following S701 - S704 .
[0324] S701: Communication device 1 obtains route announcement message 5 and route announcement message 6, wherein route announcement message 5 is used to announce MAC address announcement route 4, and route announcement message 6 is used to announce Ethernet automatic discovery route 2. Route announcement message 6 includes leaf identifier 4, and leaf identifier 4 is SRv6 SID3. MAC address announcement route 4 includes SRv6 SID4.
[0325] In one example, the MAC address advertisement route 4 can be used to advertise MAC specific routes. In another example, the MAC address advertisement route 4 is used to advertise UMR 4. In this case, UMR 4 can be a UMR generated by communication device 1 for EVPN instance 1. In this manner, communication device 1 does not need to advertise all MAC specific routes learned through the access-side interface associated with EVPN instance 1 to other communication devices, thereby reducing the MAC address learning pressure on communication devices receiving UMR 4 and the MAC routing table capacity requirements of communication devices receiving UMR 4. Furthermore, the number of MAC specific routes transmitted in the network is reduced, that is, the number of routes advertised using BGP is reduced, alleviating the pressure on BGP route advertisements.
[0326] In one example, the routing announcement message 6 may include a BGP prefix SID attribute 2, and the BGP prefix SID attribute 2 may be used to carry the leaf identifier 4. In one example, the BGP prefix SID attribute 2 may include an SRv6 Layer 2 service (L2service) TLV, and the SRv6 L2 service TLV is used to carry the leaf identifier 4. Regarding the specific implementation method of using the BGP prefix SID attribute 2 to carry the leaf identifier 4, please refer to the relevant description of the BGP prefix SID attribute 1 in method 500, or refer to the description of using the BGP prefix SID attribute to carry the SRv6 SID in RFC9252, which will not be repeated here.
[0327] In the embodiment of the present application, the leaf identifier 4 is used to indicate traffic filtering. In a specific example, the leaf identifier 4 is used to indicate that traffic filtering is performed on unicast traffic.
[0328] In an example, the MAC address advertisement route 4 may include an SRv6 SID 4 , where the SRv6 SID 4 is used to indicate the EVPN instance 1 .
[0329] S702: Communication device 1 sends the route advertisement message 5 and the route advertisement message 6 to communication device 2.
[0330] S703 : Communication device 2 receives route advertisement message 5 and route advertisement message 6 sent by communication device 1 .
[0331] S704: The communication device 2 obtains the SRv6 SID4 and the leaf identifier 4, and obtains and stores the SRv6 SID5 obtained according to the SRv6 SID4 and the leaf identifier 4.
[0332] After obtaining the route announcement message 5 and the route announcement message 6 , the communication device 1 may send the route announcement message 5 and the route announcement message 6 to the communication device 2 . Correspondingly, the communication device 2 may receive the route announcement message 5 and the route announcement message 6 sent by the communication device 1 .
[0333] After receiving the route announcement message 5 sent by the communication device 1, the communication device 2 can parse the route announcement message 5 to obtain the MAC address announcement route 4, and further save the MAC address announcement route 4. In addition, the communication device 1 can also parse the MAC address announcement route 4 to obtain the SRv6 SID4 included in the MAC address announcement route 4. After receiving the route announcement message 6 sent by the communication device 1, the communication device 2 can parse the route announcement message 6 to obtain the leaf identifier 4. Further, the communication device 1 can obtain the SRv6 SID5 based on the SRv6 SID4 and the leaf identifier 4. For example, the communication device 1 can perform corresponding calculations on the SRv6 SID4 and the leaf identifier 4 to obtain the SRv6 SID5. The embodiment of the present application does not specifically limit the method for calculating the SRv6 SID4 and the leaf identifier 4. The method for calculating the SRv6 SID4 and the leaf identifier 4 can be determined according to actual conditions. After obtaining the SRv6 SID5, the communication device 1 may store the SRv6 SID5. Similar to the leaf identifier 4, the SRv6 SID5 is also used to indicate traffic filtering. In a specific example, the SRv6 SID5 is used to indicate that traffic filtering is performed on unicast traffic.
[0334] In one example, in addition to indicating that traffic filtering is performed on unicast traffic, SRv6 SID5 can also be used to indicate EVPN instance 1. In this case, SRv6 SID5 can have two semantics: one indicating EVPN instance 1 and the other indicating that traffic filtering is performed on unicast traffic.
[0335] In one example, the SID type of SRv6 SID5 can be End.DT2U combined with Arg.FE2. End.DT2U is used to determine the corresponding forwarding operation, such as looking up the MAC forwarding table to determine the corresponding outbound interface. Arg.FE2 is used to determine whether traffic filtering is required. In a specific example, when the communication device is E-tree-enabled, Arg.FE2 indicates that traffic filtering should be performed on leaf interfaces. For details about Arg.FE2, please refer to RFC9252 for the relevant description; it is not described in detail here.
[0336] After executing method 700, in the message forwarding phase, communication device 1 and communication device 2 may execute method 800 shown in Figure 2j. Figure 2j is a signaling interaction diagram of another traffic filtering method provided in an embodiment of the present application.
[0337] The traffic filtering method 800 shown in FIG. 2 j may include the following S801 - S805 .
[0338] S801: The communication device 2 receives a service message 7 through the access side interface 4, where the access side interface 4 is a leaf interface.
[0339] In an example, the service message 7 is a unicast message.
[0340] In one example, after the communication device 2 receives the service message 7 , since the service message 7 is received through a leaf interface, the communication device 2 determines that traffic filtering needs to be performed on the service message 7 .
[0341] S802: The communication device 2 obtains the service message 8 including the SRv6 SID 5 according to the service message 7.
[0342] After determining that traffic filtering needs to be performed on the service message 7, the communication device 2 can use the SRv6 SID5 to encapsulate the service message 7. In a specific example, the communication device 2 can use the SRv6 SID5 to perform SRv6 encapsulation on the service message 7, thereby obtaining a service message 8 using SRv6 encapsulation.
[0343] S803: Communication device 2 sends service message 8 to communication device 1.
[0344] S804: Communication device 1 receives service message 8 sent by communication device 2.
[0345] S805: The communication device 1 performs traffic filtering on the service message 8 according to the SRv6 SID5 carried in the service message 8.
[0346] After receiving the service message 8, the communication device 2 may further send the service message 8 to the communication device 1. Accordingly, the communication device 1 may receive the service message 8 sent by the communication device 2. The communication device 1 may parse the service message 8 to determine how to process the service message 8.
[0347] In one example, the communication device 1 may first determine EVPN instance 1 based on the SRv6 SID5 in the service message 8, and further determine the outbound interface for forwarding the service message 8 based on the forwarding table entry corresponding to the EVPN instance 1. Furthermore, the communication device 1 may determine to perform traffic filtering on the service message 8 based on the SRv6 SID5. In a specific example, if the outbound interface for forwarding the service message 8 is a leaf interface, the communication device 1 may discard the service message 8. In another specific example, if the outbound interface for forwarding the service message 8 is a root interface, the communication device 1 may forward the service message 8 through the outbound interface.
[0348] Refer to Figure 2k, which is a flow chart of another routing announcement method provided in an embodiment of the present application. The routing announcement method 900 shown in Figure 2k can be applied to the application scenario shown in Figure 1b or Figure 1c. When the routing announcement method 900 is applied to the application scenario shown in Figure 1b, the communication device 1 in the method 900 can correspond to PE4 shown in Figure 1b, and the communication device 2 can correspond to PE2 or PE3 shown in Figure 1b. When the routing announcement method 900 is applied to the application scenario shown in Figure 1c, the communication device 1 in the method 900 can correspond to PE1 shown in Figure 1c, and the communication device 2 can correspond to PE2 or PE3 shown in Figure 1c.
[0349] The routing advertisement method 900 shown in FIG. 2k may include the following S901 - S904 .
[0350] S901: Communication device 1 obtains routing announcement message 7, wherein routing announcement message 7 is used to announce UMR5 associated with EVPN instance 2. Routing announcement message 7 includes indication information 2, and indication information 2 indicates that UMR5 has a leaf attribute. The fact that UMR5 has a leaf attribute indicates that all access-side interfaces associated with EVPN instance 2 of communication device 1 are leaf interfaces.
[0351] In an example, the communication device 1 may obtain the routing advertisement message 7 when determining that all access-side interfaces associated with the EVPN instance 2 are leaf interfaces.
[0352] In one example, the route advertisement message 7 may include an extended community attribute 2, and the extended community attribute 2 is used to carry the indication information 2. The embodiment of the present application does not specifically limit the extended community attribute 2. In one example, the extended community attribute 2 may be the UMR E-tree extended community attribute mentioned in method 100. In another example, the extended community attribute 2 may be an E-tree extended community attribute 2. In this case, the flags field of the E-tree extended community attribute 2 may be set to 1, for example. In one example, the value of the leaf label field of the E-tree extended community attribute 2 is 0. In another example, the value of the leaf label field of the E-tree extended community attribute 2 may not be 0, but may be a specific label value.
[0353] S902: Communication device 1 sends the routing advertisement message 7 to communication device 2.
[0354] S903 : Communication device 2 receives the route advertisement message 7 sent by communication device 1 .
[0355] S904: The communication device 2 obtains the UMR5 and generates a default MAC address table entry according to the UMR5. The default MAC address table entry includes a leaf attribute identifier and a MAC address of all 0s.
[0356] After the communication device 1 obtains the routing advertisement message 7, it can send the routing advertisement message 7 to the communication device 2. Accordingly, the communication device 2 can receive the routing advertisement message 7 sent by the communication device 1. After the communication device 2 receives the routing advertisement message 7 sent by the communication device 1, it can parse the routing advertisement message 7 to obtain the UMR5, and further obtain the default MAC address table entry based on the UMR5. The default MAC address table entry includes a leaf attribute identifier and an all-0 MAC address. In one implementation, the leaf attribute in the default MAC address table entry and the indication information 2 in the UMR5 use the same content, thereby facilitating data management. For example, after receiving the UMR5, the communication device 2 can directly copy the content of the indication information 2 of the UMR5 to the default MAC address table entry as the leaf attribute in the default MAC address table entry, thereby facilitating the rapid generation of the default MAC address table entry.
[0357] After executing method 900, during the message forwarding phase, communication device 2 can receive service message 9 via its access-side interface 5, where the access-side interface 5 is a leaf interface. In one example, the service message 9 is a unicast message. After receiving the service message 9, communication device 2 can match the destination MAC address of the service message 9 with the local MAC forwarding table. If the destination MAC address matches the MAC address carried by the aforementioned UMR 5, communication device 2 can further determine the need to perform traffic filtering on the service message 9 based on the corresponding stored UMR 5 and indication information 2. Accordingly, communication device 2 can discard the service message 9 and no longer forward it, thereby achieving unicast traffic filtering. In this manner, communication device 2 does not need to forward the service message 9 to communication device 1; communication device 2 can perform traffic filtering on the service message 9 itself, thereby saving the network resources required to forward the service message 9 to communication device 1.
[0358] In one example, after receiving the indication information 2, the communication device 2 may add indication information 3 to the communication device 1 based on the indication information 2, where the indication information 3 is used to instruct traffic filtering. In another example, the communication device 2 may store the correspondence between the communication device 1 and the indication information 3. In another example, the communication device 2 may assign the indication information 3 to a forwarding entry in a broadcast forwarding table or a multicast forwarding table that is directed to the communication device 1.
[0359] Correspondingly, in one example, the service message 9 can be a broadcast message. After the communication device 2 receives the service message 9, it determines that the service message 9 is a broadcast message based on the destination MAC address of the service message 9. Furthermore, the communication device 2 can search for a broadcast forwarding table entry. If a forwarding table entry heading to the communication device 1 is found, it is determined that traffic filtering needs to be performed according to the indication information 3, so the communication device 2 can discard the service message 9.
[0360] In one example, the service message 9 can be a multicast message. After the communication device 2 receives the service message 9, it determines that the service message 9 is a multicast message based on the destination MAC address of the service message 9. Furthermore, the communication device 2 can search for the multicast forwarding table entry. If the forwarding table entry heading to the communication device 1 is found, it is determined that traffic filtering needs to be performed according to the indication information 3, so the communication device 2 can discard the service message 9.
[0361] In this way, the communication device 2 does not need to forward the service message 9 to the communication device 1. The communication device 2 itself can perform traffic filtering on the service message 9, thereby saving the network resources required to forward the service message 9 to the communication device 1.
[0362] The embodiment of the present application also provides a traffic filtering method, which can be applied to a first communication device. Referring to Figure 3a, this figure is a flow chart of a traffic filtering method provided by an embodiment of the present application. The traffic filtering method 1000 shown in Figure 3a can be applied to the above methods 100 to 900. The first communication device in method 1000 can correspond to communication device 2 in the above methods 100 to 900, and the second communication device in method 1000 can correspond to communication device 1 in the above methods 100 to 900.
[0363] The method 1000 shown in FIG. 3 a may include the following steps S1001 - S1002 .
[0364] S1001: Receive a unicast message from a second communication device, where the unicast message includes a leaf identifier, and the leaf identifier indicates that the unicast message comes from a leaf interface.
[0365] S1002: Perform traffic filtering on the unicast message according to the leaf identifier.
[0366] In an example, when the method 1000 is applied to the above method 200 , the unicast message may correspond to the service message 2 in the method 200 , and the leaf identifier may correspond to the leaf label 1 in the method 200 .
[0367] In an example, when the method 1000 is applied to the above method 400 , the unicast message may correspond to the service message 4 in the method 400 , and the leaf identifier may correspond to the leaf label 2 in the method 400 .
[0368] In an example, when the method 1000 is applied to the above method 600 , the unicast message may correspond to the service message 6 in the method 600 , and the leaf identifier may correspond to the leaf label 3 in the method 600 .
[0369] In an example, when the method 1000 is applied to the above method 800 , the unicast message may correspond to the service message 8 in the method 800 , and the leaf identifier may correspond to the SRv6 SID5 in the method 800 .
[0370] In a possible implementation, performing traffic filtering on the unicast message according to the leaf identifier includes: in response to determining that an outgoing interface for forwarding the unicast message is a leaf interface, discarding the unicast message.
[0371] In a possible implementation, performing traffic filtering on the unicast message according to the leaf identifier includes: in response to determining that the outgoing interface for forwarding the unicast message is a root interface, forwarding the unicast message through the outgoing interface.
[0372] In a possible implementation manner, the method further includes: notifying at least one route to the second communication device, where the at least one route is used to notify the leaf identifier.
[0373] In one example, when the method 1000 is applied to the above method 100 , the at least one route may correspond to the MAC address advertisement route 1 in the method 100 .
[0374] In one example, when the method 1000 is applied to the above method 300 , the at least one route may correspond to the MAC address advertisement route 2 and the Ethernet automatic discovery route 1 in the method 300 .
[0375] In one example, when the method 1000 is applied to the above method 500 , the at least one route may correspond to the MAC address advertisement route 3 in the method 500 .
[0376] In one example, when the method 1000 is applied to the above method 700 , the at least one route may correspond to the MAC address advertisement route 4 and the Ethernet automatic discovery route 2 in the method 700 .
[0377] In a possible implementation manner, the at least one route includes a first unknown media access control route UMR.
[0378] In an example, when the method 1000 is applied to the above method 100 , the first UMR may correspond to the MAC address advertisement route 1 in the method 100 .
[0379] In an example, when the method 1000 is applied to the above method 300 , the first UMR may correspond to the MAC address advertisement route 2 in the method 300 .
[0380] In an example, when the method 1000 is applied to the above method 500 , the first UMR may correspond to the MAC address advertisement route 3 in the method 500 .
[0381] In an example, when the method 1000 is applied to the above method 700 , the first UMR may correspond to the MAC address advertisement route 4 in the method 700 .
[0382] In a possible implementation manner, the first UMR includes the leaf identifier.
[0383] In one example, when the method 1000 is applied to the above method 100, the first UMR may correspond to MAC address advertisement route 1 in the method 100. In one example, when the method 1000 is applied to the above method 300, the first UMR may correspond to MAC address advertisement route 2 in the method 300.
[0384] In an example, when the method 1000 is applied to the above method 500 , the first UMR may correspond to the MAC address advertisement route 3 in the method 500 .
[0385] In a possible implementation manner, the leaf identifier is a first MPLS label.
[0386] In an example, when the method 1000 is applied to the above method 100 , the first MPLS label may correspond to MPLS label 1 in the method 100 .
[0387] In a possible implementation, the first UMR includes a first Ethernet tree E-tree extended community attribute, and the first E-tree extended community attribute includes the first MPLS label.
[0388] In an example, the first E-tree extended community attribute may correspond to the E-tree extended community attribute 1 in method 100 .
[0389] In a possible implementation, the leaf identifier is a first SRv6 SID.
[0390] In an example, when the method 1000 is applied to the above method 500 , the first UMR may correspond to the MAC address advertisement route 3 in the method 500 , and accordingly, the first SRv6 SID may correspond to the SRv6 SID1 in the method 500 .
[0391] In an example, when the method 1000 is applied to the above method 700 , the first UMR may correspond to the MAC address advertisement route 4 in the method 700 , and accordingly, the first SRv6 SID may correspond to the SRv6 SID5 in the method 700 .
[0392] In a possible implementation, the first UMR includes a Border Gateway Protocol (BGP) prefix SID attribute, and the BGP prefix SID attribute includes the first SRv6 SID.
[0393] In an example, the BGP prefix SID attribute may correspond to BGP prefix SID attribute 1 in method 500 .
[0394] In a possible implementation, the BGP prefix SID attribute further includes first indication information, where the first indication information indicates that the first SRv6 SID is used to perform traffic filtering.
[0395] In an example, the first indication information may correspond to indication information 1 in method 500 .
[0396] In a possible implementation, the first indication information is carried through a reserved field in the BGP prefix SID attribute, an SRv6 service Service SID identifier Flags field, or an SRv6 endpoint behavior Endpoint Behavior field.
[0397] In a possible implementation, the BGP prefix SID attribute includes an SRv6 Service subtype length value Sub-TLV, and the SRv6 Service Sub-TLV is used to carry the first SRv6 SID and the first indication information.
[0398] In a possible implementation, the leaf identifier is a second MPLS label, the at least one route includes an Ethernet automatic discovery route, the Ethernet automatic discovery route includes the second MPLS label, and the second MPLS label is used to perform traffic filtering on unicast traffic.
[0399] In an example, the second MPLS label may correspond to MPLS label 3 in method 300 ; the Ethernet automatic discovery route may correspond to Ethernet automatic discovery route 1 in method 300 .
[0400] In one possible implementation, the leaf identifier is a second SRv6 SID, the at least one route includes an Ethernet Virtual Private Network (EVPN) Ethernet Auto-Discovery route and an EVPN Media Access Control (MAC) advertisement route, the EVPN Ethernet Auto-Discovery route includes a third SRv6 SID, the EVPN MAC advertisement route includes a fourth SRv6 SID, and the third SRv6 SID and the fourth SRv6 SID are used by the second communication device to generate the second SRv6 SID.
[0401] In an example, the second SRv6 SID may correspond to SRv6 SID5 in method 700; the EVPN Ethernet Auto-Discovery route may correspond to Ethernet auto-discovery route 2 in method 700; the EVPN MAC advertisement route may correspond to MAC address advertisement route 4 in method 700; the third SRv6 SID may correspond to SRv6 SID3 in method 700; and the fourth SRv6 SID may correspond to SRv6 SID4 in method 700.
[0402] In a possible implementation, the SID type of the second SRv6 SID is End.DT2U combined with Arg.FE2.
[0403] In a possible implementation, the leaf identifier is used to perform traffic filtering on traffic corresponding to a first Ethernet virtual private network (EVPN) instance, and the first communication device is deployed with the first EVPN instance.
[0404] The first EVPN instance mentioned here may correspond to EVPN instance 1 in the above methods 100 to 900 .
[0405] In a possible implementation, the leaf identifier is also used to identify the first EVPN instance.
[0406] In one possible implementation, the payload portion of the unicast message may be a BUM message. In this case, the leaf identifier may also be used to perform traffic filtering on the BUM traffic. In a specific example, in an MPLS network scenario, if the leaf identifier is announced by the first communication device to the second communication device through EVPN Ethernet automatic discovery routing, the leaf identifier may also be used to perform traffic filtering on the BUM traffic. In this case, the payload portion of the aforementioned unicast message includes a BUM message. In this scenario, the first communication device may receive a broadcast unknown unicast multicast BUM message sent by the second communication device, and the BUM message includes the leaf identifier. After receiving the BUM message, the first communication device may perform traffic filtering on the BUM message based on the leaf identifier.
[0407] In one possible implementation, the method further includes: notifying the second communication device of a second UMR associated with a second EVPN instance, the second UMR including second indication information, the second indication information indicating that the second UMR has a leaf attribute, the second UMR having a leaf attribute, indicating that all access side interfaces associated with the second EVPN of the first communication device are leaf interfaces, and the first communication device is deployed with the second EVPN instance.
[0408] The second EVPN instance may correspond to EVPN instance 2 in method 900 ; the second UMR may correspond to UMR 5 in method 900 ; and the second indication information may correspond to indication information 2 in method 900 .
[0409] In a possible implementation, the second UMR includes a second E-tree extended community attribute, and the second E-tree extended community attribute carries the second indication information, wherein the flags field of the second E-tree extended community attribute is used to carry the second indication information and the bit position is 1.
[0410] In a possible implementation, the value of the leaf tag field in the second E-tree extended community attribute is 0, and the flags field and the leaf tag field jointly carry the second indication information.
[0411] In a possible implementation, the value of the leaf tag field in the second E-tree extended community attribute is a specific tag value that is not 0, and the flags field and the leaf tag field jointly carry the second indication information.
[0412] The second E-tree extended community attribute may correspond to the E-tree extended community attribute 2 in method 900 .
[0413] The embodiment of the present application also provides a traffic filtering method that can be applied to a second communication device. Referring to Figure 3b, this figure is a flow chart of a traffic filtering method provided by an embodiment of the present application. The traffic filtering method 1100 shown in Figure 3b can be applied to the above methods 100 to 900. The first communication device in method 1100 can correspond to communication device 2 in the above methods 100 to 900, and the second communication device in method 1100 can correspond to communication device 1 in the above methods 100 to 900.
[0414] The method 1100 shown in FIG. 3 b may include the following steps S1101 - S1103 .
[0415] S1101: Receive a first message from a leaf interface.
[0416] S1102: Encapsulate a leaf identifier in an outer layer of the first message to obtain a first unicast message, where the leaf identifier indicates that the first unicast message comes from a leaf interface.
[0417] S1103: Send the first unicast message to the first communication device.
[0418] In an example, when the method 1000 is applied to the above method 200, the first message may correspond to message 1 in method 200, the first unicast message may correspond to service message 2 in method 200, and the leaf identifier may correspond to leaf label 1 in method 200.
[0419] In an example, when the method 1000 is applied to the above method 400, the first message may correspond to message 3 in method 400, the first unicast message may correspond to service message 4 in method 400, and the leaf identifier may correspond to leaf label 2 in method 400.
[0420] In an example, when the method 1000 is applied to the above method 600, the first message may correspond to message 5 in method 600, the first unicast message may correspond to service message 6 in method 600, and the leaf identifier may correspond to leaf label 3 in method 600.
[0421] In one example, when the method 1000 is applied to the above method 800, the first message may correspond to message 7 in method 800, the first unicast message may correspond to service message 8 in method 800, and the leaf identifier may correspond to SRv6SID5 in method 800.
[0422] In a possible implementation manner, the method further includes: receiving at least one route sent by the first communication device, where the at least one route is used to advertise the leaf identifier.
[0423] In a possible implementation manner, the at least one route includes a first unknown media access control route UMR.
[0424] In a possible implementation manner, the first UMR includes the leaf identifier.
[0425] In a possible implementation manner, the leaf identifier is a first Multi-Protocol Label Switching (MPLS) label.
[0426] In a possible implementation, the first UMR includes a first Ethernet tree E-tree extended community attribute, and the first E-tree extended community attribute includes the first MPLS label.
[0427] In a possible implementation, the leaf identifier is a first Internet Protocol version 6 segment routing segment identifier SRv6 SID.
[0428] In a possible implementation, the first UMR includes a Border Gateway Protocol (BGP) prefix SID attribute, and the BGP prefix SID attribute includes the first SRv6 SID.
[0429] In a possible implementation, the BGP prefix SID attribute further includes first indication information, where the first indication information indicates that the first SRv6 SID is used to perform traffic filtering.
[0430] In a possible implementation, the first indication information is carried through a reserved field in the BGP prefix SID attribute, an SRv6 service Service SID identifier Flags field, or an SRv6 endpoint behavior Endpoint Behavior field.
[0431] In a possible implementation, the BGP prefix SID attribute includes an SRv6 Service subtype length value Sub-TLV, and the SRv6 Service Sub-TLV is used to carry the first SRv6 SID and the first indication information.
[0432] In a possible implementation, the leaf identifier is a second MPLS label, the at least one route includes an Ethernet automatic discovery route, the Ethernet automatic discovery route includes the second MPLS label, and the second MPLS label is used to perform traffic filtering on unicast traffic.
[0433] In one possible implementation, the leaf identifier is a second SRv6 SID, the at least one route includes an Ethernet Virtual Private Network (EVPN) Ethernet Auto-Discovery route and an EVPN Media Access Control (MAC) advertisement route, the EVPN Ethernet Auto-Discovery route includes a third SRv6 SID, the EVPN MAC advertisement route includes a fourth SRv6 SID, and the third SRv6 SID and the fourth SRv6 SID are used by the second communication device to generate the second SRv6 SID.
[0434] In a possible implementation, the SID type of the second SRv6 SID is End.DT2U combined with Arg.FE2.
[0435] In a possible implementation, the leaf identifier is used to perform traffic filtering on traffic corresponding to a first Ethernet virtual private network (EVPN) instance, and the first communication device is deployed with the first EVPN instance.
[0436] In a possible implementation, the leaf identifier is also used to identify the first EVPN instance.
[0437] In a possible implementation, the first message includes a unicast message or a broadcast unknown unicast multicast (BUM) message.
[0438] In one possible implementation, the method also includes: receiving a second UMR associated with a second EVPN instance announced by a third communication device, the second UMR including second indication information, the second indication information indicating that the second UMR has a leaf attribute, the second UMR having a leaf attribute, indicating that all access side interfaces associated with the second EVPN of the third communication device are leaf interfaces, and the third communication device is deployed with the second EVPN instance; obtaining the second UMR, and generating a default MAC address table entry based on the second UMR, the default MAC address table entry including a leaf attribute identifier and a MAC address of all 0s.
[0439] In a possible implementation, the second route advertisement message includes a second E-tree extended community attribute, and the second E-tree extended community attribute carries the second indication information, wherein a flags field of the second E-tree extended community attribute is used to carry the second indication information, and a bit position thereof is 1.
[0440] In a possible implementation, the value of the leaf tag field in the second E-tree extended community attribute is 0, and the flags field and the leaf tag field jointly carry the second indication information.
[0441] In a possible implementation, the value of the leaf tag field in the second E-tree extended community attribute is a specific tag value that is not 0, and the flags field and the leaf tag field jointly carry the second indication information.
[0442] In one possible implementation, the method further includes: receiving a second unicast message through a first access side interface with a leaf attribute of the second communication device; and discarding the second unicast message in response to the destination MAC address of the second unicast message matching the default MAC address table entry.
[0443] The second unicast message mentioned here may correspond to the service message 9 mentioned in method 900 .
[0444] In a possible implementation manner, the method further includes: adding third indication information to the first communication device according to the second indication information, where the third indication information indicates traffic filtering.
[0445] The second indication information mentioned here may correspond to indication information 2 in method 900 ; the third indication information mentioned here may correspond to indication information 3 in method 900 .
[0446] In one possible implementation, the method also includes: receiving a second message through a second access side interface with a leaf attribute of the second communication device, the second message being a broadcast message or a multicast message; when the second message matches the forwarding entry arriving at the first communication device, discarding the second message according to the third indication information.
[0447] The second message mentioned here may correspond to the service message 9 mentioned in method 900 .
[0448] The embodiment of the present application also provides a routing announcement method, which can be applied to a first communication device. Referring to Figure 3c, this figure is a flow chart of a routing announcement method provided by an embodiment of the present application. The routing announcement method 1200 shown in Figure 3c can be applied to the above methods 100, 300, 500, 700 or 900. The first communication device in method 1200 can correspond to the communication device 2 in the above methods 100, 300, 500, 700 or 900. The second communication device in method 1200 can correspond to the communication device 1 in the above methods 100, 300, 500, 700 or 900.
[0449] The method 1200 shown in FIG. 3 c may include the following S1201 - S1202 .
[0450] S1201: Acquire at least one route, where the at least one route is used to advertise a leaf identifier, where the leaf identifier is used to perform traffic filtering on unicast traffic, and the leaf identifier is a changed MPLS label or an SRv6 SID.
[0451] S1202: Notify the at least one route to the second communication device.
[0452] In a possible implementation manner, the at least one route includes a first unknown media access control route UMR.
[0453] In a possible implementation manner, the first UMR includes the leaf identifier.
[0454] In a possible implementation manner, the leaf identifier is a first Multi-Protocol Label Switching (MPLS) label.
[0455] In a possible implementation, the first UMR includes a first Ethernet tree E-tree extended community attribute, and the first E-tree extended community attribute includes the first MPLS label.
[0456] In a possible implementation, the leaf identifier is a first Internet Protocol version 6 segment routing segment identifier SRv6 SID.
[0457] In a possible implementation, the first UMR includes a Border Gateway Protocol (BGP) prefix SID attribute, and the BGP prefix SID attribute includes the first SRv6 SID.
[0458] In a possible implementation, the BGP prefix SID attribute further includes first indication information, where the first indication information indicates that the first SRv6 SID is used to perform traffic filtering.
[0459] In a possible implementation, the first indication information is carried through a reserved field in the BGP prefix SID attribute, an SRv6 service Service SID identifier Flags field, or an SRv6 endpoint behavior Endpoint Behavior field.
[0460] In a possible implementation, the BGP prefix SID attribute includes an SRv6 Service subtype length value Sub-TLV, and the SRv6 Service Sub-TLV is used to carry the first SRv6 SID and the first indication information.
[0461] In a possible implementation, the leaf identifier is a second MPLS label, the at least one route includes an Ethernet automatic discovery route, the Ethernet automatic discovery route includes the second MPLS label, and the second MPLS label is used to perform traffic filtering on unicast traffic.
[0462] In one possible implementation, the leaf identifier is a second SRv6 SID, the at least one route includes an Ethernet Virtual Private Network (EVPN) Ethernet Auto-Discovery route and an EVPN Media Access Control (MAC) advertisement route, the EVPN Ethernet Auto-Discovery route includes a third SRv6 SID, the EVPN MAC advertisement route includes a fourth SRv6 SID, and the third SRv6 SID and the fourth SRv6 SID are used by the second communication device to generate the second SRv6 SID.
[0463] In a possible implementation, the SID type of the second SRv6 SID is End.DT2U combined with Arg.FE2.
[0464] In a possible implementation, the leaf identifier is used to perform traffic filtering on traffic corresponding to a first Ethernet virtual private network (EVPN) instance, and the first communication device is deployed with the first EVPN instance.
[0465] In a possible implementation, the leaf identifier is also used to identify the first EVPN instance.
[0466] In one possible implementation, the method further includes: notifying the second communication device of a second UMR associated with a second EVPN instance, the second UMR including second indication information, the second indication information indicating that the second UMR has a leaf attribute, the second UMR having a leaf attribute, indicating that all access side interfaces associated with the second EVPN of the first communication device are leaf interfaces, and the first communication device is deployed with the second EVPN instance.
[0467] In a possible implementation, the second UMR includes a second E-tree extended community attribute, and the second E-tree extended community attribute carries the second indication information, wherein the flags field of the second E-tree extended community attribute is used to carry the second indication information and the bit position is 1.
[0468] In a possible implementation, the value of the leaf tag field in the second E-tree extended community attribute is 0, and the flags field and the leaf tag field jointly carry the second indication information.
[0469] In a possible implementation, the value of the leaf tag field in the second E-tree extended community attribute is a specific tag value that is not 0, and the flags field and the leaf tag field jointly carry the second indication information.
[0470] The embodiment of the present application also provides a routing announcement method, which can be applied to a second communication device. Referring to Figure 3d, this figure is a flow chart of another routing announcement method provided by an embodiment of the present application. The routing announcement method 1300 shown in Figure 3d can be applied to the above methods 100, 300, 500, 700 or 900. The first communication device in method 1300 can correspond to the communication device 2 in the above methods 100, 300, 500, 700 or 900. The second communication device in method 1300 can correspond to the communication device 1 in the above methods 100, 300, 500, 700 or 900.
[0471] The method 1300 shown in FIG. 3 d may include the following S1301 - S1302 .
[0472] S1301: Receive at least one route announced by a first communication device, where the at least one route is used to announce a leaf identifier, where the leaf identifier is used to perform traffic filtering on unicast traffic, and the leaf identifier is a Multi-Protocol Label Switching (MPLS) label or an Internet Protocol version 6 Segment Routing Segment Identifier (SRv6) SID.
[0473] S1302: Obtain the leaf identifier.
[0474] In a possible implementation manner, the at least one route includes a first unknown media access control route UMR.
[0475] In a possible implementation manner, the first UMR includes the leaf identifier.
[0476] In a possible implementation manner, the leaf identifier is a first Multi-Protocol Label Switching (MPLS) label.
[0477] In a possible implementation, the first UMR includes a first Ethernet tree E-tree extended community attribute, and the first E-tree extended community attribute includes the first MPLS label.
[0478] In a possible implementation, the leaf identifier is a first Internet Protocol version 6 segment routing segment identifier SRv6 SID.
[0479] In a possible implementation, the first UMR includes a Border Gateway Protocol (BGP) prefix SID attribute, and the BGP prefix SID attribute includes the first SRv6 SID.
[0480] In a possible implementation, the BGP prefix SID attribute further includes first indication information, where the first indication information indicates that the first SRv6 SID is used to perform traffic filtering.
[0481] In a possible implementation, the first indication information is carried through a reserved field in the BGP prefix SID attribute, an SRv6 service Service SID identifier Flags field, or an SRv6 endpoint behavior Endpoint Behavior field.
[0482] In a possible implementation, the BGP prefix SID attribute includes an SRv6 Service subtype length value Sub-TLV, and the SRv6 Service Sub-TLV is used to carry the first SRv6 SID and the first indication information.
[0483] In a possible implementation, the leaf identifier is a second MPLS label, the at least one route includes an Ethernet automatic discovery route, the Ethernet automatic discovery route includes the second MPLS label, and the second MPLS label is used to perform traffic filtering on unicast traffic.
[0484] In one possible implementation, the leaf identifier is a second SRv6 SID, the at least one route includes an Ethernet Virtual Private Network (EVPN) Ethernet Auto-Discovery route and an EVPN Media Access Control (MAC) advertisement route, the EVPN Ethernet Auto-Discovery route includes a third SRv6 SID, the EVPN MAC advertisement route includes a fourth SRv6 SID, and the third SRv6 SID and the fourth SRv6 SID are used by the second communication device to generate the second SRv6 SID.
[0485] In a possible implementation, the SID type of the second SRv6 SID is End.DT2U combined with Arg.FE2.
[0486] In a possible implementation, the leaf identifier is used to perform traffic filtering on traffic corresponding to a first Ethernet virtual private network (EVPN) instance, and the first communication device is deployed with the first EVPN instance.
[0487] In a possible implementation, the leaf identifier is also used to identify the first EVPN instance.
[0488] In one possible implementation, the method also includes: receiving a second UMR associated with a second EVPN instance announced by a third communication device, the second UMR including second indication information, the second indication information indicating that the second UMR has a leaf attribute, the second UMR having a leaf attribute, indicating that all access side interfaces associated with the second EVPN of the third communication device are leaf interfaces, and the third communication device is deployed with the second EVPN instance; obtaining the second UMR, and generating a default MAC address table entry based on the second UMR, the default MAC address table entry including a leaf attribute identifier and a MAC address of all 0s.
[0489] In a possible implementation, the second route advertisement message includes a second E-tree extended community attribute, and the second E-tree extended community attribute carries the second indication information, wherein a flags field of the second E-tree extended community attribute is used to carry the second indication information, and a bit position thereof is 1.
[0490] In one possible implementation, the method further includes: receiving a second unicast message through a first access side interface with a leaf attribute of the second communication device; and discarding the second unicast message in response to the destination MAC address of the second unicast message matching the default MAC address table entry.
[0491] In a possible implementation manner, the method further includes: adding third indication information to the first communication device according to the second indication information, where the third indication information indicates traffic filtering.
[0492] In one possible implementation, the method also includes: receiving a second message through a second access side interface with a leaf attribute of the second communication device, the second message being a broadcast message or a multicast message; when the second message matches the forwarding entry arriving at the first communication device, discarding the second message according to the third indication information.
[0493] See Figure 4a, which is a schematic structural diagram of a communication device provided in an embodiment of the present application.
[0494] The communication device 1400 shown in Figure 4a includes a receiving unit 1401 and a processing unit 1402. The receiving unit 1401 is configured to perform a receiving operation; the processing unit 1402 is configured to perform operations other than receiving and / or sending operations.
[0495] In a specific example, the communication device 1400 can be applied to a first communication device to execute the traffic filtering method performed by the first communication device mentioned in the above method embodiment.
[0496] The receiving unit 1401 is configured to receive a unicast message from a second communication device, where the unicast message includes a leaf identifier, and the leaf identifier indicates that the unicast message comes from a leaf interface.
[0497] The processing unit 1402 is configured to perform traffic filtering on the unicast message according to the leaf identifier.
[0498] In a possible implementation, the processing unit 1402 is configured to: in response to determining that the outgoing interface used to forward the unicast message is a leaf interface, discard the unicast message.
[0499] In a possible implementation, the apparatus further includes: a sending unit, configured to notify at least one route to the second communication apparatus, where the at least one route is used to notify the leaf identifier.
[0500] In a possible implementation manner, the at least one route includes a first unknown media access control route UMR.
[0501] In a possible implementation manner, the first UMR includes the leaf identifier.
[0502] In a possible implementation manner, the leaf identifier is a first Multi-Protocol Label Switching (MPLS) label.
[0503] In a possible implementation, the first UMR includes a first Ethernet tree E-tree extended community attribute, and the first E-tree extended community attribute includes the first MPLS label.
[0504] In a possible implementation, the leaf identifier is a first Internet Protocol version 6 segment routing segment identifier SRv6 SID.
[0505] In a possible implementation, the first UMR includes a Border Gateway Protocol (BGP) prefix SID attribute, and the BGP prefix SID attribute includes the first SRv6 SID.
[0506] In a possible implementation, the BGP prefix SID attribute further includes first indication information, where the first indication information indicates that the first SRv6 SID is used to perform traffic filtering.
[0507] In a possible implementation, the first indication information is carried through a reserved field in the BGP prefix SID attribute, an SRv6 service Service SID identifier Flags field, or an SRv6 endpoint behavior Endpoint Behavior field.
[0508] In a possible implementation, the BGP prefix SID attribute includes an SRv6 Service subtype length value Sub-TLV, and the SRv6 Service Sub-TLV is used to carry the first SRv6 SID and the first indication information.
[0509] In a possible implementation, the leaf identifier is a second MPLS label, the at least one route includes an Ethernet automatic discovery route, the Ethernet automatic discovery route includes the second MPLS label, and the second MPLS label is used to perform traffic filtering on unicast traffic.
[0510] In one possible implementation, the leaf identifier is a second SRv6 SID, the at least one route includes an Ethernet Virtual Private Network (EVPN) Ethernet Auto-Discovery route and an EVPN Media Access Control (MAC) advertisement route, the EVPN Ethernet Auto-Discovery route includes a third SRv6 SID, the EVPN MAC advertisement route includes a fourth SRv6 SID, and the third SRv6 SID and the fourth SRv6 SID are used by the second communication device to generate the second SRv6 SID.
[0511] In a possible implementation, the SID type of the second SRv6 SID is End.DT2U combined with Arg.FE2.
[0512] In a possible implementation, the leaf identifier is used to perform traffic filtering on traffic corresponding to a first Ethernet virtual private network (EVPN) instance, and the first communication device is deployed with the first EVPN instance.
[0513] In a possible implementation, the leaf identifier is also used to identify the first EVPN instance.
[0514] In a possible implementation, the payload of the unicast message is a unicast message or a broadcast unknown unicast multicast (BUM) message.
[0515] In one possible implementation, the device includes a sending unit that is further used to: notify the second communication device of a second UMR associated with a second EVPN instance, the second UMR including second indication information, the second indication information indicating that the second UMR has a leaf attribute, the second UMR has a leaf attribute, indicating that all access side interfaces associated with the second EVPN of the first communication device are leaf interfaces, and the first communication device is deployed with the second EVPN instance.
[0516] In a possible implementation, the second UMR includes a second E-tree extended community attribute, and the second E-tree extended community attribute carries the second indication information, wherein the flags field of the second E-tree extended community attribute is used to carry the second indication information and the bit position is 1.
[0517] In another specific example, the communication device 1400 can be applied to a second communication device to execute the routing advertisement method performed by the second communication device mentioned in the above method embodiment.
[0518] A receiving unit 1401 is configured to receive at least one route announced by a first communication device, where the at least one route is used to announce a leaf identifier, where the leaf identifier is used to perform traffic filtering on unicast traffic, and the leaf identifier is a Multi-Protocol Label Switching (MPLS) label or an Internet Protocol Version 6 (IPv6) Segment Routing Segment Identifier (SRv6 SID);
[0519] The processing unit 1402 is configured to obtain the leaf identifier.
[0520] In a possible implementation manner, the at least one route includes a first unknown media access control route UMR.
[0521] In a possible implementation manner, the first UMR includes the leaf identifier.
[0522] In a possible implementation manner, the leaf identifier is a first Multi-Protocol Label Switching (MPLS) label.
[0523] In a possible implementation, the first UMR includes a first Ethernet tree E-tree extended community attribute, and the first E-tree extended community attribute includes the first MPLS label.
[0524] In a possible implementation, the leaf identifier is a first Internet Protocol version 6 segment routing segment identifier SRv6 SID.
[0525] In a possible implementation, the first UMR includes a Border Gateway Protocol (BGP) prefix SID attribute, and the BGP prefix SID attribute includes the first SRv6 SID.
[0526] In a possible implementation, the BGP prefix SID attribute further includes first indication information, where the first indication information indicates that the first SRv6 SID is used to perform traffic filtering.
[0527] In a possible implementation, the first indication information is carried through a reserved field in the BGP prefix SID attribute, an SRv6 service Service SID identifier Flags field, or an SRv6 endpoint behavior Endpoint Behavior field.
[0528] In a possible implementation, the BGP prefix SID attribute includes an SRv6 Service subtype length value Sub-TLV, and the SRv6 Service Sub-TLV is used to carry the first SRv6 SID and the first indication information.
[0529] In a possible implementation, the leaf identifier is a second MPLS label, the at least one route includes an Ethernet automatic discovery route, the Ethernet automatic discovery route includes the second MPLS label, and the second MPLS label is used to perform traffic filtering on unicast traffic.
[0530] In one possible implementation, the leaf identifier is a second SRv6 SID, the at least one route includes an Ethernet Virtual Private Network (EVPN) Ethernet Auto-Discovery route and an EVPN Media Access Control (MAC) advertisement route, the EVPN Ethernet Auto-Discovery route includes a third SRv6 SID, the EVPN MAC advertisement route includes a fourth SRv6 SID, and the third SRv6 SID and the fourth SRv6 SID are used by the second communication device to generate the second SRv6 SID.
[0531] In a possible implementation, the SID type of the second SRv6 SID is End.DT2U combined with Arg.FE2.
[0532] In a possible implementation, the leaf identifier is used to perform traffic filtering on traffic corresponding to a first Ethernet virtual private network (EVPN) instance, and the first communication device is deployed with the first EVPN instance.
[0533] In a possible implementation, the leaf identifier is also used to identify the first EVPN instance.
[0534] In one possible implementation, the receiving unit 1401 is further used to receive a second UMR associated with a second EVPN instance announced by a third communication device, the second UMR including second indication information, the second indication information indicating that the second UMR has a leaf attribute, the second UMR having a leaf attribute, indicating that all access side interfaces associated with the second EVPN of the third communication device are leaf interfaces, and the third communication device is deployed with the second EVPN instance; the processing unit 1402 is further used to obtain the second UMR, and generate a default MAC address table entry based on the second UMR, the default MAC address table entry including a leaf attribute identifier and a MAC address of all 0s.
[0535] In a possible implementation, the second route advertisement message includes a second E-tree extended community attribute, and the second E-tree extended community attribute carries the second indication information, wherein a flags field of the second E-tree extended community attribute is used to carry the second indication information, and a bit position thereof is 1.
[0536] In one possible implementation, the receiving unit 1401 is further used to receive a second unicast message through the first access side interface with a leaf attribute of the second communication device; the processing unit 1402 is further used to discard the second unicast message in response to the destination MAC address of the second unicast message matching the default MAC address table entry.
[0537] In a possible implementation, the processing unit 1402 is further configured to add third indication information to the first communication device according to the second indication information, where the third indication information indicates traffic filtering.
[0538] In one possible implementation, the receiving unit 1401 is also used to receive a second message through a second access side interface with a leaf attribute of the second communication device, where the second message is a broadcast message or a multicast message; the processing unit 1402 is also used to discard the second message according to the third indication information when the second message matches the forwarding table entry arriving at the first communication device.
[0539] See Figure 4b, which is a structural diagram of another communication device provided in an embodiment of the present application.
[0540] The communication device 1500 shown in Figure 4b includes a processing unit 1501 and a sending unit 1502. The sending unit 1502 is configured to perform a sending operation; and the processing unit 1501 is configured to perform operations other than receiving and / or sending operations.
[0541] In a specific example, the communication device 1500 can be applied to a first communication device to execute the routing advertisement method performed by the first communication device mentioned in the above method embodiment.
[0542] The processing unit 1501 is configured to obtain at least one route, where the at least one route is used to advertise a leaf identifier, where the leaf identifier is used to perform traffic filtering on unicast traffic, and the leaf identifier is a Multi-Protocol Label Switching (MPLS) label or an Internet Protocol version 6 (IPv6) Segment Routing Segment Identifier (SRv6) SID;
[0543] The sending unit 1502 is configured to notify the second communication device of the at least one route.
[0544] In a possible implementation manner, the at least one route includes a first unknown media access control route UMR.
[0545] In a possible implementation manner, the first UMR includes the leaf identifier.
[0546] In a possible implementation manner, the leaf identifier is a first Multi-Protocol Label Switching (MPLS) label.
[0547] In a possible implementation, the first UMR includes a first Ethernet tree E-tree extended community attribute, and the first E-tree extended community attribute includes the first MPLS label.
[0548] In a possible implementation, the leaf identifier is a first Internet Protocol version 6 segment routing segment identifier SRv6 SID.
[0549] In a possible implementation, the first UMR includes a Border Gateway Protocol (BGP) prefix SID attribute, and the BGP prefix SID attribute includes the first SRv6 SID.
[0550] In a possible implementation, the BGP prefix SID attribute further includes first indication information, where the first indication information indicates that the first SRv6 SID is used to perform traffic filtering.
[0551] In a possible implementation, the first indication information is carried through a reserved field in the BGP prefix SID attribute, an SRv6 service Service SID identifier Flags field, or an SRv6 endpoint behavior Endpoint Behavior field.
[0552] In a possible implementation, the BGP prefix SID attribute includes an SRv6 Service subtype length value Sub-TLV, and the SRv6 Service Sub-TLV is used to carry the first SRv6 SID and the first indication information.
[0553] In a possible implementation, the leaf identifier is a second MPLS label, the at least one route includes an Ethernet automatic discovery route, the Ethernet automatic discovery route includes the second MPLS label, and the second MPLS label is used to perform traffic filtering on unicast traffic.
[0554] In one possible implementation, the leaf identifier is a second SRv6 SID, the at least one route includes an Ethernet Virtual Private Network (EVPN) Ethernet Auto-Discovery route and an EVPN Media Access Control (MAC) advertisement route, the EVPN Ethernet Auto-Discovery route includes a third SRv6 SID, the EVPN MAC advertisement route includes a fourth SRv6 SID, and the third SRv6 SID and the fourth SRv6 SID are used by the second communication device to generate the second SRv6 SID.
[0555] In a possible implementation, the SID type of the second SRv6 SID is End.DT2U combined with Arg.FE2.
[0556] In a possible implementation, the leaf identifier is used to perform traffic filtering on traffic corresponding to a first Ethernet virtual private network (EVPN) instance, and the first communication device is deployed with the first EVPN instance.
[0557] In a possible implementation, the leaf identifier is also used to identify the first EVPN instance.
[0558] In one possible implementation, the sending unit 1502 is further used to notify the second communication device of a second UMR associated with the second EVPN instance, where the second UMR includes second indication information, where the second indication information indicates that the second UMR has a leaf attribute, and the second UMR has a leaf attribute, indicating that all access side interfaces associated with the second EVPN of the first communication device are leaf interfaces, and the first communication device is deployed with the second EVPN instance.
[0559] In a possible implementation, the second UMR includes a second E-tree extended community attribute, and the second E-tree extended community attribute carries the second indication information, wherein the flags field of the second E-tree extended community attribute is used to carry the second indication information and the bit position is 1.
[0560] In a possible implementation, the value of the leaf tag field in the second E-tree extended community attribute is 0, and the flags field and the leaf tag field jointly carry the second indication information.
[0561] In a possible implementation, the value of the leaf tag field in the second E-tree extended community attribute is a tag value not equal to 0, and the flags field and the leaf tag field jointly carry the second indication information.
[0562] See Figure 4c, which is a schematic structural diagram of another communication device provided in an embodiment of the present application.
[0563] The communication device 1600 shown in Figure 4c includes a receiving unit 1601, a processing unit 1602, and a sending unit 1603. The receiving unit 1601 is configured to perform a receiving operation, the sending unit 1603 is configured to perform a sending operation, and the processing unit 1602 is configured to perform operations other than receiving and / or sending operations.
[0564] In a specific example, the communication device 1600 can be applied to a second communication device to perform the traffic filtering method performed by the second communication device mentioned in the above method embodiment.
[0565] The receiving unit 1601 is configured to receive a first message from a leaf interface;
[0566] The processing unit 1602 is configured to encapsulate a leaf identifier in an outer layer of the first message to obtain a first unicast message, where the leaf identifier indicates that the first unicast message comes from a leaf interface;
[0567] The sending unit 1603 is configured to send the first unicast message to the first communication device.
[0568] In a possible implementation, the device receiving unit 1601 is further configured to receive at least one route sent by the first communication device, where the at least one route is used to advertise the leaf identifier.
[0569] In a possible implementation manner, the at least one route includes a first unknown media access control route UMR.
[0570] In a possible implementation manner, the first UMR includes the leaf identifier.
[0571] In a possible implementation manner, the leaf identifier is a first Multi-Protocol Label Switching (MPLS) label.
[0572] In a possible implementation, the first UMR includes a first Ethernet tree E-tree extended community attribute, and the first E-tree extended community attribute includes the first MPLS label.
[0573] In a possible implementation, the leaf identifier is a first Internet Protocol version 6 segment routing segment identifier SRv6 SID.
[0574] In a possible implementation, the first UMR includes a Border Gateway Protocol (BGP) prefix SID attribute, and the BGP prefix SID attribute includes the first SRv6 SID.
[0575] In a possible implementation, the BGP prefix SID attribute further includes first indication information, where the first indication information indicates that the first SRv6 SID is used to perform traffic filtering.
[0576] In a possible implementation, the first indication information is carried through a reserved field in the BGP prefix SID attribute, an SRv6 service Service SID identifier Flags field, or an SRv6 endpoint behavior Endpoint Behavior field.
[0577] In a possible implementation, the BGP prefix SID attribute includes an SRv6 Service subtype length value Sub-TLV, and the SRv6 Service Sub-TLV is used to carry the first SRv6 SID and the first indication information.
[0578] In a possible implementation, the leaf identifier is a second MPLS label, the at least one route includes an Ethernet automatic discovery route, the Ethernet automatic discovery route includes the second MPLS label, and the second MPLS label is used to perform traffic filtering on unicast traffic.
[0579] In one possible implementation, the leaf identifier is a second SRv6 SID, the at least one route includes an Ethernet Virtual Private Network (EVPN) Ethernet Auto-Discovery route and an EVPN Media Access Control (MAC) advertisement route, the EVPN Ethernet Auto-Discovery route includes a third SRv6 SID, the EVPN MAC advertisement route includes a fourth SRv6 SID, and the third SRv6 SID and the fourth SRv6 SID are used by the second communication device to generate the second SRv6 SID.
[0580] In a possible implementation, the SID type of the second SRv6 SID is End.DT2U combined with Arg.FE2.
[0581] In a possible implementation, the leaf identifier is used to perform traffic filtering on traffic corresponding to a first Ethernet virtual private network (EVPN) instance, and the first communication device is deployed with the first EVPN instance.
[0582] In a possible implementation, the leaf identifier is also used to identify the first EVPN instance.
[0583] In a possible implementation, the first message includes a unicast message or a broadcast unknown unicast multicast (BUM) message.
[0584] In one possible implementation, the receiving unit 1601 is further used to receive a second UMR associated with a second EVPN instance announced by a third communication device, the second UMR including second indication information, the second indication information indicating that the second UMR has a leaf attribute, the second UMR having a leaf attribute, indicating that all access side interfaces associated with the second EVPN of the third communication device are leaf interfaces, and the third communication device is deployed with the second EVPN instance; the processing unit 1602 is further used to obtain the second UMR, and generate a default MAC address table entry based on the second UMR, the default MAC address table entry including a leaf attribute identifier and a MAC address of all 0s.
[0585] In a possible implementation, the second route advertisement message includes a second E-tree extended community attribute, and the second E-tree extended community attribute carries the second indication information, wherein a flags field of the second E-tree extended community attribute is used to carry the second indication information, and a bit position thereof is 1.
[0586] In a possible implementation, the value of the leaf tag field in the second E-tree extended community attribute is 0, and the flags field and the leaf tag field jointly carry the second indication information.
[0587] In a possible implementation, the value of the leaf tag field in the second E-tree extended community attribute is a tag value not equal to 0, and the flags field and the leaf tag field jointly carry the second indication information.
[0588] In one possible implementation, the receiving unit 1601 is further used to receive a second unicast message through the first access side interface with a leaf attribute of the second communication device; the processing unit 1602 is further used to discard the second unicast message in response to the destination MAC address of the second unicast message matching the default MAC address table entry.
[0589] In a possible implementation, the processing unit 1602 is further configured to add third indication information to the first communication device according to the second indication information, where the third indication information indicates traffic filtering.
[0590] In one possible implementation, the receiving unit 1601 is also used to receive a second message through a second access side interface with a leaf attribute of the second communication device, where the second message is a broadcast message or a multicast message; the processing unit 1602 is also used to discard the second message according to the third indication information when the second message matches the forwarding table entry arriving at the first communication device.
[0591] In addition, an embodiment of the present application further provides a communication device 1700, as shown in Figure 5, which is a schematic structural diagram of a communication device provided in an embodiment of the present application. The communication device 1700 includes a communication interface 1701 and a processor 1702 connected to the communication interface 1701. The communication device 1700 can be used to perform any of the methods 100 to 1300 in the above embodiments.
[0592] In one example, the communication device 1700 can execute the method 100 in the above embodiment. When the communication device 1700 is used to execute the method 100 in the above embodiment, the communication device 1700 is equivalent to the communication device 1 in the method 100. The communication interface 1701 is used to execute the sending and receiving operations performed by the communication device 1 in the method 100. The processor 1702 is used to execute operations other than the sending and receiving operations performed by the communication device 1 in the method 100. For example: the processor 1702 is used to obtain a route announcement message 1, the route announcement message 1 is used to announce a MAC address announcement route 1, the route announcement message 1 includes a leaf label 1, and the leaf label 1 is an MPLS label 1; the communication interface 1701 is used to send the route announcement message 1 to the communication device 2.
[0593] In one example, the communication device 1700 can execute method 100 in the above embodiment. When the communication device 1700 is used to execute method 100 in the above embodiment, the communication device 1700 is equivalent to the communication device 2 in method 100. The communication interface 1701 is used to execute the sending and receiving operations executed by the communication device 2 in method 100. The processor 1702 is used to execute operations other than the sending and receiving operations executed by the communication device 2 in method 100. For example, the communication interface 1701 is used to receive a route advertisement message 1 sent by the communication device 1; the processor 1702 is used to obtain and store the leaf label 1 based on the route advertisement message 1.
[0594] In one example, the communication device 1700 can execute the method 200 in the above embodiment. When the communication device 1700 is used to execute the method 200 in the above embodiment, the communication device 1700 is equivalent to the communication device 2 in the method 200. The communication interface 1701 is used to execute the sending and receiving operations performed by the communication device 2 in the method 200. The processor 1702 is used to execute operations other than the sending and receiving operations performed by the communication device 2 in the method 200. For example: the communication interface 1701 is used to receive the service message 1 through the access side interface 1, the access side interface 1 is a leaf interface, and the service message 1 is a unicast message; the processor 1702 is used to obtain the service message 2 including the leaf label 1 according to the service message 1; the communication interface 1701 is also used to send the service message 2 to the communication device 1.
[0595] In one example, the communication device 1700 can execute method 200 in the above embodiment. When the communication device 1700 is used to execute method 200 in the above embodiment, the communication device 1700 is equivalent to the communication device 1 in method 200. The communication interface 1701 is used to execute the sending and receiving operations performed by the communication device 1 in method 200. The processor 1702 is used to execute operations other than the sending and receiving operations performed by the communication device 1 in method 200. For example, the communication interface 1701 is used to receive service message 2 sent by the communication device 2; the processor 1702 is used to perform traffic filtering on the service message 2 based on the leaf label 1 carried in the service message 2.
[0596] In one example, the communication device 1700 can execute the method 300 in the above embodiment. When the communication device 1700 is used to execute the method 300 in the above embodiment, the communication device 1700 is equivalent to the communication device 1 in the method 300. The communication interface 1701 is used to execute the sending and receiving operations executed by the communication device 1 in the method 300. The processor 1702 is used to execute operations other than the sending and receiving operations executed by the communication device 1 in the method 300. For example: the processor 1702 is used to obtain a route announcement message 2 and a route announcement message 3, wherein the route announcement message 2 is used to announce a MAC address announcement route 2, and the route announcement message 3 is used to announce an Ethernet automatic discovery route 1, and the route announcement message 3 includes a leaf label 2, which is an MPLS label 3; the communication interface 1701 is used to send the route announcement message 2 and the route announcement message 3 to the communication device 2.
[0597] In one example, the communication device 1700 can execute method 300 in the above embodiment. When the communication device 1700 is used to execute method 300 in the above embodiment, the communication device 1700 is equivalent to the communication device 2 in method 300. The communication interface 1701 is used to execute the sending and receiving operations executed by the communication device 2 in method 300. The processor 1702 is used to execute operations other than the sending and receiving operations executed by the communication device 2 in method 300. For example, the communication interface 1701 is used to receive route advertisement message 2 and route advertisement message 3 sent by the communication device 1; the processor 1702 is used to obtain and save the leaf label 2 based on the route advertisement message 3.
[0598] In one example, the communication device 1700 can execute the method 400 in the above embodiment. When the communication device 1700 is used to execute the method 400 in the above embodiment, the communication device 1700 is equivalent to the communication device 2 in the method 400. The communication interface 1701 is used to execute the sending and receiving operations performed by the communication device 2 in the method 400. The processor 1702 is used to execute operations other than the sending and receiving operations performed by the communication device 2 in the method 400. For example: the communication interface 1701 is used to receive the service message 3 through the access side interface 2, and the access side interface 2 is a leaf interface; the processor 1702 is used to obtain the service message 4 including the leaf tag 2 according to the service message 3; the communication interface 1701 is also used to send the service message 4 to the communication device 1.
[0599] In one example, the communication device 1700 can execute method 400 in the above embodiment. When the communication device 1700 is used to execute method 400 in the above embodiment, the communication device 1700 is equivalent to the communication device 1 in method 400. The communication interface 1701 is used to execute the transceiver operations performed by the communication device 1 in method 400. The processor 1702 is used to execute operations other than the transceiver operations performed by the communication device 1 in method 400. For example, the communication interface 1701 is used to receive service message 4 sent by the communication device 2; the processor 1702 is used to perform traffic filtering on the service message 4 based on the leaf label 2 carried in the service message 4.
[0600] In one example, the communication device 1700 can execute the method 500 in the above embodiment. When the communication device 1700 is used to execute the method 500 in the above embodiment, the communication device 1700 is equivalent to the communication device 1 in the method 500. The communication interface 1701 is used to execute the sending and receiving operations executed by the communication device 1 in the method 500. The processor 1702 is used to execute operations other than the sending and receiving operations executed by the communication device 1 in the method 500. For example, the processor 1702 is used to obtain a route advertisement message 4, wherein the route advertisement message 4 is used to announce a MAC address advertisement route 3, and the route advertisement message 3 includes a leaf tag 3, and the leaf tag 3 is SRv6 SID1; the communication interface 1701 is used to send the route advertisement message 3 to the communication device 2.
[0601] In one example, the communication device 1700 can execute method 500 in the above embodiment. When the communication device 1700 is used to execute method 500 in the above embodiment, the communication device 1700 is equivalent to the communication device 2 in method 500. The communication interface 1701 is used to execute the transceiver operations executed by the communication device 2 in method 500. The processor 1702 is used to execute operations other than the transceiver operations executed by the communication device 2 in method 500. For example, the communication interface 1701 is used to receive the route advertisement message 3 sent by the communication device 1; the processor 1702 is used to obtain and store the leaf label 3 based on the route advertisement message 3.
[0602] In one example, the communication device 1700 can execute the method 600 in the above embodiment. When the communication device 1700 is used to execute the method 600 in the above embodiment, the communication device 1700 is equivalent to the communication device 2 in the method 600. The communication interface 1701 is used to execute the sending and receiving operations performed by the communication device 2 in the method 600. The processor 1702 is used to execute operations other than the sending and receiving operations performed by the communication device 2 in the method 600. For example: the communication interface 1701 is used to receive the service message 5 through the access side interface 3, the access side interface 3 is a leaf interface, and the service message 5 is a unicast message; the processor 1702 is used to obtain the service message 6 including the leaf label 3 according to the service message 5; the communication interface 1701 is also used to send the service message 6 to the communication device 1.
[0603] In one example, the communication device 1700 can execute method 600 in the above embodiment. When the communication device 1700 is used to execute method 600 in the above embodiment, the communication device 1700 is equivalent to the communication device 1 in method 600. The communication interface 1701 is used to execute the transceiver operations performed by the communication device 1 in method 600. The processor 1702 is used to execute operations other than the transceiver operations performed by the communication device 1 in method 600. For example, the communication interface 1701 is used to receive service message 6 sent by the communication device 2; the processor 1702 is used to perform traffic filtering on the service message 6 based on the leaf label 3 carried in the service message 6.
[0604] In one example, the communication device 1700 can execute the method 700 in the above embodiment. When the communication device 1700 is used to execute the method 700 in the above embodiment, the communication device 1700 is equivalent to the communication device 1 in the method 700. The communication interface 1701 is used to execute the sending and receiving operations executed by the communication device 1 in the method 700. The processor 1702 is used to execute operations other than the sending and receiving operations executed by the communication device 1 in the method 700. For example, the processor 1702 is used to obtain a route advertisement message 5 and a route advertisement message 6, wherein the route advertisement message 5 is used to advertise MAC address advertisement route 4, the MAC address advertisement route 4 includes SRv6 SID 4, and the route advertisement message 6 is used to advertise Ethernet auto-discovery route 2, the route advertisement message 6 includes leaf label 4, and the leaf label 4 is SRv6 SID 3; and the communication interface 1701 is used to send the route advertisement message 5 and the route advertisement message 6 to the communication device 2.
[0605] In one example, the communication device 1700 can execute the method 700 in the above embodiment. When the communication device 1700 is used to execute the method 700 in the above embodiment, the communication device 1700 is equivalent to the communication device 2 in the method 700. The communication interface 1701 is used to execute the sending and receiving operations executed by the communication device 2 in the method 700. The processor 1702 is used to execute operations other than the sending and receiving operations executed by the communication device 2 in the method 700. For example, the communication interface 1701 is used to receive the route advertisement message 5 and the route advertisement message 6 sent by the communication device 1; the processor 1702 is used to obtain the SRv6 SID 4 and the leaf label 4, and obtain and store the SRv6 SID 5 obtained based on the SRv6 SID 4 and the leaf label 4.
[0606] In one example, the communication device 1700 can execute the method 800 in the above embodiment. When the communication device 1700 is used to execute the method 800 in the above embodiment, the communication device 1700 is equivalent to the communication device 2 in the method 800. The communication interface 1701 is used to execute the sending and receiving operations performed by the communication device 2 in the method 800. The processor 1702 is used to execute operations other than the sending and receiving operations performed by the communication device 2 in the method 800. For example: the communication interface 1701 is used to receive the service message 7 through the access side interface 4, and the access side interface 4 is a leaf interface; the processor 1702 is used to obtain the service message 8 including the SRv6 SID 5 based on the service message 7; the communication interface 1701 is also used to send the service message 8 to the communication device 1.
[0607] In one example, the communication device 1700 can execute method 800 in the above embodiment. When the communication device 1700 is used to execute method 800 in the above embodiment, the communication device 1700 is equivalent to the communication device 1 in method 800. The communication interface 1701 is used to execute the transceiver operations executed by the communication device 1 in method 800. The processor 1702 is used to execute operations other than the transceiver operations executed by the communication device 1 in method 800. For example, the communication interface 1701 is used to receive service message 8 sent by the communication device 2; the processor 1702 is used to perform traffic filtering on the service message 8 based on the SRv6 SID 5 carried in the service message 8.
[0608] In one example, the communication device 1700 can perform method 900 in the above embodiment. When the communication device 1700 is used to perform method 900 in the above embodiment, the communication device 1700 is equivalent to the communication device 1 in method 900. The communication interface 1701 is used to perform the sending and receiving operations performed by the communication device 1 in method 900. The processor 1702 is used to perform operations other than the sending and receiving operations performed by the communication device 1 in method 900. For example, the processor 1702 is used to obtain a route advertisement message 7, which is used to advertise a UMR 5 associated with EVPN instance 2. The route advertisement message 7 includes indication information 2, which indicates that the UMR 5 has a leaf attribute. The presence of the leaf attribute on the UMR 5 indicates that all access-side interfaces associated with the EVPN instance 2 of the communication device 1 are leaf interfaces. The communication interface 1701 is used to send the route advertisement message 7 to the communication device 2.
[0609] In one example, the communication device 1700 can execute the method 900 in the above embodiment. When the communication device 1700 is used to execute the method 900 in the above embodiment, the communication device 1700 is equivalent to the communication device 2 in the method 900. The communication interface 1701 is used to execute the sending and receiving operations executed by the communication device 2 in the method 900. The processor 1702 is used to execute operations other than the sending and receiving operations executed by the communication device 2 in the method 900. For example: the communication interface 1701 is used to receive the route advertisement message 7 sent by the communication device 1; the processor 1702 is used to obtain the UMR5 and generate a default MAC address table entry based on the UMR5, wherein the default MAC address table entry includes a leaf attribute identifier and a MAC address of all 0s.
[0610] In one example, the communication device 1700 can execute the method 1000 in the above embodiment. When the communication device 1700 is used to execute the method 1000 in the above embodiment, the communication device 1700 is equivalent to the first communication device in the method 1000. The communication interface 1701 is used to execute the sending and receiving operations performed by the first communication device in the method 1000. The processor 1702 is used to execute operations other than the sending and receiving operations performed by the first communication device in the method 1000. For example: the communication interface 1701 is used to receive a unicast message sent by the second communication device, the unicast message including a leaf identifier; the processor 1702 is used to perform traffic filtering on the unicast message based on the leaf identifier.
[0611] In one example, the communication device 1700 can execute the method 1100 in the above embodiment. When the communication device 1700 is used to execute the method 1100 in the above embodiment, the communication device 1700 is equivalent to the second communication device in the method 1100. The communication interface 1701 is used to execute the transceiver operations performed by the second communication device in the method 1100. The processor 1702 is used to execute operations other than the transceiver operations performed by the second communication device in the method 1100. For example, the processor 1702 is used to obtain a first unicast message, where the first unicast message includes a leaf identifier; and the communication interface 1701 is used to send the first unicast message to the first communication device.
[0612] In one example, the communication device 1700 can execute the method 1200 in the above embodiment. When the communication device 1700 is used to execute the method 1200 in the above embodiment, the communication device 1700 is equivalent to the first communication device in the method 1200. The communication interface 1701 is used to execute the sending and receiving operations performed by the first communication device in the method 1200. The processor 1702 is used to execute operations other than the sending and receiving operations performed by the first communication device in the method 1200. For example: the processor 1702 is used to obtain at least one route, the at least one route is used to announce a leaf identifier, the leaf identifier is used to perform traffic filtering on unicast traffic, and the leaf identifier is a changed MPLS label or an SRv6 SID; the communication interface 1701 is used to announce the at least one route to the second communication device.
[0613] In one example, the communication device 1700 can execute the method 1300 in the above embodiment. When the communication device 1700 is used to execute the method 1300 in the above embodiment, the communication device 1700 is equivalent to the second communication device in the method 1300. The communication interface 1701 is used to execute the sending and receiving operations performed by the second communication device in the method 1300. The processor 1702 is used to execute operations other than the sending and receiving operations performed by the second communication device in the method 1300. For example: the communication interface 1701 is used to receive at least one route announced by the first communication device, the at least one route is used to announce a leaf identifier, the leaf identifier is used to perform traffic filtering on unicast traffic, and the leaf identifier is a Multi-Protocol Label Switching (MPLS) label or an Internet Protocol version 6 Segment Routing Segment Identifier (SRv6 SID); the processor 1702 is used to obtain the leaf identifier.
[0614] In addition, the present invention also provides a communication device 1800, as shown in Figure 6, which is a schematic diagram of the structure of another communication device provided in the present invention. The communication device 1800 can be used to perform any one of the methods 100 to 1300 in the above embodiments.
[0615] As shown in Figure 6, the communication device 1800 may include a processor 1810, a memory 1820 coupled to the processor 1810, and a transceiver 1830. The transceiver 1830 may be, for example, a communication interface, an optical module, etc. The processor 1810 may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and an NP. The processor may also be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. The processor 1810 may be a single processor or may include multiple processors. Memory 1820 may include volatile memory, such as random-access memory (RAM); non-volatile memory, such as read-only memory (ROM), flash memory, a hard disk drive (HDD), or a solid-state drive (SSD); or a combination of these types of memory. Memory 1820 may be a single memory or may include multiple memories. In one embodiment, memory 1820 stores computer-readable instructions, which include multiple software modules, such as a sending module 1821, a processing module 1822, and a receiving module 1823. After executing each software module, processor 1810 may perform corresponding operations according to the instructions of each software module. In this embodiment, the operations performed by a software module actually refer to the operations performed by processor 1810 according to the instructions of the software module.
[0616] In one example, the communication device 1800 can execute the method 100 in the above embodiment. When the communication device 1800 is used to execute the method 100 in the above embodiment, the communication device 1800 is equivalent to the communication device 1 in the method 100. The transceiver 1830 is used to execute the transceiver operations executed by the communication device 1 in the method 100. The processor 1810 is used to execute operations other than the transceiver operations executed by the communication device 1 in the method 100. For example, the processor 1810 is used to obtain a route advertisement message 1, wherein the route advertisement message 1 is used to announce a MAC address advertisement route 1, and the route advertisement message 1 includes a leaf label 1, which is an MPLS label 1; and the transceiver 1830 is used to send the route advertisement message 1 to the communication device 2.
[0617] In one example, the communication device 1800 can perform method 100 in the above embodiment. When the communication device 1800 is used to perform method 100 in the above embodiment, the communication device 1800 is equivalent to the communication device 2 in method 100. The transceiver 1830 is used to perform the transceiver operations performed by the communication device 2 in method 100. The processor 1810 is used to perform operations other than the transceiver operations performed by the communication device 2 in method 100. For example, the transceiver 1830 is used to receive the route advertisement message 1 sent by the communication device 1; the processor 1810 is used to obtain and store the leaf label 1 based on the route advertisement message 1.
[0618] In one example, the communication device 1800 can execute the method 200 in the above embodiment. When the communication device 1800 is used to execute the method 200 in the above embodiment, the communication device 1800 is equivalent to the communication device 2 in the method 200. The transceiver 1830 is used to execute the transceiver operation executed by the communication device 2 in the method 200. The processor 1810 is used to execute operations other than the transceiver operation executed by the communication device 2 in the method 200. For example: the transceiver 1830 is used to receive the service message 1 through the access side interface 1, the access side interface 1 is a leaf interface, and the service message 1 is a unicast message; the processor 1810 is used to obtain the service message 2 including the leaf label 1 according to the service message 1; the transceiver 1830 is also used to send the service message 2 to the communication device 1.
[0619] In one example, the communication device 1800 can execute method 200 in the above embodiment. When the communication device 1800 is used to execute method 200 in the above embodiment, the communication device 1800 is equivalent to the communication device 1 in method 200. The transceiver 1830 is used to execute the transceiver operations executed by the communication device 1 in method 200. The processor 1810 is used to execute operations other than the transceiver operations executed by the communication device 1 in method 200. For example, the transceiver 1830 is used to receive service message 2 sent by the communication device 2; the processor 1810 is used to perform traffic filtering on the service message 2 based on the leaf label 1 carried in the service message 2.
[0620] In one example, the communication device 1800 can execute the method 300 in the above embodiment. When the communication device 1800 is used to execute the method 300 in the above embodiment, the communication device 1800 is equivalent to the communication device 1 in the method 300. The transceiver 1830 is used to execute the transceiver operations executed by the communication device 1 in the method 300. The processor 1810 is used to execute operations other than the transceiver operations executed by the communication device 1 in the method 300. For example, the processor 1810 is used to obtain a route advertisement message 2 and a route advertisement message 3, wherein the route advertisement message 2 is used to announce a MAC address advertisement route 2, and the route advertisement message 3 is used to announce an Ethernet auto-discovery route 1, and the route advertisement message 3 includes a leaf label 2, which is an MPLS label 3; and the transceiver 1830 is used to send the route advertisement message 2 and the route advertisement message 3 to the communication device 2.
[0621] In one example, the communication device 1800 can execute method 300 in the above embodiment. When the communication device 1800 is used to execute method 300 in the above embodiment, the communication device 1800 is equivalent to the communication device 2 in method 300. The transceiver 1830 is used to execute the transceiver operations executed by the communication device 2 in method 300. The processor 1810 is used to execute operations other than the transceiver operations executed by the communication device 2 in method 300. For example, the transceiver 1830 is used to receive route advertisement message 2 and route advertisement message 3 sent by the communication device 1; the processor 1810 is used to obtain and store the leaf label 2 based on the route advertisement message 3.
[0622] In one example, the communication device 1800 can execute the method 400 in the above embodiment. When the communication device 1800 is used to execute the method 400 in the above embodiment, the communication device 1800 is equivalent to the communication device 2 in the method 400. The transceiver 1830 is used to execute the transceiver operation executed by the communication device 2 in the method 400. The processor 1810 is used to execute operations other than the transceiver operation executed by the communication device 2 in the method 400. For example: the transceiver 1830 is used to receive the service message 3 through the access side interface 2, and the access side interface 2 is a leaf interface; the processor 1810 is used to obtain the service message 4 including the leaf tag 2 according to the service message 3; the transceiver 1830 is also used to send the service message 4 to the communication device 1.
[0623] In one example, the communication device 1800 can execute method 400 in the above embodiment. When the communication device 1800 is used to execute method 400 in the above embodiment, the communication device 1800 is equivalent to the communication device 1 in method 400. The transceiver 1830 is used to execute the transceiver operations executed by the communication device 1 in method 400. The processor 1810 is used to execute operations other than the transceiver operations executed by the communication device 1 in method 400. For example, the transceiver 1830 is used to receive service message 4 sent by the communication device 2; the processor 1810 is used to perform traffic filtering on the service message 4 based on the leaf label 2 carried in the service message 4.
[0624] In one example, the communication device 1800 can execute the method 500 in the above embodiment. When the communication device 1800 is used to execute the method 500 in the above embodiment, the communication device 1800 is equivalent to the communication device 1 in the method 500. The transceiver 1830 is used to execute the transceiver operations executed by the communication device 1 in the method 500. The processor 1810 is used to execute operations other than the transceiver operations executed by the communication device 1 in the method 500. For example, the processor 1810 is used to obtain a route advertisement message 4, wherein the route advertisement message 4 is used to advertise a MAC address advertisement route 3, and the route advertisement message 3 includes a leaf tag 3, which is an SRv6 SID 1; and the transceiver 1830 is used to send the route advertisement message 3 to the communication device 2.
[0625] In one example, the communication device 1800 can execute method 500 in the above embodiment. When the communication device 1800 is used to execute method 500 in the above embodiment, the communication device 1800 is equivalent to the communication device 2 in method 500. The transceiver 1830 is used to execute the transceiver operations executed by the communication device 2 in method 500. The processor 1810 is used to execute operations other than the transceiver operations executed by the communication device 2 in method 500. For example, the transceiver 1830 is used to receive the route advertisement message 3 sent by the communication device 1; the processor 1810 is used to obtain and store the leaf label 3 based on the route advertisement message 3.
[0626] In one example, the communication device 1800 can execute the method 600 in the above embodiment. When the communication device 1800 is used to execute the method 600 in the above embodiment, the communication device 1800 is equivalent to the communication device 2 in the method 600. The transceiver 1830 is used to execute the transceiver operation executed by the communication device 2 in the method 600. The processor 1810 is used to execute operations other than the transceiver operation executed by the communication device 2 in the method 600. For example: the transceiver 1830 is used to receive the service message 5 through the access side interface 3, the access side interface 3 is a leaf interface, and the service message 5 is a unicast message; the processor 1810 is used to obtain the service message 6 including the leaf tag 3 according to the service message 5; the transceiver 1830 is also used to send the service message 6 to the communication device 1.
[0627] In one example, the communication device 1800 can execute method 600 in the above embodiment. When the communication device 1800 is used to execute method 600 in the above embodiment, the communication device 1800 is equivalent to the communication device 1 in method 600. The transceiver 1830 is used to execute the transceiver operations executed by the communication device 1 in method 600. The processor 1810 is used to execute operations other than the transceiver operations executed by the communication device 1 in method 600. For example, the transceiver 1830 is used to receive service message 6 sent by the communication device 2; the processor 1810 is used to perform traffic filtering on the service message 6 based on the leaf label 3 carried in the service message 6.
[0628] In one example, the communication device 1800 can execute method 700 in the above embodiment. When the communication device 1800 is used to execute method 700 in the above embodiment, the communication device 1800 is equivalent to the communication device 1 in method 700. The transceiver 1830 is used to execute the transceiver operations executed by the communication device 1 in method 700. The processor 1810 is used to execute operations other than the transceiver operations executed by the communication device 1 in method 700. For example, the processor 1810 is used to obtain a route advertisement message 5 and a route advertisement message 6, wherein the route advertisement message 5 is used to advertise MAC address advertisement route 4, and the MAC address advertisement route 4 includes SRv6 SID 4. The route advertisement message 6 is used to advertise Ethernet auto-discovery route 2, and the route advertisement message 6 includes leaf label 4, and the leaf label 4 is SRv6 SID 3. The transceiver 1830 is used to send the route advertisement message 5 and the route advertisement message 6 to the communication device 2.
[0629] In one example, the communication device 1800 can execute method 700 in the above embodiment. When the communication device 1800 is used to execute method 700 in the above embodiment, the communication device 1800 is equivalent to the communication device 2 in method 700. The transceiver 1830 is used to execute the transceiver operations executed by the communication device 2 in method 700. The processor 1810 is used to execute operations other than the transceiver operations executed by the communication device 2 in method 700. For example, the transceiver 1830 is used to receive route advertisement messages 5 and 6 sent by the communication device 1; the processor 1810 is used to obtain the SRv6 SID 4 and the leaf label 4, and obtain and store the SRv6 SID 5 obtained based on the SRv6 SID 4 and the leaf label 4.
[0630] In one example, the communication device 1800 can execute the method 800 in the above embodiment. When the communication device 1800 is used to execute the method 800 in the above embodiment, the communication device 1800 is equivalent to the communication device 2 in the method 800. The transceiver 1830 is used to execute the transceiver operations executed by the communication device 2 in the method 800. The processor 1810 is used to execute operations other than the transceiver operations executed by the communication device 2 in the method 800. For example: the transceiver 1830 is used to receive the service message 7 through the access side interface 4, and the access side interface 4 is a leaf interface; the processor 1810 is used to obtain the service message 8 including the SRv6 SID 5 based on the service message 7; and the transceiver 1830 is further used to send the service message 8 to the communication device 1.
[0631] In one example, the communication device 1800 can execute method 800 in the above embodiment. When the communication device 1800 is used to execute method 800 in the above embodiment, the communication device 1800 is equivalent to the communication device 1 in method 800. The transceiver 1830 is used to execute the transceiver operations executed by the communication device 1 in method 800. The processor 1810 is used to execute operations other than the transceiver operations executed by the communication device 1 in method 800. For example, the transceiver 1830 is used to receive service message 8 sent by the communication device 2; the processor 1810 is used to perform traffic filtering on the service message 8 based on the SRv6 SID 5 carried in the service message 8.
[0632] In one example, the communication device 1800 can perform method 900 in the above embodiment. When the communication device 1800 is used to perform method 900 in the above embodiment, the communication device 1800 is equivalent to the communication device 1 in method 900. The transceiver 1830 is configured to perform the transceiver operations performed by the communication device 1 in method 900. The processor 1810 is configured to perform operations other than the transceiver operations performed by the communication device 1 in method 900. For example, the processor 1810 is configured to obtain a route advertisement message 7, which is configured to advertise a UMR 5 associated with EVPN instance 2. The route advertisement message 7 includes indication information 2, which indicates that the UMR 5 has a leaf attribute. The presence of the leaf attribute on the UMR 5 indicates that all access-side interfaces associated with the EVPN instance 2 of the communication device 1 are leaf interfaces. The transceiver 1830 is configured to send the route advertisement message 7 to the communication device 2.
[0633] In one example, the communication device 1800 can execute the method 900 in the above embodiment. When the communication device 1800 is used to execute the method 900 in the above embodiment, the communication device 1800 is equivalent to the communication device 2 in the method 900. The transceiver 1830 is used to execute the transceiver operations executed by the communication device 2 in the method 900. The processor 1810 is used to execute operations other than the transceiver operations executed by the communication device 2 in the method 900. For example, the transceiver 1830 is used to receive the route advertisement message 7 sent by the communication device 1; the processor 1810 is used to obtain the UMR 5 and generate a default MAC address table entry based on the UMR 5, wherein the default MAC address table entry includes a leaf attribute identifier and a MAC address consisting of all zeros.
[0634] In one example, the communication device 1800 can execute the method 1000 in the above embodiment. When the communication device 1800 is used to execute the method 1000 in the above embodiment, the communication device 1800 is equivalent to the first communication device in the method 1000. The transceiver 1830 is used to execute the transceiver operations performed by the first communication device in the method 1000. The processor 1810 is used to execute operations other than the transceiver operations performed by the first communication device in the method 1000. For example, the transceiver 1830 is used to receive a unicast message sent by the second communication device, the unicast message including a leaf identifier; and the processor 1810 is used to perform traffic filtering on the unicast message based on the leaf identifier.
[0635] In one example, the communication device 1800 can execute the method 1100 in the above embodiment. When the communication device 1800 is used to execute the method 1100 in the above embodiment, the communication device 1800 is equivalent to the second communication device in the method 1100. The transceiver 1830 is used to execute the transceiver operations performed by the second communication device in the method 1100. The processor 1810 is used to execute operations other than the transceiver operations performed by the second communication device in the method 1100. For example, the processor 1810 is used to obtain a first unicast message, where the first unicast message includes a leaf identifier; and the transceiver 1830 is used to send the first unicast message to the first communication device.
[0636] In one example, the communication device 1800 can execute the method 1200 in the above embodiment. When the communication device 1800 is used to execute the method 1200 in the above embodiment, the communication device 1800 is equivalent to the first communication device in the method 1200. The transceiver 1830 is used to execute the transceiver operation executed by the first communication device in the method 1200. The processor 1810 is used to execute operations other than the transceiver operation executed by the first communication device in the method 1200. For example: the processor 1810 is used to obtain at least one route, the at least one route is used to announce a leaf identifier, the leaf identifier is used to perform traffic filtering on unicast traffic, and the leaf identifier is a changed MPLS label or an SRv6 SID; the transceiver 1830 is used to announce the at least one route to the second communication device.
[0637] In one example, the communication device 1800 can execute the method 1300 in the above embodiment. When the communication device 1800 is used to execute the method 1300 in the above embodiment, the communication device 1800 is equivalent to the second communication device in the method 1300. The transceiver 1830 is used to execute the transceiver operation performed by the second communication device in the method 1300. The processor 1810 is used to execute operations other than the transceiver operation performed by the second communication device in the method 1300. For example: the transceiver 1830 is used to receive at least one route announced by the first communication device, the at least one route is used to announce a leaf identifier, the leaf identifier is used to perform traffic filtering on unicast traffic, and the leaf identifier is a Multi-Protocol Label Switching (MPLS) label or an Internet Protocol version 6 Segment Routing Segment Identifier (SRv6 SID); the processor 1810 is used to obtain the leaf identifier.
[0638] The present application also provides a computer-readable storage medium, which stores instructions or computer programs. When the instruction computer program runs on a processor, it can implement any one or more operations of the methods described in the aforementioned embodiments (for example, any one of methods 100 to 1300).
[0639] The present application also provides a computer program product, including a computer program, which, when executed on a processor, can implement any one or more operations of the methods described in the foregoing embodiments (e.g., any one of methods 100 to 1300).
[0640] An embodiment of the present application further provides a communication system, which includes the first communication device and the second communication device provided in the above method embodiment.
[0641] The terms "first," "second," "third," "fourth," and the like (if any) in the specification and claims of this application and in the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or sequential sequence. It should be understood that the terms used in this manner are interchangeable where appropriate so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having," and any variations thereof, are intended to cover non-exclusive inclusions, e.g., a process, method, system, product, or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0642] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0643] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of units is only a logical business division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0644] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0645] In addition, each business unit in each embodiment of the present application can be integrated into a processing unit, each unit can exist physically separately, or two or more units can be integrated into a single unit. The above-mentioned integrated units can be implemented in the form of hardware or software business units.
[0646] If the integrated unit is implemented in the form of a software business unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0647] Those skilled in the art will appreciate that, in one or more of the above examples, the services described herein can be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these services can be stored on 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, including any medium that facilitates the transmission of computer programs from one location to another. Storage media can be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0648] The above specific implementation methods further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific implementation methods of the present invention.
[0649] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A traffic filtering method, It is characterized in that Applied to a first communication device, the method comprises: receiving a unicast message from a second communication device, wherein the unicast message includes a leaf identifier, and the leaf identifier indicates that the unicast message comes from a leaf interface; Traffic filtering is performed on the unicast message according to the leaf identifier.
2. The method according to claim 1, It is characterized in that The performing flow filtering on the unicast message according to the leaf identifier includes: In response to determining that the outbound interface used to forward the unicast message is a leaf interface, discarding the unicast message.
3. The method according to claim 1 or 2, It is characterized in that The method further comprises: At least one route is notified to the second communication device, where the at least one route is used to notify the leaf identifier.
4. The method according to claim 3, It is characterized in that The at least one route comprises a first unknown media access control route UMR.
5. The method according to claim 4, It is characterized in that The first UMR includes the leaf identifier.
6. The method according to claim 4 or 5, It is characterized in that The leaf identifier is a first multi-protocol label switching MPLS label.
7. The method according to claim 6, It is characterized in that The first UMR includes a first Ethernet tree E-tree extended community attribute, and the first E-tree extended community attribute includes the first MPLS label.
8. The method according to claim 4 or 5, It is characterized in that The leaf identifier is a first Internet Protocol version 6 segment routing segment identifier SRv6 SID.
9. The method according to claim 8, It is characterized in that The first UMR includes a Border Gateway Protocol (BGP) prefix SID attribute, and the BGP prefix SID attribute includes the first SRv6 SID.
10. The method according to claim 9, It is characterized in that The BGP prefix SID attribute also includes first indication information, where the first indication information indicates that the first SRv6 SID is used to perform traffic filtering.
11. The method according to claim 10, It is characterized in that The first indication information is carried through a reserved field in the BGP prefix SID attribute, an SRv6 service Service SID identifier Flags field, or an SRv6 endpoint behavior Endpoint Behavior field.
12. The method according to claim 10 or 11, It is characterized in that The BGP prefix SID attribute includes an SRv6 Service subtype length value Sub-TLV, and the SRv6 Service Sub-TLV is used to carry the first SRv6 SID and the first indication information.
13. The method according to claim 3, It is characterized in that The leaf identifier is a second MPLS label, the at least one route includes an Ethernet automatic discovery route, the Ethernet automatic discovery route includes the second MPLS label, and the second MPLS label is used to perform traffic filtering on unicast traffic.
14. The method according to claim 3, It is characterized in that The leaf identifier is a second SRv6 SID, the at least one route includes an Ethernet virtual private network Ethernet Auto-Discovery EVPN Ethernet Auto-Discovery route and an EVPN media access control MAC announcement route, the EVPN Ethernet Auto-Discovery route includes a third SRv6 SID, the EVPN MAC announcement route includes a fourth SRv6 SID, and the third SRv6 SID and the fourth SRv6 SID are used by the second communication device to generate the second SRv6 SID.
15. The method according to claim 14, It is characterized in that The SID type of the second SRv6 SID is End.DT2U combined with Arg.FE2.
16. The method according to any one of claims 1 to 15, It is characterized in that The leaf identifier is used to perform traffic filtering on traffic corresponding to a first Ethernet virtual private network EVPN instance, and the first communication device is deployed with the first EVPN instance.
17. The method according to claim 16, It is characterized in that The leaf identifier is also used to identify the first EVPN instance.
18. The method according to any one of claims 1 to 4, It is characterized in that The payload of the unicast message includes a unicast message or a broadcast unknown unicast multicast BUM message.
19. The method according to any one of claims 1 to 18, It is characterized in that The method further comprises: Notifying the second communication device of a second UMR associated with a second EVPN instance, wherein the second UMR includes second indication information, wherein the second indication information indicates that the second UMR has a leaf attribute, and the second UMR has a leaf attribute, indicating that all access-side interfaces associated with the second EVPN by the first communication device are leaf interfaces, and the first communication device is deployed with the second EVPN instance.
20. The method according to claim 19, It is characterized in that The second UMR includes a second E-tree extended group attribute, and the second E-tree extended group attribute carries the second indication information, wherein a flags field of the second E-tree extended group attribute is used to carry a bit position of 1 for carrying the second indication information.
21. A traffic filtering method, It is characterized in that Applied to a second communication device, the method comprises: Receive the first message from the leaf interface; Encapsulating a leaf identifier in an outer layer of the first message to obtain a first unicast message, wherein the leaf identifier indicates that the first unicast message comes from a leaf interface; Sending the first unicast message to a first communication device.
22. The method according to claim 21, It is characterized in that The method further comprises: At least one route sent by the first communication device is received, where the at least one route is used to announce the leaf identifier.
23. The method according to claim 22, It is characterized in that The at least one route comprises a first unknown media access control route UMR.
24. The method according to claim 23, It is characterized in that The first UMR includes the leaf identifier.
25. The method according to claim 23 or 24, It is characterized in that The leaf identifier is a first multi-protocol label switching MPLS label.
26. The method according to claim 25, It is characterized in that The first UMR includes a first Ethernet tree E-tree extended community attribute, and the first E-tree extended community attribute includes the first MPLS label.
27. The method according to claim 23 or 24, It is characterized in that The leaf identifier is a first Internet Protocol version 6 segment routing segment identifier SRv6 SID.
28. The method according to claim 27, It is characterized in that The first UMR includes a Border Gateway Protocol (BGP) prefix SID attribute, and the BGP prefix SID attribute includes the first SRv6 SID.
29. The method according to claim 28, It is characterized in that The BGP prefix SID attribute also includes first indication information, where the first indication information indicates that the first SRv6 SID is used to perform traffic filtering.
30. The method according to claim 29, It is characterized in that The first indication information is carried through a reserved field in the BGP prefix SID attribute, an SRv6 service Service SID identifier Flags field, or an SRv6 endpoint behavior Endpoint Behavior field.
31. The method according to claim 29 or 30, It is characterized in that The BGP prefix SID attribute includes an SRv6 Service subtype length value Sub-TLV, and the SRv6 Service Sub-TLV is used to carry the first SRv6 SID and the first indication information.
32. The method according to claim 22, It is characterized in that The leaf identifier is a second MPLS label, the at least one route includes an Ethernet automatic discovery route, the Ethernet automatic discovery route includes the second MPLS label, and the second MPLS label is used to perform traffic filtering on unicast traffic.
33. The method according to claim 22, It is characterized in that The leaf identifier is a second SRv6 SID, the at least one route includes an Ethernet virtual private network Ethernet Auto-Discovery EVPN Ethernet Auto-Discovery route and an EVPN media access control MAC announcement route, the EVPN Ethernet Auto-Discovery route includes a third SRv6 SID, the EVPN MAC announcement route includes a fourth SRv6 SID, and the third SRv6 SID and the fourth SRv6 SID are used by the second communication device to generate the second SRv6 SID.
34. The method according to claim 33, It is characterized in that The SID type of the second SRv6 SID is End.DT2U combined with Arg.FE2.
35. The method according to any one of claims 21 to 34, It is characterized in that The leaf identifier is used to perform traffic filtering on traffic corresponding to a first Ethernet virtual private network EVPN instance, and the first communication device is deployed with the first EVPN instance.
36. The method according to claim 35, It is characterized in that The leaf identifier is also used to identify the first EVPN instance.
37. The method according to any one of claims 21 to 23, It is characterized in that The first message includes: a unicast message or a broadcast unknown unicast multicast BUM message.
38. The method according to any one of claims 21 to 37, It is characterized in that The method further comprises: receiving a second UMR associated with a second EVPN instance notified by a third communication device, wherein the second UMR includes second indication information, wherein the second indication information indicates that the second UMR has a leaf attribute, and the second UMR has a leaf attribute, indicating that the third communication device All access-side interfaces of the communication device associated with the second EVPN are leaf interfaces, and the third communication device is deployed with the second EVPN instance; Obtain the second UMR; A default MAC address table entry is generated according to the second UMR, where the default MAC address table entry includes a leaf attribute identifier and a MAC address of all 0s.
39. The method according to claim 38, It is characterized in that The second routing advertisement message includes a second E-tree extended community attribute, and the second E-tree extended community attribute carries the second indication information, wherein a flags field of the second E-tree extended community attribute is used to carry a bit position of 1 for carrying the second indication information.
40. The method according to claim 38 or 39, It is characterized in that The method further comprises: Receiving a second unicast message through a first access side interface with a leaf attribute of the second communication device; In response to a match between the destination MAC address of the second unicast message and the default MAC address entry, the second unicast message is discarded.
41. The method according to any one of claims 38 to 40, It is characterized in that The method further comprises: According to the second indication information, third indication information is added to the first communication device, where the third indication information indicates traffic filtering.
42. The method according to claim 41, It is characterized in that The method further comprises: Receiving a second message through a second access side interface with a leaf attribute of the second communication device, where the second message is a broadcast message or a multicast message; When the second message matches the forwarding entry arriving at the first communication device, the second message is discarded according to the third indication information.
43. A routing advertisement method, It is characterized in that Applied to a first communication device, the method comprises: Acquire at least one route, where the at least one route is used to advertise a leaf identifier, where the leaf identifier is used to perform traffic filtering on unicast traffic, where the leaf identifier is a multi-protocol label switching (MPLS) label or an Internet Protocol version 6 (IPv6) segment routing segment identifier (SRv6 SID); The at least one route is advertised to the second communication device.
44. A routing advertisement method, It is characterized in that Applied to a second communication device, the method comprises: receiving at least one route announced by the first communication device, wherein the at least one route is used to announce a leaf identifier, the leaf identifier is used to perform traffic filtering on unicast traffic, and the leaf identifier is a multi-protocol label switching MPLS label or an Internet Protocol version 6 segment routing segment identifier SRv6 SID; Get the leaf ID.
45. A communication device, It is characterized in that The device comprises: Transceiver unit and processing unit; The transceiver unit is used to perform the receiving and / or sending operations performed by the first communication device as described in any one of claims 1-20; the processing unit is used to perform operations other than the receiving and / or sending operations performed by the first communication device as described in any one of claims 1-20; or, The transceiver unit is used to perform the receiving and / or sending operations performed by the first communication device as described in claim 43; the processing unit is used to perform operations other than the receiving and / or sending operations performed by the first communication device as described in claim 43; or, The transceiver unit is used to perform the receiving and / or sending operations performed by the second communication device as described in any one of claims 21-42; the processing unit is used to perform operations other than the receiving and / or sending operations performed by the second communication device as described in any one of claims 21-42; or, The transceiver unit is used to perform the receiving and / or sending operations performed by the second communication device as described in claim 44; the processing unit is used to perform operations other than the receiving and / or sending operations performed by the second communication device as described in claim 44.
46. A communication device, It is characterized in that include: Processor and memory; The memory is used to store instructions; The processor is used to execute the instructions so that the communication device performs the method described in any one of claims 1-44.
47. A communication system, It is characterized in that The system comprises: A first communication device that executes the method described in any one of claims 1-20 or 43 above, and a second communication device that executes the method described in any one of claims 21-42 or 44 above.
48. A computer readable storage medium, It is characterized in that The method comprises instructions or computer programs, which, when executed on a processor, implement the method according to any one of claims 1 to 44.
49. A computer program product, It is characterized in that The invention comprises a computer program which, when executed on a processor, executes the method according to any one of claims 1 to 44 above.
Citation Information
Patent Citations
Method for achieving E-tree service based on VPLS and node
CN103248548A
Message processing method and device
CN111711555A
Message processing method and device and storage medium
CN114430393A
Communication method and device
CN117997561A
Segmentation Within a Broadcast Domain in Ethernet VPN
US20200396103A1
