Embodiments of this application relate to the field of communications technologies, and in particular, to a method for Ethernet virtual private network (VPN) (EVPN) and virtual private local area network (LAN) service (VPLS) active-active integration, a device, and a system.
VPLS is a layer 2 packet bearer technology, which is essentially a layer 2 virtual private network (L2VPN) technology based on Internet Protocol (IP)/Multiprotocol Label Switching (MPLS) and Ethernet technologies. A core idea of the VPLS technology is to establish and maintain a pseudo wire (PW) between provider edge (PE) devices in a VPLS instance using a signaling protocol, and encapsulate a layer 2 protocol frame for transmission and exchange on the PW. The PW is an emulated point-to-point bidirectional connection between a pair of devices that is established in a packet-switched network (PSN) using a layer 2 technology. A provider transmits service data streams between LANs of a customer in different areas using PEs and interconnection PWs in the PSN. In this way, a plurality of LANs of the customer that are distributed in different areas are interconnected into an emulated LAN, which is referred to as a VPLS instance. A LAN in each area may be considered as a network segment of the emulated local area network.
An EVPN network can resolve some problems in the VPLS technology to some extent. EVPN is a VPN technology based on an MPLS layer 2 network. According to the technology, media access control (MAC) address learning between PE devices is implemented using a Border Gateway Protocol (BGP) as a control plane protocol, and a MAC address learning and advertisement process is transferred from being performed on a data plane conventionally to being performed on a control plane, so that MAC address diffusion in a traffic flooding manner is greatly reduced, and a customer edge (CE) device can be supported in multi-homing to the EVPN, to facilitate MAC address management and load balancing. In the EVPN network, PE devices do not need to be connected through a PW, and a CE device may be connected to a PE device in a plurality of access manners. One of the advantages of the EVPN solution is multi-homing of the CE device. The multi-homing of the CE device to the EVPN includes multi-homing to the EVPN using Ethernet links, that is, one CE device is connected to a plurality of network side devices using a plurality of links, respectively.
Embodiments of this application provide a packet processing method, device, and system, to resolve a technical problem in the other approaches that traffic cannot be normally forwarded in an EVPN and VPLS active-active integration network. EVPN and VPLS networks can be effectively interconnected by performing the method, to ensure normal service running.
According to a first aspect, an embodiment of this application provides a traffic forwarding method. In the method, a first network device runs, together with a plurality of other network devices in a network, an EVPN, where the first network device serves as a PE device and form, together with at least one PE in the EVPN, a multi-homed structure for a CE device or a terminal device, connects to at least one PE in a VPLS using an inter-network PW, receives data traffic, and forwards the data traffic based on a matching result between the data traffic and the following conditions, where the conditions include: (1) being sent by another PE device via an inter-network PW of the first network device, (2) needing to be forwarded by the first network device to a PE device connected via an inter-network PW, and/or (3) including an inter-network PW flag.
In the foregoing technical solution, considering a PW mode type of a conventional VPLS device, a mode of an inter-network PW connected to the first network device may be a mode of being a common PW, belonging to a PW redundancy group that does not support dual-receiving, or belonging to a PW redundancy group that supports dual-receiving. The traffic may be broadcast, unknown unicast, and multicast (BUM) traffic or unicast traffic. In a possible design, for a plurality of inter-network PWs connected to a group of PEs in the multi-homed structure, one of the inter-network PWs serves as a designated forwarder (DF) PW, and a remaining inter-network PW serves as a backup DF (BDF) PW, to ensure determinacy of a forwarding path when the PEs in the multi-homed structure on an EVPN side forward traffic to a PE device on a VPLS side.
In the foregoing technical solution, when data traffic matches a corresponding condition, the data traffic may be forwarded based on the following forwarding rules.
When the mode of the inter-network PW is being a common PW and to-be-forwarded traffic is BUM traffic, the first network device forwards the BUM traffic based on the following rules: traffic from an attachment circuit (AC) interface can be replicated to an inter-network DF PW, traffic from an AC interface is not replicated to an inter-network BDF PW, traffic from a common EVPN peer EVPN peer is not replicated to an inter-network PW, traffic from a multi-homed PE is replicated to an inter-network DF PW, and traffic received by an inter-network PW is replicated only to an AC interface, where the common EVPN peer forms an EVPN peer together with at least one of the plurality of PE devices, but the common EVPN peer is not a multi-homed PE.
When the mode of the inter-network PW is being a common PW and to-be-forwarded traffic is unicast traffic, the first network device determines a forwarding path based on MAC address learning, and the MAC address learning rules are as follows: a multi-homed PE learns MAC from a DF PW, a multi-homed PE does not learn MAC from a BDF PW, after learning the MAC from the DF PW, the multi-homed PE synchronizes the MAC to an EVPN peer with an inter-network PW flag added, and after the EVPN peer finds the MAC with the inter-network PW flag, if it is found that an Ethernet segment identifier (ESI) label value in a packet carrying the MAC exists locally, the EVPN peer points MAC of the EVPN peer to an address of a PE device sending the packet, or otherwise, the MAC is discarded.
When the mode of the inter-network PW is belonging to a PW redundancy group that does not support dual-receiving and to-be-forwarded traffic is BUM traffic, the first network device forwards the BUM traffic based on the following rules: traffic from an AC interface can be replicated to an inter-network DF PW, traffic from a common EVPN peer is not replicated to an inter-network PW, traffic from a multi-homed PE is replicated to an inter-network DF PW, traffic received by an inter-network PW is replicated to an AC interface and a multi-homed PE, and carries an ESI label when replicated to the multi-homed PE, and after receiving the traffic carrying the ESI label, the multi-homed PE replicates the traffic only to an AC interface, where the common EVPN peer forms an EVPN peer together with at least one of the plurality of PE devices, but the common EVPN peer is not a multi-homed PE.
In a possible design, when the mode of the inter-network PW is belonging to a PW redundancy group that does not support dual-receiving and to-be-forwarded traffic is BUM traffic, the following forwarding rule may be further included traffic from an AC interface is not replicated to an inter-network BDF PW. In this way, traffic forwarding overheads can be reduced, and a traffic forwarding bandwidth can be reduced.
When the mode of the inter-network PW is belonging to a PW redundancy group that does not support dual-receiving and to-be-forwarded traffic is unicast traffic, the first network device determines a forwarding path based on MAC address learning, and the MAC address learning rules are as follows: a multi-homed PE learns MAC from a DF PW, a multi-homed PE does not learn MAC from a BDF PW, after learning the MAC from the DF PW, the multi-homed PE synchronizes the MAC to an EVPN peer with an inter-network PW flag added, and after the EVPN peer finds the MAC with the inter-network PW flag, if it is found that an ESI label value in a packet carrying the MAC exists locally, the EVPN peer points MAC of the EVPN peer to an address of a PE device sending the packet, or otherwise, the MAC is discarded.
When the mode of the inter-network PW is belonging to a PW redundancy group that supports dual-receiving and to-be-forwarded traffic is BUM traffic, the first network device forwards the BUM traffic based on the following rules: traffic from an AC interface can be replicated to an inter-network DF PW, traffic from an AC interface can be replicated to an inter-network BDF PW, traffic from a common EVPN peer is not replicated to an inter-network PW, traffic from a multi-homed PE is not replicated to an inter-network DF PW, traffic received by an inter-network PW is replicated to an AC interface and a multi-homed PE, and carries an ESI label when replicated to the multi-homed PE, and after receiving the traffic carrying the ESI label, the multi-homed PE replicates the traffic only to an AC interface, where the common EVPN peer forms an EVPN peer together with at least one of the plurality of PE devices, but the common EVPN peer is not a multi-homed PE.
When the mode of the inter-network PW is belonging to a PW redundancy group that supports dual-receiving and to-be-forwarded traffic is unicast traffic, the first network device determines a forwarding path based on MAC address learning, and the MAC address learning rules are as follows: a multi-homed PE learns MAC from a DF PW, a multi-homed PE learns MAC from a BDF PW, after learning the MAC from the DF PW, the multi-homed PE synchronizes the MAC to an EVPN peer with an inter-network PW flag added, and after the EVPN peer finds the MAC with the inter-network PW flag, if it is found that an ESI label value in a packet carrying the MAC exists locally, the EVPN peer points MAC of the EVPN peer to an address of a PE device sending the packet, or otherwise, the MAC is discarded.
By setting, matching, and using the foregoing inter-network PW forwarding rules and MAC learning rules for different traffic types, in the EVPN and VPLS active-active integration network, the EVPN side and the VPLS side can be effectively interconnected, to prevent flapping when a VPLS device receives traffic, thereby ensuring normal service running.
In a possible design, for the inter-network PW in the mode of being a common PW, belonging to a PW redundancy group that does not support dual-receiving, or belonging to a PW redundancy group that supports dual-receiving, the rules for learning, by the first network device, a MAC address when forwarding unicast traffic further include, after the EVPN peer finds the MAC with the inter-network PW flag, if it is found that an ESI label value in a packet carrying the MAC exists locally, a BDF PW corresponding to the ESI value is set as a secondary path. When a primary path for forwarding the unicast traffic is unavailable, the secondary path may be used to forward the unicast traffic, thereby improving robustness and security of network communication.
In a possible design, a manner of adding an inter-network PW flag to a MAC address is adding a MAC extended community attribute, and flagging and distinguishing specific types of inter-network PWs using a flags field, or reusing an existing MAC mobility extended community attribute, and flagging and distinguishing the specific types of inter-network PWs using a reserved bit of a flags field.
According to a second aspect, an embodiment of this application provides a network device. The network device includes a memory configured to store computer-readable instructions, and a processor configured to invoke the computer-readable instructions to run, by the network device together with a plurality of other network devices, an EVPN, where the network device serves as a PE device and forms, together with at least one PE in the EVPN, a multi-homed structure for a CE device or a terminal device, connect to at least one PE in a VPLS using an inter-network PW, receive data traffic, and forward the data traffic based on a matching result between the data traffic and the following conditions, where the conditions include: (1) being sent by another PE device via an inter-network PW of the network device, (2) needing to be forwarded by the network device to a PE device connected via an inter-network PW, and/or (3) including an inter-network PW flag.
In the foregoing technical solution, considering a PW mode type of a conventional VPLS device, a mode of an inter-network PW connected to the network device may be a mode of being a common PW, belonging to a PW redundancy group that does not support dual-receiving, or belonging to a PW redundancy group that supports dual-receiving. The traffic may BUM traffic or unicast traffic. In a possible design, for a plurality of inter-network PWs connected to a group of PEs in the multi-homed structure, one of the inter-network PWs serves as a DF PW, and a remaining inter-network PW serves as a BDF PW, to ensure determinacy of a forwarding path when the PEs in the multi-homed structure on an EVPN side forward traffic to a PE device on a VPLS side.
In the foregoing technical solution, when data traffic matches a corresponding condition, the data traffic may be forwarded based on the following forwarding rules.
When the mode of the inter-network PW is being a common PW and to-be-forwarded traffic is BUM traffic, the network device forwards the BUM traffic based on the following rules: traffic from an AC interface can be replicated to an inter-network DF PW, traffic from an AC interface is not replicated to an inter-network BDF PW, traffic from a common EVPN peer EVPN peer is not replicated to an inter-network PW, traffic from a multi-homed PE is replicated to an inter-network DF PW, and traffic received by an inter-network PW is replicated only to an AC interface, where the common EVPN peer forms an EVPN peer together with at least one of the plurality of PE devices, but the common EVPN peer is not a multi-homed PE.
When the mode of the inter-network PW is being a common PW and to-be-forwarded traffic is unicast traffic, the network device determines a forwarding path based on MAC address learning, and the MAC address learning rules are as follows: a multi-homed PE learns MAC from a DF PW, a multi-homed PE does not learn MAC from a BDF PW, after learning the MAC from the DF PW, the multi-homed PE synchronizes the MAC to an EVPN peer with an inter-network PW flag added, and after the EVPN peer finds the MAC with the inter-network PW flag, if it is found that an ESI label value in a packet carrying the MAC exists locally, the EVPN peer points MAC of the EVPN peer to an address of a PE device sending the packet, or otherwise, the MAC is discarded.
When the mode of the inter-network PW is belonging to a PW redundancy group that does not support dual-receiving and to-be-forwarded traffic is BUM traffic, the network device forwards the BUM traffic based on the following rules: traffic from an AC interface can be replicated to an inter-network DF PW, traffic from a common EVPN peer is not replicated to an inter-network PW, traffic from a multi-homed PE is replicated to an inter-network DF PW, traffic received by an inter-network PW is replicated to an AC interface and a multi-homed PE, and carries an ESI label when replicated to the multi-homed PE, and after receiving the traffic carrying the ESI label, the multi-homed PE replicates the traffic only to an AC interface, where the common EVPN peer forms an EVPN peer together with at least one of the plurality of PE devices, but the common EVPN peer is not a multi-homed PE.
In a possible design, when the mode of the inter-network PW is belonging to a PW redundancy group that does not support dual-receiving and to-be-forwarded traffic is BUM traffic, the following forwarding rule may be further included: traffic from an AC interface is not replicated to an inter-network BDF PW. In this way, traffic forwarding overheads can be reduced, and a traffic forwarding bandwidth can be reduced.
When the mode of the inter-network PW is belonging to a PW redundancy group that does not support dual-receiving and to-be-forwarded traffic is unicast traffic, the network device determines a forwarding path based on MAC address learning, and the MAC address learning rules are as follows: a multi-homed PE learns MAC from a DF PW, a multi-homed PE does not learn MAC from a BDF PW, after learning the MAC from the DF PW, the multi-homed PE synchronizes the MAC to an EVPN peer with an inter-network PW flag added, and after the EVPN peer finds the MAC with the inter-network PW flag, if it is found that an ESI label value in a packet carrying the MAC exists locally, the EVPN peer points MAC of the EVPN peer to an address of a PE device sending the packet, or otherwise, the MAC is discarded.
When the mode of the inter-network PW is belonging to a PW redundancy group that supports dual-receiving and to-be-forwarded traffic is BUM traffic, the network device forwards the BUM traffic based on the following rules: traffic from an AC interface can be replicated to an inter-network DF PW, traffic from an AC interface can be replicated to an inter-network BDF PW, traffic from a common EVPN peer is not replicated to an inter-network PW, traffic from a multi-homed PE is not replicated to an inter-network DF PW, traffic received by an inter-network PW is replicated to an AC interface and a multi-homed PE, and carries an ESI label when replicated to the multi-homed PE, and after receiving the traffic carrying the ESI label, the multi-homed PE replicates the traffic only to an AC interface, where the common EVPN peer forms an EVPN peer together with at least one of the plurality of PE devices, but the common EVPN peer is not a multi-homed PE.
When the mode of the inter-network PW is belonging to a PW redundancy group that supports dual-receiving and to-be-forwarded traffic is unicast traffic, the network device determines a forwarding path based on MAC address learning, and the MAC address learning rules are as follows: a multi-homed PE learns MAC from a DF PW, a multi-homed PE learns MAC from a BDF PW, after learning the MAC from the DF PW, the multi-homed PE synchronizes the MAC to an EVPN peer with an inter-network PW flag added, and after the EVPN peer finds the MAC with the inter-network PW flag, if it is found that an ESI label value in a packet carrying the MAC exists locally, the EVPN peer points MAC of the EVPN peer to an address of a PE device sending the packet, or otherwise, the MAC is discarded.
By setting, matching, and using the foregoing inter-network PW forwarding rules and MAC learning rules for different traffic types, in the EVPN and VPLS active-active integration network, the EVPN side and the VPLS can be effectively interconnected, to prevent flapping when a VPLS device receives traffic, thereby ensuring normal service running.
In a possible design, for the inter-network PW in the mode of being a common PW, belonging to a PW redundancy group that does not support dual-receiving, or belonging to a PW redundancy group that supports dual-receiving, the rules for learning, by the network device, a MAC address when forwarding unicast traffic further include, after the EVPN peer finds the MAC with the inter-network PW flag, if it is found that an ESI label value in a packet carrying the MAC exists locally, a BDF PW corresponding to the ESI value is set as a secondary path. When a primary path for forwarding the unicast traffic is unavailable, the secondary path may be used to forward the unicast traffic, thereby improving robustness and security of network communication.
In a possible design, a manner of adding an inter-network PW flag to a MAC address is adding a MAC extended community attribute, and flagging and distinguishing specific types of inter-network PWs using a flags field, or reusing an existing MAC mobility extended community attribute, and flagging and distinguishing the specific types of inter-network PWs using a reserved bit of a flags field.
According to a third aspect, an embodiment of this application provides a traffic forwarding system. The system includes a plurality of first PE devices. The plurality of first PE devices is EVPN devices, and the plurality of first PE devices form a multi-home structure for a CE device or a terminal device. Each first PE device in the multi-homed structure is connected to at least one identical second PE device through an inter-network pseudo wire PW, and the second PE device is a VPLS device. The first PE device receives data traffic, and the first PE device forwards the data traffic based on a matching result between the data traffic and the following conditions, where the conditions include: (1) being sent by another PE device via an inter-network PW of the network device, (2) needing to be forwarded by the network device to a PE device connected via an inter-network PW, and/or (3) including an inter-network PW flag.
In the foregoing technical solution, considering a PW mode type of a conventional VPLS device, a mode of an inter-network PW connected to the first PE device may be a mode of being a common PW, belonging to a PW redundancy group that does not support dual-receiving, or belonging to a PW redundancy group that supports dual-receiving. The traffic may be BUM traffic or unicast traffic. In a possible design, for a plurality of inter-network PWs connected to a group of PEs in the multi-homed structure, one of the inter-network PWs serves as a DF PW, and a remaining inter-network PW serves as a BDF PW, to ensure determinacy of a forwarding path when the PEs in the multi-homed structure on an EVPN side forward traffic to a PE device on a VPLS side.
In the foregoing technical solution, when data traffic matches a corresponding condition, the data traffic may be forwarded based on the following forwarding rules.
When the mode of the inter-network PW is being a common PW and to-be-forwarded traffic is BUM traffic, the first PE device forwards the BUM traffic based on the following rules: traffic from an AC interface can be replicated to an inter-network DF PW, traffic from an AC interface is not replicated to an inter-network BDF PW, traffic from a common EVPN peer EVPN peer is not replicated to an inter-network PW, traffic from a multi-homed PE is replicated to an inter-network DF PW, and traffic received by an inter-network PW is replicated only to an AC interface, where the common EVPN peer forms an EVPN peer together with at least one of the plurality of PE devices, but the common EVPN peer is not a multi-homed PE.
When the mode of the inter-network PW is being a common PW and to-be-forwarded traffic is unicast traffic, the first PE device determines a forwarding path based on MAC address learning, and the MAC address learning rules are as follows: a multi-homed PE learns MAC from a DF PW, a multi-homed PE does not learn MAC from a BDF PW, after learning the MAC from the DF PW, the multi-homed PE synchronizes the MAC to an EVPN peer with an inter-network PW flag added, and after the EVPN peer finds the MAC with the inter-network PW flag, if it is found that an ESI label value in a packet carrying the MAC exists locally, the EVPN peer points MAC of the EVPN peer to an address of a PE device sending the packet, or otherwise, the MAC is discarded.
When the mode of the inter-network PW is belonging to a PW redundancy group that does not support dual-receiving and to-be-forwarded traffic is BUM traffic, the first PE device forwards the BUM traffic based on the following rules: traffic from an AC interface can be replicated to an inter-network DF PW, traffic from a common EVPN peer is not replicated to an inter-network PW, traffic from a multi-homed PE is replicated to an inter-network DF PW, traffic received by an inter-network PW is replicated to an AC interface and a multi-homed PE, and carries an ESI label when replicated to the multi-homed PE, and after receiving the traffic carrying the ESI label, the multi-homed PE replicates the traffic only to an AC interface, where the common EVPN peer forms an EVPN peer together with at least one of the plurality of PE devices, but the common EVPN peer is not a multi-homed PE.
In a possible design, when the mode of the inter-network PW is belonging to a PW redundancy group that does not support dual-receiving and to-be-forwarded traffic is BUM traffic, the following forwarding rule may be further included: traffic from an AC interface is not replicated to an inter-network BDF PW. In this way, traffic forwarding overheads can be reduced, and a traffic forwarding bandwidth can be reduced.
When the mode of the inter-network PW is belonging to a PW redundancy group that does not support dual-receiving and to-be-forwarded traffic is unicast traffic, the first PE device determines a forwarding path based on MAC address learning, and the MAC address learning rules are as follows: a multi-homed PE learns MAC from a DF PW, a multi-homed PE does not learn MAC from a BDF PW, after learning the MAC from the DF PW, the multi-homed PE synchronizes the MAC to an EVPN peer with an inter-network PW flag added, and after the EVPN peer finds the MAC with the inter-network PW flag, if it is found that an ESI label value in a packet carrying the MAC exists locally, the EVPN peer points MAC of the EVPN peer to an address of a PE device sending the packet, or otherwise, the MAC is discarded.
When the mode of the inter-network PW is belonging to a PW redundancy group that supports dual-receiving and to-be-forwarded traffic is BUM traffic, the first PE device forwards the BUM traffic based on the following rules: traffic from an AC interface can be replicated to an inter-network DF PW, traffic from an AC interface can be replicated to an inter-network BDF PW, traffic from a common EVPN peer is not replicated to an inter-network PW, traffic from a multi-homed PE is not replicated to an inter-network DF PW, traffic received by an inter-network PW is replicated to an AC interface and a multi-homed PE, and carries an ESI label when replicated to the multi-homed PE, and after receiving the traffic carrying the ESI label, the multi-homed PE replicates the traffic only to an AC interface, where the common EVPN peer forms an EVPN peer together with at least one of the plurality of PE devices, but the common EVPN peer is not a multi-homed PE.
When the mode of the inter-network PW is belonging to a PW redundancy group that supports dual-receiving and to-be-forwarded traffic is unicast traffic, the first PE device determines a forwarding path based on MAC address learning, and the MAC address learning rules are as follows: a multi-homed PE learns MAC from a DF PW, a multi-homed PE learns MAC from a BDF PW, after learning the MAC from the DF PW, the multi-homed PE synchronizes the MAC to an EVPN peer with an inter-network PW flag added, and after the EVPN peer finds the MAC with the inter-network PW flag, if it is found that an ESI label value in a packet carrying the MAC exists locally, the EVPN peer points MAC of the EVPN peer to an address of a PE device sending the packet, or otherwise, the MAC is discarded.
By setting, matching, and using the foregoing inter-network PW forwarding rules and MAC learning rules for different traffic types, in the EVPN and VPLS active-active integration network, the EVPN side and the VPLS can be effectively interconnected, to prevent flapping when a VPLS device receives traffic, thereby ensuring normal service running.
In a possible design, for the inter-network PW in the mode of being a common PW, belonging to a PW redundancy group that does not support dual-receiving, or belonging to a PW redundancy group that supports dual-receiving, the rules for learning, by the first PE device, a MAC address when forwarding unicast traffic further include, after the EVPN peer finds the MAC with the inter-network PW flag, if it is found that an ESI label value in a packet carrying the MAC exists locally, a BDF PW corresponding to the ESI value is set as a secondary path. When a primary path for forwarding the unicast traffic is unavailable, the secondary path may be used to forward the unicast traffic, thereby improving robustness and security of network communication.
In a possible design, a manner of adding an inter-network PW flag to a MAC address is adding a MAC extended community attribute, and flagging and distinguishing specific types of inter-network PWs using a flags field, or reusing an existing MAC mobility extended community attribute, and flagging and distinguishing the specific types of inter-network PWs using a reserved bit of a flags field.
According to a fourth aspect, an embodiment of this application provides a traffic forwarding system. The system includes a first connection unit configured to run, by a first network device together with a plurality of other network devices in a network, an EVPN, where the first network device serves as a PE device and forms, together with at least one PE in the EVPN, a multi-homed structure for a CE device or a terminal device, a second connection unit configured to connect to, by the first network device, at least one PE in a VPLS through an inter-network pseudo wire PW, a receiving unit configured to receive, by the first network device, data traffic, and a matching unit configured to forward, by the first network device, the data traffic based on a matching result between the data traffic and the following conditions, where the conditions include: (1) being sent by another PE device via an inter-network PW of the first network device, (2) needing to be forwarded by the first network device to a PE device connected via an inter-network PW, and/or (3) including an inter-network PW flag.
In the foregoing technical solution, considering a PW mode type of a conventional VPLS device, a mode of an inter-network PW connected to the first network device may be a mode of being a common PW, belonging to a PW redundancy group that does not support dual-receiving, or belonging to a PW redundancy group that supports dual-receiving. The traffic may be BUM traffic or unicast traffic. In a possible design, for a plurality of inter-network PWs connected to a group of PEs in the multi-homed structure, one of the inter-network PWs serves as a DF PW, and a remaining inter-network PW serves as a BDF PW, to ensure determinacy of a forwarding path when the PEs in the multi-homed structure on an EVPN side forward traffic to a PE device on a VPLS side.
In the foregoing technical solution, when data traffic matches a corresponding condition, the data traffic may be forwarded based on the following forwarding rules.
When the mode of the inter-network PW is being a common PW and to-be-forwarded traffic is BUM traffic, the first network device forwards the BUM traffic based on the following rules: traffic from an AC interface can be replicated to an inter-network DF PW, traffic from an AC interface is not replicated to an inter-network BDF PW, traffic from a common EVPN peer EVPN peer is not replicated to an inter-network PW, traffic from a multi-homed PE is replicated to an inter-network DF PW, and traffic received by an inter-network PW is replicated only to an AC interface, where the common EVPN peer forms an EVPN peer together with at least one of the plurality of PE devices, but the common EVPN peer is not a multi-homed PE.
When the mode of the inter-network PW is being a common PW and to-be-forwarded traffic is unicast traffic, the first network device determines a forwarding path based on MAC address learning, and the MAC address learning rules are as follows: a multi-homed PE learns MAC from a DF PW, a multi-homed PE does not learn MAC from a BDF PW, after learning the MAC from the DF PW, the multi-homed PE synchronizes the MAC to an EVPN peer with an inter-network PW flag added, and after the EVPN peer finds the MAC with the inter-network PW flag, if it is found that an ESI label value in a packet carrying the MAC exists locally, the EVPN peer points MAC of the EVPN peer to an address of a PE device sending the packet, or otherwise, the MAC is discarded.
When the mode of the inter-network PW is belonging to a PW redundancy group that does not support dual-receiving and to-be-forwarded traffic is BUM traffic, the first network device forwards the BUM traffic based on the following rules: traffic from an AC interface can be replicated to an inter-network DF PW, traffic from a common EVPN peer is not replicated to an inter-network PW, traffic from a multi-homed PE is replicated to an inter-network DF PW, traffic received by an inter-network PW is replicated to an AC interface and a multi-homed PE, and carries an ESI label when replicated to the multi-homed PE, and after receiving the traffic carrying the ESI label, the multi-homed PE replicates the traffic only to an AC interface, where the common EVPN peer forms an EVPN peer together with at least one of the plurality of PE devices, but the common EVPN peer is not a multi-homed PE.
In a possible design, when the mode of the inter-network PW is belonging to a PW redundancy group that does not support dual-receiving and to-be-forwarded traffic is BUM traffic, the following rule may be further included: traffic from an AC interface is not replicated to an inter-network BDF PW. In this way, traffic forwarding overheads can be reduced, and a traffic forwarding bandwidth can be reduced.
When the mode of the inter-network PW is belonging to a PW redundancy group that does not support dual-receiving and to-be-forwarded traffic is unicast traffic, the first network device determines a forwarding path based on MAC address learning, and the MAC address learning rules are as follows: a multi-homed PE learns MAC from a DF PW, a multi-homed PE does not learn MAC from a BDF PW, after learning the MAC from the DF PW, the multi-homed PE synchronizes the MAC to an EVPN peer with an inter-network PW flag added, and after the EVPN peer finds the MAC with the inter-network PW flag, if it is found that an ESI label value in a packet carrying the MAC exists locally, the EVPN peer points MAC of the EVPN peer to an address of a PE device sending the packet, or otherwise, the MAC is discarded.
When the mode of the inter-network PW is belonging to a PW redundancy group that supports dual-receiving and to-be-forwarded traffic is BUM traffic, the first network device forwards the BUM traffic based on the following rules: traffic from an AC interface can be replicated to an inter-network DF PW, traffic from an AC interface can be replicated to an inter-network BDF PW, traffic from a common EVPN peer is not replicated to an inter-network PW, traffic from a multi-homed PE is not replicated to an inter-network DF PW, traffic received by an inter-network PW is replicated to an AC interface and a multi-homed PE, and carries an ESI label when replicated to the multi-homed PE, and after receiving the traffic carrying the ESI label, the multi-homed PE replicates the traffic only to an AC interface, where the common EVPN peer forms an EVPN peer together with at least one of the plurality of PE devices, but the common EVPN peer is not a multi-homed PE.
When the mode of the inter-network PW is belonging to a PW redundancy group that supports dual-receiving and to-be-forwarded traffic is unicast traffic, the first network device determines a forwarding path based on MAC address learning, and the MAC address learning rules are as follows: a multi-homed PE learns MAC from a DF PW, a multi-homed PE learns MAC from a BDF PW, after learning the MAC from the DF PW, the multi-homed PE synchronizes the MAC to an EVPN peer with an inter-network PW flag added, and after the EVPN peer finds the MAC with the inter-network PW flag, if it is found that an ESI label value in a packet carrying the MAC exists locally, the EVPN peer points MAC of the EVPN peer to an address of a PE device sending the packet, or otherwise, the MAC is discarded.
By setting, matching, and using the foregoing inter-network PW forwarding rules and MAC learning rules for different traffic types, in the EVPN and VPLS active-active integration network, the EVPN side and the VPLS can be effectively interconnected, to prevent flapping when a VPLS device receives traffic, thereby ensuring normal service running.
In a possible design, for the inter-network PW in the mode of being a common PW, belonging to a PW redundancy group that does not support dual-receiving, or belonging to a PW redundancy group that supports dual-receiving, the rules for learning, by the first network device, a MAC address when forwarding unicast traffic further include, after the EVPN peer finds the MAC with the inter-network PW flag, if it is found that an ESI label value in a packet carrying the MAC exists locally, a BDF PW corresponding to the ESI value is set as a secondary path. When a primary path for forwarding the unicast traffic is unavailable, the secondary path may be used to forward the unicast traffic, thereby improving robustness and security of network communication.
In a possible design, a manner of adding an inter-network PW flag to a MAC address is adding a MAC extended community attribute, and flagging and distinguishing specific types of inter-network PWs using a lags field, or reusing an existing MAC mobility extended community attribute, and flagging and distinguishing the specific types of inter-network PWs using a reserved bit of a flags field.
According to a fifth aspect, an embodiment of this application provides a computer-readable storage medium or a computer program product configured to store a computer program. The computer program is configured to perform the method in any possible design of the first aspect.
To describe the technical solutions in some of the embodiments of this application more clearly, the following briefly describes the accompanying drawings describing some of the embodiments.
The following describes technical solutions of embodiments in this application with reference to accompanying drawings. A network architecture and a service scenario that are described in the embodiments of this application are intended to describe the technical solutions in the embodiments of this application more clearly, and do not constitute a unique limitation on the technical solutions provided in the embodiments of this application. A person of ordinary skill in the art may learn that, as a network architecture evolves and a new service scenario emerges, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
For more clear descriptions, some working principles and features about a VPLS network and an EVPN network are described first.
In the EVPN network scenario shown in
In CE4 device dual-homing networking, a redundancy mode of EVPN networking may be configured. That is, an active mode of PEs connected to a same CE is configured to a single-active mode or a multi-active mode. An Ethernet link may be in an active state or an inactive state. The active state means that the Ethernet link can be used to forward a data stream. The single-active mode means that only one Ethernet link is in the active state, and one or more other Ethernet links are in the inactive state. The multi-active mode means that states of some Ethernet links in Ethernet link segments are active, and states of other Ethernet links are inactive. The Ethernet links in the active state can forward a data stream through load balancing, to provide a transmission capability of a larger bandwidth. When an active Ethernet link is faulty, the active Ethernet link may be switched to a standby Ethernet link to forward a data stream.
Whether load balancing is performed for unicast traffic in CE dual-homing networking may be controlled by configuring the redundancy mode. For example, in
When the CE4 is in a dual-homing active-active mode, that is, when the CE4 is dual-homed to the PE1 and the PE2 and load balancing is enabled, if a neighbor relationship is established between the PE1 and the PE2, after the PE1 receives BUM traffic from the CE4, the PE1 forwards the BUM traffic to the PE2. To prevent the PE2 from forwarding the traffic to the CE4 and forming a loop, a split horizon function is defined in EVPN. That is, after the PE1 receives the BUM traffic from the CE4, the PE1 forwards the BUM traffic to the PE2. After receiving a packet, the PE2 checks an EVPN ESI label carried in the traffic. If it is found that an ESI value in the label is equal to an ESI value of a network segment connected to the PE2 and the CE4, the PE2 does not send the BUM traffic to the CE4, to avoid a loop.
It should be noted that the foregoing case in which the CE4 is dual-homed to the PE1 and the PE2 is merely used as an example. In an actual application scenario, a CE may be multi-homed to more than two PE devices. In this case, all PE devices to which a same CE device is homed are assigned a same ESI value. In addition, the multi-homed PE devices may be set to a multi-active mode, to implement load balancing between each other. The foregoing manner is referred to as CE multi-homing multi-active. In addition, not only the CE device but also another device type may be multi-homed to a plurality of PE devices. The other device type may be, for example, a terminal device. The multi-homing includes dual-homing, and the multi-active mode or the single-active mode is set for the plurality of PE devices as required. This may be set with reference to a specific application scenario. In either case, an implementation mechanism of multi-homing to more than two PE devices in the multi-active mode is similar to the dual-homing active-active mode.
Currently, a problem of switching from a VPLS network to an EVPN network exists in a provider network. In some specific scenarios, a provider may be intended to reconstruct only some PE devices. The IPTV service type shown in
In the scenario shown in
The replication and forwarding rules between the EVPN side and the VPLS side refer to rules followed when PE devices on the EVPN side and the VPLS side communicate with each other. When PEs only on the EVPN side communicate with each other, or PEs only on the VPLS side communicate with each other, a general rule of EVPN or VPLS is followed, respectively. The foregoing explanations apply to a plurality of or all embodiments of this application.
An embodiment of this application provides a traffic forwarding method 400. A procedure of the method 400 is shown in
S405: A first network device runs, together with a plurality of other network devices in a network, an EVPN, where the first network device serves as a PE device and forms, together with at least one PE in the EVPN, a multi-homed structure for a CE device or a terminal device.
S410: Connect to at least one PE in a VPLS through an inter-network pseudo wire PW.
S415: The first network device receives data traffic.
S420: The first network device forwards the data traffic based on a matching result between the data traffic and the following conditions, where the conditions include: (1) being sent by another PE device via an inter-network PW of the network device, (2) needing to be forwarded by the network device to a PE device connected via an inter-network PW, and/or (3) including an inter-network PW flag.
For example, in
In this embodiment of this application, the following describes applicable rules and traffic forwarding processes of inter-network PWs with reference to several specific scenarios.
In a possible design, for the EVPN and VPLS active-active integration network, for example, the network shown in
Based on whether a traffic type is unicast traffic or BUM traffic, the network includes at least two possible scenarios, and corresponding traffic processing methods are as follows:
Scenario 1: A PW is a common mode PW, and to-be-forwarded traffic is BUM traffic.
For ease of understanding, a BUM traffic replication rule in a single EVPN network is first described herein, which is referred to as a general rule of EVPN in this embodiment of the present disclosure. In the single EVPN network, after receiving BUM traffic sent by a CE device, a PE device replicates the BUM traffic to all locally connected attachment circuits ACs, and all EVPN peers that exchange packet messages with the PE device. The AC is a link for a CE device or another user equipment to access the PE, and replicated traffic may be sent to the CE device or the other user equipment using the AC. In this case, another PE device that receives the BUM traffic sent by the PE device replicates the BUM traffic to all locally connected ACs, but does not replicate the BUM traffic to an EVPN peer of the other PE device. In addition, when replicating the BUM traffic to the ACs, the other PE device performs split horizon processing based on an ESI label carried in the BUM traffic. That is, when the other PE device finds that as an ESI value of the ESI label carried in the BUM traffic is the same as an ESI value locally stored in the other PE device, and the other PE device is set as a BDF role corresponding to the ESI value, the BUM traffic is not replicated to a corresponding AC. For example, in a scenario of traffic forwarding of a PE device on the EVPN side shown in
Second, a BUM traffic replication rule in a single VPLS network is described, which is referred to as a general rule of VPLS for common PWs in this embodiment of the present disclosure. In the single VPLS network, a PE device forwards traffic received from a CE device to all PWs, but does not forward traffic received from any PE device, to avoid a loop.
Based on the foregoing content, replication rules for the BUM traffic defined in the scenario 1 in a broadcast domain in, for example, the EVPN and VPLS active-active integration network shown in
Therefore, for the BUM traffic defined in the scenario 1, replication and forwarding rules between the EVPN side and the VPLS side are as follows:
R505: Traffic from an AC interface can be replicated to an inter-network DF PW.
R510: Traffic from an AC interface is not replicated to an inter-network BDF PW.
R515: Traffic from a common EVPN peer is not replicated to an inter-network PW.
R520: Traffic from a multi-homed PE is replicated to an inter-network DF PW.
R525: Traffic received by an inter-network PW is replicated only to an AC interface.
Based on the foregoing replication rules R505 to R525, the network structure shown in
On the EVPN side, after the BUM1 traffic sent by the CE11 is received by the PE21, based on the general rule of EVPN for BUM1 traffic replication and forwarding, the PE21 replicates the BUM1 traffic to the AC interface on the PE21 that is configured to access the CE14, but does not replicate the BUM1 traffic to the AC interface corresponding to the CE11 from which the BUM1 traffic is sent, and the PE21 further replicates the BUM1 traffic to all EVPN peers of the PE21: the PE22 and the PE25.
When the BUM1 traffic is forwarded from the PE21 to the PE23 or the PE24, the BUM1 traffic is sent from the EVPN side to the VPLS side. In this case, because the BUM1 traffic enters the PE21 from the AC interface on the PE21 that is connected to the CE11, the replication rules R505 and R510 need to be applied. That is, the PE21 replicates the BUM1 traffic to the inter-network PW flagged as a DF PW to send the BUM1 traffic to the PE23. The PE21 finds that the inter-network PW between the PE21 and the PE24 is flagged as a BDF PW, and therefore does not replicate the BUM1 traffic to the inter-network PW flagged as a BDF PW. Therefore, the PE24 does not receive the BUM1 traffic of the CE11 sent from the PE21.
After receiving the BUM1 traffic replicated by the PE21, based on the general rule of EVPN, the PE22 sends, on the EVPN side, the BUM1 traffic to the AC interface on the PE22 that is configured to access the CE16. In addition, the PE22 finds that an ESI value of an ESI label carried in the BUM1 traffic is the same as the ESI value locally stored in the PE22. That is, the BUM1 traffic comes from the PE21 that has a CE11 dual-homing relationship with the PE22, and the PE22 is flagged as a BDF in the devices to which the CE11 is dual-homed. In this case, the PE22 does not forward the BUM1 traffic to the CE11 based on an EVPN split horizon principle. In addition, based on the general rule of EVPN, the PE22 does not replicate the BUM1 traffic to another EVPN peer, to avoid a loop. When the PE22 forwards the BUM1 traffic to the PE23 or the PE24, the PE22 finds that the BUM1 traffic is traffic from the PE21 that has a CE11 dual-homing relationship with the PE22, and the replication rule R520 needs to be applied. Therefore, the PE22 replicates the BUM1 traffic to the inter-network PW flagged as a DF PW to forward the BUM1 traffic to the PE24. The PE22 does not replicate the BUM1 traffic to the inter-network PW flagged as a BDF PW. Therefore, the PE23 does not receive the BUM1 traffic of the CE11 sent from the PE22. In addition, after the PE23 receives the BUM1 traffic replicated by the PE21 using the inter-network DF PW, based on the general rule of VPLS, the PE23 forwards the BUM1 traffic only to the AC interface configured to connect to the CE12, and does not replicate the BUM1 traffic to another PW. Similar to the operation of the PE23, after receiving the BUM1 traffic replicated by the PE22 using the inter-network DF PW, the PE24 forwards the BUM1 traffic only to the AC interface configured to connect to the CE12.
After the PE25 receives the BUM1 traffic replicated by the PE21, based on the general rule of EVPN, the PE25 sends, on the EVPN side, the BUM1 traffic to the AC interface configured to access the CE15, and based on the general rule of VPLS, the PE25 does not need to forward, on the VPLS side, the BUM1 traffic to the PE23 and the PE24 that are connected to the PE25 using common PWs. Therefore, for the CE devices CE12 and CE13 on the VPLS side, the BUM1 traffic sent from the CE11 is sent to the CE12 through a forwarding path of CE11-PE21-PE23, and the CE13 receives the BUM1 traffic of the CE11 through a forwarding path of CE11-PE21-PE22-PE24. In this way, it is ensured that the BUM1 traffic is sent to the CE12 or the CE13 only through a unique link on the PE23, so that no flapping occurs when the traffic is sent from the EVPN side to the CE device on the VPLS side. In addition, based on the general rule of EVPN, the CE devices CE14, CE15, and CE16 on the EVPN side may also receive the BUM1 traffic sent from the CE11. Finally, normal service running is ensured.
Because the CE11 is in a dual-homed mode, in some cases, for example, the CE11 may randomly determine, using a hash algorithm or another algorithm, whether to send BUM traffic to the PE21 or the PE22. In this case, for a specific replication and forwarding process, refer to
When the PE25 on the EVPN side receives BUM3 traffic sent by the CE15, a traffic replication and forwarding process in the entire network is shown in
Scenario 2: A PW is a common mode PW, and to-be-forwarded traffic is unicast traffic.
In the EVPN and VPLS active-active integration network, for the unicast traffic defined in the scenario 2, a forwarding path between the EVPN side and the VPLS side is determined based on MAC address learning rules. The MAC address learning rules are as follows:
R605: A multi-homed PE learns MAC from a DF PW.
R610: A multi-homed PE does not learn MAC from a BDF PW.
R615: After learning the MAC from the DF PW, the multi-homed PE synchronizes the MAC to an EVPN peer with an inter-network PW flag added.
R620: After the EVPN peer finds the MAC with the inter-network PW flag, if it is found that an ESI label value in a packet carrying the MAC exists locally, the EVPN peer points MAC of the EVPN peer to an address of a PE sending the packet, or otherwise, the MAC is discarded.
Based on the foregoing replication and forwarding rules, the network structure shown in
Based on rules R605 and R610, the PE21, as a dual-homed PE device, learns MAC1 only from the PE23 via the ESI1 DF PW, but does not learn MAC2 from the PE24 via the ESI2 BDF PW. Similar to the operation of the PE21, the PE22 learns the MAC2 from the PE24 via the ESI2 DF PW, but does not learn the MAC1 of the PE23 from the ESI1 BDF PW. Based on rule R615, after learning the MAC1 of the PE23, the dual-homed PE21 separately sends a first packet carrying the MAC1 to the EVPN peers PE22 and PE25, so that the MAC1 is synchronized to the EVPN peers PE22 and PE25. The first packet carries an ESI1 label, and the PE21 flags the MAC1 as being obtained via an inter-network PW. Similar to the operation after the PE21 learns the MAC1, the PE22 sends a second packet to synchronize the MAC2 to the EVPN peers PE21 and PE25. The second packet carries an ESI2 label, and the PE22 flags the MAC2 as being obtained via an inter-network PW. Optionally, a specific flagging manner may be, for example, setting a flag bit in the packet carrying the MAC, or sending a notification message for announcement, or any other feasible manner, provided that a receiver can learn that the received MAC is obtained via an inter-network PW.
Based on rule R620, the EVPN peer PE22 learns the MAC1 and learns that the MAC1 is obtained via an inter-network PW. In this case, the PE22 compares an ESI label value in the first packet carrying the MAC1 with an ESI value locally stored in the PE22, and finds that there is a same ESI label value ESI1. The PE22 points MAC of the PE22 to the PE21, that is, a sender of the first packet. The PE21 learns the MAC2 and learns that the MAC2 is obtained via an inter-network PW. In this case, the PE21 compares an ESI label value in the second packet carrying the MAC2 with an ESI value locally stored in the PE21, and finds that there is a same ESI2 label. The PE21 points MAC of the PE21 to the PE22, that is, a sender of the second packet. Similarly, based on rule R620, after learning the MAC1 or MAC2 address, the PE25 learns that the MAC1 and the MAC2 are obtained via an inter-network PW, and then checks a locally stored ESI value. However, the locally stored ESI value does not match the ESI1 carried in the first packet or the ESI2 carried in the second packet. Therefore, the MAC1 and the MAC2 are discarded.
In a possible design, the following rule is further included:
R625: After the EVPN peer finds the MAC with the inter-network PW flag, if it is found that an ESI label value in a packet carrying the MAC exists locally, a BDF PW corresponding to the ESI value is set as a secondary path.
It should be noted that
All the PWs in the foregoing scenario 1 and scenario 2 are in a common mode. However, in some actual networking scenarios, a PW may alternatively be in a form of a PW redundancy group (PWRG). The PW redundancy group is a PW protection mechanism that can be used in a VPLS scenario. A plurality of devices is deployed for a service for redundancy protection, to improve efficiency of device switching due to a fault and reduce service loss. To maintain original VPLS forwarding behavior in a PW redundancy group mode, it is necessary to ensure that only one of a group of PWs that form a redundancy backup is in an active state and all the other PWs are in a standby state. The PW redundancy group generally includes two modes: a master/slave mode and an independent mode. In the master/slave mode, a local end determines an active/standby state of a PW and notifies a remote end using a signaling protocol, and a remote PE may detect the active/standby state. Active/standby relationships of a PW side and an AC side do not affect each other, and fault isolation can be implemented between the PW side and the AC side. In the independent mode, an active/standby state of a PW of a local end is determined from an AC side negotiation result of a remote end, and the remote end notifies the active/standby state to the local end. AC side protection switching occurring due to a fault causes PW side protection switching to be performed at the same time, and fault isolation cannot be implemented. A PW in the active state in the PW redundancy group is referred to as a primary PW, and is set to being preferentially used to forward traffic. Another PW in the backup state is referred to as a secondary PW. When the primary PW works normally, the secondary PW is not used to forward traffic, but may be configured to receive traffic. The primary PW and the secondary PW may be determined using forwarding priority configuration parameters of PWs. A PW with the highest priority is used as the primary PW. In the master/slave mode, a local device may determine the primary and secondary PWs using the forwarding priority configuration parameters. In the independent mode, a forwarding status of a PW of a local end is determined based on a forwarding status learned by a remote end, rather than the forwarding priority configuration parameters.
In the EVPN and VPLS active-active integration network, a multi-homed PE on the EVPN side may be connected to a PE on the VPLS side in a form of a PW redundancy group.
Scenario 3: PWs of multi-homed PEs form a PW redundancy group and do not support dual-receiving, and to-be-forwarded traffic is BUM traffic.
For the BUM traffic defined in the scenario 3, replication and forwarding rules between the EVPN side and the VPLS side are as follows:
R705: Traffic from an AC interface can be replicated to an inter-network DF PW.
R710: Traffic from an AC interface is not replicated to an inter-network BDF PW.
R715: Traffic from a common EVPN peer is not replicated to an inter-network PW.
R720: Traffic from a multi-homed PE is replicated to an inter-network DF PW.
R725: Traffic received by an inter-network PW is replicated to an AC interface and a multi-homed PE, and carries an ESI label when replicated to the multi-homed PE.
R730: After receiving the traffic carrying the ESI label, the multi-homed PE replicates the traffic only to an AC interface.
When BUM traffic is forwarded from the EVPN side to the VPLS side, application scenarios and manners of the foregoing replication rules R705 to R720 are the same as those of the foregoing rules R505 to R520. For examples of BUM traffic forwarding processes, refer to
When BUM traffic is forwarded from the VPLS side to the EVPN side, rules R725 and R730 are applied. The network structure shown in
Scenario 4: PWs of multi-homed PEs form a PW redundancy group and do not support dual-receiving, and to-be-forwarded traffic is unicast traffic.
For the unicast traffic defined in the scenario 4, a forwarding path between the EVPN side and the VPLS side is determined based on MAC address learning rules. The MAC address learning rules are as follows:
R805: A multi-homed PE learns MAC from a DF PW.
R810: A multi-homed PE does not learn MAC from a BDF PW.
R815: After learning the MAC from the DF PW, the multi-homed PE synchronizes the MAC to an EVPN peer with an inter-network PW flag added.
R820: After the EVPN peer finds the MAC with the inter-network PW flag, if it is found that an ESI label value in a packet carrying the MAC exists locally, the EVPN peer points MAC of the EVPN peer to an address of a PE sending the packet, or otherwise, the MAC is discarded.
In this scenario, a MAC address learning process and replication rules of unicast traffic are the same as R605 to R620. For an example unicast traffic forwarding process, refer to
Scenario 5: PWs of multi-homed PEs form a PW redundancy group and support dual-receiving, and to-be-forwarded traffic is BUM traffic.
For the BUM traffic defined in the scenario 5, replication and forwarding rules between the EVPN side and the VPLS side are as follows:
R905: Traffic from an AC interface can be replicated to an inter-network DF PW.
R910: Traffic from an AC interface can be replicated to an inter-network BDF PW.
R915: Traffic from a common EVPN peer is not replicated to an inter-network PW.
R920: Traffic from a multi-homed PE is not replicated to an inter-network DF PW.
R925: Traffic received by an inter-network PW is replicated to an AC interface and a multi-homed PE, and carries an ESI label when replicated to the multi-homed PE.
R930: After receiving the traffic carrying the ESI label, the multi-homed PE replicates the traffic only to an AC interface.
The network structure in
Scenario 6: PWs of multi-homed PEs form a PW redundancy group and support dual-receiving, and to-be-forwarded traffic is unicast traffic.
For the unicast traffic defined in the scenario 6, a forwarding path between the EVPN side and the VPLS side is determined based on MAC address learning rules. The MAC address learning rules are as follows:
R1005: A multi-homed PE learns MAC from a DF PW.
R1010: A multi-homed PE learns MAC from a BDF PW.
R1015: After learning the MAC from the DF PW, the multi-homed PE synchronizes the MAC to an EVPN peer with an inter-network PW flag added.
R1020: After the EVPN peer finds the MAC with the inter-network PW flag, if it is found that an ESI label value in a packet carrying the MAC exists locally, the EVPN peer points MAC of the EVPN peer to an address of a PE sending the packet, or otherwise, the MAC is discarded.
It should be noted that, actually, modes of PWs connecting multi-homed PEs on the EVPN side and PEs on the VPLS side may be the same or different. For example,
When unicast traffic is replicated and forwarded, different MAC learning rules and replication and forwarding rules need to be determined based on different PW types. Therefore, it is necessary to flag an inter-network PW type of a source PW for a corresponding MAC address during MAC learning. There are three types of being a common PW, belonging to a PW redundancy group that does not support dual-receiving, and belonging to a PW redundancy group that supports dual-receiving. In addition, a same ESI label needs to be set for PWs that form a same PW redundancy group. To this end, it may be considered to add a PW flag to a MAC address in any feasible manner. Optionally, for example, it is considered as follows: (1) adding a MAC extended community attribute, and flagging and distinguishing the three types of PWs using a flags field, as shown in
The foregoing describes, in detail with reference to
The memory 501 is configured to store computer-readable instructions.
The processor 502 is configured to invoke the computer-readable instructions to: run, by the network device together with a plurality of other network devices, an EVPN, where the network device serves as a PE device and form, together with at least one PE in the EVPN, a multi-homed structure for a CE device or a terminal device, connect to at least one PE in a VPLS through an inter-network pseudo wire PW, receive data traffic using the network interface 503, and forward the data traffic based on a matching result between the data traffic and the following conditions using the network interface 503, where the conditions include: (1) being sent by another PE device via an inter-network PW of the network device, (2) needing to be forwarded by the network device to a PE device connected via an inter-network PW, and/or (3) including an inter-network PW flag.
For example, in
In another possible design, there may be a plurality of network interfaces configured to receive and forward data traffic. When there is a plurality of network interfaces, data traffic may be received and forwarded using a same or different network interfaces.
An embodiment of this application further provides a traffic forwarding system 600, which may be, for example, the network system structure shown in
Each first PE device in the multi-homed structure is connected to at least one identical second PE device using an inter-network PW, and the second PE device is a VPLS device. For example, in
The first PE device receives data traffic, and the first PE device forwards the data traffic based on a matching result between the data traffic and the following conditions, where the conditions include: (1) being sent by another PE device via an inter-network PW of the network device, (2) needing to be forwarded by the network device to a PE device connected via an inter-network PW, and/or (3) including an inter-network PW flag.
For example, in
An embodiment of this application further provides another traffic forwarding system 700, as shown in
For the network device 500, the traffic forwarding system 600, or the traffic forwarding system 700, for a specific replication rule applicable to an inter-network PW and a traffic forwarding process when the foregoing condition is met, refer to the scenarios 1 to 6 in the foregoing method embodiments. Details are not described herein again.
An embodiment of this application further provides a computer-readable storage medium or a computer program product configured to store a computer program. The computer program is configured to perform the traffic forwarding method 400.
It should be understood that, in this embodiment of this application, a function implemented by the processor 501 may be implemented by an integrated logic circuit of hardware or an instruction in a form of software, for example, a central processing unit (CPU), or another general purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or another programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, or the like. The general purpose processor may be a microprocessor, or the processor may be any conventional processor or the like.
It should be understood that in the embodiments of this application, the traffic sending and receiving function implemented by the network interface 501 may be implemented by an independent unit, or the network interface 501 may further include, for example, a receiving subunit and a sending subunit, respectively configured to implement traffic receiving, forwarding, and the like. This is not limited herein.
It should be understood that sequence numbers of the foregoing processes do not mean execution sequences in various embodiments of this application. The execution sequences of the processes should be determined according to functions and internal logic of the processes, and should not be construed as any limitation on the implementation processes of the embodiments of this application.
A person of ordinary skill in the art may be aware that, in combination with the examples described in the embodiments disclosed in this specification, modules and method steps may be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are performed by hardware or software depends on particular applications and design constraint conditions of the technical solutions. A person skilled in the art may use different methods to implement the described functions for each particular application.
All or some of the foregoing embodiments may be implemented using software, hardware, firmware, or any combination thereof. When software is used to implement the embodiments, the embodiments may be implemented completely or partially in a form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the procedure or functions according to the embodiments of this application are all or partially generated. The computer may be a general-purpose computer, a dedicated computer, a computer network, or other programmable apparatuses. The computer instructions may be stored in a computer-readable storage medium or may be transmitted from a computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website, computer, server, or data center to another website, computer, server, or data center in a wired (for example, a coaxial cable, an optical fiber, or a digital subscriber line (DSL)) or wireless (for example, infrared, radio, or microwave) manner. The computer-readable storage medium may be any usable medium accessible by a computer, or a data storage device, such as a server or a data center, integrating one or more usable media. The usable medium may be a magnetic medium (for example, a soft disk, a hard disk, or a magnetic tape), an optical medium (for example, a DIGITAL VERSATILE DISC (DVD)), a semiconductor medium (for example, a solid-state drive (SSD)), or the like. The embodiments in this specification are all described in a progressive manner, for same or similar parts in the embodiments, refer to these embodiments, and each embodiment focuses on a difference from other embodiments. Especially, apparatus and system embodiments are basically similar to a method embodiment, and therefore are described briefly, for related parts, refer to partial descriptions in the method embodiment.
In summary, it should be noted that what is described above is merely example embodiments of the technical solutions of this application, but is not intended to limit the protection scope of this application.
Number | Date | Country | Kind |
---|---|---|---|
201910779880.X | Aug 2019 | CN | national |
This is a continuation of International Patent Application No. PCT/CN2020/092705 filed on May 27, 2020, which claims priority to Chinese Patent Application No. 201910779880.X filed on Aug. 22, 2019. The disclosures of the aforementioned applications are hereby incorporated by reference in their entireties.
Number | Date | Country | |
---|---|---|---|
Parent | PCT/CN2020/092705 | May 2020 | US |
Child | 17675218 | US |