CN111614553B - Communication method and device - Google Patents

Communication method and device Download PDF

Info

Publication number
CN111614553B
CN111614553B CN202010220212.6A CN202010220212A CN111614553B CN 111614553 B CN111614553 B CN 111614553B CN 202010220212 A CN202010220212 A CN 202010220212A CN 111614553 B CN111614553 B CN 111614553B
Authority
CN
China
Prior art keywords
link
bypass
table entry
entry
main
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010220212.6A
Other languages
Chinese (zh)
Other versions
CN111614553A (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 CN202010220212.6A priority Critical patent/CN111614553B/en
Publication of CN111614553A publication Critical patent/CN111614553A/en
Application granted granted Critical
Publication of CN111614553B publication Critical patent/CN111614553B/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/74Address processing for routing

Abstract

The utility model provides a communication method and a device, which are applied to a main provider edge PE device in a two-layer virtual private network L2VPN, wherein the L2VPN also comprises a slave PE device, a Bypass virtual link Bypass PW is configured between the main PE device and the slave PE device, the main PE device is prestored with a main link table item and a Bypass PW table item, and the bidirectional association relationship between the main link table items, the unidirectional association relationship between the Bypass PW table item and at least one main link table item, and the unidirectional association relationship between the main link table item and the Bypass PW table item are controlled by a path selection switch, the method comprises the following steps: when determining that any main link fails, the main PE equipment establishes a bidirectional association relationship between a main link table entry except the failed main link and a Bypass PW table entry by switching a path selection switch; and forwarding the received service data by utilizing the established bidirectional association relation. Therefore, the link is switched rapidly, and the forwarding chip in the PE equipment does not need to be operated frequently.

Description

Communication method and device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a communication method and apparatus.
Background
With the continuous development of networks, the reliability of networking is more and more important. Generally, a virtual link (PW) redundancy technique may be utilized to improve the reliability of the network. In an existing two-Layer Virtual Private Network (L2 VPN), a first Customer Edge (CE) device, a second customer Edge device, a first Provider Edge (PE) device, a second Provider Edge device, and a third Provider Edge device are included, where the second PE device and the third PE device are each a master device and a standby device, a Bypass Virtual link (Bypass PW) is configured between the second PE device and the third PE device, and when the second PE device is a master PE device, the first CE device may sequentially perform service traffic with the first PE device, the second PE device, and the second CE device, where a link between the first PE device and the second PE device may be referred to as a PW link, and a link between the second CE device and the second PE device may be referred to as an AC link. When the PW link or the AC link fails, the traffic between the first CE equipment and the second CE equipment can be realized through the Bypass PW.
However, in the prior art, when a PW link fails or an AC link fails, when performing Bypass PW switching, a manner of deleting and then adding is adopted, and the entry is stored in a forwarding chip of the PE device. When the primary PW fails, the primary PW table entry in the forwarding chip is deleted, and then the primary AC table entry and the Bypass PW table entry are associated and added into the forwarding chip. When the main AC fails, the main AC table entry in the forwarding chip is deleted, and then the main PW table entry and the Bypass PW table entry are associated and added into the forwarding chip, that is, when a link is to be switched each time a failure occurs, the Bypass PW is activated and then can be issued to the forwarding chip, so that hardware table entries in the forwarding chip are frequently operated, time is consumed, and the PW protection switching performance is influenced.
Therefore, how to quickly restore the communication link between CE devices upon PW link failure or AC link failure, and reducing frequent operations on the forwarding chip is one of considerable issues.
Disclosure of Invention
In view of this, the present application provides a communication method and apparatus, which are used to quickly recover a communication link between CE devices when an active link fails, and reduce frequent operations on a forwarding chip.
Specifically, the method is realized through the following technical scheme:
according to a first aspect of the present application, a communication method is provided, which is applied to a primary provider edge PE device in a two-layer virtual private network L2VPN, where the L2VPN further includes a secondary provider edge PE device, where a Bypass virtual link Bypass PW is configured between the primary PE device and the secondary PE device, a primary link entry and a Bypass PW entry are pre-stored in the primary PE device, and a bidirectional association relationship between the primary link entries, a unidirectional association relationship between the Bypass PW entry and at least one primary link entry, and a unidirectional association relationship between the primary link entry and the Bypass PW entry are controlled by a path selection switch, and the method includes:
when determining that any main link fails, the main PE equipment establishes a bidirectional association relationship between a main link table entry except the failed main link and a Bypass PW table entry by switching a path selection switch;
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, which is disposed in a primary provider edge PE device in a L2VPN of a two-layer virtual private network, where the L2VPN further includes a secondary provider edge PE device, where a Bypass virtual link Bypass PW is configured between the primary PE device and the secondary PE device, a primary link entry and a Bypass PW entry are pre-stored in the primary PE device, and a bidirectional association relationship between the primary link entries, a unidirectional association relationship between the Bypass PW entry and at least one primary link entry, and a unidirectional association relationship between the primary link entry and the Bypass PW entry are controlled by a path selection switch, and the apparatus includes:
the incidence relation establishing module is used for establishing a bidirectional incidence relation between the main link table entry except the main link with the fault and the Bypass PW table entry by switching the path selection switch when the fault of any main link is determined;
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:
according to the communication method and device provided by the embodiment of the application, the forwarding chip of the PE device stores the related table entry for realizing interaction between the first CE device and the second CE device in advance, so that when the primary link fails, the purpose of establishing the temporary forwarding path is realized only by switching the path selection switch, and then the communication link between the CE devices is recovered quickly, that is, the link switching time is saved, and meanwhile, the table entry is stored in advance, so that the forwarding chip in the PE device does not need to be operated frequently, the pressure of the forwarding chip in the PE device is reduced, and the problem of larger hardware development caused by frequently operating the forwarding chip in the prior art is solved.
Drawings
Fig. 1 is a schematic diagram of a layer two virtual private network L2VPN networking according to an exemplary embodiment of the present application;
FIG. 2 is a block diagram of a facilitator edge facility 200, according to an exemplary embodiment of the present disclosure;
FIG. 3 is an interaction flow diagram illustrating a method of communication according to an exemplary embodiment of the present application;
fig. 4a is a table entry reference diagram illustrating that a single Bypass PW scene has no failure and preferentially maintains an active PW link according to an exemplary embodiment of the present application;
fig. 4b is a table entry reference diagram illustrating that no fault exists and the master AC link is preferentially maintained in a single Bypass PW scene according to an exemplary embodiment of the present application;
fig. 4c is a reference diagram illustrating an entry association relationship after switching of a primary PE device when a primary PW link fails in a single Bypass PW scene according to an exemplary embodiment of the present application;
fig. 4d is a reference schematic diagram illustrating another table entry association relationship after switching of a primary PE device when a primary PW link fails in a single Bypass PW scene according to an exemplary embodiment of the present application;
fig. 4e is a reference schematic diagram illustrating an entry association relationship after switching of a primary PE device when a primary AC link fails in a single Bypass PW scene according to an exemplary embodiment of the present application;
fig. 4f is a reference schematic diagram illustrating another table entry association relationship after the switching of the primary PE device when the primary AC link fails in a single Bypass PW scene according to an exemplary embodiment of the present application;
fig. 5a is a table entry reference diagram of a primary PE device in a fault-free situation in a dual Bypass PW scenario according to an exemplary embodiment of the present application;
fig. 5b is a schematic diagram illustrating an entry association relationship after switching of a primary PE device when a primary PW link fails in a dual Bypass PW scene according to an exemplary embodiment of the present application;
fig. 5c is a schematic diagram illustrating an entry association relationship after switching of a primary PE device when a primary AC link fails in a dual Bypass PW scenario according to an exemplary embodiment of the present application;
fig. 6a 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. 6b 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. 6c 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. 6d 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. 7a 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. 7b 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. 7c 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. 8a is a reference diagram illustrating an entry association relationship in a slave PE device in a dual Bypass PW scenario according to an exemplary embodiment of the present application;
fig. 8b 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. 8c 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. 8d 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. 9a is a schematic diagram illustrating a data flow when both an active PW link and a standby PW link fail in a dual Bypass PW scene according to an exemplary embodiment of the present application;
fig. 9b is a schematic diagram illustrating a data flow when both the active AC link and the standby AC link fail in a dual Bypass PW scenario according to an exemplary embodiment of the present application;
FIG. 10a is a diagram illustrating another table entry association relationship reference diagram in the case of no failure in a dual Bypass PW scenario according to an exemplary embodiment of the present application;
fig. 10b is a reference schematic diagram illustrating another table entry association relationship after switching of a primary PE device 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 schematic diagram illustrating another table entry association relationship after switching of a primary PE device when a primary AC link fails in a dual Bypass PW scenario according to an exemplary embodiment of the present application;
fig. 11a is a schematic diagram illustrating another table entry association relationship stored from a PE device in a single Bypass PW scenario according to an exemplary embodiment of the present application;
fig. 11b is a schematic diagram illustrating another data flow when a link of an active PW fails in a single Bypass PW scene according to an exemplary embodiment of the present application;
fig. 11c is a schematic diagram illustrating another data flow when a primary AC link fails in a single Bypass PW scenario according to an exemplary embodiment of the present application;
fig. 12a is a reference diagram illustrating another table entry association relationship stored from a PE device in a dual Bypass PW scenario according to an exemplary embodiment of the present application;
fig. 12b is a schematic diagram illustrating another data flow when a link of an active PW fails in a dual Bypass PW scenario according to an exemplary embodiment of the present application;
fig. 12c is a schematic diagram illustrating another data flow when a primary AC link fails in a dual Bypass PW scenario according to an exemplary embodiment of the present application;
fig. 13a is a reference diagram illustrating another table entry association relationship stored from a PE device in a single Bypass PW scenario according to an exemplary embodiment of the present application;
fig. 13b is a reference diagram illustrating another table entry association relationship stored from a 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 represented by a dashed line when illustrated in the drawings, and an available link is represented by a solid line, for example, as shown in fig. 4a, the dashed line represents that an association relationship is not established with an entry indicated by the dashed line, and similarly, other drawings refer to the description, and a detailed description is omitted. Or, if the primary PW link fails, the primary PW link entry is indicated by a dotted line when illustrated schematically, and the association relationship between the primary PW link entry and the primary AC link entry is also indicated 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. Both the master PE device and the slave PE device have a master path and a backup path.
Referring to fig. 1, a L2VPN networking in a layer two virtual private network provided in an embodiment of the present application includes two selectable transmission links, a primary link and a standby link, where a first CE device may perform inter-service communication with a second CE device through the primary link or the standby link. The active link is a link established between the primary PE device and the first CE device, and the second CE device, and the standby link is a link established between the secondary PE device and the first CE device, and the second CE device. And at least one Bypass pseudo wire of Bypass PW is configured between the main PE equipment and the slave PE equipment, main link table entries and Bypass PW table entries are pre-stored in a forwarding chip of the main PE equipment, and the unidirectional incidence relation between the main link table entries, the bidirectional incidence relation between the Bypass PW table entries and at least one main link table entry, and the unidirectional incidence relation between the main link table entries and the Bypass PW table entries are controlled by a path selection switch. On the basis, when the main PE equipment determines that any main link corresponding to the main PE equipment has a fault, the two-way incidence relation between the main link table items except the main link with the fault and the Bypass PW table item is established by switching the path selection switch, and the received service data is forwarded by utilizing the established two-way incidence relation; because the forwarding chip of the PE device stores the relevant table entry for realizing the interaction between the first CE device and the second CE device in advance, when the primary link fails, the purpose of establishing the temporary forwarding path is realized only by switching the path selection switch, and then the communication link between the CE devices is quickly recovered, and meanwhile, the table entry is stored in advance, so that the forwarding chip in the PE device does not need to be frequently operated, thereby solving the problem of larger hardware development caused by frequently operating the forwarding chip in the prior art.
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 flow of the main PE device implementing the communication method may be implemented according to the following steps:
s301, when determining that any one main link fails, the main PE device switches a path selection switch to establish a bidirectional association relationship between the main link table entry except the failed main link and the Bypass PW table entry.
In specific implementation, in this embodiment, the main link table entry and the Bypass PW table entry are issued to the forwarding chip of the main PE device in advance, and the unidirectional association relationship between the main link table entries, the unidirectional association relationship between the Bypass PW table entry and at least one main link table entry, and the unidirectional association relationship between the main link table entry and the Bypass PW table entry are controlled by the path selection switch. Specifically, the establishment of the bidirectional association relationship between the main link table entries, the establishment of the unidirectional association relationship between the main link table entries and the Bypass PW table entries, and/or the unidirectional association relationship between the main link table entries and the Bypass PW table entries can be realized by switching the path selection switch. Therefore, when the main PE equipment determines that the main link where the main PE equipment is located has a fault, the path selection switch can be directly switched to establish the bidirectional association relation between the main link table entry except the fault main link and the Bypass PW table entry in the forwarding chip of the main PE equipment.
It should be noted that, in this embodiment, the unidirectional association between the entry of the main link and the entry of the Bypass PW refers to a connection relationship between the main link and the communication direction of the Bypass PW virtual link, and the unidirectional association between the entry of the Bypass PW entry and the entry of the main link is used to represent the communication link from the Bypass PW virtual link to the main link.
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.
It should be noted that, under the condition that the primary link has no failure, the path selection switch may be controlled to implement the bidirectional association relationship between the primary links, so that the bidirectional association relationship may be used to implement data interaction when the primary link has no failure, that is, as described with reference to fig. 1, under the condition that the primary link is normal, when the first CE device interacts with the second CE device, the first PE 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 the sending of the service data, and similarly, when the second CE device replies with the first CE device with the response data, because the association relationship established by the primary PE device is bidirectional, therefore, the second CE device can be realized by the reverse transmission from the main PE device, the first PE device to the first CE device, and further, the traffic between the first CE device and the second CE device is realized.
In this step, because the primary link of the primary PE device fails, that is, the bidirectional association relationship between the primary link table entries formed between the primary links cannot be used in the default case, the communication between the first CE device and the second CE device is interrupted. Therefore, in order to realize the switching of the path rapidly, in this step,
after the bidirectional association relation and the Bypass PW table entry are obtained, the bidirectional association relation between the main link table entry except the failed main link and the Bypass PW table entry is established, so that the main PE equipment can utilize the non-failed main link table entry and the Bypass PW table entry to realize communication between the first CE equipment and the second CE equipment, namely, the main PE equipment transmits service data to a Bypass PW virtual link based on the non-failed main link and then transmits the service data to the slave PE equipment 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.
S302, the main PE equipment forwards the received service data by using the established bidirectional association relation.
Specifically, by switching the path selection switch, bidirectional communication between the main link except the failed main link and the Bypass PW virtual link is realized, so that the main PE device can send the service data received based on the main link except the failed main link to the outside through the Bypass PW virtual link, and can send the service data received based on the Bypass PW virtual link to the outside through the main link except the failed main link, that is, quick switching of the communication link is realized. By implementing the flow shown in fig. 3, since the table entry is previously issued to the forwarding chip, when the primary link fails, the path can be quickly switched by controlling the path selection switch, and the forwarding chip of the PE device does not need to be frequently operated, and meanwhile, smooth communication between the first CE device and the second CE device is also achieved.
Optionally, the active link provided in this embodiment of the present application includes an active PW link and an active AC link; specifically, referring to fig. 1, the active PW link refers to a link established between 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 in the primary PE device refers to the bidirectional association relationship between the primary PW link entry and the primary AC link entry.
Then, when implementing step S301, the following procedure may be implemented:
if the main PW link fails, establishing a bidirectional association relation between the main AC link table entry and the Bypass PW table entry by switching a path selection switch;
if the main AC link fails, the bidirectional association relation between the main PW link table entry and the Bypass PW table entry is established by switching the path selection switch.
In specific implementation, when the active PW link fails, that is, when a link between the first PE device and the active PE device in fig. 1 fails, the active PE device needs to switch the path selection switch to establish a bidirectional association relationship between the active AC link entry of the active AC link and the Bypass PW entry in order to implement a service transaction between the first CE device and the second CE device, so as to establish a communication connection between the active AC link and the Bypass PW virtual link. And then combines the communication connection provided by the PE device to realize the communication between the first CE device and the second CE device. And the communication connections provided from the PE devices are described in detail below.
Similarly, when the active AC link fails, that is, a link between the second CE device and the primary 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 primary PE device needs to switch the path selection switch to establish a bidirectional association relationship between the active PW link entry and the Bypass PW entry, so that a communication connection between the active PW link and the Bypass PW virtual link is established, and then, the communication transaction between the first CE device and the second CE device can be implemented by combining the communication connection provided by the secondary PE device. And the communication connections provided from the PE devices are described in detail below.
Based on any of the above embodiments, in the embodiment of the present application, at least one Bypass virtual link Bypass PW is configured between a master PE device and a slave PE device, 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 unidirectional association between a master PW link entry provided in this embodiment and a master AC link entry and a Bypass PW entry respectively is controlled by a first path selection switch, a unidirectional association between a master AC link entry and a master PW link entry and a Bypass PW entry respectively is controlled by a second path selection switch, and a unidirectional association between a Bypass PW entry and a master PW link entry and a master AC link entry respectively is controlled by a third path selection switch.
When the primary PE device preferentially maintains the primary PW link, please refer to fig. 4a, in a default case, the first path selection switch may be turned on to the primary AC link entry, thereby implementing a unidirectional association relationship (primary path) between the primary PW link entry and the primary AC link entry, which may be understood as that communication in a direction from the primary PW link to the primary AC link is a primary communication path; when the active AC link fails, the first path selection switch may be switched, that is, switched to the Bypass PW table entry, so as to implement a unidirectional association relationship (standby path) between the active PW link table entry and the Bypass PW table entry, which may be understood as that communication in the direction from the active PW link to the Bypass PW virtual link is a standby communication path, and of course, the first path selection switch may be conducted to the Bypass PW table entry in a default condition, which may be specifically determined according to an actual situation, but is preferably conducted to the active AC link table entry in a default condition. Similarly, under the default condition, the second path selection switch is conducted to the main PW link table entry, so that the one-way association relation (main path) between the main AC link table entry and the main PW link table entry is realized; when the primary PW has a fault, the second path selection switch is switched to conduct the second path selection switch to the Bypass PW table entry, that is, a unidirectional association relationship (standby path) between the primary AC link table entry and the Bypass PW table entry is realized, and of course, the second path selection switch may also conduct the Bypass PW table entry by default. Regarding the unidirectional association relationship between the Bypass PW table entry and the primary AC link table entry or the primary PW link table entry, a link protection priority may be set, if the primary PW link is protected preferentially, the third path selection switch turns on the primary AC link table entry by default, that is, the unidirectional association relationship between the Bypass PW table entry and the primary AC link table entry, that is, the association relationship shown in fig. 4a, is established by default; if the active AC link is preferentially protected, the third path selection switch may default to turn on the active PW link entry, please refer to fig. 4b, that is, a one-way association relationship between the Bypass PW entry and the active PW link entry is established by default, and in addition, in the default case, the entry in which the first path selection switch and the second path selection switch are turned on by default in fig. 4b is consistent with fig. 4 a. Of course, the third path selection switch may not be set as described above, and may be determined according to actual situations. For convenience of description, fig. 4a is taken as an example for illustration.
On this basis, when the path selection switch is switched to establish the bidirectional association relationship between the main AC link table entry and the Bypass PW table entry, the following process may be implemented: if the primary PW link fails, establishing a bidirectional association relation between a primary AC link table entry and a Bypass PW table entry by switching the second path selection switch and/or the third path selection switch; and if the main AC link fails, establishing a bidirectional association relation between the main PW link table entry and the Bypass PW table entry by switching the first path selection switch and/or the third path selection switch.
Specifically, when the primary PW link fails, it indicates that the unidirectional association relationship between the primary PW table entry and other table entries in fig. 4a is temporarily unavailable, and in order to quickly implement link switching, the second path selection switch may be switched and turned on to the Bypass PW table entry, so that the unidirectional association relationship between the primary AC link table entry and the Bypass PW table entry is established, because the third path selection switch is turned on to the primary AC link table entry by default, that is, the unidirectional association relationship between the Bypass PW table entry and the primary AC link table entry is established by default, the bidirectional association relationship between the primary AC link table entry and the Bypass PW table entry may be implemented without switching, and the association relationship after switching is shown in fig. 4 c. However, when the third path selection switch is turned on to the active PW link entry by default, that is, the entry diagram of the active AC link is maintained preferentially in fig. 4b, when the active PW link fails, the third path selection switch needs to be switched in addition to the second path selection switch, that is, the third path selection switch in fig. 4b needs to be switched to the active AC link entry, as shown in fig. 4 d; if the second path selection switch is conducted to the Bypass PW table entry in the default condition, and the third path selection switch is conducted to the main PW link table entry in the default condition, when the main PW link fails, the second path selection switch does not need to be switched, only the third path selection switch needs to be switched, and the method is specifically determined according to the table entry in which the three path selection switches are conducted in the default condition. On this basis, when the active PW link fails, the primary PE device can receive service data sent by the second CE device based on the active AC link, then send the received service data to the secondary PE device through the Bypass PW virtual link, send the received service data to the first PE device by the secondary PE device, and then reach the first CE device, otherwise, the secondary PE device can receive the service data of the first CE device forwarded by the first PE device, then send the service data to the primary PE device through the Bypass PW virtual link, and then send the received service data to the second CE device through the active AC link, so that communication between the first CE device and the second CE device can be achieved, that is, link switching when the active PW link fails is achieved. In addition, because the table entries are stored in the main PE device in advance, the link switching can be realized only by switching the path selection switch, the forwarding chip does not need to be operated frequently, and the pressure of the forwarding chip is greatly reduced.
When the primary AC link fails, the association relationship between the primary PW table entry and the primary AC link table entry is temporarily unavailable, and the association relationship between the primary AC link table entry and the Bypass PW table entry is also unavailable, in order to quickly implement link switching, as shown in fig. 4a, the first path selection switch may be switched to conduct the first path selection switch to the Bypass PW table entry, that is, to establish a unidirectional association relationship between the primary PW link table entry and the Bypass PW table entry, and to switch the third path selection switch to conduct the third path selection switch to the primary PW link table entry to establish a unidirectional association relationship between the Bypass PW table entry and the primary PW table entry, so that a bidirectional association relationship between the primary PW link table entry and the Bypass PW table entry is formed, and the switched association relationship is shown in fig. 4 e. However, when the Bypass PW table entry is turned on by default by the first path selection switch, the establishment of the bidirectional association relationship between the main PW link table entry and the Bypass PW table entry can be realized only by switching the third path selection switch without switching the first path selection switch when the main AC link fails; or, when the third path selection switch is turned on to the active PW link entry by default, that is, as shown in fig. 4b, when the active AC link fails, only the first path selection switch needs to be switched to turn on the first path selection switch to the Bypass PW entry, so that the establishment of the bidirectional association relationship between the active PW link entry and the Bypass PW entry can also be implemented, and a table entry association relationship diagram after switching based on fig. 4b is shown in fig. 4 f. On this basis, when the active AC link fails, the primary PE device can receive, based on the active PW link, service data sent by the first CE device forwarded by the first PE device, then send the received service data to the secondary PE device through the Bypass PW virtual link, and send the received service data to the second CE device by the secondary PE device, otherwise, the secondary PE device can receive service data sent by the second CE device, then send the service data to the primary PE device through the Bypass PW virtual link, then the primary PE device sends the received service data to the first PE device through the active PW link, and further forward the service data to the first CE device by the first PE device, so that communication between the first CE device and the second CE device can be implemented, that is, link switching when the active PW link fails is implemented. In addition, because the table entries are stored in the main PE device in advance, the link switching can be realized only by switching the path selection switch, the forwarding chip does not need to be operated frequently, and the pressure of the forwarding chip is greatly reduced.
For convenience of description, in the following description, the first path selection switch turns on the active AC link entry by default, the second path selection switch turns on the active PW link entry by default, and the third path selection switch turns on the active AC link entry by default, that is, the description is performed according to the association shown in fig. 4 a.
In another 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 dual Bypass PWs, 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; the unidirectional association relationship between the main PW link table entry and PW Bypass PW table entry and the main AC link table entry and AC Bypass PW table entry respectively is controlled by the fourth path selection switch, and the unidirectional association relationship between the main AC link table entry and AC Bypass PW table entry and the main PW link table entry and PW Bypass PW table entry respectively is controlled by the fifth path selection switch.
It should be noted that the two Bypass PW virtual links of the master PE device and the slave PE device are configured as a virtual link formed by the PW Bypass PW of the master PE device and the AC Bypass PW of the slave PE device, and a virtual link formed by the AC Bypass PW of the master PE device and the PW Bypass PW of the slave PE device.
Specifically, referring to fig. 5a, by default, the fourth path selection switch may be turned on to the primary AC link entry, that is, a unidirectional association relationship between the primary PW link entry and the primary AC link entry and a unidirectional association relationship between the PW Bypass PW entry and the primary AC link entry can be implemented. Similarly, the fifth path selection switch can be turned on to the active PW link by default, that is, a unidirectional association relationship between the active AC link entry and the active PW link entry and a unidirectional association relationship between the AC Bypass PW link entry and the active PW link entry can be achieved.
On this basis, when the path selection switch is switched to establish the bidirectional association relationship between the main AC link table entry and the Bypass PW table entry, the following process may be implemented: if the primary PW link fails, establishing a bidirectional association relation between a primary AC link table entry and a PW Bypass PW table entry by switching a fourth path selection switch and/or a fifth path selection switch; if the main AC link fails, the fourth path selection switch and/or the fifth path selection switch are/is switched to establish the bidirectional association relationship between the main PW link table entry and the AC Bypass PW table entry.
Specifically, when the primary PW link fails, it indicates that the unidirectional association relationship connected to the primary PW link entry in fig. 5a cannot provide communication service, in order to implement communication service, the fifth path selection switch needs to be switched to the PW Bypass PW entry to establish the unidirectional association relationship between the primary AC link entry and the PW Bypass PW entry, because the fourth path selection switch remains unchanged, the unidirectional association relationship between the PW Bypass PW entry and the primary AC link entry is already established, that is, the bidirectional association relationship between the primary AC link entry and the Bypass PW entry is established, and the switched entry association diagram is shown in fig. 5 b. If the fourth path selection switch is turned on by the AC Bypass PW table entry in the default condition, and the turning-on relationship of the fifth path selection switch also refers to fig. 5a, when the active PW link fails, the fourth path selection switch needs to be switched in addition to the switching of the fifth path selection switch, so that the fourth path selection switch is switched to the active AC link table entry; if the fourth path selection switch is conducted to the AC Bypass PW table entry and the fifth path selection switch is conducted to the PW Bypass PW table entry by default, when the active PW link fails, only the fourth path selection switch needs to be switched, that is, the fourth path selection switch is switched to the active AC link table entry, so as to implement the establishment of the association relationship. But the default is preferred to the path selection switch on-state shown in fig. 5 a. After the bidirectional association relationship between the active AC link and the PW Bypass PW entry is established based on the above description, the active PE device receives service data sent by the second CE device based on the active AC link, and then sends the service data to the slave PE device through the PW Bypass PW virtual link, and then the slave PE device sends the service data to the first CE device through the first PE device, and vice versa.
Similarly, when the primary AC link fails, as shown in fig. 5a, it is characterized that the unidirectional association between the entries connected to the primary AC link entry cannot provide communication service, and in order to implement link switching, a fourth path selection switch needs to be switched to establish the unidirectional association between the primary PW link entry and the AC Bypass PW entry, at this time, the fifth path selection switch is turned on to the primary PW link entry by default, so that the fifth path selection switch does not need to be switched, so that the bidirectional association between the primary PW link entry and the AC Bypass PW entry can be implemented, and a schematic diagram of the association between the switched entries is shown in fig. 5 c. If the second path selection switch is conducted to the PW Bypass PW table entry by default, when the primary AC link fails, the fifth path selection switch needs to be switched in addition to the fourth path selection switch, so as to establish a bidirectional association relationship between the AC Bypass PW table entry and the primary PW link table entry; and if the fourth path selection switch is conducted to the AC Bypass PW table entry and the fifth path selection switch is conducted to the PW Bypass PW table entry by default, when the primary AC link fails, only the fifth path selection switch needs to be switched, so as to implement establishment of the bidirectional association relationship between the AC Bypass PW table entry and the primary PW link table entry. On this basis, after receiving the service data sent by the first CE device forwarded by the first PE device based on the active PW link, the active PE device sends the service data to the slave PE device through the AC Bypass PW virtual link, and then the slave PE device forwards the service data to the second CE device, or vice versa.
Based on any of the above embodiments, since the Bypass PW is a communication link between the master PE device and the slave PE device, and needs the slave PE device to participate in communication between the first CE device and the second CE device, a forwarding chip of the slave PE device also stores a relevant table entry in advance, and several possible embodiments are given below.
In a possible embodiment, the slave PE device provided in this application embodiment also 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, where the path selection switch in the master PE device is used in cooperation with the path selection switch of the slave PE device, so that the slave PE device transmits service data to the outside after receiving the service data sent by the master PE device.
Specifically, 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. Accordingly, the bidirectional association between the standby link table entries stored in the slave PE device is the bidirectional association between the standby PW link table entry and the standby AC link table entry.
When a Bypass PW is configured between the main PE device and the auxiliary PE device, the unidirectional association relationship between the Bypass PW table entry and at least one standby link table entry comprises the unidirectional association relationship between the Bypass PW table entry and the standby PW link table entry and the unidirectional association relationship 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 sixth 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 seventh path selection switch, and the unidirectional association relationship between the Bypass PW entry and the main PW link entry is controlled by the eighth path selection switch, please refer to fig. 6a and fig. 6 b. In fig. 6a and 6b, the entries of the sixth path selecting switch and the seventh path selecting switch of the slave PE device that are turned on by default are the same, that is, the sixth path selecting switch is turned on to the active AC link entry by default, and the seventh path selecting switch is turned on to the active PW link entry by default; the difference is that the eighth path select switch in fig. 6a turns on the standby AC link table entry by default, while the eighth path select switch in fig. 6b 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. 6a, the secondary PE device needs to switch the eighth path selection 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. 6c 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 selection 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. 6b, 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 does not need to perform any switching operation when the primary PW link fails, so that the slave PE device can provide communication service, and the slave PE device can implement fast link switching without operating a forwarding chip, thereby further reducing the operating frequency of the forwarding chip.
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. 6a, the eighth 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. 6b, the slave PE device needs to switch the eighth 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 is shown in fig. 6d, 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.
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. 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 first PE device and the second PE device fails, referring to the scenario diagram shown in fig. 7b, after the second PE device executes link switching according to the flow shown in fig. 3, taking the switched entry association relationship as an example for explaining the switching method shown in fig. 4c, or performing switching according to the manner provided by the primary PW link failure shown in any of the foregoing embodiments, a bidirectional association relationship between the primary AC link entry and the Bypass PW entry is established, if the stored entry association relationship of the third PE device is shown in fig. 6a, it is necessary to switch the eighth path selection switch, to establish a unidirectional association relationship between the Bypass PW entry and the standby PW link entry, the switched entry association relationship is shown in fig. 6c, or, if the entry association relationship stored in the third PE device is shown in fig. 6b, the third PE device does not need to perform the link switching operation; the communication link realized after performing the link switching includes a forward communication link and a reverse communication link, where the forward communication link after 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. 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, and then the third PE device sends the response data to the first PE device through the standby PW link, and the first PE device forwards the response data to the first CE device, thereby a link switch at the time of the PW link failure can be implemented, and a data flow direction is also shown in fig. 7b, and because the bidirectional association relation and the unidirectional association relation are issued to the forwarding chip in advance, when the PW link fails, the link can be quickly switched only by switching the path selection switch, and the forwarding chip does not need to be frequently accessed.
When the active AC link between the second PE device and the second CE device fails, as shown in fig. 7c, after the second PE device performs link switching according to the flow shown in fig. 3, a bidirectional association relationship between the active PW link entry and the Bypass PW entry is established after the switching, a schematic diagram of the switched entry may be as shown in fig. 4e or fig. 4f, if the stored entry association relationship of the third PE device is as shown in fig. 6a, it is not necessary to perform link switching operation, and a unidirectional association relationship between the Bypass PW entry and the standby AC link entry is already established by default, or, if the stored entry association relationship in the third PE device is as shown in fig. 6b, the third PE device needs to switch the eighth path selection switch, and the switched entry association relationship is as shown in fig. 6d, which may also implement the establishment of the unidirectional association relationship. The communication link realized after performing the link switching includes a forward communication link and a reverse communication link, where the forward communication link after 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. Specifically, a first CE device sends service data to a first PE device, then the first PE device sends the service data to a second PE device through an active PW link, because of the failure of the active AC link, the second PE device sends the service data to a third PE device through a Bypass PW virtual link, then the third PE device sends the service data to the second CE device through a standby AC link, when the second CE device responds to the first CE device, the second CE device sends response data to the third PE device through the standby AC link, then the third PE device sends response data to the first PE device through the standby PW link, and finally the first PE device sends the response data to the first CE device, thereby realizing the rapid communication between the devices after the link switching, and because the bidirectional association relation and the unidirectional association relation are issued to a forwarding chip in advance, therefore, when the AC link fails, the main circuit can realize the fast switching of the link only by switching the path selection switch without frequently accessing the forwarding chip.
However, when 2 Bypass PWs are configured between the master PE device and the slave PE device, they may be called dual Bypass PWs, and 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 slave PE device also includes PW Bypass PW entry and 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 unidirectional incidence relation between the AC Bypass PW list item and the standby PW link list item and the unidirectional incidence relation between the PW Bypass PW list item and the standby AC link list item 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 PW Bypass PW entry and the standby AC link entry and AC Bypass PW entry respectively is controlled by the ninth 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 PW Bypass PW entry respectively is controlled by the tenth path selection switch.
Specifically, please refer to fig. 8a, in a default case, the ninth 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 tenth 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, because the entry of the AC Bypass PW in the slave PE device has established a unidirectional association with the entry of the standby PW link 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 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. When the active AC link fails, the ninth 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 PW Bypass 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. Therefore, when the primary PW link or the primary AC link fails, the link switching is realized only by switching the path selection switch by the primary PE equipment, and the secondary PE equipment does not need to execute the link switching operation, so that the link switching speed is greatly increased, and a forwarding chip of the PE equipment does not need to be frequently operated.
For better understanding of the present embodiment, a dual Bypass PW virtual link scenario shown in fig. 8b is taken as an example to describe, 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. The table entry stored by the forwarding chip of the second PE device is shown in fig. 5a, and the table entry association relationship stored by the forwarding chip of the third PE device is shown in fig. 8a, and in a scenario where the primary link has no fault, the service data interaction between the first CE device and the second CE device may refer to fig. 7a, 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. 8c, a table entry association relationship diagram after the link of the second PE device is switched please refer to fig. 5b, a table entry association relationship of the third PE device please refer to fig. 8a, and the third PE device does not need to switch the table entry association relationship, and then the forward communication link after 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 the 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, where the ninth path selection switch of the third PE device switches on the unidirectional association relationship between the standby PW link entry and the standby AC link entry by default, so that the third PE device can send the service data to the second CE device through the standby AC link; when the second CE device sends the service data, since the active AC link is not faulty, the service data is sent to the second PE device through the active AC link, then the second PE device sends the service data to the third PE device through the PW Bypass PW virtual link, and the third PE device receives the service data through the AC Bypass PW of the same virtual link, then sends the service data to the first PE device through the standby PW link, and finally sends the service data to the first CE device by the first PE device, so that bidirectional communication between the first CE device and the second CE device is implemented, and the flow direction of the service data is also shown in fig. 8 c. Therefore, the link can be switched quickly when the primary PW link fails, and the link can be switched only by switching the path selection switch through the second PE device and without executing switching operation of the third PE device because the association relation is issued to the forwarding chip in advance, so that the forwarding chip does not need to be operated frequently during link switching, and the link switching time is effectively saved.
When the active AC link between the second PE device and the second CE device fails, please refer to fig. 8d, a table entry association relationship diagram after the link of the second PE device is switched please refer to fig. 5c, a table entry association relationship of the third PE device please refer to fig. 8a, the third PE device does not need to perform the table entry association relationship switching, and the forward communication link after the 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 PW Bypass PW of the third PE device can receive the service data and finally sends the service data to the second CE device through the standby AC link; during reverse communication, the second CE device directly feeds back service data through the standby AC link, and since the tenth path selection switch turns on the unidirectional association relationship between the standby AC link entry and the standby PW link entry by default, the third PE device may directly feed back the service data of the second CE device to the first PE device through the standby PW link, 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. 8 d. Therefore, the link switching when the main AC link fails is also quickly realized, and the link switching can be realized only by switching the path selection switch through the second PE device and without executing the switching operation through the third PE device because the association relation is issued to the forwarding chip in advance, so that the forwarding chip is not required to be frequently operated during the link switching, and the link switching time is effectively saved.
Further, when 2 Bypass PW virtual links are configured between the master PE device and the slave PE device, there may be an extreme case, that is, a scenario where both the master PW link and the backup PW link fail, in this case, as shown in fig. 9a, when the second CE device sends service data to the master PE device, if link switching is performed according to the table switching condition in fig. 8c, a loop is formed between the master PE device and the slave PE device, that is, the second CE device sends service data to the master PE device through the master AC link, the master PE device sends service data to the slave PE device through the PW Bypass PW virtual link, the AC Bypass PW of the slave PE device and the PW Bypass PW of the master PE device belong to the same virtual link, so the slave PE device can receive the service data through the AC Bypass PW virtual link, and due to failure of the backup PW link, the slave PE device can only send the service data to the master PE device through the Bypass PW virtual link, the main PE equipment can receive the service data sent by the slave PE equipment through the AC Bypass PW, but the main PW link fails, so that the service data can be sent to the slave PE equipment only through the PW Bypass PW virtual link, and a loop is formed between the main PE equipment and the slave PE equipment due to cyclic reciprocation; similarly, when both the active AC link and the standby AC link fail, as shown in fig. 9b, when the first CE device sends service data to the primary PE device through the first PE device, a loop may also be formed between the primary PE device and the secondary PE device, so that the primary PE device and the secondary PE device may perform unnecessary forwarding continuously. Therefore, in order to avoid the above problem, in the embodiment of the present application, a unidirectional association relationship between a PW Bypass PW entry and a primary AC copy entry, and a unidirectional association relationship between an AC Bypass PW entry and a primary PW copy entry are further stored in the primary PE device. It should be noted that the positions of the AC Bypass PW and PW Bypass PW in fig. 9a are only for convenience of illustration, and have no specific limitation on the positions, as is the case with the slave PE device.
Specifically, referring to fig. 10a, which is a schematic diagram illustrating another table entry association relationship stored in the primary PE device, an additional copy is made on both the primary AC link table entry and the primary PW link table entry to obtain a primary AC copy table and a primary PW copy table, the two copy tables are not associated with a standby table entry and a path selection switch, only PW Bypass PW table entries are maintained to be fixedly and unidirectionally connected to the main AC copy table entry, and the AC Bypass PW list item is fixedly and unidirectionally connected to the main PW copy list item, and the path selection switch comprises a first reference path selection switch and a second reference path selection switch, and the unidirectional association relation between the main PW link table entry and the main AC link table entry and the AC Bypass PW table entry is controlled by a first reference path selection switch, and the unidirectional association relation between the main AC link table entry and the main PW link table entry and the PW Bypass PW table entry is controlled by a second reference path selection switch.
On this basis, if the primary PW link fails, the method establishes a bidirectional association relationship between the primary AC link entry and the Bypass PW entry by switching the path selection switch, including: the method comprises the steps of establishing a one-way incidence relation between a main AC link table entry and a PW Bypass PW table entry by switching a first path selection switch and/or a second path selection switch, and then combining a pre-stored one-way incidence relation between the PW Bypass PW table entry and a main AC copy table entry to form a two-way incidence relation between the main AC link table entry and the Bypass PW table entry. When the active AC link fails, the bidirectional association relationship between the active PW link entry and the Bypass PW entry is established by switching the path selection switch, which can be implemented according to the following procedures: the method comprises the steps of establishing a one-way incidence relation between an active PW link and an AC Bypass PW table entry by switching a first path selection switch and/or a second path selection switch, and obtaining the two-way incidence relation between the active PW link table entry and the Bypass PW table entry by combining the pre-stored one-way incidence relation between the AC Bypass PW table entry and an active PW copy table entry. It should be noted that the default on condition of the first reference path selection switch in fig. 10a is the same as the default on condition of the fourth path selection switch in fig. 5a, and the description is not repeated here; the default on-condition of the second reference path selection switch coincides with the default on-condition of the fifth path selection switch in fig. 5a and will not be described again here.
On this basis, when the primary PW link and the standby PW link fail, the second reference path selection switch switches to the PW Bypass PW entry to establish a unidirectional association relationship between the primary AC link entry and the PW Bypass PW entry, the switched entry association relationship is shown in fig. 10b, and the entry association relationship of the slave PE device is also shown in fig. 8a, so that after the primary PE device receives service data sent by the second CE device through the primary AC link, the service data is sent to the slave PE device through the PW Bypass PW virtual link, the slave PE device receives the service data through the AC Bypass PW virtual link, and then sends the service data to the primary PE device through the PW Bypass PW virtual link, because the unidirectional association relationship between the PW Bypass and the copied entry is established in the primary PE device, that is, a communication connection in the direction from the PW Bypass to the primary AC link is established, therefore, the main PE device will transmit the service data back to the second CE device through the main AC link, thereby avoiding the occurrence of loop forwarding between the main PE device and the slave PE device. Similarly, when both the primary AC link and the standby AC link fail, the first reference path selection switch is to switch to the AC Bypass PW entry to establish a unidirectional association between the primary PW link entry and the AC Bypass PW entry, the switched entry association is shown in fig. 10c, and the entry association of the slave PE device is also shown in fig. 8c, so that when the primary PE device receives service data sent by the first CE device forwarded by the first PE device through the primary PW link, the service data is sent to the slave PE device through the AC Bypass PW virtual link, and after the slave PE device receives the service data, the service data is sent to the primary PE device through the PW Bypass virtual link due to the failure of the standby AC link, because the unidirectional association between the AC Bypass and the PW copy entry is established in the primary PE device, that is, a communication connection in the direction from the AC Bypass PW to the primary PW link is established, therefore, after receiving the service data through the AC Bypass PW, the primary PE device returns the service data to the first PE device through the primary PW link, and then reaches the first CE device, thereby avoiding a situation that the service data is sent in a loop between the primary PE device and the secondary PE device when both the primary AC link and the standby AC link fail.
It should be noted that, when the active PW link or the active AC link fails, the table entry association relationship switching shown in fig. 10b or 10c can also implement communication between the first CE device and the second CE device, and a specific process is similar to the process described in fig. 8c or fig. 8d, and is not described in detail here.
In another possible implementation manner, the slave PE device provided in the present application stores a bidirectional association relationship between the standby link table entries and a Bypass PW table entry; then, the communication method provided by the present application further includes:
the main PE equipment sends a path switching instruction to the auxiliary PE equipment so that the auxiliary PE equipment establishes a bidirectional association relation between the standby link table entry except the fault main link and the Bypass PW table entry, and forwards the service data by utilizing the established bidirectional association relation.
Specifically, since the Bypass PW is a communication link between the master PE device and the slave PE device, and needs the slave PE device to participate in communication between the first CE device and the second CE device, the master PE device sends a path switching instruction to the slave PE device to notify that the slave PE device starts to operate, and to notify the slave PE device of link information of the failed master link. In order to realize the fast switching of the links, the forwarding chip of the PE device also prestores the bidirectional association relationship between the standby link table entries and the Bypass PW table entry, so that after receiving the link switching instruction, the PE device also obtains the bidirectional association relationship and the Bypass PW table entry from the forwarding chip of the PE device, and then establishes the bidirectional association relationship between the standby link table entry of the failed primary link and the Bypass PW table entry, so that the PE device can send the service data received based on the Bypass PW virtual link to the standby link of the bidirectional association relationship, and send the service data to the outside through the standby link, thereby reaching the first CE device or the second CE device. Based on the embodiment, because the table entry is issued in advance, the forwarding chip of the PE device does not need to be operated frequently, the path is switched quickly, and smooth communication between the first CE device and the second CE device is realized.
The standby link table entry includes a standby AC link table entry and a standby PW link table entry, and the pre-stored bidirectional association relationship between the standby link table entries includes a bidirectional association relationship between the standby PW link table entry and the standby AC link table entry, and when the secondary PE device establishes the bidirectional association relationship between the standby link table entry of the failed primary link and the Bypass PW table entry, the following process may be implemented: if the main PW link fails, establishing a bidirectional association relation between a standby PW link table entry and a Bypass PW table entry; if the main AC link fails, establishing a bidirectional association relation between the standby AC link table entry and the Bypass PW table entry.
In specific implementation, also taking fig. 1 as an example for explanation, when a link between a first PE device and a master PE device in fig. 1 fails, after the master PE device executes a link switching operation, the slave PE device also needs to execute a link switching, that is, the slave PE device needs to modify a bidirectional association relationship stored in a forwarding chip thereof into a bidirectional association relationship between a standby PW link entry and a Bypass PW entry, that is, the standby PW link entry and the standby AC link entry in the slave PE device are not available, so that a communication relationship between a Bypass virtual link and a standby PW link is established, and in combination with the communication relationship established by the master PE device when the master PW link fails, the switched communication link is: and the primary AC link, the Bypass PW virtual link and the standby PW link are in bidirectional communication, so that the switching of the links is completed, and the forwarding chips of the primary PE equipment and the secondary PE equipment do not need to be operated frequently.
Similarly, when the primary AC link fails, that is, the link between the primary PE device and the second CE device in fig. 1 fails, the primary PE device also needs to perform link switching after performing link switching operation according to the method provided in the present application, that is, the secondary PE device needs to modify the bidirectional association relationship stored in its forwarding chip into the bidirectional association relationship between the standby AC link entry and the Bypass PW entry, which also indicates that the standby PW link entry and the standby AC link entry in the secondary PE device are not available, so that the communication relationship between the Bypass PW virtual link and the standby AC link is established, and then, in combination with the communication relationship established by the primary PE device when the primary AC link fails, the switched communication link is: and the primary PW link, the Bypass PW virtual link and the standby AC link are in bidirectional communication, so that the switching of the links is completed, and the forwarding chips of the primary PE equipment and the secondary PE equipment do not need to be operated frequently.
Optionally, when a Bypass PW is configured between the master PE device and the slave PE device, the bidirectional association relationship and the Bypass PW entry stored in the slave PE device may refer to fig. 11a, where fig. 11a is a schematic diagram of an entry stored in a forwarding chip when the master link fails. However, when the active PW link fails, the slave PE device may establish a bidirectional association relationship between the Bypass PW table entry and the standby PW link, please refer to fig. 11 a. Similarly, when the primary AC link fails, the slave PE device may establish a bidirectional association relationship between the Bypass PW table entry and the standby AC link, please refer to fig. 11 a.
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. 4a and fig. 11 a. When the primary PW link between the second PE device and the first PE device fails, please refer to fig. 11b, the second PE device can complete link switching by switching the second path selection switch, and the table entry association relationship thereof refers to fig. 4c, which omits the process of re-issuing the Bypass PW table entry to the forwarding chip, and the third PE device needs to change the bidirectional association relationship stored therein to establish the bidirectional association relationship between the Bypass PW table entry and the standby PW link table entry, and refers to the switched table entry when the primary PW link fails, as shown in fig. 11b, so that the pass-through realized after link switching is performedThe signal link is: first CE device
Figure BDA0002425805680000291
First PE equipment
Figure BDA0002425805680000292
Third PE device
Figure BDA0002425805680000293
Second PE device
Figure BDA0002425805680000294
The second CE device, namely the first CE device sends the service data to the first PE device, then the first PE device sends the service data 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, thereby realizing the link switching when the active PW link fails, 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 accessed frequently during the link switching.
When the primary AC link between the second PE device and the second CE device fails, please refer to fig. 11c, the second PE device may complete link switching by switching the first path selection switch and the third path selection switch, and the table entry association relationship thereof is as shown in fig. 4e, which omits the process of re-issuing the Bypass PW table entry to the forwarding chip, and the third PE device needs to change the bidirectional association relationship stored therein to establish the bidirectional association relationship between the Bypass PW table entry and the standby AC link table entry, please refer to the switched table entry shown in fig. 11a when the primary AC link fails, so that the communication link implemented after link switching is: first CE device
Figure BDA0002425805680000301
First PE equipment
Figure BDA0002425805680000302
Second PE device
Figure BDA0002425805680000303
Third PE device
Figure BDA0002425805680000304
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.
Optionally, when 2 Bypass PWs are configured between the master PE device and the slave PE device, the slave PE device defaults to store a bidirectional association relationship between a standby PW link entry and a standby AC link entry, and a schematic diagram of a PW Bypass PW entry and an AC Bypass PW entry, please refer to fig. 12a, where when the master PW link fails, the slave PE device may perform the following process when establishing the bidirectional association relationship between the standby PW link entry and the Bypass PW entry: establishing a bidirectional association relationship between the standby PW link entry and the AC Bypass PW entry, please refer to fig. 12 a. When the primary AC link fails, the slave PE device establishes a bidirectional association relationship between the standby AC link entry and the Bypass PW entry in the event of the failure of the primary AC link, which can be implemented according to the following procedures: establishing a bidirectional association relationship between the standby AC link entry and the PW Bypass PW entry, please refer to fig. 12 a.
On this basis, the data flow in the no-fault scenario may refer to the description process shown in fig. 8b, 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. 5a and fig. 12 a. However, when the active PW link between the second PE device and the first PE device fails, please refer to fig. 12b, where the second PE device switches the fifth path selection switch to implement link switchingAs shown in fig. 5b, the process of re-issuing the PW Bypass PW table entry to the forwarding chip is omitted, and the third PE device needs to change the bidirectional association relationship stored therein to the bidirectional association relationship between the standby PW link table entry and the AC Bypass PW table entry, so that the switched communication link is: first CE device
Figure BDA0002425805680000311
First PE equipment
Figure BDA0002425805680000312
Third PE device
Figure BDA0002425805680000313
Second PE device
Figure BDA0002425805680000314
A second CE device, that is, a first CE device, sends service data to a first PE device, then the first PE device sends the service data to a third PE device through a standby PW link, then the third PE device sends the service data to the second PE device through an AC Bypass 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 one virtual link, so that the second PE device receives the service data sent by 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 an active AC link, and the flow direction of the service data also refers to fig. 12b, or vice versa, thereby implementing link switching when the active PW link fails, and because of the bidirectional association relationship and the AC Bypass PW entry and PW Bypass entry are pre-stored in a forwarding chip, there is no need to frequently access the forwarding chip during link switching.
When the primary AC link between the second PE device and the second CE device fails, please refer to fig. 12c, the second PE device may complete link switching by switching the fourth path selection switch, and the switched entry please refer to fig. 5c, so that the process of re-issuing the AC Bypass PW entry to the forwarding chip is omitted, and the third PE device needs to change the bidirectional association stored therein to the AC Bypass PW entry, where the AC Bypass PW entry is stored in the third PE deviceThe bidirectional association between the entry and the standby AC link table entry, whereby the communication link implemented after the link switch is: first CE device
Figure BDA0002425805680000315
First PE equipment
Figure BDA0002425805680000316
Second PE device
Figure BDA0002425805680000317
Third PE device
Figure BDA0002425805680000318
The second CE device, that is, the first CE device sends the service data to the first PE device, and 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 a third PE device through an 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, the third PE device will receive 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, the traffic data flow is also shown with reference to fig. 12c, and vice versa, thereby not only realizing link switching when the active AC link fails, and because the bidirectional association relationship and the AC Bypass PW and PW Bypass PW table entries are stored in the forwarding chip in advance, the forwarding chip does not need to be frequently accessed during link switching.
In another possible embodiment, the slave PE device provided in this application embodiment stores, in advance, 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. The bidirectional association relationship is a bidirectional association relationship between the standby PW link table entry and the standby AC link table entry.
When a Bypass virtual link Bypass PW is configured between the master PE device and the slave PE device, the unidirectional association relationship 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 primary AC link is maintained with priority, the slave PE device prestores the unidirectional association relationship between the Bypass PW table entry and the standby AC link table entry, please refer to fig. 13 a.
On this basis, when the primary PW link fails, the primary PE device completes link switching as shown in fig. 4c or 4d, and then establishes a bidirectional association relationship between the Bypass PW table entry and the primary AC link, and when the secondary PE device stores the unidirectional association relationship between the Bypass PW table entry and the standby PW link table entry, the secondary PE device may forward the service data sent by the primary PE device without performing any switching operation, specifically refer to the interactive description and data flow process after link switching as shown in fig. 7b, which is not described in detail herein. And when the slave PE device stores the unidirectional association relationship between the Bypass PW entry and the standby AC link entry, when the active PW link fails, bidirectional communication between the first CE device and the second CE device can be directly achieved through the bidirectional association relationship between the standby PW link and the standby AC link, that is, the first CE device sends the service data to the first PE device, the first PE device forwards the service data to the master PE device through the standby PW link, and then the master PE device sends the service data to the second CE device through the standby AC link, or vice versa.
On this basis, when the primary AC link fails, the primary PE device completes link switching as shown in fig. 4e or 4f, and then establishes a bidirectional association relationship between the Bypass PW table entry and the primary PW link, and when the secondary PE device stores a unidirectional association relationship between the Bypass PW table entry and the standby AC link table entry, the secondary PE device may forward service data sent by the primary PE device without performing any switching operation, specifically, reference may be made to the interactive description and data flow process after link switching as shown in fig. 7c, which is not described in detail herein. And when the slave PE device stores the unidirectional association between the Bypass PW table entry and the standby PW link table entry, maintaining the communication between the first CE device and the second CE device by directly using the bidirectional association between the standby AC link table entry and the standby PW link table entry stored in the slave PE device.
When 2 Bypass PWs are configured between the master PE device and the slave PE device, the unidirectional association relationship between the Bypass PW table entry prestored in the slave PE device and the standby link table entry of at least one standby link includes: fig. 13b shows a unidirectional association relationship between the AC Bypass PW table entry and the standby PW link table entry, and a unidirectional association relationship between the PW Bypass PW table entry and the standby AC link table entry. On this basis, if the primary PW link fails or the primary AC link fails, only the primary PE device needs to perform table entry switching, and the secondary PE device still maintains the table entry association relationship shown in fig. 13b, so that the secondary PE device does not need to perform link switching, that is, a forwarding chip therein does not need to be operated, thereby further accelerating the link switching process.
Specifically, when the active PW link fails, after receiving service data based on the active AC link, the primary PE device sends the service to the secondary PE device through the PW Bypass PW virtual link, and the secondary PE device receives the service data sent by the primary 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, thereby completing the link switching when the active link fails. For example, refer to the interaction process and data flow after the link switch shown in fig. 8d, and the repeated points will not be described in detail.
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 the flow of fig. 3, and then the main link table entry of the failed main link is deleted. For example, when the primary PW link fails, firstly, the communication link is switched according to the method provided by the present application, and then the primary PW link entry is deleted; when the main AC link fails, the communication link is switched according to the method provided by the application, and then the list item of the main AC link is deleted. Therefore, the protection performance of link switching when the main link fails is improved, normal sending of service data is guaranteed, 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 primary link table entry and the Bypass PW table entry are issued in advance in a forwarding chip of the primary PE device, and a unidirectional association relationship between the primary link table entries, a bidirectional association relationship between the Bypass PW table entry and at least one primary link table entry, and a unidirectional association relationship between the primary link table entry and the Bypass PW table entry are controlled by the path selection switch, so that when determining that any primary link fails, the primary PE device achieves establishment of a bidirectional association relationship between the primary link table entry and the Bypass PW table entry except for the failed primary link by switching the path selection switch, and further forwards the received service data by using the established bidirectional association relationship; because the forwarding chip of the PE device stores the relevant table entry for realizing the interaction between the first CE device and the second CE device in advance, when the primary link fails, the purpose of establishing the temporary forwarding path is realized only by switching the path selection switch, and then the communication link between the CE devices is quickly recovered, and meanwhile, the table entry is stored in advance, so that the forwarding chip in the PE device does not need to be frequently operated, and the pressure of the forwarding chip in the PE device is reduced, thereby solving the problem of larger hardware development caused by frequently operating the forwarding chip in the prior art.
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 shown in an exemplary embodiment of the present application, a primary provider edge PE device in a layer two virtual private network L2VPN, where the L2VPN further includes a secondary provider edge PE device, where a Bypass virtual link Bypass PW is configured between the primary PE device and the secondary PE device, a primary link entry and a Bypass PW entry are stored in advance in the primary PE device, and a bidirectional association relationship between the primary link entries, a unidirectional association relationship between the Bypass PW entry and at least one primary link entry, and a unidirectional association relationship between the primary link entry and the Bypass PW entry are controlled by a path selection switch, and the apparatus includes:
an association relationship establishing module 1401, configured to, when determining that any one of the primary links fails, establish a bidirectional association relationship between a primary link table entry except the failed primary link and a Bypass PW table entry by switching a path selection switch;
a forwarding module 1402, configured to forward the received service data by using the established bidirectional association relationship.
In a possible embodiment, the primary link includes a primary PW link and a primary AC link; then
An association relationship establishing module 1401, configured to establish, if the primary PW link fails, a bidirectional association relationship between the primary AC link entry and the Bypass PW entry by switching the path selection switch; if the main AC link fails, the bidirectional association relation between the main PW link table entry and the Bypass PW table entry is established by switching the path selection switch.
In a possible embodiment, when a Bypass virtual link Bypass PW is configured between a master PE device and a slave PE device, a unidirectional association relationship between a master PW link entry and each of a master AC link entry and a Bypass PW entry is controlled by a first path selection switch, a unidirectional association relationship between a master AC link entry and each of a master PW link entry and a Bypass PW entry is controlled by a second path selection switch, and a unidirectional association relationship between a Bypass PW entry and each of a master PW link entry and a slave PW entry is controlled by a third path selection switch; then
The association relationship establishing module 1401 is specifically configured to, if the primary PW link fails, switch the second path selection switch and/or the third path selection switch to establish a bidirectional association relationship between the primary AC link entry and the Bypass PW entry; and if the main AC link fails, establishing a bidirectional association relation between the main PW link table entry and the Bypass PW table entry by switching the first path selection switch and/or the third path selection switch.
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; the one-way incidence relation between the main PW link table entry and the PW Bypass PW table entry and the main AC link table entry and the AC Bypass PW table entry respectively is controlled by a fourth path selection switch, and the one-way incidence relation between the main AC link table entry and the AC Bypass PW table entry and the main PW link table entry and the PW Bypass PW table entry respectively is controlled by a fifth path selection switch; then
The association relationship establishing module 1401 is specifically configured to, if the primary PW link fails, switch the fourth path selection switch and/or the fifth path selection switch to establish a bidirectional association relationship between the primary AC link entry and the PW Bypass PW entry; if the main AC link fails, the fourth path selection switch and/or the fifth path selection switch are/is switched to establish the bidirectional association relationship between the main PW link table entry and the AC Bypass PW table entry.
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; and the main PE device stores a main AC copy table entry and a main PW copy table entry, the main PE device stores a unidirectional association relationship between the PW Bypass PW table entry and the main AC copy table entry, a unidirectional association relationship between the AC Bypass PW table entry and the main PW copy table entry, and
the one-way association relation between the main PW link table entry and the main AC link table entry and the one-way association relation between the main AC link table entry and the AC Bypass PW table entry are controlled through a first reference path selection switch, and the one-way association relation between the main AC link table entry and the main PW link table entry and the one-way association relation between the main AC link table entry and the main PW Bypass PW table entry are controlled through a second reference path selection switch.
A possible embodiment is that a slave PE device 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, where the path selection switch in the master PE device is used in cooperation with the path selection switch of the slave PE device, so that the slave PE device transmits service data to the outside after receiving the service data sent by the master PE device.
In this embodiment, the slave PE device stores in advance 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.
In a possible embodiment, in this embodiment, the slave PE device stores a bidirectional association relationship between the standby link table entries and a Bypass PW table entry; and, the communication device that this application provided still includes: the sending module 1403 also refers to fig. 14, where:
a sending module 1403, configured to send a path switching indication to the slave PE device, so that the slave PE device establishes a bidirectional association relationship between a standby link entry except for the failed primary link and a Bypass PW entry, and forwards service data by using the established bidirectional association relationship.
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 is characterized in that the method is applied to a main provider edge PE device in a two-layer virtual private network L2VPN, the L2VPN also comprises a slave provider edge PE device, wherein a Bypass virtual link Bypass PW is configured between the main PE device and the slave PE device, a main link table item and a Bypass PW table item are pre-stored in the main PE device, a bidirectional association relationship between the main link table items, a unidirectional association relationship between the Bypass PW table item and at least one main link table item, and a unidirectional association relationship between the main link table item and the Bypass PW table item are controlled by a path selection switch, and the method comprises the following steps:
when determining that any main link fails, the main PE equipment establishes a bidirectional association relationship between a main link table entry except the failed main link and a Bypass PW table entry by switching a path selection switch;
and forwarding the received service data by utilizing the established bidirectional association relation.
2. The method of claim 1, wherein the active link comprises an active PW link and an active AC link; then
The method for establishing the bidirectional association relationship between the main link table entry except the failed main link and the Bypass PW table entry by switching the path selection switch comprises 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 by switching a path selection switch;
if the main AC link fails, the bidirectional association relation between the main PW link table entry and the Bypass PW table entry is established by switching the path selection switch.
3. The method according to claim 2, wherein when a Bypass virtual link Bypass PW is configured between the master PE device and a slave PE device, the unidirectional association between the master PW link entry and the master AC link entry, respectively, and the Bypass PW entry, is controlled by a first path selector switch, the unidirectional association between the master AC link entry and the master PW link entry, respectively, is controlled by a second path selector switch, and the unidirectional association between the Bypass PW entry and the master PW link entry, respectively, is controlled by a third path selector switch; 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 by switching a path selection switch, comprising:
establishing a bidirectional association relation between the main AC link table entry and the Bypass PW table entry by switching the second path selection switch and/or the third path selection switch;
if the main AC link fails, the bidirectional association relationship between the main PW link table entry and the Bypass PW table entry is established by switching the path selection switch, and the method comprises the following steps:
and establishing a bidirectional association relation between the main PW link table entry and the Bypass PW table entry by switching the first path selection switch and/or the third path selection switch.
4. The method of claim 2, 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 includes a PW Bypass PW entry and an AC Bypass PW entry; the one-way incidence relation between the main PW link table entry and the PW Bypass PW table entry and the main AC link table entry and the AC Bypass PW table entry respectively is controlled by a fourth path selection switch, and the one-way incidence relation between the main AC link table entry and the AC Bypass PW table entry and the main PW link table entry and the PW Bypass PW table entry respectively is controlled by a fifth path selection switch; 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 by switching a path selection switch, comprising:
establishing a bidirectional association relation between the main AC link table entry and the PW Bypass table entry by switching the fourth path selection switch and/or the fifth path selection switch;
if the main AC link fails, the bidirectional association relationship between the main PW link table entry and the Bypass PW table entry is established by switching the path selection switch, and the method comprises the following steps:
and establishing a bidirectional association relation between the main PW link table entry and the AC Bypass PW table entry by switching the fourth path selection switch and/or the fifth path selection switch.
5. The method of claim 2, 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 includes a PW Bypass PW entry and an AC Bypass PW entry; and the main PE device stores a main AC copy table entry and a main PW copy table entry, the main PE device stores a unidirectional association relationship between the PW Bypass PW table entry and the main AC copy table entry, a unidirectional association relationship between the AC Bypass PW table entry and the main PW copy table entry, and
the one-way association relation between the main PW link table entry and the main AC link table entry and the one-way association relation between the main AC link table entry and the AC Bypass PW table entry are controlled through a first reference path selection switch, and the one-way association relation between the main AC link table entry and the main PW link table entry and the one-way association relation between the main AC link table entry and the main PW Bypass PW table entry are controlled through a second reference path selection switch.
6. The method according to any one of claims 1 to 5, wherein a backup link table entry and a Bypass PW table entry are pre-stored in the slave PE device, 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 selector switch, wherein the path selector switch in the master PE device is used in cooperation with the path selector switch of the slave PE device, so that the slave PE device transmits the service data to the outside after receiving the service data sent from the master PE device.
7. The method according to any of claims 1 to 4, wherein the slave PE device pre-stores 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.
8. The method according to any one of claims 1 to 4, wherein the slave PE device stores a Bypass PW table entry and a bidirectional association relationship between the standby link table entries; and, the method further comprises:
and sending a path switching instruction to the slave PE equipment, so that the slave PE equipment establishes a bidirectional association relationship between the standby link table entry except the fault main link and the Bypass PW table entry, and forwards the service data by using the established bidirectional association relationship.
9. A communication apparatus, characterized in that, a main provider edge PE device is disposed in a L2VPN of a two-layer virtual private network, the L2VPN further includes a slave provider edge PE device, wherein a Bypass virtual link Bypass PW is configured between the main PE device and the slave PE device, a main link entry and a Bypass PW entry are pre-stored in the main PE device, and a bidirectional association relationship between the main link entries, a unidirectional association relationship between the Bypass PW entry and at least one main link entry, and a unidirectional association relationship between the main link entry and the Bypass PW entry are controlled by a path selection switch, and the apparatus includes:
the incidence relation establishing module is used for establishing a bidirectional incidence relation between the main link table entry except the main link with the fault and the Bypass PW table entry by switching the path selection switch when the fault of any main link is determined;
and the forwarding module is used for forwarding the received service data by utilizing the established bidirectional association relation.
10. A provider edge device, PE, comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to perform the method of any one of claims 1-8.
CN202010220212.6A 2020-03-25 2020-03-25 Communication method and device Active CN111614553B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010220212.6A CN111614553B (en) 2020-03-25 2020-03-25 Communication method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010220212.6A CN111614553B (en) 2020-03-25 2020-03-25 Communication method and device

Publications (2)

Publication Number Publication Date
CN111614553A CN111614553A (en) 2020-09-01
CN111614553B true CN111614553B (en) 2022-03-29

Family

ID=72201418

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010220212.6A Active CN111614553B (en) 2020-03-25 2020-03-25 Communication method and device

Country Status (1)

Country Link
CN (1) CN111614553B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112543125B (en) * 2020-12-22 2022-08-09 宁波均联智行科技股份有限公司 Serial communication system and link switching method applied to same
CN115002024A (en) * 2022-07-05 2022-09-02 杭州云合智网技术有限公司 Message blocking method for eliminating message forwarding looping
CN115426296B (en) * 2022-08-31 2023-10-13 杭州云合智网技术有限公司 Communication confirmation method, device, equipment and medium under EVPN VPWS dual-homing dual-activity

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102325037B (en) * 2011-05-25 2016-01-20 中兴通讯股份有限公司 A kind of changing method of pseudo-line dual homed network, system and dual-homed Provider Equipment
CN102223660B (en) * 2011-08-02 2013-10-09 华为技术有限公司 Method and device for controlling switching of active/standby pseudo wires
US9025442B2 (en) * 2013-05-31 2015-05-05 Telefonaktiebolaget L M Ericsson (Publ) Pseudo wire end-to-end redundancy setup over disjoint MPLS transport paths

Also Published As

Publication number Publication date
CN111614553A (en) 2020-09-01

Similar Documents

Publication Publication Date Title
CN111614553B (en) Communication method and device
CN111740898B (en) Link switching method and device and service provider edge equipment
US7206309B2 (en) High availability packet forward apparatus and method
US9253250B2 (en) Local reroute protection for multicast multiprotocol label switching
CN109861867B (en) MEC service processing method and device
CN111490932B (en) Communication method and device
CN1984076A (en) Method and system for transmitting message in virtual special network link fault
CN111130893A (en) Message transmission method and device
CN101267360A (en) Pseudo failure detection method and user boundary device
WO2015196676A1 (en) Networking protection method and device, and main convergence network element in networking
CN111988222A (en) Data transmission method and device, electronic equipment and computer readable storage medium
JP2017034463A (en) Protection method, communication system, and end node
US20130223214A1 (en) Switch device, information processing apparatus, and method of controlling switching device
CN111901133A (en) Multicast switching method, device, network equipment and storage medium
CN109412980B (en) BRAS backup method and device
EP2445118B1 (en) Method and device for protecting service based on automatic switched optical network
CN110138656B (en) Service processing method and device
CN111404812B (en) Communication method and device
CN103931139B (en) Method and device for redundancy protection, and device and system
CN104717143A (en) Method and equipment for many-one reducibility scene multicast data transmission
CN111404813B (en) Communication method and device
CN107819680A (en) A kind of method of service switchover, the network equipment
RU2667806C2 (en) Pseudo-wire (pw) dual-homing protection switching method and system
CN106341323A (en) VRRP state synchronizing method and device
CN104917689A (en) Intelligent dial on-demand realization method and system and access router

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