CN111490932B - Communication method and device - Google Patents

Communication method and device Download PDF

Info

Publication number
CN111490932B
CN111490932B CN202010220207.5A CN202010220207A CN111490932B CN 111490932 B CN111490932 B CN 111490932B CN 202010220207 A CN202010220207 A CN 202010220207A CN 111490932 B CN111490932 B CN 111490932B
Authority
CN
China
Prior art keywords
link
bypass
table entry
main
primary
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
CN202010220207.5A
Other languages
Chinese (zh)
Other versions
CN111490932A (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.)
New H3C Security Technologies Co Ltd
Original Assignee
New H3C Security 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 New H3C Security Technologies Co Ltd filed Critical New H3C Security Technologies Co Ltd
Priority to CN202010220207.5A priority Critical patent/CN111490932B/en
Publication of CN111490932A publication Critical patent/CN111490932A/en
Application granted granted Critical
Publication of CN111490932B publication Critical patent/CN111490932B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/28Routing or path finding of packets in data switching networks using route fault recovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/22Alternate routing

Landscapes

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

Abstract

The application provides a communication method and a device, which are applied to main service provider edge PE equipment in a two-layer virtual private network L2VPN, wherein the L2VPN also comprises slave PE equipment, a Bypass PW is configured between the main PE equipment and the slave PE equipment, a bidirectional association relation between main link table entries is prestored in the main PE equipment, and a unidirectional association relation between the Bypass PW table entries and the main link table entries of at least one main link. The method comprises the following steps: when any main link is determined to be in fault, acquiring a one-way association relation between a Bypass PW table entry and main link table entries except the main link in fault; increasing the one-way incidence relation between the main link table entry except the failed main link and the Bypass PW table entry to obtain the two-way incidence relation between the main link table entry except the failed main link and the Bypass PW table entry; and forwarding the service data by using the obtained bidirectional association relation. Therefore, the link is switched rapidly, and the forwarding chip in the PE equipment does not need to be operated frequently.

Description

Communication method and device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a communication method and apparatus.
Background
With the continuous development of networks, the reliability of networking is more and more important. Generally, a virtual link (PW) redundancy technique may be utilized to improve the reliability of the network. In an existing two-Layer Virtual Private Network (L2 VPN), a first Customer Edge (CE) device, a second customer Edge device, a first Provider Edge (PE) device, a second Provider Edge device, and a third Provider Edge device are included, where the second PE device and the third PE device are each a master device and a standby device, a Bypass Virtual link (Bypass PW) is configured between the second PE device and the third PE device, and when the second PE device is a master PE device, the first CE device may sequentially perform service traffic with the first PE device, the second PE device, and the second CE device, where a link between the first PE device and the second PE device may be referred to as a PW link, and a link between the second CE device and the second PE device may be referred to as an AC link. When the PW link or the AC link fails, the traffic between the first CE equipment and the second CE equipment can be realized through the Bypass PW.
However, in the prior art, when a PW link fails or an AC link fails, when performing Bypass PW switching, a manner of deleting and then adding is adopted, and the entry is stored in a forwarding chip of the PE device. When the primary PW fails, the primary PW table entry in the forwarding chip is deleted, and then the primary AC table entry and the Bypass PW table entry are associated and added into the forwarding chip. When the main AC fails, the main AC table entry in the forwarding chip is deleted, and then the main PW table entry and the Bypass PW table entry are associated and added into the forwarding chip, that is, when a link is to be switched each time a failure occurs, the Bypass PW is activated and then can be issued to the forwarding chip, so that hardware table entries in the forwarding chip are frequently operated, time is consumed, and the PW protection switching performance is influenced.
Therefore, how to quickly restore the communication link between CE devices upon PW link failure or AC link failure, and reducing frequent operations on the forwarding chip is one of considerable issues.
Disclosure of Invention
In view of this, the present application provides a communication method and apparatus, which are used to quickly recover a communication link between CE devices when an active link fails, and reduce frequent operations on a forwarding chip.
Specifically, the method is realized through the following technical scheme:
according to a first aspect of the present application, a communication method is provided, which is applied to a primary provider edge PE device in a L2VPN of a two-layer virtual private network, where the L2VPN further includes a secondary provider edge PE device, where a Bypass virtual link Bypass PW is configured between the primary PE device and the secondary PE device, and a bidirectional association relationship between primary link table entries and a unidirectional association relationship between a Bypass PW table entry and a primary link table entry of at least one primary link are pre-stored in the primary PE device; and the method comprises:
when determining that any main link fails, the main PE equipment acquires a one-way association relationship between a Bypass PW table entry stored in the main PE equipment and main link table entries except the failed main link;
increasing the one-way incidence relation between the main link table entry except the failed main link and the Bypass PW table entry to obtain the two-way incidence relation between the main link table entry except the failed main link and the Bypass PW table entry;
and forwarding the received service data by using the bidirectional association relationship between the main link table entry except the failed main link and the Bypass PW table entry.
According to a second aspect of the present application, a communication device is provided, where the communication device is disposed on a primary provider edge PE device in a L2VPN of a two-layer virtual private network, and the L2VPN further includes a secondary provider edge PE device, where a Bypass virtual link Bypass PW is configured between the primary PE device and the secondary PE device, and a bidirectional association relationship between primary link table entries and a unidirectional association relationship between a Bypass PW table entry and a primary link table entry of at least one primary link are pre-stored in the primary PE device; and the apparatus comprises:
the acquisition module is used for acquiring the one-way association relationship between the Bypass PW table entry stored in the acquisition module and the main link table entries except the main link with the fault when the fault of any main link is determined;
the incidence relation adding module is used for adding the one-way incidence relation between the main link table entry except the failed main link and the Bypass PW table entry to obtain the two-way incidence relation between the main link table entry except the failed main link and the Bypass PW table entry;
and the forwarding module is used for forwarding the received service data by using the bidirectional association relationship between the main link table entry except the failed main link and the Bypass PW table entry.
According to a third aspect of the present application, there is provided a communications apparatus, which provides a provider edge PE device, including a processor and a machine-readable storage medium, where the machine-readable storage medium stores machine-executable instructions capable of being executed by the processor, and the processor is caused by the machine-executable instructions to perform the method provided by the first aspect of the embodiment of the present application.
According to a fourth aspect of the present application, there is provided a machine-readable storage medium storing machine-executable instructions that, when invoked and executed by a processor, cause the processor to perform the method as provided by the first aspect of the embodiments of the present application.
The beneficial effects of the embodiment of the application are as follows:
the communication method and device provided by the embodiment of the application,
by storing the bidirectional association relationship between the entries of the main links and the Bypass PW table and at least one entry of the main link in advance in the forwarding chip of the PE device, when the main PE device determines that any main link has a fault, the unidirectional association relationship between the Bypass PW table and the entries of the main links except the fault main link is directly read, and then the unidirectional association relationship between the entries of the main links except the fault main link and the Bypass PW table is newly added, so that the bidirectional communication between the Bypass PW virtual link and the main link except the fault main link is formed, and then the service data is forwarded based on the formed bidirectional communication, thereby not only realizing the quick switching of paths and the normal forwarding of the service data, but also not needing to frequently operate the forwarding chip of the PE device because the bidirectional association relationship and the unidirectional association relationship are stored in advance in the forwarding chip, and further, the pressure of a forwarding chip in the PE equipment is reduced.
Drawings
Fig. 1 is a schematic diagram of a layer two virtual private network L2VPN networking according to an exemplary embodiment of the present application;
FIG. 2 is a block diagram of a facilitator edge facility 200, according to an exemplary embodiment of the present disclosure;
FIG. 3 is a flow chart illustrating a method of communication according to an exemplary embodiment of the present application;
fig. 4a is a reference diagram illustrating an association relationship stored when a primary PW link is preferentially maintained and no fault exists in a single Bypass PW scene according to an exemplary embodiment of the present application;
fig. 4b is a reference schematic diagram of an association relationship stored in a single Bypass PW scene when a link of an active PW fails in accordance with an exemplary embodiment of the present application;
fig. 4c is a reference diagram illustrating an association relationship stored when a primary AC link is preferentially maintained and no fault occurs in a single Bypass PW scene according to an exemplary embodiment of the present application;
fig. 4d is a reference schematic diagram of an association relationship stored in a single Bypass PW scenario when a primary AC link fails in an exemplary embodiment of the present application;
fig. 5a is a schematic data flow diagram illustrating a single Bypass PW scenario in which an active link does not fail according to an exemplary embodiment of the present application;
fig. 5b is a schematic diagram illustrating a data flow when an active PW link is preferentially maintained and fails in a single Bypass PW scene according to an exemplary embodiment of the present application;
fig. 5c is a schematic diagram illustrating a data flow when an active AC link is preferentially maintained and fails in a single Bypass PW scenario according to an exemplary embodiment of the present application;
fig. 6a is a reference diagram illustrating a table entry association relationship stored in a double Bypass PW scenario in the absence of a fault according to an exemplary embodiment of the present application;
fig. 6b is a reference diagram illustrating an entry association relationship after switching when a primary PW link fails in a dual Bypass PW scene according to an exemplary embodiment of the present application;
fig. 6c is a reference diagram illustrating an entry association relationship after switching when a primary AC link fails in a dual Bypass PW scenario according to an exemplary embodiment of the present application;
fig. 7a is a schematic data flow diagram illustrating a situation where an active link has no failure in a dual Bypass PW scenario according to an exemplary embodiment of the present application;
fig. 7b is a schematic diagram illustrating a data flow when a link of an active PW fails in a dual Bypass PW scenario according to an exemplary embodiment of the present application;
fig. 7c is a schematic diagram of a data flow when a primary AC link fails in a dual Bypass PW scenario according to an exemplary embodiment of the present application;
fig. 8a is a reference diagram illustrating another table entry association relationship when there is no fault in a single Bypass PW scene according to an exemplary embodiment of the present application;
fig. 8b is a reference diagram illustrating an entry association relationship after switching when a primary PW fails in a single Bypass PW scene according to an exemplary embodiment of the present application;
fig. 8c is a reference diagram illustrating an entry association relationship after switching when a primary AC fails in a single Bypass PW scene according to an exemplary embodiment of the present application;
fig. 9a is a schematic diagram illustrating another data flow when a link of an active PW fails in a single Bypass PW scene according to an exemplary embodiment of the present application;
fig. 9b is a schematic diagram illustrating another data flow when a primary AC link fails in a single Bypass PW scenario according to an exemplary embodiment of the present application;
FIG. 10a is a diagram illustrating another table entry association relationship reference diagram in the case of no failure in a dual Bypass PW scenario according to an exemplary embodiment of the present application;
fig. 10b is a schematic diagram illustrating another table entry association relationship after switching when a primary PW link fails in a dual Bypass PW scenario according to an exemplary embodiment of the present application;
fig. 10c is a schematic diagram illustrating another table entry association relationship after switching when a primary AC link fails in a dual Bypass PW scenario according to an exemplary embodiment of the present application;
fig. 11a is a schematic diagram illustrating another data flow when a link of an active PW fails in a dual Bypass PW scenario according to an exemplary embodiment of the present application;
fig. 11b is a schematic diagram illustrating another data flow when a primary AC link fails in a dual Bypass PW scenario according to an exemplary embodiment of the present application;
FIG. 12 is a block diagram of a communication device shown in an exemplary embodiment of the present application;
fig. 13 is a block diagram illustrating another provider edge PE device according to an exemplary embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the corresponding listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
In the embodiment of the present application, a failed link or a temporarily unassociated link is schematically shown by a dotted line in the drawing, and an available link is shown by a solid line, for example, referring to fig. 4b, when an active PW link fails, an active PW link entry is schematically shown by a dotted line, and an association relationship between the active PW link entry and an active AC link entry is also shown by a dotted line, which indicates that communication service cannot be provided, and the like.
Referring to fig. 1, a L2VPN networking in a layer two virtual private network provided in an embodiment of the present application includes two selectable transmission links, a primary link and a standby link, where a first CE device may perform inter-service communication with a second CE device through the primary link or the standby link. The active link is a link established between the primary PE device and the first CE device, and the second CE device, and the standby link is a link established between the secondary PE device and the first CE device, and the second CE device. And at least one Bypass PW pseudo wire is configured between the main PE equipment and the slave PE equipment, and a bidirectional association relationship between the main link table entries and a unidirectional association relationship between the Bypass PW table entries and the main link table entries of at least one main link are pre-stored in a forwarding chip of the main PE equipment. With reference to fig. 1, when determining that any primary link fails, the primary PE device indicates that the bidirectional association relationship between the primary link table entries stored in the primary PE device cannot be used, that is, the bidirectional association relationship between the primary link table entries is disconnected, the primary PE device obtains the unidirectional association relationship between the Bypass PW table entry stored therein and the primary link table entry other than the failed primary link, then adds the unidirectional association relationship between the primary link table entry other than the failed primary link and the Bypass PW table entry, that is, the bidirectional association relationship between the primary link table entry other than the failed primary link and the Bypass PW table entry can be formed, and then the formed bidirectional association relationship can be used to forward the received service data. Because the forwarding chip of the PE device stores the bidirectional association relationship between the main link table entries and the unidirectional association relationship between the Bypass PW table entry and at least one main link table entry in advance, when the main link fails, the link switching can be realized only by adding a new unidirectional association relationship, namely, the forwarding of service data is realized based on the reconstructed bidirectional association relationship, namely, the communication link between the CE devices is quickly recovered, and meanwhile, the aim of not frequently operating the forwarding chip in the main PE device is also achieved, so that the problem of larger hardware development caused by frequently operating the forwarding chip in the prior art is solved.
It should be noted that one active link may carry multiple active AC links and multiple active PW links, that is, multiple active PW links may be established between the first PE device and the active PE device, and multiple active AC links may be established between the active PE device and the second CE device, so that there is a corresponding relationship between the active AC links and the active PW links, so that a set of corresponding active PW links and active AC links may be used to transmit one type of service data.
Accordingly, one standby link can carry multiple standby AC links and multiple standby PW links, that is, multiple standby PW links can be established between the first PE device and the slave PE device, and multiple standby AC links can be established between the slave PE device and the second CE device, so that there is a corresponding relationship between the standby AC links and the standby PW links, so that a set of corresponding standby PW links and standby AC links can be used to transmit one type of service data.
Fig. 2 is a schematic structural diagram of a provider edge device 200. The provider edge device 200 includes a memory 210, a processor 220, and a communication module 230. The memory 210, the processor 220, and the communication module 230 are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines.
The memory 210 is used for storing programs or data. The Memory 210 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like.
The processor 220 is used to read/write data or programs stored in the memory 210 and perform corresponding functions.
The communication module 230 is configured to establish a communication connection between the provider edge device 200 and another communication terminal through the network, and to receive and transmit data through the network, where taking the provider edge device 200 as a primary PE device as an example for description, the primary PE device may utilize the communication module 230 therein to communicate with the first PE device or the second CE device through the network.
It should be understood that the configuration shown in FIG. 2 is merely a schematic diagram of the configuration of the facilitator edge device 200, and that the facilitator edge device 200 may include more or fewer components than shown in FIG. 2, or have a different configuration than shown in FIG. 2. The components shown in fig. 2 may be implemented in hardware, software, or a combination thereof. The provider edge device 200 may be a master PE device and/or a slave PE device in fig. 1.
The following describes the communication method provided in the embodiments of the present application in detail.
Please refer to fig. 3, which is a flowchart illustrating a communication method according to an embodiment of the present application, where the method may be applied to a main PE device, and a process of the main PE device implementing the communication method may be implemented according to the following procedures:
s301, when determining that any main link fails, acquiring the one-way association relationship between the stored Bypass PW table entry and the main link table entries except the failed main link.
In specific implementation, in this embodiment, the bidirectional association relationship between the entries of the main links and the unidirectional association relationship between the Bypass virtual link Bypass PW entry and the main link entry of at least one main link are issued to the forwarding chip of the main PE device in advance, so that when the main PE device determines that the main link where the main PE device is located has a fault, the pre-associated unidirectional association relationship can be directly obtained from the forwarding chip of the main PE device. Compared with the prior art, the forwarding chip is not required to be operated for many times.
It should be noted that the pre-stored bidirectional association relationship between the primary links is used to implement data interaction when the primary links are not failed, that is, as described with reference to fig. 1, in a case that the primary links are normal, when the first CE device interacts with the second CE device, the first CE device first sends the service data to the first PE device, then the first PE device forwards the service data to the primary PE device through the primary link between the first PE device and the primary PE device, and finally the primary PE device sends the service data to the second CE device through the primary link between the primary PE device and the second CE device, thereby implementing sending of the service data, and similarly, when the second CE device replies reply data to the first CE device, since the association relationship established by the primary PE device is bidirectional, the second CE device can implement reverse transmission from the primary PE device, the first PE device to the first CE device, and further realizing the business transaction between the first CE equipment and the second CE equipment.
Specifically, the one-way association relationship between the Bypass virtual link Bypass PW entry stored in the main PE device and the main link entry of at least one main link is used to represent the connection relationship between the Bypass PW and the main link direction. The purpose of doing so is that, under the primary link non-failure scene, the Bypass PW virtual link cannot be walked, and the efficient utilization of the primary link under the primary link non-failure scene can be ensured. Optionally, the unidirectional association relationship between the Bypass PW entry and the active link entry of the at least one active link may include, but is not limited to: the method comprises the steps of obtaining a Bypass PW list item, obtaining a main AC link list item, obtaining a Bypass PW list item, obtaining a unidirectional incidence relation between the Bypass PW list item and the main AC link list item, and/or obtaining the unidirectional incidence relation between the Bypass PW list item and the main PW link list item.
In this step, because the primary links of the primary PE devices fail, that is, the bidirectional association relationship between the primary link table entries formed between the primary links cannot be used, the communication between the first CE device and the second CE device is interrupted. Therefore, in order to quickly implement switching of the communication link, the Bypass PW virtual link needs to provide a Bypass communication function, so this embodiment proposes to obtain a unidirectional association relationship between a Bypass PW entry and an entry of the primary link except the failed primary link from a forwarding chip of the primary PE device.
S302, adding the one-way incidence relation between the main link table entry except the failed main link and the Bypass PW table entry to obtain the two-way incidence relation between the main link table entry except the failed main link and the Bypass PW table entry.
In this step, since only the communication from the Bypass PW virtual link to the main link other than the failed main link can be realized in step S301, and the reverse communication is not realized temporarily, this step adds a reverse communication implementation manner, that is, the unidirectional association relationship between the main link table entry other than the failed main link and the Bypass PW table entry is increased, so that the communication from the main link other than the failed main link to the Bypass PW virtual link is realized.
S303, forwarding the received service data by using the bidirectional association relation between the main link table entry except the failed main link and the Bypass PW table entry.
Based on steps S301 and S302, bidirectional communication between the primary link except the failed primary link and the Bypass PW virtual link can be implemented, so that the primary PE device can receive service data through the primary link except the failed primary link, and then send the service data to the secondary PE device through the Bypass PW virtual link, or the secondary PE device transmits the service data to the primary PE device through the Bypass PW virtual link, and then the primary PE device transmits the service data to the outside through the non-failed primary link. Thus, the primary PE device can use the failure-free primary link table entry and the Bypass PW table entry to implement communication between the first CE device and the second CE device.
Optionally, the active link in this embodiment of the present application includes an active PW link and an active AC link; specifically, referring to fig. 1, the active PW link refers to a link established between a first PE device and a second PE device (a primary PE device), and is also referred to as a PW side link, and the active AC link refers to a link established between a second PE device (a primary PE device) and a second CE device, and is also referred to as an AC side link; and the bidirectional association between the primary PW link table entry and the primary AC link table entry stored in the primary PE device is the bidirectional association between the primary PW link table entry and the primary AC link table entry. On this basis, step S302 may be implemented according to the following procedure:
if the primary PW link fails, increasing the one-way incidence relation between the primary AC link table entry and the Bypass PW table entry;
and if the main AC link fails, increasing the one-way incidence relation between the main PW link table entry and the Bypass PW table entry.
In specific implementation, when the primary PW link fails, that is, when a link between the first PE device and the primary PE device in fig. 1 fails, further indicating that the bidirectional association relationship between the primary PW link entry and the primary AC link entry cannot be used, at this time, in order to enable service traffic between the first CE device and the second CE device, the primary PE device has previously stored a unidirectional association relationship from the Bypass PW entry to the primary AC link entry, and in order to enable the primary PE device to send out data when the primary PW link fails, it is necessary to implement communication connection in the direction from the primary AC link to the Bypass PW virtual link, so that the primary PE device newly adds the unidirectional association relationship between the primary AC link entry and the Bypass PW entry in its forwarding chip, and thus combines the unidirectional association relationship between the Bypass PW entry and the primary PW link that are previously stored in the forwarding chip, bidirectional communication between the main AC link and the Bypass PW virtual link is formed, so that the main PE equipment can receive service data sent by the second CE equipment through the main AC link and then send the service data to the slave PE equipment through the Bypass PW virtual link; or receiving service data from the Bypass PW virtual link, and then sending the service data from the active AC link to the second CE device.
When the primary AC link fails, that is, the communication link between the second CE device and the primary PE device in fig. 1 fails, further indicating that the bidirectional association relationship between the primary PW link entry and the primary AC link entry cannot be used, at this time, in order to enable the service traffic between the first CE device and the second CE device, the primary PE device has previously stored the unidirectional association relationship from the Bypass PW entry to the primary PW link entry, so that in order to enable the primary PE device to send out data when the primary AC link fails, it is necessary to implement the communication connection from the primary PW link to the Bypass PW virtual link direction, so that the primary PE device newly adds the unidirectional association relationship between the primary PW link entry and the Bypass PW entry in its forwarding chip, and thus combines the unidirectional association relationship between the Bypass PW entry and the primary PW link that are previously stored in the forwarding chip, bidirectional communication between the main PW link and the Bypass PW virtual link is formed, so that the main PE equipment can receive service data of the first CE equipment forwarded by the first PE equipment through the main PW link and then send the service data to the slave PE equipment through the Bypass PW virtual link; or receiving service data from the Bypass PW virtual link, and then sending the service data to the first PE device through the active PW link, and further sending the service data to the first CE device.
Based on any of the above embodiments, at least one Bypass virtual link Bypass PW is configured between a master PE device and a slave PE device provided in the present application; the slave PE equipment prestores a bidirectional association relationship between standby link table entries and a unidirectional association relationship between a Bypass PW table entry and at least one standby link table entry of a standby link; and the unidirectional incidence relation stored by the slave PE equipment is matched with the unidirectional incidence relation stored by the master PE equipment. The one-way association relationship stored in the slave PE device is matched with the one-way association relationship stored in the master PE device, so that the service data reaching the slave PE device can be ensured to be successfully transmitted to the outside, the service data received by the slave PE device can be successfully reached to the master PE device, and the like, which aims to ensure the successful interaction between the master PE device and the slave PE device, so as to realize the service transaction between the first CE device and the second CE device.
In a possible embodiment, a Bypass virtual link Bypass PW, also called a single Bypass PW, is configured between the master PE device and the slave PE device; on this basis, when the association relationship is stored in the master PE device and the slave PE device, the following procedure may be implemented:
if the main PW link fault is maintained preferentially, when the main PE equipment stores the unidirectional association relationship between the Bypass PW table entry and the main AC link table entry, the slave PE equipment stores the unidirectional association relationship between the Bypass PW table entry and the standby PW link table entry;
if the primary AC link fault is maintained preferentially, the primary PE device stores a unidirectional association relationship between a Bypass PW table entry and the primary PW link table entry in advance, and the secondary PE device stores a unidirectional association relationship between a Bypass PW table entry and a standby AC link table entry in advance.
In specific implementation, the bidirectional association relationship between the primary PW link entry and the primary AC link entry is issued in advance to the forwarding chip of the primary PE device, as shown in fig. 4a, and correspondingly, the bidirectional association relationship between the standby PW link entry and the standby AC link entry is also stored in advance in the forwarding chip of the secondary PE device, as shown in fig. 4 a; when issuing the unidirectional association relationship, it may be considered to set a protection priority for the primary link, if the primary PW link is preferentially protected, a unidirectional association relationship between a Bypass PW link entry and a primary AC link entry is stored in a forwarding chip of the primary PE device, as shown in fig. 4a, at this time, in order to implement normal interaction of service data, the secondary PE device needs to set a priority for the secondary AC link, that is, the unidirectional association relationship stored in the forwarding chip of the secondary PE device should be the unidirectional association relationship between the Bypass PW entry and the secondary PW entry, as shown in fig. 4a, that is, a table entry association relationship diagram preferentially protecting the primary PW link in a fault-free scene. Through the setting in fig. 4a, the communication connection between the Bypass PW virtual link and the active AC link, and the communication connection between the Bypass PW virtual link and the standby PW link can be respectively realized.
On this basis, when the active PW link fails, the primary PE device may increase a unidirectional association relationship between the active AC link entry and the Bypass PW entry, as shown in fig. 4b, so that a unidirectional association relationship between the active AC link and the Bypass PW virtual link may be established, and further bidirectional communication between the active AC link and the Bypass PW link may be implemented, in this way, service data received by the primary PE device through the active AC link may be sent to the slave PE device through the Bypass PW virtual link, and then the slave PE device sends the service data to the outside through a standby PW link therein, so that interaction between the first CE device and the second CE device may be quickly implemented only by modifying the association relationship of the primary PE device, and the slave PE device does not need to perform any processing, thereby effectively reducing operations on a forwarding chip in the PE device.
In addition, if the primary AC link is preferentially protected, the forwarding chip of the primary PE device stores the bidirectional association between the primary PW link entry and the primary AC link entry, and also stores the unidirectional association between the Bypass PW entry and the primary PW link entry, as shown in fig. 4c, that is, an entry association diagram of the primary AC link is preferentially protected in a fault-free scenario, at this time, in order to achieve normal interaction of service data, the secondary PE device needs to set a priority for a failure of the backup PW link, that is, the unidirectional association stored in the forwarding chip of the secondary PE device should be the unidirectional association between the Bypass PW entry and the backup AC entry, as shown in fig. 4 c. Through the setting in fig. 4c, the communication connection between the Bypass PW virtual link and the active PW link, and the communication connection between the Bypass PW virtual link and the standby AC link can be respectively realized.
On this basis, when the primary AC link fails, the primary PE device may implement a unidirectional communication connection between the primary PW link and the Bypass PW virtual link by adding a unidirectional association relationship between the primary PW link entry and the Bypass PW link entry, and implement a bidirectional communication between the primary PW link and the Bypass PW virtual link, as shown in fig. 4d, so that the primary PE device may receive service data of the first CE device forwarded by the first PE through the primary PW link, then send the service data to the secondary PE device through the Bypass PW virtual link, and send the secondary PE device to the second CE device through the standby AC link.
To better understand the present embodiment, an application scenario shown in fig. 5a is taken as an example for explanation, where the second PE device is a master PE device, the third PE device is a slave PE device, and the first PE device, the second PE device, and the third PE device are used to implement communication between the first CE device and the second CE device. As shown in fig. 4a or 4c, in a scenario of no failure, a first CE device sends service data to the first PE device, then the first PE device sends the service data to a second PE device through an active PW link between the first PE device and the second PE device, and finally the second PE device sends the service data to the second CE device through an active AC link between the second PE device and the second CE device, so that service data interaction between the first CE device and the second CE device is realized, and a reverse link is also realized.
When the primary PW link between the second PE device and the first PE device fails, please refer to fig. 5b, which illustrates an example of preferentially maintaining the primary PW link, where the second PE device increases a unidirectional association between the primary AC link entry and the Bypass PW entry, and then, in combination with a unidirectional association between the Bypass PW link entry issued in advance by the second PE device and the primary AC link, forms a bidirectional association between the primary AC link entry and the Bypass PW entry, as shown in fig. 4b, which not only can implement the link switching, but also omits a process of issuing the Bypass PW entry to the forwarding chip again, and since the third PE device preferentially maintains the backup AC link at this time, the association in the third PE device does not need to change, so that the communication link after the switching is implemented as follows: a forward communication link over which the first CE device transmits traffic data to the second CE device and a reverse communication link over which the second CE device responds to the first CE device, wherein: the forward communication link is: first CE device → first PE device → third PE device → second PE device, and the reverse communication link is: second CE device → second PE device → third PE device → first CE device. Specifically, the first CE device sends service data to the first PE device, then the first PE device detects a failure of the primary PW link, and sends the service data to the third PE device through a standby PW link between the first PE device and the third PE device, then the third PE device sends the service data to the second CE device through a standby AC link between the third PE device and the second CE device, and when the second CE device sends response data, the second PE device sends the response data to the third PE device through the primary AC link between the second PE device and the second PE device, then the second PE device sends the response data to the third PE device through a Bypass PW virtual link, and then the third PE device sends the response data to the first PE device through the standby PW link, and the first PE device forwards the response data to the first CE device, thereby implementing link switching when the PW link fails, and since the bidirectional association relationship and the unidirectional association relationship have been issued to the forwarding chip in advance, therefore, when the PW link fails, the link can be quickly switched by only adding one incidence relation, and the forwarding chip does not need to be frequently accessed.
When the primary PE device preferentially maintains the primary AC link, the primary PW link may directly use the bidirectional association relationship between the standby AC link and the standby PW link to maintain the communication between the first CE device and the second CE device when the primary PW link fails.
Optionally, when the primary AC link between the second PE device and the second CE device fails, please refer to fig. 5c, which illustrates an example of preferentially maintaining the primary AC link, the second PE device increases a unidirectional association relationship between the primary PW link entry and the Bypass PW entry, and then, in combination with a unidirectional association relationship between the Bypass PW link entry and the primary PW link issued in advance by the second PE device, forms a bidirectional association relationship between the primary PW link entry and the Bypass PW entry, as shown in fig. 4d, which can implement switching of links, and omit a process of issuing a Bypass PW entry to a forwarding chip again, because the third PE device preferentially maintains the backup PW link at this time, an association relationship in the third PE device does not need to be changed, so the implemented communication link is: a forward communication link over which the first CE device transmits traffic data to the second CE device and a reverse communication link over which the second CE device responds to the first CE device, wherein: the forward communication link is: first CE device → first PE device → second PE device → third PE device → second CE device, and the reverse communication link is: second CE device → third PE device → first CE device. Specifically, a first CE device sends service data to a first PE device, then the first PE device sends the service data to a second PE device through an active PW link, because of the failure of the active AC link, the second PE device sends the service data to a third PE device through a Bypass PW virtual link, then the third PE device sends the service data to the second CE device through a standby AC link, when the second CE device responds to the first CE device, the second CE device sends response data to the third PE device through the standby AC link, then the third PE device sends response data to the first PE device through the standby PW link, and finally the first PE device sends the response data to the first CE device, thereby realizing the rapid communication between the devices after the link switching, and because the bidirectional association relation and the unidirectional association relation are issued to a forwarding chip in advance, therefore, when the AC link fails, the main circuit can realize the fast switching of the link only by adding one incidence relation, and does not need to frequently access the forwarding chip.
When the primary PE device preferentially maintains the primary PW link, when the primary AC link fails, the primary PE device may directly maintain communication between the first CE device and the second CE device using the bidirectional association relationship between the standby AC link and the standby PW link.
In one possible embodiment, when 2 Bypass PWs are configured between the master PE device and the slave PE device, the two Bypass PWs may be called as a dual Bypass PW, and when two Bypass virtual links Bypass PWs are configured between the master PE device and the slave PE device, a Bypass PW entry of the master PE device includes a PW Bypass PW entry and an AC Bypass PW entry; similarly, the Bypass PW entry of the slave PE device also includes a PW Bypass PW entry and an AC Bypass PW entry.
On this basis, the unidirectional association relationship between the Bypass PW table entry prestored in the primary PE device and the primary link table entry of at least one primary link includes: the unidirectional incidence relation between the PW table entry of the AC Bypass and the main PW link table entry and the unidirectional incidence relation between the PW Bypass PW table entry and the main AC link table entry are obtained; and the unidirectional association relationship between the Bypass PW table entry prestored in the slave PE equipment and the standby link table entry of at least one standby link comprises the following steps: the method comprises the steps of obtaining a one-way association relationship between an AC Bypass PW table entry and a standby PW link table entry, and obtaining a one-way association relationship between the PW Bypass PW table entry and the standby AC link table entry. Fig. 6a may be referred to as a bidirectional association relationship and a unidirectional association relationship stored in the master PE device and the slave PE device, where fig. 6a is a schematic diagram of an entry stored in a forwarding chip when the master link fails.
On this basis, if the primary PW link fails, when the unidirectional association relationship between the primary AC link entry and the Bypass PW entry is increased, the following process may be implemented: the one-way association relationship between the primary AC link entry and the PW Bypass PW entry is added, as shown in fig. 6b, at this time, the slave PE device also maintains the initially issued association relationship, which is already shown in fig. 6 b.
If the primary AC link fails, the primary PE device may implement the following process when increasing the unidirectional association relationship between the primary AC link entry and the Bypass PW entry: the one-way association relationship between the primary PW link entry and the AC Bypass PW entry is added, as shown in fig. 6c, at this time, the slave PE device also maintains the initially issued association relationship, which is already shown in fig. 6 c.
In specific implementation, two Bypass PW virtual links between the master PE device and the slave PE device are configured as a virtual link formed by a PW Bypass PW of the master PE device and an AC Bypass PW of the slave PE device, and a virtual link formed by an AC Bypass PW of the master PE device and a PW Bypass PW of the slave PE device.
When the primary PW link of the primary PE device fails, it indicates that the bidirectional association relationship in the primary PE device is not available, taking priority maintenance of the primary PW failure as an example, the unidirectional association relationship maintained in the primary PE device is a unidirectional association relationship between a PW Bypass PW table entry and a primary AC link table entry, in order to enable the primary PE device to send data to the outside, the primary PE device needs to newly add a unidirectional association relationship between a primary AC link table entry and a PW Bypass PW table entry, so that the primary PE device can implement bidirectional communication between the primary AC link and the PW Bypass PW virtual link, so that, after the primary PE device receives service data through the primary AC link, based on the newly formed bidirectional association relationship between the primary AC link table entry and the PW Bypass PW table entry, the service data is sent to the secondary PE device through the Bypass PW virtual link, and then the secondary PE device sends the service data to the secondary PE device based on the prestored unidirectional association relationship between the AC Bypass PW table entry and the standby PW link table entry, since the AC Bypass PW of the slave PE device and the PW Bypass PW of the master PE device belong to a virtual link, the slave PE device can receive the service data sent by the master PE device, and then send the service data to the outside by using the standby PW link. The method and the device not only realize normal sending of the service data, but also do not need to frequently operate the forwarding chips of the main PE device and the slave PE device, thereby effectively reducing the expense of the forwarding chips in the PE device.
And when the primary AC link of the primary device fails, it indicates that the bidirectional association relationship in the primary PE device is not available, taking priority maintenance of the primary AC failure as an example, the unidirectional association relationship maintained in the primary PE device is the unidirectional association relationship between the entry of the AC Bypass PW and the entry of the primary PW link, in order to enable the primary PE device to send data to the outside, the primary PE device needs to newly add the unidirectional association relationship between the entry of the primary PW link and the entry of the AC Bypass PW, so that the primary PE device can implement bidirectional communication between the primary PW link and the AC Bypass virtual link, and thus, after receiving service data through the primary PW link, the primary PE device sends the service data to the secondary PE device through the AC Bypass virtual link based on the newly formed bidirectional association relationship between the primary PW and the AC Bypass PW, because the PW Bypass PW of the secondary PE device and the AC Bypass at both ends of one virtual link, therefore, the slave PE device can receive the service data sent by the master PE device through the PW Bypass PW and then send the service data to the outside through the spare AC link prestored in the slave PE device, so that the normal sending of the service data is realized, and the forwarding chips of the master PE device and the slave PE device do not need to be operated frequently, thereby effectively reducing the expense of the forwarding chips in the PE device.
To better understand the present embodiment, an application scenario shown in fig. 7a is taken as an example for explanation, where the second PE device is a master PE device, the third PE device is a slave PE device, and the first PE device, the second PE device, and the third PE device are used to implement communication between the first CE device and the second CE device. Fig. 6a shows that the entry stored in the forwarding chip of the second PE device is, in a fault-free scenario, the service data interaction between the first CE device and the second CE device may refer to fig. 5a, and is not described in detail here.
However, when the primary PW link between the second PE device and the first PE device fails, please refer to fig. 7b, the second PE device will add a new unidirectional association relationship between the primary AC link entry and the PW Bypass PW entry, as shown in fig. 6b, so that the link switching operation can be completed, the process of re-issuing the PW Bypass PW entry to the forwarding chip is omitted, and the association relationship stored in the third PE device is the same as the association relationship initially issued, as shown in fig. 6 b. Thus, the switched forward communication link is: first CE device → first PE device → third PE device → second CE device; the reverse communication link after the handover is: second CE device → second PE device → third PE device → first CE device. That is, the first CE device sends service data to the first PE device, and then the first PE device detects that the active PW link fails, and sends the service data to the third PE device through the standby PW link, and then the third PE device sends the service data to the second CE device through the standby AC link; when the second CE device sends the service data, since the active AC link is not faulty, the service data is sent to the second PE device through the active AC link, then the second PE device sends the service data to the third PE device through the PW Bypass PW virtual link, and the third PE device receives the service data through the AC Bypass PW of the same virtual link, then sends the service data to the first PE device through the standby PW link, and finally sends the service data to the first CE device by the first PE device, so that bidirectional communication between the first CE device and the second CE device is implemented, and the flow direction of the service data is also shown in fig. 7 b. Therefore, the link is quickly switched when the primary PW link fails, and the bidirectional association relation and the unidirectional association relation are issued to the forwarding chip in advance, so that the forwarding chip does not need to be frequently operated during link switching, and the link switching time is effectively saved.
When the primary AC link between the second PE device and the second CE device fails, please refer to fig. 7c, where the second PE device adds a new unidirectional association relationship between the primary PW link entry and the AC Bypass PW entry, as shown in fig. 6c, so that the link switching operation can be completed, and a process of re-issuing the AC Bypass PW entry to the forwarding chip is omitted, and an association relationship stored in the third PE device is the same as the association relationship initially issued, as shown in fig. 6 c. Thus, the switched forward communication link is: first CE device → first PE device → second PE device → third PE device → second CE device; the reverse communication link is: second CE device → third PE device → first CE device. That is, the first CE device sends service data to the first PE device, the first PE device sends the service data to the second PE device through the active PW link, then the second PE device sends the service data to the third PE device through the AC Bypass PW, and the PW Bypass PW of the third PE device can receive the service data and finally sends the service data to the second CE device through the standby AC link; the second CE device directly feeds back the service data through the standby AC link, then the third PE device directly feeds back the service data through the standby PW link to the first PE device, and finally the first PE device feeds back the service data of the second CE device to the first CE device, so as to implement bidirectional communication between the first CE device and the second CE device, and the flow direction of the service data is also shown in fig. 7 c. Therefore, the link can be quickly switched when the main AC link fails, and the bidirectional association relation and the unidirectional association relation are issued to the forwarding chip in advance, so that the forwarding chip does not need to be frequently operated during link switching, and the link switching time is effectively saved.
Optionally, the slave PE device stores the bidirectional association relationship between the standby link table entries and the Bypass PW table entry, as shown in fig. 8 a; on this basis, the communication method provided in the embodiment of the present application may further include the following processes:
and sending a path switching instruction to the slave PE equipment, so that the slave PE equipment establishes a bidirectional association relationship between the standby link table entry except the fault main link and the Bypass PW table entry, and forwards the service data by using the established bidirectional association relationship.
Specifically, since the Bypass PW is a communication link between the master PE device and the slave PE device, and needs the slave PE device to participate in communication between the first CE device and the second CE device, the master PE device sends a path switching instruction to the slave PE device to notify that the slave PE device starts to operate, and to notify the slave PE device of link information of the failed master link.
In this step, in order to implement fast switching of the link, the forwarding chip of the slave PE device may pre-store the bidirectional association relationship and the Bypass PW table entry between the standby link table entries, so that after receiving the link switching instruction, the slave PE device may also obtain the bidirectional association relationship and the Bypass PW table entry from the forwarding chip of the PE device.
In specific implementation, the slave PE device may establish a bidirectional association relationship between a standby link table entry of a standby link of the failed active link and a Bypass PW table entry, so that the slave PE device may send service data received on the basis of the Bypass PW virtual link to the bidirectional association relationship, and send the service data to the outside through the standby link, thereby reaching the first CE device or the second CE device. Therefore, the forwarding chip of the PE device does not need to be frequently operated, the path is rapidly switched, and smooth communication between the first CE device and the second CE device is realized.
Optionally, based on the foregoing embodiment, in this embodiment, the standby link of the slave PE device includes a standby PW link and a standby AC link; specifically, referring to fig. 1, the standby PW link refers to a link established between the first PE device and the slave PE device, and is also referred to as a PW side link, and the standby AC link refers to a link established between the slave PE device and the second CE device, and is also referred to as an AC side link.
On this basis, the bidirectional association relationship between the standby link table entry prestored in the slave PE device includes the bidirectional association relationship between the standby PW link table entry and the standby AC link table entry, and the slave PE device establishes the bidirectional association relationship between the standby link table entry of the failed active link and the Bypass PW table entry, including: if the main PW link fails, establishing a bidirectional association relation between a standby PW link table entry and a Bypass PW table entry; if the main AC link fails, establishing a bidirectional association relation between the standby AC link table entry and the Bypass PW table entry.
In specific implementation, also taking fig. 1 as an example for explanation, when a link between the first PE device and the main PE device in fig. 1 fails, the main PE device executes a link switching operation according to the flow shown in fig. 3, and then the slave PE device also needs to execute link switching, that is, the slave PE device needs to modify the bidirectional association relationship stored in its forwarding chip into the bidirectional association relationship between the standby PW link entry and the Bypass PW entry, so as to establish a communication relationship between the Bypass PW virtual link and the standby PW link, and in combination with the communication relationship established by the main PE device when the main PW link fails, the switched communication link is: and the primary AC link, the Bypass PW virtual link and the standby PW link are in bidirectional communication, so that the switching of the links is completed, and the forwarding chips of the primary PE equipment and the secondary PE equipment do not need to be operated frequently.
Similarly, when the primary AC link fails, that is, the link between the primary PE device and the second CE device in fig. 1 fails, the primary PE device also needs to perform link switching according to the flow in fig. 3, and then the secondary PE device also needs to perform link switching, that is, the secondary PE device needs to modify the bidirectional association relationship stored in the forwarding chip thereof into the bidirectional association relationship between the standby AC link entry and the Bypass PW entry, so as to establish a communication relationship between the Bypass PW virtual link and the standby AC link, and in combination with the communication relationship established by the primary PE device when the primary AC link fails, the switched communication link is: and the primary PW link, the Bypass PW virtual link and the standby AC link are in bidirectional communication, so that the switching of the links is completed, and the forwarding chips of the primary PE equipment and the secondary PE equipment do not need to be operated frequently.
In a possible embodiment, when a Bypass PW is configured between the master PE device and the slave PE device, and when the master PW link fails, the master PE device and the slave PE device implement the above link switching, and store association relationship schematic diagrams respectively, as shown in fig. 8b, the master PE device forms bidirectional communication between the master AC link and the Bypass PW link, and the slave PE device forms bidirectional communication between the backup PW link and the Bypass PW link; when the active PW link fails, after the primary PE device and the slave PE device implement the above link switching, the primary PE device forms bidirectional communication between the active PW link and the Bypass PW link, and the slave PE device forms bidirectional communication between the standby AC link and the Bypass PW link, and a stored association relationship diagram is shown in fig. 8 c.
On this basis, the data flow in the no-fault scenario may refer to the description process shown in fig. 5a, which is not described in detail here, but only the association relationship stored by the second PE device and the third PE device is shown in fig. 8 a. When the active PW link fails, taking fig. 9a as an example to explain, in fig. 9a, the second PE device is a master PE device, and the third PE device is a slave PE device. When the active PW link fails, the second PE device and the third PE device perform link switching according to fig. 8b, and the bidirectional communication link implemented after link switching is: first CE device
Figure BDA0002425806200000221
First PE equipment
Figure BDA0002425806200000222
Third PE device
Figure BDA0002425806200000223
Second PE device
Figure BDA0002425806200000224
A second CE device. Specifically, the first CE device sends service data to the first PE device, the first PE device sends the service data to the third PE device through the standby PW link, the third PE device sends the service data to the second PE device through the Bypass PW link, and then the second PE device sends the service data to the second CE device through the active AC link, or vice versa, and the data flow direction can be implemented with reference to fig. 9a, thereby implementing link switching when the active PW link fails, and since the association relationship and the like are stored in the forwarding chip in advance, the forwarding chip does not need to be accessed frequently when the link is switched.
When the primary AC link fails, the second PE device in fig. 9b is described by taking fig. 9b as an exampleIs a master PE device and the third PE device is a slave PE device. When the active PW link fails, the second PE device and the third PE device perform link switching according to fig. 8c, and the bidirectional communication link implemented after link switching is: first CE device
Figure BDA0002425806200000225
First PE equipment
Figure BDA0002425806200000226
Second PE device
Figure BDA0002425806200000227
Third PE device
Figure BDA0002425806200000228
A second CE device. Specifically, the first CE device sends the service data to the first PE device, then the first PE device sends the service data to the second PE device through the active PW link, the second PE device sends the service data to the third PE device by using the Bypass PW virtual link, then the third PE device sends the service data to the second CE device through the standby AC link, the reverse direction can also be implemented, and the data flow direction can be as shown in fig. 9b, thereby implementing link switching when the active PW link fails, and since the association relationship and the like are stored in the forwarding chip in advance, the forwarding chip does not need to be accessed frequently when the link is switched.
In one possible embodiment, when 2 Bypass PWs are configured between the master PE device and the slave PE device, the two Bypass PWs may be called as a dual Bypass PW, and when two Bypass virtual links Bypass PWs are configured between the master PE device and the slave PE device, a Bypass PW entry of the master PE device includes a PW Bypass PW entry and an AC Bypass PW entry; similarly, the Bypass PW entry of the slave PE device also includes a PW Bypass PW entry and an AC Bypass PW entry; fig. 10a may be referred to as an association relationship and Bypass PW entries stored in the master PE device and the slave PE device, and fig. 10a is a schematic diagram of entries stored in a forwarding chip when a failure occurs in the master link.
On this basis, when the active PW link fails, and the active PE device and the slave PE device implement the above link switching, respectively storing association relationship schematic diagrams as shown in fig. 10b, the active PE device forms bidirectional communication between the active AC link and the PW Bypass PW virtual link, and the slave PE device forms bidirectional communication between the standby PW link and the AC Bypass PW virtual link; when the active AC link fails, please refer to fig. 10c, which shows an association relationship stored in the master PE device and the slave PE device, where the master PE device may implement bidirectional communication between the active PW link and the AC Bypass PW virtual link, and the slave PE device may implement bidirectional communication between the PW Bypass PW virtual link and the standby AC link.
On the basis, for better understanding of the present embodiment, please refer to fig. 7a for data flow in a fault-free scenario, but refer to fig. 10a for an association relationship stored by the second PE device and the third PE device. When the active PW link fails, an application scenario shown in fig. 11a is taken as an example for explanation, where in fig. 11a, the second PE device is a master PE device, and the third PE device is a slave PE device. When the active PW link fails, the second PE device and the third PE device perform link switching according to fig. 10b, and the bidirectional communication link implemented after link switching is: first CE device
Figure BDA0002425806200000233
First PE equipment
Figure BDA0002425806200000234
Third PE device
Figure BDA0002425806200000235
Second PE device
Figure BDA0002425806200000236
A second CE device. Specifically, the first CE device sends service data to the first PE device, the first PE device detects a failure of the active PW link, and sends the service data to the third PE device through the standby PW link, and the third PE device sends the service data to the second PE device through the AC Bypass PW link, and because the PW Bypass PW virtual link of the second PE device and the AC Bypass PW link of the third PE device belong to the same virtual link, the second PE device can receive the second PE device through the PW Bypass PW virtual linkThe service data sent by the three PE devices is then sent to the second CE device through the active AC link, or vice versa, and the data flow direction can be as shown in fig. 11a, thereby implementing link switching when the active PW link fails, and since the association relation and the like are stored in the forwarding chip in advance, the forwarding chip does not need to be frequently accessed when the link is switched.
When the active AC link fails, an application scenario shown in fig. 11b is taken as an example for explanation, in fig. 9b, the second PE device is a master PE device, and the third PE device is a slave PE device. When the active AC link fails, the second PE device and the third PE device both perform link switching according to fig. 10c, and the bidirectional communication link implemented after link switching is: first CE device
Figure BDA0002425806200000231
First PE equipment
Figure BDA0002425806200000232
Second PE device
Figure BDA0002425806200000241
Third PE device
Figure BDA0002425806200000242
A second CE device. Specifically, the first CE device sends service data to the first PE device, and then the first PE device sends it to the second PE device through the active PW link, and the second PE device sends the service data to the third PE device by using the AC Bypass PW virtual link, and since the AC Bypass PW of the second PE device and the PW Bypass PW of the third PE device belong to the same virtual link, the third PE device can receive the service data of the second PE device through the PW Bypass PW virtual link, and then send the service data to the second CE device through the standby AC link, and the reverse direction can also be implemented, and the data flow direction can be implemented as shown in fig. 11b, thereby implementing link switching when the active PW link fails, and since the association relationship and the like are stored in the forwarding chip in advance, the forwarding chip does not need to be frequently accessed when the link is switched.
Optionally, based on any one of the above embodiments, the communication method provided in the embodiment of the present application further includes:
and deleting the main link table entry of the failed main link.
Specifically, when the primary link of the primary PE device fails, the link switching and the deletion of the failed primary link table entry are operations that need to be performed, so to further optimize the link switching performance, the link switching may be performed first, and then the primary link table entry may be deleted. That is, the communication link is switched again based on steps S301 to S303, and then the primary link table entry of the failed primary link is deleted. For example, when the primary PW link fails, firstly, the communication link is switched according to the method provided by the present application, and then the primary PW link entry is deleted; when the main AC link fails, the communication link is switched according to the method provided by the application, and then the list item of the main AC link is deleted. Therefore, normal sending of the service data is not influenced, the storage pressure of the forwarding chip can be relieved, and the processing performance of the forwarding chip is improved.
By implementing the communication method provided by any of the above embodiments of the present application, by storing the bidirectional association relationship between the entries of the primary links and the Bypass PW entry and at least one primary link entry in the forwarding chip of the PE device in advance, when the primary PE device determines that any primary link fails, the unidirectional association relationship between the Bypass PW entry and the entries of the primary links other than the failed primary link is directly read, and then the unidirectional association relationship between the entries of the primary links other than the failed primary link and the Bypass PW entry is newly added, so that bidirectional communication between the Bypass virtual link and the primary links other than the failed primary link is formed, and then service data is forwarded based on the formed bidirectional communication, so that not only is fast path switching and normal forwarding of service data realized, but also since the bidirectional association relationship and the unidirectional association relationship are stored in the forwarding chip in advance, the forwarding chip of the PE equipment does not need to be operated frequently, and the pressure of the forwarding chip in the PE equipment is further reduced.
Based on the same inventive concept, the application also provides a communication device corresponding to the communication method. The implementation of the communication apparatus may refer to the above description of the communication method, which is not discussed here.
Referring to fig. 12, fig. 12 is a diagram of a communication apparatus according to an exemplary embodiment of the present disclosure, which is disposed on a primary provider edge PE device in a L2VPN of a two-layer virtual private network, where the L2VPN further includes a secondary provider edge PE device, where a Bypass virtual link Bypass PW is configured between the primary PE device and the secondary PE device, and a bidirectional association relationship between primary link entries and a unidirectional association relationship between a Bypass PW entry and a primary link entry of at least one primary link are stored in advance in the primary PE device; and the communication device includes:
an obtaining module 1201, configured to, when determining that any one of the primary links fails, obtain a unidirectional association relationship between a Bypass PW table entry stored in the primary link and a primary link table entry other than the failed primary link;
an association relationship adding module 1202, configured to add a unidirectional association relationship between the entry of the main link other than the failed main link and the Bypass PW entry, to obtain a bidirectional association relationship between the entry of the main link other than the failed main link and the Bypass PW entry;
a forwarding module 1203, configured to forward the received service data by using a bidirectional association relationship between the entry of the main link except the failed main link and the Bypass PW entry.
In a possible embodiment, the active link includes an active PW link and an active AC link; then
The association relationship adding module 1202 is specifically configured to add a unidirectional association relationship between an entry of the primary AC link and an entry of the Bypass PW if the primary PW link fails; and if the main AC link fails, increasing the one-way incidence relation between the main PW link table entry and the Bypass PW table entry.
In a possible embodiment, in this embodiment, at least one Bypass virtual link Bypass PW is configured between the master PE device and the slave PE device; the slave PE equipment prestores a bidirectional association relationship between standby link table entries and a unidirectional association relationship between a Bypass PW table entry and at least one standby link table entry of a standby link; and the unidirectional incidence relation stored by the slave PE equipment is matched with the unidirectional incidence relation stored by the master PE equipment.
In a possible embodiment, a Bypass virtual link Bypass PW is configured between the master PE device and the slave PE device in this embodiment; and
if the main PW link fault is maintained preferentially, when the main PE equipment stores the unidirectional association relationship between the Bypass PW table entry and the main AC link table entry, the slave PE equipment stores the unidirectional association relationship between the Bypass PW table entry and the standby PW link table entry;
if the primary AC link failure is preferentially maintained, the primary PE device prestores a one-way association relationship between a Bypass PW table entry and the primary PW link table entry, and the secondary PE device prestores a one-way association relationship between the Bypass PW table entry and a standby AC link table entry.
In a possible embodiment, in this embodiment, two Bypass virtual links Bypass PWs are configured between a master PE device and a slave PE device, a Bypass PW entry of the master PE device includes a PW Bypass PW entry and an AC Bypass PW entry, and a Bypass PW entry of the slave PE device includes a PW Bypass PW entry and an AC Bypass PW entry; then
The one-way association relationship between the Bypass PW table entry prestored in the main PE device and the main link table entry of the at least one main link comprises: the unidirectional incidence relation between the PW table entry of the AC Bypass and the main PW link table entry and the unidirectional incidence relation between the PW Bypass PW table entry and the main AC link table entry are obtained; and
the unidirectional association relationship between the Bypass PW table entry prestored in the slave PE device and the standby link table entry of at least one standby link includes: the method comprises the steps of obtaining a one-way association relationship between an AC Bypass PW table entry and a standby PW link table entry, and obtaining a one-way association relationship between the PW Bypass PW table entry and the standby AC link table entry.
On this basis, the association relationship adding module 1202 is specifically configured to add a unidirectional association relationship between the primary AC link entry and the PW Bypass PW entry if the primary PW link fails; and if the main AC link fails, increasing the one-way incidence relation between the main PW link table entry and the AC Bypass PW table entry.
In a possible embodiment, in this embodiment, the slave PE device stores a bidirectional association relationship between the standby link table entries and a Bypass PW table entry; on this basis, please refer to fig. 12, the communication apparatus provided in this embodiment further includes:
a sending module 1204, configured to send a path switching indication to the slave PE device, so that the slave PE device establishes a bidirectional association relationship between a standby link entry except for the failed primary link and a Bypass PW entry, and forwards service data by using the established bidirectional association relationship.
Optionally, please refer to fig. 12, the communication apparatus provided in this embodiment further includes:
the deleting module 1205 is configured to delete the main link entry of the failed main link.
Based on the same inventive concept, an embodiment of the present application provides a provider edge PE device, which may be a master PE device or a slave PE device, as shown in fig. 13, including a processor 1301 and a machine-readable storage medium 1302, where the machine-readable storage medium 1302 stores machine-executable instructions capable of being executed by the processor 1301, and the processor 1301 is caused by the machine-executable instructions to execute the communication method provided in any embodiment of the present application.
The machine-readable storage medium may include a RAM (Random Access Memory) and a NVM (Non-volatile Memory), such as at least one disk Memory. Alternatively, the machine-readable storage medium may be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
In addition, the embodiment of the application provides a machine-readable storage medium, and the machine-readable storage medium stores machine executable instructions, and when the machine executable instructions are called and executed by a processor, the processor is caused to execute the communication method provided by any embodiment of the application.
As for the PE device and the machine-readable storage medium, the content of the related method is substantially similar to that of the foregoing method embodiment, so that the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment. The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (10)

1. A communication method is characterized in that the method is applied to a main service provider edge PE device in a two-layer virtual private network L2VPN, the L2VPN also comprises a slave service provider edge PE device, wherein a Bypass virtual link Bypass PW is configured between the main PE device and the slave PE device, a bidirectional association relation between main link table items and a unidirectional association relation between a Bypass PW table item and at least one main link table item of a main link are prestored in the main PE device; and the method comprises:
when determining that any main link fails, the main PE equipment acquires a one-way association relationship between a Bypass PW table entry stored in the main PE equipment and main link table entries except the failed main link;
increasing the one-way incidence relation between the main link table entry except the failed main link and the Bypass PW table entry to obtain the two-way incidence relation between the main link table entry except the failed main link and the Bypass PW table entry;
and forwarding the received service data by using the bidirectional association relationship between the main link table entry except the failed main link and the Bypass PW table entry.
2. The method of claim 1, wherein the active link comprises an active PW link and an active AC link; then
The method for increasing the one-way incidence relation between the main link table entry except the failed main link and the Bypass PW table entry comprises the following steps:
if the primary PW link fails, increasing the one-way incidence relation between the primary AC link table entry and the Bypass PW table entry;
and if the main AC link fails, increasing the one-way incidence relation between the main PW link table entry and the Bypass PW table entry.
3. The method of claim 2, wherein at least one Bypass virtual link Bypass PW is configured between the master PE device and the slave PE device; the slave PE equipment prestores a bidirectional association relationship between standby link table entries and a unidirectional association relationship between a Bypass PW table entry and at least one standby link table entry of a standby link; and the unidirectional incidence relation stored by the slave PE equipment is matched with the unidirectional incidence relation stored by the master PE equipment.
4. The method of claim 3, wherein a Bypass virtual link Bypass PW is configured between the master PE device and the slave PE device; and
if the main PW link fault is maintained preferentially, when the main PE equipment stores the unidirectional association relationship between the Bypass PW table entry and the main AC link table entry, the slave PE equipment stores the unidirectional association relationship between the Bypass PW table entry and the standby PW link table entry;
if the primary AC link failure is preferentially maintained, the primary PE device prestores a one-way association relationship between a Bypass PW table entry and the primary PW link table entry, and the secondary PE device prestores a one-way association relationship between the Bypass PW table entry and a standby AC link table entry.
5. The method according to claim 3, wherein two Bypass virtual links Bypass PWs are configured between the master PE device and the slave PE device, and wherein a Bypass PW entry of the master PE device includes a PW Bypass PW entry and an AC Bypass PW entry, and a Bypass PW entry of the slave PE device includes a PW Bypass PW entry and an AC Bypass PW entry; then
The one-way association relationship between the Bypass PW table entry prestored in the main PE device and the main link table entry of the at least one main link comprises: the unidirectional incidence relation between the PW table entry of the AC Bypass and the main PW link table entry and the unidirectional incidence relation between the PW Bypass PW table entry and the main AC link table entry are obtained; and
the unidirectional association relationship between the Bypass PW table entry prestored in the slave PE device and the standby link table entry of at least one standby link includes: the method comprises the steps of obtaining a one-way association relationship between an AC Bypass PW table entry and a standby PW link table entry, and obtaining a one-way association relationship between the PW Bypass PW table entry and the standby AC link table entry.
6. The method of claim 5,
if the primary PW link fails, increasing the one-way association relationship between the primary AC link table entry and the Bypass PW table entry, including:
increasing the one-way incidence relation between the main AC link list item and the PW Bypass list item;
if the main AC link fails, increasing the one-way incidence relation between the main PW link table entry and the Bypass PW table entry, comprising:
and increasing the one-way association relationship between the main PW link table entry and the AC Bypass PW table entry.
7. The method of claim 1, wherein the slave PE device stores a Bypass PW entry and a bidirectional association between standby link entries; and, the method further comprises:
and sending a path switching instruction to the slave PE equipment, so that the slave PE equipment establishes a bidirectional association relationship between the standby link table entry except the fault main link and the Bypass PW table entry, and forwards the service data by using the established bidirectional association relationship.
8. A communication device is characterized in that a main service provider edge PE device is arranged in a two-layer virtual private network L2VPN, the L2VPN also comprises a slave service provider edge PE device, wherein a Bypass virtual link Bypass PW is configured between the main PE device and the slave PE device, a bidirectional association relation between main link table items and a unidirectional association relation between a Bypass PW table item and a main link table item of at least one main link are prestored in the main PE device; and the apparatus comprises:
the acquisition module is used for acquiring the one-way association relationship between the Bypass PW table entry stored in the acquisition module and the main link table entries except the main link with the fault when the fault of any main link is determined;
the incidence relation adding module is used for adding the one-way incidence relation between the main link table entry except the failed main link and the Bypass PW table entry to obtain the two-way incidence relation between the main link table entry except the failed main link and the Bypass PW table entry;
and the forwarding module is used for forwarding the received service data by using the bidirectional association relationship between the main link table entry except the failed main link and the Bypass PW table entry.
9. A provider edge device, PE, comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to perform the method of any one of claims 1-7.
10. A machine-readable storage medium having stored thereon machine-executable instructions that, when invoked and executed by a processor, cause the processor to perform the method of any of claims 1-7.
CN202010220207.5A 2020-03-25 2020-03-25 Communication method and device Active CN111490932B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010220207.5A CN111490932B (en) 2020-03-25 2020-03-25 Communication method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010220207.5A CN111490932B (en) 2020-03-25 2020-03-25 Communication method and device

Publications (2)

Publication Number Publication Date
CN111490932A CN111490932A (en) 2020-08-04
CN111490932B true CN111490932B (en) 2022-03-29

Family

ID=71811650

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010220207.5A Active CN111490932B (en) 2020-03-25 2020-03-25 Communication method and device

Country Status (1)

Country Link
CN (1) CN111490932B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115051946A (en) * 2022-07-05 2022-09-13 杭州云合智网技术有限公司 Method for eliminating message forwarding ring in dual-homing scene
CN115002024A (en) * 2022-07-05 2022-09-02 杭州云合智网技术有限公司 Message blocking method for eliminating message forwarding looping

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101005443A (en) * 2006-01-20 2007-07-25 华为技术有限公司 Realizing method for pseudo wire from point to multiple points
CN101227397A (en) * 2008-01-28 2008-07-23 华为技术有限公司 System, equipment and method for protecting link circuit
CN102325037A (en) * 2011-05-25 2012-01-18 中兴通讯股份有限公司 Method and system for switching pseudo-wire dual-homing network and dual-homing operator equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070127479A1 (en) * 2005-12-05 2007-06-07 David Sinicrope A method and arrangement for distributed pseudo-wire signaling

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101005443A (en) * 2006-01-20 2007-07-25 华为技术有限公司 Realizing method for pseudo wire from point to multiple points
CN101227397A (en) * 2008-01-28 2008-07-23 华为技术有限公司 System, equipment and method for protecting link circuit
CN102325037A (en) * 2011-05-25 2012-01-18 中兴通讯股份有限公司 Method and system for switching pseudo-wire dual-homing network and dual-homing operator equipment

Also Published As

Publication number Publication date
CN111490932A (en) 2020-08-04

Similar Documents

Publication Publication Date Title
CN111614553B (en) Communication method and device
CN111740898B (en) Link switching method and device and service provider edge equipment
CN100531136C (en) Method and system for transmitting message in virtual special network link fault
CN111490932B (en) Communication method and device
US20090201831A1 (en) Vpls n-pe redundancy using pseudo wire fast failover
CN111817881B (en) Fault processing method and related device
CN109861867B (en) MEC service processing method and device
CN101764744B (en) VRRP (Virtual Router Redundancy Protocol) access method, device and system, as well as VRRP routing equipment
CN111988222A (en) Data transmission method and device, electronic equipment and computer readable storage medium
CN105472049B (en) CGN backup protection method and device for carrier-grade network address conversion
US9282015B2 (en) Network relay device
CN111130893A (en) Message transmission method and device
CN101267360A (en) Pseudo failure detection method and user boundary device
JP2017034463A (en) Protection method, communication system, and end node
CN109412980B (en) BRAS backup method and device
CN107819680A (en) A kind of method of service switchover, the network equipment
CN111404812B (en) Communication method and device
CN111404813B (en) Communication method and device
CN104717143A (en) Method and equipment for many-one reducibility scene multicast data transmission
CN110138656B (en) Service processing method and device
CN110875880B (en) Data transmission method, related equipment, system and computer storage medium
RU2667806C2 (en) Pseudo-wire (pw) dual-homing protection switching method and system
CN109768925B (en) Method and device for switching active/standby pseudo wires
JP5331247B2 (en) COMMUNICATION SYSTEM AND METHOD, NETWORK MANAGEMENT DEVICE, AND COMMUNICATION DEVICE
CN106341323A (en) VRRP state synchronizing method and device

Legal Events

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