CN105119824B - A kind of message forwarding method and device - Google Patents

A kind of message forwarding method and device Download PDF

Info

Publication number
CN105119824B
CN105119824B CN201510372207.6A CN201510372207A CN105119824B CN 105119824 B CN105119824 B CN 105119824B CN 201510372207 A CN201510372207 A CN 201510372207A CN 105119824 B CN105119824 B CN 105119824B
Authority
CN
China
Prior art keywords
equipment
data message
stream label
forwarding
activation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510372207.6A
Other languages
Chinese (zh)
Other versions
CN105119824A (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 CN201510372207.6A priority Critical patent/CN105119824B/en
Publication of CN105119824A publication Critical patent/CN105119824A/en
Application granted granted Critical
Publication of CN105119824B publication Critical patent/CN105119824B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/50Routing or path finding of packets in data switching networks using label swapping, e.g. multi-protocol label switch [MPLS]
    • H04L45/507Label distribution

Landscapes

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

Abstract

The embodiment of the invention discloses a kind of message forwarding method and device, the first PE equipment is that the 3rd PW distributes the first stream label and the second stream label, and sends to the 2nd PE equipment;First PW is being switched to activation PW from the PW that awaits orders, or during the first AC is switched to activation AC from the AC that awaits orders, the data message that the 2nd PE equipment is sent is received by the 3rd PW;According in the data message the first stream label or second tag recognition described in data message from CE equipment;Determine forwarding connection, the forwarding connection for into the first CE equipment and the 2nd CE equipment from the data message from the different CE device forwards data message of CE equipment;The data message is forwarded using forwarding connection, therefore the first PE equipment will not improve the stability of the PW network to determine the appearance for forwarding connection and leading to message forwarding loop to make mistake from the received data message of the 3rd PW.

Description

A kind of message forwarding method and device
Technical field
The present invention relates to data communication fields, more particularly to a kind of message forwarding method and device.
Background technique
In the pseudo wire emulation (English of edge-to-edge:Pseudo Wire Emulation Edge-to-Edge, abbreviation: PWE3) in framework, customer edge (English:Customer Edge, abbreviation:CE) equipment and another CE equipment pass through operator side Edge (English:Provider Edge, abbreviation:PE) equipment is connected.Pseudo-wire (English can be used in above-mentioned framework:Pseudo Wire, abbreviation:PW) redundancy protecting mechanism.As shown in FIG. 1, FIG. 1 is a kind of connection schematic diagrams of traditional PW redundancy scene.Its In, CE equipment 1 is connected with PE equipment 3, and CE equipment 2 and PE equipment 1 and PE equipment 2 are respectively connected with, PE equipment 3 by the first PW with PE equipment 1 is connected, and PE equipment 3 is connected by the 2nd PW with PE equipment 2.Generally using one article in the first PW and the 2nd PW PW is as activation (English:Active) PW, another as (English of awaiting orders:standby)PW.Activation PW is that two CE are set in figure Standby to provide data transmission, the PW that awaits orders can be switched to activation PW when activating PW to break down to guarantee that data are transmitted.First Relationship between PW and the 2nd PW is also possible to (English active and standby each other:mutual backup).PE equipment 1 and CE equipment 2 passes through First attachment circuit (English:Attachment Circuit, abbreviation:AC) it is connected, PE equipment 2 and CE equipment 2 pass through the 2nd AC It is connected.Generally use one article of AC in the first AC and the 2nd AC to provide data as activation AC for two CE equipment in figure to pass Defeated, another can be switched to activation AC when activation AC breaks down and guarantee as the AC that awaits orders, the AC that awaits orders Data transmission, that is to say, that be relationship active and standby each other between the first AC and the 2nd AC.PE equipment 1 and PE equipment 2 are to bypass puppet Line (Bypass PW) is connected.
In scene shown in Fig. 1, such as the first PW is activation PW, and the first AC is activation AC, and CE equipment 1 passes through PE equipment 3PE equipment 1 and CE equipment 2 carries out data transmission, if the first PW breaks down, the 2nd PW is switched to activation from the PW that awaits orders PW, CE equipment 1 will pass through PE equipment 3PE equipment 2PE equipment 1 and CE equipment 2 carries out data transmission.Since PE equipment 2 exists 2nd PW is switched to activation PW from the PW that awaits orders and needs certain time, the 2nd PW is successfully switched to activation PW's in PE equipment 2 In this period, PE equipment 2 does not simultaneously know the message that will be received from Bypass PW by the 2nd PW forwarding, or It is forwarded by the 2nd AC.And PE equipment this period 2 can not forward the message received from Bypass PW, this Sample will lead to a large amount of messages and be dropped in PE equipment 2.Preferential forward rule can be preset in PE equipment 2 thus, it is specified that It is forwarded by the message prior that Bypass PW is received by the 2nd PW.So that the 2nd PW is switched to activation During PW, PE equipment 2 can be clear according to the preferential forward rule, and the message received by Bypass PW is passed through 2nd PW forwarding.
Due in PE equipment 2 be the message from a Bypass PW can only a kind of preset preferential forward rule, i.e., only It can be that a Bypass PW determines the forwarding preferentially forwarded a connection.So problem is, in above-mentioned scene, if gone out Existing first AC breaks down, and PE equipment 2 needs the case where the 2nd AC is switched to activation AC from the AC that awaits orders, in 2 success of PE equipment During 2nd AC is switched to activation AC, PE equipment 2 will will pass through Bypass PW according to the preferred forward rule forwarding The message prior received is forwarded by the 2nd PW to PE equipment 3.Thus the shape between PE equipment 1, PE equipment 2 and PE equipment 3 At message forwarding loop.The stability of network system is brought and is seriously affected.
Summary of the invention
The embodiment of the invention provides a kind of message forwarding method and device, the first PE equipment to the 2nd PE equipment be third PW distributes the first stream label and the second stream label, and the first PE equipment can be by the first stream label for carrying in data message Or second tag recognition go out the data message that is received from the 3rd PW from CE equipment, and as determining forwarding connection Foundation, avoid and the technical issues of message forwarding loop occur.
First aspect provides a kind of message forwarding method, be applied to PW network, the PW network include the first PE equipment, 2nd PE equipment and the 3rd PE equipment, the first PE equipment are connected by the first PW with the 3rd PE equipment, and the first PE is set Standby to be connected by the first AC with the first CE equipment, the 2nd PE equipment passes through the 2nd PW and is connected with the 3rd PE equipment, and described the Two PE equipment are connected by the 2nd AC with the first CE equipment, and the 2nd CE equipment is connected with the 3rd PE equipment, the first PE Equipment is connected by the 3rd PW with the 2nd PE equipment, wherein one article of PW is activation PW in the first PW and the 2nd PW, separately One PW is the PW that awaits orders for activating PW, and it is activation AC that one article of AC, which is activation AC, another AC, in the first AC and the 2nd AC Await orders AC, the method includes:
The first PE equipment is that the 3rd PW distributes the first stream label and the second stream label, and first stream label is used In data message of the mark from the 2nd CE equipment, second stream label is for identifying from the first CE equipment Data message, the first PE equipment send first stream label and the second stream label to the 2nd PE equipment;
The first PW is switched to activation PW from the PW that awaits orders in the first PE equipment, or by the first AC from awaiting orders During AC is switched to activation AC, the first PE equipment receives the number that the 2nd PE equipment is sent by the 3rd PW According to message;
The first PE equipment according in the data message the first stream label or second tag recognition described in data Message from CE equipment;
The first PE equipment according to the data message from CE equipment from the first PW and the first AC Determine forwarding connection, the forwarding connect for into the first CE equipment and the 2nd CE equipment with the data message From the different CE device forwards data message of CE equipment;
The first PE equipment forwards the data message using forwarding connection.
In the first possible implementation of the first aspect, it is described the first PE equipment by the first PW from The PW that awaits orders be switched to activation PW, or by the first AC from the AC that awaits orders be switched to activation AC during, the first PE equipment The data message that the 2nd PE equipment is sent is received by the 3rd PW, including:
During the first AC is switched to activation AC from the AC that awaits orders by the first PE equipment, the first PE is set Standby that the first data message that the 2nd PE equipment is sent is received by the 3rd PW, first data message includes first Stream label;
The first PE equipment according in the data message the first stream label or second tag recognition described in data Message from CE equipment, including:
First PE equipment, first data message according to the first-class tag recognition of first data message come From the 2nd CE equipment;
The first PE equipment according to the data message from CE equipment from the first PW and the first AC Determine forwarding connection, including:
The first PE equipment determines the first AC for forwarding connection.
With reference to first aspect or the first possible implementation of first aspect, second in first aspect are possible Implementation in, it is described that the first PW is switched to activation PW from the PW that awaits orders in the first PE equipment, or by described the During one AC is switched to activation AC from the AC that awaits orders, the first PE equipment obtains the 2nd PE equipment from the 3rd PW The data message of transmission, including:
During the first PW is switched to activation PW from the PW that awaits orders by the first PE equipment, the first PE is set Standby that the second data message that the 2nd PE equipment is sent is received by the 3rd PW, second data message includes second Stream label;
The first PE equipment according in the data message the first stream label or second tag recognition described in data Message from CE equipment, including:
First PE equipment, second data message according to the second tag recognition of second data message come From the first CE equipment;
The first PE equipment according to the data message from CE equipment from the first PW and the first AC Determine forwarding connection, including:
The first PE equipment determines the first PW for forwarding connection.
With reference to first aspect or the first or second of possible implementation of first aspect, the of first aspect In three kinds of possible implementations, further include:
The first PE equipment receives the third stream label that the 2nd PE equipment is sent, and the third stream label is described 2nd PE equipment is the stream label of the 3rd PW distribution, and the third stream label is for identifying the data from the 2nd CE equipment Message;
The first PE equipment receives the third data message from the 2nd CE equipment by the first PW;
The first PE equipment is added to the third datagram of the third stream label by the 3rd PW forwarding Text.
With reference to first aspect and the first any one into the third possible implementation of first aspect, exist In 4th kind of possible implementation of first aspect, further include:
The first PE equipment receives the 4th stream label that the 2nd PE equipment is sent, and the 4th stream label is described 2nd PE equipment is the stream label of the 3rd PW distribution, and the 4th stream label is for identifying the data from the first CE equipment Message;
The first PE equipment receives the 4th data message from the first CE equipment by the first AC;
The first PE equipment is added to the 4th datagram of the 4th stream label by the 3rd PW forwarding Text.
Second aspect provides a kind of apparatus for forwarding message, is applied to PW network, the PW network includes the first PE Equipment, the 2nd PE equipment and the 3rd PE equipment, the first PE equipment are connected by the first PW with the 3rd PE equipment, and described first PE equipment is connected by the first AC with the first CE equipment, and the 2nd PE equipment is connected by the 2nd PW with the 3rd PE equipment, institute It states the 2nd PE equipment and is connected with the first CE equipment by the 2nd AC, the 2nd CE equipment is connected with the 3rd PE equipment, and described the One PE equipment is connected by the 3rd PW with the 2nd PE equipment, wherein one article of PW is activation in the first PW and the 2nd PW PW, another PW are the PW that awaits orders for activating PW, and one article of AC is activation AC in the first AC and the 2nd AC, and another AC is activation The AC that awaits orders of AC, described device include:
Allocation unit, for distributing the first stream label and the second stream label for the 3rd PW, first stream label is used In data message of the mark from the 2nd CE equipment, second stream label is for identifying from the first CE equipment Data message sends first stream label and the second stream label to the 2nd PE equipment;
First receiving unit activates PW for being switched to the first PW from the PW that awaits orders in the first PE equipment, or During first AC is switched to activation AC from the AC that awaits orders, passes through the 3rd PW and receive the 2nd PE equipment and send Data message;
Recognition unit, for according in the data message the first stream label or second tag recognition described in datagram Text from CE equipment;
Determination unit, for according to the data message from CE equipment from the first PW and the first AC really Fixed forwarding connection, the forwarding connection into the first CE equipment and the 2nd CE equipment with the data message for coming From the different CE device forwards data message of CE equipment;
First retransmission unit, for forwarding the data message using forwarding connection.
In the first possible implementation of the second aspect,
First receiving unit is specifically used for being switched to the first AC from the AC that awaits orders in the first PE equipment sharp During AC living, the first data message that the 2nd PE equipment is sent, first data are received by the 3rd PW Message includes the first stream label;
The recognition unit is specifically used for the first data according to the first-class tag recognition of first data message Message comes from the 2nd CE equipment;
The determination unit is specifically used for determining the first AC for forwarding connection.
In conjunction with the possible implementation of the first of second aspect or second aspect, second in second aspect may Implementation in,
First receiving unit is specifically used for being switched to the first PW from the PW that awaits orders in the first PE equipment sharp During PW living, the second data message that the 2nd PE equipment is sent, second data are received by the 3rd PW Message includes the second stream label;
The recognition unit is specifically used for the second data according to the second tag recognition of second data message Message comes from the first CE equipment;
The determination unit is specifically used for determining the first PW for forwarding connection.
In conjunction with the first or second of possible implementation of second aspect or second aspect, the of second aspect In three kinds of possible implementations, further include:
Second receiving unit, the third stream label sent for receiving the 2nd PE equipment, the third stream label are The 2nd PE equipment is the stream label of the 3rd PW distribution, and the third stream label is for identifying from the 2nd CE equipment Data message;
Second receiving unit is also used to receive the third data from the 2nd CE equipment by the first PW Message;
Second retransmission unit, for being added to the third data of the third stream label by the 3rd PW forwarding Message.
In conjunction with any one of the first of second aspect and second aspect into the third possible implementation, In 4th kind of possible implementation of second aspect,
Second receiving unit is also used to receive the 4th stream label that the 2nd PE equipment is sent, and the described 4th fails to be sold at auction Label are the stream labels that the 2nd PE equipment is the 3rd PW distribution, and the 4th stream label is set for identifying from the first CE Standby data message;
Second receiving unit is also used to receive the 4th data from the first CE equipment by the first AC Message;
Second retransmission unit, which is also used to forward by the 3rd PW, is added to described the of the 4th stream label Four data messages.
The first PE equipment and the 2nd PE equipment being connected with the first CE equipment it can be seen from above-mentioned technical proposal, institute Stating the first PE equipment is that the 3rd PW distributes the first stream label and the second stream label, and sends described first to the 2nd PE equipment Stream label and the second stream label, first stream label is for identifying the data message from the 2nd CE equipment, and described the For two stream labels for identifying the data message from the first CE equipment, the first PE equipment can be by connecing from the 3rd PW Receive the data message in the first stream label or the second stream label, identify the data message from CE equipment, and Selection into the first CE equipment and the 2nd CE equipment with the data message for coming from first PW and the first AC The different CE device forwards data message of CE equipment as forwarding the forwarding of the data message to connect.Therefore described the First PW is switched to activation PW from the PW that awaits orders by one PE equipment, or the first AC is switched to activation AC's from the AC that awaits orders In the process, the first PE equipment will not be led to determine the forwarding to make mistake connection from the received data message of the 3rd PW The appearance for causing message forwarding loop, improves the stability of the PW network.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention without any creative labor, may be used also for those of ordinary skill in the art To obtain other drawings based on these drawings.
Fig. 1 is a kind of connection schematic diagram of traditional PW redundancy scene;
Fig. 2 is a kind of connection schematic diagram with redundancy protecting mechanism system provided in an embodiment of the present invention;
Fig. 3 is a kind of method flow diagram of message forwarding method provided in an embodiment of the present invention;
Fig. 4 is a kind of first concrete application scene flow chart of message forwarding method provided in an embodiment of the present invention;
Fig. 5 is a kind of second concrete application scene flow chart of message forwarding method provided in an embodiment of the present invention;
Fig. 6 is a kind of method flow diagram of message forwarding method provided in an embodiment of the present invention;
Fig. 7 is a kind of method flow diagram of message forwarding method provided in an embodiment of the present invention;
Fig. 8 is a kind of structure drawing of device of first PE equipment provided in an embodiment of the present invention;
Fig. 9 is a kind of structure drawing of device of first PE equipment provided in an embodiment of the present invention;
Figure 10 is a kind of hardware structural diagram of first PE equipment provided in an embodiment of the present invention.
Specific embodiment
In scene as shown in Figure 1, activate PW or activation AC that may be unable to complete normal turn due to failure and other reasons Function is sent out, the PW that needs to await orders is switched to the activation PW or AC that awaits orders and is switched to activation AC, to guarantee the data-transformation facility of network. During PE equipment 2 switches activation PW or activation AC, PE equipment 2 can be according to pre-set preferential forward rule, will Turn from the received data message of Bypass PW by the forwarding connection (such as the 2nd PW) of the preferential forward rule defined Hair.But connected since the preferential forward rule can only specify one article as forwarding from the 2nd PW and the 2nd AC, it is assumed that institute Preferential forward rule is stated to forward specifically by the 2nd PW, if PE equipment 2 needs the 2nd AC being switched to activation AC from the AC that awaits orders, During switching activates AC, datagram that PE equipment 2 will issue script from PE equipment 3 according to the preferential forward rule Text is forwarded back to PE equipment 3 further through the 2nd PW, forms message forwarding loop between PE equipment 1, PE equipment 2 and PE equipment 3, The stability of network system is affected.
A kind of PW redundant fashion there are also traditional double Bypass PW is that two are established between PE equipment 1 and PE equipment 2 Bypass PW, respectively Bypass PW1 and Bypass PW2.Bypass PW is counted for being connected with fixed PW and AC According to transmission.By taking Fig. 1 as an example, if the 2nd PW is activation PW, the first AC is activation AC, is used between PE equipment 1 and PE equipment 2 Bypass PW1 E-Packets.If the first PW is activation PW, the 2nd AC is activation AC, is used between PE equipment 1 and PE equipment 2 Bypass PW2 E-Packets.If the first PW is activation PW, the first AC is activation AC, and when the first PW goes wrong, PE equipment 2 will 2nd PW from the PW that awaits orders be switched to activation PW during, PE equipment 2 will receive the report that PE equipment 1 forwards from Bypass PW1 Text, since Bypass PW1 is the 2nd PW of fixed direction, therefore the report that PE equipment 2 will directly can be received from Bypass PW1 Text is forwarded by the 2nd PW.When the first AC goes wrong, the 2nd AC is switched to the process of activation AC by PE equipment 2 from the AC that awaits orders In, PE equipment 2 will receive the message that PE equipment 1 forwards from Bypass PW2, since Bypass PW2 is fixed direction second AC's, therefore PE equipment 2 can directly be forwarded the message received from Bypass PW2 by the 2nd AC.As it can be seen that due to Bypass PW carries out data transmission for being connected with fixed PW and AC, therefore has both been not in message forwarding loop, can also reach The effect to be E-Packeted in handoff procedure by Bypass PW.PW but under this mode, relative to single Bypass PW Redundant fashion, PE equipment 1 and PE equipment 2 require additional multidimensional and protect a Bypass PW, increase the maintenance pressure of control plane Power, and the required parameter safeguarded, the parameter other than forwarding label are substantially all this two Bypass PW on a control plane Equally, the waste of control plane maintenance resource is caused.
For this purpose, the embodiment of the invention provides a kind of message forwarding method and devices, to be connected with the first CE equipment One PE equipment and the 2nd PE equipment, the first PE equipment are that the 3rd PW distributes the first stream label and the second stream label, and to institute It states the 2nd PE equipment and sends first stream label and the second stream label, first stream label comes from described second for identifying The data message of CE equipment, second stream label is for identifying the data message from the first CE equipment, and described first PE equipment can identify the number by from the first stream label or the second stream label in the received data message of the 3rd PW According to message from CE equipment, and in the first PW and the first AC selection for being set to the first CE equipment and the 2nd CE In standby from the data message from the conduct of the different CE device forwards data message of CE equipment forward the data message Forwarding connection.Therefore the first PW is switched to activation PW from the PW that awaits orders in the first PE equipment, or by described first During AC is switched to activation AC from the AC that awaits orders, the first PE equipment will not be for from the received data message of the 3rd PW The appearance for determining the forwarding connection to make mistake and leading to message forwarding loop, improves the stability of the PW network.
Relative to the PW redundant fashion of double Bypass PW, a kind of message forwarding method and dress provided in an embodiment of the present invention It sets, control plane can be made not need the parameter that additional multidimensional protects a Bypass PW, saved control plane maintenance resource, drop The low maintenance pressure of control plane.
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention is clearly retouched It states.
There is PW redundancy protecting mechanism to being will be mentioned that in PWE3 framework in the embodiment of the present invention by attached drawing first Connection relationship be illustrated.Fig. 2 is a kind of connection signal with redundancy protecting mechanism system provided in an embodiment of the present invention Figure.First PE equipment is connected by the first PW with the 3rd PE equipment, and the first PE equipment passes through the first AC and the first CE equipment It is connected.2nd PE equipment is connected by the 2nd PW with the 3rd PE equipment, the 2nd PE equipment pass through the 2nd AC with it is described First CE equipment is connected.Wherein, it is to activate awaiting orders for PW that wherein one article of PW of the first PW and the 2nd PW, which is activation PW, another PW, PW.It is the AC that awaits orders for activating AC that wherein one article of AC of first AC and the 2nd AC, which is activation AC, another AC,.The activation PW and swash AC living is used for forwarding data packets, and the 3rd PE equipment is connected with the 2nd CE equipment, the first PE equipment and described second PE equipment is connected by the 3rd PW.3rd PW can be Bypass PW.
In connection relationship shown in Fig. 2, the first PE equipment and the 2nd PE equipment are connected with the first CE equipment, and first The 3rd PW is also connected between PE equipment and the 2nd PE equipment.In this connection relationship, the first PE equipment and the 2nd PE Equipment can be the dual homed node of the first CE equipment, the first PE equipment and the 2nd PE equipment with the 3rd PE equipment phase Connect, and the 3rd PE equipment is connected with the 2nd CE equipment.Connection relationship shown in Fig. 2 is between the first CE equipment and the 2nd CE equipment , the PW redundancy protecting mechanism system being made of the first PE equipment, the 2nd PE equipment and the 3rd PE equipment.
The embodiment of the present invention can be applied to be configured with VLL (English:Virtual Leased Line, contracting It writes:VLL) in the network architecture of technology.
Embodiment one
On the basis of embodiment corresponding to Fig. 2, Fig. 3 is a kind of side of message forwarding method provided in an embodiment of the present invention Method flow chart, the method includes:
301:The first PE equipment is that the 3rd PW distributes the first stream label and the second stream label, and described first fails to be sold at auction Label are set for identifying from the first CE for identifying the data message from the 2nd CE equipment, second stream label Standby data message, the first PE equipment send first stream label and the second stream label to the 2nd PE equipment.
2nd PE equipment will set from the received data message A of the 2nd PW by the 3rd PW to the first PE When standby forwarding, decapsulates from the received data message A of the 2nd PW, the source address of data message A is parsed, if obtaining this Data message A comes from the 2nd CE equipment, and the 2nd PE equipment adds when encapsulating the PW heading of the 3rd PW for data message A Add first stream label for identifying the data message from the 2nd CE equipment.2nd PE equipment is will be from described The received data message B of two AC by the 3rd PW to the first PE device forwards when, with parsing the source of data message B Location, if obtaining data message B from the first CE equipment, the 2nd PE equipment is encapsulating the 3rd PW for data message B PW heading when addition for identifying second stream label of the data message from the first CE equipment.
302:The first PE equipment by the first PW from the PW that awaits orders be switched to activation PW, or by the first AC from During the AC that awaits orders is switched to activation AC, the first PE equipment receives the 2nd PE equipment by the 3rd PW and sends Data message.
First PW is switched to by the first PE equipment from the PW that awaits orders activates the process of PW from the first PE equipment The first PW as the PW that awaits orders is started to the switching of activation PW, until being activation PW by the first PW successful switch.It is described First AC is switched to by the first PE equipment from the AC that awaits orders activates the process of AC from the first PE equipment to as the AC that awaits orders The first AC to activation AC switching start, until by the first AC successful switch be activation AC until.
303:The first PE equipment according in the data message the first stream label or second tag recognition described in Data message from CE equipment.
As illustrated in 301, data message is being passed through the 3rd PW to the first PE device forwards by the 2nd PE equipment Before, by according to the data message from PE equipment added in the data message with from PE equipment it is corresponding Stream label.Therefore (the first PW is switched to activation PW in handoff procedure from the PW that awaits orders, or the first AC is cut from the AC that awaits orders It is changed to the process of activation AC) in, the first PE equipment can pass through the first stream label or second in the data message Tag recognition go out the data message from CE equipment.
304:The first PE equipment according to the data message from CE equipment from the first PW and described first Determine forwarding connection in AC, the forwarding connect for into the first CE equipment and the 2nd CE equipment with the data Message from the different CE device forwards data message of CE equipment.
First PE equipment by 303 identification, can determine the data message be from the first CE equipment either From the 2nd CE equipment.By taking Fig. 2 as an example, the first PE equipment, to the 2nd CE device forwards data message, is passed through by the first PW First AC is to the first CE device forwards data message.If the data message comes from the first CE equipment, the first PE equipment will It is determined as the forwarding connection to the forwarding of the 2nd CE device forwards data message connection, i.e., the first PW is determined as the forwarding Connection.If the data message comes from the 2nd CE equipment, the first PE equipment will be to the first CE device forwards data message Forwarding connection is determined as the forwarding connection, i.e., the first AC is determined as the forwarding and connected.
305:The first PE equipment forwards the data message using forwarding connection.
Next the embodiment of the present invention will be further detailed by three concrete scenes.
In first concrete application scene, the data message is the first data message from the 2nd CE equipment.Institute Stating first concrete application scene can be, the 2nd PW is activation PW, and the 2nd AC is activation AC.That is, the first CE equipment And the 2nd pass through between CE equipment:First CE equipment2nd PE equipment3rd PE equipment2nd CE equipment carries out data Transmission.Since certain situation causes the 2nd AC that can not continue offer service, the first PE equipment need by the first AC from script to Life AC is switched to activation AC.During switching, the 2nd PE equipment by it is being received from the 2nd PW, need to be sent to the first CE and set Standby first data message passes through the 3rd PW to the first PE device forwards.Before forwarding, the 2nd PE equipment is by basis First data message from the 2nd CE equipment add the first stream label accordingly in first data message.? On the basis of embodiment corresponding to Fig. 3, Fig. 4 is a kind of first concrete application of message forwarding method provided in an embodiment of the present invention Scene flow chart.
401:During the first AC is switched to activation AC from the AC that awaits orders by the first PE equipment, described first PE equipment receives first data message that the 2nd PE equipment is sent, first data message by the 3rd PW Including first stream label.
402:First PE equipment, first datagram according to the first-class tag recognition of first data message Text comes from the 2nd CE equipment.
403:The first PE equipment determines the first AC for forwarding connection.
404:The first PE equipment forwards the data message using forwarding connection.
For example, for the angle of the first PE device forwards message, the first PW is for the 2nd CE device forwards Data message, the first AC is for the first CE device forwards data message.When the first PE equipment determines described When one data message comes from the 2nd CE equipment, it can select to be not used in the 2nd CE equipment turn from the first PW and the first AC It sends out and forwards connection described in the conduct of data message, that is, selection to the first AC of the first CE device forwards data message for making For forwarding connection.
It can be seen that by embodiment corresponding to Fig. 4 in the case where the 2nd AC of script can not continue to provide service, Before the first AC successful switch is activation AC by the first PE equipment, pass through between the first CE equipment and the 2nd CE equipment: First CE equipmentFirst PE equipment2nd PE equipment3rd PE equipment2nd CE equipment carries out data transmission.To It avoids and the first PE equipment occurs2nd PE equipment3rd PE equipmentThe message forwarding loop of first PE equipment improves The stability of system.
In second concrete application scene, the data message is the second data message from the first CE equipment.Institute Stating second concrete application scene can be, the 2nd PW is activation PW, and the 2nd AC is activation AC.That is, the first CE equipment And the 2nd pass through between CE equipment:First CE equipment2nd PE equipment3rd PE equipment2nd CE equipment carries out data Transmission.Since certain situation causes the 2nd PW that can not continue offer service, the first PE equipment need by the first PW from script to Life PW is switched to activation PW.During switching, the 2nd PE equipment by it is being received from the 2nd AC, need to be sent to the 2nd CE and set Standby second data message passes through the 3rd PW to the first PE device forwards.Before forwarding, the 2nd PE equipment is by basis Second data message from the first CE equipment add the second stream label accordingly in second data message.? On the basis of embodiment corresponding to Fig. 3, Fig. 5 is a kind of second concrete application of message forwarding method provided in an embodiment of the present invention Scene flow chart.
501:During the first PW is switched to activation PW from the PW that awaits orders by the first PE equipment, described first PE equipment receives second data message that the 2nd PE equipment is sent, second data message by the 3rd PW Including second stream label.
502:First PE equipment, second datagram according to the second tag recognition of second data message Text comes from the first CE equipment.
503:The first PE equipment determines the first PW for forwarding connection.
504:The first PE equipment forwards the data message using forwarding connection.For example, from the first PE For the angle of device forwards message, the first PW be for the 2nd CE device forwards data message, the first AC be for First CE device forwards data message.When the first PE equipment determines that second data message is set from the first CE When standby, it can select to be not used in the first CE device forwards data message the company of forwarding as described in from the first PW and the first AC It connects, that is, selects for being connected to the first PW of the 2nd CE device forwards data message as the forwarding.
It can be seen that by embodiment corresponding to Fig. 5 in the case where the 2nd PW of script can not continue to provide service, Before the first PW successful switch is activation PW by the first PE equipment, pass through between the first CE equipment and the 2nd CE equipment: First CE equipment2nd PE equipmentFirst PE equipment3rd PE equipment2nd CE equipment carries out data transmission.To It avoids and the first PE equipment occurs2nd PE equipment3rd PE equipmentThe message forwarding loop of first PE equipment improves The stability of system.
In third concrete application scene, the third concrete application scene is it is to be understood that the 2nd PW is activation PW, the 2nd AC are activation AC.That is, passing through between the first CE equipment and the 2nd CE equipment:First CE equipment2nd PE Equipment3rd PE equipment2nd CE equipment carries out data transmission.Since certain situation leads to the 2nd AC and the 2nd PW simultaneously Offer service can not be provided, or offer service can not be successively provided within the very short time.First PE equipment is needed One PW is switched to activation PW from the PW that awaits orders of script, it is also desirable to which the first AC is switched to activation AC from the AC that awaits orders of script.It is cutting It is that the 2nd PE equipment receives before can not continuing to provide service from the 2nd AC, need to be sent to the 2nd CE and set during changing By the 3rd PW to the first PE device forwards, the 2nd PE equipment will can not continue to provide clothes the second standby data message from the 2nd PW The first data message receiving before business, needing to be sent to the first CE equipment passes through the 3rd PW to the first PE device forwards.? Before forwarding, the 2nd PE equipment by according to first data message from the 2nd CE equipment in first datagram Add the first stream label in text accordingly, the 2nd PE equipment by according to second data message from the first CE set It is standby to add the second stream label accordingly in second data message.
For the angle of the first PE device forwards message, the first PW is for the 2nd CE device forwards data message , the first AC is for the first CE device forwards data message.When the first PE equipment determines first datagram When text comes from the 2nd CE equipment, it can choose for being used as forwarding institute to the first AC of the first CE device forwards data message State the forwarding connection of the first data message.When the first PE equipment determines that second data message is set from the first CE When standby, it can choose for the first PW to the 2nd CE device forwards data message as turn for forwarding second data message Hair connection.
It can be seen from above-described embodiment that the first PE equipment and the 2nd PE equipment that are connected with the first CE equipment, institute Stating the first PE equipment is that the 3rd PW distributes the first stream label and the second stream label, and sends described first to the 2nd PE equipment Stream label and the second stream label, first stream label is for identifying the data message from the 2nd CE equipment, and described the For two stream labels for identifying the data message from the first CE equipment, the first PE equipment can be by connecing from the 3rd PW Receive the data message in the first stream label or the second stream label, identify the data message from CE equipment, and Selection into the first CE equipment and the 2nd CE equipment with the data message for coming from first PW and the first AC The different CE device forwards data message of CE equipment as forwarding the forwarding of the data message to connect.Therefore described the First PW is switched to activation PW from the PW that awaits orders by one PE equipment, or the first AC is switched to activation AC's from the AC that awaits orders In the process, the first PE equipment will not be led to determine the forwarding to make mistake connection from the received data message of the 3rd PW The appearance for causing message forwarding loop, improves the stability of the PW network.
Embodiment two
The present embodiment will from the angle of the first PE equipment, description how when passing through the 3rd PW forwarding data packets using pair Two stream labels for holding namely the 2nd PE equipment to send:Third stream label and the 4th stream label.
First it is illustrated starting at for third stream label.
Fig. 6 is a kind of method flow diagram of message forwarding method provided in an embodiment of the present invention, the method includes:
601:The first PE equipment receives the third stream label that the 2nd PE equipment is sent, and the third stream label is The 2nd PE equipment is the stream label of the 3rd PW distribution, and the third stream label is for identifying from the 2nd CE equipment Data message.
602:The first PE equipment receives the third data message from the 2nd CE equipment by the first PW.
603:First PE is added to the third datagram of the third stream label by the 3rd PW forwarding Text.
For example, for the angle that the first PE equipment receives data message, the first PE equipment is from described First PW received is the data message from the 2nd CE equipment.When the first PE equipment receives third number by the first PW According to message, decapsulates from the received third data message of the first PW, parse the source address of the third data message, if Obtain the third data message from the 2nd CE equipment.The first PE equipment is encapsulating third for the third data message Addition is for identifying the third stream label of the data message from the 2nd CE equipment when PW heading of PW, so as to the Two PE equipment by third stream label identify the third data message from CE equipment be the 2nd CE equipment.
It is illustrated starting at again for the 4th stream label.
Fig. 7 is a kind of method flow diagram of message forwarding method provided in an embodiment of the present invention, the method includes:
701:The first PE equipment receives the 4th stream label that the 2nd PE equipment is sent, and the 4th stream label is The 2nd PE equipment is the stream label of the 3rd PW distribution, and the 4th stream label is for identifying from the first CE equipment Data message.
702:The first PE equipment receives the 4th data message from the first CE equipment by the first AC.
703:First PE is added to the 4th datagram of the 4th stream label by the 3rd PW forwarding Text.
For example, for the angle that the first PE equipment receives data message, the first PE equipment is from described First AC received is the data message from the first CE equipment.When the first PE equipment receives the 4th number by the first AC According to message, the source address of the 4th data message is parsed, if obtaining the 4th data message from the first CE equipment.Institute State the first PE equipment when encapsulating the PW heading of the 3rd PW for the 4th data message addition for identifying from described the The 4th stream label of the data message of one CE equipment, so that the 2nd PE equipment identifies the 4th number by the 4th stream label According to message from CE equipment be the first CE equipment.
As it can be seen that before the first PE equipment is again forwarded data message by the 3rd PW, it can be by the 2nd PE equipment The third stream label or the 4th stream label of transmission according to the data message from different CE equipment be added to accordingly it is described In data message.Thus logical during the 2nd PW or the 2nd AC are switched to activation PW or activation AC by the 2nd PE equipment It, can be according to the third carried in data message when crossing the 3rd PW and receiving the data message that the first PE equipment is sent Stream label or the 4th stream label identify the data message from CE equipment and with this determine forwarding connection, effectively avoid Occur the appearance of message forwarding loop situation when forwarding the data message, improves the stability of system.
Embodiment three
Fig. 8 is a kind of structure drawing of device of first PE equipment provided in an embodiment of the present invention, and the first PE equipment is answered Connection relationship in PW network with PW redundancy protecting mechanism is shown in Figure 2.The first PE equipment 800 includes:
Allocation unit 801, for distributing the first stream label and the second stream label, first stream label for the 3rd PW For identifying the data message from the 2nd CE equipment, second stream label comes from the first CE equipment for identifying Data message, send first stream label and the second stream label to the 2nd PE equipment.
The 2nd PE equipment will pass through the 3rd PW to described first from the received data message A of the 2nd PW When PE device forwards, decapsulates from the received data message A of the 2nd PW, parse the source address of data message A, if Data message A comes from the 2nd CE equipment out, and the 2nd PE equipment is in the PW heading for encapsulating the 3rd PW for data message A Shi Tianjia is used to identify first stream label of the data message from the 2nd CE equipment.2nd PE equipment is will be from institute State the received data message B of the 2nd AC by the 3rd PW to the first PE device forwards when, parse data message B's Source address, if obtaining data message B from the first CE equipment, the 2nd PE equipment is encapsulating for data message B Addition is for identifying second stream label of the data message from the first CE equipment when PW heading of three PW.
First receiving unit 802, for the oneth PW to be switched to activation from the PW that awaits orders in the first PE equipment 800 PW, or during the first AC is switched to activation AC from the AC that awaits orders, the 2nd PE is received by the 3rd PW and is set The data message that preparation is sent.
The first PE equipment 800 sets the first PW from the process that the PW that awaits orders is switched to activation PW from the first PE Standby 800 couples of the first PW as the PW that awaits orders start to the switching of activation PW, until being activation PW by the first PW successful switch. First AC is switched to by the first PE equipment 800 from the AC that awaits orders activates the process of AC from the first PE equipment to conduct Await orders AC the first AC to activation AC switching start, until by the first AC successful switch be activation AC until.
Recognition unit 803, for according in the data message the first stream label or second tag recognition described in number According to message from CE equipment.
Such as the related description in the allocation unit 801, the 2nd PE equipment by data message by the 3rd PW to Before first PE device forwards, by according to the data message from PE equipment add and come from the data message The corresponding stream label of PE equipment.Therefore (the first PW is switched to activation PW from the PW that awaits orders, or will be described in handoff procedure First AC is switched to the process of activation AC from the AC that awaits orders) in, the recognition unit 803 can pass through the in the data message Flow label or second tag recognition go out the data message from CE equipment.
Determination unit 804, for according to the data message from CE equipment from the first PW and the first AC Middle determining forwarding connection, the forwarding connect for into the first CE equipment and the 2nd CE equipment with the datagram Text from the different CE device forwards data message of CE equipment.
By the identification of the recognition unit 803, can determine the data message be from the first CE equipment or It is from the 2nd CE equipment.By taking Fig. 2 as an example, the first PE equipment, to the 2nd CE device forwards data message, is led to by the first PW The first AC is crossed to the first CE device forwards data message.If the data message comes from the first CE equipment, the determination unit 804 It will be determined as the forwarding connection to the forwarding of the 2nd CE device forwards data message connection, i.e., the first PW be determined as described turn Hair connection.If the data message comes from the 2nd CE equipment, the determination unit 804 will be to the first CE device forwards data message Forwarding connection be determined as forwarding connection, i.e., the first AC is determined as the forwarding connection.
First retransmission unit 805, for forwarding the data message using forwarding connection.
Next the embodiment of the present invention will be further detailed by three concrete scenes.
In first concrete application scene, the data message is the first data message from the 2nd CE equipment.Institute Stating first concrete application scene can be, the 2nd PW is activation PW, and the 2nd AC is activation AC.That is, the first CE equipment And the 2nd pass through between CE equipment:First CE equipment2nd PE equipment3rd PE equipment2nd CE equipment carries out data Transmission.Since certain situation causes the 2nd AC that can not continue offer service, the first PE equipment 800 is needed the first AC from script The AC that awaits orders is switched to activation AC.During switching, the 2nd PE equipment by it is being received from the 2nd PW, need to be sent to the first CE First data message of equipment passes through the 3rd PW to the first PE device forwards.Before forwarding, the 2nd PE equipment is by root According to first data message from the 2nd CE equipment add the first stream label accordingly in first data message. As shown in Figure 8:
First receiving unit 802 is specifically used for cutting the first AC from the AC that awaits orders in the first PE equipment 800 During being changed to activation AC, the first data message that the 2nd PE equipment is sent is received by the 3rd PW, described the One data message includes the first stream label.
The recognition unit 803 is specifically used for the first number according to the first-class tag recognition of first data message The 2nd CE equipment is come from according to message.
The determination unit 804 is specifically used for determining the first AC for forwarding connection.
For example, for the angle that first retransmission unit 805 E-Packets, the first PW is for the 2nd CE Device forwards data message, the first AC is for the first CE device forwards data message.When the recognition unit 803 is true When fixed first data message comes from the 2nd CE equipment, it can select to be not used in second from the first PW and the first AC Forward connection, that is, selection for the first CE device forwards data message described in the conduct of CE device forwards data message First AC is connected as the forwarding.
In first concrete application scene, in the case where the 2nd AC of script can not continue to provide service, in institute It is to pass through between the first CE equipment and the 2nd CE equipment before activating AC that the first PE equipment, which is stated, by the first AC successful switch:First CE equipmentFirst PE equipment2nd PE equipment3rd PE equipment2nd CE equipment carries out data transmission.To avoid There is the first PE equipment2nd PE equipment3rd PE equipmentThe message forwarding loop of first PE equipment, improves and is The stability of system.
In second concrete application scene, the data message is the second data message from the first CE equipment.Institute Stating second concrete application scene can be, the 2nd PW is activation PW, and the 2nd AC is activation AC.That is, the first CE equipment And the 2nd pass through between CE equipment:First CE equipment2nd PE equipment3rd PE equipment2nd CE equipment carries out data Transmission.Since certain situation causes the 2nd PW that can not continue offer service, the first PE equipment 800 is needed the first PW from script The PW that awaits orders is switched to activation PW.During switching, the 2nd PE equipment by it is being received from the 2nd AC, need to be sent to the 2nd CE Second data message of equipment passes through the 3rd PW to the first PE device forwards.Before forwarding, the 2nd PE equipment is by root According to second data message from the first CE equipment add the second stream label accordingly in second data message. As shown in Figure 8:
First receiving unit 802 is specifically used for cutting the first PW from the PW that awaits orders in the first PE equipment 800 During being changed to activation PW, the second data message that the 2nd PE equipment is sent is received by the 3rd PW, described the Two data messages include the second stream label.
The recognition unit 803 is specifically used for the second number according to the second tag recognition of second data message The first CE equipment is come from according to message.
The determination unit 804 is specifically used for determining the first PW for forwarding connection.
For example, for the angle that first retransmission unit 805 E-Packets, the first PW is for the 2nd CE Device forwards data message, the first AC is for the first CE device forwards data message.When the recognition unit 803 is true When fixed second data message comes from the first CE equipment, it can select to be not used in first from the first PW and the first AC Forward connection, that is, selection for the 2nd CE device forwards data message described in the conduct of CE device forwards data message First PW is connected as the forwarding.
In second concrete application scene, in the case where the 2nd PW of script can not continue to provide service, in institute It is to pass through between the first CE equipment and the 2nd CE equipment before activating PW that the first PE equipment, which is stated, by the first PW successful switch:First CE equipment2nd PE equipmentFirst PE equipment3rd PE equipment2nd CE equipment carries out data transmission.To avoid There is the first PE equipment2nd PE equipment3rd PE equipmentThe message forwarding loop of first PE equipment, improves and is The stability of system.
In third concrete application scene, the third concrete application scene is it is to be understood that the 2nd PW is activation PW, the 2nd AC are activation AC.That is, passing through between the first CE equipment and the 2nd CE equipment:First CE equipment2nd PE Equipment3rd PE equipment2nd CE equipment carries out data transmission.Since certain situation leads to the 2nd AC and the 2nd PW simultaneously Offer service can not be provided, or offer service can not be successively provided within the very short time.First PE equipment 800 need by First PW is switched to activation PW from the PW that awaits orders of script, it is also desirable to which the first AC is switched to activation AC from the AC that awaits orders of script.? It is that the 2nd PE equipment receives before can not continuing to provide service from the 2nd AC, need to be sent to the 2nd CE during switching Second data message of equipment is forwarded by the 3rd PW to the first PE equipment 800, and the 2nd PE equipment will can not continue from the 2nd PW The first data message receiving before providing service, needing to be sent to the first CE equipment passes through the 3rd PW to the first PE equipment 800 forwardings.Before forwarding, the 2nd PE equipment by according to first data message from the 2nd CE equipment described The first stream label is added in first data message accordingly, the 2nd PE equipment will be come from according to second data message The first CE equipment add the second stream label accordingly in second data message.
For the angle that first retransmission unit 805 E-Packets, the first PW is for the 2nd CE device forwards Data message, the first AC is for the first CE device forwards data message.When the recognition unit 803 determines described the When one data message comes from the 2nd CE equipment, it can choose for making to the first AC of the first CE device forwards data message For the forwarding connection for forwarding first data message.When the recognition unit 803 determines that second data message comes from institute When stating the first CE equipment, it can choose for being counted to the first PW of the 2nd CE device forwards data message as forwarding described second It is connected according to the forwarding of message.
It can be seen from above-described embodiment that the first PE equipment and the 2nd PE equipment that are connected with the first CE equipment, institute Stating the first PE equipment is that the 3rd PW distributes the first stream label and the second stream label, and sends described first to the 2nd PE equipment Stream label and the second stream label, first stream label is for identifying the data message from the 2nd CE equipment, and described the For two stream labels for identifying the data message from the first CE equipment, the first PE equipment can be by connecing from the 3rd PW Receive the data message in the first stream label or the second stream label, identify the data message from CE equipment, and Selection into the first CE equipment and the 2nd CE equipment with the data message for coming from first PW and the first AC The different CE device forwards data message of CE equipment as forwarding the forwarding of the data message to connect.Therefore described the First PW is switched to activation PW from the PW that awaits orders by one PE equipment, or the first AC is switched to activation AC's from the AC that awaits orders In the process, the first PE equipment will not be led to determine the forwarding to make mistake connection from the received data message of the 3rd PW The appearance for causing message forwarding loop, improves the stability of the PW network.
Example IV
By from the angle of the first PE equipment 800, how description makes the present embodiment when through the 3rd PW forwarding data packets Two stream labels sent with opposite end namely the 2nd PE equipment:Third stream label and the 4th stream label.
First it is illustrated starting at for third stream label.
On the basis of the embodiment corresponding to Fig. 8, Fig. 9 is a kind of device of first PE equipment provided in an embodiment of the present invention Structure chart, the first PE equipment 800 include:
Second receiving unit 901, the third stream label sent for receiving the 2nd PE equipment, the third stream label It is the stream label that the 2nd PE equipment is the 3rd PW distribution, the third stream label comes from the 2nd CE equipment for identifying Data message;
Second receiving unit 901 is also used to receive the third number from the 2nd CE equipment by the first PW According to message;
Second retransmission unit 902, for being added to the third of the third stream label by the 3rd PW forwarding Data message.
For example, for the angle that second receiving unit 901 receives data message, second receiving unit 901 it is received from the first PW be the data message from the 2nd CE equipment.When second receiving unit 901 passes through first PW receives third data message, decapsulates from the received third data message of the first PW, parses the third datagram The source address of text, if obtaining the third data message from the 2nd CE equipment.For third data message encapsulation the Addition is used to identify the third stream label of the data message from the 2nd CE equipment when PW heading of three PW, so as to 2nd PE equipment by third stream label identify the third data message from CE equipment be the 2nd CE equipment.
It is illustrated starting at again for the 4th stream label, as shown in Figure 9:
Second receiving unit 901 is also used to receive the 4th stream label that the 2nd PE equipment is sent, and the described 4th Stream label is the stream label that the 2nd PE equipment is the 3rd PW distribution, and the 4th stream label comes from first for identifying The data message of CE equipment.
Second receiving unit 901 is also used to receive the 4th number from the first CE equipment by the first AC According to message.
Second retransmission unit 902 is also used to forward by the 3rd PW and be added to described in the 4th stream label 4th data message.
For example, for the angle that second receiving unit 901 receives data message, second receiving unit 901 it is received from the first AC be the data message from the first CE equipment.When second receiving unit 901 passes through first AC receives the 4th data message, parses the source address of the 4th data message, if showing that the 4th data message comes From the first CE equipment.When encapsulating the PW heading of the 3rd PW for the 4th data message, addition is for identifying from described the The 4th stream label of the data message of one CE equipment, so that the 2nd PE equipment identifies the 4th number by the 4th stream label According to message from CE equipment be the first CE equipment.
As it can be seen that before the first PE equipment is again forwarded data message by the 3rd PW, it can be by the 2nd PE equipment The third stream label or the 4th stream label of transmission according to the data message from different CE equipment be added to accordingly it is described In data message.Thus logical during the 2nd PW or the 2nd AC are switched to activation PW or activation AC by the 2nd PE equipment It, can be according to the third carried in data message when crossing the 3rd PW and receiving the data message that the first PE equipment is sent Stream label or the 4th stream label identify the data message from CE equipment and with this determine forwarding connection, effectively avoid Occur the appearance of message forwarding loop situation when forwarding the data message, improves the stability of system.
Embodiment five
0, Figure 10 is a kind of hardware structural diagram of first PE equipment provided in an embodiment of the present invention refering to fig. 1, described First PE equipment 1000 is applied to PW network, and the PW network includes that the first PE equipment 1000, the 2nd PE equipment and the 3rd PE are set Standby, the first PE equipment 1000 is connected by the first PW with the 3rd PE equipment, and the first PE equipment 1000 passes through the first AC It is connected with the first CE equipment, the 2nd PE equipment is connected by the 2nd PW with the 3rd PE equipment, and the 2nd PE equipment passes through 2nd AC is connected with the first CE equipment, and the 2nd CE equipment is connected with the 3rd PE equipment, and the first PE equipment 1000 passes through 3rd PW is connected with the 2nd PE equipment, wherein one article of PW is that activation PW, another PW are in the first PW and the 2nd PW The PW that awaits orders of PW is activated, it is the AC that awaits orders for activating AC, institute that one article of AC, which is activation AC, another AC, in the first AC and the 2nd AC It states the first PE equipment 1000 and includes memory 1001, interface card 1002 and forwarding chip 1003 and processor 1004, it is described to deposit Reservoir 1001 is for caching message, and the interface card 1002 is used to handle the physical signal of message to be converted into data message, institute Forwarding chip 1003 is stated for searching forwarding-table item, does message forward process, the processor 1004 is used for processing protocol message Forwarding-table item is provided with to forwarding chip 1003, the processor 1004 sends two forwarding tables to the forwarding chip 1003 ?.Wherein:First forwarding-table item includes into label, enters stream label, label movement and stream label movement.First forwarding-table item Enter label be the 3rd PW PW label;Entering stream label is the first stream label;Label movement is bullet (English:Pop), expression will bullet PW label out;Stream label movement is bullet, and expression will pop up stream label.Wherein, stream label movement also can be omitted, and be acted with label Bullet expression will pop up PW label and stream label.Second forwarding-table item includes into label, enters stream label, label movement, outgoing label It is acted with stream label.Second forwarding-table item enters the PW label that label is the 3rd PW;Entering stream label is the second stream label;Label Movement is exchange (English:Swap), PW tag modification is outgoing label by expression;Outgoing label is the PW label of the first PW;It fails to be sold at auction Label movement is bullet.Wherein, stream label movement also can be omitted, and indicate PW label to be modified and remove to fail to be sold at auction with label movement exchange Label:
The processor 1004 is that the 3rd PW distribution the first stream label and second is failed to be sold at auction by the interface card 1002 Label, first stream label is for identifying the data message from the 2nd CE equipment, and second stream label is for identifying Data message from the first CE equipment sends first stream label and the second stream label to the 2nd PE equipment, And the forwarding-table item is sent to the forwarding chip 1003.
First PW is switched to activation PW from the PW that awaits orders in the first PE equipment by the forwarding chip 1003, or During first AC is switched to activation AC from the AC that awaits orders, passes through the 3rd PW and receive the 2nd PE equipment and send Data message.
The forwarding chip 1003 according in the data message the first stream label or second tag recognition described in number According to message from CE equipment.
The forwarding chip 1003 according to the data message from CE equipment from the first PW and the first AC Middle determining forwarding connection, the forwarding connect for into the first CE equipment and the 2nd CE equipment with the datagram Text from the different CE device forwards data message of CE equipment.
The forwarding chip 1003 sends the data message by the interface card 1002.
Wherein, during the first AC is switched to activation AC from the AC that awaits orders by the first PE equipment, if described Forwarding chip 1003 receives the first data message that the 2nd PE equipment is sent, first datagram by the 3rd PW Text includes the first stream label.The forwarding chip 1003 is first according to the first-class tag recognition of first data message Data message comes from the 2nd CE equipment.The forwarding chip 1003 determines the first AC for forwarding connection.It is described Forwarding chip 1003 sends first data message according to first forwarding-table item, by the interface card 1002.
Wherein, during the first PW is switched to activation PW from the PW that awaits orders by the first PE equipment, if described Forwarding chip 1003 receives the second data message that the 2nd PE equipment is sent, second datagram by the 3rd PW Text includes the second stream label.The forwarding chip 1003 is second according to the second tag recognition of second data message Data message comes from the first CE equipment.The forwarding chip 1003 determines the first PW for forwarding connection.It is described Forwarding chip 1003 sends first data message according to second forwarding-table item, by the interface card 1002.
Optionally, the processor 1004 is in addition to that can be that the 3rd PW distribution is first-class by the interface card 1002 Outside label and the second stream label, third stream label that the 2nd PE equipment is sent and the can also be received by interface card 1002 Four stream labels.The third stream label is the stream label that the 2nd PE equipment is the 3rd PW distribution, and the third is failed to be sold at auction Label are for identifying the data message from the 2nd CE equipment.4th stream label is that the 2nd PE equipment is the 3rd PW The stream label of distribution, the 4th stream label is for identifying the data message from the first CE equipment.
Wherein, after processor 1004 receives third stream label, corresponding forwarding-table item is sent to forwarding chip 1003.It should Forwarding-table item includes into label, label movement, outgoing label, stream label movement and stream label out.The label that enters of the forwarding-table item is The PW label of first PW;Label movement is exchange, and PW tag modification is outgoing label by expression;The PW that outgoing label is the 3rd PW is marked Label;Stream label movement is that label movement is pressure (English:Push), expression will be pressed into out stream label;Stream label is failed to be sold at auction out for third Label.Wherein, stream label movement also can be omitted, and indicate that PW label to be modified is that outgoing label and being pressed into out flows with label movement exchange Label.
If forwarding chip 1003 receives the third data message from the 2nd CE equipment by the first PW.
Forwarding chip 1003 is added to the third data message of the third stream label by the 3rd PW forwarding.
Wherein, after processor 1004 receives the 4th stream label, corresponding forwarding-table item is sent to forwarding chip 1003.It should Forwarding-table item includes incoming interface, label movement, outgoing label, stream label movement and stream label out.The incoming interface of the forwarding-table item is First AC;Label movement is pressure, and expression will be pressed into outgoing label;Outgoing label is the PW label of the 3rd PW;Stream label movement is pressure;Out Stream label is the 4th stream label.Wherein, stream label movement also can be omitted, and be that pressure indicates outgoing label to be pressed into simultaneously with label movement It is pressed into out stream label.
If forwarding chip 1003 receives the 4th data message from the first CE equipment by the first AC.
Forwarding chip 1003 is added to the 4th data message of the 4th stream label by the 3rd PW forwarding.
Optionally, the memory 1001 can be random access memory (English:Random-access memory, Abbreviation:RAM).The forwarding chip 1003 can be network processing unit (English:Network processor, abbreviation:NP) core Piece, or field programmable gate array (English:Field-programmable gate array, abbreviation:FPGA) core Piece, or specific integrated circuit (English:Application-specific integrated circuit, abbreviation: ASIC).The interface card can be Ethernet (English:Ethernet) interface card or Synchronous Digital Hierarchy (English: Synchronous Digital Hierarchy, abbreviation:SDH) interface card.The processor 1004, connects forwarding chip 1003 Mouth card 1002 and memory 1001 can integrate as one or more independent circuits or hardware.
The first PE equipment mentioned in the embodiment of the present invention, the first PW, the first AC, the first CE equipment, the first stream label and " first " of first data message is used only to do name mark, does not represent first sequentially.The rule is equally applicable to " second ", " third " and " the 4th ".
Those of ordinary skill in the art will appreciate that:Realize that all or part of the steps of above method embodiment can pass through The relevant hardware of program instruction is completed, and foregoing routine can be stored in a computer readable storage medium, which exists When execution, step including the steps of the foregoing method embodiments is executed;And storage medium above-mentioned can be at least one in following media Kind:Read-only memory (English:Read-only memory, abbreviation:ROM), RAM, magnetic or disk etc. are various can store The medium of program code.
It should be noted that all the embodiments in this specification are described in a progressive manner, each embodiment it Between same and similar part may refer to each other, each embodiment focuses on the differences from other embodiments. For equipment and system embodiment, since it is substantially similar to the method embodiment, so describe fairly simple, The relevent part can refer to the partial explaination of embodiments of method.Equipment and system embodiment described above is only schematic , wherein unit may or may not be physically separated as illustrated by the separation member, it is shown as a unit Component may or may not be physical unit, it can and it is in one place, or may be distributed over multiple networks On unit.Some or all of the modules therein can be selected to achieve the purpose of the solution of this embodiment according to the actual needs. Those of ordinary skill in the art can understand and implement without creative efforts.
The foregoing is only a preferred embodiment of the present invention, but scope of protection of the present invention is not limited thereto, In the technical scope disclosed by the present invention, any changes or substitutions that can be easily thought of by anyone skilled in the art, It should be covered by the protection scope of the present invention.Therefore, protection scope of the present invention should be with scope of protection of the claims Subject to.

Claims (10)

1. a kind of message forwarding method, which is characterized in that be applied to pseudo-wire PW network, the PW network includes the first operator side Edge PE equipment, the 2nd PE equipment and the 3rd PE equipment, the first PE equipment is connected by the first PW with the 3rd PE equipment, described First PE equipment is connected by the first attachment circuit AC with the first customer edge CE equipment, and the 2nd PE equipment passes through the 2nd PW It is connected with the 3rd PE equipment, the 2nd PE equipment is connected by the 2nd AC with the first CE equipment, the 2nd CE equipment and described the Three PE equipment are connected, and the first PE equipment is connected by the 3rd PW with the 2nd PE equipment, wherein the first PW and the It is the PW that awaits orders for activating PW that a PW, which is activation PW, another PW, in two PW, and one article of AC is sharp in the first AC and the 2nd AC AC living, another AC are the AC that awaits orders for activating AC, the method includes:
The first PE equipment is that the 3rd PW distributes the first stream label and the second stream label, and first stream label is for marking Know the data message from the 2nd CE equipment, second stream label is for identifying the data from the first CE equipment Message, the first PE equipment send first stream label and the second stream label to the 2nd PE equipment;
The first PW is switched to activation PW from the PW that awaits orders in the first PE equipment, or the first AC is cut from the AC that awaits orders During being changed to activation AC, the first PE equipment receives the datagram that the 2nd PE equipment is sent by the 3rd PW Text;
The first PE equipment according in the data message the first stream label or second tag recognition described in data message From CE equipment;
The first PE equipment according to the data message from CE equipment from the first PW and the first AC determine Forwarding connection, the forwarding connection into the first CE equipment and the 2nd CE equipment with the data message for coming from The different CE device forwards data message of CE equipment;
The first PE equipment forwards the data message using forwarding connection.
2. the method according to claim 1, wherein it is described the first PE equipment by the first PW to Life PW is switched to activation PW, or during the first AC is switched to activation AC from the AC that awaits orders, the first PE equipment is logical It crosses the 3rd PW and receives the data message that the 2nd PE equipment is sent, including:
During the first AC is switched to activation AC from the AC that awaits orders by the first PE equipment, the first PE equipment is logical It crosses the 3rd PW and receives the first data message that the 2nd PE equipment is sent, first data message is failed to be sold at auction including first Label;
The first PE equipment according in the data message the first stream label or second tag recognition described in data message From CE equipment, including:
First PE equipment, first data message according to the first-class tag recognition of first data message comes from institute State the 2nd CE equipment;
The first PE equipment according to the data message from CE equipment from the first PW and the first AC determine Forwarding connection, including:
The first PE equipment determines the first AC for forwarding connection.
3. method according to claim 1 or 2, which is characterized in that it is described in the first PE equipment by the first PW From the PW that awaits orders be switched to activation PW, or by the first AC from the AC that awaits orders be switched to activation AC during, the first PE is set The standby data message that the 2nd PE equipment transmission is obtained from the 3rd PW, including:
During the first PW is switched to activation PW from the PW that awaits orders by the first PE equipment, the first PE equipment is logical It crosses the 3rd PW and receives the second data message that the 2nd PE equipment is sent, second data message is failed to be sold at auction including second Label;
The first PE equipment according in the data message the first stream label or second tag recognition described in data message From CE equipment, including:
First PE equipment, second data message according to the second tag recognition of second data message comes from institute State the first CE equipment;
The first PE equipment according to the data message from CE equipment from the first PW and the first AC determine Forwarding connection, including:
The first PE equipment determines the first PW for forwarding connection.
4. method according to claim 1 or 2, which is characterized in that further include:
The first PE equipment receives the third stream label that the 2nd PE equipment is sent, and the third stream label is described second PE equipment is the stream label of the 3rd PW distribution, and the third stream label is for identifying the datagram from the 2nd CE equipment Text;
The first PE equipment receives the third data message from the 2nd CE equipment by the first PW;
The first PE equipment is added to the third data message of the third stream label by the 3rd PW forwarding.
5. according to the method described in claim 4, it is characterized in that, further including:
The first PE equipment receives the 4th stream label that the 2nd PE equipment is sent, and the 4th stream label is described second PE equipment is the stream label of the 3rd PW distribution, and the 4th stream label is for identifying the datagram from the first CE equipment Text;
The first PE equipment receives the 4th data message from the first CE equipment by the first AC;
The first PE equipment is added to the 4th data message of the 4th stream label by the 3rd PW forwarding.
6. a kind of apparatus for forwarding message, which is characterized in that be applied to pseudo-wire PW network, the PW network includes the first operator side Edge PE equipment, the 2nd PE equipment and the 3rd PE equipment, the first PE equipment is connected by the first PW with the 3rd PE equipment, described First PE equipment is connected by the first attachment circuit AC with the first customer edge CE equipment, and the 2nd PE equipment passes through the 2nd PW It is connected with the 3rd PE equipment, the 2nd PE equipment is connected by the 2nd AC with the first CE equipment, the 2nd CE equipment and described the Three PE equipment are connected, and the first PE equipment is connected by the 3rd PW with the 2nd PE equipment, wherein the first PW and the It is the PW that awaits orders for activating PW that a PW, which is activation PW, another PW, in two PW, and one article of AC is sharp in the first AC and the 2nd AC AC living, another AC are the AC that awaits orders for activating AC, and described device includes:
Allocation unit, for distributing the first stream label and the second stream label for the 3rd PW, first stream label is for marking Know the data message from the 2nd CE equipment, second stream label is for identifying the data from the first CE equipment Message sends first stream label and the second stream label to the 2nd PE equipment;
First receiving unit, for the first PW to be switched to activation PW from the PW that awaits orders in the first PE equipment, or by institute It states during the first AC is switched to activation AC from the AC that awaits orders, the number that the 2nd PE equipment is sent is received by the 3rd PW According to message;
Recognition unit, for according in the data message the first stream label or second tag recognition described in data message come From CE equipment;
Determination unit, for according to the data message from CE equipment from the first PW and the first AC determine turn Hair connection, it is described forwarding connection for into the first CE equipment and the 2nd CE equipment with the data message from The different CE device forwards data message of CE equipment;
First retransmission unit, for forwarding the data message using forwarding connection.
7. device according to claim 6, which is characterized in that
First receiving unit is specifically used for that the first AC is switched to activation AC from the AC that awaits orders in the first PE equipment During, the first data message that the 2nd PE equipment is sent, first data message are received by the 3rd PW Including the first stream label;
The recognition unit is specifically used for the first data message according to the first-class tag recognition of first data message From the 2nd CE equipment;
The determination unit is specifically used for determining the first AC for forwarding connection.
8. device according to claim 6 or 7, which is characterized in that
First receiving unit is specifically used for that the first PW is switched to activation PW from the PW that awaits orders in the first PE equipment During, the second data message that the 2nd PE equipment is sent, second data message are received by the 3rd PW Including the second stream label;
The recognition unit is specifically used for the second data message according to the second tag recognition of second data message From the first CE equipment;
The determination unit is specifically used for determining the first PW for forwarding connection.
9. device according to claim 6 or 7, which is characterized in that further include:
Second receiving unit, the third stream label sent for receiving the 2nd PE equipment, the third stream label is described 2nd PE equipment is the stream label of the 3rd PW distribution, and the third stream label is for identifying the data from the 2nd CE equipment Message;
Second receiving unit is also used to receive the third data message from the 2nd CE equipment by the first PW;
Second retransmission unit, for being added to the third datagram of the third stream label by the 3rd PW forwarding Text.
10. device according to claim 9, which is characterized in that
Second receiving unit is also used to receive the 4th stream label that the 2nd PE equipment is sent, and the 4th stream label is The 2nd PE equipment is the stream label of the 3rd PW distribution, and the 4th stream label is for identifying from the first CE equipment Data message;
Second receiving unit is also used to receive the 4th data message from the first CE equipment by the first AC;
Second retransmission unit is also used to forward the 4th number for being added to the 4th stream label by the 3rd PW According to message.
CN201510372207.6A 2015-06-30 2015-06-30 A kind of message forwarding method and device Active CN105119824B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510372207.6A CN105119824B (en) 2015-06-30 2015-06-30 A kind of message forwarding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510372207.6A CN105119824B (en) 2015-06-30 2015-06-30 A kind of message forwarding method and device

Publications (2)

Publication Number Publication Date
CN105119824A CN105119824A (en) 2015-12-02
CN105119824B true CN105119824B (en) 2018-11-16

Family

ID=54667719

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510372207.6A Active CN105119824B (en) 2015-06-30 2015-06-30 A kind of message forwarding method and device

Country Status (1)

Country Link
CN (1) CN105119824B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110661701B (en) * 2018-06-30 2022-04-22 华为技术有限公司 Communication method, equipment and system for avoiding loop

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1984076A (en) * 2006-06-08 2007-06-20 华为技术有限公司 Method and system for transmitting message in virtual special network link fault
CN101697547A (en) * 2009-09-30 2010-04-21 中兴通讯股份有限公司 Two-layer forwarding method and system for PW service
US7907603B2 (en) * 2007-04-26 2011-03-15 Cisco Technology, Inc. Acceleration of label distribution protocol (LDP) session setup
CN102255759A (en) * 2011-08-16 2011-11-23 杭州华三通信技术有限公司 Method and device for transmitting data message based on PW (Packet Writing) redundant backup
CN102404144A (en) * 2011-11-18 2012-04-04 杭州晨晓科技有限公司 Dual-homing access protection method based on Multi-protocol Label Switching-Transport Profile ((MPLS-TP) network
CN102833774A (en) * 2012-08-29 2012-12-19 华为技术有限公司 IP (internet protocol) radio access network system and processing method for faults of primary pseudo wires

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1984076A (en) * 2006-06-08 2007-06-20 华为技术有限公司 Method and system for transmitting message in virtual special network link fault
US7907603B2 (en) * 2007-04-26 2011-03-15 Cisco Technology, Inc. Acceleration of label distribution protocol (LDP) session setup
CN101697547A (en) * 2009-09-30 2010-04-21 中兴通讯股份有限公司 Two-layer forwarding method and system for PW service
CN102255759A (en) * 2011-08-16 2011-11-23 杭州华三通信技术有限公司 Method and device for transmitting data message based on PW (Packet Writing) redundant backup
CN102404144A (en) * 2011-11-18 2012-04-04 杭州晨晓科技有限公司 Dual-homing access protection method based on Multi-protocol Label Switching-Transport Profile ((MPLS-TP) network
CN102833774A (en) * 2012-08-29 2012-12-19 华为技术有限公司 IP (internet protocol) radio access network system and processing method for faults of primary pseudo wires

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Dual-Homing Protection for MPLS and MPLS-TP Pseudowires;W.Cheng,L.Wang,H.Li,K.Liu等;《IETF》;20150415;原文第3-4页,图2 *
Pseudowire setup and Maintenance using the lable Distribution Protocol;Luca Martini ED.Giles Heron ED. Cisco;《IETF》;20150309;原文第7页 *

Also Published As

Publication number Publication date
CN105119824A (en) 2015-12-02

Similar Documents

Publication Publication Date Title
US10404605B2 (en) Packet processing method, device and computer storage medium
CN106487675A (en) For the outlet protection in EVPN with BUM flow during link failure
US11368357B2 (en) Service fault locating method and apparatus
CN105162732B (en) Create the method, apparatus of ECP Extended Capabilities Port
CN111490933B (en) Bidirectional forwarding detection switching method and edge device
US11943148B2 (en) Traffic flow processing method and apparatus
CN115065637B (en) Method and device for transmitting computing power resource information and electronic equipment
EP3208971B1 (en) Method, device and system for reducing centralized protection switching time in potn system
WO2017193732A1 (en) Method for encapsulating and decapsulating pseudo-wire data message, and relevant apparatus
US10009272B2 (en) Packet transmission apparatus for processing operations, administration, and maintenance (OAM) packet and protection switching message
CN101989947A (en) Associated channel capability negotiation method and network device
CN104579973B (en) Message forwarding method and device in a kind of Virtual Cluster
CN102340446B (en) Method for realizing Ethernet-tree (E-tree) service in virtual private local area network service (VPLS) network and provider edge (PE) equipment
CN113438161A (en) Method and network device for generating segment identification SID
CN108156050A (en) Seamless bidirectional forwarding detection (BFD) method and device
CN105763411B (en) Method and device for establishing multicast tunnel
CN105119824B (en) A kind of message forwarding method and device
CN109218176B (en) Message processing method and device
CN103281244B (en) A kind of service bearer method and device of multi-protocol label switching network
CN110581792B (en) Message transmission method and device
CN108718275A (en) Message forwarding method and device
CN109150711A (en) The pretection switch method, apparatus and storage medium of point-to-multipoint Layer 2 Multicast business
CN101888336B (en) Access device realizes method and the access device of TDM business relaying
CN104869062A (en) Data packet forwarding method and device
CN103986637B (en) A kind of error message processing method and tunnel device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant