WO2013053267A1 - 一种lacp链路切换、数据传输方法与装置 - Google Patents

一种lacp链路切换、数据传输方法与装置 Download PDF

Info

Publication number
WO2013053267A1
WO2013053267A1 PCT/CN2012/080126 CN2012080126W WO2013053267A1 WO 2013053267 A1 WO2013053267 A1 WO 2013053267A1 CN 2012080126 W CN2012080126 W CN 2012080126W WO 2013053267 A1 WO2013053267 A1 WO 2013053267A1
Authority
WO
WIPO (PCT)
Prior art keywords
state
active
interfaces
interface
aggregation group
Prior art date
Application number
PCT/CN2012/080126
Other languages
English (en)
French (fr)
Inventor
张晓益
王铖
丁成龙
孙琦
赵凤华
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP12840190.8A priority Critical patent/EP2720418B1/en
Publication of WO2013053267A1 publication Critical patent/WO2013053267A1/zh
Priority to US14/225,770 priority patent/US9270524B2/en

Links

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
    • 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
    • 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
    • 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
    • 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 communications technologies, and in particular, to a link aggregation control protocol LACP link switching, data transmission method and apparatus.
  • LACP Link Aggregation Control Protocol
  • LACP Link Aggregation Control Protocol
  • the role of aggregation is to improve transmission bandwidth and enhance system reliability.
  • multiple links (member links) are aggregated into a logical link with a higher bandwidth.
  • the logical link is called an aggregation group.
  • the link containing the aggregation group is an LACP link.
  • the number of member links aggregated in an aggregation group is usually determined based on the bandwidth requirements of the service.
  • the number of active interfaces on the single-ended link of the member of the aggregation group should be at least equal to or equal to the preset minimum number of active links for transmitting the corresponding service.
  • the status of the aggregation group is UP.
  • the LACP link is in the path. The link can be used. If the requirement is not met, the number of active interfaces on the single-ended link of the member of the aggregation group is smaller than the preset minimum active link.
  • the number is up, the status of the aggregation group is In the Down state, the LACP link is in the "open circuit" and the link cannot be used.
  • the state of the LACP link aggregation group determines the handover process of the LACP link.
  • the two ends of the aggregation group periodically send LACPDUs (LACC) messages.
  • LACC LACPDUs
  • the system priority and interface of the peers carried in the LACPDU are sent.
  • the information such as the priority is compared with the configuration of the local device. If the configuration is inconsistent, the local configuration is adjusted according to the comparison result.
  • the number of active interfaces in the aggregation group changes during the adjustment. When the number of active interfaces increases or decreases to a certain level, the aggregation group The state will alternate between UP and Down.
  • the interface when the active interface in the aggregation group becomes an inactive interface, the interface is usually set to a "dead" interface that no longer has the function of transmitting and receiving data.
  • the state change on the above interface is
  • an object of the present invention is to provide a LACP link switching method and apparatus, which solves the problem of "flashing" of a link in an LACP link switching process, thereby avoiding Frequent "drops" occur when users communicate.
  • a link aggregation control protocol LACP link switching method includes: monitoring a state change of an interface in an LACP link aggregation group;
  • the state of the M interfaces in the N active state interfaces is adjusted to an inactive state, where M is a natural number and M Less than or equal to N.
  • the timer is started, and: the LACP link aggregation group is not monitored to be inactive within a preset time.
  • the status of the interface changes state the status of the M interfaces in the N active-active interfaces is adjusted to an inactive state.
  • the preset time is a long period or a short period of the LACP configuration.
  • the status of the Q interfaces in the interface that changes state will occur.
  • the active state is maintained such that the number of active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum number of active links, Q is a natural number, and Q is less than or equal to the LACP link aggregation group.
  • the number of interfaces whose state changes in the active interface is a natural number.
  • a link aggregation control protocol LACP link switching apparatus includes: a monitoring unit, a determining unit, and a state adjusting unit, wherein:
  • the monitoring unit is configured to monitor a state change of an interface in an LACP link aggregation group, where the determining unit is configured to determine, when the state of the interface in the active state of the LACP link aggregation group is changed, Whether the number of the active interfaces in the LACP link aggregation group is smaller than the preset minimum number of active links, and if so, triggering the state adjustment unit; the state adjustment unit is configured to be in the LACP link aggregation group. When the number of active interfaces is less than the preset minimum number of active links, the state of the N interfaces in the interface where the state change occurs is kept active, so that the interfaces in the LACP link aggregation group are active.
  • the number is greater than or equal to the preset minimum number of active links; N is a natural number and N is less than or equal to the number of interfaces in the interface in the active state of the LACP link aggregation group; the LACP chain is detected.
  • N is a natural number and N is less than or equal to the number of interfaces in the interface in the active state of the LACP link aggregation group; the LACP chain is detected.
  • M is a natural number and M is less than or equal to N.
  • the device further includes a timer that is started when the state of the N interfaces in the interface where the state change occurs is kept active, and: the device is not monitored within the preset time.
  • the state adjustment unit is triggered to adjust the state of the M interfaces in the N active interface. Inactive.
  • a link aggregation control protocol LACP link data transmission method includes: monitoring a state change of an interface in an LACP link aggregation group;
  • the state of the M interfaces in the N active interface is adjusted to an inactive state, where M is a natural number and M is less than or equal to N;
  • the interface in the active state of the LACP link aggregation group is configured to send and receive a message, and the interface is changed to an inactive state to receive and register the message;
  • Data transmission is performed according to message transmission and reception registration of the interface in the LACP link aggregation group.
  • the interface when the interface is changed to the inactive state, the interface is received and registered. After the timer expires, the message receiving registration of the interface is deleted after the preset time arrives.
  • the preset time is a long period or a short period of the LACP configuration.
  • a link aggregation control protocol LACP link data transmission apparatus includes: a monitoring unit, a determining unit, a state adjusting unit, a message receiving and receiving registration unit, and a data transmission unit, where:
  • the monitoring unit is configured to monitor a state change of an interface in an LACP link aggregation group, where the determining unit is configured to determine, when the state of the interface in the active state of the LACP link aggregation group is changed, Whether the number of the active interfaces in the LACP link aggregation group is smaller than the preset minimum number of active links, and if so, triggering the state adjustment unit; the state adjustment unit is configured to be in the LACP link aggregation group. When the number of active interfaces is less than the preset minimum number of active links, the state of the N interfaces in the interface where the state change occurs is kept active, so that the interfaces in the LACP link aggregation group are active.
  • the number is greater than or equal to the preset minimum number of active links; N is a natural number and N is less than or equal to the number of interfaces in the interface in the active state of the LACP link aggregation group; the LACP chain is detected.
  • N is a natural number and N is less than or equal to the number of interfaces in the interface in the active state of the LACP link aggregation group; the LACP chain is detected.
  • M is a natural number and M is less than or equal to N;
  • the packet sending and receiving registration unit is configured to send and receive a message to an interface in an active state in the LACP link aggregation group, and change the state to an inactive interface. Message reception and registration;
  • the data transmission unit is configured to perform data transmission according to a message sending and receiving registration of an interface in the LACP link aggregation group.
  • the LACP link switching technical solution detects at least part of the interface of the interface that changes from the active state to the inactive state when the interface state changes and the change is determined to be caused by the LACP link switching.
  • the pre-change state is maintained for a period of time such that the number of active interfaces is greater than or equal to the preset minimum number of active links until the new interface changes from an inactive state to an active state.
  • the state of the interface that is inactive is set to inactive.
  • the state of the interface that changes the state is locked until the new interface that replaces the interface is unlocked, so that the state of the LACP link aggregation group is Always stay the same.
  • the state of the interface that is logically located on the bottom layer changes, and does not affect the state of the aggregation group that is logically at the upper layer, thereby achieving a smooth transition of the link when the link switching event occurs, and solving the frequent flashing of the link.
  • the LACP link data transmission technical solution divides the forwarding table into two categories based on the foregoing link switching method: a message receiving data table and a message sending data table, and will be changed from an activity to an activity.
  • the inactive interface is registered to the message receiving data table. After this processing, the above interface from the active state to the inactive state can still be performed during data transmission. Receives data packets that have been transmitted on the link before the state change, ensuring that data packets are not lost during LACP link switching.
  • Figure 1 (a) ⁇ (c) is a schematic diagram of the establishment process of the LACP link aggregation group
  • FIG. 2 is a flowchart of Embodiment 1 of an LACP link switching method according to the present invention
  • FIG. 3 is a flowchart of Embodiment 2 of an LACP link switching method according to the present invention
  • FIG. 4 is a flowchart of an LACP link switching apparatus according to the present invention
  • 4 is a block diagram of a fifth embodiment of the LACP link data transmission method of the present invention
  • FIG. 6 is a block diagram of a sixth embodiment of the LACP link data transmission apparatus of the present invention.
  • the embodiment of the present invention provides a LACP link switching method and apparatus.
  • the method and the device determine that the state change of one or some interfaces will cause the LACP link to be switched, before the change of at least a part of the interfaces
  • the state is "locked” to make the number of active interfaces greater than or equal to the preset minimum number of active links until a new interface with the same "lock" status appears in the LACP link aggregation group.
  • the state of the LACP link aggregation group changes only at the lower layer level of the interface, and the logical upper layer of the link aggregation group remains unchanged.
  • the aggregation group establishment process of the LACP link includes:
  • the devices at both ends of the LACP link configure the LACP mode and select the interface to be added to the LACP link aggregation group according to the priority of the interface. Interfaces. The selected interfaces enable LACP.
  • the devices at both ends send LACPDUs. As shown in Figure 1 (a), the two ends of the LACP link are connected to Router A and Router B. The solid line connecting Router A and Router B indicates the communication link, and the arrow indicates the direction of LACPDU packet transmission.
  • the devices at both ends of the LACP link determine the active device and the passive device according to the system LACP priority and system ID in the LACPDU.
  • the LACPDU packet contains the following information: system priority, system ID, interface operation key, interface priority, interface ID, and interface status.
  • Router B After receiving the LACPDUs sent by Router A, Router B checks the LACPDUs to learn the system priority and system ID of Router A, and compares it with its own system priority and system ID. If the system priority of Router A is higher than that of Router B, then Router A is the active device of the link and Router B is the passive device. Otherwise, Router B is the active device of the LACP link. Router A is a passive device. Similarly, when Router A receives the LACPDU packet sent by Router B. The active device and the passive device will also be determined in the manner described above. In this example, the system priority of Router A is 10 and the priority of Router B is 11. The router is the active device and Router B is the passive device.
  • S103 Determine an interface that enters the aggregation group according to the interface priority of the active end device of the LACP link. After the two devices negotiate the same, the logical link that is based on the original communication link, that is, the LACP link aggregation group is established.
  • the devices at both ends of the LACP link determine the interface that constitutes the aggregation group according to the interface priority of the active device.
  • a communication link is formed between interfaces corresponding to the devices at both ends, and multiple communication links (member links) form a logical link.
  • the aggregation group of the LACP link is established.
  • the interfaces that enter the aggregation group are not all active.
  • the number of active interfaces depends on the bandwidth requirements of the traffic transmission. Generally, the number of interfaces on a single-ended link of a member link of an LACP link aggregation group should be between the preset minimum number of active links and the maximum number of active links.
  • An interface that does not enter the LACP link aggregation group and an inactive member interface in the aggregation group form a backup interface. It is used to replace the active interface in the LACP link aggregation group. If the number of active links in the LACP link aggregation group does not reach the preset maximum active link, you can set the inactive member interfaces in the LACP link aggregation group to the active state. For the convenience of the description, in the following embodiments, the interface that is located outside the LACP link aggregation group and the member interface in the LACP link aggregation group are simply referred to as interfaces. As shown in Figure 1 (c), Router A is the active device. The device has three interfaces. Router B is a passive device and has three interfaces.
  • the active interface of the LACP link aggregation group is the interface of Router A 1 and 2, according to the priority of the interface.
  • the interface establishes a link with Router A.
  • the two links (four interfaces) of the LACP link aggregation group are active.
  • LACP link aggregation group After the LACP link aggregation group is established in the foregoing manner, whether the LACP link can communicate normally depends on the current state of the LACP link aggregation group.
  • LACP link aggregation groups There are two types of LACP link aggregation groups: UP state and Down state.
  • the LACP link aggregation group is in the Up state and the LACP link is connected.
  • the number of active interfaces on the LACP link aggregation group marked in the selected state and the inactive interface is marked as Unsdected
  • the preset minimum number of active links Normal communication is possible.
  • the LACP link aggregation group When the number of active interfaces on one end of the LACP link aggregation group (marked as Selected) is less than the preset minimum number of active links, the LACP link aggregation group is in the Down state, the LACP link is broken, and the communication is interrupted. Only when the LACP link aggregation group is in the UP state again, the communication process can be re-established before normal communication can be performed.
  • the change process between the UP state and the Down state of the LACP link aggregation group constitutes the handover of the LACP link.
  • the link switching from the UP state to the Down state is triggered by a handover event, which includes a link Down event, an ETH-OAM detected link failure, and an LACP discovery link failure.
  • the status of the corresponding interface in the LACP link aggregation group is changed from Selected to Unselected.
  • the status of the interface is changed, the number of active interfaces in the LACP link aggregation group is reduced to the minimum number of links.
  • LACP The link aggregation group is switched from the UP state to the Down state. Link switching from the Down state to the UP state is implemented by the LACP preemption.
  • the inactive interface in the backup state takes over the above-mentioned inactive state according to the priority level.
  • the interface that is, the state of the inactive interface in the backup state is changed from Unselected to Selected.
  • the state of the LACP link aggregation group For example, if you want to maintain the state of the LACP link aggregation group as UP, at least 10 or more interfaces in the LACP link aggregation group should be active, that is, the preset minimum number of active links is 10 . Then, when the number of active interfaces in the LACP link aggregation group is less than 10, the LACP link aggregation group will switch from the UP state to the Down state. Conversely, when the number of active interfaces in the LACP link aggregation group increases from less than 10 to 10 or greater than 10, the state of the LACP link aggregation group will switch from the Down state to the UP state.
  • the process can be illustrated by an example of a telephone call: the user ⁇ makes a call to the user, and after dialing the line for a period of time, for some reason, a LACP link of the line between the user B and the A changes from the UP state to the Down state. In the state, the line is disconnected, the phone is dropped, and the call between the user B and the A is forced to be interrupted. After a while, the LACP link is restored from the Down state to the UP state. At this time, the user B cannot directly continue the call but must be restarted. After the dial-up establishes a connection with user A, the previous call can be continued. If the LACP link is frequently in the process of switching, user B will dial multiple times.
  • the embodiment of the present invention proposes a new LACP link switching method.
  • the method includes:
  • the interfaces in the LACP link aggregation group include active interfaces and inactive interfaces.
  • Inactive interfaces are generally not automatically enabled, and only when there is a decrease in the number of active interfaces, an inactive state to an active state change is used to fill the above-mentioned interface from active to inactive.
  • the status change of the active interface may cause the state of the LACP link aggregation group to change from the UP state to the Down state, which affects the normal communication at both ends of the LACP link.
  • the interface When an interface that is active in the LACP link aggregation group is detected, the interface is generated. When the state changes, it is determined whether the number of interfaces in the active state of the LACP link aggregation group is less than the preset minimum number of active links, and if so, executing S202 (a): maintaining the state of the N interfaces in the interface where the state change occurs
  • the active state is such that the number of active interfaces is greater than or equal to the preset minimum number of active links, so that the state of the LACP link aggregation group remains UP, N is a natural number, and N is less than or equal to The number of interfaces whose status changes in the active interface in the LACP link aggregation group.
  • the number of active interfaces is reduced when the interface is changed from active to inactive.
  • the number of active interfaces in the LACP link aggregation group is reduced to less than the preset minimum number of active links, the LACP chain will be affected.
  • the status of the road aggregation group Therefore, when the interface is inactive, the number of active interfaces in the LACP link aggregation group is determined to be less than the minimum number of active active links. If the status changes, the number of active interfaces in the LACP link aggregation group is changed.
  • the state of the N interfaces in the interface that has just changed from the active state to the inactive state is still set to the active state according to the requirement of the preset minimum active link number.
  • the LACP link aggregation group considers that the interface state has not changed, and its UP state will be maintained.
  • the LACP link aggregation group does not open, that is, a link of the entire LACP link aggregation group. Although not available, the LACP link aggregation group is not aware of it and still maintains the link "clear" status.
  • S203 When the status change of the inactive interface in the LACP link aggregation group is detected, the status of the M interfaces in the N active interface is adjusted to be inactive. a state, such that the number of active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum number of active links, where M is a natural number and M is less than or equal to N.
  • the backup interface When the status of the interface in the LACP link aggregation group changes from the active state to the inactive state, the backup interface is immediately "active".
  • the LACP preemption determines which backup interface takes over from the active state to the inactive state. That interface, after the "new and old alternate" is completed, sets the state of the M interfaces among the N interfaces in the active state to the inactive state to their real state: inactive state, and makes the LACP link
  • the number of active interfaces in the aggregation group is greater than or equal to the preset minimum number of active links.
  • the LACP link switching technology solution in this embodiment changes the active state to inactive when it detects that the "hopping" of the interface will cause the state of the link aggregation group to change after detecting the change of the interface state.
  • the state of the interface of the state remains in the original state (active state) for a period of time until a new interface from the inactive state to the active state occurs, thereby replacing the aforementioned interface, and then changing the interface state from the active state to the inactive state Go back to its true state.
  • the state of the LACP link aggregation group when the handover event occurs on the LACP link, the state of the LACP link aggregation group does not change with the interface state by maintaining the state before the change of the interface whose state is changed to the new active link. Change, so that the state change of the interface layer is reflected in the LACP link aggregation group level, and is smoothly "smoothed out".
  • the LACP link aggregation group always maintains the previous state, and the LACP link will not be broken, the entire link The state does not change, and the "flash" effect no longer occurs frequently, thus effectively ensuring the level of communication service.
  • Embodiment 2 Embodiment 2
  • the pre-state (active state) of the interface in the LACP link aggregation group from the active state to the inactive state is maintained until the new interface occurs, during which the LACP preemption function completes the new interface. Recommend "work. However, in actual operation, there may be multiple reasons for LACP preemption to be unsuccessful or the preemption delay is too long, or even preemption work is not performed. In the former case, if the backup interface of the LACP link aggregation group fails or does not have more backup interfaces, the backup link recommended by the priority will not be able to return the LACP link aggregation group from the Down state to the UP state; The situation is as follows: The LACP preemption function is not set in the "enabled" state.
  • the present invention provides another embodiment. This embodiment includes:
  • the active state is such 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 less than or equal to N.
  • the timer determines the length of the waiting time, and the interface that detects the active state occurs within the preset time of the timer, that is, according to the requirement that the preset minimum number of active links is met,
  • the state of the M interfaces of the N interfaces maintained by the state, and the state of the M interfaces is set back to the real state, and the number of active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum active chain.
  • the number of channels; the active interface in the LACP link aggregation group is not detected when the timer is exceeded, and the state of at least one of the M interfaces maintained in the state is also released, and the state is set back to the real state.
  • the LACP link aggregation group is always in a false state and the resources of the LACP link are not released.
  • the preset time of the timer in this embodiment can be set as required.
  • the long period or short period of the LACP configuration can be set.
  • the long period specified in the current LACP protocol is 90s, and the short period is 3s.
  • Embodiment 3 The foregoing two embodiments are mainly for the case that the status of the LACP link aggregation group changes due to the detection of a new inactive interface, and there is no mention of the situation in which a new inactive interface does not cause a state change of the LACP link aggregation group. .
  • this embodiment includes:
  • the LACP When the status of the interface in the active state of the LACP link aggregation group is changed, the LACP will be used regardless of whether the number of active interfaces in the LACP link aggregation group is less than the preset minimum number of active links.
  • the state of the N interfaces in the interface in the link aggregation group is kept active, 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 N is a natural number and N is less than or equal to the number of interfaces in the active interface of the LACP link aggregation group.
  • the state of the inactive interface in the LACP link aggregation group is changed, the state of the M interfaces in the N active state interfaces is adjusted to an inactive state,
  • the number of active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum active link number ⁇ 1 being a natural number and M being less than or equal to N.
  • the status of the N interfaces in the interface from the active state to the inactive state is set to active.
  • the state is not released until the new active interface is replaced with the above-mentioned interface that becomes inactive, and its state is set back to the real state.
  • the foregoing processing is performed before the state of the LACP link aggregation group is changed, instead of waiting for the LACP link aggregation group. If the status of the LACP link aggregation group is changed, the status of the LACP link aggregation group is changed before the state of the LACP link aggregation group is changed.
  • the above processing can keep the bandwidth stable during the period before the state change of the LACP link aggregation group. The bandwidth stability can prevent the data transmission rate from being large and small and jumping.
  • the apparatus 400 includes: a monitoring unit 401, a determining unit 402, and a state adjusting unit 403, wherein:
  • the monitoring unit 401 is configured to monitor a state change of an interface in an LACP link aggregation group.
  • the determining unit 402 is configured to determine, when the state of the interface in the active state of the LACP link aggregation group is changed. Whether the number of the active interfaces in the LACP link aggregation group is less than the preset minimum number of active links, and if so, triggering the state adjustment unit 403;
  • the state adjustment unit 403 is configured to keep the state of the N interfaces in the state change state active when the number of active interfaces in the LACP link aggregation group is less than the preset minimum active link number.
  • the number of the active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum number of active links, where N is a natural number and N is less than or equal to the active state in the LACP link aggregation group.
  • the number of active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum number of active links, where M is a natural number and M is less than or equal to N. That is, the state of the M interfaces among the N interfaces in which the state changes are changed to their true states: an inactive state.
  • the working process of the embodiment of the apparatus 400 is: the monitoring unit 401 pairs the LACP link aggregation group The state change of the internal interface is monitored; when it is detected that the interface changes from the active state to the inactive state, the trigger determining unit 402 determines whether the number of interfaces in the active state of the LACP link aggregation group is less than a preset.
  • the minimum number of active links if yes, the trigger state adjustment unit 403, by which the state of the N interfaces in the interface from the active state to the inactive state is kept active, so that the LACP chain
  • the number of active interfaces in the route aggregation group is greater than or equal to the number of interfaces in which the preset minimum active link number is a natural number and N is less than or equal to the state change in the active interface in the LACP link aggregation group.
  • the trigger state adjusting unit 403 is configured by the state adjusting unit 403 to M of the N active active interfaces.
  • the state of the interface is adjusted to be inactive, so that the number of active interfaces in the LACP link aggregation group is greater than or equal to the pre-predetermined state.
  • the minimum number of active links, M being a natural number equal to or less than M and N. That is, the state of at least one of the interfaces in which the state changes are changed to their true state: an inactive state.
  • the LACP link switching technology solution in the embodiment of the present device detects that the state of the interface changes, and when the transition of the interface is changed, the state of the LACP link aggregation group will change from the active state to the inactive state.
  • the state of some or all of the interfaces remains in the original state (active state) for a period of time until a new interface from the inactive state to the active state occurs, thereby replacing some or all of the aforementioned interfaces, so that the After the number of active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum number of active links,
  • the interface changed from active to inactive is set back to its true state.
  • the state of the LACP link aggregation group does not follow when the state before the change of some or all of the interfaces whose state changes is locked to the new active link.
  • the status of some interfaces changes, so that when the state change of the interface layer is reflected at the LACP link aggregation group level, it is smoothly "smoothed out".
  • the state of the LACP link aggregation group remains unchanged.
  • the LACP link will be No disconnection occurs, the state of the entire link does not change, and the "flash" effect is no longer frequent, ensuring communication service levels.
  • the device embodiment may further include a timer 404, which is started when the state of the N interfaces in the interface where the state change occurs is kept active, and the LACP link aggregation group is not monitored within the preset time.
  • the trigger state adjusting unit 403 adjusts the state of the M interfaces among the N active active interfaces to the inactive state.
  • the timer 404 the interface that is active in the LACP link aggregation group is detected within the preset time of the timer 404, that is, the state of the M interfaces in the N interfaces maintained in the state is released, and the M interfaces are removed.
  • the state is set back to the real state.
  • the active interface is not detected in the LACP link aggregation group when the timer 404 is exceeded.
  • the state of the M interfaces in the N interfaces maintained in the state is also removed. Go back to the real state. In this way, the LACP aggregation group is always in a false state, and the LACP aggregation group is always in a false state.
  • the resources of the LACP link are not released.
  • the preset time of the timer in the embodiment of the present invention can be set as required. This embodiment is preferably configured as a long period or a short period of the LACP configuration.
  • the long period specified in the LACP protocol is 90s and the short period is 3s.
  • the establishment of the aggregation group has been described. After the LACP link aggregation group is set up on the LACP link, the data transmission through the LACP link is required.
  • the active interface is also generated according to the active interface in the LACP link aggregation group. After the arrival of the service data packet, it is determined which active interface receives the data, and the active data generated by the local end is sent through which active interface.
  • all active interfaces in the aggregation group are set to have both packet receiving and sending functions, and the inactive interface in the LACP link aggregation group is set to no. Has the function of sending and receiving data.
  • the present invention provides an embodiment of a LACP link data transmission method that avoids or reduces message loss. Referring to Figure 5, this embodiment includes:
  • 5501 Monitor the status of the interface in the LACP link aggregation group.
  • the state of the M interfaces in the N active state interfaces is adjusted to an inactive state, so that the state is changed.
  • the number of active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum number of active links, where M is a natural number and M is less than or equal to N.
  • the interface of the LACP link aggregation group is configured to send and receive the packet, and the interface in the LACP link aggregation group is changed to the inactive state to receive and register the packet.
  • An active interface in the LACP link aggregation group can be used as a packet receiving port to receive peer packets or as a packet sending port to send local packets. Therefore, the active interface performs packet transmission and reception registration; and the interface that changes from active to inactive in the LACP link aggregation group is only registered as the packet receiving function, and the interface that becomes inactive is not the physical line. In its own fault, it can usually continue to receive messages, but it no longer has a sending function.
  • the LACP link completes data transmission and forwarding according to the registered interface.
  • the pre-change state of the N interfaces in the interface that is changed from the active interface to the inactive interface is maintained for a period of time until the new interface appears to be in the N interfaces. Part or all of this state is released and restored to its true state.
  • the function of the interface is set, not only the active interface is registered in the "receiving" or “sending” directions, but also the above-mentioned interface from the active state to the inactive state is registered as "receiving".
  • the function of the interface is fully utilized, so that the packet that has been transmitted on the link can reach the destination end through the corresponding interface, thereby avoiding or reducing the loss of the data packet.
  • the above embodiment of data transmission utilizes the feature that the data receiving function will remain for a period of time after the interface transitions from the active state to the inactive state, but as the time to become inactive becomes longer, the data receiving function will disappear. Therefore, registering an interface that is inactive from inactive to a "received" interface is not a "permanent policy", and maintaining a long-term registration state will also consume storage resources.
  • the present invention also provides an improvement to the above embodiment, that is, when a message is received and registered on an interface that is changed from an active state to an inactive state, a timer is started, and after the preset time arrives, Delete the packet receiving registration of this interface.
  • the corresponding interface can be deleted from the registration table, and the corresponding resources are released.
  • the preset time here can be set according to actual needs.
  • the long period or short period of the LACP configuration is used as the preset time.
  • the long period specified in the current LACP protocol is 90s and the short period is 3s.
  • the apparatus 600 embodiment includes: a monitoring unit 601, a determining unit 602, a state adjusting unit 603, a message receiving and receiving registration unit 604, and a data transmission unit 605, wherein:
  • the monitoring unit 601 is configured to monitor a state change of an interface in an LACP link aggregation group.
  • the determining unit 602 is configured to determine, when the state of the interface in the active state of the LACP link aggregation group is changed. Whether the number of the active interfaces in the LACP link aggregation group is less than the preset minimum number of active links, and if so, triggering the state adjustment unit 603;
  • the state adjustment unit 603 is configured to: when determining that the number of active interfaces in the LACP link aggregation group is less than the preset minimum number of active links, maintaining the state of the N interfaces in the interface that has changed state is The active state is such that the number of active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum number of active links, where N is a natural number and N is less than or equal to that in the LACP link aggregation group.
  • the packet sending and receiving registration unit 604 is configured to: send and receive a packet to an active interface in the LACP link aggregation group, and change the state in the LACP link aggregation group to an inactive interface. Performing a message reception and registration;
  • the data transmission unit 605 is configured to perform data transmission according to packet sending and receiving registration of the interface in the LACP link aggregation group.
  • the working process of the apparatus 600 is: the monitoring unit 601 monitors the state change of the interface in the LACP link aggregation group; and when the interface in the LACP link aggregation group is detected to change from the active state to the inactive state,
  • the determining unit 602 is configured to determine, by the determining unit 602, whether the number of interfaces in the active state of the LACP link aggregation group is less than a preset minimum active link number, and if so, the trigger state adjusting unit 603, by the The state adjustment unit 603 maintains the state of the N interfaces in the interface in which the state change occurs as an active state; triggers the state setting when it is detected that the interface in the LACP link aggregation group changes from the inactive state to the active state.
  • Unit 603 adjusts the state of the M interfaces of the N active-active interfaces to an inactive state.
  • the packet sending and receiving registration unit 604 performs the packet sending and receiving forwarding registration on the interface in the active state of the LACP link aggregation group, and changes the state in the LACP link aggregation group to an inactive state.
  • the interface performs packet reception and registration; then the data transmission unit 605 performs data transmission according to the packet receiving and forwarding registration of the interface in the LACP link aggregation group.
  • the pre-change state of at least part or all of the interfaces in the LACP link aggregation group changed from the active interface to the inactive interface is maintained for a period of time until a new one is obtained.
  • the interface appears to release this state hold of one or all of these interfaces in the hold state, returning it to the real state.
  • Setting interface In the case of the function, not only the active interface is registered in the "receiving" or “sending” directions, but also the above-mentioned interface from the active state to the inactive state is registered as "receiving". In this embodiment, the function of the interface is fully utilized, so that the packets that have been transmitted on the link line can reach the destination end through the corresponding interface, and the loss of data packets is avoided or reduced.
  • the state of the Q interfaces in the interface where the state change occurs may be maintained as The active state is such that the number of active interfaces in the LACP link aggregation group is greater than or equal to the preset minimum number of active links, Q is a natural number, and Q is less than or equal to that in the LACP link aggregation group.
  • the number of interfaces whose status changes in the active state interface.

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

本发明实施例提供了一种链路聚合控制协议LACP链路切换方法和装置。该方法包括:监测LACP链路汇聚组内接口的状态变化;当监测到所述汇聚组内处于活动状态的接口发生状态改变时,确定所述汇聚组内活动状态的接口数是否小于预设最小活动链路数,如果是,则将发生状态改变的接口中的N个接口的状态保持为活动状态,以使得所述汇聚组内处于活动状态的接口的数量大于或等于所述预设最小活动链路数;N为自然数且N小于或等于所述汇聚组内处于活动状态的接口中发生状态改变的接口数;当监测到所述汇聚组内处于非活动状态的接口发生状态改变时,将所述N个保持活动状态的接口中的M个接口的状态调整为非活动状态,M为自然数且M小于或等于N。

Description

一种 LACP链路切换、 数据传输方法与装置 本申请要求于 2011 年 10 月 12 日提交中国专利局、 申请号为 201110308340.7、发明名称为"一种 LACP链路切换、 数据传输方法与装置" 的中国专利申请的优先权,其全部内容通过引用结合在本申请中。 技术领域
本发明涉及通信技术领域,尤其涉及一种链路聚合控制协议 LACP链 路切换、 数据传输方法与装置。
背景技术
LACP ( Link Aggregation Control Protocol ,链路聚合控制协议 )是用于 实现链路动态聚合与解聚合的协议,聚合的作用在于提高传输带宽、 增强 系统可靠性。 在 LACP协议控制下,多条链路(成员链路)汇聚成一条带 宽更高的逻辑链路,该逻辑链路称为汇聚组,这种含有汇聚组的链路为 LACP链路。聚合于一个汇聚组的成员链路的数量通常根据业务的带宽需求 进行确定。
一般而言,汇聚组成员链路单端的活动接口数至少应当大于或等于传 输相应业务的预设最小活动链路数。 满足该要求时汇聚组的状态为 UP状 态, LACP链路处于" 通路" ,该链路可使用 ;未满足该要求时,即汇聚组 成员链路单端的活动接口数小于预设最小活动链路数时,汇聚组的状态为 Down状态, LACP链路处于" 断路" ,该链路不能使用。
LACP链路汇聚组的状态决定了 LACP链路的切换过程。为了监测汇聚 组的状态变化,汇聚组的两端周期性地互发 LACPDU ( LACP Data Unit ) 消息,当汇聚组的一端接收到 LACPDU消息后,将 LACPDU消息中携带 的对端的系统优先级、 接口优先级等信息与本端的配置进行比较,如果不 一致,则根据比较结果对本端配置进行调整,调整过程中汇聚组内活动接 口数将发生变化,当活动接口数增减到一定程度时,汇聚组的状态将在 UP、 Down两种状态之间交替变化这种交替变化过程引起 LACP链路在 导通"、 " 断路" 之间发生链路切换,该链路出现" 或断或连" 的" 闪断" 过程, 这种" 闪断" 效应反应到用户端则是频繁出现" 掉线" ,由" 掉线" 到" 上 线" 进行再次通信时需重新接入网络、 重新建立数据链路,这严重影响了 正常通信,降低了网络的服务保障水平。
此外,汇聚组内活动接口变为非活动接口时,通常会将该接口设置成 不再具有收发数据功能的" 死" 接口 ,然而,在上述接口的状态变化是由
" 链路物理故障" 之外的其他原因引起时,这种方式将造成已在 LACP链 路上传输的报文丢失,影响到正常通信。 发明内容
有鉴于此,本发明实施例的发明目的在于提供一种 LACP链路切换方 法和装置,以解决 LACP链路切换过程中链路的" 闪断" 问题,进而避免 用户通信时频繁出现" 掉线"。
一方面,一种链路聚合控制协议 LACP链路切换方法,包括: 监测 LACP链路汇聚组内接口的状态变化;
当监测到所述 LACP链路汇聚组内处于活动状态的接口发生状态改变 时,确定所述 LACP链路汇聚组内活动状态的接口数是否小于预设最小活 动链路数,如果是,则将发生状态改变的接口中的 N个接口的状态保持为 活动状态,以使得所述 LACP链路汇聚组内处于活动状态的接口的数量大 于或等于所述预设最小活动链路数; N 为自然数且 N 小于或等于所述 LACP链路汇聚组内处于活动状态的接口中发生状态改变的接口数;
当监测到所述 LACP链路汇聚组内处于非活动状态的接口发生状态改 变时,将所述 N个保持活动状态的接口中的 M个接口的状态调整为非活动 状态, M为自然数且 M小于或等于 N。
可选地,在将发生状态改变的接口中的 N个接口的状态保持为活动状 态时,启动定时器,则:在预设时间内未监测到所述 LACP链路汇聚组内 处于处于非活动状态的接口发生状态改变时,将所述 N个保持活动状态的 接口中的 M个接口的状态调整为非活动状态。
可选地,所述预设时间为 LACP配置的长周期或短周期。
可选地,在确定所述 LACP链路汇聚组内处于活动状态的接口数大于 等于预设最小活动链路数时,将发生状态改变的接口中的 Q个接口的状态 保持为活动状态,以使得所述 LACP链路汇聚组内处于活动状态的接口的 数量大于或等于所述预设最小活动链路数, Q为自然数且 Q小于或等于所 述 LACP链路汇聚组内处于活动状态的接口中发生状态改变的接口数。
另一方面,一种链路聚合控制协议 LACP链路切换装置,包括:监测 单元、 确定单元和状态调整单元,其中 :
所述监测单元,用于监测 LACP链路汇聚组内接口的状态变化; 所述确定单元,用于在监测到所述 LACP链路汇聚组内处于活动状态 的接口发生状态改变时,确定所述 LACP链路汇聚组内处于活动状态的接 口数是否小于预设最小活动链路数,如果是,则触发所述状态调整单元; 所述状态调整单元,用于在所述 LACP链路汇聚组内处于活动状态的 接口数小于预设最小活动链路数时,将发生状态改变的接口中的 N个接口 的状态保持为活动状态,以使得所述 LACP链路汇聚组内处于活动状态的 接口的数量大于或等于所述预设最小活动链路数; N为自然数且 N小于或 等于所述 LACP链路汇聚组内处于活动状态的接口中发生状态改变的接口 数;在监测到所述 LACP链路汇聚组中的非活动状态的接口发生状态改变 时,将所述 N个保持活动状态的接口中的 M个接口的状态调整为非活动状 态, M为自然数且 M小于或等于 N。
可选地,所述装置还包括定时器,该定时器在将发生状态改变的接口 中的 N个接口的状态保持为活动状态时启动,则:在预设时间内未监测到 所述 LACP链路汇聚组内处于非活动状态的接口状态改变时,触发所述状 态调整单元,该状态调整设置单元用于将所述 N个保持活动状态的接口中 的 M个接口的状态调整为非活动状态。
又一方面,一种链路聚合控制协议 LACP链路数据传输方法,包括: 监测 LACP链路汇聚组内接口的状态变化;
当监测到所述 LACP链路汇聚组内处于活动状态的接口发生状态改变 时,确定所述 LACP链路汇聚组内活动状态的接口数是否小于预设最小活 动链路数,如果是,则将发生状态改变的接口中的 N个接口的状态保持为 活动状态,以使得所述 LACP链路汇聚组内处于活动状态的接口的数量大 于或等于所述预设最小活动链路数; 为自然数且 N小于或等于所述 LACP 链路汇聚组内处于活动状态的接口中发生状态改变的接口数;
当监测到所述 LACP链路汇聚组内处于非活动状态的接口发生状态改 变时,则将所述 N个保持活动状态的接口中的 M个接口的状态调整为非活 动状态, M为自然数且 M小于或等于 N;
将所述 LACP链路汇聚组内处于活动状态的接口进行报文发送和接收 登记,将所述状态改变为非活动状态的接口进行报文接收登记;
根据所述 LACP链路汇聚组内接口的报文发送和接收登记进行数据传 输。
可选地,在将状态改变为非活动状态的接口进行报文接收登记时,启 动定时器,则:在预设时间到达后,删除该接口的报文接收登记。
可选地,所述预设时间为 LACP配置的长周期或短周期。
又一方面,一种链路聚合控制协议 LACP链路数据传输装置,包括: 监测单元、 确定单元、 状态调整单元、 报文收发登记单元和数据传输单元, 其中 :
所述监测单元,用于监测 LACP链路汇聚组内接口的状态变化; 所述确定单元,用于在监测到所述 LACP链路汇聚组内处于活动状态 的接口发生状态改变时,确定所述 LACP链路汇聚组内处于活动状态的接 口数是否小于预设最小活动链路数,如果是,则触发所述状态调整单元; 所述状态调整单元,用于在所述 LACP链路汇聚组内处于活动状态的 接口数小于预设最小活动链路数时,将发生状态改变的接口中的 N个接口 的状态保持为活动状态,以使得所述 LACP链路汇聚组内处于活动状态的 接口的数量大于或等于所述预设最小活动链路数; N为自然数且 N小于或 等于所述 LACP链路汇聚组内处于活动状态的接口中发生状态改变的接口 数;在监测到所述 LACP链路汇聚组内处于非活动状态的接口发生状态改 变时,将所述 N个保持活动状态的接口中的 M个接口的状态调整为非活动 状态, M为自然数且 M小于或等于 N;
所述报文收发登记单元,用于将所述 LACP链路汇聚组内处于活动状 态的接口进行报文发送和接收登记,将状态改变为非活动状态的接口进行 报文接收登记;
所述数据传输单元,用于根据所述 LACP链路汇聚组内接口的报文发 送和接收登记进行数据传输。
本发明实施例给出的 LACP链路切换技术方案在监测到接口状态发生 变化并确定这种变化将导致 LACP链路发生切换时,将由活动状态变为非 活动状态的接口中的至少一部分接口的变化前的状态保持一段时间 ,以使 得处于活动状态的接口的数量大于或等于所述预设最小活动链路数,直到 新的接口由非活动状态变为活动状态,才将上述由活动状态变化为非活动 状态的接口的状态设置为非活动状态。
本发明的实施例在 LACP链路出现切换事件时,通过对状态发生变化 的接口的前状态进行锁定处理,直至出现顶替上述接口的新的接口才予以 解锁,这样 LACP链路汇聚组的状态将始终保持不变。 这样,逻辑上位于 底层的接口的状态发生变化,并不影响逻辑上处于高层的汇聚组的状态, 从而实现了链路切换事件发生时链路的平滑过渡,解决了链路频繁出现 闪 断" 影响正常通信的问题。
此外,本发明实施例给出的 LACP链路数据传输技术方案在上述链路 切换的方法基础上,将转发表分成两类:报文接收数据表和报文发送数据 表,并将由活动变为非活动状态的接口登记到报文接收数据表。 经过这样 处理后,在进行数据传输时,上述由活动状态变为非活动状态的接口仍可 接收其状态变化前已在链路上传输的数据报文,从而确保了 LACP链路切 换过程中数据报文不丢失。
附图说明
图 1 ( a ) ~ ( c )为 LACP链路汇聚组的建立过程示意图 ;
图 2为本发明的 LACP链路切换方法的实施例一的流程图 ; 图 3为本发明的 LACP链路切换方法的实施例二的流程图 ; 图 4为本发明的 LACP链路切换装置实施例四的组成框图 ; 图 5为本发明的 LACP链路数据传输方法的实施例五的流程图 ; 图 6为本发明的 LACP链路数据传输装置的实施例六的组成框图。 具体实施方式
本发明实施例提供一种 LACP链路切换方法和装置,该方法与装置在 确定某个或某些接口的状态变化将引起 LACP链路发生切换时,对这些接 口中的至少一部分接口的变化前的状态进行" 锁定" 处理,以使得处于活 动状态的接口的数量大于或等于所述预设最小活动链路数,直至 LACP链 路汇聚组中出现与所述锁定" 状态" 相同的新接口时进行" 解锁" ,经过这 样处理后,在 LACP链路出现切换事件时, LACP链路汇聚组的状态仅在接 口这个底层层面发生变化,而在链路汇聚组这个逻辑上的上层层面保持不 变,从而实现 LACP链路切换过程的平滑过渡,进而解决了切换事件出现 后链路随之切换导致的链路频繁" 闪断" 问题。 为便于理解本发明实施例的技术方案,这里先将 LACP链路的汇聚组 建立过程以及 LACP链路切换作简要介绍。
LACP链路的汇聚组建立过程包括:
5101:发起 LACP链路汇聚组创建消息, LACP链路两端设备收到该 汇聚组创建消息后对 LACP模式进行配置,并根据各自的接口优先级情况 选出准备添加入 LACP链路汇聚组的接口 ,这些被选择后的接口启用 LACP 协议,两端设备互发 LACPDU报文。 参见附图 1 ( a )所示, LACP链路两 端设备用路由器 Router A和路由器 Router B表示, Router A与 Router B之 间连接的实线表示通信链路,箭头代表 LACPDU报文传输方向。
5102: LACP链路两端设备各自接收到对端设备发送的 LACPDU报文 后,结合本端设备的配置,根据 LACPDU报文中的系统 LACP优先级和系 统 ID确定主动端设备和被动端设备。 LACPDU报文主要包含以下信息:系 统优先级、 系统 ID、 接口操作 key、 接口优先级、 接口 ID、 接口状态。
参见图 1 ( b )所示,当 Router B收到 Router A发送的 LACPDU报文 后,查看 LACPDU报文以获知 Router A的系统优先级和系统 ID ,将其与 自身的系统优先级和系统 ID进行比较:如果 Router A的系统优先级高于 Router B的系统优先级,则确定 Router A为链路的主动端设备, Router B 为被动端设备,否则确定 Router B为 LACP链路的主动端设备, Router A 为被动端设备。类似地,当 Router A接收到 Router B发送的 LACPDU报文 也将按照上述方式确定主动端设备和被动端设备。 本例中 ,假定 Router A 的系统优先级为 10 , Router B的优先级为 11,确定 Router A为主动端设备, Router B为被动端设备。
S103:根据 LACP链路的主动端设备的接口优先级确定进入汇聚组的 接口 ,两端设备协商一致后,在原通信链路基础之上的逻辑链路即 LACP 链路汇聚组建立完成。
LACP链路的主动端设备与被动端设备确定后, LACP链路的两端设备 均按照主动端设备的接口优先级确定构成汇聚组的接口。 两端设备对应的 接口之间构成一条通信链路,多个通信链路(成员链路)组成逻辑链路。 由此, LACP链路的汇聚组建立完成。进入汇聚组的接口并非都处于活动状 态。 其中处于活动状态的接口数目取决于业务传输对带宽需求大小。 通常 LACP链路汇聚组成员链路单端的接口数应当在预设最小活动链路数和最 大活动链路数之间。 没有进入 LACP链路汇聚组的接口和汇聚组内处于非 活动状态的成员接口构成备份接口 ,在需要时用于替换 LACP链路汇聚组 内的活动接口。 当 LACP链路汇聚组内的活动链路数没有达到预设最大活 动链路,根据业务需要如果要提高传输带宽,可将 LACP链路汇聚组内处 于非活动状态的成员接口设置成活动状态。 为叙述方便,以下实施例中 , 将位于 LACP链路汇聚组之外的接口和 LACP链路汇聚组内成员接口均简 称为接口。 参见附图 1 ( c )所示, Router A为主动端设备,该端设备有三个接口 , Router B为被动端设备,也有三个接口。 假设 Router A的最高活动链路数 预设为 2条, 因此,按照接口的优先级高低原则进入 LACP链路汇聚组的 活动接口为 Router A的 1"和 2"两个接口 , Router B的相应接口与 Router A的" Γ 和" 2" 建立链路, 由这两个链路组成一个 LACP链路汇聚组, 该 LACP链路汇聚组的两条链路(四个接口)均处于活动状态。
下面结合实施例和附图 ,对本发明的发明目的、 技术特征进行详细介 绍。 实施例一
LACP链路汇聚组按照前述方式建立后, LACP链路是否能进行正常通 信取决于 LACP链路汇聚组的当前状态。 LACP链路汇聚组的状态包括两 种: UP状态和 Down状态。 当 LACP链路汇聚组一端的活动接口(标记为 Selected状态,非活动接口标记为 Unsdected状态)数量大于等于预设最小 活动链路数时, LACP链路汇聚组处于 UP状态, LACP链路连通,可进行 正常通信; 当 LACP链路汇聚组一端的活动接口 (标记为 Selected状态) 数目小于预设最小活动链路数时,LACP链路汇聚组处于 Down状态,LACP 链路断裂,通信被中断,只有等到 LACP链路汇聚组再次处于 UP状态时, 通信过程重新建立后才能进行正常通信。 LACP链路汇聚组在 UP状态和 Down状态之间的变化过程构成 LACP链路的切换。 从 UP状态到 Down状态的链路切换由切换事件触发,这些切换事件包 括链路 Down事件、 ETH-OAM检测到链路失效、 LACP发现链路故障等。 切换事件发生后导致 LACP链路汇聚组内相应接口的状态由 Selected变为 Unselected ,当这种接口状态的变化使得 LACP链路汇聚组内活动接口的数 量减小到最小链路数以下时, LACP链路汇聚组由 UP状态到 Down状态的 切换完成。从 Down状态到 UP状态的链路切换通过 LACP抢占实现 >LACP 链路汇聚组内出现接口由 Selected状态变为 Unselected后,处于备份状态的 非活动接口根据优先级高低接替上述变为非活动状态的接口 ,即处于备份 状态的非活动接口的状态由 Unselected变为 Selected ,当这种接口状态变化 使得 LACP链路汇聚组内活动接口的数据增加到最小活动链路数以上时, LACP链路汇聚组由 Down状态到 UP状态的切换完成。
举例来说,假定要维持 LACP链路汇聚组的状态为 UP状态,该 LACP 链路汇聚组中至少应当有 10个或更多的接口处于活动状态,也就是说预设 最小活动链路数为 10 ,那么, 当 LACP链路汇聚组中处于活动状态的接口 数量少于 10个时,该 LACP链路汇聚组将从 UP状态切换到 Down状态。 反之,当 LACP链路汇聚组中处于活动状态的接口数量从少于 10增加到 10 或大于 10时, LACP链路汇聚组的状态将从 Down状态切换到 UP状态。
由上述内容可知,当 UP/Down之间的状态变换频繁时, LACP链路极 为不稳定,整个链路不断重复" 连通-断开 -连通-断开" 闪断过程,影 响到正常通信,这种现象在汇聚组内仅有一个活动接口时,其后果更为严 重。
该过程可用打电话的例子进行形象阐释:用户 Β向用户 Α打电话,拨 通线路通话一段时间后, 由于某种原因 ,用户 B和 A间线路的一段 LACP 链路由 UP状态跳变为 Down状态,该线路断开、 电话掉线、 用户 B、 A间 通话被迫中断,一会之后, LACP链路又由 Down状态恢复到 UP状态,此 时,用户 B不能直接继续通话,而必须重新拨号建立与用户 A之间的连接 后才能继续前次通话,如果 LACP链路频繁处于切换过程中 ,用户 B将进 行多次拨号。
为了避免 LACP链路切换过程由于 LACP的频繁闪断给用户带来的麻 烦和不便,本发明的实施例提出了一种新的 LACP链路的切换方法。 参见 附图 2 ,该方法包括:
5201:监测 LACP链路汇聚组内接口的状态变化。
LACP链路汇聚组内的接口包括活动接口和非活动接口。非活动接口一 般不会自动启用 ,只有当出现活动接口数减少,发生由非活动状态到活动 状态变化,用于填补上述的由活动状态变为非活动状态的接口。 活动接口 的状态变化将可能导致 LACP链路汇聚组的状态由 UP状态到 Down状态的 跳变,进而影响了 LACP链路两端的正常通信。
5202:当监测到所述 LACP链路汇聚组内处于活动状态的接口发生状 态改变时,确定 LACP链路汇聚组内活动状态的接口数是否小于预设最小 活动链路数,如果是,执行 S202 ( a ) :将发生状态改变的接口中的 N个接 口的的状态保持为活动状态,以使得处于活动状态的接口的数量大于或等 于所述预设最小活动链路数,从而使得所述 LACP链路汇聚组的状态保持 为 UP状态, N为自然数且 N小于或等于所述 LACP链路汇聚组内处于活 动状态的接口中发生状态改变的接口数。
接口由活动状态变为非活动状态,将导致处于活动状态的接口数量减 少; 当 LACP链路汇聚组中处于活动状态的接口数量减少到预设最小活动 链路数以下时,将影响到 LACP链路汇聚组的状态。 因此,在监测到接口 变为非活动状态时,确定 LACP链路汇聚组内活动状态的接口数是否小于 预设最小活动链路数,如果发生状态变化后 LACP链路汇聚组内活动接口 的数量小于预设最小活动链路数,则按照满足所述预设最小活动链路数的 要求,将刚才由活动状态变为非活动状态中的接口中的 N个接口的状态仍 然设置成活动状态,并做好标记,经过这样处理后, LACP链路汇聚组认为 接口状态没有变化,其 UP状态将得到继续保持, LACP链路汇聚组不发生 断路,即整个 LACP链路汇聚组的某条链路虽不可用 ,但 LACP链路汇聚 组不能感知,仍然保持链路" 畅通" 状态。
S203:当监测到 LACP链路汇聚组内处于非活动状态接口发生状态改 变时,将所述 N个保持活动状态的接口中的 M个接口的状态调整为非活动 状态,以使得所述 LACP链路汇聚组内处于活动状态的接口的数量大于或 等于所述预设最小活动链路数, M为自然数且 M小于或等于 N。
所述 LACP链路汇聚组内出现接口的状态由活动状态到非活动状态的 变化时,备份的接口立即" 活跃" 起来,通过 LACP抢占决定由哪个备份 接口接替由活动状态变为非活动状态的那个接口 ,该" 新旧交替" 完成后, 才将由活动状态变为非活动状态中的 N个接口中的 M个接口的状态设置为 其真实的状态:非活动状态,并使得所述 LACP链路汇聚组内处于活动状 态的接口的数量大于或等于所述预设最小活动链路数。
本实施例给出的 LACP链路切换技术方案在监测到接口状态发生变化 后,在确定这种接口的" 跳变" 将导致链路汇聚组的状态跳变时,将由活 动状态变为非活动状态的接口的状态保持原状态(活动状态)一段时间 , 直到出现由非活动状态变为活动状态的新接口 ,进而顶替上前述的接口 , 然后将该由活动状态变化为非活动状态的接口设置回其真实状态。
本发明的实施例在 LACP链路出现切换事件时,通过将状态发生变化 的接口的变化之前的状态保持到新的活动链路的出现,使得 LACP链路汇 聚组的状态不随接口状态的变化而变化,这样接口层面的状态变化体现到 LACP链路汇聚组层面时,被顺利地" 平滑掉" 了 , LACP链路汇聚组始终 保持先前的状态, LACP链路将不出现断路,整个链路的状态不发生变化, 不再频繁出现" 闪断" 效应,从而有效保证了通信服务水平。 实施例二
本发明实施例将 LACP链路汇聚组内由活动状态变为非活动状态的接 口的前状态(活动状态)一直保持到出现新的接口时止,这期间由 LACP 抢占功能完成新的接口的" 推举" 工作。 但是,实际运行过程中 ,可能存 在多种原因导致 LACP抢占不成功或者抢占时延过长,甚至没有进行抢占 工作。前者的情形如: LACP链路汇聚组的备份接口出现故障不能用或者没 有更多的备份接口 ,那么根据优先级推荐的备份链路将无法使 LACP链路 汇聚组由 Down状态回归 UP状态;后者的情形如: LACP抢占功能并未设 置在" 使能" 状态,没有 LACP抢占功能, LACP链路将无法选择出新的接 口进行顶替。 这些情况发生后, LACP链路不能一直等待下去,使 LACP 链路汇聚组的状态长期处于" 虚假" 状态。 因此,本发明的提供了另一个 实施例。 该实施例包括:
监测 LACP链路汇聚组内接口的状态变化;
当监测到所述 LACP链路汇聚组内处于活动状态的接口发生状态改变 时,确定所述 LACP链路汇聚组内活动状态的接口数是否小于预设最小活 动链路数,如果是,则将发生状态改变的接口中的 N个接口的状态保持为 活动状态,以使得所述 LACP链路汇聚组内处于活动状态的接口的数量大 于或等于所述预设最小活动链路数 为自然数且 N小于或等于所述 LACP 链路汇聚组内处于活动状态的接口中发生状态改变的接口数,并启动定时 器;
在定时器的预设时间内未监测到所述 LACP链路汇聚组内处于非活动 状态的接口发生状态改变时,将所述 N个保持活动状态的接口中的 M个接 口的状态调整为非活动状态,以使得所述 LACP链路汇聚组内处于活动状 态的接口的数量大于或等于所述预设最小活动链路数, M为自然数且 M小 于或等于N。
本实施例通过设置定时器, 由定时器来决定等待时间的长短,在定时 器预设时间内监测到活动状态的接口出现,即按照满足所述预设最小活动 链路数的要求,解除处于状态保持的 N个接口中的 M个接口的状态,并将 其状态设置回真实状态,并使得所述 LACP链路汇聚组内处于活动状态的 接口的数量大于或等于所述预设最小活动链路数;在超过定时器预设时间 未监测到 LACP链路汇聚组内处于活动状态接口出现,也解除处于状态保 持的 M个接口中的至少一个接口的状态,将其设置回真实状态,这种方式 可以避免较长时间内等待不到由非活动状态到活动状态变换的接口 ,导致 LACP链路汇聚组始终处于虚假状态、 LACP链路的资源得不到释放。本实 施例中的定时器的预设时间可根据需要进行设置,本实施例可以设置为 LACP配置的长周期或短周期,在目前 LACP协议中规定的长周期为 90s , 短周期为 3s。 实施例三 上述两个实施例主要是针对监测到新的非活动接口导致 LACP链路汇 聚组状态变化的情形,对于出现新的非活动接口但不会导致 LACP链路汇 聚组状态变化的情况未有提及。 实际上,在监测到 LACP链路汇聚组内有 接口由活动状态变为非活动状态时,只要 LACP链路汇聚组内的活动接口 的数大于或等于预设最小活动链接数,LACP链路汇聚组的状态将不发生变 化,但是由于 LACP链路汇聚组内活动接口数减少, LACP链路汇聚组内活 动链接数将随之减小,数据传输的带宽也将变小,当出现新的活动接口时, LACP链路汇聚组内活动链接数随之增加,数据传输的带宽将恢复到先前水 平,如果 LACP链路汇聚组内接口的状态变化频繁出现, LACP链路的带宽 将出现震荡,容易导致流量拥塞。 为了避免这种情况的发生,本发明提供 了再一个实施例。 参见附图 3 ,本实施例包括:
监测 LACP链路汇聚组内接口的状态变化;
当监测到所述 LACP链路汇聚组内处于活动状态的接口发生状态改变 时,不论所述 LACP链路汇聚组内处于活动状态的接口数是否小于预设最 小活动链路数,将所述 LACP链路汇聚组内发生状态改变的接口中的 N个 接口的状态保持为活动状态,以使得所述 LACP链路汇聚组内处于活动状 态的接口的数量大于或等于所述预设最小活动链路数, N为自然数且 N小 于或等于所述 LACP链路汇聚组内处于活动状态的接口中发生状态改变的 接口数。 在预设时间内监测到所述 LACP链路汇聚组内处于非活动状态的接口 发生状态改变时,将所述 N个保持活动状态的接口中的 M个接口的状态调 整为非活动状态,以使得所述 LACP链路汇聚组内处于活动状态的接口的 数量大于或等于所述预设最小活动链路数 Λ1为自然数且 M小于或等于 N。
本实施例中 ,不论 LACP链路汇聚组内处于活动状态的接口数是否小 于预设最小活动链路数时,都将由活动状态变为非活动状态的接口中的 N 个接口的状态设置为活动状态,直到监测到新的活动接口顶替了上述变为 非活动状态的接口后,才解除上述保持状态,并将其状态设置回真实状态。 这样不仅可以解决 LACP链路汇聚组出现" 闪断" ,而且便于实现控制和避 免带宽震荡。
具体而言,如果活动状态的接口发生状态改变的原因是由链路本身故 障所引起,那么在这种故障导致 LACP链路汇聚组的状态改变之前进行上 述处理,而不是等到 LACP链路汇聚组状态改变之时进行该处理工作,将 更加有利于实际控制;如果活动状态的接口发生状态改变的原因是链路故 障以外的原因引起,那么在这种原因导致 LACP链路汇聚组的状态改变之 前进行上述处理,可在 LACP链路汇聚组的状态改变之前这段时间内保持 带宽稳定,带宽稳定可以避免数据发送速率忽大忽小、 出现跳跃。 实施例四
上述的几个实施例是本发明给出的 LACP链路切换的方法实施例,相 应地,本发明还给出了 LACP链路切换的装置实施例。参见附图 4 ,本装置 400包括:监测单元 401、 确定单元 402和状态调整单元 403 ,其中 :
所述监测单元 401 ,用于监测 LACP链路汇聚组内接口的状态变化; 所述确定单元 402,用于在监测到所述 LACP链路汇聚组内处于活动状 态的接口发生状态改变时,确定所述 LACP链路汇聚组内处于活动状态的 接口数是否小于预设最小活动链路数,如果是,则触发所述状态调整单元 403;
所述状态调整单元 403,用于在所述 LACP链路汇聚组内活动状态的接 口数小于预设最小活动链路数时,将发生状态改变的接口中的 N个接口的 状态保持为活动状态,以使得所述 LACP链路汇聚组内处于活动状态的接 口的数量大于或等于所述预设最小活动链路数, N为自然数且 N小于或等 于所述 LACP链路汇聚组内处于活动状态的接口中发生状态改变的接口数; 在监测到所述 LACP链路汇聚组内处于非活动状态的接口发生状态改变时, 将所述 N个保持活动状态的接口中的 M个接口的状态调整为非活动状态, 以使得所述 LACP链路汇聚组内处于活动状态的接口的数量大于或等于所 述预设最小活动链路数, M为自然数且 M小于或等于 N。 也就是,将这些 发生状态改变的 N个接口中的 M个接口的状态调整成为其真实状态:非活 动状态。
本装置 400实施例的工作过程是:监测单元 401对 LACP链路汇聚组 内接口的状态变化进行监测 ;在监测到有接口由活动状态变为非活动状态 时,触发确定单元 402 ,由该确定单元单元 402确定 LACP链路汇聚组内活 动状态的接口数是否小于预设最小活动链路数,如果是,则触发状态调整 单元 403,由该状态调整单元 403将由活动状态变为非活动状态的接口中的 N个接口的状态保持为活动状态,以使得所述 LACP链路汇聚组内处于活 动状态的接口的数量大于或等于所述预设最小活动链路数 为自然数且 N 小于或等于所述 LACP链路汇聚组内处于活动状态的接口中发生状态改变 的接口数;在监测到所述 LACP链路汇聚组内有接口由非活动状态变为活 动状态时,触发状态调整单元 403 , 由该状态调整单元 403将所述 N个保 持活动状态的接口中的 M 个接口的状态调整为非活动状态,以使得所述 LACP链路汇聚组内处于活动状态的接口的数量大于或等于所述预设最小 活动链路数, M为自然数且 M小于或等于 N。 也就是,将这些发生状态改 变的接口中的至少一个接口的状态调整成为其真实状态:非活动状态。
本装置实施例给出的 LACP链路切换技术方案监测到接口状态发生变 化后,在确定这种接口的跳变将导致 LACP链路汇聚组的状态跳变时,将 由活动状态变为非活动状态的接口中的部分或全部的状态保持原状态(活 动状态)一段时间 ,直到出现新的由非活动状态变为活动状态的接口 ,进 而顶替上前述的接口中的一部分或全部,以使得所述 LACP链路汇聚组内 处于活动状态的接口的数量大于或等于所述预设最小活动链路数后,才将 该由活动状态变化为非活动状态的接口设置回其真实状态。
本发明的实施例在 LACP链路出现切换事件时,通过将状态发生变化 的接口中的一部分或全部变化之前的状态锁定到新的活动链路出现之时, 使得 LACP链路汇聚组的状态不随部分接口状态的变化而变化,这样接口 层面的状态变化体现到 LACP链路汇聚组层面时,则被顺利地" 平滑掉" 了 , LACP链路汇聚组的状态始终保持不变, LACP链路将不出现断路,整 个链路的状态不发生变化,不再频繁出现" 闪断" 效应,保证通信服务水 平。
上述装置实施例还可以包括定时器 404,该定时器 404在发生状态改变 的接口中的 N个接口的状态保持为活动状态时启动,则:在预设时间内未 监测到 LACP链路汇聚组内处于非活动状态的接口发生状态改变时,触发 状态调整单元 403 ,该状态调整单元 403将所述 N个保持活动状态的接口 中的 M个接口的状态调整为非活动状态。 通过设置定时器 404 ,在定时器 404预设时间内监测到 LACP链路汇聚组内处于活动状态的接口出现,即解 除处于状态保持的 N个接口中 M个接口的状态,将这 M个接口的状态设 置回真实状态,在超过定时器 404预设时间未监测到 LACP链路汇聚组内 处于活动状态接口出现,也解除处于状态保持的 N个接口中的 M个接口的 状态,将其设置回真实状态。 这种方式可以避免较长时间内等待不到由非 活动状态到活动状态变换的接口导致 LACP汇聚组始终处于虚假状态,而 LACP链路的资源却得不到释放。本装置实施例中的定时器的预设时间可根 据需要进行设置,本实施例优选设置为 LACP配置的长周期或短周期,在 目前 LACP协议中规定的长周期为 90s ,短周期为 3s。 实施例五
前面已经叙述汇聚组的建立过程,在 LACP链路上建立起 LACP链路 汇聚组后,要实现通过 LACP链路进行数据传输的目的,还需要根据 LACP 链路汇聚组内的活动接口生产转发表,以便业务数据报文到来后决定由哪 个活动接口接收数据、 本端产生的业务数据通过哪个活动接口发送出去。 现有技术中进行数据传输时,通常将汇聚组内所有处于活动状态的接口设 定为同时具有报文接收和发送功能,而将 LACP链路汇聚组内处于非活动 状态的接口设定为不具有收发数据功能。 这种方式在 LACP链路状态频繁 出现变化,且这种状态变化不是由于链路本身故障而引起时,将造成已在 链路上传输的报文丢失,影响到正常通信。 为此,本发明给出了一种 LACP 链路数据传输方法的实施例,该实施例可以避免或减少报文丢失。 参见附 图 5 ,本实施例包括:
5501:监测 LACP链路汇聚组内接口的状态。
5502:当监测到所述 LACP链路汇聚组内处于活动状态的接口发生状 态改变时,确定所述 LACP链路汇聚组内活动状态的接口数是否小于预设 最小活动链路数,如果是,则执行 S502 ( a ) :将发生状态改变的接口中的 N个接口的状态保持为活动状态,以使得所述 LACP链路汇聚组内处于活 动状态的接口的数量大于或等于所述预设最小活动链路数 为自然数且 N 小于或等于所述 LACP链路汇聚组内处于活动状态的接口中发生状态改变 的接口数。
5503:当监测到有所述 LACP链路汇聚组内处于非活动状态的接口发 生状态改变时,将所述 N个保持活动状态的接口中 M个接口的状态调整为 非活动状态,以使得所述 LACP链路汇聚组内处于活动状态的接口的数量 大于或等于所述预设最小活动链路数, M为自然数且 M小于或等于 N。
5504:将 LACP链路汇聚组内处于活动状态的接口进行报文发送和接 收登记,将 LACP链路汇聚组内状态改变为非活动状态的接口进行报文接 收登记;
LACP链路汇聚组内处于活动状态的接口既可作为报文接收端口进行 对端报文接收的工作,也可作为报文发送端口进行本端报文的发送工作。 因此,将活动接口进行报文发送和接收登记;而对于 LACP链路汇聚组内 由活动状态变为非活动状态的接口仅登记为报文接收功能,变为非活动状 态的接口只要不是物理线路本身故障,通常还能继续接收报文,但不再具 有发送功能。
5505:根据 LACP链路汇聚组内接口的报文发送、 接收登记情况进行 数据传输; LACP链路按照登记的接口完成数据的传输转发工作。 本实施例在 LACP链路状态频繁切换环境下,将由活动接口变为非活 动接口的接口中的 N个接口的变化前状态保持一段时间 ,直到新的接口出 现才对所述 N个接口中的部分或全部解除这种状态保持,将其恢复到真实 状态。 并且在设定接口的功能时,不仅将活动接口分别进行" 接收"、 " 发 送" 两个方向的登记,而且还将上述由活动状态变为非活动状态的接口登 记为" 接收"。 本实施例充分利用接口的功能,使得已在链路上传输的报文 能通过相应接口顺利到达目的端,从而避免或减少数据报文的丢失。
上述数据传输的实施例利用了接口由活动状态转变为非活动状态后其 数据接收功能还将保持一段时间的特性,但是,随着变为非活动状态的时 间变长,这种数据接收功能将消失。 因此,将由活动状态变为非活动状态 的接口登记为" 接收" 接口不是" 永久之策" ,保持长期登记状态还将占用 存储资源。 为此,本发明还提供了对上述实施例进行改进的方案,即在在 将由活动状态变为非活动状态的接口进行报文接收登记时,启动定时器, 则:在预设时间到达后,删除该接口的报文接收登记。 这样经过预设时间 后可将相应接口从登记表中删除,进而释放出相应资源。 这里的预设时间 可以根据实际需要进行设定,通常优选 LACP配置的长周期或短周期作为 预设时间 ,在目前 LACP协议中规定的长周期为 90s ,短周期为 3s。 实施例六
上述实施例给出了 LACP链路数据传输的方法实施例,相应地,本发 明还提供了一种装置实施例。参见附图 6 ,本装置 600实施例包括:监测单 元 601、 确定单元 602、 状态调整单元 603、 报文收发登记单元 604和数据 传输单元 605,其中 :
所述监测单元 601 ,用于监测 LACP链路汇聚组内接口的状态变化; 所述确定单元 602,用于在监测到所述 LACP链路汇聚组内处于活动状 态的接口发生状态改变时,确定所述 LACP链路汇聚组内处于活动状态的 接口数是否小于预设最小活动链路数,如果是,则触发所述状态调整单元 603;
所述状态调整单元 603,用于在确定所述 LACP链路汇聚组内处于活动 状态的接口数小于预设最小活动链路数时,将发生状态改变的接口中的 N 个接口的状态保持为活动状态,以使得所述 LACP链路汇聚组内处于活动 状态的接口的数量大于或等于所述预设最小活动链路数, N 为自然数且 N 小于或等于所述 LACP链路汇聚组内处于活动状态的接口中发生状态改变 的接口数;在监测到所述 LACP链路汇聚组内处于非活动状态的接口发生 状态改变时,将所述 N个保持活动状态的接口中的 M个接口的状态调整为 非活动状态, M为自然数且 M小于或等于 N。
所述报文收发登记单元 604,用于将所述 LACP链路汇聚组内处于活动 状态的接口进行报文发送和接收登记,将所述 LACP链路汇聚组内状态改 变为非活动状态的接口进行报文接收登记; 所述数据传输单元 605,用于根据所述 LACP链路汇聚组内接口的报文 发送和接收登记进行数据传输。
该装置 600实施例的工作过程是:监测单元 601对 LACP链路汇聚组 内接口的状态变化进行监测;在监测到所述 LACP链路汇聚组内有接口由 活动状态变为非活动状态时,启动所述确定单元 602 ,由该确定单元 602确 定所述 LACP链路汇聚组内处于活动状态的接口数是否小于预设最小活动 链路数,如果是,则触发状态调整单元 603 ,由所述状态调整单元 603将发 生状态改变的接口中的 N个接口的状态保持为活动状态;在监测到所述 LACP链路汇聚组内有接口由非活动状态变为活动状态时,触发所述状态设 置单元 603将所述 N个保持活动状态的接口中的 M个接口的状态调整为非 活动状态。 接下来, 由所述报文收发登记单元 604将所述 LACP链路汇聚 组内处于活动状态的接口进行报文发送和接收转发登记,将所述 LACP链 路汇聚组内状态改变为非活动状态的接口进行报文接收登记;然后所述数 据传输单元 605根据所述 LACP链路汇聚组内接口的报文接收和转发登记 进行数据传输。
本装置实施例在 LACP链路状态频繁切换环境下,将所述 LACP链路 汇聚组内由活动接口变为非活动接口的接口中的至少一部分或全部的变化 前状态保持一段时间 ,直到新的接口出现才解除处于保持状态的这些接口 中的一个或所有接口的这种状态保持,将其恢复到真实状态。 在设定接口 的功能时,不仅将活动接口分别进行" 接收"、 " 发送" 两个方向的登记, 而且还将上述由活动状态变为非活动状态的接口登记为" 接收"。 本实施例 充分利用接口的功能,使得已在链路线上传输的报文能通过相应接口顺利 到达目的端,避免或减少数据报文的丢失。
在以上实施例中 ,也可以在确定所述 LACP链路汇聚组内处于活动状 态的接口数大于等于预设最小活动链路数时,将发生状态改变的接口中的 Q 个接口的状态保持为活动状态,以使得所述 LACP链路汇聚组内处于活动 状态的接口的数量大于或等于所述预设最小活动链路数, Q 为自然数且 Q 小于或等于所述 LACP链路汇聚组内处于活动状态的接口中发生状态改变 的接口数。
以上所述仅为本发明的较佳实施例,并不用以限制本发明 ,凡在本发 明的精神和原则之内 ,所作的任何修改、 等同替换、 改进等,均应包含在 发明的保护范围之内。

Claims

权利要求
1、 一种链路聚合控制协议 LACP链路切换方法,其特征在于,该方法 包括:
监测 LACP链路汇聚组内接口的状态变化;
当监测到所述 LACP链路汇聚组内处于活动状态的接口发生状态改变 时,确定所述 LACP链路汇聚组内活动状态的接口数是否小于预设最小活 动链路数,如果是,则将发生状态改变的接口中的 N个接口的状态保持为 活动状态,以使得所述 LACP链路汇聚组内处于活动状态的接口的数量大 于或等于所述预设最小活动链路数; N 为自然数且 N 小于或等于所述 LACP链路汇聚组内处于活动状态的接口中发生状态改变的接口数;
当监测到所述 LACP链路汇聚组内处于非活动状态的接口发生状态改 变时,将所述 N个保持活动状态的接口中的 M个接口的状态调整为非活动 状态, M为自然数且 M小于或等于 N。
2、 根据权利要求 1所述的方法,其特征在于,在将发生状态改变的接 口中的 N个接口的状态保持为活动状态时,启动定时器,则:在预设时间 内未监测到所述 LACP链路汇聚组内处于处于非活动状态的接口发生状态 改变时,将所述 N个保持活动状态的接口中的 M个接口的状态调整为非活 动状态。
3、 根据权利要求 2所述的方法,其特征在于,所述预设时间为 LACP 配置的长周期或短周期。
4、 根据权利要求 1所述的方法,其特征在于,在确定所述 LACP链路 汇聚组内处于活动状态的接口数大于等于预设最小活动链路数时,将发生 状态改变的接口中的 Q个接口的状态保持为活动状态,以使得所述 LACP 链路汇聚组内处于活动状态的接口的数量大于或等于所述预设最小活动链 路数, Q为自然数且 Q小于或等于所述 LACP链路汇聚组内处于活动状态 的接口中发生状态改变的接口数。
5、 一种链路聚合控制协议 LACP链路切换装置,其特征在于,该装置 包括:监测单元、 确定单元和状态调整单元,其中 :
所述监测单元,用于监测 LACP链路汇聚组内接口的状态变化; 所述确定单元,用于在监测到所述 LACP链路汇聚组内处于活动状态 的接口发生状态改变时,确定所述 LACP链路汇聚组内处于活动状态的接 口数是否小于预设最小活动链路数,如果是,则触发所述状态调整单元; 所述状态调整单元,用于在所述 LACP链路汇聚组内处于活动状态的 接口数小于预设最小活动链路数时,将发生状态改变的接口中的 N个接口 的状态保持为活动状态,以使得所述 LACP链路汇聚组内处于活动状态的 接口的数量大于或等于所述预设最小活动链路数; N为自然数且 N小于或 等于所述 LACP链路汇聚组内处于活动状态的接口中发生状态改变的接口 数;在监测到所述 LACP链路汇聚组中的非活动状态的接口发生状态改变 时,将所述 N个保持活动状态的接口中的 M个接口的状态调整为非活动状 态, M为自然数且 M小于或等于 N。
6、根据权利要求 5所述的装置,其特征在于,所述装置还包括定时器, 该定时器在将发生状态改变的接口中的 N个接口的状态保持为活动状态时 启动,则:在预设时间内未监测到所述 LACP链路汇聚组内处于非活动状 态的接口状态改变时,触发所述状态调整单元,该状态调整设置单元用于 将所述 N个保持活动状态的接口中的 M个接口的状态调整为非活动状态。
7、 一种链路聚合控制协议 LACP链路数据传输方法,其特征在于,该 方法包括:
监测 LACP链路汇聚组内接口的状态变化;
当监测到所述 LACP链路汇聚组内处于活动状态的接口发生状态改变 时,确定所述 LACP链路汇聚组内活动状态的接口数是否小于预设最小活 动链路数,如果是,则将发生状态改变的接口中的 N个接口的状态保持为 活动状态,以使得所述 LACP链路汇聚组内处于活动状态的接口的数量大 于或等于所述预设最小活动链路数; 为自然数且 N小于或等于所述 LACP 链路汇聚组内处于活动状态的接口中发生状态改变的接口数;
当监测到所述 LACP链路汇聚组内处于非活动状态的接口发生状态改 变时,则将所述 N个保持活动状态的接口中的 M个接口的状态调整为非活 动状态, M为自然数且 M小于或等于 N;
将所述 LACP链路汇聚组内处于活动状态的接口进行报文发送和接收 登记,将所述状态改变为非活动状态的接口进行报文接收登记;
根据所述 LACP链路汇聚组内接口的报文发送和接收登记进行数据传 输。
8、 根据权利要求 7所述的方法,其特征在于,在将状态改变为非活动 状态的接口进行报文接收登记时,启动定时器,则:在预设时间到达后, 删除该接口的报文接收登记。
9、 根据权利要求 8所述的方法,其特征在于,所述预设时间为 LACP 配置的长周期或短周期。
10、 一种链路聚合控制协议 LACP链路数据传输装置,其特征在于, 该装置包括:监测单元、 确定单元、 状态调整单元、 报文收发登记单元和 数据传输单元,其中 :
所述监测单元,用于监测 LACP链路汇聚组内接口的状态变化; 所述确定单元,用于在监测到所述 LACP链路汇聚组内处于活动状态 的接口发生状态改变时,确定所述 LACP链路汇聚组内处于活动状态的接 口数是否小于预设最小活动链路数,如果是,则触发所述状态调整单元; 所述状态调整单元,用于在所述 LACP链路汇聚组内处于活动状态的 接口数小于预设最小活动链路数时,将发生状态改变的接口中的 N个接口 的状态保持为活动状态,以使得所述 LACP链路汇聚组内处于活动状态的 接口的数量大于或等于所述预设最小活动链路数; N为自然数且 N小于或 等于所述 LACP链路汇聚组内处于活动状态的接口中发生状态改变的接口 数;在监测到所述 LACP链路汇聚组内处于非活动状态的接口发生状态改 变时,将所述 N个保持活动状态的接口中的 M个接口的状态调整为非活动 状态, M为自然数且 M小于或等于 N;
所述报文收发登记单元,用于将所述 LACP链路汇聚组内处于活动状 态的接口进行报文发送和接收登记,将状态改变为非活动状态的接口进行 报文接收登记;
所述数据传输单元,用于根据所述 LACP链路汇聚组内接口的报文发送 和接收登记进行数据传输。
PCT/CN2012/080126 2011-10-12 2012-08-15 一种lacp链路切换、数据传输方法与装置 WO2013053267A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP12840190.8A EP2720418B1 (en) 2011-10-12 2012-08-15 Lacp link switching and data transmission method and device
US14/225,770 US9270524B2 (en) 2011-10-12 2014-03-26 Method and device for LACP link switching and data transmission

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2011103083407A CN102364892B (zh) 2011-10-12 2011-10-12 一种lacp链路切换、数据传输方法与装置
CN201110308340.7 2011-10-12

Related Child Applications (1)

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

Publications (1)

Publication Number Publication Date
WO2013053267A1 true WO2013053267A1 (zh) 2013-04-18

Family

ID=45691444

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/080126 WO2013053267A1 (zh) 2011-10-12 2012-08-15 一种lacp链路切换、数据传输方法与装置

Country Status (4)

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

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114827016A (zh) * 2022-04-12 2022-07-29 珠海星云智联科技有限公司 切换链路聚合方案的方法、装置、设备及存储介质

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102412979B (zh) * 2010-09-26 2015-09-02 杭州华三通信技术有限公司 降低链路聚合端口报文丢失的方法及通信设备
CN102364892B (zh) * 2011-10-12 2013-04-24 华为技术有限公司 一种lacp链路切换、数据传输方法与装置
CN102882805B (zh) * 2012-09-24 2015-12-02 华为技术有限公司 避免链路聚合组状态震荡的方法及装置
CN103916281B (zh) * 2014-04-29 2018-01-30 上海斐讯数据通信技术有限公司 一种动态lacp聚合链路故障恢复方法
CN105281926B (zh) * 2014-05-27 2019-03-12 中兴通讯股份有限公司 一种链路聚合端口的信号劣化触发保护切换的方法及装置
CN104283724B (zh) * 2014-10-31 2017-10-27 大唐移动通信设备有限公司 一种聚合组状态的管理方法和设备
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
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
CN106302215A (zh) * 2016-08-30 2017-01-04 华为技术有限公司 一种转发报文的方法及装置
CN108234308B (zh) * 2016-12-14 2022-04-01 迈普通信技术股份有限公司 一种分布式设备内部通信系统及方法
CN108270589B (zh) * 2016-12-30 2021-06-15 北京华为数字技术有限公司 一种报文处理方法及相关装置
CN109218232B (zh) * 2017-06-29 2020-06-16 华为技术有限公司 一种实现Mux机的方法、设备及系统
US10560326B2 (en) * 2017-09-22 2020-02-11 Webroot Inc. State-based entity behavior analysis
CN109672513B (zh) * 2017-10-16 2021-10-22 华为技术有限公司 传输路径配置方法、装置及设备
JP7063145B2 (ja) * 2018-06-29 2022-05-09 住友電気工業株式会社 通信装置および通信装置の制御方法
CN109450738A (zh) * 2018-12-19 2019-03-08 迈普通信技术股份有限公司 链路检测方法、装置及服务器
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

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101355511A (zh) * 2008-09-17 2009-01-28 杭州华三通信技术有限公司 一种链路聚合流量保护方法及装置
CN101616067A (zh) * 2008-06-27 2009-12-30 中兴通讯股份有限公司 链路切换方法和装置
CN101692652A (zh) * 2009-09-15 2010-04-07 杭州华三通信技术有限公司 一种防止聚合链路中流量中断的方法及装置
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
CN102364892A (zh) * 2011-10-12 2012-02-29 华为技术有限公司 一种lacp链路切换、数据传输方法与装置

Family Cites Families (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100590882B1 (ko) * 2004-01-30 2006-06-19 삼성전자주식회사 라우터의 타이머 설정 방법 및 그 장치
US8259562B2 (en) * 2004-10-07 2012-09-04 Cisco Technology, Inc. Wiring closet redundancy
US7729361B2 (en) * 2006-02-24 2010-06-01 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
US7813267B2 (en) * 2006-08-29 2010-10-12 Cisco Technology, Inc. Method and system for providing control plane resiliency with undisrupted forwarding in a data network
US7649839B2 (en) * 2007-11-21 2010-01-19 Motorola, Inc. Method and device for managing data rate in a communication system
CN101217424B (zh) * 2008-01-21 2010-12-29 中兴通讯股份有限公司 聚合链路故障的检测方法和装置
US8203938B2 (en) * 2008-05-22 2012-06-19 Level 3 Communications, Llc Multi-router IGP fate sharing
US20100188993A1 (en) * 2009-01-28 2010-07-29 Gregory G. Raleigh Network tools for analysis, design, testing, and production of services
US8509133B2 (en) * 2008-07-07 2013-08-13 Apple Inc. Wireless scheduling systems and methods
CN101442484B (zh) * 2008-12-05 2012-09-05 杭州华三通信技术有限公司 一种检测堆叠多Active的方法、系统及设备
CN101651960A (zh) 2009-09-17 2010-02-17 中兴通讯股份有限公司 一种基于lacp协议的链路聚合带宽保护方法及装置
CN102075343B (zh) * 2009-11-20 2013-03-27 杭州华三通信技术有限公司 一种实现带外管理的方法、系统和带外管理交换机
JP5513342B2 (ja) * 2010-02-26 2014-06-04 アラクサラネットワークス株式会社 パケット中継装置
US8514743B2 (en) * 2010-06-17 2013-08-20 Cisco Technology, Inc. Maintaining balance of active links across network devices in a double-sided virtual port-channel environment
EP2642699A1 (en) * 2010-11-16 2013-09-25 Fujitsu Limited Method of controlling communication system, communication system, communication device
US20130003559A1 (en) * 2011-06-30 2013-01-03 Broadcom Corporation Adaptive Power Savings for Aggregated Resources
US8902738B2 (en) * 2012-01-04 2014-12-02 Cisco Technology, Inc. Dynamically adjusting active members in multichassis link bundle

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101616067A (zh) * 2008-06-27 2009-12-30 中兴通讯股份有限公司 链路切换方法和装置
CN101355511A (zh) * 2008-09-17 2009-01-28 杭州华三通信技术有限公司 一种链路聚合流量保护方法及装置
CN101692652A (zh) * 2009-09-15 2010-04-07 杭州华三通信技术有限公司 一种防止聚合链路中流量中断的方法及装置
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
CN102364892A (zh) * 2011-10-12 2012-02-29 华为技术有限公司 一种lacp链路切换、数据传输方法与装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP2720418A4 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114827016A (zh) * 2022-04-12 2022-07-29 珠海星云智联科技有限公司 切换链路聚合方案的方法、装置、设备及存储介质

Also Published As

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

Similar Documents

Publication Publication Date Title
WO2013053267A1 (zh) 一种lacp链路切换、数据传输方法与装置
US9258183B2 (en) Method, device, and system for realizing disaster tolerance backup
CN100527716C (zh) 主备网关设备状态切换后业务恢复的方法及网关设备
US8606186B2 (en) Wireless communication path management methods and systems
WO2009023996A1 (fr) Procédé de mise en œuvre d'une interconnexion de réseau par l'intermédiaire d'une agrégation de liaisons
CN100568854C (zh) 一种保持邻居关系的方法和接口板
WO2017124791A1 (zh) 链路检测方法及装置
EP3167585A1 (en) Multi-path transmission control protocol
WO2009082923A1 (fr) Procédé de traitement de défaut de liaison et dispositif de transfert de données
US20170324580A1 (en) Failure protection method based on ring protection link, device, and system
WO2016082412A1 (zh) 实现数据可靠传输的方法、装置及计算机存储介质
WO2012163173A1 (zh) 以太网环保护倒换方法、节点及系统
WO2009124499A1 (zh) 信令传送的保护方法、装置及通信系统
WO2007121633A1 (fr) Procédé de réacheminement rapide en cas de partage de liaisons de transmission par de multiples ports
WO2007048299A1 (fr) Procede et dispositif pour la verification de coherence de l’etat d’intervalle temporel dans la liaison d’ingenierie de trafic.
WO2015070383A1 (zh) 一种链路聚合的方法、装置和系统
WO2012058895A1 (zh) 聚合链路切换方法及装置
WO2012062069A1 (zh) 双向转发检测报文的发送方法及设备
US7860090B2 (en) Method for processing LMP packets, LMP packet processing unit and LMP packet processing node
WO2010034147A1 (zh) 一种实现中继网关容灾不断话的方法、系统及媒体网关
CN109995541B (zh) 一种组播数据发送方法及节点设备
JP2020136817A (ja) ネットワーク装置、ネットワークシステム、ネットワーク接続方法、およびプログラム
WO2009129712A1 (zh) 上报会话状态的方法、媒体网关和系统
JPWO2007023966A1 (ja) 通信装置、通信方法および通信プロトコル処理方法、通信端末装置およびその通信方法、ならびに通信システムおよびその通信方法
WO2012040988A1 (zh) 业务组管理方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12840190

Country of ref document: EP

Kind code of ref document: A1

REEP Request for entry into the european phase

Ref document number: 2012840190

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE