CN111901182A - Flow forwarding method and network equipment - Google Patents

Flow forwarding method and network equipment Download PDF

Info

Publication number
CN111901182A
CN111901182A CN201910371596.9A CN201910371596A CN111901182A CN 111901182 A CN111901182 A CN 111901182A CN 201910371596 A CN201910371596 A CN 201910371596A CN 111901182 A CN111901182 A CN 111901182A
Authority
CN
China
Prior art keywords
state
network device
forwarding
message
switching
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.)
Granted
Application number
CN201910371596.9A
Other languages
Chinese (zh)
Other versions
CN111901182B (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.)
Huawei 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 CN201910371596.9A priority Critical patent/CN111901182B/en
Publication of CN111901182A publication Critical patent/CN111901182A/en
Application granted granted Critical
Publication of CN111901182B publication Critical patent/CN111901182B/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
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0852Delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0668Management of faults, events, alarms or notifications using network fault recovery by dynamic selection of recovery network elements, e.g. replacement by the most appropriate element after failure
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • H04L43/0829Packet loss
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0852Delays
    • H04L43/087Jitter

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a traffic forwarding method and network equipment, which are beneficial to switching traffic to a pseudo wire PW with good transmission quality and improving service transmission quality. The method comprises the following steps: the method comprises the steps that a first network device determines that the transmission quality of a first PW does not meet a preset condition, the forwarding state of the first PW is switched from a first state to a second state, the forwarding state of a second PW is switched from a third state to a fourth state, the first network device is connected with a third network device through the first PW, and the first network device is connected with a second network device through the second PW; when the forwarding state of the first PW is a first state and the forwarding state of the second PW is a third state, the first network device forwards the traffic to a third network device along the first PW; and when the forwarding state of the first PW is the second state and the forwarding state of the second PW is the fourth state, the first network device forwards the traffic to the third network device through the second network device along the second PW.

Description

Flow forwarding method and network equipment
Technical Field
The present application relates to the field of communications, and in particular, to a traffic forwarding method and a network device in the field of communications.
Background
Two modes exist for a layer 2virtual private network (L2 VPN) network: a link between a node and a node in an L2VPN is called a Pseudo Wire (PW), and the PW is a generic name of various emulation technologies in the communication field and is established as a point-to-point link between edge devices (e.g., edge routers).
In a scenario where a Customer Edge (CE) device at one end is single-homed accessed and a CE device at the other end is double-homed accessed, schemes such as multi-segment pseudo wires (MS-PWs), PW redundancy, and a PW of a VPLS are mainly included, and the method is widely applied to networking such as IP radio access network (IPRAN), metropolitan area bearer, and the like. Specifically, a user-end provider edge (UPE) establishes a VPWS with two provider edge (SPEs) at the same time, where the VPWS include a main PW between UPE and SPE1 and a standby PW between UPE and SPE 2. The SPE is used as an exchange node to establish a VPLS with a Network Provider Edge (NPE) at the same time, wherein the VPLS comprises an active PW between the SPE1 and the NPE 1, a standby PW between the SPE1 and the NPE 2, an active PW between the SPE2 and the NPE 1, and a standby PW between the SPE2 and the NPE 2. When the primary PW fails, the UPE can switch the link and forward the traffic by the standby PW. For example, when the active PW between the SPE1 and the NPE 1 fails, the traffic of the SPE1 may be forwarded through the standby PW between the SPE1 and the NPE 2, and then detour to the NPE 1 through the PW between the NPE 2 and the NPE 1. In this case, SPE2 sends traffic to NPE 1 by broadcasting, which may result in packet loss. In addition, because the UPE and the SPE belong to the same region, and the SPE and the NPE are installed between different regions, transmission equipment such as microwaves generally exist in cross-region remote transmission, and the influence of factors such as weather is large, so that the link quality between the SPE and the NPE cannot be guaranteed. If the link quality between the SPE and the NPE is not good, for example, the delay is large or a small amount of packet loss continues, the service transmission quality is affected.
Disclosure of Invention
The application provides a traffic forwarding method and network equipment, which are beneficial to switching traffic to a pseudo wire PW with good transmission quality and improving service transmission quality.
In a first aspect, a traffic forwarding method is provided, including: the first network equipment determines that the transmission quality of the first pseudo wire PW does not meet a preset condition; the first network device switches a forwarding state of the first PW from a first state to a second state, and switches a forwarding state of a second PW from a third state to a fourth state, wherein the first network device connects to a third network device through the first PW, the first network device connects to a second network device through the second PW, and the first state, the second state, the third state, and the fourth state are four different forwarding states; when the forwarding state of the first PW is the first state and the forwarding state of the second PW is the third state, the first network device forwards traffic to the third network device along the first PW; and when the forwarding state of the first PW is the second state and the forwarding state of the second PW is the fourth state, the first network device forwards traffic to the third network device through the second network device along the second PW.
According to the traffic forwarding method in the embodiment of the application, the transmission quality of the PW is identified through detection technologies such as TWAMP/Y1731, wherein the transmission quality can include parameter indexes such as time delay, packet loss rate, jitter and error codes, and the state switching is executed under the condition that the transmission quality of the PW does not meet preset conditions, so that the traffic is favorably switched to a pseudo wire PW with good transmission quality, and the service transmission quality is favorably improved.
The preset condition may be understood as a preset condition that needs to be satisfied for forwarding the traffic. Exemplarily, protocols such as TWAMP/Y1731 may be deployed to detect parameter indexes such as delay, packet loss rate, jitter, and the like of links between network devices, and set a certain threshold for each detection index, and when a detection index exceeds its corresponding threshold, the network device considers that the transmission quality of a corresponding PW does not satisfy a preset condition. The preset condition may also be referred to as a traffic forwarding requirement, a traffic forwarding condition, or other names, which is not limited in this embodiment of the application. Specifically, for example, the preset condition includes one or more of a time delay being smaller than a certain threshold, a packet loss rate being smaller than a certain threshold, or jitter being smaller than a certain threshold, and the like, and if the transmission quality of the PW does not satisfy the preset condition, the network device may consider that the transmission quality of the PW does not satisfy the preset condition. It should be understood that, in the case where the preset condition includes a plurality of conditions, it is necessary to determine whether the transmission quality of the PW satisfies the plurality of conditions, and when each condition is satisfied, the transmission quality of the PW is considered to satisfy the preset condition.
With reference to the first aspect, in certain implementations of the first aspect, before the first network device switches the forwarding state of the first PW from a first state to a second state, and switches the forwarding state of the second PW from a third state to a fourth state, the method further includes: the first network device sends a first message to the second network device, where the first message carries first identification information, and the first identification information is used to negotiate to switch the forwarding state of the second PW from the third state to the fourth state.
With reference to the first aspect, in certain implementations of the first aspect, before the first network device switches the forwarding state of the first PW from a first state to a second state, and switches the forwarding state of the second PW from a third state to a fourth state, the method further includes: and the first network device sends a second message to the third network device, wherein the second message carries second identification information, and the second identification information is used for negotiating to switch the forwarding state of the first PW from the first state to the second state.
It should be understood that the first network device may negotiate only with the second network device, that is, only send the first message to the second network device, and then negotiate with the third network device by the second network device if the second network device agrees to perform the state switching. Or, the first network device may also negotiate only with the third network device, that is, only send the second message to the third network device, and then negotiate with the second network device by the third network device if the third network device agrees to perform the state switching. Or, the first network device negotiates with the second network device and the third network device, and sends the first message to the second network device and sends the second message to the third network device, which is not limited in this embodiment of the application.
With reference to the first aspect, in certain implementations of the first aspect, before the first network device switches the forwarding state of the first PW from a first state to a second state, and switches the forwarding state of the second PW from a third state to a fourth state, the method further includes: the first network equipment receives a third message sent by the third network equipment; in response to receiving the third message, the first network device switches a forwarding state of the first PW from the first state to the second state and switches a forwarding state of the second PW from the third state to the fourth state.
In this embodiment of the present application, the first network device needs to send a second message to the third network device, and performs negotiation with the third network device, so that the third network device may determine whether the remaining bandwidth of the port on the backup path (i.e., the third PW) can meet the traffic demand, and the third network device allows performing state switching under the condition that the port bandwidth can meet the traffic demand, thereby ensuring the quality of service transmission.
With reference to the first aspect, in certain implementations of the first aspect, before the first network device switches the forwarding state of the first PW from a first state to a second state, and switches the forwarding state of the second PW from a third state to a fourth state, the method further includes: the first network equipment receives a fourth message sent by the second network equipment; in response to receiving the third message, the first network device switching a forwarding state of the first PW from the first state to the second state and switching a forwarding state of a second PW from the third state to the fourth state, including: in response to receiving the third message and the fourth message, the first network device switches a forwarding state of the first PW from the first state to the second state and switches a forwarding state of the second PW from the third state to the fourth state.
With reference to the first aspect, in certain implementations of the first aspect, the second network device and the third network device are connected via a third PW, and the second PW is associated with the third PW.
In this embodiment, the second PW and the third PW are associated, which may also be referred to as binding the second PW and the third PW, or that the second PW and the third PW are in a one-to-one correspondence relationship. The association may be an interface association, a tunnel label association, or the like. According to the embodiment of the application, the second PW and the third PW are bound 1 to 1, for example, a standby PW is deployed on an NPE and a bypass PW is bound at the same time, so that the flow sent to the second network equipment by the first network equipment through the second PW can be directly forwarded through the bound third PW without table lookup, zero perception of the service in the whole switching process can be guaranteed, packet loss and multiple packets do not exist, and the reliability of flow forwarding is improved.
With reference to the first aspect, in certain implementations of the first aspect, before the first network device switches the forwarding state of the first PW from a first state to a second state, and switches the forwarding state of the second PW from a third state to a fourth state, the method further includes: the first network device determines that the transmission quality of the second PW and the third PW meets the preset condition.
Specifically, the first network device may determine, according to a third message sent by a third network device, that the transmission quality of the second PW and the third PW meets the preset condition. Or, the first network device may determine, according to a third message sent by a third network device and a fourth message sent by a second network device, that the transmission quality of the second PW and the third PW meets the preset condition.
In a second aspect, another traffic forwarding method is provided, including: the second network equipment determines that the transmission quality of the second pseudo wire PW meets a preset condition; the second network device switches a forwarding state of the second PW from a third state to a fourth state, and switches a forwarding state of the third PW from a fifth state to a sixth state, where the second network device is connected to the first network device through the second PW, the second network device is connected to the third network device through the third PW, and the third state, the fourth state, the fifth state, and the sixth state are four different forwarding states; and the second network equipment receives the traffic forwarded by the first network equipment along the second PW and forwards the traffic to the third network equipment along the third PW.
With reference to the second aspect, in some implementations of the second aspect, before the second network device determines that the transmission quality of the second pseudo wire PW satisfies the preset condition, the method further includes: and the second network device receives a first message sent by the first network device, where the first message carries first identification information, and the first identification information is used to negotiate to switch the forwarding state of the second PW from the third state to the fourth state.
With reference to the second aspect, in some implementations of the second aspect, after the second network device receives the first message sent by the first network device, the method further includes: and the second network device sends a fourth message to the first network device, where the fourth message is used to indicate that the transmission quality of the second PW meets the preset condition.
With reference to the second aspect, in certain implementations of the second aspect, the second PW is associated with the third PW.
In a third aspect, another traffic forwarding method is provided, including: the third network equipment determines that the transmission quality of the third pseudo wire PW meets a preset condition; the third network device switches a forwarding state of a first PW from a first state to a second state, and switches a forwarding state of a third PW from a fifth state to a sixth state, wherein the third network device is connected to the first network device through the first PW, the third network device is connected to the second network device through the third PW, and the first state, the second state, the fifth state and the sixth state are four different forwarding states; when the forwarding state of the first PW is the first state and the forwarding state of the third PW is the fifth state, the third network device receives traffic forwarded by the first network device along the first PW; and when the forwarding state of the first PW is the second state and the forwarding state of the third PW is the sixth state, the third network device receives the traffic forwarded by the second network device along the third PW.
With reference to the third aspect, in certain implementations of the third aspect, before the third network device determines that the transmission quality of the third pseudo wire PW satisfies the preset condition, the method further includes: and the third network device receives a second message sent by the first network device, where the second message carries second identification information, and the second identification information is used to negotiate to switch the forwarding state of the first PW from the first state to the second state.
With reference to the third aspect, in some implementations of the third aspect, after the third network device receives the second message sent by the first network device, the method further includes: and the third network device sends a third message to the first network device, where the third message is used to indicate that the transmission quality of the third PW meets the preset condition.
With reference to the third aspect, in certain implementations of the third aspect, the first network device and the second network device are connected via a second PW, and the second PW is associated with the third PW.
In a fourth aspect, another traffic forwarding method is provided, including: the first network equipment determines that the transmission quality of the first pseudo wire PW does not meet a preset condition; the first network equipment sends a first message to second network equipment, wherein the first message carries first identification information, and the first identification information is used for negotiating to switch the forwarding state of the second PW from a third state to a fourth state; the first network device sends a second message to a third network device, wherein the second message carries second identification information, and the second identification information is used for negotiating to switch the forwarding state of the first PW from a first state to a second state; the first network device receives a third message, and in response to the received third message, the first network device switches the forwarding state of the first PW from the first state to the second state, and switches the forwarding state of a second PW from the third state to the fourth state, where the first network device is connected to the third network device through the first PW, the first network device is connected to the second network device through the second PW, and the first state, the second state, the third state, and the fourth state are four different forwarding states; when the forwarding state of the first PW is the first state and the forwarding state of the second PW is the third state, forwarding, by the first network device, traffic to the third network device along the first PW; and when the forwarding state of the first PW is the second state and the forwarding state of the second PW is the fourth state, the first network device forwards traffic to the third network device through the second network device along the second PW.
In a fifth aspect, a first network device is provided, configured to perform the method in any one of the possible implementation manners of the first aspect. In particular, the first network device comprises means for performing the method of any one of the possible implementations of the first aspect described above.
In one design, the first network device is a communication chip that may include an input circuit or interface for sending information or data and an output circuit or interface for receiving information or data.
In another design, the first network device is a communication device that may include a transmitter to transmit information or data and a receiver to receive information or data.
In a sixth aspect, a second network device is provided for performing the method in any one of the possible implementations of the second aspect. In particular, the second network device comprises means for performing the method of any one of the possible implementations of the second aspect described above.
In one design, the second network device is a communication chip that may include an input circuit or interface for sending information or data and an output circuit or interface for receiving information or data.
In another design, the second network device is a communication device that may include a transmitter to transmit information or data and a receiver to receive information or data.
In a seventh aspect, a third network device is provided, configured to perform the method in any possible implementation manner of the third aspect. In particular, the third network device comprises means for performing the method in any one of the possible implementations of the third aspect described above.
In one design, the third network device is a communication chip that may include an input circuit or interface for sending information or data and an output circuit or interface for receiving information or data.
In another design, the third network device is a communication device that may include a transmitter to transmit information or data and a receiver to receive information or data.
In an eighth aspect, a network device is provided that includes a processor coupled with a memory and operable to execute instructions in the memory to implement the method in any one of the possible implementations of the above aspects. Illustratively, the network device further comprises a memory. Illustratively, the network device further comprises a communication interface, the processor being coupled to the communication interface.
In one implementation, the network device is the network device itself, and the communication interface may be a transceiver, or an input/output interface.
In another implementation, the network device is a chip configured in the network device. When the network device is a chip configured in the network device, the communication interface may be an input/output interface.
Illustratively, the transceiver may be a transceiver circuit. Illustratively, the input/output interface may be an input/output circuit.
In a ninth aspect, a system is provided, which includes at least one of the first network device provided in the fifth aspect, the second network device provided in the sixth aspect, or the third network device provided in the seventh aspect.
In a possible design, the system may further include another device that interacts with the first network device, the second network device, or the third network device in the solution provided in this embodiment.
In a tenth aspect, there is provided a computer program product comprising: computer program (also called code, or instructions), which when executed, causes a computer to perform the method of any of the possible implementations of any of the above aspects.
In an eleventh aspect, a computer-readable medium is provided, which stores a computer program (which may also be referred to as code, or instructions) that, when executed on a computer, causes the computer to perform the method of any of the possible implementations of any of the above aspects.
In a twelfth aspect, a chip system is provided, which includes a memory for storing a computer program and a processor for calling and running the computer program from the memory, so that a communication device in which the chip system is installed executes the method in any one of the possible implementation manners of the above aspects.
The system-on-chip may include, among other things, input circuitry or interfaces for transmitting information or data, and output circuitry or interfaces for receiving information or data.
Drawings
Fig. 1 shows a schematic diagram of a communication system of an embodiment of the present application.
Fig. 2 shows a schematic diagram of another communication system of an embodiment of the present application.
Fig. 3 shows a schematic flow chart of a traffic forwarding method according to an embodiment of the present application.
Fig. 4 is a schematic flow chart of another traffic forwarding method according to an embodiment of the present application.
Fig. 5 shows a schematic flow chart of the state switching of SPE1 according to the embodiment of the present application.
Fig. 6 shows a schematic flow chart of state switching of the NPE 2 according to an embodiment of the present application.
Fig. 7 shows a schematic flow chart of state switching of the NPE 1 according to the embodiment of the present application.
Fig. 8 shows a schematic block diagram of a network device of an embodiment of the application.
Fig. 9 shows a schematic block diagram of another network device of an embodiment of the present application.
Detailed Description
The technical solution in the present application will be described below with reference to the accompanying drawings.
For ease of understanding, the terms referred to in this application will be briefly described below.
1. Layer 2virtual private network (L2 VPN) network
The L2VPN technology is proposed to fully utilize Internet Protocol (IP) or multi-protocol label switching (MPLS) network resources to support data services, and an IP or MPLS network is used to provide a transport channel for a two-layer data link packet (such as an Asynchronous Transfer Mode (ATM) cell, a Frame Relay (FR), an ethernet frame, etc.), so as to implement the convergence of an IP network and a data network. L2VPN has the following two traffic patterns:
virtual Private Wire Service (VPWS): VPWS is a two-layer service bearer technology that emulates the basic behavior and characteristics of ATM, frame relay, ethernet, Time Division Multiplexing (TDM) circuits, Synchronous Optical Network (SONET), Synchronous Digital Hierarchy (SDH), and other services as much as possible in a Packet Switched Network (PSN). VPWS is an emulation of traditional leased line services, using IP networks to emulate leased lines, providing asymmetric, low-cost, Defense Data Network (DDN) services. The virtual leased line approximates a conventional leased line in view of the users at both ends of the virtual leased line. Furthermore, VPWS technology is a point-to-point virtual private line technology that can support almost all link layer protocols.
Virtual Private LAN Service (VPLS), which is a point-to-multipoint L2VPN service provided in a public network, allows geographically isolated user sites to be connected via a Wide Area Network (WAN)/Metropolitan Area Network (MAN), and allows the connection between the sites to be effected as in one LAN.
2. Pseudowires (PW)
The link between nodes in the L2VPN is called PW, which is a generic term for various emulation techniques in the communication field, and is a point-to-point link established between edge devices (e.g., edge routers). The PW is divided into a main PW and a standby PW, the flow is transmitted between the nodes through the main PW preferentially, and if the main PW fails, the flow is transmitted by using the standby PW. The active PW may also be referred to as an active PW or other name, and the standby PW may also be referred to as a standby PW or other name, which is not limited in this embodiment of the present application.
PW generally has two modes:
(1) main standby mode: that is, the active/standby state of the PW is determined according to the set forwarding priority.
For example, the active/standby mode is configured to configure PWs that the home terminal respectively accesses to two devices (e.g., Provider Edge (PE)) of the opposite terminal when the home terminal creates the PW. In a possible implementation manner, a master (master) device of a home terminal and a slave (slave) device of an opposite terminal manually specify a master PW and a standby PW, and then notify the master and standby information of the PWs to the slave (slave) device of the opposite terminal.
(2) Independent mode (independent): that is, the active/standby state of the PW is determined according to the forwarding state notified by the peer device.
Illustratively, the standalone mode is to decide the active PW and the standby PW through signaling negotiation. When a home terminal creates a PW, the home terminal is configured to access two devices (e.g., PEs) of an opposite terminal respectively, and PWs of the two devices are in a master state in a local state. Devices at two ends of the PW negotiate to determine the main-standby relation of the PW.
3. Single and dual homing access
The single-homing access mode refers to that the user side edge equipment is accessed to a network side single node through a single link or multiple links.
The dual-homing access mode refers to that the user side edge equipment is accessed to the network side dual-node through multiple links. If one node or link fails in the dual nodes, the traffic can be transmitted through the link corresponding to the other node.
For the understanding of the embodiments of the present application, a detailed description will be given of a communication system suitable for the embodiments of the present application with reference to fig. 1.
Fig. 1 shows a communication system 100 to which an embodiment of the present application is applied. The communication system 100 may include a first network device 110, a second network device 120, and a third network device 130. First network device 110 and second network device 120 are connected via a second PW, first network device 110 and third network device 130 are connected via a first PW, and second network device 120 and third network device 130 are connected via a third PW. Thus, for upstream traffic, i.e., traffic that needs to be forwarded to second network device 120 at first network device 110, it can be forwarded in two ways:
(1) forwarded by the first network device 110 directly over the first PW to the third network device 130;
(2) first, the first network device 110 forwards to the second network device 120 through the second PW, and then the second network device 120 forwards to the third network device 130 through the third PW.
In the present application, the link corresponding to the above-described forwarding scheme (1) is used as the active link, and the link corresponding to the forwarding scheme (2) is used as the backup link. The downlink traffic is similar to the uplink traffic and is not described again.
Illustratively, the communication system 100 further includes a fourth network device 140, and similar to the first network device 110, the fourth network device 140 may directly forward the traffic to the third network device 130, or forward the traffic to the second network device 120, and then forward the traffic to the third network device 130 by the second network device 120.
For example, the communication system 100 may include a plurality of network devices and each network device may be connected to one or more user edge devices, which is not limited in this embodiment.
Fig. 2 illustrates another communication system 200 of an embodiment of the present application. The communication system 200 is in a scenario where a Customer Edge (CE) device at one end is single-homed and a CE device at the other end is double-homed. It should be understood that the first network device 110 in fig. 1 may specifically be a provider Side Provider Edge (SPE) 1 in fig. 2, the second network device 120 may specifically be a network side provider edge (NPE) 2 in fig. 2, the third network device 130 may specifically be an NPE 1 in fig. 2, and the fourth network device 140 may specifically be an SPE2 in fig. 2.
The communication system 200 further includes a CE 1, a user-end provider edge (UPE), a CE2, and other devices. Specifically, CE 1 is connected to UPE through single-homed access, and the UPE simultaneously establishes VPWS with two SPEs, including a primary PW between UPE and SPE1 and a standby PW between UPE and SPE 2. The SPE is used as a switching node to establish a VPLS with the NPE at the same time, wherein the VPLS comprises an active PW between the SPE1 and the NPE 1, a standby PW between the SPE1 and the NPE 2, an active PW between the SPE2 and the NPE 1, and a standby PW between the SPE2 and the NPE 2. NPE 1 and NPE 2 are connected through a standby PW. The CE2 is respectively connected with the NPE 1 and the NPE 2 through a dual-homing access mode, wherein a link between the CE2 and the NPE 1 is a main link, and a link between the CE2 and the NPE 2 is a standby link.
The primary PW between the SPE1 and the NPE 1 is a first PW in this embodiment, also referred to as an active PW, the standby PW between the SPE1 and the NPE 2 is a second PW in this embodiment, also referred to as a standby PW, and the standby PW between the NPE 1 and the NPE 2 is a third PW in this embodiment, also referred to as a bypass PW. It is understood that these PWs may also have other names, and are not limited thereto.
For example, the communication system 200 may further include a greater number of devices such as CE 1, UPE, and SPE, that is, may be deployed according to a network plan, which is not limited in this embodiment of the present application. The UPE, SPE, and NPE devices may be edge devices of an operator L2VPN service, where a base station or a user/enterprise accesses a network through CE 1, and a wireless base station core network or a Broadband Remote Access Server (BRAS) accesses the L2VPN network through CE 2. The network device in the embodiment of the present application may be a router, a switch, or the like, which is not limited in the embodiment of the present application.
Under normal conditions (or by default), the flow direction is as follows:
(1) uplink flow, wherein the CE 1 sends the flow to the UPE, the UPE sends the flow to the SPE1 through the main PW, the SPE1 sends the flow to the NPE 1 through the main PW, and the NPE 1 sends the flow to the CE2 through the access side interface after receiving the flow;
(2) and (2) downlink flow, the CE2 sends the flow to the NPE 1 through the main interface through the main link, the NPE 1 sends the flow to the SPE1 after receiving the flow by searching a Media Access Control (MAC) table, then the SPE1 sends the flow to the UPE through the main PW between the SPE1 and the UPE, and the UPE forwards the flow to the CE 1 after receiving the flow.
In summary, in a normal state, traffic is forwarded through the active PW and not through the standby PW, so that neither uplink traffic nor downlink traffic passes through the standby PW between NPE 1 and NPE 2.
A forwarding status (forwarding status) of the PW is specified in PW signaling of a Label Distribution Protocol (LDP) by using a PW status Type Length Value (TLV), which may be carried by a label mapping (label mapping) message or a notification (notification) message, such as an LDP notification message.
In RFC 4447, the PW status TLV includes a 32-bit status code, and each bit in a V field in the PW status TLV can identify a forwarding status of a PW, where the status code of the V field may specifically include the following cases:
0x00000000-pseudowire forwarding (clear all failures) indicates that the pseudowire can be forwarded (all failures are cleared);
0x00000001-pseudowire not forwarding indicates that the pseudowire is not forwardable;
0x00000002-local attribute circuit fault indicates a local access link side reception failure;
0x00000004-local attribute circuit (equations) transmit fault indicates a local access link side transmission failure;
0x00000008-local PSN-failure PW (ingress) receive failure represents a local packet switching network side receiving failure;
0x00000010-local PSN-failure PW (equations) transmit failure represents a local packet switching network side sending failure;
0x00000020-PW Forwarding Standard indicates that the Standby PW can be forwarded (the bit set indicates that the PW is currently in a Standby state);
a0 x00000040-Request switch to this PW indicates a Request to switch to this PW.
When the primary PW fails, the UPE can switch the link and forward the traffic by the standby PW. For example, when the active PW between the SPE1 and the NPE 1 fails, the traffic of the SPE1 may be forwarded through the standby PW between the SPE1 and the NPE 2, and then detour to the NPE 1 through the PW between the NPE 2 and the NPE 1. In this case, SPE2 sends traffic to NPE 1 by broadcasting, which may result in packet loss. In addition, because the UPE and the SPE belong to the same region, and the SPE and the NPE are installed between different regions, transmission equipment such as microwaves generally exist in cross-region remote transmission, and the influence of factors such as weather is large, so that the link quality between the SPE and the NPE cannot be guaranteed. If the link quality between the SPE and the NPE is not good, for example, the delay is large or a small amount of packet loss continues, the service transmission quality is affected.
In view of this, the present application provides a new traffic forwarding method, which is beneficial to switching traffic to a pseudo wire PW with better transmission quality, and is beneficial to improving service transmission quality. In the embodiments herein, the forwarding state of the PW may be represented by a PW state TLV specified in RFC 4447, but may also take other forms, which is not limited in this application embodiment.
Various embodiments provided herein will be described in detail below with reference to the accompanying drawings. The first, second and various numerical references in the embodiments shown below are merely for convenience of description and are not intended to limit the scope of the embodiments of the present application. E.g., to distinguish between different messages, different network devices, etc.
Fig. 3 shows a schematic flow chart of a traffic forwarding method 300 according to an embodiment of the present application. The method 300 may be applied to the communication system 100 shown in fig. 1, and may also be applied to the communication system shown in fig. 2, and the embodiment of the present application is not limited thereto.
S310, the first network device determines that the transmission quality of the first PW does not meet a preset condition.
S320, the first network device switches the forwarding state of the first PW from the first state to the second state, and switches the forwarding state of the second PW from the third state to the fourth state.
S330, the first network device forwards traffic to the third network device through the second network device along the second PW.
Correspondingly, for the second network device, the second network device determines that the transmission quality of the second PW meets a preset condition; and the second network equipment switches the forwarding state of the second PW from the third state to the fourth state, and switches the forwarding state of the third PW from the fifth state to the sixth state.
Correspondingly, for the third network device, the third network device determines that the transmission quality of the third PW meets a preset condition; and the third network equipment switches the forwarding state of the first PW from the first state to the second state and switches the forwarding state of the third PW from the fifth state to the sixth state.
The first network device is connected to a third network device through a first PW, the first network device is connected to a second network device through a second PW, the second network device is connected to the third network device through a third PW, and the first state, the second state, the third state, the fourth state, the fifth state, and the sixth state are six different forwarding states.
In a possible implementation manner, the forwarding state of the first PW is the first state, the forwarding state of the second PW is the third state, the forwarding state of the third PW is the fifth state, and the first network device forwards the traffic to the third network device along the first PW. Correspondingly, the third network device receives the traffic forwarded by the first network device along the first PW.
In another possible implementation manner, the forwarding state of the first PW is the second state, the forwarding state of the second PW is the fourth state, the forwarding state of the third PW is the sixth state, and the first network device forwards the traffic to the third network device through the second network device along the second PW and the third PW. Correspondingly, the second network device receives the traffic forwarded by the first network device along the second PW and forwards the traffic to the third network device along the third PW, and the third network device receives the traffic forwarded by the second network device along the third PW.
The preset condition may be understood as a preset condition that needs to be satisfied for forwarding the traffic. Exemplarily, protocols such as TWAMP/Y1731 may be deployed to detect parameter indexes such as delay, packet loss rate, jitter, and the like of links between network devices, and set a certain threshold for each detection index, and when a detection index exceeds its corresponding threshold, the network device considers that the transmission quality of a corresponding PW does not satisfy a preset condition. The preset condition may also be referred to as a traffic forwarding requirement, a traffic forwarding condition, or other names, which is not limited in this embodiment of the application. Specifically, for example, the preset condition includes one or more of a time delay being smaller than a certain threshold, a packet loss rate being smaller than a certain threshold, or jitter being smaller than a certain threshold, and the like, and if the transmission quality of the PW does not satisfy the preset condition, the network device may consider that the transmission quality of the PW does not satisfy the preset condition. It should be understood that, in the case where the preset condition includes a plurality of conditions, it is necessary to determine whether the transmission quality of the PW satisfies the plurality of conditions, and when each condition is satisfied, the transmission quality of the PW is considered to satisfy the preset condition.
The network device may detect the transmission quality of its corresponding PW, for example, the first network device may detect the first PW and the second PW, the second network device may detect the second PW and the third PW, and the third network device may detect the first PW and the third PW.
For example, the first state may be referred to as an active state, the second state may be referred to as an active-fault state, the third state may be referred to as a standby state, the fourth state may be referred to as a standby-fault state, the fifth state may be referred to as a bypass state, and the sixth state may be referred to as a bypass-fault state.
Therefore, when the first network device detects that the transmission quality of the first PW does not satisfy the preset condition, the first network device may initiate a state switching process, switch the first PW (i.e., active PW) from an active state to an active-fault state, and switch the second PW (i.e., standby PW) from a standby state to a standby-fault state. Correspondingly, the third network device may switch the first PW (i.e., active PW) from the active state to the active-fault state, and switch the third PW (i.e., bypass PW) from the bypass state to the bypass-fault state. The second network device may switch the second PW (i.e., standby PW) from the standby state to the standby-fault state, and switch the third PW (i.e., bypass PW) from the bypass state to the bypass-fault state.
It should be understood that the control plane mainly forms routing table entries and the like for protocol computation paths such as routing and labels through a protocol, and the forwarding plane mainly performs traffic forwarding and the like by searching forwarding table entries. Therefore, in a possible implementation manner, the state information is stored in the control plane, which may be referred to as a PW state table, and for the forwarding plane, only the forwarding table entry needs to be selected according to the indication information issued by the control plane, so as to forward the traffic.
According to the traffic forwarding method in the embodiment of the application, the transmission quality of the PW is identified through detection technologies such as TWAMP/Y1731, wherein the transmission quality can include parameter indexes such as time delay, packet loss rate, jitter and error codes, and the state switching is executed under the condition that the transmission quality of the PW does not meet preset conditions, so that the traffic is favorably switched to a pseudo wire PW with good transmission quality, and the service transmission quality is favorably improved.
For example, since the first network device itself cannot determine the PW conditions (e.g., the transmission quality of the third PW) at the second network device and the third network device, before the first network device, the second network device, and the third network device perform state switching, the three network devices may perform state negotiation, and in a case that the three network devices agree to perform state switching through judgment, the first network device, the second network device, and the third network device may perform the state switching. In this embodiment of the present application, the three network devices may perform negotiation in a variety of ways, which is not limited herein.
Illustratively, the above three network devices may negotiate, but are not limited to, by:
the first method is as follows:
before a first network device switches a forwarding state of a first PW from a first state to a second state and switches a forwarding state of a second PW from a third state to a fourth state, the first network device sends a first message to a second network device, wherein the first message carries first identification information, and the first identification information is used for negotiating to switch the forwarding state of the second PW from the third state to the fourth state. Correspondingly, the second network device receives the first message sent by the first network device.
Illustratively, negotiation procedures for state switching can be performed between network devices by sending PW state TLVs. For example, the first identification information carried in the first message may be a first pseudowire state TLV, and a specific value of a V field in the first pseudowire state TLV may be, for example, 0x00000050, which indicates that the PW is in an active state, but does not meet a preset condition because the link transmission quality does not meet the standard. If the network equipment sends the message, the network equipment at the local end applies for switching the PW from the active state to the active-fault state.
The second method comprises the following steps:
before the first network device switches the forwarding state of the first PW from the first state to the second state and switches the forwarding state of the second PW from the third state to the fourth state, the first network device sends a second message to the third network device, where the second message carries second identification information, and the second identification information is used to negotiate to switch the forwarding state of the first PW from the first state to the second state. Correspondingly, the third network device receives the second message sent by the first network device.
Illustratively, negotiation procedures for state switching can be performed between network devices by sending PW state TLVs. For example, the second identification information carried in the second message may be a second pseudowire state TLV, and a specific value of a V field in the second pseudowire state TLV may be, for example, 0x00000051, which indicates that the PW is in a standby state, and the link transmission quality reaches the standard, and meets a preset condition. If the network equipment sends the message, the network equipment at the home terminal applies for switching the PW from the standby state to the standby-fault state.
The third method comprises the following steps:
before the first network device switches the forwarding state of the first PW from the first state to the second state and switches the forwarding state of the second PW from the third state to the fourth state, the first network device sends the first message to the second network device and sends the second message to the third network device. Correspondingly, the second network device receives the first message sent by the first network device, and the third network device receives the second message sent by the first network device.
It should be understood that the first network device may negotiate only with the second network device, that is, only send the first message to the second network device, and then negotiate with the third network device by the second network device if the second network device agrees to perform the state switching. Or, the first network device may also negotiate only with the third network device, that is, only send the second message to the third network device, and then negotiate with the second network device by the third network device if the third network device agrees to perform the state switching. Or, the first network device negotiates with the second network device and the third network device, and sends the first message to the second network device and sends the second message to the third network device, which is not limited in this embodiment of the application.
Illustratively, if the first network device detects that the transmission quality of the first PW does not satisfy the preset condition, the first network device may send a message to the second network device and/or the third network device in any one of the three manners, and apply for executing the state switching.
In a possible implementation manner, the second network device and the third network device may return a rejection message to the first network device only if the second network device and the third network device do not agree to perform the state switching. The first network device may start a timer (e.g., a first time period) and wait for feedback from the second network device and the third network device before the timer expires. And if the timer is overtime and the first network equipment does not receive the rejection message from the second network equipment and/or the third network equipment, the second network equipment and the third network equipment are allowed to execute the state switching by default. Specifically, the rejectional message may include third identification information, where the third identification information may be a third pseudowire state TLV, and a specific value of a V field in the third pseudowire state TLV may be, for example, 0x00000054, which represents a rejectional message of an application message of 0x00000050 or 0x 00000051.
In another possible implementation manner, the first network device performs the state switching only when receiving the message confirming the switching. The first network device may receive the message confirming the handover by:
the first method is as follows:
after the third network device receives the second message sent by the first network device, the third network device sends a third message to the first network device, where the third message is used to indicate that the transmission quality of the third PW meets the preset condition.
Correspondingly, the first network device receives the third message sent by the third network device. In response to receiving the third message, the first network device switches the forwarding state of the first PW from the first state to the second state, and switches the forwarding state of the second PW from the third state to the fourth state.
In the embodiment of the application, a first network device sends a first message to a second network device, the second network device forwards the first message to a third network device under the condition that the second network device agrees to execute state switching, the third network device makes a judgment, and if the second network device agrees to execute state switching, the third network device directly sends a third message to the first network device.
The second method comprises the following steps:
after the third network device receives the second message sent by the first network device, the third network device sends a third message to the first network device, where the third message is used to indicate that the transmission quality of the third PW meets the preset condition. After receiving the first message sent by the first network device, the second network device sends a fourth message to the first network device, where the fourth message is used to indicate that the transmission quality of the second PW meets the preset condition.
Correspondingly, the first network device receives a third message sent by a third network device and a fourth message sent by a second network device; in response to receiving the third message and the fourth message, the first network device switches the forwarding state of the first PW from the first state to the second state, and switches the forwarding state of the second PW from the third state to the fourth state.
In this embodiment, the first network device may perform the state switching again when it is determined that the transmission quality of the second PW and the third PW meets the preset condition, so that the first network device can perform the state switching
In the above embodiment, the first network device needs to send the second message to the third network device, and performs negotiation with the third network device, so that the third network device may determine whether the remaining bandwidth of the port on the backup path (i.e., the third PW) can meet the traffic demand, and the third network device allows performing state switching when the port bandwidth can meet the traffic demand, thereby ensuring the quality of service transmission.
Specifically, the third network device detects after receiving the second message, and if one or more of the following conditions exist, the third network device may reject the state switching application of the first network device. Otherwise, the third network device may accept the state switching application of the first network device.
(1) When detecting that TWAMP/Y1731 of the third PW is not compliant, the third network device may reject the state switch application of the first network device;
(2) when detecting that the link bandwidth of the third PW is insufficient, which may cause a packet loss after the handover, the third network device may reject the state handover application of the first network device.
As an optional embodiment, the second network device and the third network device are connected through a third PW, and the second PW is associated with the third PW.
In this embodiment, the second PW and the third PW are associated, which may also be referred to as binding the second PW and the third PW, or that the second PW and the third PW are in a one-to-one correspondence relationship. The association may be an interface association, a tunnel label association, or the like. According to the embodiment of the application, the second PW and the third PW are bound 1 to 1, for example, a standby PW is deployed on an NPE and a bypass PW is bound at the same time, so that the flow sent to the second network equipment by the first network equipment through the second PW can be directly forwarded through the bound third PW without table lookup, zero perception of the service in the whole switching process can be guaranteed, packet loss and multiple packets do not exist, and the reliability of flow forwarding is improved.
In a possible implementation manner, there are other network devices in the system that need to forward the traffic to the third network device. Taking the fourth network device 140 in fig. 1 as an example, the fourth network device may forward traffic directly to the third network device (for example, along a fourth PW between the fourth network device and the third network device), or forward traffic to the third network device through the second network device (for example, along a fifth PW between the fourth network device and the second network device). When the fourth network device forwards traffic to the third network device through the second network device along the fifth PW, a sixth PW is further disposed between the second network device and the third network device, where the sixth PW is different from the third PW, and the sixth PW is associated with the fifth PW. Therefore, the second network device may receive the traffic forwarded by the fourth network device through the fifth PW, and forward the traffic to the third network device along the sixth PW.
In summary, the second PW and the third PW are associated for transporting traffic from the first network device, and the fifth PW and the sixth PW are associated for transporting traffic from the fourth network device. I.e., the two PWs on the backup path are in a one-to-one correspondence. For a larger number of network devices, the binding method of the PW is similar, and is not described herein again.
Exemplarily, after the third network device switches the forwarding state of the first PW from the first state to the second state and switches the forwarding state of the third PW from the fifth state to the sixth state, the method further includes: the third network device determines whether traffic can be received from the third PW; if the third network device does not receive the traffic from the third PW, the third network device continues to forward the downlink traffic through the first PW; or, if the third network device receives traffic from the third PW, the third network device learns a source MAC address of the traffic received from the third PW, to obtain a new MAC entry; and the third network equipment forwards the downlink flow through the third PW based on the new MAC table entry.
It should be understood that if the forwarding state of the first PW has been switched from the first state to the second state, that is, the uplink traffic is forwarded through the second PW and the third PW, but for the downlink traffic, the third network device forwards the downlink traffic to the first network device according to the MAC forwarding table. The MAC forwarding table entry is directly forwarded through the first PW, so that the third network device needs to learn the MAC address again and update the MAC table entry. Before the third network device does not update the MAC table, even if the uplink traffic has been switched, the third network device forwards the downlink traffic through the first PW. Only after the MAC entry is updated, the downlink traffic may be forwarded to the first network device along the second PW and the third PW.
The method in the embodiment of the application is only used for the condition that the link quality does not reach the standard, if the link is completely damaged, data transmission cannot be performed, the forwarding state of each PW should be switched back to the original state, and the second state (active-fault state), the fourth state (standby-fault state) and the sixth state (bypass-fault state) do not exist any more.
As an optional embodiment, after the first network device switches the forwarding state of the first PW from the first state to the second state, and switches the forwarding state of the second PW from the third state to the fourth state, the method further includes: if the first PW is disconnected, the forwarding state of the second PW is switched from the fourth state to the third state by the first network equipment; the second network device switches a forwarding state of the third PW from the sixth state to the fifth state; the first network device sends a fifth message to the second network device, wherein the fifth message is used for indicating that the fourth state is terminated; and the third network equipment sends a sixth message to the second network equipment, wherein the sixth message is used for indicating the termination of the sixth state. Correspondingly, the second network device receives a fifth message from the first network device and a sixth message from the third network device; and the third network device switches the forwarding state of the second PW from the fourth state to the third state and switches the forwarding state of the third PW from the sixth state to the fifth state according to the fifth message and the sixth message.
Illustratively, the negotiation process for state switching can be performed between network devices by sending the following PW state TLV. The fifth message may carry fourth identification information, where the fourth identification information may be a fourth pseudowire state TLV, and a specific value of a V field in the fourth pseudowire state TLV may be, for example, 0x00000053, which indicates that a backup PW corresponding to the PW at the home end has terminated standby-fault state. The sixth message may carry fifth identification information, where the fifth identification information may be a fifth pseudowire state TLV, and a specific value of a V field in the fifth pseudowire state TLV may be, for example, 0x00000055, which indicates that a bypass PW of the home network device has terminated a bypass-fault state.
Illustratively, SPE1 or NPE 1 senses that the first PW is disconnected, and the service flow is switched to a standby-fault PW before; SPE1 firstly sets standby-fault PW to be in a primary (primary) state, and simultaneously sends a termination intelligent switching TLV0x00000053 to NPE 2; NPE 1 firstly sets a standby-fault PW to be in a primary state, and simultaneously sends a termination intelligent switching TLV0x 00000052 to NPE 2; no matter which PE sends a TLV0x 00000052 or TLV0x00000053 message is received by the NPE 2, a standby-fault PW is set to be in a primary state, at this time, the NPE 2 sends 0x00000055 to the bypass-fault PW of the NPE 1, the NPE 1 also sends 0x00000055 message to the bypass-fault PW of the NPE 2 after sensing that the active-fault PW fails, and when NEP 1/NPE 2 mutually receives 0x00000055, the bypass-fault state is set to be in a bypass state respectively.
As an optional embodiment, after the first network device switches the forwarding state of the first PW from the first state to the second state, and switches the forwarding state of the second PW from the third state to the fourth state, the method further includes: if the second PW is disconnected, the forwarding state of the first PW is switched from the second state to the first state by the first network equipment; the second network device switches a forwarding state of the third PW from the sixth state to the fifth state; the first network device sends a seventh message to the second network device, wherein the seventh message is used for indicating the termination of the second state; the second network device sends a sixth message to the third network device, where the sixth message is used to indicate that the sixth state is terminated; correspondingly, the second network device receives a seventh message from the first network device and a sixth message from the second network device; and the third network device switches the forwarding state of the first PW from the second state to the first state and switches the forwarding state of the third PW from the sixth state to the fifth state according to the seventh message and the sixth message.
Illustratively, the negotiation process for state switching can be performed between network devices by sending the following PW state TLV. The seventh message may carry sixth identification information, where the sixth identification information may be a sixth pseudowire state TLV, a specific value of a V field in the sixth pseudowire state TLV may be, for example, 0x00000052, which indicates that a PW of the home terminal network device has terminated an active-fault state, the sixth message may carry fifth identification information, the fifth identification information may be a fifth pseudowire state TLV, and a specific value of a V field in the fifth pseudowire state TLV may be, for example, 0x00000055, which indicates that a bypass PW of the home terminal network device has terminated a bypass-fault state.
Illustratively, SPE 1/NPE 2 senses that the second PW is disconnected, NPE 2 sends a termination intelligent switching TLV0x 00000052 to NPE 1, and SPE1 sends a termination intelligent switching TLV0x00000053 to NPE 1, and the service traffic is switched to the main PW, where the switching of bypass-fault PW refers to the case where the first PW is disconnected, and is not described herein again.
It should be understood that there is also a possibility that other links fail, for example, the active link between CE2 and NPE 1 fails, triggering CE2 to switch to the standby link between CE2 and NPE 2 (e.g., E-trunk (enhanced trunk) switch); if the PW is in the main/standby mode, the forwarding state of each PW is not changed; if the PW is in an independent mode, the NPE 2 and the NPE 1 respectively send PW forwarding (0x00000000) capable of being forwarded by the pseudo wire and state signaling of PW forwarding standby (0x00000020) capable of being forwarded by the standby PW to the SPE1, because the SPE1 is in an intelligent switching state, and the two PWs are both in an up state, the SPE1 can refresh the PW to the NPE 1 into the standby state and refresh the PW to the NPE 2 into an active state, and the switching of bypass-fault PW can refer to the condition that the first PW is disconnected, and the description is omitted here. For other failures, for example, a link between the UPE and the SPE1 is broken, or a device at both ends of the link fails, the processing conditions are similar to the above, and are not described herein again.
Hereinafter, the traffic forwarding method provided in the embodiment of the present application is described in detail by taking an interaction process among the first network device, the second network device, and the third network device as an example without loss of generality.
S401, the first network device determines that the transmission quality of the first PW does not meet a preset condition through detection technologies such as TWAMP/Y1731.
S402, the first network device sends a first message to a second network device. The first message carries first identification information, and the first identification information is used for negotiating to switch the forwarding state of the second PW from the third state to the fourth state. Correspondingly, the second network device receives the first message.
S403, the first network device sends a second message to a third network device. The second message carries second identification information, and the second identification information is used for negotiating to switch the forwarding state of the first PW from the first state to the second state. Correspondingly, the third network device receives the second message.
S404, the third network device sends a third message to the first network device, which indicates that the execution of the state switching is agreed. Correspondingly, the first network device receives the third message.
Illustratively, the third network device needs to determine whether the transmission quality of the second PW and the third PW meets a preset condition.
S405, the second network device sends a fourth message to the first network device, indicating that the execution of the state switching is agreed. Correspondingly, the first network device receives the fourth message.
Illustratively, the second network device needs to determine whether the transmission quality of the third PW satisfies a preset condition.
After the first network device, the second network device and the third network device pass through the negotiation, if the first network device, the second network device and the third network device agree to execute the state switching, the following steps are executed.
S406, the first network device switches the forwarding state of the first PW from the first state to the second state, and switches the forwarding state of the second PW from the third state to the fourth state.
S407, the second network device switches the forwarding state of the second PW from the third state to the fourth state, and switches the forwarding state of the third PW from the fifth state to the sixth state;
s408, the third network device switches the forwarding state of the first PW from the first state to the second state, and switches the forwarding state of the third PW from the fifth state to the sixth state.
According to the traffic forwarding method in the embodiment of the application, the transmission quality of the PW is identified through detection technologies such as TWAMP/Y1731, wherein the transmission quality can include parameter indexes such as time delay, packet loss rate, jitter and error codes, and the state switching is executed under the condition that the transmission quality of the PW does not meet preset conditions, so that the traffic is favorably switched to a pseudo wire PW with good transmission quality, and the service transmission quality is favorably improved.
Embodiments of the present application are described in detail below with reference to fig. 2 and the PW status TLV above.
In this embodiment of the present application, the value of the V field in the PW status TLV may specifically be the following cases:
(1)0x 00000050: the PW is in an active state, but the link transmission quality does not reach the standard, and the traffic forwarding condition is not met. If the network equipment sends the message, the network equipment at the local end applies for switching the PW from the active state to the active-fault state.
(2)0x 00000051: and (4) indicating that the PW is in a standby state, the link transmission quality reaches the standard, and the link transmission quality has a forwarding condition. If the network equipment sends the message, the network equipment at the home terminal applies for switching the PW from the standby state to the standby-fault state.
(3)0x 00000052: indicating that the PW of the local terminal network equipment has terminated the active-fault state.
(4)0x 00000053: and indicating that the backup PW corresponding to the PW at the home terminal is in a terminated standby-fault state.
(5)0x 00000054: and (3) a rejection message of the application messages of 0x00000050, 0x00000051 and 0x 00000055.
(6)0x 00000055: indicating that the bypass PW of the home terminal network equipment has terminated the bypass-fault state.
For convenience of description, the following embodiments take the case of directly sending the status code of the PW status TLV between network devices as an example. However, it should be understood that, in general, a message carrying the PW status TLV is sent between network devices, and this is not limited in this embodiment of the present application.
FIG. 5 shows a schematic flow diagram of state switching of SPE 1.
S501, SPE1 determines that the active PW is in an active state and the standby PW is in a standby state.
S502, SPE1 starts a state negotiation process after receiving a message that the transmission quality of PW reported by a detection protocol (TWAMP/Y1731 and the like) does not meet a preset condition. In this embodiment, SPE1 sends 0x00000051 to NPE 2, and applies for standby PW from standby state to standby-fault state.
S503, the SPE1 determines whether a rejecture message 0x00000054 returned by the NPE 2 is received in the first time period.
In S504, when SPE1 receives 0x00000054 from NPE 2, SPE1 waits for 3 minutes (minute, min) and then proceeds to S501.
S505, if SPE1 does not receive 0x00000054 from NPE 2, SPE1 sends 0x00000050 to NPE 1, and applies for switching active PW from active state to active-fault state.
S506, the SPE1 determines whether the rejoining message 0x00000054 returned by the NPE 1 is received in the second time period.
In S507, when SPE1 receives 0x00000054 from NPE 1, SPE1 waits for 3min and then goes to S501.
S508, if SPE1 does not receive 0x00000054 from NPE 1, SPE1 executes state switching, namely, switching the active PW from the active state to the active-fault state, and switching the standby PW from the standby state to the standby-fault state.
Further, when the state switching is completed, the SPE1 sends instruction information to the forwarding plane, for instructing the forwarding plane to perform the table entry used for forwarding the traffic. Taking an example that the indication information is an XST flag, the XST flag indicates that the forwarding plane traffic has undergone PW fast reroute (FRR) switching, so that the traffic is quickly switched to a standby-fault PW, and the uplink traffic sent by CE 1 to CE2 has been switched over SPE 1. Illustratively, the forwarding plane may pre-store two entries, a forwarding entry corresponding to the active state and a forwarding entry corresponding to the standby state, the XST flag is 0, which indicates that the forwarding entry corresponding to the active state is used, and the XST flag is 1, which indicates that the forwarding entry corresponding to the standby state is used.
Fig. 6 shows a schematic flow diagram of the state switching of the NPE 2.
S601, the NPE 2 determines that the PW connected between the NPE 2 and the SPE1 is in a standby state, and the PW connected between the NPE 2 and the NPE 1 is in a bypass state.
S602, the NPE 2 receives the 0x00000051 from the SPE1, and applies for the standby PW from the standby state to the standby-fault state.
S603, the NPE 2 determines whether the transmission quality of the current link meets a preset condition (also called a service requirement or a traffic forwarding requirement). Illustratively, the NPE 2 may determine whether the PW between the SPE1 and the NPE 2 meets the service requirement, and determine whether the bypass PW between the NPE 2 and the NPE 1 meets the service requirement, if both of the above two determination results are met, the NPE 2 considers that the transmission quality of the current link meets the preset condition, otherwise, the NPE 2 considers that the transmission quality of the current link does not meet the preset condition.
S604, if the transmission quality of the current link does not satisfy the preset condition, the NPE 2 returns 0x00000054 to the SPE1, and goes to S601.
S605, if the transmission quality of the current link meets the preset condition, the NPE 2 forwards 0x00000051 to the NPE 1.
S606, the NPE 2 determines whether the rejoining message 0x00000054 returned by the NPE 1 is received in the third time period.
S607, if NPE 2 receives 0x00000054 from NPE 1, NPE 2 forwards 0x00000054 to SPE1, and goes to S601.
S608, if the NPE 2 does not receive 0x00000054 from the NPE 1, the NPE 2 executes state switching, namely switching the standby PW from the standby state to the standby-fault state, and switching the bypass PW from the bypass state to the bypass-fault state.
Further, the NPE 2 issues the table entry to the forwarding plane, and in the current state, the forwarding plane traffic is processed as follows:
(1) for unicast traffic, directly forwarding traffic received from a standby-fault PW tunnel to a bound bypass-fault PW, and directly forwarding traffic received from the bypass-fault PW to the standby-fault PW;
(2) for broadcast traffic, traffic received from the standby-fault PW tunnel needs to copy traffic to an Access Circuit (AC) side interface of the access NPE 2, in addition to forwarding a copy to the bound bypass-fault PW.
After the state switching, the uplink flow is transmitted through the bypass-fault PW tunnel and then is normally forwarded to the NPE 1.
Fig. 7 shows a schematic flow diagram of the state switching of NPE 1.
S701, the NPE 1 determines that the PW connected between the NPE 1 and the SPE1 is in an active state, and the PW connected between the NPE 1 and the NPE 2 is in a bypass state.
S702, the NPE 1 receives a request of 0x00000050 and/or 0x00000051, 0x00000050 to switch the active PW to the active-fault state from the active state, and a request of 0x00000051 to switch the standby PW to the standby-fault state from the standby state.
S703, the NPE 1 determines whether the transmission quality of the current link meets a preset condition (also referred to as a service requirement or a traffic forwarding requirement). Illustratively, NPE 1 may determine whether the bypass PW between NPE 1 and NPE 2 meets the service requirement. If the bypass PW meets the service requirement, the NPE 1 considers that the transmission quality of the current link meets a preset condition, otherwise, the NPE 1 considers that the transmission quality of the current link does not meet the preset condition.
S704, if the transmission quality of the current link does not satisfy the preset condition, the NPE 1 returns 0x00000054 to the SPE1 and/or the NPE 2, and goes to S701.
S705, if the transmission quality of the current link meets the preset condition, the NPE 1 executes state switching, namely, the active PW is switched from the active state to the active-fault state, and the bypass PW is switched from the bypass state to the bypass-fault state.
At this point, the switching of the uplink traffic is completed, and the NPE 1 receives the uplink traffic from the NPE 2 through the bypass PW. For the downlink traffic, the following steps are also required:
s706, NPE 1 determines whether the uplink traffic sent by NPE 2 is received.
S707, if the NPE 1 does not receive the uplink traffic sent by the NPE 2, the NPE 1 still directly forwards the traffic to the SPE1 through the first PW (i.e., the active PW) when receiving the downlink traffic sent by the CE 2.
S708, if NPE 1 receives the uplink traffic sent by NPE 2, NPE 1 learns the source MAC address of the received uplink traffic, generates a new forwarding table entry, and updates the forwarding table entry, so as to ensure that the traffic does not lose packets.
S709, after the forwarding table entry is updated, the downlink traffic received by the NPE 1 may be forwarded to the NPE 2 through the third PW (i.e., bypass PW), and then forwarded to the SPE1 through the second PW (i.e., standby PW) by the NPE 2.
It should be understood that the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
The traffic forwarding method according to the embodiment of the present application is described in detail above with reference to fig. 1 to 7, and the network device according to the embodiment of the present application is described in detail below with reference to fig. 8 to 9.
Fig. 8 illustrates a network device 800 provided by an embodiment of the present application. The network device 800 may be a first network device, and may also be a chip or a circuit in the first network device. The network device 800 may be a second network device, and may also be a chip or a circuit in the second network device. The network device 800 may be a third network device, and may also be a chip or a circuit in the third network device. The network device 800 includes: a processing unit 810 and a transceiving unit 820.
In a possible implementation manner, the network device 800 is configured to execute the respective procedures and steps corresponding to the first network device in the foregoing embodiment.
The processing unit 810 is configured to: determining that the transmission quality of the first pseudo wire PW does not meet a preset condition; switching a forwarding state of the first PW from a first state to a second state, and switching a forwarding state of the second PW from a third state to a fourth state, wherein the first network device connects to a third network device through the first PW, the first network device connects to a second network device through the second PW, and the first state, the second state, the third state, and the fourth state are four different forwarding states;
the transceiving unit 820 is configured to: forwarding traffic to the third network device along the first PW when the forwarding state of the first PW is the first state and the forwarding state of the second PW is the third state; and forwarding traffic to the third network device through the second network device along the second PW when the forwarding state of the first PW is the second state and the forwarding state of the second PW is the fourth state.
Exemplarily, the transceiving unit 820 is further configured to: before switching the forwarding state of the first PW from a first state to a second state and switching the forwarding state of the second PW from a third state to a fourth state, sending a first message to the second network device, where the first message carries first identification information, and the first identification information is used to negotiate to switch the forwarding state of the second PW from the third state to the fourth state.
Exemplarily, the transceiving unit 820 is further configured to: before switching the forwarding state of the first PW from a first state to a second state and switching the forwarding state of the second PW from a third state to a fourth state, sending a second message to the third network device, where the second message carries second identification information, and the second identification information is used to negotiate to switch the forwarding state of the first PW from the first state to the second state.
Exemplarily, the transceiving unit 820 is further configured to: receiving a third message sent by the third network device before switching the forwarding state of the first PW from the first state to the second state and switching the forwarding state of the second PW from the third state to the fourth state; the processing unit 810 is specifically configured to: switching a forwarding state of the first PW from the first state to the second state and switching a forwarding state of the second PW from the third state to the fourth state in response to receiving the third message.
Exemplarily, the transceiving unit 820 is further configured to: receiving a fourth message sent by the second network device before switching the forwarding state of the first PW from the first state to the second state and switching the forwarding state of the second PW from the third state to the fourth state; the processing unit 810 is specifically configured to: in response to receiving the third message and the fourth message, switching a forwarding state of the first PW from the first state to the second state and switching a forwarding state of the second PW from the third state to the fourth state.
Illustratively, the second network device and the third network device are connected via a third PW, and the second PW is associated with the third PW.
Illustratively, the processing unit 810 is further configured to: determining that the transmission quality of the second PW and the third PW meets the preset condition before switching the forwarding state of the first PW from a first state to a second state and switching the forwarding state of the second PW from a third state to a fourth state.
In a possible implementation manner, the network device 800 is configured to execute the respective procedures and steps corresponding to the second network device in the foregoing embodiment.
The processing unit 810 is configured to: determining that the transmission quality of the second pseudo wire PW meets a preset condition; switching a forwarding state of the second PW from a third state to a fourth state, and switching a forwarding state of the third PW from a fifth state to a sixth state, wherein the second network device is connected to the first network device through the second PW, the second network device is connected to the third network device through the third PW, and the third state, the fourth state, the fifth state, and the sixth state are four different forwarding states;
the transceiving unit 820 is configured to: receiving traffic forwarded by the first network device along the second PW and forwarding the traffic to the third network device along the third PW.
Exemplarily, the transceiving unit 820 is further configured to: before determining that the transmission quality of a second pseudo wire PW meets a preset condition, receiving a first message sent by the first network device, wherein the first message carries first identification information, and the first identification information is used for negotiating to switch the forwarding state of the second PW from the third state to the fourth state.
Exemplarily, the transceiving unit 820 is further configured to: after receiving the first message sent by the first network device, sending a fourth message to the first network device, where the fourth message is used to indicate that the transmission quality of the second PW meets the preset condition.
Illustratively, the second PW is associated with the third PW.
In a possible implementation manner, the network device 800 is configured to execute the respective procedures and steps corresponding to the third network device in the foregoing embodiment.
The processing unit 810 is configured to: determining that the transmission quality of the third pseudo wire PW meets a preset condition; switching a forwarding state of a first PW from a first state to a second state, and switching a forwarding state of a third PW from a fifth state to a sixth state, wherein the third network device is connected with a first network device through the first PW, the third network device is connected with a second network device through the third PW, and the first state, the second state, the fifth state and the sixth state are four different forwarding states;
the transceiving unit 820 is configured to: when the forwarding state of the first PW is the first state and the forwarding state of the third PW is the fifth state, receiving traffic forwarded by the first network device along the first PW; and when the forwarding state of the first PW is the second state and the forwarding state of the third PW is the sixth state, receiving traffic forwarded by the second network device along the third PW.
Exemplarily, the transceiving unit 820 is further configured to: and before determining that the transmission quality of a third pseudo wire PW meets a preset condition, receiving a second message sent by the first network device, wherein the second message carries second identification information, and the second identification information is used for negotiating and switching the forwarding state of the first PW from the first state to the second state.
Exemplarily, the transceiving unit 820 is further configured to: after receiving the second message sent by the first network device, sending a third message to the first network device, where the third message is used to indicate that the transmission quality of the third PW meets the preset condition.
Illustratively, the first network device and the second network device are connected via a second PW associated with the third PW.
It should be appreciated that the network device 800 herein is embodied in the form of functional units. The term "unit" herein may refer to an Application Specific Integrated Circuit (ASIC), an electronic circuit, a processor (e.g., a shared, dedicated, or group processor) and memory that execute one or more software or firmware programs, a combinational logic circuit, and/or other suitable components that support the described functionality. In an optional example, it may be understood by those skilled in the art that the network device 800 may be specifically a terminal device or a network device in the foregoing embodiment, and the network device 800 may be configured to execute each procedure and/or step corresponding to the terminal device or the network device in the foregoing method embodiment, and in order to avoid repetition, details are not described here again.
The network device 800 of each of the above-mentioned schemes has a function of implementing corresponding steps executed by the terminal device or the network device in the above-mentioned method; the functions can be realized by hardware, and the functions can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above-described functions. For example, the transceiver 820 may include a transmitter and a receiver, where the transmitter may be configured to implement each step and/or flow corresponding to the transceiver for performing a transmitting action, and the receiver may be configured to implement each step and/or flow corresponding to the transceiver for performing a receiving action. The transmitting unit may be replaced by a transmitter, and the receiving unit may be replaced by a receiver, which performs transceiving operations and related processing operations in the respective method embodiments, respectively.
In an embodiment of the present application, the network device 800 in fig. 8 may also be a chip or a chip system, for example: system on chip (SoC). Correspondingly, the receiving unit and the transmitting unit may be a transceiver circuit of the chip, and are not limited herein.
Fig. 9 illustrates another network device 900 provided by an embodiment of the present application. The network device 900 includes a processor 910, a transceiver 920, and a memory 930. Wherein, the processor 910, the transceiver 920 and the memory 930 are in communication with each other through an internal connection path, the memory 930 is used for storing instructions, and the processor 910 is used for executing the instructions stored in the memory 930 to control the transceiver 920 to transmit and/or receive signals.
In a possible implementation manner, the network device 900 is configured to execute the respective procedures and steps corresponding to the first network device in the foregoing embodiments.
Wherein the processor 910 is configured to: determining that the transmission quality of the first pseudo wire PW does not meet a preset condition; switching a forwarding state of the first PW from a first state to a second state, and switching a forwarding state of the second PW from a third state to a fourth state, wherein the first network device connects to a third network device through the first PW, the first network device connects to a second network device through the second PW, and the first state, the second state, the third state, and the fourth state are four different forwarding states;
the transceiver 920 is configured to: forwarding traffic to the third network device along the first PW when the forwarding state of the first PW is the first state and the forwarding state of the second PW is the third state; and forwarding traffic to the third network device through the second network device along the second PW when the forwarding state of the first PW is the second state and the forwarding state of the second PW is the fourth state.
In a possible implementation manner, the network device 900 is configured to execute the respective procedures and steps corresponding to the second network device in the foregoing embodiment.
Wherein the processor 910 is configured to: determining that the transmission quality of the second pseudo wire PW meets a preset condition; switching a forwarding state of the second PW from a third state to a fourth state, and switching a forwarding state of the third PW from a fifth state to a sixth state, wherein the second network device is connected to the first network device through the second PW, the second network device is connected to the third network device through the third PW, and the third state, the fourth state, the fifth state, and the sixth state are four different forwarding states;
the transceiver 920 is configured to: receiving traffic forwarded by the first network device along the second PW and forwarding the traffic to the third network device along the third PW.
In a possible implementation manner, the network device 900 is configured to execute the respective procedures and steps corresponding to the third network device in the foregoing embodiment.
Wherein the processor 910 is configured to: determining that the transmission quality of the third pseudo wire PW meets a preset condition; switching a forwarding state of a first PW from a first state to a second state, and switching a forwarding state of a third PW from a fifth state to a sixth state, wherein the third network device is connected with a first network device through the first PW, the third network device is connected with a second network device through the third PW, and the first state, the second state, the fifth state and the sixth state are four different forwarding states;
the transceiver 920 is configured to: when the forwarding state of the first PW is the first state and the forwarding state of the third PW is the fifth state, receiving traffic forwarded by the first network device along the first PW; and when the forwarding state of the first PW is the second state and the forwarding state of the third PW is the sixth state, receiving traffic forwarded by the second network device along the third PW.
It is to be understood that the network device 900 may be embodied as the first network device in the above embodiments, and may be configured to perform each step and/or flow corresponding to the first network device in the above method embodiments. Alternatively, the network device 900 may be embodied as a second network device in the foregoing embodiments, and may be configured to execute each step and/or flow corresponding to the second network device in the foregoing method embodiments. Alternatively, the network device 900 may be embodied as a third network device in the foregoing embodiments, and may be configured to execute each step and/or flow corresponding to the third network device in the foregoing method embodiments. Illustratively, the memory 930 may include both read-only memory and random access memory, and provides instructions and data to the processor. The portion of memory may also include non-volatile random access memory. For example, the memory may also store device type information. The processor 910 may be configured to execute instructions stored in the memory, and when the processor 910 executes the instructions stored in the memory, the processor 910 is configured to perform the various steps and/or processes of the above-described method embodiments corresponding to the first network device, the second network device, or the third network device. The transceiver 920 may integrate receiving and transmitting functions, or may respectively include a transmitter and a receiver, where the transmitter may be configured to implement each step and/or flow corresponding to the transceiver for performing a sending action, and the receiver may be configured to implement each step and/or flow corresponding to the transceiver for performing a receiving action.
It should be understood that, in the embodiment of the present application, the processor of the network device may be a Central Processing Unit (CPU), and the processor may also be other general processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The number of the processors may be one or more.
In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The steps of a method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or may be implemented by a combination of hardware and software elements in a processor. The software elements may be located in ram, flash, rom, prom, or eprom, registers, among other storage media that are well known in the art. The storage medium is located in a memory, and a processor executes instructions in the memory, in combination with hardware thereof, to perform the steps of the above-described method. To avoid repetition, it is not described in detail here.
As used in this specification, the terms "component," "module," "system," and the like are intended to refer to a computer-related entity, either hardware, firmware, a combination of hardware and software, or software in execution. For example, a component may be, but is not limited to being, a process running on a processor, an object, an executable, a thread of execution, a program, and/or a computer. By way of illustration, both an application running on a computing device and the computing device can be a component. One or more components can reside within a process and/or thread of execution and a component may be localized on one computer and/or distributed between two or more computers. In addition, these components can execute from various computer readable media having various data structures stored thereon. The components may communicate by way of local and/or remote processes such as in accordance with a signal having one or more data packets (e.g., data from two components interacting with another component in a local system, distributed system, and/or across a network such as the internet with other systems by way of the signal).
In addition, various aspects or features of the present application may be implemented as a method, apparatus, or article of manufacture using standard programming and/or engineering techniques. The term "article of manufacture" as used herein is intended to encompass a computer program accessible from any computer-readable device, carrier, or media. For example, computer-readable media may include, but are not limited to: magnetic storage devices (e.g., hard disk, floppy disk, or magnetic tape), optical disks (e.g., Compact Disk (CD), Digital Versatile Disk (DVD), etc.), smart cards, and flash memory devices (e.g., erasable programmable read-only memory (EPROM), card, stick, or key drive, etc.). In addition, various storage media described herein can represent one or more devices and/or other machine-readable media for storing information. The term "machine-readable medium" can include, without being limited to, wireless channels and various other media capable of storing, containing, and/or carrying instruction(s) and/or data.
In the present application, "at least one" means one or more, "a plurality" means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a alone, both A and B, and B alone, where A, B may be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of the singular or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, a-b, a-c, b-c or a-b-c, wherein a, b and c can be single or multiple.
Those of ordinary skill in the art will appreciate that the various method steps and elements described in connection with the embodiments disclosed herein can be implemented as electronic hardware, computer software, or combinations of both, and that the steps and elements of the various embodiments have been described above generally in terms of their functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may also be an electric, mechanical or other form of connection.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiments of the present application.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially or partially contributed by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
While the invention has been described with reference to specific embodiments, the scope of the invention is not limited thereto, and those skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the invention. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (34)

1. A traffic forwarding method, comprising:
the first network equipment determines that the transmission quality of the first pseudo wire PW does not meet a preset condition;
the first network device switches a forwarding state of the first PW from a first state to a second state, and switches a forwarding state of a second PW from a third state to a fourth state, wherein the first network device connects to a third network device through the first PW, the first network device connects to a second network device through the second PW, and the first state, the second state, the third state, and the fourth state are four different forwarding states; wherein the content of the first and second substances,
when the forwarding state of the first PW is the first state and the forwarding state of the second PW is the third state, forwarding, by the first network device, traffic to the third network device along the first PW;
and when the forwarding state of the first PW is the second state and the forwarding state of the second PW is the fourth state, the first network device forwards traffic to the third network device through the second network device along the second PW.
2. The method of claim 1, wherein before the first network device switches the forwarding state of the first PW from the first state to the second state and the forwarding state of the second PW from the third state to the fourth state, the method further comprises:
the first network device sends a first message to the second network device, where the first message carries first identification information, and the first identification information is used to negotiate to switch the forwarding state of the second PW from the third state to the fourth state.
3. The method according to claim 1 or 2, wherein before the first network device switches the forwarding state of the first PW from the first state to the second state and the forwarding state of the second PW from the third state to the fourth state, the method further comprises:
and the first network device sends a second message to the third network device, wherein the second message carries second identification information, and the second identification information is used for negotiating to switch the forwarding state of the first PW from the first state to the second state.
4. The method according to any one of claims 1-3, wherein before the first network device switches the forwarding state of the first PW from the first state to the second state and the forwarding state of the second PW from the third state to the fourth state, the method further comprises:
the first network equipment receives a third message sent by the third network equipment;
in response to receiving the third message, the first network device switches a forwarding state of the first PW from the first state to the second state and switches a forwarding state of the second PW from the third state to the fourth state.
5. The method of claim 4, further comprising, before the first network device switches the forwarding state of the first PW from the first state to the second state and the forwarding state of the second PW from the third state to the fourth state:
the first network equipment receives a fourth message sent by the second network equipment;
in response to receiving the third message, the first network device switching a forwarding state of the first PW from the first state to the second state and switching a forwarding state of a second PW from the third state to the fourth state, including:
in response to receiving the third message and the fourth message, the first network device switches a forwarding state of the first PW from the first state to the second state and switches a forwarding state of the second PW from the third state to the fourth state.
6. The method according to any one of claims 1-5, wherein the second network device and the third network device are connected via a third PW, the second PW associated with the third PW.
7. The method of claim 6, wherein before the first network device switches the forwarding state of the first PW from the first state to the second state and the forwarding state of the second PW from the third state to the fourth state, the method further comprises:
the first network device determines that the transmission quality of the second PW and the third PW meets the preset condition.
8. A traffic forwarding method, comprising:
the second network equipment determines that the transmission quality of the second pseudo wire PW meets a preset condition;
the second network device switches a forwarding state of the second PW from a third state to a fourth state, and switches a forwarding state of the third PW from a fifth state to a sixth state, where the second network device is connected to the first network device through the second PW, the second network device is connected to the third network device through the third PW, and the third state, the fourth state, the fifth state, and the sixth state are four different forwarding states;
and the second network equipment receives the traffic forwarded by the first network equipment along the second PW and forwards the traffic to the third network equipment along the third PW.
9. The method of claim 8, wherein before the second network device determines that the transmission quality of the second pseudowire PW satisfies a preset condition, the method further comprises:
and the second network device receives a first message sent by the first network device, where the first message carries first identification information, and the first identification information is used to negotiate to switch the forwarding state of the second PW from the third state to the fourth state.
10. The method of claim 9, wherein after the second network device receives the first message sent by the first network device, the method further comprises:
and the second network device sends a fourth message to the first network device, where the fourth message is used to indicate that the transmission quality of the second PW meets the preset condition.
11. The method according to any one of claims 8-10, wherein the second PW is associated with the third PW.
12. A traffic forwarding method, comprising:
the third network equipment determines that the transmission quality of the third pseudo wire PW meets a preset condition;
the third network device switches a forwarding state of a first PW from a first state to a second state, and switches a forwarding state of a third PW from a fifth state to a sixth state, wherein the third network device is connected to the first network device through the first PW, the third network device is connected to the second network device through the third PW, and the first state, the second state, the fifth state and the sixth state are four different forwarding states; wherein the content of the first and second substances,
when the forwarding state of the first PW is the first state and the forwarding state of the third PW is the fifth state, the third network device receives traffic forwarded by the first network device along the first PW;
and when the forwarding state of the first PW is the second state and the forwarding state of the third PW is the sixth state, the third network device receives the traffic forwarded by the second network device along the third PW.
13. The method of claim 12, wherein before the third network device determines that the transmission quality of the third pseudowire PW satisfies a preset condition, the method further comprises:
and the third network device receives a second message sent by the first network device, where the second message carries second identification information, and the second identification information is used to negotiate to switch the forwarding state of the first PW from the first state to the second state.
14. The method of claim 13, wherein after the third network device receives the second message sent by the first network device, the method further comprises:
and the third network device sends a third message to the first network device, where the third message is used to indicate that the transmission quality of the third PW meets the preset condition.
15. The method of any one of claims 12-14, wherein the first network device and the second network device are connected via a second PW, the second PW associated with the third PW.
16. A traffic forwarding method, comprising:
the first network equipment determines that the transmission quality of the first pseudo wire PW does not meet a preset condition;
the first network equipment sends a first message to second network equipment, wherein the first message carries first identification information, and the first identification information is used for negotiating to switch the forwarding state of the second PW from a third state to a fourth state;
the first network device sends a second message to a third network device, wherein the second message carries second identification information, and the second identification information is used for negotiating to switch the forwarding state of the first PW from a first state to a second state;
the first network device receives a third message, and in response to receiving the third message, the first network device switches the forwarding state of the first PW from the first state to the second state, and switches the forwarding state of a second PW from the third state to the fourth state, where the first network device is connected to the third network device through the first PW, the first network device is connected to the second network device through the second PW, and the first state, the second state, the third state, and the fourth state are four different forwarding states; wherein the content of the first and second substances,
when the forwarding state of the first PW is the first state and the forwarding state of the second PW is the third state, forwarding, by the first network device, traffic to the third network device along the first PW;
and when the forwarding state of the first PW is the second state and the forwarding state of the second PW is the fourth state, the first network device forwards traffic to the third network device through the second network device along the second PW.
17. A first network device, comprising:
the processing unit is used for determining that the transmission quality of the first pseudo wire PW does not meet a preset condition; switching a forwarding state of the first PW from a first state to a second state, and switching a forwarding state of the second PW from a third state to a fourth state, wherein the first network device connects to a third network device through the first PW, the first network device connects to a second network device through the second PW, and the first state, the second state, the third state, and the fourth state are four different forwarding states;
a transceiving unit, configured to forward traffic to the third network device along the first PW when a forwarding state of the first PW is the first state and a forwarding state of the second PW is the third state; and forwarding traffic to the third network device through the second network device along the second PW when the forwarding state of the first PW is the second state and the forwarding state of the second PW is the fourth state.
18. The first network device of claim 17, wherein the transceiver unit is further configured to:
before switching the forwarding state of the first PW from a first state to a second state and switching the forwarding state of the second PW from a third state to a fourth state, sending a first message to the second network device, where the first message carries first identification information, and the first identification information is used to negotiate to switch the forwarding state of the second PW from the third state to the fourth state.
19. The first network device according to claim 17 or 18, wherein the transceiver unit is further configured to:
before switching the forwarding state of the first PW from a first state to a second state and switching the forwarding state of the second PW from a third state to a fourth state, sending a second message to the third network device, where the second message carries second identification information, and the second identification information is used to negotiate to switch the forwarding state of the first PW from the first state to the second state.
20. The first network device according to any of claims 17-19, wherein the transceiver unit is further configured to:
receiving a third message sent by the third network device before switching the forwarding state of the first PW from the first state to the second state and switching the forwarding state of the second PW from the third state to the fourth state;
the processing unit is specifically configured to:
switching a forwarding state of the first PW from the first state to the second state and switching a forwarding state of the second PW from the third state to the fourth state in response to receiving the third message.
21. The first network device of claim 20, the transceiver unit further to:
receiving a fourth message sent by the second network device before switching the forwarding state of the first PW from the first state to the second state and switching the forwarding state of the second PW from the third state to the fourth state;
the processing unit is specifically configured to:
in response to receiving the third message and the fourth message, switching a forwarding state of the first PW from the first state to the second state and switching a forwarding state of the second PW from the third state to the fourth state.
22. The first network device of any one of claims 17-21, wherein the second network device and the third network device are connected via a third PW, and wherein the second PW is associated with the third PW.
23. The first network device of claim 22, wherein the processing unit is further configured to:
determining that the transmission quality of the second PW and the third PW meets the preset condition before switching the forwarding state of the first PW from a first state to a second state and switching the forwarding state of the second PW from a third state to a fourth state.
24. A second network device, comprising:
the processing unit is used for determining that the transmission quality of the second pseudo wire PW meets a preset condition; switching a forwarding state of the second PW from a third state to a fourth state, and switching a forwarding state of the third PW from a fifth state to a sixth state, wherein the second network device is connected to the first network device through the second PW, the second network device is connected to the third network device through the third PW, and the third state, the fourth state, the fifth state, and the sixth state are four different forwarding states;
a transceiving unit, configured to receive traffic forwarded by the first network device along the second PW, and forward the traffic to the third network device along the third PW.
25. The second network device of claim 24, wherein the transceiver unit is further configured to:
before determining that the transmission quality of a second pseudo wire PW meets a preset condition, receiving a first message sent by the first network device, wherein the first message carries first identification information, and the first identification information is used for negotiating to switch the forwarding state of the second PW from the third state to the fourth state.
26. The second network device of claim 25, wherein the transceiver unit is further configured to:
after receiving the first message sent by the first network device, sending a fourth message to the first network device, where the fourth message is used to indicate that the transmission quality of the second PW meets the preset condition.
27. The second network device of any one of claims 24-26, wherein the second PW is associated with the third PW.
28. A third network device, comprising:
the processing unit is used for determining that the transmission quality of the third pseudo wire PW meets a preset condition; switching a forwarding state of a first PW from a first state to a second state, and switching a forwarding state of a third PW from a fifth state to a sixth state, wherein the third network device is connected with a first network device through the first PW, the third network device is connected with a second network device through the third PW, and the first state, the second state, the fifth state and the sixth state are four different forwarding states;
a transceiving unit, configured to receive, when a forwarding state of the first PW is the first state and a forwarding state of the third PW is the fifth state, traffic forwarded by the first network device along the first PW; and when the forwarding state of the first PW is the second state and the forwarding state of the third PW is the sixth state, receiving traffic forwarded by the second network device along the third PW.
29. The third network device of claim 28, wherein the transceiver unit is further configured to:
and before determining that the transmission quality of a third pseudo wire PW meets a preset condition, receiving a second message sent by the first network device, wherein the second message carries second identification information, and the second identification information is used for negotiating and switching the forwarding state of the first PW from the first state to the second state.
30. The third network device of claim 29, wherein the transceiver unit is further configured to:
after receiving the second message sent by the first network device, sending a third message to the first network device, where the third message is used to indicate that the transmission quality of the third PW meets the preset condition.
31. The third network device of any one of claims 28-30, wherein the first network device and the second network device are connected via a second PW, and wherein the second PW is associated with the third PW.
32. A network device comprising a processor and a memory, the processor and the memory coupled, the processor to execute instructions in the memory to cause the network device to perform the method of any of claims 1-15.
33. A computer-readable medium for storing a computer program, characterized in that the computer program, when run on a computer, causes the computer to carry out the instructions of the method of any of the preceding claims 1-15.
34. A communication system, comprising: the first network device of any of claims 17-23, the second network device of any of claims 24-27, and the third network device of any of claims 28-31.
CN201910371596.9A 2019-05-06 2019-05-06 Flow forwarding method and network equipment Active CN111901182B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910371596.9A CN111901182B (en) 2019-05-06 2019-05-06 Flow forwarding method and network equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910371596.9A CN111901182B (en) 2019-05-06 2019-05-06 Flow forwarding method and network equipment

Publications (2)

Publication Number Publication Date
CN111901182A true CN111901182A (en) 2020-11-06
CN111901182B CN111901182B (en) 2022-06-28

Family

ID=73169571

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910371596.9A Active CN111901182B (en) 2019-05-06 2019-05-06 Flow forwarding method and network equipment

Country Status (1)

Country Link
CN (1) CN111901182B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070011352A1 (en) * 2005-07-11 2007-01-11 Luca Martini Pseudowire (PW) switching type-length-value (TLV)
US20080240101A1 (en) * 2007-03-26 2008-10-02 Alcatel Lucent Management of redundant and multi-segment pseudo-wire
CN104602285A (en) * 2014-12-31 2015-05-06 华为技术有限公司 Disaster recovery method and equipment
CN107612738A (en) * 2017-09-22 2018-01-19 烽火通信科技股份有限公司 The uplink traffic fast switching system and method for VPLS dual-homed service models
CN108243114A (en) * 2016-12-26 2018-07-03 华为技术有限公司 A kind of method to E-Packet, equipment and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070011352A1 (en) * 2005-07-11 2007-01-11 Luca Martini Pseudowire (PW) switching type-length-value (TLV)
US20080240101A1 (en) * 2007-03-26 2008-10-02 Alcatel Lucent Management of redundant and multi-segment pseudo-wire
CN104602285A (en) * 2014-12-31 2015-05-06 华为技术有限公司 Disaster recovery method and equipment
CN108243114A (en) * 2016-12-26 2018-07-03 华为技术有限公司 A kind of method to E-Packet, equipment and system
CN107612738A (en) * 2017-09-22 2018-01-19 烽火通信科技股份有限公司 The uplink traffic fast switching system and method for VPLS dual-homed service models

Also Published As

Publication number Publication date
CN111901182B (en) 2022-06-28

Similar Documents

Publication Publication Date Title
US10003531B2 (en) Method for establishing tunnel, method for allocating label, device and network system
US9197583B2 (en) Signaling of attachment circuit status and automatic discovery of inter-chassis communication peers
CN111901235A (en) Method and device for processing route, and method and device for data transmission
US11909556B2 (en) Resilient multiprotocol label switching (MPLS) rings using segment routing
CN112565046B (en) Synchronizing multicast router capabilities
CN112929274A (en) Method, equipment and system for processing route
US20150146727A1 (en) Forwarding Packets and PE Devices in VPLS
EP3796606B1 (en) Ping/traceroute for static label switched paths (lsps) and static segment routing traffic engineering (srte) tunnels
EP3515015B1 (en) Arbitrating mastership between redundant control planes of a virtual node
EP2087648A2 (en) A method and system for verifying connectivity of multi- segment pseudo-wires by tracing
CN109587059B (en) SR-BE inner layer tunnel label configuration method, device and communication system
US11962491B2 (en) Source routing tunnel ingress protection
US20210359930A1 (en) Forwarding Path Determining Method, Apparatus, and System
EP2634978B1 (en) Message forwarding method and network device
CN109691031B (en) Service message transmission method and node equipment
US9716639B2 (en) Protection switching method and system
KR20230017324A (en) BIER multicast traffic statistics collection method, device and system
CN111901182B (en) Flow forwarding method and network equipment
JP6371399B2 (en) Interface parameter synchronization method and apparatus
CN110945835B (en) Message synchronization method and device
CN111885630B (en) Data transmission method and communication device
CN114760244B (en) Method, device and network equipment for transmitting Binding Segment Identification (BSID)
CN113872843B (en) Route generation method, route processing method and device
CN115622915A (en) Fault detection method, device and system
CN116980350A (en) Method and device for determining pseudo-wire state

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