CN107465613B - Link aggregation interface communication state switching method and device - Google Patents

Link aggregation interface communication state switching method and device Download PDF

Info

Publication number
CN107465613B
CN107465613B CN201610390812.0A CN201610390812A CN107465613B CN 107465613 B CN107465613 B CN 107465613B CN 201610390812 A CN201610390812 A CN 201610390812A CN 107465613 B CN107465613 B CN 107465613B
Authority
CN
China
Prior art keywords
link aggregation
aggregation interface
interface
link
lacp
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
CN201610390812.0A
Other languages
Chinese (zh)
Other versions
CN107465613A (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.)
Beijing Huawei Digital Technologies Co Ltd
Original Assignee
Beijing Huawei Digital 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 Beijing Huawei Digital Technologies Co Ltd filed Critical Beijing Huawei Digital Technologies Co Ltd
Priority to CN201610390812.0A priority Critical patent/CN107465613B/en
Publication of CN107465613A publication Critical patent/CN107465613A/en
Application granted granted Critical
Publication of CN107465613B publication Critical patent/CN107465613B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/45Provisions for supporting expansion
    • 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. local area networks [LAN], wide area networks [WAN]
    • H04L12/46Interconnection of networks
    • H04L12/4604LAN interconnection over a backbone network, e.g. Internet, Frame Relay
    • H04L12/462LAN interconnection over a bridge based backbone
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/24Multipath
    • H04L45/245Link aggregation, e.g. trunking

Abstract

The embodiment of the invention provides a method and a device for switching communication states of a link aggregation interface, wherein the method comprises the following steps: the method comprises the steps that a user edge (CE) device determines whether a link between a first link aggregation interface of the CE device and a link aggregation interface of a first service edge (PE) device fails; if a link failure occurs, the CE device switches the first link aggregation interface to an inactive state, and switches a second link aggregation interface, which is connected to the CE device and a second PE device, to an active state; and the CE equipment sends a first Link Aggregation Control Protocol (LACP) message to second PE equipment through the second link aggregation interface so that the second PE equipment switches the link aggregation interface of the second PE into an active state according to the first LACP message. The method and the device for switching the communication state of the link aggregation interface provided by the embodiment of the invention improve the switching speed of cross-equipment link aggregation.

Description

Link aggregation interface communication state switching method and device
Technical Field
The embodiment of the invention relates to the field of communication, in particular to a method and a device for switching communication states of a link aggregation interface.
Background
Customer Edge (CE) devices are typically Customer premises routers or switches to which service providers are connected. The CE device provides network service access for a user by connecting to a service Edge (PE) device of a service Provider network. And a communication link is established between the physical interface of the CE equipment and the physical interface of the PE equipment to realize data forwarding. In order to increase the bandwidth and improve the reliability of communication, a user binds a plurality of physical interfaces of the CE device and the PE device together by configuration, respectively, to form a link aggregation interface of the CE device and a link aggregation interface of the PE device. The CE equipment and the PE equipment establish a plurality of communication links through a plurality of physical interfaces in the link aggregation interface, and simultaneously forward data to an opposite terminal through the plurality of communication links, so as to realize load sharing of data traffic in each physical interface. In the process of forwarding data between the CE device and the PE device, in order to prevent a communication link between the CE device and the PE device from failing and causing a data packet loss, the CE device is usually connected to the first PE device and the second PE device through a link aggregation interface. The link aggregation interface of the CE device and the link aggregation interface of the first PE device are in an active state, and normal data forwarding can be performed. The link aggregation interface of the second PE device is in an inactive state, and the CE device and the second PE device do not perform data forwarding. When a communication link between the CE device and the first PE device fails, the link aggregation interface of the first PE device needs to be switched to an inactive state, and the link aggregation interface of the second PE device needs to be switched to an active state, so that the CE device stops data forwarding with the first PE device and starts data forwarding with the second PE device.
In the prior art, when a communication link between a CE device and a first PE device fails, a state switching process of link aggregation interfaces of the first PE device and a second PE device is as follows: 1. the first PE device switches a Link Aggregation interface of the first PE device to an inactive state, and sends a Link Aggregation Control Protocol (LACP) message to the CE device, so that the CE device switches the Link Aggregation interface connected with the first PE device to the inactive interface according to the LACP message. 2. The first PE equipment sends an LACP message to the second PE equipment, and the message carries the fault information of the link aggregation interface of the first PE equipment. 3. After receiving the LACP message, the second PE device finds that the link aggregation interface of the first PE device is faulty, switches the link aggregation interface on the second PE device to an active state, and then sends the LACP message to the CE device, so that the CE device switches the link aggregation interface, connected between the CE device and the second PE device, to the active state according to the LACP message sent by the second PE device, and then the CE device can perform data forwarding with the second PE device.
However, in the prior art, when the communication states of the link aggregation interfaces of the first PE device and the second PE device need to be switched, an LACP negotiation with the CE device needs to be performed through the first PE device, the LACP negotiation with the second PE device needs to be performed through the first PE device, and the LACP negotiation with the CE device needs to be performed through the second PE device, which are performed three times of negotiation processes.
Disclosure of Invention
The embodiment of the invention provides a method and a device for switching communication states of a link aggregation interface, which are used for solving the problems of low switching speed of the communication states of a cross-equipment link aggregation interface and waste of system resources in the prior art.
In a first aspect, an embodiment of the present invention provides a method for switching a communication state of a link aggregation interface, where the method includes:
the method comprises the steps that a user edge (CE) device determines whether a link between a first link aggregation interface of the CE device and a link aggregation interface of a first service edge (PE) device fails; if a link failure occurs, the CE device switches the first link aggregation interface to an inactive state, and switches a second link aggregation interface, connected with the second PE device, of the CE device to an active state; the CE device no longer performs data forwarding with the first PE device. And then, the CE device sends a first link aggregation control protocol LACP message to the second PE device through the second link aggregation interface, so that the second PE device switches the link aggregation interface of the second PE into an active state according to the first LACP message, thereby implementing data forwarding between the CE device and the second PE device.
On the basis of the foregoing embodiment, the determining, by the customer edge CE device, whether a link between a first link aggregation interface of the CE device and a link aggregation interface of the first service edge PE device fails includes:
the CE equipment determines whether the number of links in an active state between a first link aggregation interface of the CE equipment and a link aggregation interface of the first PE equipment is smaller than a preset threshold value;
if the number of links in an active state between a first link aggregation interface of the CE device and a link aggregation interface of the first PE device is less than a preset threshold, the CE device switches the first link aggregation interface to an inactive state, and switches a second link aggregation interface, which is connected between the CE device and the second PE device, to an active state.
On the basis of the foregoing embodiment, before the customer edge CE device determines whether a link between a first link aggregation interface of the CE device and a link aggregation interface of the first service edge PE device fails, the method further includes:
the CE device determines that the first link aggregation interface is in an active state and determines that the second link aggregation interface is in an inactive state.
On the basis of the foregoing embodiment, before the determining, by the CE device, that the first link aggregation interface is in the active state, the method further includes:
the CE equipment receives a second LACP message sent by the first PE equipment through the first link aggregation interface, and receives a third LACP message sent by the second PE equipment through the second link aggregation interface; and the CE equipment determines that the first link aggregation interface is in an active state according to the second LACP message and the third LACP message, and determines that the second link aggregation interface is in an inactive state.
On the basis of the above embodiment, the second LACP message carries the system ID of the first PE device, and the third LACP message carries the system ID of the second PE device;
the CE equipment determines that the first link aggregation interface is in an active state and determines that the second link aggregation interface is in an inactive state according to the system ID of the first PE equipment and the system ID of the second PE equipment.
On the basis of the foregoing embodiment, the determining, by the CE device, that the first link aggregation interface is in an active state and the second link aggregation interface is in an inactive state includes:
and the CE equipment determines that the first link aggregation interface is in an active state and determines that the second link aggregation interface is in an inactive state according to preset configuration information.
In a second aspect, an embodiment of the present invention provides a method for switching a communication state of a link aggregation interface, including:
the second service edge PE equipment receives a first LACP message sent by a second link aggregation interface of the user edge CE equipment through the link aggregation interface;
and the second PE equipment switches the link aggregation interface of the second PE into an active state according to the first LACP message so as to realize data forwarding between the CE equipment and the second PE equipment.
On the basis of the above embodiment, before the second service edge PE device receives, through the link aggregation interface, the first LACP packet sent by the first link aggregation interface of the customer edge CE device, the method further includes:
and the second PE equipment sends a third LACP message to the CE equipment through the link aggregation interface so that the CE equipment can determine that the second link aggregation interface is in an inactive state according to the third LACP message.
On the basis of the foregoing embodiment, the third LACP message carries the system ID of the second PE device, and the second PE device sends the system ID of the second PE device to the CE device through the link aggregation interface, so that the CE device determines that the second link aggregation interface is in an inactive state according to the system ID of the second PE device.
In a third aspect, an embodiment of the present invention provides a link aggregation interface communication state switching apparatus, where the apparatus is disposed in a customer edge CE device, and includes:
a processing module, configured to determine whether a link between a first link aggregation interface of a CE device and a link aggregation interface of a first service edge PE device fails;
if a link failure occurs, the processing module is further configured to switch the first link aggregation interface to an inactive state, and switch a second link aggregation interface, to which the CE device is connected to the second PE device, to an active state;
and the sending module is used for sending a first link aggregation control protocol LACP message to the second PE equipment through the second link aggregation interface so that the second PE equipment switches the link aggregation interface of the second PE equipment into an active state according to the first LACP message.
On the basis of the above embodiment, the processing module is configured to:
determining whether the number of links in an active state between a first link aggregation interface of a CE device and a link aggregation interface of a first PE device is less than a preset threshold value;
if the number of active links between the first link aggregation interface of the CE device and the link aggregation interface of the first PE device is less than a preset threshold value, the CE device and the PE device are in an active state
The processing module is configured to switch the first link aggregation interface to an inactive state, and switch a second link aggregation interface, to which the CE device is connected to the second PE device, to an active state.
On the basis of the foregoing embodiment, the determining module is further configured to determine that the first link aggregation interface is in an active state, and determine that the second link aggregation interface is in an inactive state.
On the basis of the above embodiment, the apparatus further includes:
the receiving module is used for receiving a second LACP message sent by the first PE equipment through the first link aggregation interface and receiving a third LACP message sent by the second PE equipment through the second link aggregation interface;
and the processing module is used for determining the first link aggregation interface to be in an active state and determining the second link aggregation interface to be in an inactive state according to the second LACP message and the third LACP message.
On the basis of the above embodiment, the second LACP message carries the system ID of the first PE device, and the third LACP message carries the system ID of the second PE device;
a processing module to:
and determining that the first link aggregation interface is in an active state and the second link aggregation interface is in an inactive state according to the system ID of the first PE device and the system ID of the second PE device.
On the basis of the above embodiment, the processing module is configured to:
and the CE equipment determines that the first link aggregation interface is in an active state and the second link aggregation interface is in an inactive state according to the preset configuration information.
In a fourth aspect, an embodiment of the present invention provides a device for switching a communication state of a link aggregation interface, where the device is disposed in a second service edge PE device, and includes:
a receiving module, configured to receive, through a link aggregation interface of a second service edge PE device, a first LACP message sent by a second link aggregation interface of a user edge CE device;
and the processing module is used for switching the link aggregation interface of the second PE into an active state according to the first LACP message.
On the basis of the above embodiment, the apparatus further includes:
and the transmitting module is configured to transmit the third LACP packet to the CE device through the link aggregation interface of the second PE device, so that the CE device determines that the second link aggregation interface is in an inactive state according to the third LACP packet.
On the basis of the above embodiment, the third LACP message carries the system ID of the second PE device,
a processing module to: and sending the system ID of the second PE device to the CE device through the link aggregation interface of the second PE device, so that the CE device determines that the second link aggregation interface is in an inactive state according to the system ID of the second PE device.
In a fifth aspect, an embodiment of the present invention provides a device for switching a communication state of a link aggregation interface, where the device is disposed in a customer edge CE device, and includes:
a processor configured to determine whether a link between a first link aggregation interface of a CE device and a link aggregation interface of a first service edge PE device fails;
if a link failure occurs, the processor is further configured to switch the first link aggregation interface to an inactive state, and switch a second link aggregation interface, to which the CE device is connected to the second PE device, to an active state;
and the transmitter is configured to send a first link aggregation control protocol LACP message to the second PE device through the second link aggregation interface, so that the second PE device switches the link aggregation interface of the second PE device to an active state according to the first LACP message.
In a sixth aspect, an embodiment of the present invention provides a device for switching a communication state of a link aggregation interface, where the device is disposed in a second service edge PE device, and includes:
a receiver, configured to receive, through a link aggregation interface of a second service edge PE device, a first LACP packet sent by a second link aggregation interface of a user edge CE device;
and the processor is used for switching the link aggregation interface of the second PE into an active state according to the first LACP message.
In the method and apparatus for switching communication states of a link aggregation interface provided in the embodiments of the present invention, two link aggregation interfaces (i.e., a first link aggregation interface and a second link aggregation interface) are configured in a CE device and are respectively connected to a first PE device and a second PE device, and when the CE device determines that the number of active links between the CE device and the first PE device is less than a preset threshold, the CE device switches the second link aggregation interface to an active state and initiates LACP negotiation with the second PE device, so that the second PE device switches the link aggregation interface of the second PE to the active state, and the links are aggregated, thereby implementing data forwarding between the CE device and the second PE device. By adopting the link aggregation interface communication state switching method provided by the embodiment of the invention, the communication state switching between the CE equipment and the first PE equipment and the second PE equipment can be realized only by initiating LACP negotiation once by the CE equipment, the switching process is simple, the switching speed of cross-equipment link aggregation is improved, and the system resources are saved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, a brief description will be given below of the drawings required for the embodiments or the technical solutions in the prior art, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic diagram of a frame structure of a link aggregation interface communication state switching system according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a method for switching a communication state of a link aggregation interface according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a link aggregation interface communication state switching device according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a link aggregation interface communication state switching device according to another embodiment of the present invention;
fig. 5 is a schematic structural diagram of a link aggregation interface communication state switching device according to another embodiment of the present invention;
fig. 6 is a schematic structural diagram of a link aggregation interface communication state switching device according to another embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, 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 some, but not all, embodiments of the present invention. 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.
The embodiment of the invention provides a method and a device for switching communication states of a link aggregation interface, which are used for realizing state switching between link aggregation interfaces of two service Edge (Provider Edge, for short) devices connected between a CE device and a Customer Edge (CE). The method includes configuring a first link aggregation interface and a second link aggregation interface on a CE device, and the CE device is connected with a link aggregation interface of a first PE device and a link aggregation interface of a second PE device through the first link aggregation interface and the second link aggregation interface respectively. In an initial state, a first link aggregation interface of the CE device and a link aggregation interface of the first PE device are in an active state, and data forwarding is performed between the CE device and the first PE device. When the CE device determines that the link between the CE device and the first PE device fails, switching a second link aggregation interface connected to the CE device and the second PE device to an active state, then the CE device initiates LACP negotiation with the second PE device, and switches a link aggregation interface communication state of the second PE device to the active state, thereby implementing data forwarding between the CE device and the second PE device. The method and the device for switching the communication states of the link aggregation interfaces provided by the embodiments of the present invention can implement switching of the communication states of the link aggregation interfaces of the first PE device and the second PE device only by initiating LACP negotiation once by the CE device, and the switching process is simple, thereby improving the switching speed of the communication states of the link aggregation interfaces of the first PE device and the second PE device, and saving system resources.
Fig. 1 is a schematic diagram of a framework structure of a link aggregation interface communication state switching system according to an embodiment of the present invention.
Referring to fig. 1, the system for switching the communication state of the link aggregation interface according to the present invention includes a CE device 10, and a first PE device 20 and a second PE device 30 respectively connected to the CE device 10. The first PE device 20 and the second PE device 30 are router devices provided by a service provider. A first link aggregation interface CE1 and a second link aggregation interface CE2 are configured on the CE device 10. The CE device 10 is connected to the link aggregation interface PE1 of the first PE device 20 through the first link aggregation interface CE1, and is connected to the link aggregation interface PE2 of the second PE device 30 through the second link aggregation interface CE 2.
Fig. 2 is a flowchart illustrating a method for switching a communication state of a link aggregation interface according to an embodiment of the present invention.
The voice recognition method of the embodiment of the invention is realized by the link aggregation interface communication state switching system shown in fig. 1. Specifically, referring to fig. 2, the method for switching the communication state of the link aggregation interface according to the embodiment of the present invention includes:
s101: the method comprises the steps that a user edge (CE) device determines whether a link between a first link aggregation interface of the CE device and a link aggregation interface of a first service edge (PE) device fails;
specifically, the determining, by the customer edge CE device, whether a link between a first link aggregation interface of the CE device and a link aggregation interface of a first service edge PE device fails includes:
the CE device determines whether the number of links in an active state between a first link aggregation interface of the CE device and a link aggregation interface of the first PE device is less than a preset threshold.
If the number of links in an active state between the first link aggregation interface of the CE device and the link aggregation interface of the first PE device is less than a preset threshold value, the CE device and the PE device are connected in series
And the CE device switches the first link aggregation interface into an inactive state and switches a second link aggregation interface connected with the second PE device into an active state.
Specifically, the first link aggregation interface is a logical interface bound by one or more physical interfaces. Thus, the first link aggregation interface comprises one or more physical interfaces, one for each communication link. In the process of communicating between the CE device and the first PE device, the current communication state of each link between the CE device and the first PE device may be obtained. In order to guarantee the communication quality between the CE device and the master device, the CE device configures the switching condition of the link aggregation interface in advance. For example: configuring a threshold for a minimum number of links that remain active between the CE device and a primary device. And if the number of the active links between the CE equipment and the current main equipment is less than the preset threshold value, indicating that the communication quality of the current main equipment is poor and switching is required.
S102: and if the link fails, the CE device switches the first link aggregation interface to an inactive state, and switches a second link aggregation interface, connected with a second PE device, of the CE device to an active state.
Specifically, when the CE device determines that the number of links in an active state between a first link aggregation interface of the CE device and a link aggregation interface of the first PE device is smaller than the preset threshold, it is determined that a link between the CE device and the first PE device fails. At this time, the CE device may switch the states of the first link aggregation interface and the second link aggregation interface, so that the CE device no longer communicates with the first PE device.
S103: and the CE equipment sends a first Link Aggregation Control Protocol (LACP) message to second PE equipment through the second link aggregation interface so that the second PE equipment switches the link aggregation interface of the second PE equipment into an active state to communicate with the CE equipment.
Specifically, the first link aggregation interface and the second link aggregation interface are both configured on the CE device, and are used to implement communication switching between the CE device and the first PE device and the second PE device by switching states of the first link aggregation interface and the second link aggregation interface on the CE device. And when the first link aggregation interface of the CE device and the link aggregation interface of the first PE device are in an active state, performing data forwarding between the CE device and the first PE device in the current state, and when the first link aggregation interface of the CE device and the link aggregation interface of the first PE device are in an inactive state, not performing data forwarding between the CE device and the first PE device.
S104: the second service edge PE device receives the first LACP message sent by a second link aggregation interface of the user edge CE device through the link aggregation interface;
specifically, the CE device may notify the second PE device of information such as its own system priority information, system Media Access Control (MAC) address, interface priority information, and interface number by sending the first LACP packet to the second PE device.
S105: and the second PE equipment switches the link aggregation interface of the second PE into an active state according to the first LACP message.
After receiving the information sent by the CE device, the second PE device may compare the information with information stored in a physical interface of the second PE device, and the two parties agree on which physical interfaces can become active interfaces, thereby determining which physical interfaces on the second PE device can become active interfaces, and forming a link aggregation interface for communicating with the CE device.
On the basis of the foregoing embodiment, before the customer edge CE device determines whether a link between a first link aggregation interface of the CE device and a link aggregation interface of a first service edge PE device fails, the method further includes:
and the CE equipment determines that the first link aggregation interface is in an active state and the second link aggregation interface is in an inactive state.
Specifically, the CE may determine the active states of the first link aggregation interface and the second link aggregation interface in several ways, including but not limited to:
in one implementation, before the determining, by the CE device, that the first link aggregation interface is in an active state, the method further includes: the CE equipment receives a second LACP message sent by the first PE equipment through the first link aggregation interface, and receives a third LACP message sent by the second PE equipment through the second link aggregation interface;
the determining, by the CE device, that the first link aggregation interface is in an active state, and the second link aggregation interface is in an inactive state, where the determining includes:
and determining that the first link aggregation interface is in an active state and the second link aggregation interface is in an inactive state according to the second LACP message and the third LACP message.
Specifically, the second LACP message carries a system identifier (Identification, abbreviated as ID) of the first PE device, and the third LACP message carries a system ID of the second PE device.
The determining, by the CE device, that the first link aggregation interface is in an active state, and the second link aggregation interface is in an inactive state, includes:
and determining that the first link aggregation interface is in an active state and the second link aggregation interface is in an inactive state according to the system Identification (ID) of the first PE device and the system ID of the second PE device. Specifically, the system ID of the first PE device may include a MAC address and system priority information of the first PE device, and the system ID of the second PE device may include a MAC address and system priority information of the second PE device.
In another implementation, the determining, by the CE device, that the first link aggregation interface is in an active state and the second link aggregation interface is in an inactive state includes:
and the CE equipment determines that the first link aggregation interface is in an active state and the second link aggregation interface is in an inactive state according to preset configuration information.
Specifically, a user may specify the CE device to communicate with the first PE device as needed, and the CE device may determine that the first link aggregation interface is in an active state and the second link aggregation interface is in an inactive state according to preset configuration information. The CE device may communicate with the first PE device.
In the above method, the first PE device may itself sense the communication state of the link between the CE device and the first PE device, that is, the first PE device may know whether the link is faulty or not and the number of links that maintain an active state. When the first PE device determines that the communication state between the first PE device and the CE device no longer satisfies the communication requirement, the first PE device may switch the state of the first link aggregation interface to an inactive state by itself, and the first PE device does not forward data to the CE device any more, without the CE device initiating LACP negotiation to the first PE device.
In the method for switching communication states of a link aggregation interface provided in the embodiment of the present invention, two link aggregation interfaces (that is, the first link aggregation interface and the second link aggregation interface) are configured in the CE device and are respectively connected to the first PE device and the second PE device, and when the CE device determines that the number of active links between the CE device and the first PE device is smaller than a preset threshold, the CE device switches the second link aggregation interface to an active state and initiates LACP negotiation with the second PE device, so that the second PE device determines the link aggregation interface in communication with the CE device, and data forwarding between the CE device and the second PE device can be implemented. By adopting the link aggregation interface communication state switching method provided by the embodiment of the invention, the communication state switching between the CE device and the first PE device and the second PE device can be realized only by initiating LACP negotiation once by the CE device, the switching process is simple, the switching speed of cross-device link aggregation is improved, and the system resources are saved.
Fig. 3 is a schematic structural diagram of a link aggregation interface communication state switching device according to an embodiment of the present invention.
Referring to fig. 3, a link aggregation interface communication state switching apparatus according to an embodiment of the present invention is disposed in a CE device, and the apparatus includes:
a processing module 310, configured to determine whether a link between a first link aggregation interface of the CE device and a link aggregation interface of a first service edge PE device fails;
if a link failure occurs, the processing module 310 is further configured to switch the first link aggregation interface to an inactive state, and switch a second link aggregation interface, where the CE device is connected to a second PE device, to an active state;
a sending module 320, configured to send a first link aggregation control protocol LACP packet to a second PE device through the second link aggregation interface, so that the second PE device switches the link aggregation interface of the second PE device to an active state.
On the basis of the foregoing embodiment, the processing module 310 is configured to:
determining whether the number of links in an active state between a first link aggregation interface of the CE device and a link aggregation interface of the first PE device is less than a preset threshold;
if the number of links in an active state between the first link aggregation interface of the CE device and the link aggregation interface of the first PE device is less than a preset threshold value, the CE device and the PE device are connected in series
The processing module 310 is configured to switch the first link aggregation interface to an inactive state, and switch a second link aggregation interface, where the CE device is connected to a second PE device, to an active state.
On the basis of the foregoing embodiment, the determining module is further configured to determine that the first link aggregation interface is in an active state, and the second link aggregation interface is in an inactive state.
On the basis of the above embodiment, the apparatus further includes:
a receiving module 330, configured to receive, through the first link aggregation interface, a second LACP packet sent by the first PE device, and receive, through the second link aggregation interface, a third LACP packet sent by the second PE device;
the processing module 310 is configured to determine that the first link aggregation interface is in an active state and the second link aggregation interface is in an inactive state according to the second LACP packet and the third LACP packet.
On the basis of the above embodiment, the second LACP message carries the system identifier ID of the first PE device, and the third LACP message carries the system ID of the second PE device;
the processing module 310 is configured to:
and determining that the first link aggregation interface is in an active state and the second link aggregation interface is in an inactive state according to the system Identification (ID) of the first PE device and the system ID of the second PE device.
On the basis of the above embodiment, the processing module 310 is configured to:
and the CE equipment determines that the first link aggregation interface is in an active state and the second link aggregation interface is in an inactive state according to preset configuration information.
Specifically, the link aggregation interface communication state switching device of the present invention is used to implement the link aggregation interface communication state switching method provided in the foregoing method embodiment, and the specific implementation manner and technical effect are similar to those of the method embodiment, and are not described herein again.
Fig. 4 is a schematic structural diagram of a link aggregation interface communication state switching device according to another embodiment of the present invention.
Referring to fig. 4, a link aggregation interface communication state switching apparatus provided in an embodiment of the present invention is disposed in a second service edge PE device, and includes:
a receiving module 410, configured to receive, through the link aggregation interface of the second service edge PE device, a first LACP message sent by a second link aggregation interface of a user edge CE device;
the processing module 420 is configured to switch the link aggregation interface of the second PE device to an active state according to the first LACP packet.
On the basis of the above embodiment, the apparatus further includes:
a sending module 430, configured to send a third LACP packet to the CE device through the link aggregation interface of the second PE device, so that the CE device determines that the second link aggregation interface is in an inactive state according to the third LACP packet.
On the basis of the foregoing embodiment, the third LACP message carries the system ID of the second PE device,
the processing module 420 is configured to: and sending the system ID of the second PE device to the CE device through the link aggregation interface of the second PE device, so that the CE device determines that the second link aggregation interface is in an inactive state according to the system ID of the second PE device.
Specifically, the link aggregation interface communication state switching device of the present invention is used to implement the link aggregation interface communication state switching method provided in the foregoing method embodiment, and the specific implementation manner and technical effect are similar to those of the method embodiment, and are not described herein again.
Fig. 5 is a schematic structural diagram of a link aggregation interface communication state switching device according to another embodiment of the present invention.
Specifically, referring to fig. 5, the apparatus for switching a communication state of a link aggregation interface according to another embodiment of the present invention is disposed in a customer edge CE device, and includes:
a processor 510, configured to determine whether a link between a first link aggregation interface of the CE device and a link aggregation interface of a first service edge PE device fails;
if a link failure occurs, the processor 510 is further configured to switch the first link aggregation interface to an inactive state, and switch a second link aggregation interface, where the CE device is connected to a second PE device, to an active state;
a transmitter 520, configured to send a first link aggregation control protocol LACP packet to a second PE device through the second link aggregation interface, so that the second PE device determines, according to the first LACP packet, a link aggregation interface where the second PE device communicates with the CE device.
Fig. 6 is a schematic structural diagram of a link aggregation interface communication state switching device according to another embodiment of the present invention.
Specifically, referring to fig. 6, the apparatus for switching a communication state of a link aggregation interface according to another embodiment of the present invention is disposed in a second service edge PE device, and includes:
a receiver 610, configured to receive, through a link aggregation interface of the second service edge PE device, a first LACP packet sent by a second link aggregation interface of a customer edge CE device;
a processor 620, configured to determine, according to the first LACP packet, a link aggregation interface where the second PE device communicates with the CE device.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a readable storage medium of a computer, a mobile phone or other portable devices. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be subjected to the equivalent first acoustic model; these modifications, or the first acoustic model, do not substantially depart from the scope of the embodiments of the present invention.

Claims (18)

1. A method for switching communication states of a link aggregation interface is characterized by comprising the following steps:
the method comprises the steps that a user edge (CE) device determines whether a link between a first link aggregation interface of the CE device and a link aggregation interface of a first service edge (PE) device fails;
if a link failure occurs, the CE device switches the first link aggregation interface to an inactive state, and switches a second link aggregation interface, which is connected to the CE device and a second PE device, to an active state;
the CE equipment sends a first Link Aggregation Control Protocol (LACP) message to second PE equipment through the second link aggregation interface, wherein the first LACP message comprises system priority information, a system Media Access Control (MAC) address, interface priority information and interface number information of the CE equipment, so that the second PE equipment switches the link aggregation interface of the second PE equipment to an active state according to the first LACP message;
the CE device is configured with a first link aggregation interface and a second link aggregation interface, and the CE device is connected to the link aggregation interface of the first PE device through the first link aggregation interface, or the CE device is connected to the link aggregation interface of the second PE device through the second link aggregation interface.
2. The method of claim 1, wherein the determining, by the Customer Edge (CE) device, whether a link between a first link aggregation interface of the CE device and a link aggregation interface of a first service edge (PE) device is failed comprises:
the CE equipment determines whether the number of active links between a first link aggregation interface of the CE equipment and a link aggregation interface of the first PE equipment is less than a preset threshold value;
if a link failure occurs, the switching, by the CE device, the first link aggregation interface to the inactive state, and the switching, by the CE device, the second link aggregation interface connected to the second PE device to the active state includes:
if the number of links in an active state between the first link aggregation interface of the CE device and the link aggregation interface of the first PE device is less than a preset threshold value, the CE device and the PE device are connected in series
And the CE device switches the first link aggregation interface into an inactive state and switches a second link aggregation interface connected with the second PE device into an active state.
3. The method according to claim 1 or 2, wherein before the customer edge CE device determines whether a link between a first link aggregation interface of the CE device and a link aggregation interface of a first service edge PE device fails, the method further comprises:
and the CE equipment determines that the first link aggregation interface is in an active state and the second link aggregation interface is in an inactive state.
4. The method according to claim 3, wherein before the CE device determines that the first link aggregation interface is active, further comprising: the CE equipment receives a second LACP message sent by the first PE equipment through the first link aggregation interface, and receives a third LACP message sent by the second PE equipment through the second link aggregation interface;
the determining, by the CE device, that the first link aggregation interface is in an active state, and the second link aggregation interface is in an inactive state, where the determining includes:
and determining the first link aggregation interface to be in an active state and determining the second link aggregation interface to be in an inactive state according to the second LACP message and the third LACP message.
5. The method of claim 4, wherein the second LACP message carries a system Identifier (ID) of the first PE device, and wherein the third LACP message carries a system ID of the second PE device;
the determining, by the CE device, that the first link aggregation interface is in an active state, and the second link aggregation interface is in an inactive state, includes:
and determining that the first link aggregation interface is in an active state and the second link aggregation interface is in an inactive state according to the system ID of the first PE device and the system ID of the second PE device.
6. The method according to claim 3, wherein the determining, by the CE device, that the first link aggregation interface is in an active state and the second link aggregation interface is in an inactive state comprises:
and the CE equipment determines that the first link aggregation interface is in an active state and the second link aggregation interface is in an inactive state according to preset configuration information.
7. A method for switching communication states of a link aggregation interface is characterized by comprising the following steps:
a second service edge PE device receives a first LACP message sent by a second link aggregation interface of a user edge CE device through a link aggregation interface, wherein the first LACP message comprises system priority information, a system Media Access Control (MAC) address, interface priority information and interface number information of the CE device;
the second PE equipment switches the link aggregation interface of the second PE equipment into an active state according to the first LACP message;
the CE device is configured with a first link aggregation interface and a second link aggregation interface, and the CE device is connected to the link aggregation interface of the first PE device through the first link aggregation interface, or the CE device is connected to the link aggregation interface of the second PE device through the second link aggregation interface.
8. The method according to claim 7, wherein before the second service edge PE device receives the first LACP packet sent by the first link aggregation interface of the customer edge CE device through the link aggregation interface, the method further comprises:
and the second PE equipment sends a third LACP message to the CE equipment through the link aggregation interface, so that the CE equipment determines that the second link aggregation interface is in an inactive state according to the third LACP message.
9. The method of claim 8, wherein the third LACP message carries a system ID of the second PE device,
the second PE device sends a third LACP packet to the CE device through the link aggregation interface, so that the CE device determines that the second link aggregation interface is in an inactive state according to the third LACP packet, including:
and the second PE device sends the system ID of the second PE device to the CE device through the link aggregation interface, so that the CE device determines that the second link aggregation interface is in an inactive state according to the system ID of the second PE device.
10. A link aggregation interface communication state switching apparatus, the apparatus being disposed in a Customer Edge (CE) device, comprising:
a processing module, configured to determine whether a link between a first link aggregation interface of the CE device and a link aggregation interface of a first service edge PE device fails;
if a link failure occurs, the processing module is further configured to switch the first link aggregation interface to an inactive state, and switch a second link aggregation interface, which is connected between the CE device and the second PE device, to an active state;
a sending module, configured to send a first link aggregation control protocol LACP packet to a second PE device through the second link aggregation interface, where the first LACP packet includes system priority information, a system Media Access Control (MAC) address, interface priority information, and interface number information of the CE device, so that the second PE device switches the link aggregation interface of the second PE device to an active state according to the first LACP packet;
the CE device is configured with a first link aggregation interface and a second link aggregation interface, and the CE device is connected to the link aggregation interface of the first PE device through the first link aggregation interface, or the CE device is connected to the link aggregation interface of the second PE device through the second link aggregation interface.
11. The apparatus of claim 10, wherein the processing module is configured to:
determining whether the number of links in an active state between a first link aggregation interface of the CE device and a link aggregation interface of the first PE device is less than a preset threshold;
if the number of links in an active state between the first link aggregation interface of the CE device and the link aggregation interface of the first PE device is less than a preset threshold value, the CE device and the PE device are connected in series
The processing module is configured to switch the first link aggregation interface to an inactive state, and switch a second link aggregation interface, where the CE device is connected to a second PE device, to an active state.
12. The apparatus of claim 10 or 11, wherein the determining module is further configured to determine that the first link aggregation interface is active and that the second link aggregation interface is inactive.
13. The apparatus of claim 12, further comprising:
a receiving module, configured to receive, through the first link aggregation interface, a second LACP packet sent by the first PE device, and receive, through the second link aggregation interface, a third LACP packet sent by the second PE device;
and the processing module is used for determining that the first link aggregation interface is in an active state and determining that the second link aggregation interface is in an inactive state according to the second LACP message and the third LACP message.
14. The apparatus of claim 13, wherein the second LACP message carries a system identifier ID of the first PE device, and wherein the third LACP message carries a system ID of the second PE device;
the processing module is configured to:
and determining that the first link aggregation interface is in an active state and the second link aggregation interface is in an inactive state according to the system ID of the first PE device and the system ID of the second PE device.
15. The apparatus of claim 12, wherein the processing module is configured to:
and the CE equipment determines that the first link aggregation interface is in an active state and the second link aggregation interface is in an inactive state according to preset configuration information.
16. A device for switching communication status of a link aggregation interface, the device being disposed in a second service edge PE device, comprising:
a receiving module, configured to receive, through a link aggregation interface of the second service edge PE device, a first LACP packet sent by a second link aggregation interface of a user edge CE device, where the first LACP packet includes system priority information, a system Media Access Control (MAC) address, interface priority information, and interface number information of the CE device;
a processing module, configured to switch a link aggregation interface of the second PE device to an active state according to the first LACP packet;
the CE device is configured with a first link aggregation interface and a second link aggregation interface, and the CE device is connected to the link aggregation interface of the first PE device through the first link aggregation interface, or the CE device is connected to the link aggregation interface of the second PE device through the second link aggregation interface.
17. The apparatus of claim 16, further comprising:
a sending module, configured to send a third LACP packet to the CE device through the link aggregation interface of the second PE device, so that the CE device determines, according to the third LACP packet, that the second link aggregation interface is in an inactive state.
18. The apparatus of claim 17, wherein the third LACP message carries a system ID of the second PE device,
the processing module is configured to: and sending the system ID of the second PE device to the CE device through the link aggregation interface of the second PE device, so that the CE device determines that the second link aggregation interface is in an inactive state according to the system ID of the second PE device.
CN201610390812.0A 2016-06-03 2016-06-03 Link aggregation interface communication state switching method and device Active CN107465613B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610390812.0A CN107465613B (en) 2016-06-03 2016-06-03 Link aggregation interface communication state switching method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610390812.0A CN107465613B (en) 2016-06-03 2016-06-03 Link aggregation interface communication state switching method and device

Publications (2)

Publication Number Publication Date
CN107465613A CN107465613A (en) 2017-12-12
CN107465613B true CN107465613B (en) 2020-11-06

Family

ID=60545007

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610390812.0A Active CN107465613B (en) 2016-06-03 2016-06-03 Link aggregation interface communication state switching method and device

Country Status (1)

Country Link
CN (1) CN107465613B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108900415B (en) * 2018-08-31 2021-06-22 华东计算技术研究所(中国电子科技集团公司第三十二研究所) Master-slave equipment switching method and system under MLAG interface failure

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101616067A (en) * 2008-06-27 2009-12-30 中兴通讯股份有限公司 Link switch-over method and device
CN101355515B (en) * 2008-09-05 2011-06-22 中兴通讯股份有限公司 Method for restarting link aggregation control protocol with elegance
CN101378359A (en) * 2008-10-06 2009-03-04 中兴通讯股份有限公司 Method and apparatus for switching of primary and secondary compulsion links
CN102088400A (en) * 2009-12-03 2011-06-08 华为技术有限公司 Provider edge (PE) equipment in virtual special network and switching method
CN102142948A (en) * 2010-02-02 2011-08-03 华为技术有限公司 Data forwarding method, device and system
US8488608B2 (en) * 2010-08-04 2013-07-16 Alcatel Lucent System and method for traffic distribution in a multi-chassis link aggregation
CN101984606A (en) * 2010-11-15 2011-03-09 中兴通讯股份有限公司 Device-level redundancy protection method and system based on LACP
CN105490958B (en) * 2015-12-09 2019-08-16 上海斐讯数据通信技术有限公司 A kind of method and system of LACP load balancing

Also Published As

Publication number Publication date
CN107465613A (en) 2017-12-12

Similar Documents

Publication Publication Date Title
US9692697B2 (en) Control channel establishing method, forwarding point, and controller
US9013986B2 (en) Device-level redundancy protection method and system based on link aggregation control protocol
EP2627039B1 (en) Method and device for switching aggregation links
US10819623B2 (en) Method and device for transmitting data
US20150256441A1 (en) Neighbor relationship processing method and routing device
WO2013097639A1 (en) Expanding member ports of a link aggregation group between clusters
US20140050092A1 (en) Load sharing method and apparatus
EP3029883B1 (en) Network protection method and apparatus, next-ring node, and system
CN107465613B (en) Link aggregation interface communication state switching method and device
CN104702498A (en) Method and device for reducing the number of optical connections through coordination protection
CN106130783B (en) Port fault processing method and device
EP2953299B1 (en) Protection switching method, system and node
WO2015180265A1 (en) Multi-link protection switching method and device
WO2016124117A1 (en) Method, switching device and network controller for protecting links in software-defined network (sdn)
CN101909006B (en) BFD (Bidirectional Forwarding Detection) message sending and receiving methods as well as device and communication system thereof
CN103546316B (en) A kind of method and device for transmitting OAM message
CN108337162B (en) System and method for supporting dual-homing protection
CN106992878B (en) Multicast detection method and device
CN106162564B (en) Method and device for realizing voice service of LTE (Long term evolution) fault single station
WO2017000096A1 (en) Link recovery method and network device
CN102946359B (en) Method and device for forwarding flow
US20130294290A1 (en) Method, apparatus, and system for establishing pvc link
EP3713160A1 (en) Packet transmission method and apparatus
US20210160188A1 (en) Packet processing method and system, and network device
CN104219126A (en) Automatic learning method and equipment for subring protocol VLAN (virtual local area network) in virtual channel mode

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