CN108243114B - Method, equipment and system for forwarding message - Google Patents

Method, equipment and system for forwarding message Download PDF

Info

Publication number
CN108243114B
CN108243114B CN201611220197.5A CN201611220197A CN108243114B CN 108243114 B CN108243114 B CN 108243114B CN 201611220197 A CN201611220197 A CN 201611220197A CN 108243114 B CN108243114 B CN 108243114B
Authority
CN
China
Prior art keywords
bypass
message
packet
fault detection
active
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201611220197.5A
Other languages
Chinese (zh)
Other versions
CN108243114A (en
Inventor
李娟�
张耀坤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
XFusion Digital Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201611220197.5A priority Critical patent/CN108243114B/en
Publication of CN108243114A publication Critical patent/CN108243114A/en
Application granted granted Critical
Publication of CN108243114B publication Critical patent/CN108243114B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/68Pseudowire emulation, e.g. IETF WG PWE3
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering

Abstract

A method, device and system for forwarding a packet are provided. Respectively sending request messages carrying Active status codes to a second PE device and a third PE device through a first PE device; the second PE device sets the prior forwarding state relative to the first PW and the prior forwarding state relative to the Bypass PW to be an Active state, and then sends a response message carrying an Active state code to the first PE device; the third PE device sets the preferential forwarding state relative to the second PW and the Bypass PW to be an Active state, and then sends a response message carrying a Standby state code to the first PE device; and after determining that the two response messages are received, the first PE device sets the preferential forwarding state relative to the first PW and the preferential forwarding state relative to the second PW to be an Active state. Therefore, flow balance is realized in the VPWS PW network, and the bandwidth utilization rate of the VPWS PW network is improved.

Description

Method, equipment and system for forwarding message
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method, a device, and a system for forwarding a packet. More particularly, the present application relates to PW Redundancy (Pseudo Wire Redundancy) technology.
Background
The PW redundancy technology provides a protection mechanism for Provider Edge (PE) devices or access links (access circuits, ACs) in a dual-homing scenario of user Edge (Customer Edge, CE) devices based on an Edge-to-Edge pseudowire Emulation (PWE 3) system. A PW redundancy group is formed by configuring a Primary (Primary) Pseudo Wire (PW) and a backup (Secondary) PW. The PW in the PW redundancy group can carry out data traffic forwarding, but only one PW is used for forwarding data traffic at any time, and under the normal condition, the main PW forwards the data traffic. And when the main PW fails, the data flow is quickly switched to the backup PW for forwarding. When the main PW is recovered to be effective, the data traffic is switched back to the main PW for forwarding.
A Virtual Private Wire Service Pseudo Wire (VPWS PW) is a specific implementation of the PW redundancy technology. Among them, Virtual Private Wire Service (VPWS) may also be called Virtual Leased Line (VLL). VPWS is a two-layer service bearer technology that emulates the basic behaviors and characteristics of services such as Asynchronous Transfer Mode (ATM), Frame Relay (FR), Ethernet (Ethernet), Time Division Multiplexing (TDM) circuit, Synchronous Optical Network (SONET)/Synchronous Digital Hierarchy (SDH) and the like as truly as possible in a Packet Switched Network (PSN).
In an actual application scenario, a main PW and a backup PW in a VPWS PW implement a redundancy protection function. However, since only one PW is used to forward data traffic at any time, the bandwidth resources of the PW redundancy group cannot be fully utilized. For example, when a primary PW is used to forward data traffic, a backup PW will be in a Standby (Standby) state, and the backup PW does not forward data traffic. Even if the bandwidth resource of the main PW is insufficient, the bandwidth resource of the backup PW cannot be utilized.
Disclosure of Invention
In view of this, embodiments of the present application provide a method, a device, and a system for forwarding a packet, so as to implement traffic balancing in a VPWS PW network, which is beneficial to improving a bandwidth utilization rate of the VPWS PW network.
The technical scheme provided by the embodiment of the application is as follows.
In a first aspect, a method for forwarding a packet is provided, where the method is applied to a VPWS PW redundant network, and the VPWS PW redundant network includes a first PE device, a second PE device, and a third PE device. The first PE device and the second PE device establish a first PW, the first PE device and the third PE device establish a second PW, and the second PE device and the third PE device establish a Bypass pseudowire Bypass PW. The method includes that the first PE device sends a first packet (the first packet is, for example, a PW status notification packet, and may specifically be a Label Distribution Protocol (LDP) packet) to the second PE device via the first PW, where the first packet carries an Active status code, and the first packet is used to request that the first PW is set to an Active status. The first PE device further sends a second message (the second message is, for example, a PW status notification message, and may specifically be an LDP message) to the third PE device via the second PW, where the second message carries an Active status code, and the second message is used to request to set the second PW to an Active status. Then, the first PE device receives a first response packet from the second PE device via the first PW, where the first response packet carries an Active status code. The first PE device also receives a second response message from the third PE device via the second PW, wherein the second response message carries a Standby status code. Then, after determining that the first response packet and the second response packet are received, the first PE device sets a preferential forwarding state of the first PE device with respect to the first PW to an Active state and sets a preferential forwarding state of the first PE device with respect to the second PW to an Active state.
Based on the scheme provided by the embodiment, in the operation process of the VPWS PW network, the first PE device may implement a negotiation with the second PE device and the third PE device, thereby implementing traffic balancing in the VPWS PW network, and facilitating improvement of the bandwidth utilization rate of the VPWS PW network.
In a possible implementation manner of the first aspect, the method further includes that the first PE device receives traffic from a customer edge CE device; and the first PE equipment forwards the traffic from the CE equipment to the second PE equipment and the third PE equipment through the first PW and the second PW in the Active state in a traffic balancing mode.
In yet another possible implementation manner of the first aspect, the method further includes that the first PE device generates a first failure detection packet, where the first failure detection packet is used to detect whether a failure exists in a communication link that reaches the third PE device from the first PE device via the first PW, the second PE device, and the Bypass PW; the first PE device sends the first fault detection message to the third PE device through the first PW, the second PE device and the Bypass PW; the first PE device receives, via the first PW, the second PE device, and the Bypass PW, a second failure detection packet from the third PE device, where the second failure detection packet is used to detect whether there is a failure in a communication link from the third PE device to the first PE device via the Bypass PW, the second PE device, and the first PW.
In yet another possible implementation manner of the first aspect, the method further includes that the first PE device generates a third failure detection packet, where the third failure detection packet is used to detect whether a failure exists in a communication link that reaches the second PE device from the first PE device via the second PW, the third PE device, and the Bypass PW; the first PE device sends the third failure detection packet to the second PE device via the second PW, the third PE device, and the Bypass PW; the first PE device receives, via the second PW, the third PE device, and the Bypass PW, a fourth fault detection packet from the second PE device, where the fourth fault detection packet is used to detect whether there is a fault in a communication link from the second PE device to the first PE device via the Bypass PW, the third PE device, and the second PW.
In a second aspect, a method for forwarding a packet is provided, where the method is applied to a VPWS PW redundant network, and the VPWS PW redundant network includes a first PE device, a second PE device, and a third PE device. The first PE device and the second PE device establish a first PW, the first PE device and the third PE device establish a second PW, and the second PE device and the third PE device establish a Bypass PW. The method includes that the second PE device receives, via the first PW, a first message (the first message is, for example, a PW status notification message, and may specifically be an LDP message) from the first PE device, where the first message carries an Active status code, and the first message is used to request that the first PW is set to an Active status. Then, the second PE device sets the preferential forwarding state of the second PE device with respect to the first PW to an Active state and sets the preferential forwarding state of the second PE device with respect to the Bypass PW to an Active state according to the first packet. And the second PE device sends a first response message to the first PE device via the first PW, wherein the first response message carries an Active status code.
Based on the scheme provided by the embodiment, in the operation process of the VPWS PW network, the second PE device may implement a traffic balancing in the VPWS PW network in a manner of negotiating with the first PE device and the third PE device, which is helpful for improving the bandwidth utilization rate of the VPWS PW network.
In a possible implementation manner of the second aspect, a customer edge CE device is connected to the second PE device and the third PE device in the VPWS PW redundant network through multi-frame Trunk MC-Trunk link dual homing, where a link between the CE device and the second PE device is an active link, and a link between the CE device and the third PE device is a standby link. The method further comprises the second PE device receiving traffic from the CE device via the active link; and the second PE device forwards the traffic from the CE device to the first PE device and the third PE device via the first PW and the Bypass PW in an Active state in a traffic balancing manner.
In yet another possible implementation manner of the second aspect, the method further includes that the second PE device generates a fourth fault detection packet, where the fourth fault detection packet is used to detect whether a communication link from the second PE device to the first PE device via the Bypass PW, the third PE device, and the second PW has a fault; the second PE device sends the fourth fault detection packet to the first PE device via the second PW, the third PE device, and the Bypass PW; the second PE device receives, via the second PW, the third PE device, and the Bypass PW, a third failure detection packet from the first PE device, where the third failure detection packet is used to detect whether there is a failure in a communication link from the first PE device to the second PE device via the second PW, the third PE device, and the Bypass PW.
In a third aspect, a method for forwarding a packet is provided, where the method is applied to a VPWS PW redundant network, and the VPWS PW redundant network includes a first PE device, a second PE device, and a third PE device. The first PE device and the second PE device establish a first PW, the first PE device and the third PE device establish a second PW, and the second PE device and the third PE device establish a Bypass PW. The method includes that the third PE device receives, via the second PW, a second message (the second message is, for example, a PW status notification message, and specifically, may be an LDP message) from the first PE device, where the second message carries an Active status code, and the second message is used to request that the second PW is set to an Active status. Then, the third PE device sets the preferential forwarding state of the third PE device with respect to the second PW to an Active state and sets the preferential forwarding state of the third PE device with respect to the Bypass PW to an Active state according to the second packet. And the third PE device sends a second response packet to the first PE device via the second PW, where the second response packet carries a Standby status code.
Based on the scheme provided by the embodiment, in the operation process of the VPWS PW network, the third PE device may implement traffic balancing in the VPWS PW network in a manner of negotiating with the first PE device and the second PE device, which is helpful for improving the bandwidth utilization rate of the VPWS PW network.
In a possible implementation manner of the third aspect, the method further includes that the third PE device generates a second failure detection packet, where the second failure detection packet is used to detect whether a failure exists in a communication link that reaches the first PE device from the third PE device via the Bypass PW, the second PE device, and the first PW; the third PE device sends the second fault detection packet to the first PE device via the first PW, the second PE device, and the Bypass PW; the third PE device receives, via the first PW, the second PE device, and the Bypass PW, a first failure detection packet from the first PE device, where the first failure detection packet is used to detect whether there is a failure in a communication link from the first PE device to the third PE device via the first PW, the second PE device, and the Bypass PW.
In a fourth aspect, a first PE device is provided, where the first PE device has a function of implementing a behavior of the first PE device in the above method. The functions can be realized based on hardware, and corresponding software can be executed based on hardware. The hardware or software includes one or more modules corresponding to the above-described functions.
In one possible design, the first PE device includes a processor and an interface in a structure, and the processor is configured to support the first PE device to perform corresponding functions in the above method. The interface is configured to support communication between the first PE device and the second PE device and the third PE device, and send information or an instruction related to the method to the second PE device and the third PE device, or receive information or an instruction related to the method from the second PE device and the third PE device. The first PE device may also include a memory, coupled to the processor, that retains program instructions and data necessary for the first PE device.
In a fifth aspect, a second PE device is provided, where the second PE device has a function of implementing a behavior of the second PE device in the above method. The functions can be realized based on hardware, and corresponding software can be executed based on hardware. The hardware or software includes one or more modules corresponding to the above-described functions.
In one possible design, the second PE device includes a processor and an interface in its structure, and the processor is configured to support the second PE device to perform the corresponding functions in the above method. The interface is configured to support communication between the second PE device and the first PE device and the third PE device, and send information or an instruction related to the method to the first PE device and the third PE device, or receive information or an instruction related to the method from the first PE device and the third PE device. The second PE device may also include a memory, coupled to the processor, that retains program instructions and data necessary for the second PE device.
In a sixth aspect, a third PE device is provided, where the third PE device has a function of implementing a behavior of the third PE device in the above method. The functions can be realized based on hardware, and corresponding software can be executed based on hardware. The hardware or software includes one or more modules corresponding to the above-described functions.
In one possible design, the third PE device has a structure including a processor and an interface, and the processor is configured to support the third PE device to perform corresponding functions in the above method. The interface is configured to support communication between the third PE device and the first PE device and the second PE device, and send information or an instruction related to the method to the first PE device and the second PE device, or receive information or an instruction related to the method from the first PE device and the second PE device. The third PE device may also include a memory, coupled to the processor, that retains program instructions and data necessary for the third PE device.
In the foregoing first aspect, the second aspect, the third aspect, the fourth aspect, the fifth aspect and the sixth aspect, optionally, the first fault detection packet and the second fault detection packet BFD packet are configured to be sent to the ue. The third fault detection message and the fourth fault detection message are BFD messages.
In a seventh aspect, a VPWS PW redundant network system is provided, where the system includes the first PE device in the fourth aspect, the second PE device in the fifth aspect, and the third PE device in the sixth aspect.
In an eighth aspect, a computer storage medium is provided for storing programs, codes or instructions for the first PE device, and when the programs, codes or instructions are executed by a processor or a hardware device, the functions or steps of the first PE device in the above aspects can be achieved.
In a ninth aspect, a computer storage medium is provided for storing programs, codes or instructions for the second PE device, which when executed by a processor or a hardware device, can perform the functions or steps of the second PE device in the above aspects.
In a tenth aspect, a computer storage medium is provided for storing programs, codes or instructions for the third PE device, and when the programs, codes or instructions are executed by a processor or a hardware device, the functions or steps of the third PE device in the above aspects can be achieved.
With the foregoing solution, in the method, the device, and the system for forwarding a packet provided in the embodiments of the present invention, a first PE device sends a request packet carrying an Active status code to a second PE device and a third PE device via a first PW and a second PW, respectively; the second PE device sets a preferential forwarding state of the second PE device relative to the first PW and a preferential forwarding state of the second PE device relative to the Bypass PW to be an Active state according to the request message, and then sends a response message carrying an Active state code to the first PE device; the third PE device sets a preferential forwarding state of the third PE device relative to the second PW and a preferential forwarding state of the third PE device relative to the Bypass PW to be an Active state according to the request message, and then sends a response message carrying a Standby state code to the first PE device; and after determining that the two response messages are received, the first PE device sets a preferential forwarding state of the first PE device relative to the first PW and a preferential forwarding state of the first PE device relative to the second PW to an Active state. Therefore, flow balance is realized in the VPWS PW network, and the bandwidth utilization rate of the VPWS PW network is improved.
Drawings
Fig. 1 is a schematic structural diagram of a VPWS PW redundant network according to an embodiment of the present application;
FIG. 2 is a schematic diagram of another VPWS PW redundancy network structure according to an embodiment of the present application;
fig. 3 is a flowchart of a method for forwarding a packet according to an embodiment of the present application;
FIG. 4 is a schematic diagram illustrating a VPWS PW redundancy network structure according to an embodiment of the present application;
FIG. 5 is a flow chart of a method of handling a fault according to an embodiment of the present application;
FIG. 6 is a flow chart of another method of handling a fault according to an embodiment of the present application;
FIG. 7 is a flow chart of yet another method for handling faults in accordance with an embodiment of the present application;
FIG. 8 is a flow chart of yet another method for handling faults in accordance with an embodiment of the present application;
FIG. 9 is a flow chart of yet another method for handling faults in accordance with an embodiment of the present application;
FIG. 10 is a flow chart of yet another method for handling faults in accordance with an embodiment of the present application;
fig. 11 is a schematic structural diagram of a first PE device according to an embodiment of the present application;
fig. 12 is a schematic hardware structure diagram of a first PE device according to an embodiment of the present application;
fig. 13 is a schematic structural diagram of a second PE device according to an embodiment of the present application;
fig. 14 is a schematic hardware configuration diagram of a second PE device according to an embodiment of the present application;
fig. 15 is a schematic structural diagram of a third PE device according to an embodiment of the present application;
fig. 16 is a schematic hardware configuration diagram of a third PE device according to the embodiment of the present application.
Detailed Description
The embodiment of the application provides a method, equipment and a system for forwarding a message, so that flow balance is realized in a VPWS PW network, and the bandwidth utilization rate of the VPWS PW network is improved.
The following are detailed descriptions of the respective embodiments.
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present application will be described below in detail with reference to the accompanying drawings in the embodiments of the present application. It is to be understood that the embodiments described below are only a few embodiments of the present application, and not all embodiments. Other embodiments will be apparent to those skilled in the art from consideration of the specification.
The terms "first," "second," "third," and "fourth," etc. in the description and claims of this application and the accompanying drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "comprising" and "having" are not exclusive. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements but may include other steps or elements not expressly listed.
Fig. 1 is a schematic structural diagram of a VPWS PW redundant network according to an embodiment of the present application. The VPWS PW redundancy network comprises a first PE device, a second PE device and a third PE device. The first PE device communicates with the second PE device and the third PE device via communication links, respectively. And establishing a PW redundancy group among the first PE device, the second PE device and the third PE device, wherein the PW redundancy group comprises a main PW and a backup PW. And establishing the main PW between the first PE device and the second PE device, and establishing the backup PW between the first PE device and the third PE device. The process of establishing the main PW and the backup PW may be implemented according to a corresponding standard formulated by the Internet Engineering Task Force (IETF), For example, Requisition For Comments (RFC) 6718, which is not described in detail herein. In addition, a Bypass pseudowire (Bypass PW) is established between the second PE device and the third PE device. The Bypass PW may adopt an Inter-frame Backup pseudowire (ICB PW) or a Dual Node Interconnection pseudowire (DNI PW). In this way, in the VPWS PW redundant network, the network formed by the first PE device, the second PE device, and the third PE device may be referred to as a PW side network.
The first PE device communicates with a first CE device over a communication link. The first CE device may send data traffic to the PW redundancy group via the first PE device, or may receive data traffic from the PW redundancy group via the first PE device. The communication link between the first CE device and the first PE device may be a physical link, or may be an aggregated link ethernet Trunk (Eth-Trunk) link composed of multiple physical links. In this way, in a VPWS PW redundant network, the network formed by the first PE device and the first CE device may be referred to as a local AC-side network.
A second CE device is connected to the second PE device and the third PE device in the VPWS PW redundant network through aggregated link Multi-Chassis (MC-Trunk) link dual homing. The MC-Trunk link may also be referred to as Enhanced Trunk (E-Trunk), among others. Specifically, the MC-Trunk link comprises two member Eth-Trunk links. Wherein one Eth-Trunk link is disposed between the second CE device and the second PE device, and another Eth-Trunk link is disposed between the second CE device and the third PE device. And in the MC-Trunk link, the active and standby states of two member Eth-Trunk links need to be configured. As shown in fig. 1, determining an Eth-Trunk link between the second CE device and the second PE device as a primary link, or referred to as a primary Eth-Trunk link; and determining an Eth-Trunk link between the second CE device and the third PE device as a standby link, or referred to as a standby Eth-Trunk link. In this way, in the VPWS PW redundant network, the network formed by the second PE device, the third PE device, and the second CE device may be referred to as a far-end AC-side network.
In the VPWS PW redundant network shown in fig. 1, the CE device may be a switch or a router, and the PE device may be a router or a three-layer switch. The VPWS PW redundant network shown in fig. 1 can be applied in a variety of scenarios. For example, the VPWS PW redundant Network is applied to a Mobile Bearer Network (Mobile Bearer Network), and a typical Mobile Bearer Network is an Internet Protocol Radio Access Network (IP RAN). In a mobile bearer Network, the first CE device may be a Base Station Controller (BTS), the second CE device may be a Base Station Controller (BSC) or a Radio Network Controller (RNC), the first PE device may be a Base Station side Gateway (CSG), and the second PE device and the third PE device may be a Base Station Controller side Gateway (RSG). For another example, the VPWS PW redundant Network is applied to a Fixed Network (Fixed Network). In a fixed Network, the first CE device and the second CE device may be sites (sites) on a user side, the sites may be located in a Virtual Private Network (VPN), the first PE device may be a Digital Subscriber Line Access Multiplexer (DSLAM), and the second PE device and the third PE device may be Broadband Access Servers (BAS).
In fig. 1, the VPWS PW redundancy protection mechanism can adopt two operation modes: Master/Slave Mode (Master/Slave Mode) and Independent Mode (Independent Mode). Next, two operation modes will be described separately.
For the master-slave mode, in a PW side network, a first PE device determines a preferred forwarding state (forwarding status) of the first PE device with respect to a main PW as an Active state, and sends a PW state notification packet carrying an Active state code to a second PE device. Wherein, the priority forwarding state is used for indicating the forwarding state of the PW determined by the PE equipment. The Active status code is used to indicate that the PW is an Active status for forwarding traffic, for example, according to RFC4447 or RFC6870 established by the IETF, the value of the Active status code is set to 0x00(0x represents a 16-ary system). After receiving a PW state notification message carrying an Active state code, the second PE device determines the priority forwarding state of the second PE device relative to the main PW as an Active state, and returns the PW state notification message carrying the Active state code to the first PE device. In this way, the first PE device and the second PE device both determine the preferential forwarding state of themselves with respect to the main PW as an Active state, and the preferential forwarding states at both ends of the main PW are the same, so that the main PW is determined as an Active state. And the first PE device determines the prior forwarding state of the first PE device relative to the backup PW as a Standby (Standby) state, and sends a PW state notification message carrying a Standby state code to a third PE device. The Standby status code is used to indicate that the PW is a Standby status that does not forward traffic, and the Standby status code has a value set to 0x20, for example, according to RFC4447 or RFC6870 specified by the IETF. And after receiving a PW state notification message carrying a Standby state code, the third PE device determines the prior forwarding state of the third PE device relative to the backup PW as the Standby state, and returns the PW state notification message carrying the Standby state code to the first PE device. In this way, the first PE device and the third PE device both determine the preferential forwarding state of themselves with respect to the backup PW as a Standby state, and the preferential forwarding states of both ends of the backup PW are the same, so that the backup PW is determined as a Standby state. The PW status notification packet may be a Label Distribution Protocol (LDP) packet. In a remote AC side network, a second CE device and the second PE device negotiate an Eth-Trunk Link between the second CE device and the second PE device as an active Link through a Link Aggregation Control Protocol (LACP) message. And negotiating an Eth-Trunk link between the second CE device and the third PE device into a standby link through an LACP message by the second CE device and the third PE device. In the master-slave mode, the negotiation procedures of the PW side network and the remote AC side network are isolated from each other. Through the negotiation process, the first CE device and the second CE device may mutually forward data traffic through the main PW and the main link, where a forwarding path of the data traffic is: the first CE device, the first PE device, the main PW, the second PE device, the main link and the second CE device.
For the independent mode, the PW state in the PW side network is determined by the Eth-Trunk link state in the remote AC side network and the PW state notification message interacted in the PW side network. Specifically, an Eth-Trunk link between the second CE device and the second PE device is negotiated as the active link, and an Eth-Trunk link between the second CE device and the third PE device is negotiated as the standby link. The first PE device determines that a local priority forwarding state is an Active state, and sends PW state notification messages carrying Active state codes to the second PE device and the third PE device respectively. Because the Eth-Trunk link between the second CE device and the second PE device is negotiated to be the Active link, the local preferential forwarding state determined by the second PE device is the Active state. And the second PE equipment compares the Active state code of the PW state notification message with the local priority forwarding state, and the Active state codes are matched with the local priority forwarding state and are both in an Active state, so that the second PE equipment determines the priority forwarding state of the second PE equipment relative to the main PW as the Active state, and sends the PW state notification message carrying the Active state code to the first PE equipment. And because the Eth-Trunk link between the second CE device and the third PE device is negotiated to be the Standby link, the local priority forwarding state determined by the third PE device is the Standby state. And the third PE equipment compares the Active state code of the PW state notification message with the local priority forwarding state, so that the third PE equipment determines the priority forwarding state of the second PE equipment relative to the backup PW as a Standby state and sends the PW state notification message carrying the Standby state code to the first PE equipment. The first PE device determines that the preferential forwarding state of the first PE device relative to the main PW is an Active state according to the received PW state notification message carrying the Active state code and by comparing that the Active state code of the PW state notification message is matched with the local preferential forwarding state. Thus, the master PW is determined to be Active. Correspondingly, the first PE device determines, according to the received PW status notification packet carrying the Standby status code, that the Active status code of the PW status notification packet does not match the local preferred forwarding status, so that the first PE device determines the preferred forwarding status of the first PE device with respect to the backup PW as the Standby status. Thus, the backup PW is determined to be in the Standby state. Through the negotiation process, the first CE device and the second CE device may mutually forward data traffic through the main PW and the main link, where a forwarding path of the data traffic is: the first CE device, the first PE device, the main PW, the second PE device, the main link and the second CE device. The PW status notification packet may be an LDP packet.
In both modes of operation, only one PW is used to forward data traffic at any time. In an actual application scenario, multiple PWs may be set or multiple tunnels may be carried in one PW. For example, two PWs are set between the first PE device and the second PE device, one being a main PW and the other being a backup PW; correspondingly, two PWs are set between the first PE device and the third PE device, one being a main PW and the other being a backup PW. Such a setting may enable the first PE device to simultaneously transmit data traffic to the second PE device and the third PE device based on different PW redundancy groups. For another example, a PW is set between the first PE device and the second PE device, where the PW includes multiple tunnels; correspondingly, a PW is set between the first PE device and the third PE device, where the PW includes multiple tunnels. Such an arrangement may enable the first PE device to simultaneously transmit data traffic to the second PE device and the third PE device based on different tunnel redundancy groups. However, for the above implementation, two PWs in each PW redundancy group or two tunnels in each tunnel redundancy group need to be kept as primary and secondary, and only one PW or one tunnel is used to forward data traffic, which cannot achieve true traffic balancing.
The embodiment of the application provides a method for forwarding a packet, so as to implement a function of flow balancing and improve the bandwidth utilization rate of a VPWS PW on the basis of keeping the redundancy protection functions of a main PW and a backup PW in the VPWS PW. In this application, traffic balancing may also be referred to as load sharing, and without adding a special description, traffic balancing is equivalent to load sharing.
Fig. 3 is a flowchart illustrating a method for forwarding a packet according to an embodiment of the present application. The method shown in fig. 3 may be applied to the VPWS PW redundant network shown in fig. 2, where the VPWS PW redundant network includes a first PE device, a second PE device, and a third PE device, a first PW is established between the first PE device and the second PE device, a second PW is established between the first PE device and the third PE device, and a Bypass PW is established between the second PE device and the third PE device. Specifically, in the VPWS PW redundant network shown in fig. 2, in the negotiation stage, the main PW and the standby PW are not set any more, that is, the main PW and the standby PW are not distinguished in the VPWS PW redundant network. The method comprises the following steps:
s101, the first PE device sends a first message to a second PE device, the first message carries an Active state code, and the first message is used for requesting to set the first PW in an Active state.
S102, the first PE device sends a second message to a third PE device, the second message carries an Active state code, and the second message is used for requesting to set the second PW in an Active state.
In the VPWS PW redundant network shown in fig. 2, in the negotiation stage, the primary and standby PWs are not set any more, that is, the primary PW and the backup PW are not distinguished in the VPWS PW redundant network. Moreover, in the VPWS PW redundant network, the master/slave mode and the independent mode are not distinguished any more. The VPWS PW redundant network described in fig. 2 can be viewed as a completely new negotiation process in terms of traffic balancing.
And the first PE equipment sends the first message to the second PE equipment through the first PW, wherein the first message carries an Active state code, and the first message is used for requesting to set the first PW in an Active state. Optionally, the first message is a PW status notification message carrying an Active status code. The Active status code is used for requesting to set the PW to be in a state capable of forwarding the traffic. According to the foregoing embodiment, the PW status notification packet may be an LDP packet. The value of the Active status code may be set to 0x00, for example.
Based on the same manner, the first PE device further sends the second message to the third PE device via the second PW, where the second message carries an Active status code, and the second message is used to request to set the second PW to an Active status. Optionally, the second message is a PW status notification message carrying an Active status code.
The present embodiment does not limit the execution sequence of S101 and S102, and it should be understood that S101 may be executed before S102; s101 may also be executed after S102; s101 may also be performed simultaneously with S102.
S103, the second PE device receives the first message.
For example, the second PE device receives, via the first PW, a PW status notification message carrying an Active status code from the first PE device.
And S104, the second PE device sets the preferential forwarding state of the second PE device relative to the first PW to an Active state and sets the preferential forwarding state of the second PE device relative to the Bypass PW to an Active state according to the first message.
For example, after receiving a PW status notification message carrying an Active status code from the first PE device, the second PE device determines that the PW status notification message carries the Active status code. Then, the second PE device sets the preferential forwarding state of the second PE device with respect to the first PW to an Active state, and the second PE device sets the preferential forwarding state of the second PE device with respect to the Bypass PW to an Active state. The beneficial effect of switching the Bypass PW to the Active state by the second PE device is that, after the data traffic sent by the second CE device to the first CE device reaches the second PE device via the Active link of the far-end AC side network, the second PE device may balance the data traffic to the first PW and the Bypass PW for transmission.
S105, the second PE device sends a first response message to the first PE device through the first PW, and the first response message carries an Active status code.
When the second PE device performs the operation of S104, it also checks a forwarding state locally stored in the second PE device. As shown in fig. 2, in the remote AC-side network, a second CE device is connected to the second PE device and the third PE device in the VPWS PW redundant network through MC-Trunk link dual homing. Determining a link between the second CE device and the second PE device to be a primary link; a link between the second CE device and the third PE device is determined to be a backup link. Therefore, the second PE device determines that the forwarding state stored locally is an Active state according to the Active link. And the second PE equipment determines the Active state code carried by the generated first response message according to the locally stored Active forwarding state and the Active state code carried in the PW state notification message received from the first PE equipment. And after setting the preferential forwarding state of the second PE device relative to the first PW to an Active state and setting the preferential forwarding state of the second PE device relative to the Bypass PW to an Active state, the second PE device sends a first response packet to the first PE device, where the first response packet carries an Active state code.
S106, the third PE device receives the second message.
For example, the third PE device receives, via the second PW, a PW status notification message carrying an Active status code from the first PE device.
And S107, the third PE device sets the preferential forwarding state of the third PE device relative to the second PW to an Active state and sets the preferential forwarding state of the third PE device relative to the Bypass PW to an Active state according to the second message.
For example, in a similar operation to the foregoing S104, after receiving the PW status notification message carrying the Active status code from the first PE device, the third PE device determines that the PW status notification message carries the Active status code. Then, the third PE device sets the preferential forwarding state of the third PE device with respect to the second PW to an Active state, and the third PE device sets the preferential forwarding state of the third PE device with respect to the Bypass PW to an Active state.
And S108, the third PE device sends a second response message to the first PE device through the second PW, wherein the second response message carries a Standby status code.
When the third PE device performs the operation of S107, it also checks a forwarding state locally stored by the third PE device. As shown in fig. 2, in the remote AC-side network, a second CE device is connected to the second PE device and the third PE device in the VPWS PW redundant network through MC-Trunk link dual homing. Determining a link between the second CE device and the second PE device to be a primary link; a link between the second CE device and the third PE device is determined to be a backup link. Therefore, the third PE device determines that the forwarding state stored locally is a Standby state according to the backup link. And the third PE equipment determines the generated Standby state code carried by the second response message according to the Standby forwarding state stored locally and the Active state code carried in the PW state notification message received from the first PE equipment. And after setting the preferential forwarding state of the third PE device relative to the second PW to an Active state and setting the preferential forwarding state of the third PE device relative to the Bypass PW to an Active state, the third PE device sends a second response packet to the first PE device, where the second response packet carries a Standby state code. The third PE device does not set the preferential forwarding state of the third PE device relative to the second PW to be the Standby state because the forwarding state stored locally is the Standby state; but according to the PW status notification packet sent by the opposite end (the first PE device), it is ensured that the PW side network in the VPWS PW redundant network can implement a forwarding mode with balanced traffic. In addition, the Standby status code carried in the generated second response message by the third PE device is for not changing the message negotiation rule in the negotiation process.
The present embodiment does not limit the execution sequence of S103-S105 and S106-S108, and it should be understood that S103-S105 may be executed before S106-S108; S106-S108 may also be performed after S106-S108; S106-S108 may also be performed concurrently with S106-S108.
S109, after the first PE device determines that the first response packet and the second response packet are received, setting a preferential forwarding state of the first PE device with respect to the first PW to an Active state, and setting a preferential forwarding state of the first PE device with respect to the second PW to an Active state.
According to the foregoing, the first PE device may receive the first response packet and the second response packet from the second PE device and the third PE device, respectively. When the first PE device determines that the first response packet and the second response packet are received, the first PE device may determine that the second PE device has performed the operation of S104 and that the third PE device has performed the operation of S107. Then, the first PE device sets a preferential forwarding state of the first PE device with respect to the first PW to an Active state, so that the first PW is determined to be in the Active state. And the first PE device sets a preferential forwarding state of the first PE device with respect to the second PW to an Active state, so that the second PW is determined to be an Active state. In addition, according to the foregoing descriptions of S104 and S107, the priority forwarding state of the Bypass PW is determined to be an Active state.
After the negotiation process of S101-S109 is completed, the forwarding state of the VPWS PW redundant network is shown in fig. 2. In this way, the first PE device may perform traffic balancing calculation on the data traffic from the first CE device based on a Hash (Hash) algorithm. The first PE device sends a part of the data traffic to the second PE device through the first PW, and the part of the data traffic reaches the second CE device through the active link; and the first PE device further sends another part of the data traffic to the third PE device through the second PW, and reaches the second CE device through the Bypass PW, the second PE device, and the active link. In the same way, after the data traffic sent by the second CE device reaches the second PE through the active link, the second PE device may perform traffic balance calculation on the data traffic based on a Hash algorithm, where a part of the traffic reaches the first PE device through the first PW, and another part of the traffic reaches the first PE device through the Bypass PW, the third PE device, and the second PW. The calculation principle of the traffic balance calculation is not limited in the present application, and for example, the traffic may be equally distributed, or the traffic may be distributed according to bandwidths of two PWs, or the traffic may be distributed according to the traffic type of the traffic.
Through the above embodiment, the first PE device sends a request message carrying an Active status code to the second PE device and the third PE device via the first PW and the second PW, respectively; the second PE device sets a preferential forwarding state of the second PE device relative to the first PW and a preferential forwarding state of the second PE device relative to the Bypass PW to be an Active state according to the request message, and then sends a response message carrying an Active state code to the first PE device; the third PE device sets a preferential forwarding state of the third PE device relative to the second PW and a preferential forwarding state of the third PE device relative to the Bypass PW to be an Active state according to the request message, and then sends a response message carrying a Standby state code to the first PE device; and after determining that the two response messages are received, the first PE device sets a preferential forwarding state of the first PE device relative to the first PW and a preferential forwarding state of the first PE device relative to the second PW to an Active state. Therefore, flow balance is realized in the VPWS PW network, and the bandwidth utilization rate of the VPWS PW network is improved.
Optionally, the method further includes generating, by the first PE device, a first fault detection packet, where the first fault detection packet is used to detect whether a fault exists in a communication link from the first PE device to the third PE device via the first PW, the second PE device, and the Bypass PW. And the first PE equipment sends the first fault detection message to the third PE equipment through the first PW, the second PE equipment and the Bypass PW.
And the third PE equipment generates a second fault detection message, wherein the second fault detection message is used for detecting whether a communication link reaching the first PE equipment from the third PE equipment through the Bypass PW, the second PE equipment and the first PW has a fault. And the third PE device sends the second fault detection message to the first PE device through the first PW, the second PE device and the Bypass PW.
And the first PE equipment receives a second fault detection message from the third PE equipment through the first PW, the second PE equipment and the Bypass PW.
And the third PE equipment receives a first fault detection message from the first PE equipment through the first PW, the second PE equipment and the Bypass PW.
Further optionally, the first fault Detection packet and the second fault Detection packet are Bidirectional Forwarding Detection (BFD) packets.
For example, a set of fault detection messages is run between the first PE device and the third PE device, where the set of fault detection messages belongs to a bypassing fault detection message. That is, the first PE device and the third PE device send fault detection messages, which are a first fault detection message and a second fault detection message, to each other through the first PW, the second PE device, and the Bypass PW. The fault detection message may be a BFD message. For convenience of description, in the following embodiments, the group of fault detection messages is referred to as BFD3, so that the first fault detection message is referred to as BFD31, and the second fault detection message is referred to as BFD 32.
BFD31 and BFD32 are respectively deployed on the first PE device and the third PE device, and are configured to detect a failure of a detour path between the first PE device and the third PE device, where the detour path is a path formed by the first PW, the second PE device, and the Bypass PW. The implementation of the BFD31 is as follows: the first PE device sets a My Discriminator field in a BFD31 message as the first PE device, and sets a Your Discriminator field in a BFD31 message as the third PE device; the BFD31 is then sent to the first PW. Thereby, the third PE device is ensured to be able to receive the BFD 31. Accordingly, the implementation of the BFD32 is as follows: the third PE device sets a My Discriminator field in a BFD32 message as the third PE device, and sets a Your Discriminator field in a BFD32 message as the first PE device; and then sending the BFD32 to the Bypass PW. Thereby, the first PE device is ensured to be able to receive the BFD 32. Wherein the BFD31 and the BFD32 may be transmitted by the first PE device and the third PE device, respectively, at a predetermined period. The advantage of applying the BFD31 and BFD32 is that the fault condition of the detour path between the first PE device and the third PE device can be accurately detected.
Optionally, the method further includes generating, by the first PE device, a third fault detection packet, where the third fault detection packet is used to detect whether a fault exists in a communication link from the first PE device to the second PE device via the second PW, the third PE device, and the Bypass PW. And the first PE equipment sends the third fault detection message to the second PE equipment through the second PW, the third PE equipment and the Bypass PW.
And the second PE device generates a fourth fault detection message, wherein the fourth fault detection message is used for detecting whether a communication link from the second PE device to the first PE device through the Bypass PW, the third PE device and the second PW has a fault. And the second PE device sends the fourth fault detection message to the first PE device through the second PW, the third PE device and the Bypass PW.
And the first PE equipment receives a fourth fault detection message from the second PE equipment through the second PW, the third PE equipment and the Bypass PW.
And the second PE equipment receives a third fault detection message from the first PE equipment through the second PW, the third PE equipment and the Bypass PW.
Further optionally, the third fault detection packet and the fourth fault detection packet are BFD packets.
For example, according to the above description of the BFD3, a set of fault detection messages is run between the first PE device and the second PE device, where the set of fault detection messages belongs to a bypassing fault detection message. That is, the first PE device and the second PE device send fault detection messages, which are a third fault detection message and a fourth fault detection message, to each other through the second PW, the third PE device, and the Bypass PW. The fault detection message may be a BFD message. For convenience of description, in the following embodiments, the group of fault detection messages is referred to as BFD4, so that the third fault detection message is referred to as BFD41, and the fourth fault detection message is referred to as BFD 42.
BFD41 and BFD42 are respectively deployed on the first PE device and the second PE device, and are configured to detect a failure of a detour path between the first PE device and the second PE device, where the detour path is a path formed by the second PW, the third PE device, and the Bypass PW. The implementation manners of the BFD41 and the BFD42 can be referred to the implementation manners of the BFD31 and the BFD32, which are not described herein in detail.
Optionally, the method further includes generating, by the first PE device, a fifth fault detection packet, where the fifth fault detection packet is used to detect whether a communication link from the first PE device to the second PE device via the first PW has a fault. And the first PE device sends the fifth fault detection message to the second PE device through the first PW.
And the second PE device generates a sixth fault detection message, where the sixth fault detection message is used to detect whether a communication link from the second PE device to the first PE device via the first PW has a fault. And the second PE device sends the sixth fault detection message to the first PE device through the first PW.
And the first PE equipment receives a sixth fault detection message from the second PE equipment through the first PW.
And the second PE equipment receives a fifth fault detection message from the first PE equipment through the first PW.
According to the foregoing embodiment, in the subsequent embodiments, the fifth failure detection packet and the sixth failure detection packet are named as BFD11 and BFD12, respectively, and the failure detection packet group formed by them is named as BFD 1. The implementation of the BFD11 and BFD12 is not described in detail herein.
Optionally, the method further includes generating, by the first PE device, a seventh fault detection packet, where the seventh fault detection packet is used to detect whether a communication link from the first PE device to the third PE device via the second PW has a fault. And the first PE device sends the seventh fault detection message to the third PE device through the second PW.
And the third PE device generates an eighth fault detection packet, where the eighth fault detection packet is used to detect whether a communication link from the third PE device to the first PE device via the second PW has a fault. And the third PE device sends the eighth fault detection message to the first PE device through the second PW.
And the first PE device receives an eighth fault detection message from the third PE device via the second PW.
And the third PE device receives a seventh fault detection message from the first PE device via the second PW.
According to the foregoing embodiment, in the subsequent embodiments, the seventh fault detection packet and the eighth fault detection packet are named as BFD21 and BFD22, respectively, and the fault detection packet group formed by them is named as BFD 2. The implementation of the BFD21 and BFD22 is not described in detail herein.
Fig. 4 shows a schematic structural diagram of a VPWS PW redundant network according to an embodiment of the present application. Fig. 4 is a diagram illustrating a scenario in which a failure occurs in the forwarding scheme based on the traffic balancing shown in fig. 2. Fault 1, fault 2, fault 3, fault 4, fault 5 and fault 6 are shown in fig. 4. It should be understood that the scenario presented in fig. 4 does not represent that the above 6 faults occur simultaneously, but represents the locations where the above 6 faults occur. In the following embodiments of the present application, the method of handling each fault will be discussed. Furthermore, the following embodiments only discuss the case where one kind of fault occurs at the same time, and do not discuss the case where two or more kinds of faults occur at the same time.
Fig. 5 shows a flowchart of a method for processing the failure 1 in fig. 4, and the method shown in fig. 5 is a failure processing implementation after the failure 1 occurs in the case that the forwarding manner of the traffic balancing shown in fig. 2 has been implemented. Wherein, the failure 1 means that the first PW between the first PE device and the second PE device has a failure. The method comprises the following steps:
s201, the first PE device determines that BFD12 or BFD32 cannot be received in a preset period and BFD42 can be received.
Based on the foregoing embodiment, data traffic sent from the first CE device to the second CE device, and data traffic sent from the second CE device to the first CE device are both shared to the first PW and the second PW in a traffic balancing manner for forwarding. In the process of forwarding data traffic, the 4 groups of BFD messages described above, i.e., BFD1-BFD4, may be periodically forwarded. When the first PE device determines that the BFD12 or BFD32 cannot be received within the predetermined period and the BFD42 can be received, the first PE device may determine that the first PW failed and the second PE device is normal.
And S202, the first PE device switches the preferential forwarding state of the first PE device relative to the first PW from an Active state to a Standby state, and sends a third message to the second PE device, wherein the third message is used for requesting to switch the first PW from the Active state to the Standby state.
Through the determination process in S201, the first PE device may determine that a failure occurs on the first PW, and the first PE device expects that the first PW does not forward data traffic any more. Therefore, the first PE device switches the preferential forwarding state of the first PE device with respect to the first PW from an Active state to a Standby state. The first PE device is not sending data traffic to the first PW. And the first PE device sends a third message to the second PE device via the first PW. The third packet may be a PW status notification packet carrying a Standby status code, where the PW status notification packet may be an LDP packet, and the Standby status code is, for example, 0x 20.
Wherein, due to the failure of the first PW, the third packet may not be received by the second PE device. In this case, the first PE device still sends the third packet to reduce the complexity of the operation performed by the first PE device.
S203, the second PE device determines that the BFD11 cannot be received in a preset period and the BFD41 can be received.
S203 and S201 do not limit the execution sequence, and are triggered according to the failure detection message. After the first PW failure, if the failure detection packet is sent bidirectionally, the second PE device will also fail to receive BFD11 within a predetermined period. Further, the second PE device may be able to receive BFD41 such that the second PE device may be able to determine that a failure occurred on the first PW instead of the first PE device.
In addition, the PW link belongs to a bidirectional link, and even if the PW link fails in a single direction, both PE devices cannot receive the failure detection message of the other PE device. For example, the first PE device and the second PE device send BFD packets to each other, and it is assumed that the first PE device fails in the direction to the second PE device, and the first PE device normally communicates in the direction to the first PE device. The second PE device will not receive the BFD packet from the first PE device, and the second PE device sets the port to DOWN, so that the second PE device does not send the BFD packet to the first PE device any more. Therefore, the first PE device cannot receive the BFD packet from the second PE device.
And S204, the second PE device switches the preferential forwarding state of the second PE device relative to the first PW from an Active state to a Standby state, and switches the preferential forwarding state of the second PE device relative to the Bypass PW from the Active state to the Bypass state.
S205, the second PE device sends a termination message to a third PE device, wherein the termination message is used for indicating an Active state for terminating the Bypass PW.
And after determining that the first PW has a fault, the second PE device switches the preferential forwarding state of the second PE device relative to the first PW from an Active state to a Standby state, and switches the preferential forwarding state of the second PE device relative to the Bypass PW from the Active state to the Bypass state. And the second PE device sends a termination message to the third PE device through the Bypass PW. The termination message is a PW status notification message carrying a termination status code, where the PW status notification message may be an LDP message, and the termination status code is, for example, 0x 32.
S206, the third PE device receives a termination message.
And S207, the third PE device switches the preferential forwarding state of the third PE device relative to the Bypass PW from an Active state to a Bypass state according to the termination message.
For example, the third PE device receives a PW status notification message carrying a termination status code via a Bypass PW, and switches the preferential forwarding state of the third PE device relative to the Bypass PW from an Active state to a Bypass state according to the PW status notification message.
Through the fault processing procedures of S201-S207, the forwarding mode of the VPWS PW redundancy network is switched from the flow balancing mode to the redundancy protection mode. And due to the failure of the first PW, the data traffic forwarding path is: the first CE equipment, the first PE equipment, the second PW, the third PE equipment, the Bypass PW, the second PE equipment, the main link and the second CE equipment. When the failure 1 is eliminated, the VPWS PW redundant network may enter the traffic balancing mode again according to the implementation shown in fig. 3.
Fig. 6 shows a flowchart of a method for processing the failure 2 in fig. 4, and the method shown in fig. 6 is a failure processing implementation after the failure 2 occurs in the case that the forwarding manner of the traffic balancing shown in fig. 2 has been implemented. Wherein, the failure 2 means that the second PW between the first PE device and the third PE device has a failure. The method comprises the following steps:
s301, the first PE device determines that BFD22 or BFD42 cannot be received in a preset period and BFD32 can be received.
Based on the foregoing description of S201, correspondingly, when the first PE device determines that the BFD22 or BFD42 cannot be received within the predetermined period and the BFD32 can be received, the first PE device may determine that the second PW failed and the third PE device is normal.
And S302, the first PE device switches the preferential forwarding state of the first PE device relative to the second PW from an Active state to a Standby state, and sends a fourth message to a third PE device, wherein the fourth message is used for requesting to switch the second PW from the Active state to the Standby state.
Through the determination process in S301, the first PE device may determine that a failure occurs on the second PW, and the first PE device expects that the second PW does not forward data traffic any more. Therefore, the first PE device switches the preferential forwarding state of the first PE device with respect to the second PW from the Active state to the Standby state. The first PE device is not sending data traffic to the second PW. And the first PE device sends a fourth message to the third PE device via the second PW. The fourth packet may be a PW status notification packet carrying a Standby status code, where the PW status notification packet may be an LDP packet, and the Standby status code is, for example, 0x 20.
Wherein, due to the failure of the second PW, the fourth packet may not be received by the third PE device. In this case, the first PE device still sends the fourth packet to reduce the complexity of the operation performed by the first PE device.
And S303, the third PE device determines that the BFD21 cannot be received in a preset period and the BFD31 can be received.
And S304, the third PE device switches the preferential forwarding state of the third PE device relative to the second PW from an Active state to a Standby state, and switches the preferential forwarding state of the third PE device relative to the Bypass PW from the Active state to the Bypass state.
S305, the third PE device sends a termination message to the second PE device, wherein the termination message is used for indicating the Active state of terminating the Bypass PW
The implementation processes of S303-S305 can refer to the corresponding implementation processes of S203-S205, which are not described herein again.
S306, the second PE device receives the termination message.
And S307, the second PE device switches the preferential forwarding state of the second PE device relative to the Bypass PW from the Active state to the Bypass state according to the termination message.
The implementation processes of S306-S307 may refer to the corresponding implementation processes of S206-S207, which are not described herein again.
Through the fault processing procedures of the above S301 to S307, the forwarding mode of the VPWS PW redundant network is switched from the traffic balancing mode to the redundancy protection mode. And due to the failure of the second PW, the data traffic forwarding path is: the first CE device, the first PE device, the first PW, the second PE device, the active link and the second CE device. When the failure 2 is eliminated, the VPWS PW redundant network may enter the traffic balancing mode again according to the implementation shown in fig. 3.
Fig. 7 shows a flowchart of a method for processing the failure 3 in fig. 4, and the method shown in fig. 7 is a failure processing implementation after the failure 3 occurs in the case that the forwarding manner of the traffic balancing shown in fig. 2 has been implemented. Wherein, the failure 3 means that the active link between the second PE device and the second CE device has a failure. The method comprises the following steps:
s401, the second PE device determines that the fault detection message from the second CE device cannot be received in a preset period.
According to the foregoing embodiments, the second CE device is connected to the second PE device and the third PE device in the VPWS PW redundant network through MC-Trunk link dual homing. And negotiating, in a master/slave mode and an independent mode, an Eth-Trunk link between the second CE device and the second PE device as an active link and an Eth-Trunk link between the second CE device and the third PE device as a standby link. In the scenario shown in fig. 2, data traffic sent from the first CE device is forwarded to the second CE device through two paths, namely "first PE device-first PW-second PE device-active link" and "first PE device-second PW-third PE device-Bypass PW-second PE device-active link"; and forwarding the data traffic sent from the second CE device to the first CE device through two paths, namely "active link-second PE device-first PW-first PE device" and "active link-second PE device-Bypass PW-third PE device-second PW-first PE device".
The second PE device and the second CE device send a failure detection packet to each other, and when the second PE device determines that the failure detection packet from the second CE device cannot be received within a predetermined period, the second device may determine that the active link fails. The descriptions of the interaction between the failure detection packet and the failure detection packet by the second PE device and the second CE device may refer to the descriptions of the foregoing embodiments, which are not described herein again.
S402, the second PE device modifies the forwarding state locally stored by the second PE device into a Standby state.
And S403, the third PE device modifies the forwarding state locally stored by the third PE device into an Active state.
When the second PE device determines that the failure detection packet from the second CE device cannot be received within the predetermined period, correspondingly, the second CE device determines that the failure detection packet from the second PE device cannot be received within the predetermined period. In this way, the second CE device triggers the active-standby switching between the active link and the standby link of the remote AC-side network, so as to switch the data traffic to the standby link.
In the scenario shown in fig. 2, both the first PW and the second PW are Active. Therefore, the main-standby switching of the far-end AC side network will not affect the forwarding mode of the PW side network, and the PW side network still keeps the flow balance mode. For example, data traffic sent from the first CE device is forwarded to the second CE device through two paths, i.e., "first PE device-first PW-second PE device-Bypass PW-third PE device-backup link" and "first PE device-second PW-third PE device-backup link".
However, due to the active-standby switching of the far-end AC-side network, the forwarding states locally stored by the second PE device and the third PE device will change. Specifically, the second PE device modifies a forwarding state locally stored by the second PE device from an Active state to a Standby state; and the third PE equipment modifies the forwarding state locally stored by the third PE equipment from a Standby state to an Active state.
Fig. 8 shows a flow chart of a method for processing the failure 4 in fig. 4, and the method shown in fig. 8 is a failure processing implementation after the failure 4 occurs in the case that the forwarding manner of the traffic balancing shown in fig. 2 has been implemented. Wherein, the failure 4 means that the second PE device has a failure. The method comprises the following steps:
s501, the first PE device determines that the BFD12 or the BFD32 cannot be received in a preset period and the BFD42 cannot be received.
Based on the foregoing description of S201, correspondingly, when the first PE device determines that the BFD12 or BFD32 cannot be received within a predetermined period and the BFD42 cannot be received, the first PE device may determine that the second PE device fails.
And S502, the first PE device switches the preferential forwarding state of the first PE device relative to the first PW from an Active state to a Standby state, and sends the third message to the second PE device, where the third message is used to request that the first PW is switched from the Active state to the Standby state.
The implementation manner of S502 may refer to the implementation manner of S202 in the foregoing embodiment, which is not described herein again.
And S503, the third PE device determines that the BFD31 cannot be received within a preset period.
When the third PE device determines that BFD31 cannot be received within a predetermined period, the third PE device may determine that there is a failure on a path that conveys the BFD31, where the path that conveys the BFD31 is: and reaching the third PE device from the first PE device via the first PW, the second PE device and the Bypass PW.
And S504, the third PE device switches the preferential forwarding state of the third PE device relative to the Bypass PW from an Active state to a Bypass state, and sends a termination message to the second PE device, wherein the termination message is used for indicating the termination of the Active state of the Bypass PW.
Similarly, the implementation manner of S504 may refer to the corresponding implementation process of S304-S305 in the foregoing embodiment, which is not described herein again. Wherein, due to the failure of the second PE device, the termination packet cannot be received by the second PE device. In this case, the third PE device still sends the termination packet to reduce the complexity of the operation performed by the third PE device.
Correspondingly, due to the failure of the second PE device, the second CE device triggers the active-standby switching of the active link and the standby link of the remote AC-side network, so as to switch the data traffic to the standby link.
Through the fault processing procedures of the above steps S501 to S504, the forwarding mode of the VPWS PW redundant network is switched from the traffic balancing mode to the redundancy protection mode. And because the second PE device fails, the data traffic forwarding path is: first CE device-first PE device-second PW-third PE device-backup link-second CE device. When the failure 4 is eliminated, the VPWS PW redundant network may enter the traffic balancing mode again according to the implementation shown in fig. 3.
Fig. 9 shows a flowchart of a method for processing the failure 5 in fig. 4, and the method shown in fig. 9 is a failure processing implementation after the failure 5 occurs in the case that the forwarding manner of the traffic balancing shown in fig. 2 has been implemented. Wherein, the failure 5 means that the third PE device has a failure. The method comprises the following steps:
s601, the first PE device determines that the BFD22 or the BFD42 cannot be received in a preset period and the BFD32 cannot be received.
Based on the foregoing description of S301, correspondingly, when the first PE device determines that BFD22 or BFD42 cannot be received within a predetermined period and BFD32 cannot be received, the first PE device may determine that the third PE device fails.
And S602, the first PE device switches the preferential forwarding state of the first PE device relative to the second PW from an Active state to a Standby state, and sends the fourth message to the third PE device, where the fourth message is used to request that the second PW is switched from the Active state to the Standby state.
The implementation manner of S602 may refer to the implementation manner of S302 in the foregoing embodiment, which is not described herein again. Wherein, due to the failure of the third PE device, the fourth packet cannot be received by the third PE device. The first PE sends the fourth packet to reduce complexity of the execution operation of the first PE device.
S603, the second PE device determines that BFD41 cannot be received within a preset period.
When the second PE device determines that BFD41 cannot be received within a predetermined period, the third PE device may determine that there is a failure on a path that conveys the BFD41, where the path that conveys the BFD41 is: and the second PE device is reached from the first PE device through the second PW, the third PE device and the Bypass PW.
And S604, the second PE device switches the preferential forwarding state of the second PE device relative to the Bypass PW from an Active state to a Bypass state, and sends a termination message to the third PE device, wherein the termination message is used for indicating the termination of the Active state of the Bypass PW.
Similarly, the implementation manner of S604 may refer to the corresponding implementation processes of S204 to S205 in the foregoing embodiments, which are not described herein again. Wherein, due to the failure of the third PE device, the termination packet cannot be received by the third PE device. In this case, the second PE device still sends the termination packet in order to reduce the complexity of the execution operation of the second PE device.
Through the fault processing procedures of the above S601-S604, the forwarding mode of the VPWS PW redundant network is switched from the traffic balancing mode to the redundancy protection mode. And because the third PE device fails, the data traffic forwarding path is: the first CE device, the first PE device, the first PW, the second PE device, the active link and the second CE device. When the failure 5 is eliminated, the VPWS PW redundant network may enter the traffic balancing mode again according to the implementation shown in fig. 3.
Fig. 10 shows a flow chart of a method for processing the failure 6 in fig. 4, and the method shown in fig. 10 is a failure processing implementation after the failure 6 occurs in the case that the forwarding manner of the traffic balancing shown in fig. 2 has been implemented. The failure 6 means that the Bypass PW between the second PE device and the third PE device has a failure. The method comprises the following steps:
s701, the first PE device determines that the BFD32 and the BFD42 cannot be received in a preset period and the BFD12 and the BFD22 can be received.
Based on the foregoing description, correspondingly, when the first PE device determines that BFD32 and BFD42 cannot be received within a predetermined period and BFD12 and BFD22 can be received, the first PE device may determine that the Bypass PW is failed, and the first PE device and the second PE device are normal.
And S702, the first PE device switches the preferential forwarding state of the first PE device relative to the second PW from an Active state to a Standby state, and sends a fourth message to a third PE device, wherein the fourth message is used for requesting to switch the second PW from the Active state to the Standby state.
Similarly, the implementation manner of S702 may refer to the corresponding implementation process of S302 in the foregoing embodiment, which is not described herein again.
S703, the third PE device receives the fourth packet.
And S704, the third PE device switches the preferential forwarding state of the third PE device relative to the second PW from an Active state to a Standby state, and switches the preferential forwarding state of the third PE device relative to the Bypass PW from the Active state to the Bypass state.
S705, the third PE device sends a termination message to the second PE device, wherein the termination message is used for indicating the Active state of the Bypass PW to be terminated.
After receiving the fourth packet, the third PE device may perform operations of S704 and S705 according to a request of the fourth packet. Similarly, the implementation manners of S704 and S705 may refer to the corresponding implementation processes of S304 and S305 in the foregoing embodiments, which are not described herein again.
In addition, according to the foregoing embodiment, when a failure occurs on the Bypass PW, it may cause the third PE device to determine that BFD31 cannot be received within a predetermined period. Moreover, according to the above S704 and S705, the operation triggered by the third PE device because the third PE device cannot receive BFD31 is already triggered and completed by the fourth packet, and therefore, the third PE device does not need to repeatedly execute.
Moreover, due to the Bypass PW failure, the second PE device will be triggered to perform the following actions.
S706, the second PE device determines that BFD41 cannot be received within a preset period.
And S707, the second PE device switches the preferential forwarding state of the second PE device relative to the Bypass PW from an Active state to a Bypass state, and sends a termination message to the third PE device, wherein the termination message is used for indicating the Active state of the Bypass PW to be terminated.
Similarly, the implementation manners of S706-S707 may refer to the corresponding implementation procedures of S603-S604 in the foregoing embodiments, which are not described herein again.
Through the fault processing procedures of the above steps S701 to S707, the forwarding mode of the VPWS PW redundant network is switched from the traffic balancing mode to the redundancy protection mode. And because Bypass PW fails, the data traffic forwarding path is: the first CE device, the first PE device, the first PW, the second PE device, the active link and the second CE device. When the failure 6 is eliminated, the VPWS PW redundant network may enter the traffic balancing mode again according to the implementation shown in fig. 3.
Fig. 11 to 16 are schematic diagrams of PE structures and hardware of a VPWS PW redundant network in this application, where the VPWS PW redundant network includes a first PE device, a second PE device, and a third PE device, a first PW is established between the first PE device and the second PE device, a second PW is established between the first PE device and the third PE device, and a Bypass pseudowire Bypass PW is established between the second PE device and the third PE device.
Fig. 11 is a schematic structural diagram of a first PE device 1000 according to an embodiment of the present application. The first PE device shown in fig. 11 may perform corresponding steps performed by the first PE device in the method of the foregoing embodiment. As shown in fig. 11, the first PE device 1000 includes a receiving unit 1002, a processing unit 1004, and a sending unit 1006, where:
the sending unit 1006 is configured to send a first message to the second PE device via the first PW, where the first message carries an Active status code, and the first message is used to request that the first PW is set to an Active status;
the sending unit 1006 is further configured to send a second message to the third PE device via the second PW, where the second message carries an Active status code, and the second message is used to request that the second PW is set to an Active status;
the receiving unit 1002 is configured to receive a first response packet from the second PE device via the first PW, where the first response packet carries an Active status code;
the receiving unit 1002 is further configured to receive a second response packet from the third PE device via the second PW, where the second response packet carries a Standby status code;
the processing unit 1004 is configured to, after determining that the first response packet and the second response packet are received, set a preferential forwarding state of the first PE device with respect to the first PW to an Active state, and set a preferential forwarding state of the first PE device with respect to the second PW to an Active state.
Optionally, the processing unit 1004 is further configured to generate a first fault detection packet, where the first fault detection packet is used to detect whether a communication link from the first PE device to the third PE device via the first PW, the second PE device, and the Bypass PW has a fault; the sending unit 1006 is further configured to send the first failure detection packet to the third PE device via the first PW, the second PE device, and the Bypass PW; the receiving unit 1002 is further configured to receive, via the first PW, the second PE device, and the Bypass PW, a second failure detection packet from the third PE device, where the second failure detection packet is used to detect whether a communication link from the third PE device to the first PE device via the Bypass PW, the second PE device, and the first PW has a failure.
Optionally, the processing unit 1004 is further configured to generate a third failure detection packet, where the third failure detection packet is used to detect whether a communication link from the first PE device to the second PE device via the second PW, the third PE device, and the Bypass PW has a failure; the sending unit 1006 is further configured to send the third failure detection packet to the second PE device via the second PW, the third PE device, and the Bypass PW; the receiving unit 1002 is further configured to receive a fourth fault detection packet from the second PE device via the second PW, the third PE device, and the Bypass PW, where the fourth fault detection packet is configured to detect whether a communication link from the second PE device to the first PE device via the Bypass PW, the third PE device, and the second PW has a fault.
Optionally, the first fault detection packet and the second fault detection packet are BFD packets.
Optionally, the third fault detection packet and the fourth fault detection packet are BFD packets.
The first PE device shown in fig. 11 may perform corresponding steps performed by the first PE device in the method of the foregoing embodiment. Therefore, flow balance is realized in the VPWS PW network, and the bandwidth utilization rate of the VPWS PW network is improved.
Fig. 12 is a schematic hardware configuration diagram of a first PE device 1100 according to an embodiment of the present application. The first PE device shown in fig. 12 may perform the corresponding steps performed by the first PE device in the method of the foregoing embodiment.
As shown in fig. 12, the first PE device 1100 includes a processor 1101, a memory 1102, an interface 1103 and a bus 1104, wherein the interface 1103 can be implemented in a wireless or wired manner, specifically, an element such as a network card, and the processor 1101, the memory 1102 and the interface 1103 are connected by the bus 1104.
The interface 1103 may specifically include a transmitter and a receiver, configured to send and receive information between the first PE device and the second PE device and the third PE device in the foregoing embodiments; or for the first PE device to receive and transmit information with the first CE device connected to the first PE device. The processor 1101 is configured to execute the processing performed by the first PE device in the foregoing embodiment. The memory 1102 includes an operating system 11021 and application programs 11022 for storing programs, code, or instructions which, when executed by a processor or hardware device, may perform the processes of fig. 3, 5-10 involving the first PE device.
It is to be understood that fig. 12 only shows a simplified design of the first PE device. In practical applications, the first PE device may include any number of interfaces, processors, memories, etc., and all first PE devices that can implement the present application are within the scope of the present application.
In addition, the present application provides a computer storage medium for storing computer software instructions for the first PE device, which includes programs for executing the embodiments shown in fig. 3, 5-10.
Fig. 13 is a schematic structural diagram of a second PE device 1200 according to an embodiment of the present application. The second PE device shown in fig. 13 may perform the corresponding steps performed by the second PE device in the method of the above embodiment. As shown in fig. 13, the second PE device 1200 includes a receiving unit 1202, a processing unit 1204 and a sending unit 1206, wherein:
the receiving unit 1206 is configured to receive a first message from the first PE device via the first PW, where the first message carries an Active status code, and the first message is used to request that the first PW is set to an Active status;
the processing unit 1204 is configured to set, according to the first packet, a preferential forwarding state of the second PE device with respect to the first PW to an Active state, and set a preferential forwarding state of the second PE device with respect to the Bypass PW to an Active state;
the sending unit 1206 is configured to send a first response packet to the first PE device via the first PW, where the first response packet carries an Active status code.
Optionally, the processing unit 1204 is further configured to generate a fourth fault detection packet, where the fourth fault detection packet is used to detect whether a communication link from the second PE device to the first PE device via the Bypass PW, the third PE device, and the second PW has a fault; the sending unit 1206 is further configured to send the fourth failure detection packet to the first PE device via the second PW, the third PE device, and the Bypass PW; the receiving unit 1202 is further configured to receive, via the second PW, the third PE device, and the Bypass PW, a third failure detection packet from the first PE device, where the third failure detection packet is used to detect whether a communication link from the first PE device to the second PE device via the second PW, the third PE device, and the Bypass PW has a failure.
Optionally, the third fault detection packet and the fourth fault detection packet are BFD packets.
The second PE device shown in fig. 13 may perform the corresponding steps performed by the second PE device in the method of the above embodiment. Therefore, flow balance is realized in the VPWS PW network, and the bandwidth utilization rate of the VPWS PW network is improved.
Fig. 14 is a schematic hardware configuration diagram of a second PE device 1300 according to an embodiment of the present application. The second PE device shown in fig. 14 may perform the corresponding steps performed by the second PE device in the method of the above embodiment.
As shown in fig. 14, the second PE device 1300 includes a processor 1301, a memory 1302, an interface 1303 and a bus 1304, where the interface 1303 may be implemented in a wireless or wired manner, specifically, may be an element such as a network card, and the processor 1301, the memory 1302 and the interface 1303 are connected by the bus 1304.
The interface 1303 may specifically include a transmitter and a receiver, and is used for the second PE device to send and receive information to and from the first PE device and the third PE device in the foregoing embodiments; or for the second PE device to send and receive information to and from a second CE device to which the second PE device is connected. The processor 1301 is configured to perform the processing performed by the second PE device in the foregoing embodiment. The memory 1302 includes an operating system 13021 and application programs 13022 for storing programs, codes, or instructions which, when executed by a processor or hardware device, may perform the processes of fig. 3, 5-10 involving the second PE device.
It is to be understood that fig. 14 only shows a simplified design of the second PE device. In practical applications, the second PE device may include any number of interfaces, processors, memories, etc., and all second PE devices that can implement the present application are within the scope of the present application.
In addition, the present application provides a computer storage medium for storing computer software instructions for the second PE device, which includes programs for executing the embodiments shown in fig. 3, 5-10.
Fig. 15 is a schematic structural diagram of a third PE device 1400 according to an embodiment of the present application. The third PE device shown in fig. 15 may perform the corresponding steps performed by the third PE device in the method of the above-described embodiment. As shown in fig. 15, the third PE device 1400 includes a receiving unit 1402, a processing unit 1404, and a transmitting unit 1406, wherein:
the receiving unit 1402 is configured to receive a second packet from the first PE device via the second PW, where the second packet carries an Active status code, and the second packet is used to request that the second PW is set to an Active status;
the processing unit 1404 is configured to set, according to the second packet, a preferential forwarding state of the third PE device relative to the second PW to an Active state, and set a preferential forwarding state of the third PE device relative to the Bypass PW to an Active state;
the sending unit 1406 is configured to send a second response packet to the first PE device via the second PW, where the second response packet carries a Standby status code.
Optionally, the processing unit 1404 is further configured to generate a second failure detection packet, where the second failure detection packet is used to detect whether a communication link from the third PE device to the first PE device via the Bypass PW, the second PE device, and the first PW has a failure; the sending unit 1406 is further configured to send the second failure detection packet to the first PE device via the first PW, the second PE device, and the Bypass PW; the receiving unit 1402 is further configured to receive a first failure detection packet from the first PE device via the first PW, the second PE device, and the Bypass PW, where the first failure detection packet is used to detect whether a communication link from the first PE device to the third PE device via the first PW, the second PE device, and the Bypass PW has a failure.
Optionally, the first fault detection packet and the second fault detection packet are BFD packets.
The third PE device shown in fig. 15 may perform the corresponding steps performed by the third PE device in the method of the above-described embodiment. Therefore, flow balance is realized in the VPWS PW network, and the bandwidth utilization rate of the VPWS PW network is improved.
Fig. 16 is a schematic hardware configuration diagram of a third PE device 1500 according to an embodiment of the present application. The third PE device shown in fig. 16 may perform the corresponding steps performed by the third PE device in the method of the above-described embodiment.
As shown in fig. 16, the third PE device 1500 includes a processor 1501, a memory 1502, an interface 1503, and a bus 1504, wherein the interface 1503 may be implemented by a wireless or wired manner, specifically, an element such as a network card, and the processor 1501, the memory 1502, and the interface 1503 are connected by the bus 1504.
The interface 1503 may specifically include a transmitter and a receiver, which are used for the third PE device to send and receive information to and from the first PE device and the second PE device in the foregoing embodiments; or for the third PE device to send and receive information to and from a second CE device to which the third PE device is connected. The processor 1501 is configured to execute the processing performed by the third PE device in the foregoing embodiment. The memory 1502 includes an operating system 15021 and an application program 15022 for storing programs, codes, or instructions that when executed by a processor or hardware device may perform the processes of fig. 3, 5-10 involving the third PE device.
It is to be understood that fig. 16 shows only a simplified design of the third PE device. In practical applications, the third PE device may include any number of interfaces, processors, memories, etc., and all third PE devices that can implement the present application are within the scope of the present application.
In addition, the present application provides a computer storage medium for storing computer software instructions for the third PE device, which includes programs for executing the embodiments shown in fig. 3, 5-10.
Fig. 2 is a schematic diagram of a VPWS PW redundant network according to an embodiment of the present invention. The system comprises the first PE device in the aforementioned FIG. 11 or FIG. 12, the second PE device in the aforementioned FIG. 13 or FIG. 14, and the third PE device in the aforementioned FIG. 15 or FIG. 16.
The steps of a method or algorithm described in connection with the disclosure herein may be embodied in hardware or in software instructions executed by a processor. The software instructions may consist of corresponding software modules that may be stored in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. Of course, the storage medium may also be integral to the processor. The processor and the storage medium may reside in an ASIC. Additionally, the ASIC may reside in user equipment. Of course, the processor and the storage medium may reside as discrete components in user equipment.
Those skilled in the art will recognize that, in one or more of the examples described above, the functions described in this invention may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
The above-mentioned embodiments, objects, technical solutions and advantages of the present invention are further described in detail, it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made on the basis of the technical solutions of the present invention should be included in the scope of the present invention.

Claims (23)

1. A method for forwarding a packet is applied to a virtual private line service (VPWS) PW redundant network, wherein the VPWS PW redundant network comprises a first Provider Edge (PE) device, a second PE device and a third PE device, a first PW is established between the first PE device and the second PE device, a second PW is established between the first PE device and the third PE device, and a Bypass pseudowire Bypass PW is established between the second PE device and the third PE device, and the method comprises the following steps:
the first PE device sends a first message to the second PE device through the first PW, wherein the first message carries an Active state code, and the first message is used for requesting to set the first PW in an Active state;
the first PE device sends a second message to the third PE device via the second PW, wherein the second message carries an Active state code, and the second message is used for requesting to set the second PW in an Active state;
the first PE device receives a first response message from the second PE device via the first PW, wherein the first response message carries an Active status code;
the first PE device receives a second response message from the third PE device through the second PW, wherein the second response message carries a Standby status code;
after the first PE device determines that the first response packet and the second response packet are received, setting a preferential forwarding state of the first PE device with respect to the first PW to an Active state, and setting a preferential forwarding state of the first PE device with respect to the second PW to an Active state.
2. The method of claim 1, further comprising:
the first PE equipment receives traffic from Customer Edge (CE) equipment;
and the first PE equipment forwards the traffic from the CE equipment to the second PE equipment and the third PE equipment through the first PW and the second PW in the Active state in a traffic balancing mode.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
the first PE device generates a first fault detection message, where the first fault detection message is used to detect whether a fault exists in a communication link from the first PE device to the third PE device via the first PW, the second PE device, and the Bypass PW;
the first PE device sends the first fault detection message to the third PE device through the first PW, the second PE device and the Bypass PW;
the first PE device receives, via the first PW, the second PE device, and the Bypass PW, a second failure detection packet from the third PE device, where the second failure detection packet is used to detect whether there is a failure in a communication link from the third PE device to the first PE device via the Bypass PW, the second PE device, and the first PW.
4. The method according to claim 1 or 2, characterized in that the method further comprises:
the first PE device generates a third fault detection packet, where the third fault detection packet is used to detect whether a communication link from the first PE device to the second PE device via the second PW, the third PE device, and the Bypass PW has a fault;
the first PE device sends the third failure detection packet to the second PE device via the second PW, the third PE device, and the Bypass PW;
the first PE device receives, via the second PW, the third PE device, and the Bypass PW, a fourth fault detection packet from the second PE device, where the fourth fault detection packet is used to detect whether there is a fault in a communication link from the second PE device to the first PE device via the Bypass PW, the third PE device, and the second PW.
5. The method of claim 3,
the first fault detection message and the second fault detection message are Bidirectional Forwarding Detection (BFD) messages.
6. The method of claim 4,
the third fault detection message and the fourth fault detection message are BFD messages.
7. A method for forwarding a packet is applied to a virtual private line service (VPWS) PW redundant network, wherein the VPWS PW redundant network comprises a first Provider Edge (PE) device, a second PE device and a third PE device, a first PW is established between the first PE device and the second PE device, a second PW is established between the first PE device and the third PE device, and a Bypass pseudowire Bypass PW is established between the second PE device and the third PE device, and the method comprises the following steps:
the second PE device receives a first message from the first PE device through the first PW, wherein the first message carries an Active state code, and the first message is used for requesting to set the first PW in an Active state;
the second PE device sets a preferential forwarding state of the second PE device relative to the first PW to be an Active state and sets a preferential forwarding state of the second PE device relative to the Bypass PW to be an Active state according to the first message;
and the second PE equipment sends a first response message to the first PE equipment through the first PW, wherein the first response message carries an Active status code.
8. The method of claim 7, wherein a Customer Edge (CE) device is connected to the second PE device and the third PE device in the VPWS PW redundant network via multi-frame Trunk MC-Trunk link dual homing, wherein a link between the CE device and the second PE device is an active link, and wherein a link between the CE device and the third PE device is a standby link, the method further comprising:
the second PE device receives the traffic from the CE device through the main link;
and the second PE device forwards the traffic from the CE device to the first PE device and the third PE device via the first PW and the Bypass PW in an Active state in a traffic balancing manner.
9. The method according to claim 7 or 8, characterized in that the method further comprises:
the second PE device generates a fourth fault detection packet, where the fourth fault detection packet is used to detect whether a fault exists in a communication link from the second PE device to the first PE device via the Bypass PW, the third PE device, and the second PW;
the second PE device sends the fourth fault detection packet to the first PE device via the second PW, the third PE device, and the Bypass PW;
the second PE device receives, via the second PW, the third PE device, and the Bypass PW, a third failure detection packet from the first PE device, where the third failure detection packet is used to detect whether there is a failure in a communication link from the first PE device to the second PE device via the second PW, the third PE device, and the Bypass PW.
10. The method of claim 9,
the third fault detection message and the fourth fault detection message are BFD messages.
11. A method for forwarding a packet is applied to a virtual private line service (VPWS) PW redundant network, wherein the VPWS PW redundant network comprises a first Provider Edge (PE) device, a second PE device and a third PE device, a first PW is established between the first PE device and the second PE device, a second PW is established between the first PE device and the third PE device, and a Bypass pseudowire Bypass PW is established between the second PE device and the third PE device, and the method comprises the following steps:
the third PE device receives a second message from the first PE device via the second PW, wherein the second message carries an Active state code, and the second message is used for requesting to set the second PW in an Active state;
the third PE device sets a preferential forwarding state of the third PE device relative to the second PW as an Active state and sets a preferential forwarding state of the third PE device relative to the Bypass PW as an Active state according to the second message;
and the third PE equipment sends a second response message to the first PE equipment through the second PW, wherein the second response message carries a Standby status code.
12. The method of claim 11, further comprising:
the third PE device generates a second fault detection packet, where the second fault detection packet is used to detect whether a communication link from the third PE device to the first PE device via the Bypass PW, the second PE device, and the first PW has a fault;
the third PE device sends the second fault detection packet to the first PE device via the first PW, the second PE device, and the Bypass PW;
the third PE device receives, via the first PW, the second PE device, and the Bypass PW, a first failure detection packet from the first PE device, where the first failure detection packet is used to detect whether there is a failure in a communication link from the first PE device to the third PE device via the first PW, the second PE device, and the Bypass PW.
13. The method of claim 12,
the first fault detection message and the second fault detection message are Bidirectional Forwarding Detection (BFD) messages.
14. A first Provider Edge (PE) device, the first PE device being applied to a virtual private line service (VPWS) pseudo wire (VPWS) PW redundant network, the VPWS PW redundant network further comprising a second PE device and a third PE device, a first PW being established between the first PE device and the second PE device, a second PW being established between the first PE device and the third PE device, and a Bypass pseudo wire (Bypass) PW being established between the second PE device and the third PE device, the first PE device comprising:
a sending unit, configured to send a first message to the second PE device via the first PW, where the first message carries an Active status code, and the first message is used to request that the first PW is set to an Active status;
the sending unit is further configured to send a second message to the third PE device via the second PW, where the second message carries an Active status code, and the second message is used to request that the second PW is set to an Active status;
a receiving unit, configured to receive a first response packet from the second PE device via the first PW, where the first response packet carries an Active status code;
the receiving unit is further configured to receive a second response packet from the third PE device via the second PW, where the second response packet carries a Standby status code;
and the processing unit is configured to set a preferential forwarding state of the first PE device with respect to the first PW to an Active state and set a preferential forwarding state of the first PE device with respect to the second PW to an Active state after determining that the first response packet and the second response packet are received.
15. The first PE device of claim 14,
the receiving unit is further configured to receive traffic from a customer edge CE device;
the sending unit is further configured to forward traffic from the CE device to the second PE device and the third PE device via the first PW and the second PW in an Active state in a traffic balancing manner.
16. The first PE device of claim 14 or 15,
the processing unit is further configured to generate a first fault detection packet, where the first fault detection packet is used to detect whether a communication link from the first PE device to the third PE device via the first PW, the second PE device, and the Bypass PW has a fault;
the sending unit is further configured to send the first failure detection packet to the third PE device via the first PW, the second PE device, and the Bypass PW;
the receiving unit is further configured to receive, via the first PW, the second PE device, and the Bypass PW, a second failure detection packet from the third PE device, where the second failure detection packet is used to detect whether a failure exists in a communication link from the third PE device to the first PE device via the Bypass PW, the second PE device, and the first PW.
17. The first PE device of claim 14 or 15,
the processing unit is further configured to generate a third fault detection packet, where the third fault detection packet is used to detect whether a communication link from the first PE device to the second PE device via the second PW, the third PE device, and the Bypass PW has a fault;
the sending unit is further configured to send the third failure detection packet to the second PE device via the second PW, the third PE device, and the Bypass PW;
the receiving unit is further configured to receive a fourth fault detection packet from the second PE device via the second PW, the third PE device, and the Bypass PW, where the fourth fault detection packet is configured to detect whether a communication link from the second PE device to the first PE device via the Bypass PW, the third PE device, and the second PW has a fault.
18. A second Provider Edge (PE) device, the second PE device being applied to a virtual private line service (VPWS) pseudo wire (VPWS) PW redundant network, the VPWS PW redundant network further comprising a first PE device and a third PE device, a first PW being established between the first PE device and the second PE device, a second PW being established between the first PE device and the third PE device, and a Bypass pseudo wire (Bypass) PW being established between the second PE device and the third PE device, the second PE device comprising:
a receiving unit, configured to receive a first message from the first PE device via the first PW, where the first message carries an Active status code, and the first message is used to request that the first PW is set to an Active status;
a processing unit, configured to set, according to the first packet, a preferential forwarding state of the second PE device with respect to the first PW to an Active state, and set a preferential forwarding state of the second PE device with respect to the Bypass PW to an Active state;
a sending unit, configured to send a first response packet to the first PE device via the first PW, where the first response packet carries an Active status code.
19. The second PE device of claim 18, wherein a Customer Edge (CE) device is connected to the second PE device and the third PE device in the VPWS PW redundant network via multi-frame Trunk (MC-Trunk) link dual-homing, wherein a link between the CE device and the second PE device is an active link, and a link between the CE device and the third PE device is a standby link,
the receiving unit is further configured to receive traffic from the CE device via the active link;
the sending unit is further configured to forward, to the first PE device and the third PE device, traffic from the CE device via the first PW and the Bypass PW in an Active state in a traffic balancing manner.
20. The second PE device of claim 18 or 19,
the processing unit is further configured to generate a fourth fault detection packet, where the fourth fault detection packet is used to detect whether a communication link from the second PE device to the first PE device via the Bypass PW, the third PE device, and the second PW has a fault;
the sending unit is further configured to send the fourth fault detection packet to the first PE device via the second PW, the third PE device, and the Bypass PW;
the receiving unit is further configured to receive, via the second PW, the third PE device, and the Bypass PW, a third failure detection packet from the first PE device, where the third failure detection packet is used to detect whether a communication link from the first PE device to the second PE device via the second PW, the third PE device, and the Bypass PW has a failure.
21. A third Provider Edge (PE) device, the third PE device being applied to a virtual private line service (VPWS) Pseudo Wire (PW) redundant network, the VPWS PW redundant network further comprising a first PE device and a second PE device, a first PW being established between the first PE device and the second PE device, a second PW being established between the first PE device and the third PE device, and a Bypass pseudo wire (Bypass) PW being established between the second PE device and the third PE device, the third PE device comprising:
a receiving unit, configured to receive a second message from the first PE device via the second PW, where the second message carries an Active status code, and the second message is used to request that the second PW is set to an Active status;
a processing unit, configured to set, according to the second packet, a preferential forwarding state of the third PE device with respect to the second PW to an Active state, and set a preferential forwarding state of the third PE device with respect to the Bypass PW to an Active state;
and a sending unit, configured to send a second response packet to the first PE device via the second PW, where the second response packet carries a Standby status code.
22. The third PE device of claim 21,
the processing unit is further configured to generate a second fault detection packet, where the second fault detection packet is used to detect whether a communication link from the third PE device to the first PE device via the Bypass PW, the second PE device, and the first PW has a fault;
the sending unit is further configured to send the second failure detection packet to the first PE device via the first PW, the second PE device, and the Bypass PW;
the receiving unit is further configured to receive a first failure detection packet from the first PE device via the first PW, the second PE device, and the Bypass PW, where the first failure detection packet is used to detect whether a communication link from the first PE device to the third PE device via the first PW, the second PE device, and the Bypass PW has a failure.
23. A virtual private line service pseudo wire VPWS PW redundant network system, where the VPWS PW redundant network includes a first operator edge PE device, a second PE device, and a third PE device, a first PW is established between the first PE device and the second PE device, a second PW is established between the first PE device and the third PE device, and a Bypass pseudo wire Bypass PW is established between the second PE device and the third PE device, where the first PE device is the first PE device in any one of claims 14 to 17, the second PE device is the second PE device in any one of claims 18 to 20, and the third PE device is the third PE device in claim 21 or 22.
CN201611220197.5A 2016-12-26 2016-12-26 Method, equipment and system for forwarding message Active CN108243114B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611220197.5A CN108243114B (en) 2016-12-26 2016-12-26 Method, equipment and system for forwarding message

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611220197.5A CN108243114B (en) 2016-12-26 2016-12-26 Method, equipment and system for forwarding message

Publications (2)

Publication Number Publication Date
CN108243114A CN108243114A (en) 2018-07-03
CN108243114B true CN108243114B (en) 2021-02-23

Family

ID=62702082

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611220197.5A Active CN108243114B (en) 2016-12-26 2016-12-26 Method, equipment and system for forwarding message

Country Status (1)

Country Link
CN (1) CN108243114B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110875880B (en) * 2018-08-29 2022-03-25 北京华为数字技术有限公司 Data transmission method, related equipment, system and computer storage medium
CN111490891B (en) * 2019-01-28 2021-09-07 华为技术有限公司 Method and device for determining interface configuration
CN110071830B (en) * 2019-04-15 2020-03-06 北京华三通信技术有限公司 Pseudo wire back switching method and device
CN111901182B (en) * 2019-05-06 2022-06-28 华为技术有限公司 Flow forwarding method and network equipment
CN111698156B (en) * 2020-04-30 2022-08-30 新华三技术有限公司 Data message forwarding method and device
CN115426296B (en) * 2022-08-31 2023-10-13 杭州云合智网技术有限公司 Communication confirmation method, device, equipment and medium under EVPN VPWS dual-homing dual-activity

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102201999A (en) * 2011-06-13 2011-09-28 中兴通讯股份有限公司 Multicast service load sharing method and system
EP2555467A1 (en) * 2010-04-02 2013-02-06 ZTE Corporation Method, apparatus and system for dual-homing protection switching
CN103490969A (en) * 2013-09-17 2014-01-01 烽火通信科技股份有限公司 System and method for achieving VPWS redundancy protection rapid convergence

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2555467A1 (en) * 2010-04-02 2013-02-06 ZTE Corporation Method, apparatus and system for dual-homing protection switching
CN102201999A (en) * 2011-06-13 2011-09-28 中兴通讯股份有限公司 Multicast service load sharing method and system
CN103490969A (en) * 2013-09-17 2014-01-01 烽火通信科技股份有限公司 System and method for achieving VPWS redundancy protection rapid convergence

Also Published As

Publication number Publication date
CN108243114A (en) 2018-07-03

Similar Documents

Publication Publication Date Title
CN108243114B (en) Method, equipment and system for forwarding message
CN107846342B (en) Method, device and system for forwarding VXLAN message
EP3691185B1 (en) Method for processing message, device, and system
EP3531632B1 (en) Failure recovery in a network system
CN108574616B (en) Method, equipment and system for processing route
CN108206759B (en) Method, equipment and system for forwarding message
CN111740899B (en) ARP request message forwarding method, cross-device link aggregation group and network device
EP2852104B1 (en) Method and device for establishing multi-protocol label switching traffic engineering tunnel
CN111865779B (en) Route synchronization method and cross-device link aggregation group
EP3217608B1 (en) Switchback delay methods and devices
EP3029883B1 (en) Network protection method and apparatus, next-ring node, and system
EP2424186B1 (en) Dual-computer hot-standby method, device and system
CN109861867B (en) MEC service processing method and device
EP3515015B1 (en) Arbitrating mastership between redundant control planes of a virtual node
WO2011113395A2 (en) A method and apparatus for load balance
WO2016197950A1 (en) Route detection method, router device and system
US11595119B2 (en) Protection switching based on exchange of protection information
CN111885630B (en) Data transmission method and communication device
CN108616908B (en) Network system and data transmission method based on network system
CN111901182B (en) Flow forwarding method and network equipment
CN116668352A (en) State indication method, device and storage medium
CN114915538A (en) Fault detection method, network device and system
CN115801552A (en) Protection switching method and network equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20211231

Address after: 450046 Floor 9, building 1, Zhengshang Boya Plaza, Longzihu wisdom Island, Zhengdong New Area, Zhengzhou City, Henan Province

Patentee after: Super fusion Digital Technology Co.,Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd.