[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

US9270524B2 - Method and device for LACP link switching and data transmission - Google Patents

Method and device for LACP link switching and data transmission Download PDF

Info

Publication number
US9270524B2
US9270524B2 US14/225,770 US201414225770A US9270524B2 US 9270524 B2 US9270524 B2 US 9270524B2 US 201414225770 A US201414225770 A US 201414225770A US 9270524 B2 US9270524 B2 US 9270524B2
Authority
US
United States
Prior art keywords
interfaces
active
state
aggregation group
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, expires
Application number
US14/225,770
Other versions
US20140204729A1 (en
Inventor
Xiaoyi Zhang
Cheng Wang
Chenglong DING
Qi Sun
Fenghua Zhao
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Assigned to HUAWEI TECHNOLOGIES CO., LTD. reassignment HUAWEI TECHNOLOGIES CO., LTD. ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: SUN, QI, DING, Chenglong, WANG, CHENG, ZHANG, XIAOYI, ZHAO, FENGHUA
Publication of US20140204729A1 publication Critical patent/US20140204729A1/en
Application granted granted Critical
Publication of US9270524B2 publication Critical patent/US9270524B2/en
Active legal-status Critical Current
Adjusted expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0659Management of faults, events, alarms or notifications using network fault recovery by isolating or reconfiguring faulty entities
    • H04L41/0661Management of faults, events, alarms or notifications using network fault recovery by isolating or reconfiguring faulty entities by reconfiguring faulty entities
    • H04L41/0672
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • Y02B60/33
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Definitions

  • the present invention relates to the field of communication technologies, particularly to a method and a device for LACP link switching and data transmission.
  • An LACP Link Aggregation Control Protocol, link aggregation control protocol
  • Link Aggregation Control Protocol is a protocol for achieving dynamic link aggregation and disaggregation, and the aggregation is to improve transmission bandwidth and reliability of the system.
  • multiple links (member link) aggregate to a logic link with a higher bandwidth, the logic link is called an aggregation group and the link including the aggregation group is called an LACP link.
  • the number of the member links aggregated in one aggregation group is usually determined according to the bandwidth requirement of the traffic.
  • the number of active interfaces at one end of the aggregation group member link is at least larger than or equal to a preset minimum active link number for corresponding traffic transmission.
  • the aggregation group is in an UP state, the LACP link is “ON” and ready for use; when such requirement is not satisfied, that is, the number of active interfaces at one end of the aggregation group member link is smaller than the preset minimum active link number, the aggregation group is in a DOWN state, the LACP link is “OFF” and unavailable for use.
  • the LACP link switching procedure depends on the state of the LACP link aggregation group.
  • both ends of the aggregation group periodically transmit a LACPDU (LACP Data Unit) message to each other.
  • LACPDU LACP Data Unit
  • one end of the aggregation group compares information carried by the LACPDU packet, such as system priority, interface priority of the opposite end, with configuration of the local end, in the case of inconformity, adjusts configuration of the local end based on the comparison result.
  • the number of the active interfaces in the aggregation group will change in the process of adjustment.
  • the state of the aggregation group will change alternately between the UP and DOWN states, causing the LACP link to switch between “ON” and “OFF”, so that the link appears a flash-off procedure, i.e., the link is OFF and ON. Due to this “flash-off” effect, the user terminal will be “off-line” frequently, and it is needed to re-access network and re-establish data links when communication resumes after a change from “off-line” to “on-line,” which adversely affects normal communication and reduces network service level.
  • the interface when the active interface in the aggregation group changes to be an inactive interface, the interface is usually configured to be a “dead” interface having no data-transceiving function; however, if the state change of the interface is caused by reasons other than a “physical link failure,” then this can cause the message having been transmitted on the LACP link to be lost and affect normal communication.
  • embodiments of the present invention provide a method and a device for LACP link switching, so as to solve the problem of “flash-off” in the LACP link switching process, and thus avoid frequent “off-line” during user's communication.
  • a method for link aggregation control protocol LACP link switching comprises:
  • a timer is started, and then when no state change of an inactive interface in the LACP link aggregation group is monitored during a preset time, the states of M interfaces among the N interfaces kept in the active state are adjusted into the inactive state.
  • the preset time is a long period or a short period of LACP configuration.
  • states of Q interfaces among interfaces on which a state change occurs are kept being the active state, so that the number of the active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum active link number, where Q is a natural number and Q is smaller than or equal to the number of interfaces, on which a state change occurs, among the active interfaces in the LACP link aggregation group.
  • a device for link aggregation control protocol LACP link switching comprises a monitoring unit, a determining unit and a state adjusting unit, where:
  • the monitoring unit is configured to monitor state changes of interfaces in an LACP link aggregation group
  • the determining unit is configured to, when monitoring that a state change occurs on an active interface in the LACP link aggregation group, determine whether a number of active interfaces in the LACP link aggregation group is smaller than a preset minimum active link number, and if yes, trigger the state adjusting unit;
  • the state adjusting unit is configured to, when the number of the active interfaces in the LACP link aggregation group is smaller than the preset minimum active link number, keep states of N interfaces among interfaces on which a state change occurs being an active state, so that the number of the active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum active link number, wherein N is a natural number and N is smaller than or equal to the number of interfaces, on which a state change occurs, among the active interfaces in the LACP link aggregation group; and when monitoring that a state change occurs on an inactive interface in the LACP link aggregation group, adjust states of M interfaces among the N interfaces kept in the active state into an inactive state, where M is a natural number and M is smaller than or equal to N.
  • the device can further comprises a timer, configured to be started when the states of the N interfaces among interfaces on which a state change occurs are kept in an active state; then, when no state change of an inactive interface in the LACP link aggregation group is monitored during a preset time, trigger the state adjusting unit, which is configured to adjust the states of M interfaces among the N interfaces kept in the active state into the inactive state.
  • a timer configured to be started when the states of the N interfaces among interfaces on which a state change occurs are kept in an active state; then, when no state change of an inactive interface in the LACP link aggregation group is monitored during a preset time, trigger the state adjusting unit, which is configured to adjust the states of M interfaces among the N interfaces kept in the active state into the inactive state.
  • a method for link aggregation control protocol LACP data transmission comprises:
  • a timer is started when an inactive interface in the LACP link aggregation group is registered by a message receiving, then the message receiving registration of the interface is deleted after the preset time elapses.
  • the preset time is a long period or a short period of LACP configuration.
  • Yet another aspect of the present invention provides a device for link aggregation control protocol LACP data transmission, comprising a monitoring unit, a determining unit, a state adjusting unit, a message transmitting and receiving registration unit, and a data transmission unit, wherein:
  • the monitoring unit configured to monitor state change of an interface in an LACP link aggregation group
  • the determining unit configured to, when monitoring that a state change occurs on an active interface in the LACP link aggregation group, determine whether the number of active interfaces in the LACP link aggregation group is smaller than the preset minimum active link number, and if yes, trigger the state adjusting unit;
  • the state adjusting unit configured to, when the number of active interfaces in the LACP link aggregation group is smaller than the preset minimum active link number, keep N interfaces among the interfaces on which a state change occurs being an active state, so that the number of active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum active link number; N is a natural number and N is smaller than or equal to the number of interfaces on which a state change occurs, among the active interfaces in the LACP link aggregation group; and when monitoring that a state change occurs on an inactive interface in the aggregation group, adjust the state of M interfaces among the N interfaces kept active into an inactive state, M is a natural number and M is smaller than or equal to N;
  • the message transmitting and receiving registration unit configured to performing message transmitting and receiving registration for the active interfaces in the LACP link aggregation group, and performing message receiving registration for an interface changing into the inactive state;
  • the data transmission unit configured to perform data transmission according to the message transmitting and receiving registration of interfaces in the LACP link aggregation group.
  • the technical solutions for LACP link data transmission provided by embodiments of the present invention, on the basis of the above method for link switching, classify the forwarding tables into two types: a message receiving data table and a message transmitting data table, and register the interface which changes from an active state into an inactive state into the message receiving data table. After such processing, the interface changing from the active state into the inactive state still can receive data message having been transmitted on the link before the state change during data transmission, thereby guaranteeing no data message is lost in the LACP link switching process.
  • FIGS. 1( a )-( c ) is a schematic diagram of an establishment procedure of an LACP link aggregation group
  • FIG. 2 is a flow chart of a method for LACP link switching according to Embodiment 1 of the present invention
  • FIG. 3 is a flow chart of a method for LACP link switching according to Embodiment 2 of the present invention.
  • FIG. 4 is a block diagram of a device for LACP link switching according to Embodiment 4 of the present invention.
  • FIG. 5 is a flow chart of a method for LACP link data transmission according to Embodiment 5 of the present invention.
  • FIG. 6 is a block diagram of a device for LACP link data transmission according to Embodiment 6 of the present invention.
  • Embodiments of the present invention provide a method and a device for LACP link switching.
  • the method and the device when it is determined that a state change of a certain or some interfaces will cause the LACP link to switch, “lock” at least partial interfaces at the previous state before the change, so that the number of active interfaces is greater than or equal to a preset minimum active link number, and not “unlock” until new interfaces having the same “state” as the locked “state” appear.
  • the state of the LACP link aggregation group only changes at the bottom layer, i.e., the interface, and remains unchanged on the higher logic layer, i.e., the link aggregation group, thus smooth transition in the LACP link switching can be achieved, and the problem of frequent “flash-off” caused by the subsequent link switching after the switching event can be solved.
  • the establishment procedure of the LACP link aggregation group includes:
  • the LACPDU packet mainly includes information as follows: system priority, system ID, interface operation key, interface priority, interface ID and interface state.
  • Router B when Router B receives the LACPDU packet transmitted by Router A, Router B checks the LACPDU packet to learn the system priority and system ID of Router A, and compares them with its own system priority and system ID: if Router A has a system priority higher than Router B, then Router A is determined to be the active end device of the link, Router B to be the passive end device, otherwise, Router B is determined to be the active end device of the LACP link, Router A to be the passive end device. Similarly, when Router A receives the LACPDU packet transmitted by Router B, the active end device and the passive end device are also determined in the manner described above. In this example, provided that the system priority of Router A is 10, the priority of Router B is 11, Router A is determined to be the active end device, Router B to be the passive end device.
  • S 103 determine an interface entering the aggregation group, on the basis of an interface priority of the active end device of the LACP link; when the two end devices achieve consistency through negotiation, establishment of a logic link based on the original communication link, namely the LACP link aggregation group is accomplished.
  • two end devices of the LACP link both determine interfaces forming the aggregation group according to the interface priority of the active end device.
  • a communication link is formed between corresponding interfaces of the two end devices, and multiple communication links (member link) form the logic link.
  • establishment of the LACP link aggregation group is accomplished. Not all the interfaces entering the aggregation group are in an active state. The number of active interfaces depends on the bandwidth requirement of the traffic transmission. Generally, the number of interfaces at one end of the LACP link aggregation group member link should be between a preset minimum active link number and a maximum active link number.
  • Interfaces not entering the LACP link aggregation group and inactive member interfaces in the aggregation group form backup interfaces, configured to replace the active interfaces in the LACP link aggregation group when required.
  • the passive member interfaces in the LACP link aggregation group can be configured to be active.
  • interfaces outside the LACP link aggregation group and member interfaces in the LACP link aggregation group all are simply referred to as interfaces in the embodiments hereinafter.
  • Router A is an active end device, which has three interfaces
  • Router B is a passive end device, which also has three interfaces.
  • Router A has a preset maximum active link number of two, according to the interface priority principle, active interfaces entering the LACP link aggregation group are interfaces “1” and “2”, corresponding interfaces of Router B and interfaces “1” and “2” of Router A establish links, such two links form an LACP link aggregation group and both the two links (four interfaces) of the LACP link aggregation group are active.
  • the LACP link aggregation group After the LACP link aggregation group is established in the manner described above, whether the LACP link can perform normal communication depends on the current state of the LACP link aggregation group.
  • the LACP link aggregation group has two types of states, an UP state and a DOWN state.
  • the LACP link aggregation group When the number of active interfaces (marked as Selected, while inactive interfaces are marked as Unselected) at one end of the LACP link aggregation group is greater than or equal to the preset minimum active link number, the LACP link aggregation group is in the UP state, and the LACP link is ON and can perform normal communication; when the number of active interfaces (marked as Selected) at one end of the LACP link aggregation group is smaller than the preset minimum active link number, the LACP link aggregation group is in the DOWN state, and the LACP link is OFF and the communication is interrupted, and normal communication can be performed only when the LACP link aggregation group is in the UP state again and the communication has been re-established.
  • the changing process between the UP state and the DOWN state of the LACP link aggregation group forms the LACP link switching.
  • the link switching from the UP state to the DOWN state is triggered by a switching event, which includes a Down event of the link, a link failure detected by an ETH-OAM, a link fault detected by an LACP and the like.
  • the switching event causes corresponding interfaces in the LACP link aggregation group to change from a Selected state to a Unselected state, and when such state change of the interface causes the number of active interfaces in the LACP link aggregation group to be less than the minimal link number, the switching of the LACP link aggregation group from the UP state to the DOWN state is accomplished.
  • the link switching from the DOWN state to the UP state is realized by LACP preemption, after an interface in the LACP link aggregation group is changed from the Selected state to the Unselected state, the inactive interfaces in the backup state replace the interface changing into the inactive state according to the priority, that is, the inactive interfaces in the backup state are changed from the Unselected state to the Selected state.
  • state change of the interface causes the number of the active interfaces in the LACP link aggregation group to increase to be greater than the minimum active link number, the switching of the LACP link aggregation group from the DOWN state to the UP state is accomplished.
  • the LACP link aggregation group in order to keep an LACP link aggregation group in the UP state, at least 10 or more interfaces in the LACP link aggregation group should be kept in an active state, that is, the preset minimum active link number is 10, then, when a number of the active interfaces in the LACP link aggregation group is less than 10, the LACP link aggregation group changes from the UP state to the DOWN state.
  • the number of the active interfaces in the LACP link aggregation group increases from less than 10 to 10 or to more than 10
  • the LACP link aggregation group changes from the DOWN state to the UP state.
  • the embodiments of the present invention provide a new method for LACP link switching. Referring to FIG. 2 , the method includes:
  • Interfaces in the LACP link aggregation group include active interfaces and inactive interfaces.
  • the inactive interfaces are not automatically enabled, but change from an inactive sate to an active state only when the number of the active interfaces is reduced, so as to replace the interfaces changing from the active state into the inactive state.
  • the state change of the active interfaces may cause a state of the LACP link aggregation group to hop from the UP state to the DOWN state, thus affect normal communication between two ends of the LACP link.
  • S 202 When monitoring a state change occurs on an active interface in the LACP link aggregation group, determine whether the number of active interfaces in the LACP link aggregation group is smaller than a preset minimum active link number, and if yes, perform S 202 ( a ): keep states of N interfaces among interfaces on which a state change occurs being the active state, so that the number of the active interfaces is greater than or equal to the preset minimum active link number, so as to keep the LACP link aggregation group in an UP state, where N is a natural number and N is smaller than or equal to the number of interfaces on which a state change occurs, among the active interfaces in the LACP link aggregation group.
  • the interfaces changing from the active state into the inactive state may cause the number of the active interfaces to be reduced; when the number of the active interfaces in the LACP link aggregation group is reduced to be less than the preset minimum active link number, the state of the LACP link aggregation group will be affected. Therefore, when monitoring that an interface changes to an inactive state, determine whether the number of the active interfaces in the LACP link aggregation group is smaller than the preset minimum active link number, if, after the state change, the number of the active interfaces is less than the preset minimum active link number, then according to the requirements of satisfying the preset minimum active link number, configure N interfaces among the interfaces just changing from the active state to the inactive state to be active, and marked properly.
  • the LACP link aggregation group will consider the state of the interfaces is unchanged and continue to keep the UP state, and disconnection does not occur on the LACP link aggregation group, that is, although a certain link in the whole LACP link aggregation group is not available, the LACP link aggregation group fails to sense it and still keeps the “ON” state.
  • S 203 When monitoring that a state change occurs on an inactive interface in the LACP link aggregation group, adjusts states of M interfaces among the N interfaces kept in the active state into an inactive state, so that the number of the active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum active link number, where M is a natural number and M is smaller than or equal to N.
  • backup interfaces When the interface in the LACP link aggregation group changes from the active state to the inactive state, backup interfaces immediately become “animated”, that which backup interface replaces the interface changing from the active state into the inactive state is determined by LACP preemption. Only after the “replacing old by new” is accomplished, M interfaces among the N interfaces changing from the active state to the inactive state are configured to be their real state, the inactive state, so that the number of the active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum active link number.
  • the LACP link aggregation group when an switching event occurs on an LACP link, keep the interfaces at the previous state before the change until new active links appear, so that the state of the LACP link aggregation group does not change with the state of the interface, and consequently the state change in the interface layer is successfully “smoothed out” when reflecting on the layer of the LACP link aggregation group, the LACP link aggregation group is always kept at the previous state, the LACP link will not be off, and the whole link keeps a constant state without the frequent “flash-off”, thus effectively guaranteeing the service level of the communication.
  • the interfaces changing from the active state into the inactive state in the LACP link aggregation group are kept at the previous state (active state) until new interfaces appear. During this time period, new interface is “recommended” by the function of LACP preemption. In the practical operation, however, various reasons may cause LACP preemption failure or overlong time delay of the preemption, or even preemption being not performed. In the former case, for example, backup interfaces in the LACP link aggregation group are unavailable due to failure or there is no more backup interface, the backup links recommended according to the priority are unable to make the state of the LACP link aggregation group change back to the UP state from the DOWN state.
  • the present invention provides another embodiment. This embodiment includes:
  • a timer is configured to decide the length of the waiting time; when monitoring an active interface appears within the preset time of the timer, then according to the requirements of satisfying the preset minimum active link number, unlock the state of M interfaces among the N interfaces which are in state-keeping, and configure the state thereof back to the real state, and make the number of active interfaces in the LACP link aggregation group being greater than or equal to the preset minimum active link number; when not monitoring an active interface appears in the LACP link aggregation group after the preset time of the timer elapses, also unlock the state of at least one interface among M interfaces which are in state-keeping, and configure the state thereof back to the real state, such can avoid the case where, when no interface changes from the inactive state to the active state after a longer time of waiting, the LACP link is caused to be always kept at a false state and the LACP link resource cannot be released.
  • the preset time of the timer in this embodiment can be configured as required, in this embodiment, the preset time can be set as a long period or a short period of LACP configuration, and the long period is 90 s and the short period is 3 s as specified in the current LACP protocol.
  • the above two embodiments are mainly directed to the case where it is monitored that new inactive interface causes a state change of the LACP link aggregation group, but the case that new inactive interface appears without causing the state change of the LACP link aggregation group is not mentioned.
  • the state of the LACP link aggregation group will not change.
  • this embodiment includes:
  • N interfaces among the interfaces changing from the active state to the inactive state are all configured to be the active state, not unlock the above kept state until monitoring that new active interface replaces the interface changing into the inactive state, and configure the state back to the real state.
  • Such not only can solve “flash-off” appearing in the LACP link aggregation group, but also facilitates control and avoids the bandwidth from vibrating.
  • the above processing is performed before such failure causes the state of the LACP link aggregation group to change, instead of not being performed until the state of the LACP link aggregation group changes, so that the practical control is further facilitated; if the state change of the active interface is caused by reasons other than the failure of the link itself, then, the above processing is performed before the state change of the LACP link aggregation group caused by such reasons, the bandwidth can be kept stable within the period before the state of the LACP link aggregation group changes, so that data transmission rate can be prevented from being unstable and hopping.
  • the present invention also provides a device embodiment for LACP link switching.
  • the device 400 includes: a monitoring unit 401 , a determining unit 402 and a state adjusting unit 403 , where:
  • the monitoring unit 401 is configured to monitor state changes of interfaces in an LACP link aggregation group
  • the determining unit 402 is configured to, when monitoring that a state change occurs on an active interface in the LACP link aggregation group, determine whether a number of active interfaces in the LACP link aggregation group is smaller than a preset minimum active link number, and if yes, trigger the state adjusting unit 403 ;
  • the state adjusting unit 403 is configured to, when the number of the active interfaces in the LACP link aggregation group is smaller than the preset minimum active link number, keep states of N interfaces among the interfaces on which a state change occurs being an active state, so that the number of the active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum active link number, where N is a natural number and N is smaller than or equal to the number of interfaces on which a state change occurs, among the active interfaces in the LACP link aggregation group; and when monitoring that a state change occurs on an inactive interface in the aggregation group, adjust states of M interfaces among the N interfaces kept in the active state into an inactive state, so that the number of the active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum active link number, where M is a natural number and M is smaller than or equal to N. That is, adjust the states of M interfaces among the N interfaces on which the state change occurs
  • the working process of the device 400 is as follows: the monitoring unit 401 monitors the state changes of the interfaces in the LACP link aggregation group; when monitoring an interface changes from the active state to the inactive state, triggers the determining unit 402 , and the determining unit 402 determines whether the number of the active interfaces in the LACP link aggregation group is smaller than the preset minimum active link number, if yes, triggers the state adjusting unit 403 , the state adjusting unit 403 keeps the states of N interfaces among the interfaces on which a state change occurs, being in the active state, so that the number of the active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum active link number, where N is a natural number and N is smaller than or equal to the number of interfaces on which a state change occurs, among the active interfaces in the LACP link aggregation group; and when monitoring that a state change occurs on an inactive interface in the aggregation group, triggers the state adjusting
  • the device can further include a timer 404 , configured to be started when the states of the N interfaces among the interfaces on which a state change occurs are kept in the active state, then when no state change of the inactive interface in the LACP link aggregation group is monitored during a preset time, trigger the state adjusting unit 403 ; the state adjusting unit 403 adjusts the states of M interfaces among the N interfaces kept in the active state into the inactive state.
  • a timer 404 configured to be started when the states of the N interfaces among the interfaces on which a state change occurs are kept in the active state, then when no state change of the inactive interface in the LACP link aggregation group is monitored during a preset time, trigger the state adjusting unit 403 ; the state adjusting unit 403 adjusts the states of M interfaces among the N interfaces kept in the active state into the inactive state.
  • the timer 404 when monitoring an active interface in the LACP link aggregation group appears within a preset time of the timer 404 , then unlock the state of M interfaces among the N interfaces which are in state-keeping, and configure the state of the M interfaces back to the real state, and when not monitoring an active interface appears in the LACP link aggregation group after the preset time of the timer 404 elapses, also unlock the state of the M interfaces among the N interfaces which are in state-keeping, and configure the state back to the real state.
  • the preset time of the timer in this device embodiment can be configured as required, in this embodiment, the preset time is preferably set as a long period or a short period of the LACP configuration, and the long period is 90 s and the short period is 3 s as specified in the current LACP protocol.
  • the establishment procedure of the aggregation group is described above, after the LACP link aggregation group is established on the LACP link, for achieving data transmission via the LACP link, a forwarding table needs to be generated according to the active interfaces in the LACP link aggregation group, so as to decide, after service data message arrives, which active interface receives data, and which active interface is used to transmit the service data generated by the local end.
  • all the active interfaces in the aggregation group are generally configured to have message receiving and transmitting functions at the same time, and inactive interfaces in the LACP link aggregation group are configured to have no data-transceiving function.
  • the invention provides an embodiment of a method for LACP link data transmission, which can avoid or reduce message loss.
  • this embodiment includes:
  • S 502 When monitoring that a state change occurs on an active interface in the LACP link aggregation group, determine whether the number of active interfaces in the LACP link aggregation group is smaller than the preset minimum active link number, and if yes, then perform S 502 ( a ): keep states of N interfaces among the interfaces on which a state change occurs, being in the active state, so that the number of the active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum active link number, where N is a natural number and N is smaller than or equal to the number of interfaces on which a state change occurs, among the active interfaces in the LACP link aggregation group.
  • S 504 Perform message transmitting and receiving registration for the active interfaces in the LACP link aggregation group, and perform message receiving registration for the interfaces changing into the inactive state in the LACP link aggregation group;
  • the active interface in the LACP link aggregation group either can be a message receiving end for receiving the message from the opposite end, or can be a message transmitting end for transmitting the message of the local end. Therefore, message transmitting and receiving registration is performed for the active interface.
  • the interface changing from the active state into the inactive state in the LACP link aggregation group are only registered as message receiving function, and the interface changing into the inactive state caused by reasons other than physical link failure of itself generally can continue to receive the message but without the transmitting function.
  • S 505 Perform data transmission according to the message transmitting and receiving registration of the interface in the LACP link aggregation group; the LACP link accomplishes data transmission and forwarding according to the registered interface.
  • the above embodiment for data transmission takes advantage of the property that after the interfaces changes from the active state into the inactive state its data receiving function is still kept for a period of time, however, such data receiving function will disappear as the time of changing into the inactive state becomes longer. Therefore, registering the interface changing from the active state into the inactive state as a “receiving” interface is not a “permanent solution”, and keeping a long-term registration state also consumes memory resources.
  • the present invention further provides an improved technical solution of the above embodiment as follows. A timer is started when performing the message receiving registration for the interface changing from the active state to the inactive state, then, when a preset time reaches, the message receiving registration of the interface is deleted.
  • the preset time can be configured according to practical needs, generally, the preset time is preferably set as a long period or a short period of the LACP configuration, and the long period is 90 s and the short period is 3 s as specified in the current LACP protocol.
  • the present invention also provides a device embodiment.
  • the device 600 includes: a monitoring unit 601 , a determining unit 602 , a state adjusting unit 603 , a message transmitting and receiving registration unit 604 and a data transmission unit 605 , where:
  • the monitoring unit 601 is configured to monitor state changes of interfaces in an LACP link aggregation group
  • the determining unit 602 is configured to, when monitoring that a state change occurs on an active interface in the LACP link aggregation group, determine whether the number of active interfaces in the LACP link aggregation group is smaller than a preset minimum active link number, and if yes, trigger the state adjusting unit 603 ;
  • the state adjusting unit 603 is configured to, when determining the number of the active interfaces in the LACP link aggregation group is smaller than the preset minimum active link number, keep N interfaces among the interfaces on which a state change occurs, being in an active state, so that the number of the active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum active link number, where N is a natural number and N is smaller than or equal to the number of interfaces on which a state change occurs, among the active interfaces in the LACP link aggregation group; and when monitoring that a state change occurs on an inactive interface in the aggregation group, adjust states of M interfaces among the N interfaces kept in the active state into an inactive state, where M is a natural number and M is smaller than or equal to N.
  • the message transmitting and receiving registration unit 604 is configured to perform message transmitting and receiving registration for the active interface in the LACP link aggregation group, and perform message receiving registration for the interface changing into the inactive state in the LACP link aggregation group;
  • the data transmission unit 605 is configured to perform data transmission according to the message transmitting and receiving registration of the interface in the LACP link aggregation group.
  • the working process of the device 600 is as follows: the monitoring unit 601 monitors the state changes of the interfaces in the LACP link aggregation group; when monitoring an interface changes from the active state to the inactive state, enables the determining unit 602 ; the determining unit 602 determines whether the number of active interfaces in the LACP link aggregation group is smaller than the preset minimum active link number, if yes, triggers the state adjusting unit 603 ; the state adjusting unit 603 keeps the states of N interfaces among the interfaces on which the state change occurs, being the active state; and when monitoring that there are inactive interfaces changing to the active state, triggers the state adjusting unit 603 to adjust the state of M interfaces among the N interfaces kept in the active state into the inactive state.
  • the message transmitting and receiving registration unit 604 performs message transmitting and receiving registration for the active interface in the LACP link aggregation group, and performs message receiving registration for the interface changing into the inactive state in the LACP link aggregation group; and then the data transmission unit 605 performs data transmission according to the message transmitting and receiving registration of the interface in the LACP link aggregation group.
  • this device embodiment keeps at least partial or all the interfaces, which change from the active state into the inactive state, at the state prior to change for a period of time, unlocks such state-keeping for one or all the interfaces in state-keeping and recovers its real state only when new interfaces appear.
  • the function of the interface not only the active interfaces are registered respectively with two directions of “receiving” and “transmitting”, but also the interfaces changing from the active state into the inactive state are registered as “receiving”.
  • This embodiment makes full use of functions of the interface, so that the message having been transmitted on the link can successfully arrive at the target end via the corresponding interface, so as to avoid or reduce message loss.
  • Q interfaces among the interfaces on which a state change occurs also can be kept in the active state, so that the number of the active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum active link number, where Q is a natural number and Q is smaller than or equal to the number of interfaces, on which a state change occurs, among the active interfaces in the LACP link aggregation group.

Landscapes

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

Abstract

Embodiments of the present invention provide a method and a device for link aggregation control protocol (LACP) link switch. The method includes: monitoring state changes of interfaces in an LACP link aggregation group; when monitoring a state change occurs on an active interface in the aggregation group, determining whether the number of active interfaces in the aggregation group is smaller than a preset minimum active link number, if yes, keeping states of N interfaces among the interfaces on which a state change occurs being an active state, so that the number of active interfaces in the aggregation group is greater than or equal to the preset minimum active link number; and when monitoring a state change occurs on an inactive interface in the aggregation group, adjusting states of M interfaces among the N interfaces kept in the active state into an inactive state M being smaller than or equal to N.

Description

CROSS-REFERENCE TO RELATED APPLICATIONS
This application is a continuation of International Patent Application No. PCT/CN2012/080126, filed on Aug. 15, 2012, which claims priority to Chinese Patent Application No. 201110308340.7, filed on Oct. 12, 2011, both of which are hereby incorporated by reference in their entireties.
TECHNICAL FIELD
The present invention relates to the field of communication technologies, particularly to a method and a device for LACP link switching and data transmission.
BACKGROUND
An LACP (Link Aggregation Control Protocol, link aggregation control protocol) is a protocol for achieving dynamic link aggregation and disaggregation, and the aggregation is to improve transmission bandwidth and reliability of the system. Under the control of the LACP protocol, multiple links (member link) aggregate to a logic link with a higher bandwidth, the logic link is called an aggregation group and the link including the aggregation group is called an LACP link. The number of the member links aggregated in one aggregation group is usually determined according to the bandwidth requirement of the traffic.
Generally, the number of active interfaces at one end of the aggregation group member link is at least larger than or equal to a preset minimum active link number for corresponding traffic transmission. When such requirement is satisfied, the aggregation group is in an UP state, the LACP link is “ON” and ready for use; when such requirement is not satisfied, that is, the number of active interfaces at one end of the aggregation group member link is smaller than the preset minimum active link number, the aggregation group is in a DOWN state, the LACP link is “OFF” and unavailable for use.
The LACP link switching procedure depends on the state of the LACP link aggregation group. In order to monitor a state change of the aggregation group, both ends of the aggregation group periodically transmit a LACPDU (LACP Data Unit) message to each other. After receiving the LACPDU packet, one end of the aggregation group compares information carried by the LACPDU packet, such as system priority, interface priority of the opposite end, with configuration of the local end, in the case of inconformity, adjusts configuration of the local end based on the comparison result. The number of the active interfaces in the aggregation group will change in the process of adjustment. When the number of the active interfaces increases or decreases to a certain degree, the state of the aggregation group will change alternately between the UP and DOWN states, causing the LACP link to switch between “ON” and “OFF”, so that the link appears a flash-off procedure, i.e., the link is OFF and ON. Due to this “flash-off” effect, the user terminal will be “off-line” frequently, and it is needed to re-access network and re-establish data links when communication resumes after a change from “off-line” to “on-line,” which adversely affects normal communication and reduces network service level.
Furthermore, when the active interface in the aggregation group changes to be an inactive interface, the interface is usually configured to be a “dead” interface having no data-transceiving function; however, if the state change of the interface is caused by reasons other than a “physical link failure,” then this can cause the message having been transmitted on the LACP link to be lost and affect normal communication.
SUMMARY
Accordingly, embodiments of the present invention provide a method and a device for LACP link switching, so as to solve the problem of “flash-off” in the LACP link switching process, and thus avoid frequent “off-line” during user's communication.
According to one aspect, a method for link aggregation control protocol LACP link switching comprises:
monitoring state changes of interfaces in an LACP link aggregation group;
when monitoring that a state change occurs on an active interface in the LACP link aggregation group, determining whether a number of active interfaces in the LACP link aggregation group is smaller than a preset minimum active link number, and if yes, keeping states of N interfaces among interfaces on which a state change occurs being an active state, so that the number of the active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum active link number, where N is a natural number and N is smaller than or equal to the number of interfaces, on which a state change occurs, among the active interfaces in the LACP link aggregation group; and
when monitoring that a state change occurs on an inactive interface in the LACP link aggregation group, adjusting states of M interfaces among the N interfaces kept in the active state into an inactive state, where M is a natural number and M is smaller than or equal to N.
Optionally, when keeping states of the N interfaces among interfaces, on which a state change occurs, being an active state, a timer is started, and then when no state change of an inactive interface in the LACP link aggregation group is monitored during a preset time, the states of M interfaces among the N interfaces kept in the active state are adjusted into the inactive state.
Optionally, the preset time is a long period or a short period of LACP configuration.
Optionally, when determining that the number of the active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum active link number, states of Q interfaces among interfaces on which a state change occurs are kept being the active state, so that the number of the active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum active link number, where Q is a natural number and Q is smaller than or equal to the number of interfaces, on which a state change occurs, among the active interfaces in the LACP link aggregation group.
According to another aspect, a device for link aggregation control protocol LACP link switching comprises a monitoring unit, a determining unit and a state adjusting unit, where:
the monitoring unit is configured to monitor state changes of interfaces in an LACP link aggregation group;
the determining unit is configured to, when monitoring that a state change occurs on an active interface in the LACP link aggregation group, determine whether a number of active interfaces in the LACP link aggregation group is smaller than a preset minimum active link number, and if yes, trigger the state adjusting unit;
the state adjusting unit is configured to, when the number of the active interfaces in the LACP link aggregation group is smaller than the preset minimum active link number, keep states of N interfaces among interfaces on which a state change occurs being an active state, so that the number of the active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum active link number, wherein N is a natural number and N is smaller than or equal to the number of interfaces, on which a state change occurs, among the active interfaces in the LACP link aggregation group; and when monitoring that a state change occurs on an inactive interface in the LACP link aggregation group, adjust states of M interfaces among the N interfaces kept in the active state into an inactive state, where M is a natural number and M is smaller than or equal to N.
Optionally, the device can further comprises a timer, configured to be started when the states of the N interfaces among interfaces on which a state change occurs are kept in an active state; then, when no state change of an inactive interface in the LACP link aggregation group is monitored during a preset time, trigger the state adjusting unit, which is configured to adjust the states of M interfaces among the N interfaces kept in the active state into the inactive state.
According to still another aspect, a method for link aggregation control protocol LACP data transmission comprises:
monitoring state changes of interfaces in an LACP link aggregation group;
when monitoring that a state change occurs on an active interface in the LACP link aggregation group, determining whether a number of active interfaces in the LACP link aggregation group is smaller than the preset minimum active link number, and if yes, keeping states of N interfaces among interfaces on which a state change occurs being an active state, so that the number of the active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum active link number; where, N is a natural number and N is smaller than or equal to the number of interfaces on which a state change occurs, among the active interfaces in the LACP link aggregation group; and
when monitoring that a state change occurs on an inactive interface in the LACP link aggregation group, adjusting states of M interfaces among the N interfaces kept in the active state into an inactive state, where M is a natural number and M is smaller than or equal to N;
performing message transmitting and receiving registration for the active interfaces in the LACP link aggregation group, and performing message receiving registration for an interface changing into the inactive state; and
performing data transmission according to the message transmitting and receiving registration of interfaces in the LACP link aggregation group.
Optionally, if a timer is started when an inactive interface in the LACP link aggregation group is registered by a message receiving, then the message receiving registration of the interface is deleted after the preset time elapses.
Optionally, the preset time is a long period or a short period of LACP configuration.
Yet another aspect of the present invention provides a device for link aggregation control protocol LACP data transmission, comprising a monitoring unit, a determining unit, a state adjusting unit, a message transmitting and receiving registration unit, and a data transmission unit, wherein:
the monitoring unit, configured to monitor state change of an interface in an LACP link aggregation group;
the determining unit, configured to, when monitoring that a state change occurs on an active interface in the LACP link aggregation group, determine whether the number of active interfaces in the LACP link aggregation group is smaller than the preset minimum active link number, and if yes, trigger the state adjusting unit;
the state adjusting unit, configured to, when the number of active interfaces in the LACP link aggregation group is smaller than the preset minimum active link number, keep N interfaces among the interfaces on which a state change occurs being an active state, so that the number of active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum active link number; N is a natural number and N is smaller than or equal to the number of interfaces on which a state change occurs, among the active interfaces in the LACP link aggregation group; and when monitoring that a state change occurs on an inactive interface in the aggregation group, adjust the state of M interfaces among the N interfaces kept active into an inactive state, M is a natural number and M is smaller than or equal to N;
the message transmitting and receiving registration unit, configured to performing message transmitting and receiving registration for the active interfaces in the LACP link aggregation group, and performing message receiving registration for an interface changing into the inactive state; and
the data transmission unit, configured to perform data transmission according to the message transmitting and receiving registration of interfaces in the LACP link aggregation group.
In the technical solutions for LACP link switching provided by embodiments of the present invention, when monitoring the state of the interface changes and determining such change can cause LACP link switching, keep at least partial interfaces being changed from an active state into an inactive state at the state prior to change for a period of time, so that the number of active interfaces is greater than or equal to the preset minimum active link number, and not configure interfaces being changed from the active state into the inactive state to be inactive until new interfaces are changed from the inactive state into the active state.
In the embodiments of the present invention, when an LACP link switching event occurs, lock the interface on which a state change occurs, at the previous state, and not unlock the state until a new interface appears to take place of such interface, so that the LACP link aggregation group always can keep a constant state. In this way, the state change of the interface at a bottom logic layer will not affect the state of an aggregation group at a higher logic layer, thus smooth link transition can be achieved in the case of the link switching event, and the problem of affecting normal communication by frequent “flash-off” can be solved.
Furthermore, the technical solutions for LACP link data transmission provided by embodiments of the present invention, on the basis of the above method for link switching, classify the forwarding tables into two types: a message receiving data table and a message transmitting data table, and register the interface which changes from an active state into an inactive state into the message receiving data table. After such processing, the interface changing from the active state into the inactive state still can receive data message having been transmitted on the link before the state change during data transmission, thereby guaranteeing no data message is lost in the LACP link switching process.
BRIEF DESCRIPTION OF THE DRAWINGS
FIGS. 1( a)-(c) is a schematic diagram of an establishment procedure of an LACP link aggregation group;
FIG. 2 is a flow chart of a method for LACP link switching according to Embodiment 1 of the present invention;
FIG. 3 is a flow chart of a method for LACP link switching according to Embodiment 2 of the present invention;
FIG. 4 is a block diagram of a device for LACP link switching according to Embodiment 4 of the present invention;
FIG. 5 is a flow chart of a method for LACP link data transmission according to Embodiment 5 of the present invention; and
FIG. 6 is a block diagram of a device for LACP link data transmission according to Embodiment 6 of the present invention.
DESCRIPTION OF EMBODIMENTS
Embodiments of the present invention provide a method and a device for LACP link switching. In the method and the device, when it is determined that a state change of a certain or some interfaces will cause the LACP link to switch, “lock” at least partial interfaces at the previous state before the change, so that the number of active interfaces is greater than or equal to a preset minimum active link number, and not “unlock” until new interfaces having the same “state” as the locked “state” appear. After such processing, when an LACP link switching event occurs, the state of the LACP link aggregation group only changes at the bottom layer, i.e., the interface, and remains unchanged on the higher logic layer, i.e., the link aggregation group, thus smooth transition in the LACP link switching can be achieved, and the problem of frequent “flash-off” caused by the subsequent link switching after the switching event can be solved.
For ease of understanding technical solutions of the present invention, an establishment procedure of an LACP link aggregation group and LACP link switching will be discussed in brief.
The establishment procedure of the LACP link aggregation group includes:
S101: Initiate an LACP link aggregation group establishment message, two end devices of the LACP link configure the LACP mode after receiving the aggregation group establishment message, and select the interface ready to be added in the LACP link aggregation group according to priorities of the respective interfaces, and such selected interfaces enable the LACP protocol, and the two end devices transmit LACPDU packets to each other. Referring to FIG. 1( a), two end devices of the LACP link are indicated by backup Router A and Router B, the solid lines between Router A and Router B indicate communication links, and arrows indicate the direction of LACPDU packet transmission.
S102: After the two end devices of the LACP link respectively receive the LACPDU packets transmitted by the device at the opposite end, according to system LACP priority and system ID in the LACPDU packet in combination with configuration of the local end, determine an active end device and a passive end device. The LACPDU packet mainly includes information as follows: system priority, system ID, interface operation key, interface priority, interface ID and interface state.
Referring to FIG. 1( b), when Router B receives the LACPDU packet transmitted by Router A, Router B checks the LACPDU packet to learn the system priority and system ID of Router A, and compares them with its own system priority and system ID: if Router A has a system priority higher than Router B, then Router A is determined to be the active end device of the link, Router B to be the passive end device, otherwise, Router B is determined to be the active end device of the LACP link, Router A to be the passive end device. Similarly, when Router A receives the LACPDU packet transmitted by Router B, the active end device and the passive end device are also determined in the manner described above. In this example, provided that the system priority of Router A is 10, the priority of Router B is 11, Router A is determined to be the active end device, Router B to be the passive end device.
S103: determine an interface entering the aggregation group, on the basis of an interface priority of the active end device of the LACP link; when the two end devices achieve consistency through negotiation, establishment of a logic link based on the original communication link, namely the LACP link aggregation group is accomplished.
After the active end device and the passive end device of the LACP link are determined, two end devices of the LACP link both determine interfaces forming the aggregation group according to the interface priority of the active end device. A communication link is formed between corresponding interfaces of the two end devices, and multiple communication links (member link) form the logic link. Thereby, establishment of the LACP link aggregation group is accomplished. Not all the interfaces entering the aggregation group are in an active state. The number of active interfaces depends on the bandwidth requirement of the traffic transmission. Generally, the number of interfaces at one end of the LACP link aggregation group member link should be between a preset minimum active link number and a maximum active link number. Interfaces not entering the LACP link aggregation group and inactive member interfaces in the aggregation group form backup interfaces, configured to replace the active interfaces in the LACP link aggregation group when required. When the number of active interfaces in the LACP link aggregation group has not yet reached the preset maximum active link number, if, according to the traffic, the transmission bandwidth needs to be increased, the passive member interfaces in the LACP link aggregation group can be configured to be active. For ease of description, interfaces outside the LACP link aggregation group and member interfaces in the LACP link aggregation group all are simply referred to as interfaces in the embodiments hereinafter.
Referring to FIG. 1( c), Router A is an active end device, which has three interfaces, and Router B is a passive end device, which also has three interfaces. Provided that Router A has a preset maximum active link number of two, according to the interface priority principle, active interfaces entering the LACP link aggregation group are interfaces “1” and “2”, corresponding interfaces of Router B and interfaces “1” and “2” of Router A establish links, such two links form an LACP link aggregation group and both the two links (four interfaces) of the LACP link aggregation group are active.
Hereinafter, objects and technical features of the present invention will be described in details with reference to embodiments and the accompanying drawings.
Embodiment 1
After the LACP link aggregation group is established in the manner described above, whether the LACP link can perform normal communication depends on the current state of the LACP link aggregation group. The LACP link aggregation group has two types of states, an UP state and a DOWN state. When the number of active interfaces (marked as Selected, while inactive interfaces are marked as Unselected) at one end of the LACP link aggregation group is greater than or equal to the preset minimum active link number, the LACP link aggregation group is in the UP state, and the LACP link is ON and can perform normal communication; when the number of active interfaces (marked as Selected) at one end of the LACP link aggregation group is smaller than the preset minimum active link number, the LACP link aggregation group is in the DOWN state, and the LACP link is OFF and the communication is interrupted, and normal communication can be performed only when the LACP link aggregation group is in the UP state again and the communication has been re-established. The changing process between the UP state and the DOWN state of the LACP link aggregation group forms the LACP link switching.
The link switching from the UP state to the DOWN state is triggered by a switching event, which includes a Down event of the link, a link failure detected by an ETH-OAM, a link fault detected by an LACP and the like. The switching event causes corresponding interfaces in the LACP link aggregation group to change from a Selected state to a Unselected state, and when such state change of the interface causes the number of active interfaces in the LACP link aggregation group to be less than the minimal link number, the switching of the LACP link aggregation group from the UP state to the DOWN state is accomplished. The link switching from the DOWN state to the UP state is realized by LACP preemption, after an interface in the LACP link aggregation group is changed from the Selected state to the Unselected state, the inactive interfaces in the backup state replace the interface changing into the inactive state according to the priority, that is, the inactive interfaces in the backup state are changed from the Unselected state to the Selected state. When such state change of the interface causes the number of the active interfaces in the LACP link aggregation group to increase to be greater than the minimum active link number, the switching of the LACP link aggregation group from the DOWN state to the UP state is accomplished.
By way of example, it assumes that in order to keep an LACP link aggregation group in the UP state, at least 10 or more interfaces in the LACP link aggregation group should be kept in an active state, that is, the preset minimum active link number is 10, then, when a number of the active interfaces in the LACP link aggregation group is less than 10, the LACP link aggregation group changes from the UP state to the DOWN state. By contrast, when the number of the active interfaces in the LACP link aggregation group increases from less than 10 to 10 or to more than 10, the LACP link aggregation group changes from the DOWN state to the UP state.
Seen from the above, when the switching between UP and DOWN occurs frequently, the LACP link is extremely unstable, flash-off process of “ON-OFF-ON-OFF” is continuously repeated on the whole link, which affects normal communication, and if there is only one active interface in the aggregation group, the consequence of this situation becomes more serious.
Such process can be explained vividly through an example of making a phone call. User B makes a phone call to user A, after the call is connected and they talk on the line for a while, due to a certain reason, an LACP link of the line between user B and user A hops to the DOWN state from the UP state, the line is disconnected, the call is dropped, talking between user B and user A is forced to be interrupted. After a while, the LACP link returns to the UP state from the DOWN state, at this time, user B cannot directly continue his call, but has to redial to establish the connection with user A to continue the previous call. If the LACP link switches frequently, user B will need to dial for many times.
In order to avoid troubles and inconvenience to users caused by frequent flash-off of LACP in the LACP link switching process, the embodiments of the present invention provide a new method for LACP link switching. Referring to FIG. 2, the method includes:
S201: Monitor state changes of interfaces in an LACP link aggregation group.
Interfaces in the LACP link aggregation group include active interfaces and inactive interfaces. Generally, the inactive interfaces are not automatically enabled, but change from an inactive sate to an active state only when the number of the active interfaces is reduced, so as to replace the interfaces changing from the active state into the inactive state. The state change of the active interfaces may cause a state of the LACP link aggregation group to hop from the UP state to the DOWN state, thus affect normal communication between two ends of the LACP link.
S202: When monitoring a state change occurs on an active interface in the LACP link aggregation group, determine whether the number of active interfaces in the LACP link aggregation group is smaller than a preset minimum active link number, and if yes, perform S202 (a): keep states of N interfaces among interfaces on which a state change occurs being the active state, so that the number of the active interfaces is greater than or equal to the preset minimum active link number, so as to keep the LACP link aggregation group in an UP state, where N is a natural number and N is smaller than or equal to the number of interfaces on which a state change occurs, among the active interfaces in the LACP link aggregation group.
The interfaces changing from the active state into the inactive state may cause the number of the active interfaces to be reduced; when the number of the active interfaces in the LACP link aggregation group is reduced to be less than the preset minimum active link number, the state of the LACP link aggregation group will be affected. Therefore, when monitoring that an interface changes to an inactive state, determine whether the number of the active interfaces in the LACP link aggregation group is smaller than the preset minimum active link number, if, after the state change, the number of the active interfaces is less than the preset minimum active link number, then according to the requirements of satisfying the preset minimum active link number, configure N interfaces among the interfaces just changing from the active state to the inactive state to be active, and marked properly. After such processing, the LACP link aggregation group will consider the state of the interfaces is unchanged and continue to keep the UP state, and disconnection does not occur on the LACP link aggregation group, that is, although a certain link in the whole LACP link aggregation group is not available, the LACP link aggregation group fails to sense it and still keeps the “ON” state.
S203: When monitoring that a state change occurs on an inactive interface in the LACP link aggregation group, adjusts states of M interfaces among the N interfaces kept in the active state into an inactive state, so that the number of the active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum active link number, where M is a natural number and M is smaller than or equal to N.
When the interface in the LACP link aggregation group changes from the active state to the inactive state, backup interfaces immediately become “animated”, that which backup interface replaces the interface changing from the active state into the inactive state is determined by LACP preemption. Only after the “replacing old by new” is accomplished, M interfaces among the N interfaces changing from the active state to the inactive state are configured to be their real state, the inactive state, so that the number of the active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum active link number.
In the technical solutions for LACP link switching provided by this embodiment, when monitoring the states of the interfaces change and determining such “hopping” of the interfaces will cause the state of the link aggregation group to hop, keep the interfaces changing from the active state into the inactive state at the original state (active state) for a period of time, until new interfaces changing from the inactive state into the active state appears and replace the above interfaces, and then configure the interfaces changing from the active state into the inactive state back to its real state.
In the embodiments of the present invention, when an switching event occurs on an LACP link, keep the interfaces at the previous state before the change until new active links appear, so that the state of the LACP link aggregation group does not change with the state of the interface, and consequently the state change in the interface layer is successfully “smoothed out” when reflecting on the layer of the LACP link aggregation group, the LACP link aggregation group is always kept at the previous state, the LACP link will not be off, and the whole link keeps a constant state without the frequent “flash-off”, thus effectively guaranteeing the service level of the communication.
Embodiment 2
In the embodiments of the present invention, the interfaces changing from the active state into the inactive state in the LACP link aggregation group are kept at the previous state (active state) until new interfaces appear. During this time period, new interface is “recommended” by the function of LACP preemption. In the practical operation, however, various reasons may cause LACP preemption failure or overlong time delay of the preemption, or even preemption being not performed. In the former case, for example, backup interfaces in the LACP link aggregation group are unavailable due to failure or there is no more backup interface, the backup links recommended according to the priority are unable to make the state of the LACP link aggregation group change back to the UP state from the DOWN state. In the latter case, for example, the function of LACP preemption is not configured at the enabled state, and without the function of LACP preemption, the LACP link is unable to select new interfaces for the replacement. When such case happens, the LACP link cannot keep waiting and make the state of the LACP link aggregation group at a “false” state for a long time. Therefore, the present invention provides another embodiment. This embodiment includes:
Monitor state changes of interfaces in an LACP link aggregation group;
When monitoring that a state change occurs on an active interface in the LACP link aggregation, determine whether the number of active interfaces in the LACP link aggregation group is smaller than a preset minimum active link number, and if yes, keep states of N interfaces among the interfaces on which a state change occurs being the active state, so that the number of the active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum active link number, where N is a natural number and N is smaller than or equal to the number of interfaces on which a state change occurs, among the active interfaces in the LACP link aggregation group, and start a timer;
When no state change of an inactive interface in the LACP link aggregation group is monitored during a preset time of the timer, adjust states of M interfaces among the N interfaces kept in the active state into an inactive state, so that the number of active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum active link number, where M is a natural number and M is smaller than or equal to N.
In this embodiment, a timer is configured to decide the length of the waiting time; when monitoring an active interface appears within the preset time of the timer, then according to the requirements of satisfying the preset minimum active link number, unlock the state of M interfaces among the N interfaces which are in state-keeping, and configure the state thereof back to the real state, and make the number of active interfaces in the LACP link aggregation group being greater than or equal to the preset minimum active link number; when not monitoring an active interface appears in the LACP link aggregation group after the preset time of the timer elapses, also unlock the state of at least one interface among M interfaces which are in state-keeping, and configure the state thereof back to the real state, such can avoid the case where, when no interface changes from the inactive state to the active state after a longer time of waiting, the LACP link is caused to be always kept at a false state and the LACP link resource cannot be released. The preset time of the timer in this embodiment can be configured as required, in this embodiment, the preset time can be set as a long period or a short period of LACP configuration, and the long period is 90 s and the short period is 3 s as specified in the current LACP protocol.
Embodiment 3
The above two embodiments are mainly directed to the case where it is monitored that new inactive interface causes a state change of the LACP link aggregation group, but the case that new inactive interface appears without causing the state change of the LACP link aggregation group is not mentioned. In fact, when monitoring that there are active interfaces changing to the inactive state in the LACP link aggregation group, as long as the number of the active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum active link number, the state of the LACP link aggregation group will not change. But, since the number of the active interfaces in the LACP link aggregation group is reduced, the number of the active links in the LACP link aggregation group will be reduced subsequently, the bandwidth for data transmission will also become smaller, and when new active interface appears, the number of the active links in the LACP link aggregation group will be increased subsequently, the bandwidth for data transmission will recover to the previous level. If the state of the interfaces in the LACP link aggregation group changes frequently, the bandwidth of the LACP link will vibrate, and traffic congestion is easily caused. To avoid such case, the present invention provides yet another embodiment. Referring to FIG. 3, this embodiment includes:
Monitor state changes of interfaces in an LACP link aggregation group;
When monitoring a state change occurs on an active interface in the LACP link aggregation group, no matter whether the number of active interfaces in the LACP link aggregation group is smaller than the preset minimum active link number, keep the states of N interfaces among the interfaces on which a state change occurs being the active state, so that the number of the active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum active link number, where N is a natural number and N is smaller than or equal to the number of interfaces, on which a state change occurs, among the active interfaces in the LACP link aggregation group.
When monitoring that a state change occurs on an inactive interface in the LACP link aggregation group within a preset time, adjust the state of M interfaces among the N interfaces kept in the active state into an inactive state, so that the number of the active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum active link number, where M is a natural number and M is smaller than or equal to N.
In this embodiment, no matter whether the number of the active interfaces in the LACP link aggregation group is smaller than the preset minimum active link number, N interfaces among the interfaces changing from the active state to the inactive state are all configured to be the active state, not unlock the above kept state until monitoring that new active interface replaces the interface changing into the inactive state, and configure the state back to the real state. Such not only can solve “flash-off” appearing in the LACP link aggregation group, but also facilitates control and avoids the bandwidth from vibrating.
Specifically, if the state change of the active interface is caused by the failure of the link itself, the above processing is performed before such failure causes the state of the LACP link aggregation group to change, instead of not being performed until the state of the LACP link aggregation group changes, so that the practical control is further facilitated; if the state change of the active interface is caused by reasons other than the failure of the link itself, then, the above processing is performed before the state change of the LACP link aggregation group caused by such reasons, the bandwidth can be kept stable within the period before the state of the LACP link aggregation group changes, so that data transmission rate can be prevented from being unstable and hopping.
Embodiment 4
The above embodiments provide the method embodiments for LACP link switching. Correspondingly, the present invention also provides a device embodiment for LACP link switching. Referring to FIG. 4, the device 400 includes: a monitoring unit 401, a determining unit 402 and a state adjusting unit 403, where:
The monitoring unit 401 is configured to monitor state changes of interfaces in an LACP link aggregation group;
The determining unit 402 is configured to, when monitoring that a state change occurs on an active interface in the LACP link aggregation group, determine whether a number of active interfaces in the LACP link aggregation group is smaller than a preset minimum active link number, and if yes, trigger the state adjusting unit 403;
The state adjusting unit 403 is configured to, when the number of the active interfaces in the LACP link aggregation group is smaller than the preset minimum active link number, keep states of N interfaces among the interfaces on which a state change occurs being an active state, so that the number of the active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum active link number, where N is a natural number and N is smaller than or equal to the number of interfaces on which a state change occurs, among the active interfaces in the LACP link aggregation group; and when monitoring that a state change occurs on an inactive interface in the aggregation group, adjust states of M interfaces among the N interfaces kept in the active state into an inactive state, so that the number of the active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum active link number, where M is a natural number and M is smaller than or equal to N. That is, adjust the states of M interfaces among the N interfaces on which the state change occurs, into their real state: an inactive state.
The working process of the device 400 according to this embodiment is as follows: the monitoring unit 401 monitors the state changes of the interfaces in the LACP link aggregation group; when monitoring an interface changes from the active state to the inactive state, triggers the determining unit 402, and the determining unit 402 determines whether the number of the active interfaces in the LACP link aggregation group is smaller than the preset minimum active link number, if yes, triggers the state adjusting unit 403, the state adjusting unit 403 keeps the states of N interfaces among the interfaces on which a state change occurs, being in the active state, so that the number of the active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum active link number, where N is a natural number and N is smaller than or equal to the number of interfaces on which a state change occurs, among the active interfaces in the LACP link aggregation group; and when monitoring that a state change occurs on an inactive interface in the aggregation group, triggers the state adjusting unit 403, the state adjusting unit 403 adjusts the states of M interfaces among the N interfaces kept in the active state into an inactive state, so that the number of the active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum active link number, where M is a natural number and M is smaller than or equal to N. That is, adjust the state of at least one interface among the interfaces on which a state change occurs, into its real state: an inactive state.
In the technical solutions for LACP link switching provided by this device embodiment, when monitoring the states of the interfaces change and determining such “hopping” of the interfaces will cause the state of the LACP link aggregation group to hop, keep partial or all the interfaces changing from the active state into the inactive state at the original state (active state) for a period of time, until new interface changing from the inactive state into the active state appears, and then replace partial or all the above interfaces, so that the number of the active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum active link number, and then configure the interface changing from the active state into the inactive state back to its real state.
In this embodiment of the present invention, when a switching event occurs on an LACP link, lock partial or all the interfaces on which the state change occurs at the previous state before the change until new active links appear, so that the state of the LACP link aggregation group does not change with the state change of the partial interfaces. Consequently, when reflected on the LACP link aggregation group layer, the state change in the interface layer is successfully “smoothed out”, the LACP link aggregation group is always kept unchanged, the LACP link will not be off, and the whole link keeps a constant state without the frequent “flash-off”, thus guaranteeing the service level of the communication.
The device can further include a timer 404, configured to be started when the states of the N interfaces among the interfaces on which a state change occurs are kept in the active state, then when no state change of the inactive interface in the LACP link aggregation group is monitored during a preset time, trigger the state adjusting unit 403; the state adjusting unit 403 adjusts the states of M interfaces among the N interfaces kept in the active state into the inactive state. Through configuring the timer 404, when monitoring an active interface in the LACP link aggregation group appears within a preset time of the timer 404, then unlock the state of M interfaces among the N interfaces which are in state-keeping, and configure the state of the M interfaces back to the real state, and when not monitoring an active interface appears in the LACP link aggregation group after the preset time of the timer 404 elapses, also unlock the state of the M interfaces among the N interfaces which are in state-keeping, and configure the state back to the real state. Such can avoid the cases where, when no interface changes from the inactive state to the active state after a longer time of waiting, the LACP link aggregation group is caused to be always kept at a false state and the LACP link resource cannot be released. The preset time of the timer in this device embodiment can be configured as required, in this embodiment, the preset time is preferably set as a long period or a short period of the LACP configuration, and the long period is 90 s and the short period is 3 s as specified in the current LACP protocol.
Embodiment 5
The establishment procedure of the aggregation group is described above, after the LACP link aggregation group is established on the LACP link, for achieving data transmission via the LACP link, a forwarding table needs to be generated according to the active interfaces in the LACP link aggregation group, so as to decide, after service data message arrives, which active interface receives data, and which active interface is used to transmit the service data generated by the local end. During data transmission in the prior art, all the active interfaces in the aggregation group are generally configured to have message receiving and transmitting functions at the same time, and inactive interfaces in the LACP link aggregation group are configured to have no data-transceiving function. When the state of the LACP link changes frequently and the state change is caused by reasons other than the failure of the link itself, such manner will cause message having been transmitted on the link to lose and affect normal communication. To this end, the invention provides an embodiment of a method for LACP link data transmission, which can avoid or reduce message loss. Referring to FIG. 5, this embodiment includes:
S501: Monitor states of interfaces in an LACP link aggregation group;
S502: When monitoring that a state change occurs on an active interface in the LACP link aggregation group, determine whether the number of active interfaces in the LACP link aggregation group is smaller than the preset minimum active link number, and if yes, then perform S502 (a): keep states of N interfaces among the interfaces on which a state change occurs, being in the active state, so that the number of the active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum active link number, where N is a natural number and N is smaller than or equal to the number of interfaces on which a state change occurs, among the active interfaces in the LACP link aggregation group.
S503: When monitoring that a state change occurs on an inactive interface in the LACP link aggregation group, adjust the states of M interfaces among the N interfaces kept in the active state into an inactive state, so that the number of the active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum active link number, where M is a natural number and M is smaller than or equal to N.
S504: Perform message transmitting and receiving registration for the active interfaces in the LACP link aggregation group, and perform message receiving registration for the interfaces changing into the inactive state in the LACP link aggregation group;
The active interface in the LACP link aggregation group either can be a message receiving end for receiving the message from the opposite end, or can be a message transmitting end for transmitting the message of the local end. Therefore, message transmitting and receiving registration is performed for the active interface. The interface changing from the active state into the inactive state in the LACP link aggregation group are only registered as message receiving function, and the interface changing into the inactive state caused by reasons other than physical link failure of itself generally can continue to receive the message but without the transmitting function.
S505: Perform data transmission according to the message transmitting and receiving registration of the interface in the LACP link aggregation group; the LACP link accomplishes data transmission and forwarding according to the registered interface.
In this embodiment, under the condition of the LACP link state changing frequently, keep the states of the N interfaces changing from the active state into the inactive state, at the previous state before the change, for a period of time, unlock the kept state for partial or all the N interfaces when new interfaces appear, and recover the real state. Furthermore, when the interface is configured with functions, not only the registration of two directions of “receiving” and “transmitting” are performed for the active interface, but also the interfaces changing from the active state into the inactive state are registered as “receiving”. This embodiment makes full use of functions of the interface, so that the message having been transmitted on the link can successfully arrive at the target end via corresponding interface, so as to avoid or reduce message loss.
The above embodiment for data transmission takes advantage of the property that after the interfaces changes from the active state into the inactive state its data receiving function is still kept for a period of time, however, such data receiving function will disappear as the time of changing into the inactive state becomes longer. Therefore, registering the interface changing from the active state into the inactive state as a “receiving” interface is not a “permanent solution”, and keeping a long-term registration state also consumes memory resources. To this end, the present invention further provides an improved technical solution of the above embodiment as follows. A timer is started when performing the message receiving registration for the interface changing from the active state to the inactive state, then, when a preset time reaches, the message receiving registration of the interface is deleted. In this way, the corresponding interface can be deleted from the registration table after the preset time elapses, and then corresponding resources are released. Here, the preset time can be configured according to practical needs, generally, the preset time is preferably set as a long period or a short period of the LACP configuration, and the long period is 90 s and the short period is 3 s as specified in the current LACP protocol.
Embodiment 6
The above embodiment provide the method embodiment for LACP link data transmission, correspondingly, the present invention also provides a device embodiment. Referring to FIG. 6, the device 600 includes: a monitoring unit 601, a determining unit 602, a state adjusting unit 603, a message transmitting and receiving registration unit 604 and a data transmission unit 605, where:
The monitoring unit 601 is configured to monitor state changes of interfaces in an LACP link aggregation group;
The determining unit 602 is configured to, when monitoring that a state change occurs on an active interface in the LACP link aggregation group, determine whether the number of active interfaces in the LACP link aggregation group is smaller than a preset minimum active link number, and if yes, trigger the state adjusting unit 603;
The state adjusting unit 603 is configured to, when determining the number of the active interfaces in the LACP link aggregation group is smaller than the preset minimum active link number, keep N interfaces among the interfaces on which a state change occurs, being in an active state, so that the number of the active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum active link number, where N is a natural number and N is smaller than or equal to the number of interfaces on which a state change occurs, among the active interfaces in the LACP link aggregation group; and when monitoring that a state change occurs on an inactive interface in the aggregation group, adjust states of M interfaces among the N interfaces kept in the active state into an inactive state, where M is a natural number and M is smaller than or equal to N.
The message transmitting and receiving registration unit 604 is configured to perform message transmitting and receiving registration for the active interface in the LACP link aggregation group, and perform message receiving registration for the interface changing into the inactive state in the LACP link aggregation group; and
The data transmission unit 605 is configured to perform data transmission according to the message transmitting and receiving registration of the interface in the LACP link aggregation group.
The working process of the device 600 according to this embodiment is as follows: the monitoring unit 601 monitors the state changes of the interfaces in the LACP link aggregation group; when monitoring an interface changes from the active state to the inactive state, enables the determining unit 602; the determining unit 602 determines whether the number of active interfaces in the LACP link aggregation group is smaller than the preset minimum active link number, if yes, triggers the state adjusting unit 603; the state adjusting unit 603 keeps the states of N interfaces among the interfaces on which the state change occurs, being the active state; and when monitoring that there are inactive interfaces changing to the active state, triggers the state adjusting unit 603 to adjust the state of M interfaces among the N interfaces kept in the active state into the inactive state. Next, the message transmitting and receiving registration unit 604 performs message transmitting and receiving registration for the active interface in the LACP link aggregation group, and performs message receiving registration for the interface changing into the inactive state in the LACP link aggregation group; and then the data transmission unit 605 performs data transmission according to the message transmitting and receiving registration of the interface in the LACP link aggregation group.
Under the condition of the LACP link changing frequently, this device embodiment keeps at least partial or all the interfaces, which change from the active state into the inactive state, at the state prior to change for a period of time, unlocks such state-keeping for one or all the interfaces in state-keeping and recovers its real state only when new interfaces appear. When configuring the function of the interface, not only the active interfaces are registered respectively with two directions of “receiving” and “transmitting”, but also the interfaces changing from the active state into the inactive state are registered as “receiving”. This embodiment makes full use of functions of the interface, so that the message having been transmitted on the link can successfully arrive at the target end via the corresponding interface, so as to avoid or reduce message loss.
In the above embodiments, when determining the number of the active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum active link number, Q interfaces among the interfaces on which a state change occurs also can be kept in the active state, so that the number of the active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum active link number, where Q is a natural number and Q is smaller than or equal to the number of interfaces, on which a state change occurs, among the active interfaces in the LACP link aggregation group.
The embodiments described above are merely preferred embodiments of the present invention and not intended to limit the present invention. Any modification, equivalent replacement and improvement within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims (10)

What is claimed is:
1. A method for link aggregation control protocol (LACP) link switching, comprising:
monitoring state changes of interfaces in an LACP link aggregation group;
when monitoring that a state change occurs on an active interface in the LACP link aggregation group, determining whether a number of active interfaces in the LACP link aggregation group is smaller than a preset minimum active link number, and if yes, keeping states of N interfaces among interfaces on which a state change occurs being an active state, so that the number of the active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum active link number, wherein N is a natural number and N is smaller than or equal to the number of interfaces on which a state change occurs, among the active interfaces in the LACP link aggregation group; and
when monitoring that a state change occurs on an inactive interface in the LACP link aggregation group, adjusting states of M interfaces among the N interfaces kept in the active state into an inactive state, wherein M is a natural number and M is smaller than or equal to N.
2. The method according to claim 1, wherein, when keeping states of the N interfaces among interfaces on which the state change occurs being the active state, a timer is started; then, when no state change of an inactive interface in the LACP link aggregation group is monitored during a preset time, the states of the M interfaces among the N interfaces kept in the active state are adjusted into the inactive state.
3. The method according to claim 2, wherein the preset time is a long period or a short period of LACP configuration.
4. The method according to claim 1, wherein, when determining the number of the active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum active link number, states of Q interfaces among interfaces on which the state change occurs are kept in the active state, so that the number of the active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum active link number, Q is a natural number and Q is smaller than or equal to the number of interfaces on which the state change occurs, among the active interfaces in the LACP link aggregation group.
5. A device for link aggregation control protocol (LACP) link switching, comprising a monitoring unit, a determining unit and a state adjusting unit, wherein:
the monitoring unit is configured to monitor state changes of interfaces in an LACP link aggregation group;
the determining unit is configured to, when monitoring that a state change occurs on an active interface in the LACP link aggregation group, determine whether a number of active interfaces in the LACP link aggregation group is smaller than a preset minimum active link number, and if yes, trigger the state adjusting unit; and
the state adjusting unit is configured to, when the number of the active interfaces in the LACP link aggregation group is smaller than the preset minimum active link number, keep states of N interfaces among interfaces on which a state change occurs being an active state, so that the number of the active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum active link number, wherein N is a natural number and N is smaller than or equal to the number of interfaces on which a state change occurs, among the active interfaces in the LACP link aggregation group; and when monitoring that a state change occurs on an inactive interface in the aggregation group, adjust states of M interfaces among the N interfaces kept be the active state into an inactive state, wherein M is a natural number and M is smaller than or equal to N.
6. The device according to claim 5, wherein the device further comprises a timer, configured to be started when states of the N interfaces among interfaces on which the state change occurs are kept in the active state; then, when no state change of an inactive interface in the LACP link aggregation group is monitored during a preset time, trigger the state adjusting unit, and the state adjusting unit is configured to adjust the states of M interfaces among the N interfaces kept in the active state into the inactive state.
7. A method for link aggregation control protocol (LACP) data transmission, comprising:
monitoring state changes of interfaces in an LACP link aggregation group;
when monitoring that a state change occurs on an active interface in the LACP link aggregation group, determining whether a number of active interfaces in the LACP link aggregation group is smaller than a preset minimum active link number, and if yes, keeping states of N interfaces among interfaces on which a state change occurs being an active state, so that the number of the active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum active link number, wherein N is a natural number and N is smaller than or equal to the number of interfaces on which a state change occurs, among the active interfaces in the LACP link aggregation group; and
when monitoring that a state change occurs on an inactive interface in the LACP link aggregation group, adjusting states of M interfaces among the N interfaces kept in the active state into an inactive state, wherein M is a natural number and M is smaller than or equal to N;
performing message transmitting and receiving registration for the active interfaces in the LACP link aggregation group, and performing message receiving registration for an interface changing into the inactive state; and
performing data transmission according to the message transmitting and receiving registration of interfaces in the LACP link aggregation group.
8. The method according to claim 7, wherein, when the message receiving registration is performed for an interface changing into the inactive state, a timer is started;
after a preset time elapses, the message receiving registration of the interface is deleted.
9. The method according to claim 8, wherein the preset time is a long period or a short period of LACP configuration.
10. A device for link aggregation control protocol (LACP) data transmission, comprising a monitoring unit, a determining unit, a state adjusting unit, a message transmitting and receiving registration unit, and a data transmission unit, wherein:
the monitoring unit is configured to monitor state changes of interfaces in an LACP link aggregation group;
the determining unit is configured to, when monitoring that a state change occurs on an active interface in the LACP link aggregation group, determine whether a number of active interfaces in the LACP link aggregation group is smaller than a preset minimum active link number, and if yes, trigger the state adjusting unit;
the state adjusting unit is configured to, when the number of the active interfaces in the LACP link aggregation group is smaller than the preset minimum active link number, keep states of N interfaces among interfaces on which a state change occurs being an active state, so that the number of the active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum active link number, wherein N is a natural number and N is smaller than or equal to the number of interfaces on which a state change occurs, among the active interfaces in the LACP link aggregation group; and when monitoring that a state change occurs on an inactive interface in the aggregation group, adjust states of M interfaces among the N interfaces kept in the active state into an inactive state, wherein M is a natural number and M is smaller than or equal to N;
the message transmitting and receiving registration unit is configured to perform message transmitting and receiving registration for the active interfaces in the LACP link aggregation group, and perform message receiving registration for an interface changing into the inactive state; and
the data transmission unit is configured to perform data transmission according to the message transmitting and receiving registration of interfaces in the LACP link aggregation group.
US14/225,770 2011-10-12 2014-03-26 Method and device for LACP link switching and data transmission Active 2032-12-13 US9270524B2 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN201110308340.7 2011-10-12
CN2011103083407A CN102364892B (en) 2011-10-12 2011-10-12 Link aggregation control protocol (LACP) link switching and data transmission method and apparatus thereof
CN201110308340 2011-10-12
PCT/CN2012/080126 WO2013053267A1 (en) 2011-10-12 2012-08-15 Lacp link switching and data transmission method and device

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/080126 Continuation WO2013053267A1 (en) 2011-10-12 2012-08-15 Lacp link switching and data transmission method and device

Publications (2)

Publication Number Publication Date
US20140204729A1 US20140204729A1 (en) 2014-07-24
US9270524B2 true US9270524B2 (en) 2016-02-23

Family

ID=45691444

Family Applications (1)

Application Number Title Priority Date Filing Date
US14/225,770 Active 2032-12-13 US9270524B2 (en) 2011-10-12 2014-03-26 Method and device for LACP link switching and data transmission

Country Status (4)

Country Link
US (1) US9270524B2 (en)
EP (1) EP2720418B1 (en)
CN (1) CN102364892B (en)
WO (1) WO2013053267A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10122587B2 (en) 2016-03-15 2018-11-06 Knight Point Systems, Llc System and method for automatically determining the optimal topology for multiple networked devices
US10868729B2 (en) 2016-03-15 2020-12-15 Knight Point Systems, Llc System and method for automatically determining the optimal topology for multiple networked devices

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102412979B (en) * 2010-09-26 2015-09-02 杭州华三通信技术有限公司 Reduce method and the communication equipment of link polymerization terminal port message dropping
CN102364892B (en) * 2011-10-12 2013-04-24 华为技术有限公司 Link aggregation control protocol (LACP) link switching and data transmission method and apparatus thereof
CN102882805B (en) * 2012-09-24 2015-12-02 华为技术有限公司 Avoid method and the device of link aggregation group from state transition
CN103916281B (en) * 2014-04-29 2018-01-30 上海斐讯数据通信技术有限公司 A kind of dynamic LACP aggregated link failures restoration methods
CN105281926B (en) * 2014-05-27 2019-03-12 中兴通讯股份有限公司 A kind of method and device of the Signal Degrade trigger protection switching of link polymerization terminal port
CN104283724B (en) * 2014-10-31 2017-10-27 大唐移动通信设备有限公司 A kind of management method and equipment of aggregation group state
US9923781B2 (en) * 2015-11-18 2018-03-20 Telefonaktiebolaget Lm Ericsson (Publ) Designated forwarder (DF) election and re-election on provider edge (PE) failure in all-active redundancy topology
CN106302215A (en) * 2016-08-30 2017-01-04 华为技术有限公司 A kind of method and device E-Packeted
CN108234308B (en) * 2016-12-14 2022-04-01 迈普通信技术股份有限公司 Distributed equipment internal communication system and method
CN108270589B (en) * 2016-12-30 2021-06-15 北京华为数字技术有限公司 Message processing method and related device
CN109218232B (en) * 2017-06-29 2020-06-16 华为技术有限公司 Method, equipment and system for realizing Mux machine
US10560326B2 (en) * 2017-09-22 2020-02-11 Webroot Inc. State-based entity behavior analysis
CN109672513B (en) * 2017-10-16 2021-10-22 华为技术有限公司 Transmission path configuration method, device and equipment
JP7063145B2 (en) * 2018-06-29 2022-05-09 住友電気工業株式会社 Communication device and control method of communication device
CN109450738A (en) * 2018-12-19 2019-03-08 迈普通信技术股份有限公司 Chain circuit detecting method, device and server
US11627096B2 (en) * 2019-06-04 2023-04-11 Cisco Technology, Inc. Bandwidth awareness in a link aggregation group
US11088963B2 (en) * 2019-12-16 2021-08-10 Dell Products L.P. Automatic aggregated networking device backup link configuration system
CN114827016B (en) * 2022-04-12 2023-03-24 珠海星云智联科技有限公司 Method, device, equipment and storage medium for switching link aggregation scheme

Citations (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050180438A1 (en) * 2004-01-30 2005-08-18 Eun-Sook Ko Setting timers of a router
US20060077891A1 (en) * 2004-10-07 2006-04-13 Cisco Technology, Inc. Wiring closet redundancy
US20070201380A1 (en) * 2006-02-24 2007-08-30 Cisco Technology, Inc. Method and system for power-efficient adaptive link aggregation
US20080056121A1 (en) * 2006-08-29 2008-03-06 Cisco Technology, Inc. Method and System for Providing Control Plane Resiliency with Undisrupted Forwarding in a Data Network
CN101217424A (en) 2008-01-21 2008-07-09 中兴通讯股份有限公司 A detecting method and device of aggregated link failures
CN101355511A (en) 2008-09-17 2009-01-28 杭州华三通信技术有限公司 Method and apparatus for protecting chain polymerization traffic
US20090129276A1 (en) * 2007-11-21 2009-05-21 Motorola, Inc. Method and device for managing data rate in a communication system
US20090290497A1 (en) * 2008-05-22 2009-11-26 Level 3 Communications Llc Multi-router igp fate sharing
CN101616067A (en) 2008-06-27 2009-12-30 中兴通讯股份有限公司 Link switch-over method and device
CN101651960A (en) 2009-09-17 2010-02-17 中兴通讯股份有限公司 Protection method and device of link condensation bandwidth based on LACP
CN101692652A (en) 2009-09-15 2010-04-07 杭州华三通信技术有限公司 Method for preventing interrupt of traffics in aggregation link
US20100146323A1 (en) * 2008-12-05 2010-06-10 Hangzhou H3C Technologies Co., Ltd. Method, system and apparatus for detecting multiple active devices in stack
US20100188975A1 (en) * 2009-01-28 2010-07-29 Gregory G. Raleigh Verifiable device assisted service policy implementation
US20110096708A1 (en) * 2008-07-07 2011-04-28 Robert Novak Wireless scheduling systems and methods
CN102075343A (en) 2009-11-20 2011-05-25 杭州华三通信技术有限公司 An out-of-band management realization method, a system for the same and an out-of-band management switch
US20110194562A1 (en) 2010-02-10 2011-08-11 Fujitsu Network Communications, Inc. Systems and Methods for Communication of Management Traffic Over Link Aggregation Group Interface for a Network Element with Distributed Architecture
US20110211585A1 (en) * 2010-02-26 2011-09-01 Alaxala Networks Corporation Packet relay device
US20110310729A1 (en) * 2010-06-17 2011-12-22 Cisco Technology, Inc. Maintaining balance of active links across network devices in a double-sided virtual port-channel environment
US8112794B2 (en) * 2006-07-17 2012-02-07 Research In Motion Limited Management of multiple connections to a security token access device
CN102364892A (en) 2011-10-12 2012-02-29 华为技术有限公司 Link aggregation control protocol (LACP) link switching and data transmission method and apparatus thereof
US20130003559A1 (en) * 2011-06-30 2013-01-03 Broadcom Corporation Adaptive Power Savings for Aggregated Resources
US20130170340A1 (en) * 2012-01-04 2013-07-04 Cisco Technology, Inc., A Corporation Of California Dynamically Adjusting Active Members in Multichassis Link Bundle
US20130250829A1 (en) * 2010-11-16 2013-09-26 Fujitsu Limited Method for controlling communication system, communication system, and communication apparatus

Patent Citations (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050180438A1 (en) * 2004-01-30 2005-08-18 Eun-Sook Ko Setting timers of a router
US20060077891A1 (en) * 2004-10-07 2006-04-13 Cisco Technology, Inc. Wiring closet redundancy
US20070201380A1 (en) * 2006-02-24 2007-08-30 Cisco Technology, Inc. Method and system for power-efficient adaptive link aggregation
US8112794B2 (en) * 2006-07-17 2012-02-07 Research In Motion Limited Management of multiple connections to a security token access device
US20080056121A1 (en) * 2006-08-29 2008-03-06 Cisco Technology, Inc. Method and System for Providing Control Plane Resiliency with Undisrupted Forwarding in a Data Network
US20090129276A1 (en) * 2007-11-21 2009-05-21 Motorola, Inc. Method and device for managing data rate in a communication system
CN101217424A (en) 2008-01-21 2008-07-09 中兴通讯股份有限公司 A detecting method and device of aggregated link failures
US20090290497A1 (en) * 2008-05-22 2009-11-26 Level 3 Communications Llc Multi-router igp fate sharing
CN101616067A (en) 2008-06-27 2009-12-30 中兴通讯股份有限公司 Link switch-over method and device
US20110096708A1 (en) * 2008-07-07 2011-04-28 Robert Novak Wireless scheduling systems and methods
CN101355511A (en) 2008-09-17 2009-01-28 杭州华三通信技术有限公司 Method and apparatus for protecting chain polymerization traffic
US20100146323A1 (en) * 2008-12-05 2010-06-10 Hangzhou H3C Technologies Co., Ltd. Method, system and apparatus for detecting multiple active devices in stack
US20100188975A1 (en) * 2009-01-28 2010-07-29 Gregory G. Raleigh Verifiable device assisted service policy implementation
CN101692652A (en) 2009-09-15 2010-04-07 杭州华三通信技术有限公司 Method for preventing interrupt of traffics in aggregation link
CN101651960A (en) 2009-09-17 2010-02-17 中兴通讯股份有限公司 Protection method and device of link condensation bandwidth based on LACP
CN102075343A (en) 2009-11-20 2011-05-25 杭州华三通信技术有限公司 An out-of-band management realization method, a system for the same and an out-of-band management switch
US20110194562A1 (en) 2010-02-10 2011-08-11 Fujitsu Network Communications, Inc. Systems and Methods for Communication of Management Traffic Over Link Aggregation Group Interface for a Network Element with Distributed Architecture
US20110211585A1 (en) * 2010-02-26 2011-09-01 Alaxala Networks Corporation Packet relay device
US20110310729A1 (en) * 2010-06-17 2011-12-22 Cisco Technology, Inc. Maintaining balance of active links across network devices in a double-sided virtual port-channel environment
US20130250829A1 (en) * 2010-11-16 2013-09-26 Fujitsu Limited Method for controlling communication system, communication system, and communication apparatus
US20130003559A1 (en) * 2011-06-30 2013-01-03 Broadcom Corporation Adaptive Power Savings for Aggregated Resources
CN102364892A (en) 2011-10-12 2012-02-29 华为技术有限公司 Link aggregation control protocol (LACP) link switching and data transmission method and apparatus thereof
US20130170340A1 (en) * 2012-01-04 2013-07-04 Cisco Technology, Inc., A Corporation Of California Dynamically Adjusting Active Members in Multichassis Link Bundle

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
"Cisco ASR 9000 Series Aggregation Services Router L2VPN and Ethernet Services Configuration Guide," Cisco IOS XR Software Release 4.1, pp. i-376, Cisco Systems, Inc., San Jose, California (Apr. 30, 2011).
"IEEE Standard for Local and metropolitan area networks-Link Aggregation" IEEE Std 802.1AX-2008, pp. 1-145, Institute of Electrical and Electronics Engineers, New York, New York (Nov. 3, 2008).
Risso, "Link Aggregation-IEEE 802.3ad," slides, Based on ch. 8 of Baldi et al. "Switched LAN," McGraw-Hill, 2002, and on an existing presentation of Mario Baldi and Piero Nicoletti.
Vasseur et al., "Network Recovery: Protection and Restoration of Optical, SONET-SDH, IP, and MPLS," The Morgan Kaufman Series in Networking, pp. 226-227, Elsevier, Amsterdam, Netherlands (Aug. 19, 2004).

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10122587B2 (en) 2016-03-15 2018-11-06 Knight Point Systems, Llc System and method for automatically determining the optimal topology for multiple networked devices
US10868729B2 (en) 2016-03-15 2020-12-15 Knight Point Systems, Llc System and method for automatically determining the optimal topology for multiple networked devices

Also Published As

Publication number Publication date
EP2720418B1 (en) 2017-02-22
CN102364892B (en) 2013-04-24
US20140204729A1 (en) 2014-07-24
CN102364892A (en) 2012-02-29
EP2720418A1 (en) 2014-04-16
EP2720418A4 (en) 2015-01-07
WO2013053267A1 (en) 2013-04-18

Similar Documents

Publication Publication Date Title
US9270524B2 (en) Method and device for LACP link switching and data transmission
US9258183B2 (en) Method, device, and system for realizing disaster tolerance backup
US7433317B2 (en) Network connection apparatus and network connection switching method
CN100589408C (en) A communication network connection method and its device
US7533166B2 (en) Method and system for router misconfiguration autodetection
WO2009023996A1 (en) Method for implementing network interconnect via link aggregation
US8606186B2 (en) Wireless communication path management methods and systems
US20170324580A1 (en) Failure protection method based on ring protection link, device, and system
WO2017124791A1 (en) Link detecting method and device
WO2009124499A1 (en) Protection method, device and communication system for transmitting signaling
WO2012048585A1 (en) Switching method and router
WO2015070383A1 (en) Link aggregation method, apparatus, and system
CN109218232B (en) Method, equipment and system for realizing Mux machine
US7860090B2 (en) Method for processing LMP packets, LMP packet processing unit and LMP packet processing node
CN101848165B (en) The method recovered after controlling interrupted communication link and interface board
US9071538B2 (en) Method for dynamically adjusting switching loop and network equipment
JP2008177710A (en) Media service system, media service device, and lan redundancy method used therefor
Kong Design concept for a failover mechanism in distributed SDN controllers
CN104836729B (en) A kind of method of linear protection switching, PE equipment and system
CN112788696A (en) Communication delay reduction method and system for switching wireless network of mobile terminal in area
US20240275737A1 (en) Adaptive networking for resilient communications
CN115150453B (en) Method, system, equipment and storage medium for avoiding LACP protocol timeout
US11470510B2 (en) Packet transmission system, transmission apparatus, transmission-path switching method, and transmission-path switching program
CN109889367B (en) Method and system for realizing LACP NSR in distributed equipment not supporting NSR
CN117220814A (en) Clock device synchronization method, nonvolatile storage medium, and electronic device

Legal Events

Date Code Title Description
AS Assignment

Owner name: HUAWEI TECHNOLOGIES CO., LTD., CHINA

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:ZHANG, XIAOYI;WANG, CHENG;DING, CHENGLONG;AND OTHERS;SIGNING DATES FROM 20140220 TO 20140319;REEL/FRAME:032528/0755

STCF Information on status: patent grant

Free format text: PATENTED CASE

MAFP Maintenance fee payment

Free format text: PAYMENT OF MAINTENANCE FEE, 4TH YEAR, LARGE ENTITY (ORIGINAL EVENT CODE: M1551); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

Year of fee payment: 4

MAFP Maintenance fee payment

Free format text: PAYMENT OF MAINTENANCE FEE, 8TH YEAR, LARGE ENTITY (ORIGINAL EVENT CODE: M1552); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

Year of fee payment: 8