CN111404812A - Communication method and device - Google Patents

Communication method and device Download PDF

Info

Publication number
CN111404812A
CN111404812A CN202010220185.2A CN202010220185A CN111404812A CN 111404812 A CN111404812 A CN 111404812A CN 202010220185 A CN202010220185 A CN 202010220185A CN 111404812 A CN111404812 A CN 111404812A
Authority
CN
China
Prior art keywords
link
bypass
table entry
entry
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.)
Granted
Application number
CN202010220185.2A
Other languages
Chinese (zh)
Other versions
CN111404812B (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 CN202010220185.2A priority Critical patent/CN111404812B/en
Publication of CN111404812A publication Critical patent/CN111404812A/en
Application granted granted Critical
Publication of CN111404812B publication Critical patent/CN111404812B/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

Abstract

The application provides a communication method and a device, which are applied to main provider edge PE equipment in a two-layer virtual private network L2 VPN, wherein the L2 VPN also comprises auxiliary provider edge PE equipment, a Bypass virtual link Bypass PW is configured between the main PE equipment and the auxiliary PE equipment, the method comprises the steps that the main PE equipment obtains a pre-stored bidirectional incidence relation between main link table items and Bypass PW table items when determining that any main link fails, the bidirectional incidence relation between the main link table items except the failed main link and the Bypass PW table items is established, and received service data is forwarded by utilizing the established bidirectional incidence relation, so that the link is rapidly switched, and a forwarding chip in the PE equipment does not need to be frequently operated.

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
In the existing two-layer Virtual Private Network (L eye 2Virtual 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 active and standby devices, 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 the primary PE device, the first CE device may sequentially pass through the first PE device, the second PE device, and the second CE device to perform service traffic forward, where a PW link between the first PE device and the second PE device may be referred to as PW, a PW link between the second PE device and the second CE device may be referred to as AC link, and when the second PE device is a failed AC link, the forward traffic forward may be performed through the second PE device.
However, in the prior art, when a PW link or an AC link fails and when a Bypass PW is switched, a manner of deleting and then adding is adopted, and the entry is stored in a forwarding chip of the PE device, which results in a need to frequently operate the forwarding chip. For example, when the primary PW has a failure, the primary PW table entry in the forwarding chip is deleted first, then the primary AC table entry and the Bypass PW table entry are associated and added to the forwarding chip, and the slave PE device also needs to delete the standby AC table entry first, then the standby AC table entry and the Bypass PW table entry are associated and added to the forwarding chip. When the primary AC fails, the primary AC table entry in the forwarding chip is deleted, then the primary PW table entry and the Bypass PW table entry are associated and added into the forwarding chip, the secondary PE device also needs to execute similar operations and delete the standby PW table entry in the forwarding chip, and then the standby PW table entry and the Bypass PW table entry are associated and added into the forwarding chip. That is to say, both the master PE device and the slave PE device need to operate the forwarding chip to implement the link switching, that is, when a failure occurs each time and a link switching occurs, the bypass PW is activated and then issued to the forwarding chip, which not only results in frequent operation of hardware entries in the forwarding chip, but also results in time consumption and affects the performance of PW protection switching because the master PE device and the slave PE device need to operate cooperatively.
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, there is provided a communication method applied to a primary provider edge PE device in a layer two virtual private network L2 VPN, where the L2 VPN further includes a secondary provider edge PE device, a Bypass virtual link Bypass PW is configured between the primary PE device and the secondary PE device, and the method includes:
when determining that any main link fails, the main PE equipment acquires a prestored bidirectional association relationship between main link table entries and a Bypass PW table entry;
and establishing a bidirectional association 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 utilizing the established bidirectional association relation.
According to a second aspect of the present application, there is provided a communication apparatus, a primary provider edge PE device disposed in a two-layer virtual private network L2 VPN, the L2 VPN further includes a secondary provider edge PE device, wherein a Bypass virtual link Bypass PW is configured between the primary PE device and the secondary PE device, and the apparatus includes:
the acquisition module is used for acquiring a prestored bidirectional association relation between main link table entries and a Bypass PW table entry when any main link is determined to be in fault;
the incidence relation establishing module is used for establishing a bidirectional incidence relation between the table entry of the main link except the failed main link and the BypassPW table entry;
and the forwarding module is used for forwarding the received service data by utilizing the established bidirectional association relation.
According to a third aspect of the present application, there is provided a provider edge PE device, comprising a processor and a machine-readable storage medium, the machine-readable storage medium storing machine-executable instructions capable of being executed by the processor, the processor being caused by the machine-executable instructions to perform the method provided by the first aspect of the embodiments 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 the communication device provided by the embodiment of the application store the bidirectional association relationship between the main link table entries and the Bypass PW table entries in the forwarding chip of the PE device in advance, thus, when the main PE equipment determines that any main link fails, the bidirectional association relation and the Bypass PW table entry are directly read, then reestablishing the bidirectional association relationship between the main link table entry of the main link without failure and the Bypass PW table entry, then, the service data is forwarded based on the newly established bidirectional association relation, thereby not only realizing the rapid switching of the path and the normal forwarding of the service data, moreover, because the bidirectional association relation and the Bypass PW table entry 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 a forwarding chip in the PE equipment is reduced, and meanwhile, the link switching time is also saved.
Drawings
Fig. 1 is a schematic diagram of a layer two virtual private network L2 VPN 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 table entry reference diagram illustrating a stored table entry in a single Bypass PW scenario according to an exemplary embodiment of the present application;
fig. 4b is a reference schematic diagram of a bidirectional association relationship established when a primary PW link fails in a single Bypass PW scene according to an exemplary embodiment of the present application;
fig. 4c is a reference schematic diagram of a bidirectional association relationship established when a primary AC link fails in a single Bypass PW scene according to 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 a link of an active PW 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 a primary AC link fails in a single Bypass PW scenario according to an exemplary embodiment of the present application;
FIG. 6a is a table entry reference diagram illustrating storage in a dual Bypass PW scenario according to an exemplary embodiment of the present application;
fig. 6b is a reference schematic diagram of a bidirectional association relationship established 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 schematic diagram of a bidirectional association relationship established 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 an association relationship stored when a standby AC link is preferentially maintained and there is no failure in a single Bypass PW scene according to an exemplary embodiment of the present application;
fig. 8b is a reference diagram illustrating 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. 8c is a reference diagram illustrating an association relationship stored when a standby PW link is preferentially maintained and no failure exists in a single Bypass PW scene according to an exemplary embodiment of the present application;
fig. 8d 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. 9a is a schematic diagram illustrating a data flow when a standby AC link is preferentially maintained and a primary PW link fails in a single Bypass PW scene according to an exemplary embodiment of the present application;
fig. 9b is a schematic diagram illustrating a data flow when a standby PW link is preferentially maintained and a primary AC link fails in a single Bypass PW scene according to an exemplary embodiment of the present application;
fig. 10a is a reference diagram illustrating a table entry association relationship stored in a double Bypass PW scenario in the absence of a failure according to an exemplary embodiment of the present application;
fig. 10b 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. 10c 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. 11a is a schematic data flow diagram illustrating a failure of a link of an active PW in a dual Bypass PW scenario according to an exemplary embodiment of the present application;
fig. 11b is a schematic diagram illustrating 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. 12a is a schematic diagram illustrating an entry association relationship in a slave PE device when there is no failure in a single Bypass PW scene according to an exemplary embodiment of the present application;
fig. 12b is a schematic diagram illustrating another table entry association relationship in a slave PE device when there is no failure in a single Bypass PW scene according to an exemplary embodiment of the present application;
fig. 12c is a schematic diagram illustrating an entry association relationship after switching from a PE device when a primary PW link fails in a single Bypass PW scene according to an exemplary embodiment of the present application;
fig. 12d is a schematic diagram illustrating an entry association relationship after switching from a PE device when a primary AC link fails in a single Bypass PW scene according to an exemplary embodiment of the present application;
fig. 13 is a reference diagram illustrating table entry association relationships in a slave PE device in a dual Bypass PW scenario according to an exemplary embodiment of the present application;
FIG. 14 is a block diagram of a communication device shown in an exemplary embodiment of the present application;
fig. 15 is a block diagram illustrating a 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.
It should be noted that, in the present application, the communication link that is turned on by default by the path selection switch is the active path, and when the link fails, the communication link that is turned on after the path selection switch is switched is the standby path.
Referring to fig. 1, a two-layer virtual private network L2 VPN networking provided in the embodiment of the present application includes two selectable transmission links, a primary link and a backup link, where a first CE device may perform inter-service communication with a second CE device through the primary link or the backup link, the primary link is a link established between a primary PE device and the first CE device and the second CE device, and the backup link is a link established between a secondary PE device and the first CE device and the second CE device.
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 one main link fails, the main PE device acquires a prestored bidirectional association relationship between main link table entries and a Bypass PW table entry.
In specific implementation, the present embodiment issues the bidirectional association relationship between the entries of the main link and the Bypass virtual link Bypass PW entry 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 main PE device can directly obtain the bidirectional association relationship and Bypass PW entry 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.
S302, the main PE device establishes a bidirectional association relation between the main link table entry except the failed main link and the Bypass PW table entry, and forwards the received service data by using the established bidirectional association relation.
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 link switching, in this embodiment, after obtaining the bidirectional association relationship and the Bypass PW table entry, based on step S301, a bidirectional association relationship between a primary link table entry other than the failed primary link and a Bypass PW table entry is established, that is, the original bidirectional association relationship is modified to be the bidirectional association relationship between the Bypass PW table entry and the primary link table entry other than the failed primary link, so that the Bypass PW is implemented, and thus, the primary PE device can use the non-failed primary link PW table entry and the Bypass table entry to implement communication between the first CE device and the second CE device, that is, the primary PE device transmits service data to the Bypass PW virtual link based on the non-failed primary link, and then transmits the service data to the secondary PE device through the Bypass PW virtual link; or, the slave PE device transmits the service data to the master PE device through the Bypass PW virtual link, and then the master PE device transmits the service data to the outside through the failure-free master link.
Optionally, in the communication method provided in this embodiment of the present application, the slave PE device stores in advance a bidirectional association relationship between the standby link table entry and the Bypass PW table entry.
Specifically, the bidirectional association relationship between the standby link table entry and the Bypass PW table entry is issued to the forwarding chip of the slave PE device in advance, so that when the master PE device sends service data to the slave PE device through the Bypass PW link, the slave PE device can send the received service data to the outside through the standby link based on the preset bidirectional association relationship. Therefore, because the bidirectional association relation is issued in advance in the forwarding chip of the slave PE equipment, when the main link fails, the link switching can be realized only by operating the main PE equipment, and the slave PE equipment does not need any processing, so that the link switching speed is further improved.
Optionally, in this embodiment of the present application, the primary link of the primary PE device includes a primary PW link and a primary AC link; specifically, referring to fig. 1, the active PW link refers to a link established between the first PE device and the primary PE device, and is also referred to as a PW side link, and the active AC link refers to a link established between the primary PE device and the second CE device, and is also referred to as an AC side link. Correspondingly, the bidirectional association relationship between the primary PW link entry and the primary AC link entry stored in the primary PE device is the bidirectional association relationship between the primary PW link entry and the primary AC link entry.
On this basis, in step S301, the pre-stored bidirectional association relationship between the primary link table entry includes a bidirectional association relationship between the primary PW link table entry and the primary AC link table entry, and on this basis, the step S302 establishes a bidirectional association relationship between the primary link table entry and the Bypass PW table entry except for the failed primary link, including:
if the main PW link fails, establishing a bidirectional association relation between the main AC link table entry and the Bypass PW table entry;
if the main AC link fails, establishing a bidirectional association relation between the main PW link table entry and the Bypass PW table entry.
On this basis, the standby link of the slave PE device in the embodiment of the present application 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. Correspondingly, the slave PE device prestores a bidirectional association between the standby PW link entry and the Bypass PW entry, and a bidirectional association between the Bypass PW entry and the standby AC link 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, in order to implement a service transaction between the first CE device and the second CE device, the primary PE device needs to modify the bidirectional association relationship stored in the forwarding chip therein to a bidirectional association relationship between the primary AC link entry of the primary AC link and the Bypass PW entry, so as to establish communication between the primary AC link and the Bypass PW virtual link. Then, communication connection between a standby PW link and a Bypass PW virtual link of the active PW link with failure, which is pre-stored in the slave PE device, is combined, so that communication between the first CE device and the second CE device can be achieved, that is, the switched communication link is: and bidirectional communication between the active AC link, the Bypass PW virtual link and the standby PW link.
Similarly, when the active AC link fails, that is, a link between the second CE device and the active PE device in fig. 1 fails, at this time, in order to enable a service transaction between the first CE device and the second CE device, the active PE device needs to modify the bidirectional association relationship into a bidirectional association relationship between an entry of the active PW link and an entry of the Bypass PW, so that communication between the active PW link and the Bypass PW virtual link is established, and then, the communication connection between the standby AC link of the active AC link that fails and the Bypass PW virtual link that is pre-stored in the slave PE device is combined, so that the communication transaction between the first CE device and the second CE device can be implemented, that is, the switched communication link is: and bidirectional communication between the active PW link, the Bypass PW virtual link and the standby AC link.
Optionally, based on any of the above embodiments, at least one Bypass virtual link Bypass PW is configured between the master PE device and the slave PE device in the embodiment of the present application, and the at least one Bypass PW may protect both an AC side link and a PW side link. When the main link fails, the communication between the main PE equipment and the auxiliary PE equipment can be realized through at least one Bypass PW virtual link.
In a possible embodiment, when a Bypass PW is configured between a master PE device and a slave PE device, the Bypass PW may be referred to as a single Bypass PW, where a bidirectional association relationship and a Bypass PW entry stored in the master PE device and the slave PE device may refer to fig. 4a, where fig. 4a is a schematic diagram of an entry stored in a forwarding chip when a failure occurs in an active link. However, when the active PW link fails, the primary PE device may establish a bidirectional association relationship between the active AC link entry and the Bypass PW entry, please refer to fig. 4b, and the entry association relationship of the slave PE device is not changed, which is also shown in fig. 4b for convenience of illustration, but for convenience of understanding, the entry playing a role in the slave PE device is also shown in fig. 4 b. Similarly, when the active AC link fails, the primary PE device may establish a bidirectional association relationship between the active PW link entry and the Bypass PW entry, please refer to fig. 4c, while the entry association relationship of the secondary PE device is not changed, for convenience of illustration, please refer to fig. 4c, but for convenience of understanding, the entry playing a role in the secondary PE device is also shown in fig. 4 c. It should be noted that, in this embodiment, when the master PE device sends service data to the slave PE device through the Bypass PW virtual link, the master PE device may notify the slave PE device that the master PW link of the master PE device fails, so that when receiving the notification, the slave PE device sends the service data to the outside by using the standby PW link. When the primary AC link fails, the secondary PE equipment is notified of the failure of the primary AC link when service data is sent to the secondary PE equipment, so that the secondary PE equipment adopts the standby AC link to send data outwards when receiving the notification. Therefore, the slave PE equipment can realize the switching of the link without frequently operating the forwarding chip in the slave PE equipment, and further realize the normal forwarding of the service data.
For better understanding of the embodiment of the present application, 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, an entry stored in a forwarding chip of the second PE device is, in a fault-free scenario, the first CE device sends service data to the first PE device, and then the first PE device sends the service data to the second PE device through an active PW link between the first PE device and the second PE device.
When the primary PW link between the second PE device and the first PE device fails, please refer to fig. 5b, where the second PE device modifies the stored bidirectional association relationship to the bidirectional association relationship between the primary AC link entry and the Bypass PW entry, and also refer to fig. 4b, so that the link switching operation can be completed, and a process of re-issuing the Bypass PW entry to the forwarding chip is omitted, and the third PE device issues the bidirectional association relationship between the Bypass PW entry and the standby PW link entry in advance, so that the third PE device does not need to do any processing, and only the second PE device needs to notify the third PE device that the primary PW link fails when the primary PW link fails, and therefore, a communication link implemented after link switching is: first CE device
Figure BDA0002425806010000131
First PE equipment
Figure BDA0002425806010000132
Third PE device
Figure BDA0002425806010000133
Second PE device
Figure BDA0002425806010000134
The second CE device, namely the first CE device sends the service data to the first PE device, then the first PE device detects the fault of the active PW link, the service data is sent to the third PE device through the standby PW link, then the third PE device sends the service data to the second PE device through the Bypass PW virtual link, and finally the second PE device sends the service data to the second CE device through the active AC link, and vice versa, so that the link switching of the active PW link can be realized, and because the bidirectional association relation and the Bypass PW are stored in the forwarding chip in advance, the forwarding chip does not need to be frequently accessed during the link switching, and the operation of the forwarding chip of the third PE device is omitted.
When the second PE device is connected with the second PE deviceWhen the primary AC link between the CE devices fails, please refer to fig. 5c, the second PE device modifies the bidirectional association stored therein to the bidirectional association between the primary PW link entry and the Bypass PW entry, and also refer to fig. 4c, so that the link switching operation can be completed, the process of re-issuing the Bypass PW entry to the forwarding chip is omitted, similarly, the association of the third PE device is not changed, and only the second PE device needs to notify the third PE device of the primary AC link failure, and thus the communication link implemented after the link switching is: first CE device
Figure BDA0002425806010000135
First PE equipment
Figure BDA0002425806010000136
Second PE device
Figure BDA0002425806010000137
Third PE device
Figure BDA0002425806010000138
The second CE device, that is, 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, then the second PE device sends the service data to the third PE device through the Bypass PW virtual link, and finally the third PE device sends the service data to the second CE device through the standby AC link, and vice versa, thereby enabling the link switching when the active AC link fails to be achieved, and since the bidirectional association relationship and the Bypass PW are stored in the forwarding chip in advance, the forwarding chip does not need to be accessed frequently when the link is switched, and the operation of the forwarding chip of the third PE device is omitted.
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 table entry of the slave PE device also includes a PW Bypass PW table entry and an AC Bypass PW table entry, and on this basis, the bidirectional association relationship between the backup link table entry and the Bypass PW table entry pre-stored in the slave PE device includes: the bidirectional association relationship between the standby PW link table entry and the ACBypass PW table entry and the bidirectional association relationship between the standby AC link table entry and the PW Bypass PW table entry are obtained; fig. 6a may be referred to as a bidirectional association relationship and a Bypass PW entry 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 primary PE device establishes a bidirectional association relationship between the primary AC link entry and the Bypass PW entry, the following process may be implemented: fig. 6b is referred to for establishing a bidirectional association relationship between the primary AC link entry and the PW Bypass PW entry, while the entry association relationship in the slave PE device remains unchanged, and for convenience of illustration, please refer to fig. 6b, but for convenience of understanding, the entry that plays a role in the slave PE device is also shown in fig. 6 b.
If the primary AC link fails, the primary PE device may implement the following process when establishing the bidirectional association relationship between the primary PW link entry and the Bypass PW entry: fig. 6c is referred to for establishing a bidirectional association relationship between the primary PW link entry and the AC Bypass PW entry, and at this time, the entry association relationship in the slave PE device is not changed, for convenience of illustration, please refer to fig. 6c, but for convenience of understanding, entries that play a role in the slave PE device are also 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. Therefore, when the primary PW link of the primary PE device fails, in order for the primary PE device to provide communication, the primary PE device needs to modify the previously stored bidirectional association relationship into the bidirectional association relationship between the primary AC link entry and the PW Bypass PW entry, so as to implement bidirectional communication connection between the primary AC link and the PW Bypass PW virtual link; therefore, after the main PE device receives the service data through the main AC link, the service data is sent to the slave PE device through the PW Bypass PW virtual link based on the newly established bidirectional association relationship between the main AC link table entry and the PW Bypass PW table entry, and then the service data is sent outwards by the slave PE device. 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.
When the main AC link of the main PE device fails, in order for the main PE device to provide communication, the main PE device needs to modify the previously stored bidirectional association relationship into the bidirectional association relationship between the main PW link entry and the AC Bypass PW entry, thereby implementing bidirectional communication connection between the main PW link and the AC Bypass PW virtual link. Therefore, after the main PE device receives the service data through the main PW link, the service data can be sent to the slave PE device through the AC Bypass PW link based on the bidirectional association relationship between the main PW link and the AC Bypass PW virtual link, and then the slave PE device sends the service data outwards. 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.
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 active PW link between the second PE device and the first PE device fails, please refer to fig. 7b, the second PE device modifies the stored bidirectional association relationship into the bidirectional association relationship between the active AC link entry of the active AC link and the PW Bypass PW entry, also refer to fig. 6b, so as to complete the link switching operationThe process of re-issuing the PW Bypass PW table entry to the forwarding chip is omitted, and the third PE device pre-stores the bidirectional association relationship between the standby PW link table entry of the standby PW link and the AC Bypass PW table entry, so that the third PE device does not need to perform any processing, and therefore the switched communication link is as follows: first CE device
Figure BDA0002425806010000151
First PE equipment
Figure BDA0002425806010000152
Third PE device
Figure BDA0002425806010000161
Second PE device
Figure BDA0002425806010000162
A second CE device, that is, a first CE device, sends service data to a first PE device, and then the first PE device detects a failure of a link of an active PW, and then sends the service data to a third PE device through a standby PW link, and then the third PE device sends the service data to the second PE device through an ACBypass PW virtual link, and a PW Bypass PW of the second PE device and an AC Bypass PW of the third PE device belong to the same virtual link, so that the second PE device receives the service data sent from the third PE device through the PW Bypass PW, and finally the second PE device sends the service data to the second CE device through the active AC link, and the service data flow direction thereof is also shown with reference to fig. 7b, and vice versa, thereby implementing link switching at the time of the failure of the active link, and since the bidirectional association relationship and the PW Bypass PW have been previously stored in a forwarding chip, the forwarding chip does not need to be frequently accessed when the link is switched, meanwhile, no operation is needed to be performed on a forwarding chip of the third PE device, and the link switching speed is further improved.
When the active AC link between the second PE device and the second CE device fails, please refer to fig. 7c, where the second PE device modifies the bidirectional association stored therein to the bidirectional association between the active PW link entry and the AC Bypass PW entry, or refer to fig. 6c, so that the link can be completedThe path switching operation saves the process of re-issuing the AC Bypass PW table entry to the forwarding chip, and the third PE device pre-stores the bidirectional association relationship between the PW Bypass PW table entry and the standby AC link table entry, so that the communication link realized after the link switching is: first CE device
Figure BDA0002425806010000163
First PE equipment
Figure BDA0002425806010000164
Second PE device
Figure BDA0002425806010000165
Third PE device
Figure BDA0002425806010000166
The second CE device, that is, 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, then the second PE device sends the service data to the third PE device through the AC Bypass PW virtual link, and the PW Bypass PW of the third PE device and the AC Bypass PW of the second PE device belong to the same virtual link, then the third PE device receives the service data sent by the second PE device through the PW Bypass PW, and finally the third PE device sends the service data to the second CE device through the standby AC link, and the flow direction of the service data is also shown in fig. 7c, or vice versa, thereby not only realizing the link switching when the active AC link fails, but also not requiring frequent access to the forwarding chip when the link is switched because the bidirectional association relationship and the AC Bypass PW are stored in advance in the forwarding chip, meanwhile, no operation is needed to be performed on a forwarding chip of the third PE device, and the link switching speed is further improved.
Optionally, based on any of the above embodiments, the slave PE device provided in this embodiment may also store a bidirectional association relationship between the standby link table entries and a unidirectional association relationship between the Bypass PW table entry and at least one standby link table entry.
Specifically, the bidirectional association relationship between the standby link table entries in this embodiment includes a bidirectional association relationship between the standby PW link table entry and the standby AC link table entry. The one-way association relationship between the Bypass PW table entry and at least one standby link table entry is used for representing the communication connection relationship between the Bypass PW and the standby link direction, namely, the service data on the Bypass PW virtual link can be sent to the standby link. The one-way association relationship between the Bypass PW table entry and at least one standby link table entry comprises the following steps: the method comprises the following steps that a unidirectional incidence relation between a Bypass PW table entry and a standby AC link table entry and/or a unidirectional incidence relation between the Bypass PW table entry and the standby PW link table entry. The second PE device can receive and send the service data to the outside by establishing the bidirectional association relationship and the unidirectional association relationship.
Optionally, at least one Bypass virtual link Bypass PW is configured between the master PE device and the slave PE device.
In a possible embodiment, when a Bypass virtual link Bypass PW is configured between the master PE device and the slave PE device, the Bypass virtual link Bypass PW is also called a single Bypass PW; on this basis, the one-way association stored in the slave PE device may be:
if the fault of the main PW link is maintained preferentially, the slave PE equipment prestores a one-way association relationship between a Bypass PW list item and a standby PW link list item; if the main AC link is maintained to be in failure preferentially, the slave PE equipment prestores the one-way association relationship between the BypassPW list item and the standby AC link list item.
In specific implementation, a bidirectional association relationship between the primary PW link entry and the primary AC link entry and a Bypass PW entry are previously issued to a forwarding chip of the primary PE device, as shown in fig. 8a, and correspondingly, a bidirectional association relationship between the standby PW link entry and the standby AC link entry is also previously stored in a forwarding chip of the secondary PE device, as shown in fig. 8a, and when a unidirectional association relationship is issued to the secondary PE device, a protection priority of the primary link may be considered, if the primary PW link is protected preferentially, the secondary PE device needs to set a priority of the standby AC link, that is, a unidirectional association relationship between the Bypass PW link entry and the standby PW link entry is issued from the forwarding chip of the PE device, as shown in fig. 8a, that is, a table entry association relationship diagram of the primary PW link under a fault-free scene is shown. With the arrangement of fig. 8a, communication connection from the Bypass PW virtual link to the standby PW link can be realized.
On this basis, when the active PW link fails, the active PE device may establish a bidirectional association relationship between the active AC link entry and the Bypass PW entry according to the process shown in fig. 3, and refer to fig. 8b to implement bidirectional communication between the active AC link and the Bypass PW virtual link, at this time, since the slave PE device stores the unidirectional association relationship between the Bypass PW entry and the standby PW link in advance, for convenience of illustration, it is also shown in fig. 8b, so that communication connection in the direction from the Bypass PW virtual link to the standby PW link can be implemented, so that the active PE device can send the service data received from the active AC link to the slave PE device through the Bypass PW virtual link, and then the slave PE device sends the service data to the outside by using the standby PW link, so that only the association relationship stored in the active PE device needs to be modified, and the slave PE device can quickly implement external sending of the service data without any processing, the operation of forwarding chips in the PE equipment is effectively reduced.
When the primary AC link is preferentially protected, the slave PE device needs to set the standby PW link for preferential maintenance, that is, a unidirectional association relationship between a Bypass PW link entry and a standby AC link entry is issued from a forwarding chip of the slave PE device, as shown in fig. 8c, that is, a table entry association relationship diagram preferentially protecting the primary PW link in a fault-free scenario. With the arrangement of fig. 8c, communication connection of the Bypass PW virtual link to the standby AC link can be realized. On this basis, when the primary AC link fails, the primary PE device may establish a bidirectional association relationship between the primary PW link and the Bypass PW entry according to the procedure in fig. 3, please refer to fig. 8d to implement bidirectional communication between the primary PW link and the Bypass PW virtual link, at this time, since the slave PE device stores the unidirectional association relationship between the Bypass PW entry and the standby AC link in advance, for convenience of illustration, it is also shown in fig. 8d, thereby implementing communication connection in the direction from the Bypass PW virtual link to the standby AC link, so that the primary PE device can send the service data received from the primary PW link to the slave PE device through the Bypass PW virtual link, and then the slave PE device sends the service data to the outside by using the standby AC link, so that only the association relationship stored in the primary PE device needs to be modified, and the slave PE device can quickly implement external sending of the service data without any processing, the operation of forwarding chips in the PE equipment is effectively reduced.
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 the association relationship stored by the second PE device and the third PE device is shown in fig. 8a or fig. 8 c. 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. Taking the slave PE device to preferentially maintain the standby AC link as an example for explanation, when the active PW link fails, please refer to fig. 8b for a schematic diagram of an association relationship after the switching of the master PE device, a communication link realized after the switching of the link includes a forward communication link and a reverse communication link, where the forward communication link is: first CE device → first PE device → third PE device → second CE 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 active 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 second PE device through the active 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, 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, and the flow direction of the service data thereof is also shown in fig. 9b, thereby implementing link switching when the active PW link fails, and because the bidirectional association relation and the Bypass PW table entry are issued to the forwarding chip in advance, when the PW link fails, the main AC link only needs to establish bidirectional communication with the Bypass PW table entry, and the slave PE equipment can realize the quick switching of the link without any operation and does not need to frequently access the forwarding chip.
In this scenario, if the slave PE device preferentially maintains the standby PW link, when the active PW link fails, bidirectional communication between the first CE device and the second CE device may be directly achieved through a bidirectional association relationship between the standby PW link and the standby AC link, that is, the first CE device sends service data to the first PE device, the first PE device forwards 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, or vice versa.
When the active AC link between the second PE device and the second CE device fails, please refer to fig. 9b, which illustrates an example that the slave PE device preferentially maintains the standby PW link, and when the active AC link fails, a schematic diagram of an association relationship after the switching of the master PE device is shown in fig. 8d, which illustrates a communication link implemented after the switching of the link includes a forward communication link and a reverse communication link, where 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 the active AC link fails, 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, and the flow direction of the service data also refers to fig. 9b, thereby realizing fast communication between devices after link switching, and because the bidirectional association relationship and Bypass PW entry have been issued to a forwarding chip in advance, therefore, when the primary PW link fails, only one association relation needs to be established, the slave PE equipment can realize the fast switching of the link without executing any operation, and the forwarding chip does not need to be accessed frequently.
When the slave PE device preferentially maintains the standby AC link, when the active AC link fails, the bidirectional association relationship between the standby AC link and the standby PW link may be directly used to maintain the communication between the first CE device and the second CE device.
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, the Bypass PW entry of the slave PE device also includes a PW Bypass PW entry and an AC Bypass PW entry.
On the basis, the one-way 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. Fig. 10a may be referred to as an association relationship stored in the master PE device and the slave PE device, where fig. 10a 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, the primary PE device also establishes a bidirectional association relationship between the primary AC link entry and the PWBypass PW entry, as shown in fig. 10b, and at this time, the slave PE device also maintains the initially issued association relationship, which is already shown in fig. 10 b. If the primary AC link fails, the primary PE device also establishes a bidirectional association relationship between the primary PW link entry and the AC Bypass PW entry, as shown in fig. 10c, and at this time, the secondary PE device also maintains the initially issued association relationship, which is already shown in fig. 10 c.
Specifically, the two Bypass PW virtual links of the master PE device and the slave PE device are configured as one virtual link formed by the PWBypass PW of the master PE device and the AC Bypass PW of the slave PE device, and one virtual link formed by the AC Bypass PW of the master PE device and the PW Bypass PW of the slave PE device. Specifically, when the active PW link fails, after receiving service data based on the active AC link, the active PE device sends the service to the slave PE device through the PW Bypass PW virtual link, and the slave PE device receives the service data sent by the active PE device through the AC Bypass PW and then sends the service data to the outside through the standby PW link. When the active AC link fails, the active PE device sends the service data to the slave PE device through the AC Bypass PW virtual link after receiving the service data based on the active PW, and the slave PE device receives the service data sent by the active PE device through the PW Bypass PW, and then sends the service data to the outside through the standby AC link. Thus, the link switching when the active link fails is completed.
On this basis, the data flow in the no-fault scenario may refer to the description process shown in fig. 7a, which is not described in detail herein, but only the association relationship stored by the second PE device and the third PE device is shown in fig. 10 a.
When the primary PW link fails, taking the application scenario shown in fig. 11a as an example for explanation, please refer to fig. 10b for a table entry schematic diagram after the primary PE device completes link switching according to the flow shown in fig. 3, and then the forward communication link implemented after link switching 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, because 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. 11 a. Therefore, the link can be quickly switched when the primary PW link fails, and the association relation and the table entry are issued to the forwarding chip in advance, so that the forwarding chip does not need to be frequently operated during the link switching, the secondary PE equipment does not need to execute any processing, and the link switching time is further saved.
When the active AC link between the second PE device and the second CE device fails, please refer to fig. 11b, and the table entry diagram after the main PE device completes link switching according to the flow shown in fig. 3 please refer to fig. 10c, then the forward communication link realized after link switching 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 PWBypass 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. 11 b. Therefore, the link can be quickly switched when the main AC link fails, and because the association relation and the table entry are issued to the forwarding chip in advance, the forwarding chip does not need to be frequently operated during the link switching, and the slave PE equipment does not need to execute any processing, thereby further saving the link switching time.
In another possible embodiment, the slave PE device provided in this embodiment stores a standby link table entry and a Bypass PW table entry in advance, and a bidirectional association relationship between the standby link table entries, a unidirectional association relationship between the Bypass PW table entry and at least one standby link table entry, and a unidirectional association relationship between the standby link table entry and the Bypass PW table entry are controlled by a path selection switch, so that the slave PE device can receive service data sent by the master PE device and transmit the service data to the outside.
Specifically, a plurality of path selection switches may be provided to implement the above functions, or one path selection switch may be used, but the path selection switch may implement switching of the switches on each unidirectional association relationship as required. It should be noted that, the path selection switch in this embodiment is intended to implement an association relationship between two entries that need to be communicated, and the specific structure of the path selection switch is not limited in this embodiment, and any path selection switch that can achieve the above purpose may be applied to this embodiment.
Specifically, when a Bypass PW is configured between the master PE device and the slave PE device, the unidirectional association between the Bypass PW table entry and at least one standby link table entry includes a unidirectional association between the Bypass PW table entry and the standby PW link table entry, and a unidirectional association between the Bypass PW table entry and the standby AC link table entry. The one-way association relationship between the standby link table entry and the Bypass PW table entry comprises the one-way association relationship between the standby PW link table entry and the Bypass PW table entry and the one-way association relationship between the standby AC link table entry and the Bypass PW table entry. It is noted that the unidirectional association relationship stored in the forwarding chip of the slave PE device is similar to the unidirectional association relationship description in the master PE device, and the description is not repeated here. On this basis, the unidirectional association relationship between the standby PW link entry and the standby AC link entry, and the unidirectional association relationship between the standby AC link entry and the standby PW link entry and the Bypass PW entry are controlled by the first path selection switch, the unidirectional association relationship between the standby AC link entry and the standby PW link entry, and the unidirectional association relationship between the Bypass PW entry and the main PW link entry are controlled by the second path selection switch, and the unidirectional association relationship between the Bypass PW entry and the main PW link entry is controlled by the third path selection switch, as shown in fig. 12a and fig. 12 b. In fig. 12a and 12b, the entries of the first path selection switch and the second path selection switch of the slave PE device that are turned on by default are consistent, that is, the first path selection switches are both turned on to the active AC link entry by default, and the second path selection switches are both turned on to the active PW link entry by default; the difference is that the third path selection switch in fig. 12a turns on the standby AC link table entry by default, whereas the third path selection switch in fig. 12b turns on the standby PW link table entry by default.
On this basis, when the primary PW link fails, in order to assist the primary PE device to implement service interaction between the first CE device and the second CE device, when the table entry association relationship diagram stored in the secondary PE device is shown in fig. 12a, the secondary PE device needs to switch the third path selector switch to the standby PW link table entry to establish a unidirectional association relationship between the Bypass PW table entry and the standby PW link table entry, please refer to the table entry association relationship diagram shown in fig. 12c after switching the secondary PE device, so that the service data received from the primary PE device can be sent out through the standby PW link, that is, the link switching is quickly implemented, and only the path selector switch needs to be switched, thereby greatly reducing the frequency of operating the forwarding chip; if the table entry association relationship stored in the slave PE device is schematically illustrated in fig. 12b, the slave PE device has established a unidirectional association relationship between the Bypass PW table entry and the standby PW link table entry by default, and the slave PE device can realize normal interaction between the first CE device and the second CE device without performing any switching operation when the primary PW link fails. For example, please refer to fig. 9a for describing the interaction and data flow after the link switch, which will not be described in detail herein.
When the primary AC link fails, and when the table entry association relationship diagram stored in the secondary PE device is as shown in fig. 12a, the third path selection switch turns on the standby AC link table entry by default, that is, the one-way association relationship between the Bypass PW table entry and the standby AC link table entry is established by default, and when the primary AC link fails, the secondary PE device can provide communication service without operating the table entry of the forwarding chip, and can forward the service data sent by the primary PE device, only the primary PE device needs to perform the link switching operation, and the secondary PE device does not need to operate the forwarding chip, thereby further quickly completing the link switching, and avoiding frequently operating the forwarding chip. When the table entry association relationship stored in the slave PE device is shown in fig. 12b, the slave PE device needs to switch the third path selection switch to conduct to the standby AC link table entry to establish a unidirectional association relationship between the Bypass PW table entry and the standby AC link table entry, and the switched table entry association relationship refers to fig. 12d, so that the slave PE device can send the service data forwarded by the master PE device to the outside through the standby AC link, and can also quickly implement the link switching. For example, please refer to fig. 9b for describing the interaction and data flow after the link switch, which will not be described in detail herein.
When 2 Bypass PWs are configured between the master PE device and the slave PE device, the two Bypass PWs may be called as dual Bypass PWs, and when two Bypass virtual links Bypass PWs are configured between the master PE device and the slave PE device, the Bypass PW entry of the slave PE device also includes a PW Bypass PW entry and an AC Bypass PW entry.
On the basis, the unidirectional association relationship between the Bypass PW table entry stored in the slave PE device and at least one standby link table entry includes: the method comprises the steps that a one-way incidence relation between an AC Bypass PW table entry and a standby PW link table entry and a one-way incidence relation between the PWbypass PW table entry and the standby AC link table entry are obtained; and the one-way incidence relation between the standby link table entry and the Bypass PW table entry comprises the following steps: the one-way association relationship between the standby AC link table entry and the PW Bypass table entry, and the one-way association relationship between the standby PW link table entry and the AC Bypass PW table entry. The unidirectional association relationship between the standby PW link entry and PWBypass PW entry and the standby AC link entry and AC Bypass PW entry is controlled by the fourth path selection switch, and the unidirectional association relationship between the standby AC link entry and AC Bypass PW entry and the standby PW link entry and PWBypass PW entry is controlled by the fifth path selection switch.
Specifically, please refer to fig. 13, in a default case, the fourth path selecting switch may turn on the standby AC link table entry, and only turns on the AC Bypass PW table entry when switching; the fifth path selection switch may also be turned on to the standby PW link entry by default, and only turned on to the PW Bypass PW entry when switching. On this basis, when the active PW link fails, since the AC Bypass PW entry in the slave PE device has established a unidirectional association with the standby PW link entry by default, and the AC Bypass PW in the slave PE device and the PW Bypass PW in the master PE device belong to the same virtual link, the slave PE device can provide a communication service without performing a switching operation, that is, the slave PE device can receive service data sent by the master PE device through the PW Bypass PW virtual link by using the AC Bypass PW virtual link, and then send the service data to the outside through the standby PW link, specifically, for example, a description about a related description and a data flow direction after the link switching shown in fig. 11a is described, and a description is not repeated here. When the active AC link fails, because the fourth path selection switch of the slave PE device is turned on to the standby AC link entry by default, that is, a unidirectional association relationship between the PWBypass PW entry and the standby AC link entry is established by default, and the PW Bypass PW in the slave PE device and the AC Bypass PW in the master PE device belong to the same virtual link, in this way, after the master PE device receives service data based on the active PW link, the service data may be sent to the slave PE device through the AC Bypass PW virtual link, and the slave PE device may receive service data sent by the master PE device through the PW Bypass PW virtual link and send the service data to the outside through the standby AC link, specifically, for example, description about related description and data flow direction after link switching shown in reference to fig. 11b is described, and description is not repeated here. Therefore, when the active PW link or the active AC link fails, the primary PE device only needs to execute the link switching operation according to the method provided in any of the above embodiments, and the secondary PE device does not need to execute the link switching operation, thereby greatly increasing the link switching speed and not needing to frequently operate the forwarding chip of the PE device.
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 S302, and then the primary link table entry of the failed primary link is deleted. For example, when the active PW link fails, the communication link is switched according to any method provided by the present application, and then the active PW link entry is deleted; when the active AC link fails, the communication link is switched according to any method provided by the application, and then the active AC link table entry 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 embodiments of the present application, the bidirectional association relationship between the entries of the primary links and the Bypass PW entry are stored in advance in the forwarding chip of the primary PE device, and when the primary PE device determines that any primary link fails, the bidirectional association relationship and the Bypass PW entry are directly read, then the bidirectional association relationship between the entries of the primary links and the Bypass PW entry of the failure-free primary link is re-established, and then the service data is forwarded based on the newly established bidirectional association relationship.
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. 14, fig. 14 is a communication apparatus according to an exemplary embodiment of the present application, which is disposed in a primary provider edge PE device in a two-layer virtual private network L2 VPN, where the L2 VPN further includes a secondary provider edge PE device, a Bypass virtual link Bypass PW is configured between the primary PE device and the secondary PE device, and the communication apparatus includes:
an obtaining module 1401, configured to obtain a prestored bidirectional association relationship between master link table entries and a Bypass PW table entry when determining that any master link fails;
an association relationship establishing module 1402, configured to establish a bidirectional association relationship between an entry of the primary link except the failed primary link and a Bypass PW entry;
a forwarding module 1403, configured to forward the received service data by using the established bidirectional association relationship.
In a possible embodiment, in the slave PE device in this embodiment, a bidirectional association relationship between a standby link table entry and a Bypass PW table entry is stored in advance.
In a possible embodiment, the active link in this embodiment includes an active PW link and an active AC link; the pre-stored bidirectional association relationship between the primary PW link table entry and the primary AC link table entry comprises the bidirectional association relationship between the primary PW link table entry and the primary AC link table entry; and
the association relationship establishing module 1402 is specifically configured to establish a bidirectional association relationship between an entry of the primary AC link and an entry of the Bypass PW if the primary PW link fails; if the main AC link fails, establishing a bidirectional association 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.
In a possible embodiment, when two Bypass virtual link 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; then
The association relationship establishing module 1402 is specifically configured to establish a bidirectional association relationship between an entry of the primary AC link and an entry of the PW Bypass PW if the primary PW link fails; if the main AC link fails, establishing a bidirectional association relation between the main PW link table entry and the AC Bypass PW table entry.
In a possible embodiment, the standby link of the slave PE device in this embodiment includes a standby PW link and a standby AC link; and when two Bypass virtual link Bypass PWs are configured between the main PE equipment and the slave PE equipment, the Bypass PW table entry of the slave PE equipment comprises a PW Bypass PW table entry and an AC Bypass PW table entry, and then
The bidirectional association relationship between the standby link table entry and the Bypass PW table entry pre-stored in the slave PE device includes: the bidirectional association relationship between the standby PW link table entry and the AC Bypass PW table entry and the bidirectional association relationship between the standby AC link table entry and the PWbypass PW table entry.
In a possible embodiment, the slave PE device in this embodiment stores a bidirectional association relationship between the standby link table entries and a unidirectional association relationship between the Bypass table entry and at least one standby link table entry.
In a possible embodiment, in the slave PE device in this embodiment, a standby link table entry and a Bypass PW table entry are stored in advance, and a bidirectional association relationship between the standby link table entries, a unidirectional association relationship between the Bypass PW table entry and at least one standby link table entry, and a unidirectional association relationship between the standby link table entry and the Bypass PW table entry are controlled by a path selection switch, so that the slave PE device can receive service data sent by the master PE device and transmit the service data to the outside.
The 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. 15, including a processor 1501 and a machine-readable storage medium 1502, where the machine-readable storage medium 1502 stores machine-executable instructions capable of being executed by the processor 1501, and the processor 1501 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 applied to a primary Provider Edge (PE) device in a two-layer virtual private network (L2 VPN), wherein the L2 VPN further comprises a secondary Provider Edge (PE) device, and wherein a Bypass virtual link Bypass (Bypass) PW is configured between the primary PE device and the secondary PE device, and wherein the method comprises:
when determining that any main link fails, the main PE equipment acquires a prestored bidirectional association relationship between main link table entries and a Bypass PW table entry;
and establishing a bidirectional association 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 utilizing the established bidirectional association relation.
2. The method of claim 1, wherein the slave PE device pre-stores a bidirectional association between a standby link table entry and a Bypass PW table entry.
3. The method of claim 2, wherein the active link comprises an active PW link and an active AC link; the pre-stored bidirectional association relationship between the primary PW link table entry and the primary AC link table entry comprises the bidirectional association relationship between the primary PW link table entry and the primary AC link table entry; and
establishing a bidirectional association relation between a main link table entry except the failed main link and a Bypass PW table entry, comprising the following steps:
if the main PW link fails, establishing a bidirectional association relation between the main AC link table entry and the Bypass PW table entry;
if the main AC link fails, establishing a bidirectional association relation between the main PW link table entry and the Bypass PW table entry.
4. The method of claim 3, wherein at least one Bypass virtual link Bypass PW is configured between the master PE device and the slave PE device.
5. The method of claim 4, wherein when two Bypass virtual link Bypass PWs are configured between the master PE device and the slave PE device, the Bypass PW entry of the master PE device comprises a PW Bypass PW entry and an ACBypass PW entry; then
If the primary PW link fails, establishing a bidirectional association relationship between the primary AC link table entry and the Bypass PW table entry, including:
establishing a bidirectional association relation between a main AC link table item and a PW Bypass table item;
if the main AC link fails, establishing a bidirectional association relationship between the main PW link table entry and the Bypass PW table entry, including:
and establishing a bidirectional association relation between the main PW link table entry and the AC Bypass PW table entry.
6. The method of claim 5, wherein the backup link of the slave PE device comprises a backup PW link and a backup AC link; and when two Bypass virtual link Bypass PWs are configured between the main PE equipment and the slave PE equipment, the Bypass PW table entry of the slave PE equipment comprises a PW Bypass PW table entry and an AC Bypass PW table entry, and then
The bidirectional association relationship between the standby link table entry and the Bypass PW table entry pre-stored in the slave PE device includes: the bidirectional association relationship between the standby PW link table entry and the AC Bypass PW table entry and the bidirectional association relationship between the standby AC link table entry and the PWbypass PW table entry.
7. The method of claim 1, wherein the slave PE device stores a bidirectional association between the standby link table entries and a unidirectional association between the Bypass PW entry and at least one standby link table entry.
8. The method according to claim 1, wherein the slave PE device stores a backup link table entry and a Bypass PW table entry in advance, and a bidirectional association relationship between the backup link table entries, a unidirectional association relationship between the Bypass PW table entry and at least one backup link table entry, and a unidirectional association relationship between the backup link table entry and the Bypass PW table entry are controlled by a path selection switch, so that the slave PE device can receive the service data sent from the master PE device and transmit the service data to the outside.
9. A communications apparatus, a primary provider edge PE device disposed in a two-layer virtual private network L2 VPN, the L2 VPN further comprising a secondary provider edge PE device, wherein a Bypass virtual link Bypass PW is configured between the primary PE device and the secondary PE device, and the apparatus comprising:
the acquisition module is used for acquiring a prestored bidirectional association relation between main link table entries and a Bypass PW table entry when any main link is determined to be in fault;
the incidence relation establishing module is used for establishing a bidirectional incidence relation between the table entry of the main link except the failed main link and the Bypass PW table entry;
and the forwarding module is used for forwarding the received service data by utilizing the established bidirectional association relation.
10. A facilitator edge device, comprising a processor and a machine-readable storage medium, the 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 of claims 1-8.
CN202010220185.2A 2020-03-25 2020-03-25 Communication method and device Active CN111404812B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010220185.2A CN111404812B (en) 2020-03-25 2020-03-25 Communication method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010220185.2A CN111404812B (en) 2020-03-25 2020-03-25 Communication method and device

Publications (2)

Publication Number Publication Date
CN111404812A true CN111404812A (en) 2020-07-10
CN111404812B CN111404812B (en) 2022-04-01

Family

ID=71429135

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010220185.2A Active CN111404812B (en) 2020-03-25 2020-03-25 Communication method and device

Country Status (1)

Country Link
CN (1) CN111404812B (en)

Citations (5)

* 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
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
CN109257388A (en) * 2018-11-20 2019-01-22 安徽皖通邮电股份有限公司 Pseudo-wire encryption method in a kind of MPLS-TP
CN110431810A (en) * 2017-04-06 2019-11-08 华为技术有限公司 The method and apparatus that pseudo-wire (PW) is established and safeguarded are carried out by ospf protocol

Patent Citations (5)

* 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
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
CN110431810A (en) * 2017-04-06 2019-11-08 华为技术有限公司 The method and apparatus that pseudo-wire (PW) is established and safeguarded are carried out by ospf protocol
CN109257388A (en) * 2018-11-20 2019-01-22 安徽皖通邮电股份有限公司 Pseudo-wire encryption method in a kind of MPLS-TP

Also Published As

Publication number Publication date
CN111404812B (en) 2022-04-01

Similar Documents

Publication Publication Date Title
US11323307B2 (en) Method and system of a dynamic high-availability mode based on current wide area network connectivity
CN111614553B (en) Communication method and device
CN111740898B (en) Link switching method and device and service provider edge equipment
CN106899430B (en) Traffic forwarding processing method and device
CN109861867B (en) MEC service processing method and device
CN111490932B (en) Communication method and device
CN111988222A (en) Data transmission method and device, electronic equipment and computer readable storage medium
CN111130893A (en) Message transmission method and device
CN109412980B (en) BRAS backup method and device
CN112583708B (en) Connection relation control method and device and electronic equipment
CN111404812B (en) Communication method and device
EP2445118B1 (en) Method and device for protecting service based on automatic switched optical network
CN110138656B (en) Service processing method and device
CN103931139B (en) Method and device for redundancy protection, and device and system
CN107819680A (en) A kind of method of service switchover, the network equipment
CN104717143A (en) Method and equipment for many-one reducibility scene multicast data transmission
CN111404813B (en) Communication method and device
CN111629386B (en) Communication method, system and equipment
CN111698142B (en) Message forwarding method and device, electronic equipment and storage medium
CN104917689A (en) Intelligent dial on-demand realization method and system and access router
RU2667806C2 (en) Pseudo-wire (pw) dual-homing protection switching method and system
CN106341323A (en) VRRP state synchronizing method and device
CN113726650A (en) SBFD detection method and network equipment
CN108933720B (en) Information processing method, device and system for ring system and storage medium
CN117596284B (en) Method, device, computer equipment and storage medium for data transmission

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