Method, device, equipment and medium for confirming communication under EVPN VPWS dual-homing dual-activity
Technical Field
The invention relates to the technical field of computers, in particular to a method, a device, equipment and a medium for confirming communication under EVPN VPWS dual-homing dual-activity.
Background
EVPN (Ethernet Virtual Private Network) is a VPN technology used for two-layer Network interconnection. The EVPN technology transfers the MAC address learning and publishing process between two layers of networks of different network sites from a data plane to a control plane through an extended BGP protocol. An EVPN VPWS (Virtual Private Wire Service) provides a P2P L2VPN Service scheme based on an EVPN Service architecture, where a control layer uses MP-BGP to advertise EVPN routing information and a data layer uses tunnel encapsulation. The data message of the user network is directly forwarded through the AC and the PW under the cross connection without searching an MAC forwarding table entry, and point-to-point two-layer service is provided for the user.
As shown in fig. 1, the typical network model of EVPN VPWS includes the following parts:
CE (Customer Edge), customer network side equipment directly connected to the service provider network.
PE (Provider Edge), service Provider network side device connected to CE. The PE is mainly responsible for the access of the EVPN service, and completes the mapping and forwarding of the message from the user network to the public network tunnel and from the public network tunnel to the user network.
AC (access Circuit), physical Circuit or virtual Circuit connecting CE and PE, such as Ethernet interface, VLAN, PPP connection on physical interface. The AC attributes include the encapsulation type, the maximum transmission unit MTU, and the interface parameters for the particular link type.
PW (Pseudowire), a virtual bidirectional connection between two PEs, consisting of a pair of unidirectional virtual connections in opposite directions. The EVPN VPWS simplifies a control and data model, BGP is used as a uniform control plane, a routing function and a next hop iteration function of the BGP are used for selecting a backbone network flow path, and a PW (pseudo wire) does not need to be manually specified.
A public network Tunnel (Tunnel) which passes through an IP or MPLS backbone network and is used for bearing a Tunnel of the PW, wherein one public network Tunnel can bear a plurality of PWs, and the public network Tunnel can be an MPLS Tunnel, a GRE Tunnel or an SRv6 Tunnel.
Cross-connect (Cross connect), a connection formed by two physical circuits or virtual circuits in series, the message received from one physical and virtual circuit is directly switched to the other physical and virtual circuit for forwarding, the Cross-connect includes AC-to-AC Cross-connect and AC-to-PW Cross-connect.
EVPL instances, which are in one-to-one correspondence with ACs, each EVPL instance has a service ID. The EVPL instances of the home PE correspond one-to-one to the EVPL instances of the remote PE. The PEs mutually transmit EVPN routes with service IDs to construct forwarding table entries to forward or receive service flows of different ESs, so that point-to-point interconnection is realized.
The EVPN-VPWS instance is deployed on the boundary PE and has a service combination of common access or network side attributes, and a BGP-EVPN address family transfers routes based on RD and RT attributes configured in each instance.
As shown in fig. 2, in order to avoid the influence of a single point failure of a PE on network services and improve the reliability of the network, a CE is connected to two PEs to form a redundant backup group, which is called EVPN VPWS dual homing. When a CE is connected to multiple PEs via different Ethernet links, these links form an ES (Ethernet Segment), and identify that they belong to the same ES by using the same ESI (ES Identifier). The EVPN VPWS dual-homing redundancy backup mode has two networking scenes of dual-homing single-living and dual-homing dual-living.
In a dual-homing single-active redundancy mode, only one of the first PE and the second PE forwards the flow, two PWs on the first PE and the second PE are in a main-standby relationship, and when the main PW fails, the flow is immediately switched to a backup PW so that the flow forwarding can be continued. The main PW and the standby PW can be determined by DF election. When the PW of the first PE is unavailable, the third PE starts a backup PW, forwards the message of the second CE to the second PE through the backup PW, and forwards the message of the second CE to the first CE through the second PE.
As shown in fig. 3, in the dual-homing multi-active redundancy mode, the two PWs on the third PE form an equivalent load-sharing forwarding data packet. Configuring a redundancy mode as multi-active on the first PE and the second PE, and configuring the same ESI on an access side interface, wherein the first PE and the second PE are both in a main DF state. After the forwarding association table is successfully established, the traffic message sent from the AC port can be sent to the remote PE by directly using the corresponding public network tunnel according to the forwarding association table of the tunnel and the EVPL instance. After the far-end PE receives the flow message, the far-end PE searches for a forwarding association table item according to a label encapsulated on the flow message, and then forwards the forwarding association table item to a corresponding AC port.
As shown in fig. 4, after the configuration of the EVPN VPWS is completed, the connectivity of the configured service needs to be confirmed. Generally, a CCM mechanism defined by g.8013 is used to confirm service connectivity, an MEP entity is configured on an AC port, and service connectivity is confirmed by periodically sending a CCM message to simulate a service message. In an EVPN VPWS dual-homing multi-activity scene, because a CCM message sent by an AC port of a third PE is sent by load sharing of a PW, only the first PE or the second PE can receive the CCM message, so that MEPs in the first PE and the second PE have a fixed state as DOWN and cannot reflect a real EVPN VPWS dual-homing forwarding state.
Disclosure of Invention
In view of the above, the present invention provides a method, an apparatus, a device and a medium for connection confirmation under EVPN VPWS dual-homing dual-active to improve the above problems.
The embodiment of the invention provides a communication confirmation method under EVPN VPWS dual-homing dual-activity, which comprises the following steps:
at a dual-homed, dual-alive first PE node:
receiving a CCM message sent by a third PE node;
matching the PW access interface index and the format of the CCM message through the issued ACL rule;
and if the matching is successful, copying the CCM message, and sending the CCM message to a second PE node through a Bypass PW, so that the second PE node receives the CCM message through the Bypass PW, and decapsulating the CCM message and sending the CCM message to an AC MEP for processing.
Preferably, the method further comprises the following steps:
and confirming whether the first PE node is a dual-homing dual-activity node or not through a configuration file.
Preferably, the first PE node and the second PE node form a redundant backup group.
The embodiment of the invention also provides a communication confirmation method under EVPN VPWS dual-homing dual-activity, which comprises the following steps:
at a dual-homed, dual-alive first PE node:
receiving a CCM message sent by a third PE node;
adding the AC and the Bypass PW of the first PE into a multicast group;
matching the PW access interface index and the format of the CCM message through the issued ACL rule;
and if the matching is successful, redirecting to the multicast group, forwarding the CCM message to an AC MEP corresponding to the AC, and forwarding the CCM message to a second PE through a Bypass PW, so that the second PE node decapsulates the received CCM message and sends the CCM message to the AC MEP corresponding to the CCM message for processing.
Preferably, the method further comprises the following steps:
and confirming whether the first PE node is a dual-homing dual-activity node or not through a configuration file.
Preferably, the first PE node and the second PE node form a redundant backup group.
The embodiment of the invention also provides a communication confirmation device under EVPN VPWS dual-homing dual-activity, which comprises:
the first message receiving unit is used for receiving a CCM message sent by the third PE node;
the first matching unit is used for matching the PW access interface index and the format of the CCM message through the issued ACL rule;
and the copying unit is used for copying the CCM message and sending the CCM message to the second PE node through a Bypass PW if the matching is successful, so that the second PE node receives the CCM message through the Bypass PW, decapsulates the CCM message and sends the CCM message to the AC MEP for processing.
The embodiment of the invention also provides a communication confirmation device under EVPN VPWS dual-homing dual-activity, which comprises:
the second message receiving unit is used for receiving the CCM message sent by the third PE node;
an adding unit, configured to add the AC and Bypass PW of the first PE to a multicast group;
the second matching unit is used for matching the PW access interface index and the format of the CCM message through the issued ACL rule;
and the redirecting unit is used for redirecting the multicast group if the matching is successful, forwarding the CCM message to the AC MEP corresponding to the AC, and forwarding the CCM message to the second PE through a Bypass PW, so that the second PE node decapsulates the received CCM message and then sends the CCM message to the AC MEP corresponding to the CCM message for processing.
The embodiment of the present invention further provides a device for confirming connectivity under EVPN VPWS dual homing and dual active conditions, which is characterized by comprising a memory and a processor, wherein the memory stores a computer program, and the computer program can be executed by the processor, so as to implement the above method for confirming connectivity under EVPN VPWS dual homing and dual active conditions.
An embodiment of the present invention further provides a computer-readable storage medium, which stores a computer program, where the computer program is executable by a processor of a device where the computer-readable storage medium is located, so as to implement the method for confirming connectivity under EVPN VPWS dual-homing dual-active as described above.
In this embodiment, the CCM packet is copied and sent to another dual-homing node through the Bypass PW, so that normal transceiving of the CCM packet between the third PE node 30 and the two dual-homing nodes, i.e., the first PE node 10 and the second PE node 20, can be achieved, and service connectivity identification of the EVPN VPWS dual-homing dual-active scene can be simply and conveniently achieved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a schematic diagram of EVPN VPWS.
Fig. 2 is an EVPN VPWS dual homing diagram.
Fig. 3 is a schematic diagram of EVPN VPWS dual-homed dual-active networking.
Fig. 4 is a schematic diagram of EVPN VPWS dual-homed dual-active configuration g.8013ccm.
Fig. 5 is a flowchart illustrating a method for confirming connectivity under EVPN VPWS dual-homing dual-active according to a first embodiment of the present invention.
Fig. 6 is a flowchart illustrating a method for confirming connectivity under EVPN VPWS dual homing and dual homing according to a second embodiment of the present invention.
Fig. 7 is a schematic structural diagram of a connection confirmation apparatus under EVPN VPWS dual-homing dual-active according to a third embodiment of the present invention.
Fig. 8 is a schematic structural diagram of a connection confirming apparatus under EVPN VPWS dual homing and dual homing according to a fourth embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to better understand the technical scheme of the invention, the following detailed description of the embodiments of the invention is made with reference to the accompanying drawings.
It should be understood that the described embodiments are only some embodiments of the invention, and not all embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of the present invention 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.
The invention is described in further detail below with reference to the following detailed description and accompanying drawings:
referring to fig. 4 and 5, a first embodiment of the present invention provides a method for confirming connectivity under EVPN VPWS dual-homing and dual-active, which includes:
at the dual-homed, dual-alive first PE node 10:
s101, receiving a CCM message sent by a third PE node;
s102, matching PW access interface indexes and formats of CCM messages through issued ACL rules;
s103, if the matching is successful, copying the CCM message, and sending the CCM message to a second PE node through a Bypass PW, so that the second PE node receives the CCM message through the Bypass PW, decapsulating the CCM message, and sending the CCM message to an AC MEP for processing.
Specifically, in this embodiment, for example, the AC port of the third PE node 30 obtains the CCM packet from the second CE node 50, processes the CCM packet through the load sharing algorithm of the PW ECMP, and sends the CCM packet to the first PE node 10. Thus, CCM transceiving between the first PE node 10 and the third PE node 30 is normal, and MEPs can normally discover each other.
For a single ACL scheme, firstly, determining whether a first PE node 10 and a second PE node 20 are dual-homed nodes or not through configuration, if so, issuing an ACL rule, then matching a PW access interface index from a third PE node 30 to the first PE node 10 through the ACL rule, and simultaneously matching the format of a CCM message; if the matching is successful, the ACL rule is hit, and on the basis of forwarding the CCM packet to the first CE node 40, the first PE node 10 simultaneously copies the CCM packet and sends the copied CCM packet to the Bypass PW between the first PE node 10 and the second PE 20. The second PE node 20 receives the CCM packet forwarded by the Bypass PW, decapsulates the CCM packet, and sends the CCM packet to its corresponding AC MEP for processing.
It should be noted that, in other embodiments of the present invention, it is also possible that the AC port of the third PE node 30 obtains the CCM packet from the second CE node 50, and sends the CCM packet to the second PE node 20 after being processed by the PW ECMP load sharing algorithm, and these schemes are within the protection scope of the present invention.
Referring to fig. 4 and fig. 6, a second embodiment of the present invention further provides a method for confirming connectivity under EVPN VPWS dual homing and dual activity, which includes:
at a dual-homed, dual-alive first PE node:
s201, receiving a CCM message sent by a third PE node;
s202, adding the AC and the Bypass PW of the first PE into a multicast group;
s203, matching the PW access interface index and the format of the CCM message through the issued ACL rule;
s204, if the matching is successful, the multicast group is redirected, the CCM message is forwarded to the AC MEP corresponding to the AC, and the CCM message is forwarded to the second PE through the Bypass PW, so that the second PE node decapsulates the received CCM message and sends the CCM message to the AC MEP corresponding to the CCM message for processing.
Specifically, in this embodiment, for example, the AC port of the third PE node 30 obtains the CCM packet from the second CE node 50, processes the CCM packet through the load sharing algorithm of the PW ECMP, and sends the CCM packet to the first PE node 10. Thus, CCM transceiving between the first PE node 10 and the third PE node 30 is normal, and MEPs can normally discover each other.
For the embodiment, taking the dual-homed first PE node 10 as an example, if it can be confirmed to be a dual-homed dual-active node through configuration, the corresponding AC port and Bypass PW are added to the multicast group. Meanwhile, an ACL rule is issued, the PW access interface index from the third PE node 30 to the first PE node 10 is matched through the ACL rule, and the format of the CCM message is matched at the same time; if the ACL rule is hit, the multicast group is redirected, the CCM packet forwarded through the AC port is destined for the AC MEP, and the CCM packet forwarded through the Bypass PW is destined for the second PE node 20. And receiving the CCM message forwarded by the Bypass PW at the second PE node 20, decapsulating the CCM message, and sending the decapsulated CCM message to the corresponding AC MEP for processing.
It should be noted that, in other embodiments of the present invention, it is also possible that the AC port of the third PE node 30 obtains the CCM packet from the second CE node 50, and sends the CCM packet to the second PE node 20 after being processed by the PW ECMP load sharing algorithm, and these schemes are within the protection scope of the present invention.
In the two embodiments, the CCM packet is copied and sent to another dual-homing node through the Bypass PW, so that the normal receiving and sending of the CCM packet between the third PE node 30 and the two dual-homing nodes, namely the first PE node 10 and the second PE node 20, can be realized, and the service connectivity identification of the EVPN VPWS dual-homing dual-activity scene can be simply and conveniently realized.
Referring to fig. 7, a third embodiment of the present invention further provides a device for confirming connectivity under EVPN VPWS dual-homing and dual-homing conditions, which includes:
a first message receiving unit 310, configured to receive a CCM message sent by a third PE node;
a first matching unit 320, configured to match the PW incoming interface index and the format of the CCM packet according to the issued ACL rule;
and the copying unit 330 is configured to copy the CCM message and send the CCM message to the second PE node through a Bypass PW if matching is successful, so that the second PE node receives the CCM message through the Bypass PW, decapsulates the CCM message, and sends the decapsulated CCM message to an AC MEP for processing.
Referring to fig. 8, a fourth embodiment of the present invention further provides a device for confirming connectivity under EVPN VPWS dual homing and dual homing, including:
a second message receiving unit 410, configured to receive a CCM message sent by a third PE node;
an adding unit 420, configured to add the AC and Bypass PW of the first PE to a multicast group;
a second matching unit 430, configured to match the PW incoming interface index and the format of the CCM packet according to the issued ACL rule;
and a redirecting unit 440, configured to redirect to the multicast group if the matching is successful, forward the CCM packet to an AC MEP corresponding to the AC, and forward the CCM packet to a second PE through a Bypass PW, so that the second PE node decapsulates the received CCM packet and sends the decapsulated CCM packet to the AC MEP corresponding to the decapsulated CCM packet to process the decapsulated CCM packet.
The fifth embodiment of the present invention further provides a connectivity confirmation apparatus under EVPN VPWS dual homing dual active, which is characterized by comprising a memory and a processor, wherein the memory stores a computer program, and the computer program can be executed by the processor to implement the connectivity confirmation method under EVPN VPWS dual homing dual active as described above.
The sixth embodiment of the present invention further provides a computer-readable storage medium, which stores a computer program, where the computer program is executable by a processor of a device where the computer-readable storage medium is located, so as to implement the method for confirming connectivity under EVPN VPWS dual-homing dual-activity as described above.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus and method embodiments described above are illustrative only, as the flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in the embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, an electronic device, or a network device) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk. It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising one of 8230; \8230;" 8230; "does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.