WO2015070383A1 - Link aggregation method, apparatus, and system - Google Patents

Link aggregation method, apparatus, and system Download PDF

Info

Publication number
WO2015070383A1
WO2015070383A1 PCT/CN2013/086985 CN2013086985W WO2015070383A1 WO 2015070383 A1 WO2015070383 A1 WO 2015070383A1 CN 2013086985 W CN2013086985 W CN 2013086985W WO 2015070383 A1 WO2015070383 A1 WO 2015070383A1
Authority
WO
WIPO (PCT)
Prior art keywords
port
link
aggregation
state
control protocol
Prior art date
Application number
PCT/CN2013/086985
Other languages
French (fr)
Chinese (zh)
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 PCT/CN2013/086985 priority Critical patent/WO2015070383A1/en
Priority to CN201380002380.6A priority patent/CN105122737A/en
Publication of WO2015070383A1 publication Critical patent/WO2015070383A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/24Multipath
    • H04L45/245Link aggregation, e.g. trunking
    • 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 method, an apparatus, and a system for link aggregation. Background technique
  • Link aggregation (Ligation Aggregation) is to bind multiple physical ports of a network device to a logical port to implement load balancing of the inbound/outbound traffic on each member port.
  • the packet is determined by a certain load balancing policy. From which member port to send.
  • the device detects that the link of one of the member ports is faulty, the device stops sending packets on the port and recalculates the port for sending packets on the remaining link according to the load balancing policy. After the faulty port is restored, it is restored again. Calculate the packet sending port.
  • Link aggregation is an important technology in terms of increasing link bandwidth and reporting link security.
  • the embodiments of the present invention provide a method, an apparatus, and a system for link aggregation to solve the above technical problem.
  • a method for link aggregation is applied to a communication network, where the communication network includes a first device, the first device includes a first port and a second port, and includes the first port a first link that is connected to the second device and a second link that is connected to the second device by the second port, where the first port is in a forwarding state, the method includes the first device passing the The first port receives the service packet from the second device; the first device receives the link aggregation control protocol packet from the second device by using the second port, where the link aggregation control protocol The packet is used to configure a link aggregation control protocol aggregation group; the first device responds to the link aggregation control protocol packet, and maintains a forwarding state of the first port to continue to receive from the first port.
  • the method further includes: when the first port of the first device is in a semi-blocking state, When the state of the port of the second device corresponding to the first link is also in a semi-blocking state, the first port is set to be in a blocking state, so that the first link cannot forward service packets.
  • the aggregation configuration of the two devices is not synchronous.
  • the physical port does not interrupt the service because the physical port forwards the service packets.
  • a method for link aggregation is applied to a communication network, where the communication network includes a first device, the first device includes a first port, and includes a second device connected to the second device by using the first port. a first link, the method comprising: the first device receiving a service packet from the second device by using the first port; the first device receiving, by the first port, the second device The link aggregation control protocol packet, the link aggregation control protocol packet is used to configure a link aggregation group, and the first device responds to the link aggregation control protocol packet to maintain forwarding of the first port. And continuing to receive a service packet from the second device by using the first port, and establishing a link aggregation control protocol aggregation of the first link.
  • a network device is applied to a communication network, including a first port, a second port, a data transceiver, an aggregator, and a first link connected to the second device by using the first port, and by using the a second port to which the second port is connected, the first port and the second port are coupled to a data transceiver, and the data transceiver is connected to the aggregator, wherein the data is a transceiver, configured to receive a service packet from the second device by using the first port, and receive, by using the second port, a link aggregation control protocol packet sent by the second device, where the received chain is The aggregating control protocol packet is sent to the aggregator; the aggregator is configured to respond to the link aggregation when the first link and the second link join the link aggregation control protocol aggregation group. Controlling the protocol packet, keeping the first port in a forwarding state, instructing the data transceiver to continue receiving service packets from the second device,
  • the aggregator is further configured to: after the first link and the second link are successfully aggregated, set the first port to be in a semi-blocking state, The first device is configured to continue to receive the service packet sent by the second device by using the first port.
  • the aggregator is further configured to: when the first port of the first device is in a semi-blocking state, and the second port corresponding to the first link When the state of the port of the device is also in the semi-blocking state, the first port is set to be in a blocking state, so that the first link cannot forward service packets.
  • the aggregation configuration of the two devices is not It is a synchronous operation.
  • the physical port is normally forwarded by the physical port during the protocol negotiation process. Therefore, no service interruption occurs.
  • a network device is applied to a communication network, where the network device is configured with a first port, the first port is coupled to a data transceiver, and the network device and the second device pass the first
  • the port is provided with a first link, the first port is in a forwarding state, and the network device includes a data transceiver, configured to receive a service packet or a link aggregation control protocol packet sent by the second device; And when the first link joins the link aggregation group, in response to the link aggregation control protocol, maintaining the first port of the first link in a forwarding state, to continue to receive through the first port.
  • a fifth aspect a link aggregation system, where the system includes at least two network devices, where the any one of the first to second possible implementations of the third aspect or the third aspect A network device as described or a network device as described in the fourth aspect.
  • the aggregation configuration of the two devices is not synchronous.
  • the physical port is forwarded normally during the protocol negotiation. Therefore, no service interruption occurs.
  • FIG. 1 is a schematic diagram of service interruption caused by configuration aggregation in the prior art
  • FIG. 2a is a schematic diagram of LACP aggregation configuration of a single link according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of a single-link LACP aggregation method according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of LACP aggregation of a single link extended to dual links according to an embodiment of the present invention
  • FIG. The flow chart of the LACP method for extending a single link into a dual link provided by the example;
  • FIG. 4 is a schematic diagram of a generalized aggregation and LACP aggregation according to an embodiment of the present invention
  • FIG. 4b is a schematic flowchart of a general aggregation and LACP aggregation method according to an embodiment of the present invention
  • FIG. 5 is a schematic structural diagram of a network device according to an embodiment of the present invention.
  • LACP Link Aggregation Control Protocol
  • the control protocol for implementing link aggregation in the IEEE 802.ad standard. Through this protocol, information is exchanged between partner systems at both ends of a link to allow their link aggregation control instances to agree on the identity of the link aggregation group to which the link belongs, and to move the link to the link aggregation group. And perform its send and receive functions in an orderly manner.
  • the LACP protocol uses the interaction of LACPDUs to implement automatic link selection in the aggregation scenario and automatic sensing and reselection of link changes to automatically control the normal operation of link members in the aggregation group.
  • the protocol packet contains the following information: Actor and partner system priority, local and peer system ID (identifier), local and peer port operation key Key, local and pair The port priority of the port, the port ID of the local end and the peer end, and the port status of the local end and the peer end.
  • the two parties of the aggregation select the appropriate link according to a certain selection algorithm, and control the state of the aggregation.
  • the selected member link can forward the traffic normally, and the unselected member link will be blocked. No traffic can be forwarded.
  • the total bandwidth of the aggregated link is equal to the sum of the bandwidths of the selected member links, and the traffic on the aggregated link is distributed to each selected member link according to certain rules.
  • the link aggregation can be quickly detected and reset. Link status, set the link to be blocked, and traffic is reassigned to other selected member links.
  • the embodiment of the present invention provides a method for link aggregation, which is applied to a communication network system, where the network system includes a first device 20 and a second device 22, where the first and second devices may be access devices and routes.
  • the first device 20 and the second device 22 are provided with a link aObO.
  • the link a0b0 is not configured with an LACP aggregation group, and the current service is normally forwarded, that is, the first device 20 transmits and receives normally through the port a0.
  • the LACPDU of the second device 22 is not configured with an LACP aggregation group, and the current service is normally forwarded, that is, the first device 20 transmits and receives normally through the port a0.
  • An LACP aggregation group is configured for the single-link network.
  • the configuration of the LACP aggregation group is static and dynamic.
  • the static configuration specifies the end of the aggregation. Port, and then rely on the LACP protocol interaction between the two devices on the aggregation link to dynamically select which port forwarding service (the port state is the forwarding state Forward), which ports cannot forward the service (the port state is the blocking state Block), and the link is real-time according to the link. Change to adjust strategy and re-select.
  • the embodiment of the present invention is to dynamically configure an LACP aggregation group as an example, but the present invention is not limited to the described configuration process, as shown in FIG. 2a and FIG. 2b, including:
  • the current state Before the LACP aggregation group is configured, the first device 20 and the second device 22 are single-link connections, and no link aggregation is performed, and the service forwarding is normal, that is, the port a0 of the first device 20 is in the forwarding state, and the second device 22 is in the forwarding state. Port b0 is in the forwarding state.
  • Configuring the LACP protocol is accomplished through a logical system called an aggregator.
  • the logical system is implemented by a software system control hardware system.
  • the aggregator reference may be made to the standard IEEE Standard 802.ad, which is not described here.
  • the configuration of the LACP protocol that is, the various parameters of the port a0 of the first device 20 in the LACPDU are still configured and forwarded according to the standard IEEE Standard 802.ad.
  • the structure of the LACP protocol is as follows:
  • Address information Destination address, Source Address;
  • Length / Type Length / Type (Length / Type);
  • Local information including: local system (Actor_System), local key value (Actor_Key), local port priority (Actor Port Priorty), local port (Actor_Port), and local state (Actor_ State) );
  • Peer information including: Partner-System, Partner _Key, Partner Port Priorty, Partner _Port, and Partner State) ); as well as
  • the port a0 of the first device 20 After the port a0 of the first device 20 is successfully configured with the LACP protocol, the port a0 uses the LACPDU to notify the second device 22 of the local system priority, system MAC, port priority, port number, and Operation key Key, etc. After receiving the packet, the second device 22 selects the port b0 and a0 to perform the corresponding LACP aggregation operation according to the information of the stored port.
  • the process is the process in which the first device selects the port where the second device participates in the LACP aggregation. Reference can be made to the standard IEEE Standard 802.ad.
  • the ports a0 and b0 After determining that the second device 22 is participating in the LACP aggregation port, the ports a0 and b0 start the LACP aggregation negotiation process as follows:
  • the physical address of the first device 20 is 00d0.f800.0001
  • the system priority is 61430 (the greater the priority value, the smaller the priority)
  • the physical address of the second device 22 is 00d0.f800.0002
  • the system priority The level is 3096.
  • the second device 22 sends a protocol packet to the first device 20 that the b0 port is in the aggregated state, and the first device 20 receives the LACP packet that is updated by the second device 22, and finds that the system priority of the peer end is relatively high, and The port has been set to the aggregation state, so the first device 20 also sets the port a0 to the aggregation state.
  • the Actor_State field (the red box portion in the table) is 1 byte and 8 bit bits, wherein the 8 bit bits are:
  • the manner in which the first device a0 selects which port of the second device is specific is not limited to the above example.
  • the process of how the first device and the second device select which ports to participate in the aggregation group is a prior art, and please refer to the standard IEEE Standard 802.ad.
  • the port a0 of the first device 20 is set, so that the state of the physical port a0 is still in the forwarding state, and the service packet can be forwarded normally, so that the service is not interrupted.
  • the configuration herein may be implemented by a software system, or may be implemented by a hardware system, or may be implemented automatically, or may be manually implemented.
  • the embodiment of the present invention does not limit a specific implementation manner.
  • the forwarding state is that the port can receive both the service packet and the service packet.
  • the blocking state can only forward the LACP protocol packet and cannot forward the service packet.
  • S220 The first device and the second device negotiate the LACP protocol successfully, and the first device sends the forwarding state to the physical port a0.
  • the first device does not need to change the state of the physical port, because the state of the port of the aggregation group is set to the forwarding state (Forward) in S210, and the service packet is forwarded normally.
  • Forward forwarding state
  • Embodiment 2 The solution used in the embodiment of the present invention can solve the problem of service interruption when the LACP aggregation group is configured, and implement seamless handover of service packets when the link state changes.
  • the second embodiment of the present invention provides a method for configuring an LACP aggregation group, which is applied to a single-link extension to a dual-link LACP aggregation group.
  • the device 30 and the device 32 are single-link connections.
  • the traffic forwarding is normal, that is, the service forwarding is normal, that is, the port a0 of the device 30 is in the forwarding state, and the port b0 of the device 32 is in the forwarding state, as shown in FIG. 3a and FIG. 3b, including:
  • the LACP protocol may be configured on the device 30, or the LACP protocol may be configured on the device 32, and the LACP protocol may be configured on the device 30 and the device 32.
  • the embodiment of the present invention is not limited to the configuration. Which device is in order. After the LACP protocol is configured on the device 30, the device 30 is configured with the LACP protocol, and then sends the LACP protocol packet to the device 32.
  • the device 32 selects the port bO and aO to perform the LACP aggregation operation according to the information of the stored port. Select port bl and a1 to participate in LACP aggregation on the same port bO and port aO.
  • the device 30 maintains the forwarding state of the port a0, so that the service packet from the device 32 can still be continuously received during the establishment of the LACP aggregation group, that is, in the aggregation group. At least one link is in the forwarding state and is not affected by the LACP protocol. Therefore, services are not interrupted during the configuration process. The service is still forwarded through the aO and bO ports or forwarded through the ao and b0, al, and bl links.
  • the service packets are forwarded according to the aggregation principle.
  • the LACP protocol of the device 30 and the device 32 have not been negotiated successfully, and the service forwarding is not affected. Because aO and bO are capable of forwarding service messages.
  • the port state is a forwarding state
  • the LACP negotiation between the device 30 and the device 32 is successful, indicating that at least one link in the aggregation group is in the collection and distribution state, that is, the aggregation and distributing states are Yes. Then, all the physical port states in the aggregation group are set to the forwarding state.
  • the first device sets the a0 port to a semi-blocking state, and then, the second device
  • the b0 port is set to a semi-blocking state, and when both a0 and b0 are in a semi-blocking state, the first device and the second device respectively set a0 and b0 to a blocking state.
  • the devices of the two ports a0 and b0 are respectively set, and there is a time difference, which is the same as that described in step S210.
  • the port b0 is set to a semi-blocking state.
  • Sending the LACP packet to the first device 20 the first device 30 receives the LACP packet updated by the second device 32, and finds that the system priority of the peer device is high, and the port has been set to a semi-blocking state, so the port is set to half.
  • the LACP packet is sent to the second device.
  • the second device finds that both a0 and b0 are in the semi-blocking state set b0 to the blocking state. Repeat the above process until the ports a0 and b0 are in the blocking state.
  • the bit value of the transmitted message is 1
  • the local port is in the semi-blocking state. If the value is 0, the port is not in the semi-blocking state.
  • the semi-blocking state is used to identify that the port can only receive service packets and cannot send service packets.
  • the problem of service interruption is solved when the single link is extended to the dual-link LACP aggregation group. If the configuration fails, the service packet can only be received and cannot be sent because the port a0 is set to the semi-blocking state. Therefore, the service packets sent from the port b0 are not lost. Seamless switching of service packets when the status of the road changes.
  • the embodiment of the present invention further provides a method for configuring an LACP aggregation group, which is applied to an aggregation of an ordinary aggregation to an LACP.
  • the two devices are respectively the device 40 and the device 42.
  • the device 40 and the device 42 are connected by two links aObO and alb1, and the link aObO and the link altb are in the normal aggregation group, and the ports a0, b0, a, and bl are all in the forwarding state, including:
  • the device 40 and the device 42 configure the LACP to adjust the normal aggregation state of the two links between the device 50 and the device 52 to the aggregation state of the LACP.
  • the aggregation of the general aggregation of the device 40 or the device 42 can be implemented by adding an LACP aggregator.
  • the operation of the aggregator is not affected, and the actual physical port is not affected.
  • the process of configuring the LACP protocol is the same as that of step S210, and is not described here.
  • step S320 the specific process of negotiation can refer to the description of step S320.
  • the LACP negotiation between the two devices is successful.
  • the status of the collection and distribution of the at least one link is YES, and the physical port status of the link is set to the forwarding state, and the service forwarding is normal.
  • the bit value in the transmitted message is 1 means The local port is already in a semi-blocking state.
  • a value of 0 indicates that it is not a semi-blocking state.
  • the semi-blocking state is used to identify that a port can only accept service packets and cannot send service packets.
  • the local port is set to the blocking state.
  • the problem of business interruption is solved when the ordinary aggregation is expanded into LACP aggregation. If the configuration is unsuccessful, the service packet can only be received and cannot be sent. Therefore, the service packets sent from the port b0 are not lost. Seamless switching.
  • the embodiment of the present invention further provides a network device, which may be an access device, a routing device, or a switch, or any other network device that can use a link aggregation control protocol.
  • the access device may be a DSLAM (Digital Subscriber Line Access Multiplexer), an OLT (Optical Line Terminal), or an MSAN (Multiservice Access Node).
  • DSLAM Digital Subscriber Line Access Multiplexer
  • OLT Optical Line Terminal
  • MSAN Multiservice Access Node
  • the provided network device 50 is connected to the device 60 through a plurality of links, and the plurality of links form an aggregation group.
  • the network device 50 is provided with a first port a0 and a second port a1, the first port a0 and the second port a1 are coupled to a data transceiver, and the network device is connected to the second device through the first port.
  • the first link, the network device is connected to the second device by using a second port, where the first port is in a forwarding state.
  • the data transceiver 510 forms a plurality of links through the plurality of ports, and the network device 50 connects the devices 60 through the plurality of links.
  • the data transceiver 510 can be used to receive the LACP packet and the service packet sent by the peer end 60, and can also be used to send the LACP packet to the device 60 and the service packet.
  • the aggregator 520 is configured to set the physical port of the network device to be in a forwarding state, a blocking state, or a semi-blocking state.
  • the aggregator 520 sets the physical port of the network device 50 corresponding to the multiple links to the forwarding state when the LACP protocol is configured.
  • the physical port of the network device 50 is not changed, that is, the physical port of the network device 50 is in the forwarding state.
  • the LACP negotiation result is that one of the links is blocked
  • the physical port of the network device 50 corresponding to the blocked link is set to a semi-blocking state until the physical ports of the network device 50 and the device 60 are semi-blocking.
  • the physical port of the network device 50 is set to the blocking state.
  • the configuration of the LACP protocol can be performed through the network management system or the command line.
  • the aggregator 520 may specifically include a forwarding logic 521 and a CPU (Central Processing Unit) 522.
  • a forwarding logic 521 may specifically include a CPU (Central Processing Unit) 522.
  • CPU Central Processing Unit
  • the forwarding logic 521 is configured to configure the LACP protocol packet, including obtaining the address information, the type information, the version number, the peer device information, and the like in the LACP packet sent by the peer end.
  • the CPU 522 can be used to monitor events and control the forwarding logic 521 to send LACP protocol messages.
  • the events monitored by the CPU can include the status of the physical port, the aggregation group setting success, the aggregation group setting failure, the power-on or other set events.
  • the forwarding state identifies that the physical port can send and receive protocol packets and service packets.
  • the blocked state identifies that the physical port can only send and receive protocol packets, and cannot receive and send service packets.
  • the semi-blocking state identifies the port. Sends and receives protocol packets, receives service packets, and cannot send protocol packets.
  • the aggregator 520 uses the CPU 522 to set the state of the port, and can use the Forward flag to indicate the forwarding state, the Block flag to block the state, and the Half-Block to identify the semi-blocking state.
  • the CPU 522 detects that the LACP aggregation group is configured successfully, the CPU 522 detects the collection and collection of the LACP packets. When the distribution status is yes, set the physical port to the forwarding state.
  • the CPU 522 monitors that the aggregation group is to block a certain link, that is, when the collection and distribution status of the LACP packet is detected, the physical port of the network device 50 is set to a semi-blocking state, and the LACP protocol packet is sent to the second device. 52.
  • the CPU of the second device 52 also sets its corresponding port to a semi-blocking state. When the states of the ports on both ends are in a semi-blocking state, the state of the port is set to a blocking state.
  • the embodiment of the present invention further provides a link negotiation system.
  • the system may be an LACP system, where the system includes at least two network devices, and the structure of any one of the network devices may be referred to FIG.
  • the description of Embodiment 4 corresponding to FIG. 5, the structure of the system is briefly described as follows: comprising a first network device 50 and a second network device 60, the first network device 50 includes at least one port a0, and the second network device at least Contains a port b0, which is connected by a link between port a0 and port b0, including:
  • the first network device 50 includes a data transceiver 510 and an aggregator 520.
  • the aggregator 620 pre-sets the state of the physical port a0 of the first network device 50 to a forwarding state before the first network device 50 transmits the LACP protocol.
  • the setting herein may be implemented by a software instruction, may also be implemented by a hardware instruction, or may be implemented by a combination of software and hardware, and the present invention is not limited to any of the above implementation manners.
  • the first network device 50 sends an LACP protocol packet to the second network device 60, where the packet carries the physical address, type, length, version number, and device information of the port a0 of the first network device 50, such as the priority and status of the port a0. , key values and other information;
  • the second network device 60 sends an LACP protocol packet to the first network device 50, where the packet carries the physical address, type, length, version number, and device information of the port b0 of the second network device 60, such as the priority and status of the port B0. , key values and other information;
  • the first network device 50 and the second network device 60 perform the LACP protocol negotiation.
  • the negotiation succeeds, the state of the physical ports a0 and b0 is not changed.
  • the negotiation fails the physical port a0 is set to a semi-blocking state. At this time, a0 can still receive the service packet sent by physical port b0, and then set physical port b0 to be semi-blocking state.
  • a0 and b0 negotiate that both ports are half-blocked, and a0 and B0 is a blocked state.
  • the solution used in the embodiment of the present invention can solve the problem of service interruption when configuring a LACP aggregation group. If the negotiation fails or the result of the negotiation is to block a link, since the port a0 is set to the semi-blocking state, the packet can only be received and cannot be sent for the first network device 50, so that the service packet sent from the port b0 is sent. The text is not lost, and the service packets are seamlessly switched when the link status changes.
  • a person skilled in the art can understand that all or part of the various methods of the above embodiments can be completed by a program to instruct related hardware, and the program can be stored in a computer readable storage medium, and the storage medium can include: A disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
  • the storage medium can include: A disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

Landscapes

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

Abstract

Embodiments of the present invention disclose a link aggregation method, apparatus, and system. The method is applied in a communications network. The communications network comprises a first device and a second device. The first device receives a service packet from the second device through a first link where a first port is located; the first device receives a link aggregation control protocol packet from the second device through a second link where a second port is located, the link aggregation control protocol packet being used for configuring a link aggregation group; and the first device responds to the link aggregation control protocol packet, and keeps a forwarding state of the first port to continue to receive a service packet from the second device. By means of the technical solutions, when an aggregation group is configured in a network, a physical port is set to normally forward a service packet during a protocol negotiation process, which does not cause service interruption.

Description

一种链路聚合的方法、 装置和系统  Method, device and system for link aggregation
技术领域 Technical field
本发明涉及通信技术领域, 尤其涉及一种链路聚合的方法、 装置和系统。 背景技术  The present invention relates to the field of communications technologies, and in particular, to a method, an apparatus, and a system for link aggregation. Background technique
链路聚合 ( Link Aggregation )是指将网络设备的多个物理端口捆绑在一起, 成为一个逻辑端口, 以实现出 /入流量在各成员端口的负荷分担, 并且通过一定 的负荷分担策略决定报文从哪个成员端口发送。 当设备检测到其中一个成员端 口的链路发生故障时, 就停止在此端口上发送报文, 并根据负荷分担策略在剩 下链路中重新计算报文发送的端口, 故障端口恢复后再次重新计算报文发送端 口。 链路聚合在增加链路带宽、 报障链路安全等方面是一项很重要的技术。  Link aggregation (Ligation Aggregation) is to bind multiple physical ports of a network device to a logical port to implement load balancing of the inbound/outbound traffic on each member port. The packet is determined by a certain load balancing policy. From which member port to send. When the device detects that the link of one of the member ports is faulty, the device stops sending packets on the port and recalculates the port for sending packets on the remaining link according to the load balancing policy. After the faulty port is restored, it is restored again. Calculate the packet sending port. Link aggregation is an important technology in terms of increasing link bandwidth and reporting link security.
现有技术中在网络中做聚合操作时, 因为双方设备的聚合配置不可能完全 同步操作, 并且配置完成后有一个协商的过程, 协商成功前端口是不能收发业 务报文的, 故必然造成业务的中断。 例如: 如图 1所示: 在双方协商成功之前, 仅仅可以转发协议报文, 不能转发业务报文, 协商成功后, 协议报文和业务报 文才能转发。 配置过程中除了业务中断外, 如果管理通道也是依赖这两个端口, 则设备有脱管的风险。 在网络问题定位和排除故障时, 往往需要反复更改聚合 配置, 造成业务反复中断、 长时间中断。  In the prior art, when the aggregation operation is performed in the network, the aggregation configuration of the two devices cannot be completely synchronized, and the configuration process is completed. After the negotiation succeeds, the port cannot send or receive service packets, which inevitably causes services. The interruption. For example, as shown in Figure 1: Before the two parties negotiate successfully, only the protocol packets can be forwarded and the service packets cannot be forwarded. After the negotiation succeeds, the protocol packets and service packets can be forwarded. In addition to service interruption, if the management channel also depends on these two ports, the device is at risk of being disconnected. When locating and troubleshooting network problems, it is often necessary to repeatedly change the aggregation configuration, causing repeated business interruptions and long interruptions.
发明内容 Summary of the invention
有鉴于此, 本发明实施例提供了一种链路聚合的方法、 装置和系统, 以解 决上述技术问题。  In view of this, the embodiments of the present invention provide a method, an apparatus, and a system for link aggregation to solve the above technical problem.
第一方面, 一种链路聚合的方法, 应用于通信网络, 所述通信网络包括第 一设备, 所述第一设备包括第一端口和第二端口, 以及包括通过所述第一端口 与第二设备连接的第一链路和通过所述第二端口与所述第二设备连接的第二链 路, 所述第一端口处于转发态, 所述方法包括所述第一设备通过所述第一端口 接收来自所述第二设备的业务报文; 所述第一设备通过所述第二端口接收来自 所述第二设备的链路聚合控制协议报文, 所述链路聚合控制协议报文用于配置 链路聚合控制协议聚合组; 所述第一设备响应所述链路聚合控制协议报文, 保 持所述第一端口的转发态以继续通过所述第一端口接收来自所述第二设备的业 务报文, 以及建立所述第二端口和所述第一端口的链路聚合关系, 使得所述第 一链路和第二链路的实现链路聚合。 In a first aspect, a method for link aggregation is applied to a communication network, where the communication network includes a first device, the first device includes a first port and a second port, and includes the first port a first link that is connected to the second device and a second link that is connected to the second device by the second port, where the first port is in a forwarding state, the method includes the first device passing the The first port receives the service packet from the second device; the first device receives the link aggregation control protocol packet from the second device by using the second port, where the link aggregation control protocol The packet is used to configure a link aggregation control protocol aggregation group; the first device responds to the link aggregation control protocol packet, and maintains a forwarding state of the first port to continue to receive from the first port. The service packet of the second device, and the link aggregation relationship between the second port and the first port, so that the link aggregation of the first link and the second link is implemented.
在第一方面的第一种可能的实现方式中, 在所述第一链路和所述第二链路 的链路聚合成功后, 设置所述第一端口为半阻塞态, 使得所述第一设备通过所 述第一端口继续接收所述第二设备发送的业务报文。  In a first possible implementation manner of the first aspect, after the link aggregation of the first link and the second link is successful, setting the first port to a semi-blocking state, so that the A device continues to receive the service packet sent by the second device by using the first port.
结合第一方面或第一方面的第一种可能的实现方式, 在第二种可能的实现 方式中, 所述方法进一步包括当所述第一设备的第一端口为半阻塞态时, 以及 所述第一链路对应的所述第二设备的端口的状态也为半阻塞态时, 设置所述第 一端口为阻塞态, 使得所述第一链路不能转发业务报文。  With reference to the first aspect or the first possible implementation manner of the first aspect, in a second possible implementation manner, the method further includes: when the first port of the first device is in a semi-blocking state, When the state of the port of the second device corresponding to the first link is also in a semi-blocking state, the first port is set to be in a blocking state, so that the first link cannot forward service packets.
通过以上技术方案, 在网络中配置聚合组时, 尽管双方设备的聚合配置不 是同步操作, 但是由于在协议协商过程中, 物理端口正常转发业务报文, 因此, 不会造成业务的中断。  With the above technical solution, when the aggregation group is configured on the network, the aggregation configuration of the two devices is not synchronous. However, the physical port does not interrupt the service because the physical port forwards the service packets.
第二方面, 一种链路聚合的方法, 应用于通信网络, 所述通信网络包括第 一设备, 所述第一设备包括第一端口, 以及包括通过所述第一端口与第二设备 连接的第一链路, 所述方法包括所述第一设备通过所述第一端口接收来自所述 第二设备的业务报文; 所述第一设备通过所述第一端口接收来自所述第二设备 的链路聚合控制协议报文, 所述链路聚合控制协议报文用于配置链路聚合组; 所述第一设备响应所述链路聚合控制协议报文, 保持所述第一端口的转发态以 继续通过所述第一端口接收来自所述第二设备的业务报文, 以及建立所述第一 链路的链路聚合控制协议聚合。 In a second aspect, a method for link aggregation is applied to a communication network, where the communication network includes a first device, the first device includes a first port, and includes a second device connected to the second device by using the first port. a first link, the method comprising: the first device receiving a service packet from the second device by using the first port; the first device receiving, by the first port, the second device The link aggregation control protocol packet, the link aggregation control protocol packet is used to configure a link aggregation group, and the first device responds to the link aggregation control protocol packet to maintain forwarding of the first port. And continuing to receive a service packet from the second device by using the first port, and establishing a link aggregation control protocol aggregation of the first link.
第三方面, 一种网络设备, 应用于通信网络, 包括第一端口、 第二端口、 数据收发器、 聚合器以及通过所述第一端口与第二设备连接的第一链路和通过 所述第二端口与所述第二设备连接的第二链路, 所述第一端口和所述第二端口 耦合到数据收发器, 所述数据收发器与所述聚合器连接, 其中, 所述数据收发 器, 用于通过所述第一端口接收来自第二设备的业务报文, 以及通过所述第二 端口接收所述第二设备发送的链路聚合控制协议报文, 将所述接收的链路聚合 控制协议报文发送给所述聚合器; 所述聚合器, 用于当所述第一链路和所述第 二链路加入链路聚合控制协议聚合组时, 响应所述链路聚合控制协议报文, 保 持所述第一端口处于转发态, 指示所述数据收发器继续接收来自所述第二设备 的业务报文, 以及建立所述第二端口和所述第一端口的链路聚合关系。  In a third aspect, a network device is applied to a communication network, including a first port, a second port, a data transceiver, an aggregator, and a first link connected to the second device by using the first port, and by using the a second port to which the second port is connected, the first port and the second port are coupled to a data transceiver, and the data transceiver is connected to the aggregator, wherein the data is a transceiver, configured to receive a service packet from the second device by using the first port, and receive, by using the second port, a link aggregation control protocol packet sent by the second device, where the received chain is The aggregating control protocol packet is sent to the aggregator; the aggregator is configured to respond to the link aggregation when the first link and the second link join the link aggregation control protocol aggregation group. Controlling the protocol packet, keeping the first port in a forwarding state, instructing the data transceiver to continue receiving service packets from the second device, and establishing the second port and the first Link port aggregation relationship.
在第三方面的第一种可能的实现方式中, 所述聚合器还用于在所述第一链 路和所述第二链路聚合成功后, 设置所述第一端口为半阻塞态, 使得所述第一 设备通过所述第一端口继续接收所述第二设备发送的业务报文。  In a first possible implementation manner of the third aspect, the aggregator is further configured to: after the first link and the second link are successfully aggregated, set the first port to be in a semi-blocking state, The first device is configured to continue to receive the service packet sent by the second device by using the first port.
在第三方面的第二种可能的实现方式中, 所述聚合器还用于当所述第一设 备的第一端口为半阻塞态时, 以及所述第一链路对应的所述第二设备的端口的 状态也为半阻塞态时, 设置所述第一端口为阻塞态, 使得所述第一链路不能转 发业务报文。  In a second possible implementation manner of the third aspect, the aggregator is further configured to: when the first port of the first device is in a semi-blocking state, and the second port corresponding to the first link When the state of the port of the device is also in the semi-blocking state, the first port is set to be in a blocking state, so that the first link cannot forward service packets.
通过以上技术方案, 在网络中配置聚合组时, 尽管双方设备的聚合配置不 是同步操作, 但是由于在协议协商过程中, 设置物理端口正常转发业务报文, 因此, 不会造成业务的中断。 Through the above technical solution, when an aggregation group is configured on the network, the aggregation configuration of the two devices is not It is a synchronous operation. However, the physical port is normally forwarded by the physical port during the protocol negotiation process. Therefore, no service interruption occurs.
第四方面, 一种网络设备, 应用于通信网络, 所述网络设备设有第一端口, 所述第一端口耦合到数据收发器, 所述网络设备和所述第二设备通过所述第一 端口设有第一链路, 所述第一端口处于转发态, 所述网络设备包括数据收发器, 用于接收所述第二设备发送的业务报文或链路聚合控制协议报文; 聚合器, 用 于当所述第一链路加入链路聚合组时, 响应所述链路聚合控制协议, 保持所述 第一链路的第一端口处于转发态, 以继续通过所述第一端口接收来自所述第二 设备的业务报文, 以及建立所述第一链路的链路聚合。  In a fourth aspect, a network device is applied to a communication network, where the network device is configured with a first port, the first port is coupled to a data transceiver, and the network device and the second device pass the first The port is provided with a first link, the first port is in a forwarding state, and the network device includes a data transceiver, configured to receive a service packet or a link aggregation control protocol packet sent by the second device; And when the first link joins the link aggregation group, in response to the link aggregation control protocol, maintaining the first port of the first link in a forwarding state, to continue to receive through the first port. a service message from the second device, and a link aggregation establishing the first link.
第五方面, 一种链路聚合系统, 所述系统包括至少两个网络设备, 所述任 意一网络设备包括如第三方面或第三方面的第一至第二种可能的实现方式中的 任意一种所述的网络设备或如第四方面所述的网络设备。  A fifth aspect, a link aggregation system, where the system includes at least two network devices, where the any one of the first to second possible implementations of the third aspect or the third aspect A network device as described or a network device as described in the fourth aspect.
通过以上技术方案, 在网络中配置聚合组时, 尽管双方设备的聚合配置不 是同步操作, 但是由于在协议协商过程中, 设置物理端口正常转发业务报文, 因此, 不会造成业务的中断。  With the above technical solution, when the aggregation group is configured on the network, the aggregation configuration of the two devices is not synchronous. However, the physical port is forwarded normally during the protocol negotiation. Therefore, no service interruption occurs.
附图说明 DRAWINGS
为了更清楚地说明本发明实施例的技术方案, 下面将对实施例或现有技术 描述中所需要使用的附图作简单地介绍, 显而易见地, 下面描述中的附图仅仅 是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动 的前提下, 还可以根据这些附图获得其他的附图。  In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments or the prior art description will be briefly described below. Obviously, the drawings in the following description are only some of the present invention. For the embodiments, those skilled in the art can obtain other drawings according to the drawings without any creative work.
图 1为现有技术中配置聚合造成业务中断示意图;  FIG. 1 is a schematic diagram of service interruption caused by configuration aggregation in the prior art;
图 2a为本发明一实施例提供的单链路的 LACP聚合配置示意图; 图 2b为本发明一实施例提供的单链路的 LACP聚合方法流程示意图; 图 3a为本发明一实施例提供的单链路扩展成双链路的 LACP聚合示意图; 图 3b为本发明一实施例提供的单链路扩展成双链路的 LACP方法流程示意 图; 2a is a schematic diagram of LACP aggregation configuration of a single link according to an embodiment of the present invention; FIG. 2 is a schematic diagram of a single-link LACP aggregation method according to an embodiment of the present invention; FIG. 3 is a schematic diagram of LACP aggregation of a single link extended to dual links according to an embodiment of the present invention; FIG. The flow chart of the LACP method for extending a single link into a dual link provided by the example;
图 4a为本发明一实施例提供的普通聚合扩展成 LACP聚合示意图; 图 4b为本发明一实施例提供的普通聚合扩展成 LACP聚合方法流程示意 图;  FIG. 4 is a schematic diagram of a generalized aggregation and LACP aggregation according to an embodiment of the present invention; FIG. 4b is a schematic flowchart of a general aggregation and LACP aggregation method according to an embodiment of the present invention;
图 5为本发明一实施例提供的网络设备结构示意图。  FIG. 5 is a schematic structural diagram of a network device according to an embodiment of the present invention.
具体实施例 Specific embodiment
下面将结合本发明实施例中的附图, 对本发明实施例中的技术方案进行清 楚、 完整的描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是 全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没有做出创造 性劳动前提下所获得的所有其他实施例, 都属于本发明保护的范围。  The technical solutions in the embodiments of the present invention will be described in detail with reference to the accompanying drawings. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without the creative work are all within the scope of the present invention.
链路聚合控制协议( Link Aggregation Control Protocol, LACP )^IEEE 802.ad 标准中实现链路聚合的控制协议。 通过该协议, 在一个链路两端的伙伴系统之 间交换信息, 以允许它们的链路聚合控制实例对该链路所属的链路聚合组的标 识达成一致, 移动链路到该链路聚合组, 并按照一个有序的方式来行使它的发 送和接收功能。 LACP协议使用 LACPDU的交互来实现聚合场景下链路的自动选 择, 链路变化的自动感知和重新选择, 以达到自动控制聚合组内各成员链路的 正常工作的目的。  Link Aggregation Control Protocol (LACP)^ The control protocol for implementing link aggregation in the IEEE 802.ad standard. Through this protocol, information is exchanged between partner systems at both ends of a link to allow their link aggregation control instances to agree on the identity of the link aggregation group to which the link belongs, and to move the link to the link aggregation group. And perform its send and receive functions in an orderly manner. The LACP protocol uses the interaction of LACPDUs to implement automatic link selection in the aggregation scenario and automatic sensing and reselection of link changes to automatically control the normal operation of link members in the aggregation group.
协议报文主要包含以下信息: 本端(Actor )和对端(Partner ) 系统优先级、 本端和对端系统标识 ID ( identifier ), 本端和对端的端口操作秘钥 Key、 本端和对 端的端口优先级、 本端和对端的端口 ID、 本端和对端的端口状态。 聚合的双方 根据这些信息, 按照一定的选择算法选择合适的链路, 控制聚合的状态, 被选 中的成员链路可以正常的转发流量, 而未被选中的成员链路将被置为阻塞状态, 不能转发任何流量。 聚合链路的总带宽等于被选中的成员链路的带宽之和, 并 且聚合链路上的流量会按照一定的规则分担到各个选中的成员链路上。 由于 LACPDU是周期性交互, 即聚合的双方每隔一段时间便互发一次协议报文, 所 以当有选中成员链路因为某种原因不能工作时, 链路聚合可以很快的感知到, 并重设链路状态, 设置该链路为阻塞, 流量被重分配给其他选中成员链路。 The protocol packet contains the following information: Actor and partner system priority, local and peer system ID (identifier), local and peer port operation key Key, local and pair The port priority of the port, the port ID of the local end and the peer end, and the port status of the local end and the peer end. Based on the information, the two parties of the aggregation select the appropriate link according to a certain selection algorithm, and control the state of the aggregation. The selected member link can forward the traffic normally, and the unselected member link will be blocked. No traffic can be forwarded. The total bandwidth of the aggregated link is equal to the sum of the bandwidths of the selected member links, and the traffic on the aggregated link is distributed to each selected member link according to certain rules. Because the LACPDUs are periodically exchanged, that is, the two parties send the protocol packets to each other at regular intervals. Therefore, when the selected member links cannot work for some reason, the link aggregation can be quickly detected and reset. Link status, set the link to be blocked, and traffic is reassigned to other selected member links.
由于动态链路聚合是一个完全的事件驱动系统, 它的整个工作过程中的每 个动作都是由事件触发的, 并且这些事件的发生的顺序和时间是随机的, 事件 能以任何顺序、 在任何时刻出现。 通过一种可以称作聚合器的逻辑系统来管理 和控制 LACP协议的运转, 包括端口状态变更、数据转发、 LACP协议报文的发 送、 解析收到的报文、 调整链路状态、 处理各种异常等等。  Since dynamic link aggregation is a complete event-driven system, every action in its entire work process is triggered by events, and the order and time of occurrence of these events are random, and the events can be in any order. Appear at any time. Manage and control the operation of the LACP protocol through a logical system that can be called an aggregator, including port status change, data forwarding, LACP protocol packet transmission, parsing received packets, adjusting link status, and handling various Abnormal and so on.
实施例一  Embodiment 1
本发明实施例提供一种为链路聚合的方法, 应用于通信网络系统中, 该网 络系统包括第一设备 20和第二设备 22 ,这里的第一和第二设备可以是接入设备、 路由设备或交换机或其他所有可以使用链路聚合控制协议的网络设备。 如图 2a 所示, 第一设备 20和第二设备 22之间设置有一条链路 aObO, 所述链路 aObO没 有配置 LACP聚合组, 当前业务正常转发, 即第一设备 20通过端口 a0正常收 发第二设备 22的 LACPDU。  The embodiment of the present invention provides a method for link aggregation, which is applied to a communication network system, where the network system includes a first device 20 and a second device 22, where the first and second devices may be access devices and routes. A device or switch or any other network device that can use the link aggregation control protocol. As shown in FIG. 2a, the first device 20 and the second device 22 are provided with a link aObO. The link a0b0 is not configured with an LACP aggregation group, and the current service is normally forwarded, that is, the first device 20 transmits and receives normally through the port a0. The LACPDU of the second device 22.
现对该单链路的网络配置 LACP聚合组。 配置 LACP聚合组的方式有静态 配置和动态配置, 其中, 所述静态配置即通过静态的配置来指定参与聚合的端 口, 然后依靠聚合链路双方设备之间的 LACP协议交互来动态选择哪些端口转 发业务(端口状态为转发态 Forward ), 哪些端口不能转发业务(端口状态为阻 塞态 Block ), 并且根据链路实时变化来调整策略和重新选择。 本发明实施例以 动态配置 LACP聚合组作为示例, 但本发明并不仅限于所描述的配置过程, 如 图 2a和图 2b所示, 包括: An LACP aggregation group is configured for the single-link network. The configuration of the LACP aggregation group is static and dynamic. The static configuration specifies the end of the aggregation. Port, and then rely on the LACP protocol interaction between the two devices on the aggregation link to dynamically select which port forwarding service (the port state is the forwarding state Forward), which ports cannot forward the service (the port state is the blocking state Block), and the link is real-time according to the link. Change to adjust strategy and re-select. The embodiment of the present invention is to dynamically configure an LACP aggregation group as an example, but the present invention is not limited to the described configuration process, as shown in FIG. 2a and FIG. 2b, including:
当前状态: 配置 LACP聚合组之前, 第一设备 20和第二设备 22是单链路 连接, 没有链路聚合, 业务转发正常, 即第一设备 20的端口 aO处于转发态, 第二设备 22的端口 b0处于转发态。  The current state: Before the LACP aggregation group is configured, the first device 20 and the second device 22 are single-link connections, and no link aggregation is performed, and the service forwarding is normal, that is, the port a0 of the first device 20 is in the forwarding state, and the second device 22 is in the forwarding state. Port b0 is in the forwarding state.
S210, 分别在第一设备 20和第二设备 22配置 LACP协议。  S210. Configure the LACP protocol on the first device 20 and the second device 22, respectively.
配置 LACP协议是通过一种称作聚合器的逻辑系统来实现的。 所述的逻辑 系统是通过软件系统控制硬件系统实现, 对于所述的聚合器的详细介绍可以参 见标准 IEEE Standard 802.ad, 这里不再赘述。  Configuring the LACP protocol is accomplished through a logical system called an aggregator. The logical system is implemented by a software system control hardware system. For a detailed description of the aggregator, reference may be made to the standard IEEE Standard 802.ad, which is not described here.
进一步地, 这里的配置 LACP协议, 即 LACPDU中对第一设备 20的端口 aO的各种参数依然按照标准 IEEE Standard 802.ad的规定进行配置、转发。 LACP 协议 4艮文的结构如下所示:  Further, the configuration of the LACP protocol, that is, the various parameters of the port a0 of the first device 20 in the LACPDU are still configured and forwarded according to the standard IEEE Standard 802.ad. The structure of the LACP protocol is as follows:
地址信息: 目的地址( Destination ), 源地址( Source Address );  Address information: Destination address, Source Address;
长度 /类型 (Length/Type);  Length / Type (Length / Type);
子类型(Subtype);  Subtype (Subtype);
版本号 (Version Number);  Version number (Version Number);
本端的 TLV以及本端信息长度( Actor— Information— Length );  Local TLV and local information length (Actor_Information_Length);
本端信息 (包括: 本端系统 (Actor— System), 本端关键值 (Actor— Key)、 本端 端口优先级 ( Actor Port Priorty )、 本端端口 ( Actor_Port ) 以及本端状态 (Actor— State) ); Local information (including: local system (Actor_System), local key value (Actor_Key), local port priority (Actor Port Priorty), local port (Actor_Port), and local state (Actor_ State) );
保留字段(Reserved );  Reserved field (Reserved);
对端的 TLV以及对端信息长度( Partner— Information— Length );  TLV of the opposite end and the length of the peer information (Partner_Information_Length);
对端信息 (包括: 对端系统 (Partner— System), 对端关键值 (Partner _Key)、 对端端口优先级 ( Partner Port Priorty ), 对端端口 ( Partner _Port ) 以及对端状 态 (Partner State) ); 以及  Peer information (including: Partner-System, Partner _Key, Partner Port Priorty, Partner _Port, and Partner State) ); as well as
保留字段(Reserved );  Reserved field (Reserved);
具体如表 1所示。 The details are shown in Table 1.
OctetsOctets
e^tinat rs Address 6  E^tinat rs Address 6
S me Address 6  S me Address 6
Ler th ;pe 2  Ler th ;pe 2
Su ty e " LACP Su ty e " LACP
rsion tTO er 1 Rsion tTO er 1
LV^ty e Actor <?rm tj n  LV^ty e Actor <?rm tj n
AC— System— Priority AC— System— Priority
A.Gt r ^S stem 6  A.Gt r ^S stem 6
2  2
■2 ■2
ctOf ..P rt 2  ctOf ..P rt 2
Actor ..Slate  Actor ..Slate
TLV"-¾' ^ Partner Snf rm ti n OCTETS iTHi TLV"-3⁄4' ^ Partner Snf rm ti n OCTETS iTHi
FBAM E TRA SMUTE  FBAM E TRA SMUTE
Pai1:n ;r.. ;nfoFmalion.. Length ":≤0 TO P -TO- BOTTO M  Pai1:n ;r.. ;nfoFmalion.. Length ":≤0 TO P -TO- BOTTO M
Part rs©i..S stenn: Part rs©i..S stenn:
Part r^ser...POF1.. P riorit z Part r^ser...POF1.. P riorit z
Partne P r 2 3  Partne P r 2 3
C liectot" ax D C liectot" ax D
Re e ed  Re e ed
TLV...t e Bi'minator 1  TLV...t e Bi'minator 1
Reser ed Reser ed
PCS 4
Figure imgf000010_0001
PCS 4
Figure imgf000010_0001
当第一设备 20的端口 a0成功配置 LACP协议后, 端口 a0使用 LACPDU 向第二设备 22通告本端的系统优先级, 系统 MAC, 端口的优先级, 端口号和 操作秘钥 Key等。 第二设备 22收到该报文后, 根据所存储的端口的信息, 选择 端口 b0与 a0进行相应的 LACP聚合操作, 上述过程是第一设备选择第二设备 参与 LACP聚合的端口的过程, 详情可以参照标准 IEEE Standard 802.ad。 After the port a0 of the first device 20 is successfully configured with the LACP protocol, the port a0 uses the LACPDU to notify the second device 22 of the local system priority, system MAC, port priority, port number, and Operation key Key, etc. After receiving the packet, the second device 22 selects the port b0 and a0 to perform the corresponding LACP aggregation operation according to the information of the stored port. The process is the process in which the first device selects the port where the second device participates in the LACP aggregation. Reference can be made to the standard IEEE Standard 802.ad.
在确定第二设备 22参与 LACP聚合的端口后, 端口 a0和 b0开始 LACP聚 合的协商过程, 过程如下:  After determining that the second device 22 is participating in the LACP aggregation port, the ports a0 and b0 start the LACP aggregation negotiation process as follows:
举例说明, 第一设备 20的物理地址为 00d0.f800.0001 , 系统优先级为 61430 (优先值越大, 优先级越小), 第二设备 22的物理地址为 00d0.f800.0002, 系统 优先级为 3096。 第二设备 22在收到第一设备 20发送的 LACPDU后, 第二设备 22发现自己的系统优先级较高, 于是设置端口 b0, 使其处于 LACP聚合状态。 然后, 第二设备 22向第一设备 20发送 b0端口已处于聚合状态的协议报文, 第 一设备 20收到第二设备 22更新后的 LACP报文, 发现对端的系统优先级比较 高, 并且已经把端口设置为聚合状态了, 于是第一设备 20将端口 a0也设置为 聚合状态。  For example, the physical address of the first device 20 is 00d0.f800.0001, and the system priority is 61430 (the greater the priority value, the smaller the priority), the physical address of the second device 22 is 00d0.f800.0002, and the system priority The level is 3096. After receiving the LACPDU sent by the first device 20, the second device 22 finds that its own system has a higher priority, and then sets the port b0 to be in the LACP aggregation state. Then, the second device 22 sends a protocol packet to the first device 20 that the b0 port is in the aggregated state, and the first device 20 receives the LACP packet that is updated by the second device 22, and finds that the system priority of the peer end is relatively high, and The port has been set to the aggregation state, so the first device 20 also sets the port a0 to the aggregation state.
进一步地, 如表 1所示的 LACP报文的结构中, Actor— State字段(表中的 红框部分)为 1个字节, 8个 bit位, 其中这 8个 bit位分别是:  Further, in the structure of the LACP packet shown in Table 1, the Actor_State field (the red box portion in the table) is 1 byte and 8 bit bits, wherein the 8 bit bits are:
LACP Activity: Yes  LACP Activity: Yes
LACP Timeout: No  LACP Timeout: No
Aggregation: Yes  Aggregation: Yes
Synchronization: No  Synchronization: No
Collecting: No  Collecting: No
Distributing: No  Distributing: No
Defaulted: Yes Expired: No Defaulted: Yes Expired: No
其中, 当 Synchronization位为 Yes 时, 标识两端端口协商成功, 此时, Collecting和 Distributing状态修改为 Yes。 关于上述 8个 bit位的说明, 均为现 有技术, 详情可参见标准 IEEE Standard 802.ad这里不再赘述。  If the Synchronization bit is Yes, the port negotiation is successful. In this case, the Collecting and Distributing states are changed to Yes. The descriptions of the above 8 bit bits are all existing technologies. For details, refer to the standard IEEE Standard 802.ad, which will not be described here.
值得说明的是, 本发明实施例中, 第一设备 a0如何选择第二设备的具体哪 个端口的方式, 并不局限于上述的举例中。 关于第一设备和第二设备如何选择 哪些端口参与聚合组的过程,是现有技术,具体请参照标准 IEEE Standard 802.ad 的规定。  It should be noted that, in the embodiment of the present invention, the manner in which the first device a0 selects which port of the second device is specific is not limited to the above example. The process of how the first device and the second device select which ports to participate in the aggregation group is a prior art, and please refer to the standard IEEE Standard 802.ad.
在本发明实施例的本步骤中, 在配置 LACP协议时, 对第一设备 20的端口 a0进行设置, 使得物理端口 a0的状态仍为转发态, 能够正常转发业务报文, 使 得业务不会中断。 这里的设置既可以通过软件系统实现, 也可以通过硬件系统 实现, 也可以是自动实现, 还可以是手动实现, 本发明实施例并不限定某种具 体实现方式。  In this step of the embodiment of the present invention, when the LACP protocol is configured, the port a0 of the first device 20 is set, so that the state of the physical port a0 is still in the forwarding state, and the service packet can be forwarded normally, so that the service is not interrupted. . The configuration herein may be implemented by a software system, or may be implemented by a hardware system, or may be implemented automatically, or may be manually implemented. The embodiment of the present invention does not limit a specific implementation manner.
值得说明的是, 所述转发态是指端口既能接收业务报文, 也能发送业务报 文; 所谓阻塞态是指只能转发 LACP协议报文, 不能转发业务报文。  It is to be noted that the forwarding state is that the port can receive both the service packet and the service packet. The blocking state can only forward the LACP protocol packet and cannot forward the service packet.
S220, 第一设备和第二设备 LACP协议协商成功, 第一设备将转发态下发 到物理端口 a0。  S220: The first device and the second device negotiate the LACP protocol successfully, and the first device sends the forwarding state to the physical port a0.
在本实施例中, LACP协商成功后, 第一设备无需更改物理端口状态, 因为 聚合组的端口的状态在 S210中已经设置为转发态 (Forward ), 此时, 业务报文 正常转发。  In this embodiment, after the LACP negotiation succeeds, the first device does not need to change the state of the physical port, because the state of the port of the aggregation group is set to the forwarding state (Forward) in S210, and the service packet is forwarded normally.
本发明实施例釆用的方案, 可以实现在配置 LACP聚合组时, 解决业务中 断的问题, 实现了链路状态发生变化时业务报文的无缝切换。 实施例二 The solution used in the embodiment of the present invention can solve the problem of service interruption when the LACP aggregation group is configured, and implement seamless handover of service packets when the link state changes. Embodiment 2
本发明实施例二提供了一种配置 LACP聚合组的方法, 应用于将单链路扩 展成双链路的 LACP聚合组, 在配置 LACP聚合组之前, 设备 30和设备 32是 单链路连接, 没有普通聚合或者 LACP聚合, 业务转发正常, 即设备 30的端口 aO为转发态, 设备 32的端口 bO为转发态, 如图 3a和图 3b所示, 包括:  The second embodiment of the present invention provides a method for configuring an LACP aggregation group, which is applied to a single-link extension to a dual-link LACP aggregation group. Before the LACP aggregation group is configured, the device 30 and the device 32 are single-link connections. The traffic forwarding is normal, that is, the service forwarding is normal, that is, the port a0 of the device 30 is in the forwarding state, and the port b0 of the device 32 is in the forwarding state, as shown in FIG. 3a and FIG. 3b, including:
S410, 分别在设备 30和设备 32上配置 LACP协议;  S410. Configure the LACP protocol on the device 30 and the device 32, respectively.
在本发明实施例中, 可以先在设备 30上配置 LACP协议, 也可以先在设备 32上配置 LACP协议, 还可以同时在设备 30和设备 32上配置 LACP协议, 本 发明实施例并不限于配置哪个设备的顺序。 以先在设备 30上配置 LACP协议为 例, 设备 30配置好 LACP协议后, 发送 LACP协议报文给设备 32, 设备 32根 据所存储的端口的信息, 选择端口 bO与 aO进行相应的 LACP聚合操作, 选择 端口 bl和 al参与同端口 bO和端口 aO的 LACP聚合。  In the embodiment of the present invention, the LACP protocol may be configured on the device 30, or the LACP protocol may be configured on the device 32, and the LACP protocol may be configured on the device 30 and the device 32. The embodiment of the present invention is not limited to the configuration. Which device is in order. After the LACP protocol is configured on the device 30, the device 30 is configured with the LACP protocol, and then sends the LACP protocol packet to the device 32. The device 32 selects the port bO and aO to perform the LACP aggregation operation according to the information of the stored port. Select port bl and a1 to participate in LACP aggregation on the same port bO and port aO.
进一步地, 在上述选择哪个端口参与 LACP聚合的交互过程中, 设备 30保 持端口 aO的转发态, 使得在 LACP聚合组建立过程中, 仍然可以继续接收来自 设备 32的业务报文, 即聚合组内至少有一条链路处于转发态, 不受 LACP协议 的影响, 因此配置过程中业务不中断, 业务依然通过 aO和 bO端口进行转发或 者通过 aO和 b0、 al和 bl两条链路转发。  Further, in the interaction process of selecting the port to participate in the LACP aggregation, the device 30 maintains the forwarding state of the port a0, so that the service packet from the device 32 can still be continuously received during the establishment of the LACP aggregation group, that is, in the aggregation group. At least one link is in the forwarding state and is not affected by the LACP protocol. Therefore, services are not interrupted during the configuration process. The service is still forwarded through the aO and bO ports or forwarded through the ao and b0, al, and bl links.
S320, 设备 30和设备 32的 LACP协议协商过程;  S320, LACP negotiation process of device 30 and device 32;
其中, 此时设备 30和设备 32之间有两条可用的链路, 故业务报文按照聚 合原理选路转发, 此时设备 30和设备 32的 LACP协议还未协商成功, 则不影 响业务转发, 因为 aO和 bO是可以转发业务报文。  At this time, there are two available links between the device 30 and the device 32. Therefore, the service packets are forwarded according to the aggregation principle. The LACP protocol of the device 30 and the device 32 have not been negotiated successfully, and the service forwarding is not affected. Because aO and bO are capable of forwarding service messages.
S330, 当设备 30和设备 32的 LACP协商成功, 设置聚合组内所有物理端 口状态为转发态; S330, when the LACP negotiation between the device 30 and the device 32 is successful, all physical terminals in the aggregation group are set. The port state is a forwarding state;
其中, 设备 30和设备 32的 LACP协商成功, 表示聚合组内至少有一条链 路处于收集和分发状态, 即 Collecting和 Distributing状态均为 Yes, 那么将聚合 组内所有物理端口状态设置为转发态。  The LACP negotiation between the device 30 and the device 32 is successful, indicating that at least one link in the aggregation group is in the collection and distribution state, that is, the aggregation and distributing states are Yes. Then, all the physical port states in the aggregation group are set to the forwarding state.
S340, 如果设备 30和设备 32的 LACP协商的结果是阻塞链路 aObO, 使得 链路 albl为转发链路, 那么协商结束后, 第一设备将 a0端口设置为半阻塞态, 随后, 第二设备将 b0端口设置为半阻塞态, 直到 a0和 b0都为半阻塞态时, 第 一设备和第二设备分别将 a0和 b0设置为阻塞态。  S340, if the LACP negotiation between the device 30 and the device 32 is to block the link aObO, so that the link alb1 is a forwarding link, after the negotiation ends, the first device sets the a0 port to a semi-blocking state, and then, the second device The b0 port is set to a semi-blocking state, and when both a0 and b0 are in a semi-blocking state, the first device and the second device respectively set a0 and b0 to a blocking state.
具体地, 两个端口 a0和 b0的设备是分别设置的, 会存在时间差, 与步骤 S210描述的相同, 如果第二设备 22发现自己的系统优先级较高, 于是设置端口 b0为半阻塞态, 发送 LACP报文至第一设备 20, 第一设备 30收到第二设备 32 更新后的 LACP报文, 发现对端的系统优先级高, 并且已经把端口设置为半阻 塞态, 于是设置端口为半阻塞态, 再发送 LACP报文至第二设备, 此时, 第二 设备发现 a0和 b0都为半阻塞态后, 设置 b0为阻塞态, 重复上述过程, 直到端 口 a0和 b0均为阻塞态。  Specifically, the devices of the two ports a0 and b0 are respectively set, and there is a time difference, which is the same as that described in step S210. If the second device 22 finds that its own system has a higher priority, the port b0 is set to a semi-blocking state. Sending the LACP packet to the first device 20, the first device 30 receives the LACP packet updated by the second device 32, and finds that the system priority of the peer device is high, and the port has been set to a semi-blocking state, so the port is set to half. In the blocking state, the LACP packet is sent to the second device. After the second device finds that both a0 and b0 are in the semi-blocking state, set b0 to the blocking state. Repeat the above process until the ports a0 and b0 are in the blocking state.
进一步地, 如表 1所示, 我们使用其中的 Actor— State后的保留字段(表中 红框部分) 的第一个 bit位来表示半阻塞态, 发送报文里该 bit位值为 1表示本 端端口已经处于半阻塞态, 为 0表示不是半阻塞态, 这里的半阻塞态用于标识 端口只能接受业务报文, 不能发送业务报文。  Further, as shown in Table 1, we use the first bit of the reserved field (the red box part of the table) after the Actor_State to indicate the semi-blocking state, and the bit value of the transmitted message is 1 The local port is in the semi-blocking state. If the value is 0, the port is not in the semi-blocking state. The semi-blocking state is used to identify that the port can only receive service packets and cannot send service packets.
通过釆用以上技术方案, 在将单链路扩展成双链路的 LACP聚合组时, 解 决业务中断的问题。 如果配置失败, 由于 a0端口被设置为半阻塞态, 业务报文 只能接收, 不能发送, 这样使得从 b0端口发送的业务报文不会丟失, 实现了链 路状态发生变化时业务报文的无缝切换。 By using the above technical solution, the problem of service interruption is solved when the single link is extended to the dual-link LACP aggregation group. If the configuration fails, the service packet can only be received and cannot be sent because the port a0 is set to the semi-blocking state. Therefore, the service packets sent from the port b0 are not lost. Seamless switching of service packets when the status of the road changes.
实施例三  Embodiment 3
本发明实施例还提供了一种配置 LACP聚合组的方法, 应用于普通聚合扩 展成 LACP聚合, 如图 4a和图 4b所示, 配置 LACP聚合之前, 两台设备分别 为设备 40和设备 42 ,设备 40和设备 42之间通过两条链路 aObO以及 albl连接, 并且所述链路 aObO和链路 albl是普通聚合组, 端口 a0、 b0、 al、 bl都处于转 发态, 包括:  The embodiment of the present invention further provides a method for configuring an LACP aggregation group, which is applied to an aggregation of an ordinary aggregation to an LACP. As shown in FIG. 4a and FIG. 4b, before the LACP aggregation is configured, the two devices are respectively the device 40 and the device 42. The device 40 and the device 42 are connected by two links aObO and alb1, and the link aObO and the link altb are in the normal aggregation group, and the ports a0, b0, a, and bl are all in the forwarding state, including:
S410, 所述设备 40和设备 42通过配置 LACP, 实现设备 50和设备 52之间 的两条链路的普通的聚合状态调整为 LACP的聚合状态。  S410, the device 40 and the device 42 configure the LACP to adjust the normal aggregation state of the two links between the device 50 and the device 52 to the aggregation state of the LACP.
在本步骤中, 可以通过将设备 40或者设备 42的普通聚合的聚合器升级或 添加一个 LACP聚合器来实现, 在 LACP协议协商成功之前, 并不影响聚合器 的运作, 不影响物理端口的实际转发, 具体的 LACP协议配置过程同步骤 S210 的描述, 这里不再赘述。  In this step, the aggregation of the general aggregation of the device 40 or the device 42 can be implemented by adding an LACP aggregator. Before the negotiation of the LACP protocol is successful, the operation of the aggregator is not affected, and the actual physical port is not affected. The process of configuring the LACP protocol is the same as that of step S210, and is not described here.
S420 , 设备 40和设备 42LACP协商过程;  S420, device 40 and device 42LACP negotiation process;
在本步骤中, 协商的具体过程可以参照 S320步骤的描述。  In this step, the specific process of negotiation can refer to the description of step S320.
S430, 所述两台设备之间的 LACP协商成功, 此时, 至少有一条链路的收 集和分发状态为是, 设置所述链路的物理端口状态为转发态, 业务转发正常。  S430, the LACP negotiation between the two devices is successful. In this case, the status of the collection and distribution of the at least one link is YES, and the physical port status of the link is set to the forwarding state, and the service forwarding is normal.
S530, 如果 LACP协议协商的结果是一个链路处于转发态, 另一个链路处 于阻塞态的话, 将链路阻塞的端口设置为半阻塞态, 直到双方端口都为半阻塞 态时, 将双方端口设置为阻塞态;  S530. If the result of the LACP negotiation is that one link is in the forwarding state and the other link is in the blocking state, the port blocked by the link is set to a semi-blocking state. When both ports are in a semi-blocking state, the two ports are Set to the blocking state;
在本步骤中, 如表 1所示, 我们使用其中的 Actor— State后的保留字段(表 中红框部分) 的第一个 bit位来表示半阻塞态, 发送报文里该 bit位值为 1表示 本端端口已经处于半阻塞态, 为 0表示不是半阻塞态。 这里的半阻塞态用于标 识端口只能接受业务报文, 不能发送业务报文。 当本端端口已经是半阻塞态时, 收到对端设备的报文通知对端也是半阻塞态, 则就将本端的端口设置成阻塞态。 In this step, as shown in Table 1, we use the first bit of the reserved field (red box in the table) after the Actor_State to represent the semi-blocking state, and the bit value in the transmitted message is 1 means The local port is already in a semi-blocking state. A value of 0 indicates that it is not a semi-blocking state. The semi-blocking state is used to identify that a port can only accept service packets and cannot send service packets. When the local port is in the semi-blocking state, if the packet from the peer device is notified that the peer is also in the semi-blocking state, the local port is set to the blocking state.
通过釆用以上技术方案, 在将普通聚合扩展成 LACP聚合时, 解决业务中 断的问题。 如果配置失败, 由于 a0端口被设置为半阻塞态, 业务报文只能接收, 不能发送, 这样使得从 b0端口发送的业务报文不会丟失, 实现了链路状态发生 变化时业务 >¾文的无缝切换。  By using the above technical solution, the problem of business interruption is solved when the ordinary aggregation is expanded into LACP aggregation. If the configuration is unsuccessful, the service packet can only be received and cannot be sent. Therefore, the service packets sent from the port b0 are not lost. Seamless switching.
实施例四  Embodiment 4
本发明实施例还提供了一种网络设备, 可以是接入设备、 路由设备或者交 换机或其他所有可以使用链路聚合控制协议的网络设备等。 其中接入设备可以 是 DSLAM( Digital Subscriber Line Access Multiplexer,数字用户线接入复用器)、 OLT( Optical Line Terminal,光线路终端)、或者 MSAN( Multiservice Access Node, 多业务接入节点)等。  The embodiment of the present invention further provides a network device, which may be an access device, a routing device, or a switch, or any other network device that can use a link aggregation control protocol. The access device may be a DSLAM (Digital Subscriber Line Access Multiplexer), an OLT (Optical Line Terminal), or an MSAN (Multiservice Access Node).
如图 5所示, 所提供的网络设备 50通过多条链路与设备 60相连, 多条链 路形成聚合组。 所述网络设备 50设有第一端口 a0和第二端口 al , 所述第一端 口 a0和第二端口 al耦合到数据收发器,所述网络设备通过所述第一端口与第二 设备连接有第一链路, 所述网络设备通过第二端口与所述第二设备连接有第二 链路, 所述第一端口处于转发态。  As shown in FIG. 5, the provided network device 50 is connected to the device 60 through a plurality of links, and the plurality of links form an aggregation group. The network device 50 is provided with a first port a0 and a second port a1, the first port a0 and the second port a1 are coupled to a data transceiver, and the network device is connected to the second device through the first port The first link, the network device is connected to the second device by using a second port, where the first port is in a forwarding state.
其中, 数据收发器 510, 通过所述的多个端口形成多条链路, 网络设备 50 通过所述多条链路连接设备 60。  The data transceiver 510 forms a plurality of links through the plurality of ports, and the network device 50 connects the devices 60 through the plurality of links.
其中,数据收发器 510可以用于接收对端 60发送的 LACP报文和业务报文, 也可以用于发送 LACP报文至设备 60和业务报文。 聚合器 520, 用于设置所述网络设备的物理端口为转发态、 阻塞态或半阻塞 态。 The data transceiver 510 can be used to receive the LACP packet and the service packet sent by the peer end 60, and can also be used to send the LACP packet to the device 60 and the service packet. The aggregator 520 is configured to set the physical port of the network device to be in a forwarding state, a blocking state, or a semi-blocking state.
其中, 聚合器 520在配置 LACP协议时, 将所述多条链路对应的网络设备 50 的物理端口设置为转发态。 在 LACP协议协商成功时, 不改变网络设备 50 的物理端口, 即网络设备 50的物理端口为转发态。 在 LACP协议协商结果为阻 塞其中一条链路时, 将所述被阻塞的链路对应的网络设备 50的物理端口设置为 半阻塞态, 直到网络设备 50和设备 60的物理端口均为半阻塞态时, 将网络设 备 50的物理端口设置为阻塞态。 这里的配置 LACP协议可以通过网管系统或命 令行方式进行。  The aggregator 520 sets the physical port of the network device 50 corresponding to the multiple links to the forwarding state when the LACP protocol is configured. When the LACP negotiation is successful, the physical port of the network device 50 is not changed, that is, the physical port of the network device 50 is in the forwarding state. When the LACP negotiation result is that one of the links is blocked, the physical port of the network device 50 corresponding to the blocked link is set to a semi-blocking state until the physical ports of the network device 50 and the device 60 are semi-blocking. When the physical port of the network device 50 is set to the blocking state. The configuration of the LACP protocol can be performed through the network management system or the command line.
进一步地,聚合器 520具体可以包括转发逻辑 521和 CPU( Central Processing Unit, 中央聚合器) 522,  Further, the aggregator 520 may specifically include a forwarding logic 521 and a CPU (Central Processing Unit) 522.
转发逻辑 521用于配置 LACP协议报文, 包括获取对端发送的 LACP报文 中的地址信息、 类型信息、 版本号、 对端设备信息等;  The forwarding logic 521 is configured to configure the LACP protocol packet, including obtaining the address information, the type information, the version number, the peer device information, and the like in the LACP packet sent by the peer end.
CPU522可用于对事件进行监控以及控制转发逻辑 521发送 LACP协议报 文, CPU监控的事件可以包括物理端口的状态、 聚合组设置成功、 聚合组设置 失败、 上电或者其他设定的事件等。  The CPU 522 can be used to monitor events and control the forwarding logic 521 to send LACP protocol messages. The events monitored by the CPU can include the status of the physical port, the aggregation group setting success, the aggregation group setting failure, the power-on or other set events.
其中, 转发态标识该物理端口可以发送和接收协议报文和业务报文; 阻塞 态标识该物理端口只可以发送和接收协议报文, 不能接收和发送业务报文; 半 阻塞态标识该端口可以发送和接收协议报文, 接收业务报文, 不能发送协议报 文。 通常的, 聚合器 520釆用 CPU522来设置端口的状态, 可以釆用 Forward 标识转发态, Block标识阻塞态, Half-Block标识半阻塞态。  The forwarding state identifies that the physical port can send and receive protocol packets and service packets. The blocked state identifies that the physical port can only send and receive protocol packets, and cannot receive and send service packets. The semi-blocking state identifies the port. Sends and receives protocol packets, receives service packets, and cannot send protocol packets. Generally, the aggregator 520 uses the CPU 522 to set the state of the port, and can use the Forward flag to indicate the forwarding state, the Block flag to block the state, and the Half-Block to identify the semi-blocking state.
CPU522监控到 LACP聚合组配置成功时,即检测到 LACP报文中的收集和 分发态为是时, 设置物理端口为转发态。 CPU522监控到聚合组要阻塞某一条链 路时, 即检测到 LACP报文中的收集和分发态为否时, 设置网络设备 50的物理 端口为半阻塞态, 发送 LACP协议报文至第二设备 52。 第二设备 52的 CPU同 样将其对应的端口设置为半阻塞态, 直到两端端口的状态都为半阻塞态时, 设 置端口的状态为阻塞态。 When the CPU 522 detects that the LACP aggregation group is configured successfully, the CPU 522 detects the collection and collection of the LACP packets. When the distribution status is yes, set the physical port to the forwarding state. When the CPU 522 monitors that the aggregation group is to block a certain link, that is, when the collection and distribution status of the LACP packet is detected, the physical port of the network device 50 is set to a semi-blocking state, and the LACP protocol packet is sent to the second device. 52. The CPU of the second device 52 also sets its corresponding port to a semi-blocking state. When the states of the ports on both ends are in a semi-blocking state, the state of the port is set to a blocking state.
实施例五  Embodiment 5
本发明实施例还提供了一种链路协商系统, 如图 5 所示, 所述系统可以为 LACP系统, 所述系统包括至少两个网络设备, 所述任意一网络设备的结构可以 参见图 5以及与图 5对应的实施例四的描述, 这里简单介绍该系统的结构如下: 包括第一网络设备 50和第二网络设备 60, 第一网络设备 50包含至少一个端口 a0, 第二网络设备至少包含一个端口 b0 , 端口 a0和端口 b0之间通过链路相连, 包括:  The embodiment of the present invention further provides a link negotiation system. As shown in FIG. 5, the system may be an LACP system, where the system includes at least two network devices, and the structure of any one of the network devices may be referred to FIG. And the description of Embodiment 4 corresponding to FIG. 5, the structure of the system is briefly described as follows: comprising a first network device 50 and a second network device 60, the first network device 50 includes at least one port a0, and the second network device at least Contains a port b0, which is connected by a link between port a0 and port b0, including:
第一网络设备 50包括数据收发器 510和聚合器 520, 聚合器 620在第一网 络设备 50发送 LACP协议之前, 预先设置第一网络设备 50的物理端口 a0的状 态为转发态。 这里的设置可以通过软件指令实现, 也可以通过硬件指令实现, 还可以通过软件和硬件的结合实现, 本发明不限于上述任一种实现方式。  The first network device 50 includes a data transceiver 510 and an aggregator 520. The aggregator 620 pre-sets the state of the physical port a0 of the first network device 50 to a forwarding state before the first network device 50 transmits the LACP protocol. The setting herein may be implemented by a software instruction, may also be implemented by a hardware instruction, or may be implemented by a combination of software and hardware, and the present invention is not limited to any of the above implementation manners.
第一网络设备 50向第二网络设备 60发送 LACP协议报文, 报文中携带第 一网络设备 50的端口 a0的物理地址、 类型、 长度、 版本号、 设备信息如端口 a0的优先级、 状态、 关键值等信息;  The first network device 50 sends an LACP protocol packet to the second network device 60, where the packet carries the physical address, type, length, version number, and device information of the port a0 of the first network device 50, such as the priority and status of the port a0. , key values and other information;
第二网络设备 60向第一网络设备 50发送 LACP协议报文, 报文中携带第 二网络设备 60的端口 b0的物理地址、 类型、 长度、 版本号、 设备信息如端口 B0的优先级、 状态、 关键值等信息; 第一网络设备 50和第二网络设备 60进行 LACP协议协商, 协商成功时, 不用更改物理端口 a0和 b0的状态,协商失败时,设置物理端口 a0为半阻塞态。 此时, a0仍可以接收物理端口 b0发送的业务 ^艮文, 然后设置物理端口 b0为半 阻塞态, 此时, a0和 b0经过协商发现两端端口均为半阻塞态, 此时设置 a0和 b0为阻塞态。 The second network device 60 sends an LACP protocol packet to the first network device 50, where the packet carries the physical address, type, length, version number, and device information of the port b0 of the second network device 60, such as the priority and status of the port B0. , key values and other information; The first network device 50 and the second network device 60 perform the LACP protocol negotiation. When the negotiation succeeds, the state of the physical ports a0 and b0 is not changed. When the negotiation fails, the physical port a0 is set to a semi-blocking state. At this time, a0 can still receive the service packet sent by physical port b0, and then set physical port b0 to be semi-blocking state. At this time, a0 and b0 negotiate that both ports are half-blocked, and a0 and B0 is a blocked state.
本发明实施例釆用的方案, 可以实现在配置 LACP聚合组时, 解决业务中 断的问题。 如果协商失败或者协商结果为阻塞一条链路, 由于 a0端口被设置为 半阻塞态后, 对于第一网络设备 50而言, 报文只能接收, 不能发送, 这样使得 从 b0端口发送的业务报文不会丟失, 实现了链路状态发生变化时业务报文的无 缝切换。  The solution used in the embodiment of the present invention can solve the problem of service interruption when configuring a LACP aggregation group. If the negotiation fails or the result of the negotiation is to block a link, since the port a0 is set to the semi-blocking state, the packet can only be received and cannot be sent for the first network device 50, so that the service packet sent from the port b0 is sent. The text is not lost, and the service packets are seamlessly switched when the link status changes.
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤 是可以通过程序来指令相关的硬件来完成, 该程序可以存储于计算机可读存储 介质中,存储介质可以包括: 闪存盘、只读存储器(Read-Only Memory , ROM )、 随机存取器 ( Random Access Memory, RAM ), 磁盘或光盘等。  A person skilled in the art can understand that all or part of the various methods of the above embodiments can be completed by a program to instruct related hardware, and the program can be stored in a computer readable storage medium, and the storage medium can include: A disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
以上对本发明实施例所提供的数据处理方法、 设备和系统进行了详细介绍, 一般技术人员, 依据本发明的思想, 在具体实施方式及应用范围上均会有改变 之处, 综上所述, 本说明书内容不应理解为对本发明的限制。  The data processing method, device, and system provided by the embodiments of the present invention are described in detail above. The general technical personnel, according to the idea of the present invention, may have changes in specific implementation manners and application scopes. The contents of this specification are not to be construed as limiting the invention.

Claims

权利要求书 claims
1、 一种链路聚合的方法, 应用于通信网络, 其特征在于, 所述通信网络包 括第一设备, 所述第一设备包括第一端口和第二端口, 以及包括通过所述第一 端口与第二设备连接的第一链路和通过所述第二端口与所述第二设备连接的第 二链路, 所述第一端口处于转发态, 所述方法包括: 1. A method of link aggregation, applied to a communication network, characterized in that the communication network includes a first device, the first device includes a first port and a second port, and includes: through the first port a first link connected to the second device and a second link connected to the second device through the second port, the first port being in a forwarding state, and the method includes:
所述第一设备通过所述第一端口接收来自所述第二设备的业务报文; 所述第一设备通过所述第二端口接收来自所述第二设备的链路聚合控制协 议报文, 所述链路聚合控制协议报文用于配置链路聚合控制协议聚合组; The first device receives a service message from the second device through the first port; the first device receives a link aggregation control protocol message from the second device through the second port, The link aggregation control protocol message is used to configure a link aggregation control protocol aggregation group;
所述第一设备响应所述链路聚合控制协议报文, 保持所述第一端口的转发 态以继续通过所述第一端口接收来自所述第二设备的业务报文, 以及建立所述 第二端口和所述第一端口的链路聚合关系, 使得所述第一链路和第二链路的实 现链路聚合。 The first device responds to the link aggregation control protocol message, maintains the forwarding state of the first port to continue receiving service messages from the second device through the first port, and establishes the third The link aggregation relationship between the two ports and the first port enables link aggregation of the first link and the second link.
2、 如权利要求 1所述的方法, 其特征在于, 所述方法还包括: 2. The method of claim 1, characterized in that, the method further includes:
在所述第一链路和所述第二链路的链路聚合成功后, 设置所述第一端口为 半阻塞态, 使得所述第一设备通过所述第一端口继续接收所述第二设备发送的 业务报文。 After link aggregation of the first link and the second link is successful, the first port is set to a semi-blocked state, so that the first device continues to receive the second link through the first port. Service packets sent by the device.
3、 如权利要求 2所述的方法, 其特征在于, 所述方法进一步包括: 当所述第一设备的第一端口为半阻塞态时, 以及所述第一链路对应的所述 第二设备的端口的状态也为半阻塞态时, 设置所述第一端口为阻塞态, 使得所 述第一链路不能转发业务报文。 3. The method of claim 2, wherein the method further includes: when the first port of the first device is in a semi-blocked state, and the second port corresponding to the first link When the state of the port of the device is also in the semi-blocked state, the first port is set to the blocked state so that the first link cannot forward service packets.
4、 一种链路聚合的方法, 应用于通信网络, 其特征在于, 所述通信网络包 括第一设备, 所述第一设备包括第一端口, 以及包括通过所述第一端口与第二 设备连接的第一链路, 所述方法包括: 4. A method of link aggregation, applied to a communication network, characterized in that the communication network includes a first device, the first device includes a first port, and includes communicating with a second device through the first port. The first link to which the device is connected, the method includes:
所述第一设备通过所述第一端口接收来自所述第二设备的业务报文; 所述第一设备通过所述第一端口接收来自所述第二设备的链路聚合控制协 议报文, 所述链路聚合控制协议报文用于配置链路聚合组; The first device receives a service message from the second device through the first port; the first device receives a link aggregation control protocol message from the second device through the first port, The link aggregation control protocol message is used to configure a link aggregation group;
所述第一设备响应所述链路聚合控制协议报文, 保持所述第一端口的转发 态以继续通过所述第一端口接收来自所述第二设备的业务报文, 以及建立所述 第一链路的链路聚合控制协议聚合。 The first device responds to the link aggregation control protocol message, maintains the forwarding state of the first port to continue receiving service messages from the second device through the first port, and establishes the third Link aggregation control protocol aggregation of a link.
5、 一种网络设备, 其特征在于, 所述网络设备包括: 5. A network device, characterized in that the network device includes:
第一端口、 第二端口、 数据收发器、 聚合器以及通过所述第一端口与第二 设备连接的第一链路和通过所述第二端口与所述第二设备连接的第二链路, 所 述第一端口和所述第二端口耦合到数据收发器, 所述数据收发器与所述聚合器 连接, 其中, a first port, a second port, a data transceiver, an aggregator, a first link connected to a second device through the first port, and a second link connected to the second device through the second port , the first port and the second port are coupled to a data transceiver, the data transceiver is connected to the aggregator, wherein,
所述数据收发器, 用于通过所述第一端口接收来自第二设备的业务报文, 以及 The data transceiver is used to receive service packets from the second device through the first port, and
通过所述第二端口接收所述第二设备发送的链路聚合控制协议报文, 将所 述接收的链路聚合控制协议报文发送给所述聚合器; Receive the link aggregation control protocol message sent by the second device through the second port, and send the received link aggregation control protocol message to the aggregator;
所述聚合器, 用于当所述第一链路和所述第二链路加入链路聚合控制协议 聚合组时, 响应所述链路聚合控制协议报文, 保持所述第一端口处于转发态, 指示所述数据收发器继续接收来自所述第二设备的业务报文, 以及建立所述第 二端口和所述第一端口的链路聚合关系。 The aggregator is configured to respond to the link aggregation control protocol message and keep the first port in forwarding mode when the first link and the second link join the link aggregation control protocol aggregation group. state, instructing the data transceiver to continue receiving service packets from the second device, and to establish a link aggregation relationship between the second port and the first port.
6、 如权利要求 5所述的网络设备, 其特征在于, 所述聚合器还用于在所述 第一链路和所述第二链路聚合成功后, 设置所述第一端口为半阻塞态, 使得所 述第一设备通过所述第一端口继续接收所述第二设备发送的业务报文。 6. The network device according to claim 5, wherein the aggregator is further configured to set the first port to semi-blocking after the aggregation of the first link and the second link is successful. state, making everything The first device continues to receive service packets sent by the second device through the first port.
7、 如权利要求 5所述的网络设备, 其特征在于, 所述聚合器还用于当所述 第一设备的第一端口为半阻塞态时, 以及所述第一链路对应的所述第二设备的 端口的状态也为半阻塞态时, 设置所述第一端口为阻塞态, 使得所述第一链路 不能转发业务报文。 7. The network device according to claim 5, wherein the aggregator is further configured to: when the first port of the first device is in a semi-blocked state, and the first port corresponding to the first link When the state of the port of the second device is also in the semi-blocked state, the first port is set to the blocked state so that the first link cannot forward service packets.
8、 一种网络设备, 所述网络设备设有第一端口, 所述第一端口耦合到数据 收发器, 所述网络设备和所述第二设备通过所述第一端口设有第一链路, 所述 第一端口处于转发态, 所述网络设备包括: 8. A network device, the network device is provided with a first port, the first port is coupled to a data transceiver, the network device and the second device are provided with a first link through the first port , the first port is in the forwarding state, and the network device includes:
数据收发器, 用于接收所述第二设备发送的业务报文或链路聚合控制协议 报文; A data transceiver, configured to receive service messages or link aggregation control protocol messages sent by the second device;
聚合器, 用于当所述第一链路加入链路聚合组时, 响应所述链路聚合控制 协议, 保持所述第一链路的第一端口处于转发态, 以继续通过所述第一端口接 收来自所述第二设备的业务报文, 以及建立所述第一链路的链路聚合。 an aggregator, configured to respond to the link aggregation control protocol when the first link joins the link aggregation group, and keep the first port of the first link in the forwarding state to continue to pass the first link. The port receives the service packet from the second device and establishes link aggregation of the first link.
9、 一种链路协商系统, 所述系统包括至少两个网络设备, 其特征在于, 所 述任意一网络设备包括如权利要求 5~7任意一权利要求所述的网络设备或如权 利要求 8所述的网络设备。 9. A link negotiation system, the system includes at least two network devices, characterized in that any one of the network devices includes the network device as described in any one of claims 5 to 7 or the network device as claimed in claim 8 The network equipment described.
PCT/CN2013/086985 2013-11-12 2013-11-12 Link aggregation method, apparatus, and system WO2015070383A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2013/086985 WO2015070383A1 (en) 2013-11-12 2013-11-12 Link aggregation method, apparatus, and system
CN201380002380.6A CN105122737A (en) 2013-11-12 2013-11-12 Link aggregation method, apparatus, and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2013/086985 WO2015070383A1 (en) 2013-11-12 2013-11-12 Link aggregation method, apparatus, and system

Publications (1)

Publication Number Publication Date
WO2015070383A1 true WO2015070383A1 (en) 2015-05-21

Family

ID=53056606

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/086985 WO2015070383A1 (en) 2013-11-12 2013-11-12 Link aggregation method, apparatus, and system

Country Status (2)

Country Link
CN (1) CN105122737A (en)
WO (1) WO2015070383A1 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108173691A (en) * 2017-12-27 2018-06-15 杭州迪普科技股份有限公司 A kind of method and device of cross-equipment aggregation
CN108848029A (en) * 2018-06-12 2018-11-20 迈普通信技术股份有限公司 Link aggregation method, apparatus and readable storage medium storing program for executing
EP3633931A4 (en) * 2017-06-28 2020-07-01 Huawei Technologies Co., Ltd. Method, device, and system for implementing mux machine
US11398976B2 (en) * 2017-06-29 2022-07-26 Huawei Technologies Co., Ltd. Method, device, and system for implementing MUX machine
US11470649B2 (en) * 2019-02-22 2022-10-11 Qualcomm Incorporated Transmission gap configuration for random access messages
CN115996191A (en) * 2022-11-21 2023-04-21 迈普通信技术股份有限公司 Port state control method, device, network communication equipment and storage medium

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107566299A (en) * 2016-06-30 2018-01-09 中兴通讯股份有限公司 A kind of dynamic link aggregation implementation method and device
CN110912837B (en) * 2019-11-07 2021-09-21 杭州迪普科技股份有限公司 VSM system-based main/standby switching method and device
CN111181845B (en) * 2019-12-31 2022-03-15 苏州盛科通信股份有限公司 Method for realizing LACP (Master-slave high availability) and LACP-based stacking system
CN112087378B (en) * 2020-08-18 2022-03-22 浪潮思科网络科技有限公司 Method, device and medium for realizing LACP forceup function

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101252532A (en) * 2008-03-18 2008-08-27 华为技术有限公司 Equipment and method for collocating Ethernet link polymerization terminal port
US20100329110A1 (en) * 2009-06-30 2010-12-30 Laurence Rose Method for reconvergence after failure in a dual-homing network environment
CN101984573A (en) * 2010-11-15 2011-03-09 中兴通讯股份有限公司 Method and system for distributed realization of LACP standard state machine

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100589408C (en) * 2007-06-05 2010-02-10 中兴通讯股份有限公司 A communication network connection method and its device
CN101692652B (en) * 2009-09-15 2011-11-16 杭州华三通信技术有限公司 Method and device for preventing interrupt of traffics in aggregation link
CN102970157B (en) * 2012-10-31 2016-01-27 杭州华三通信技术有限公司 Link failure processing method, IRF member device and data communication equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101252532A (en) * 2008-03-18 2008-08-27 华为技术有限公司 Equipment and method for collocating Ethernet link polymerization terminal port
US20100329110A1 (en) * 2009-06-30 2010-12-30 Laurence Rose Method for reconvergence after failure in a dual-homing network environment
CN101984573A (en) * 2010-11-15 2011-03-09 中兴通讯股份有限公司 Method and system for distributed realization of LACP standard state machine

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ZHENG, TAO ET AL.: "Design of Link Aggregation Finite State Machine Module Based on LACP", COMPUTER SYSTEMS & APPLICATIONS, vol. 19, no. 5, 31 May 2010 (2010-05-31), pages 104 - 108 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3633931A4 (en) * 2017-06-28 2020-07-01 Huawei Technologies Co., Ltd. Method, device, and system for implementing mux machine
US11258666B2 (en) 2017-06-28 2022-02-22 Huawei Technologies Co., Ltd. Method, device, and system for implementing MUX machine
US11398976B2 (en) * 2017-06-29 2022-07-26 Huawei Technologies Co., Ltd. Method, device, and system for implementing MUX machine
CN108173691A (en) * 2017-12-27 2018-06-15 杭州迪普科技股份有限公司 A kind of method and device of cross-equipment aggregation
CN108173691B (en) * 2017-12-27 2021-05-28 杭州迪普科技股份有限公司 Cross-device aggregation method and device
CN108848029A (en) * 2018-06-12 2018-11-20 迈普通信技术股份有限公司 Link aggregation method, apparatus and readable storage medium storing program for executing
US11470649B2 (en) * 2019-02-22 2022-10-11 Qualcomm Incorporated Transmission gap configuration for random access messages
CN115996191A (en) * 2022-11-21 2023-04-21 迈普通信技术股份有限公司 Port state control method, device, network communication equipment and storage medium

Also Published As

Publication number Publication date
CN105122737A (en) 2015-12-02

Similar Documents

Publication Publication Date Title
WO2015070383A1 (en) Link aggregation method, apparatus, and system
US9705735B2 (en) System and method using RSVP hello suppression for graceful restart capable neighbors
EP2720418B1 (en) Lacp link switching and data transmission method and device
US20160197853A1 (en) Distributed bidirectional forwarding detection protocol (d-bfd) for cluster of interconnected switches
KR102050910B1 (en) Method and system to enable re-routing for home networks upon connectivity failure
KR102344346B1 (en) Packet transmission method and apparatus
JP2011004298A (en) Packet transfer system, network management device, and edge node
WO2018113294A1 (en) Method, device and system for forwarding packet
CN112822102B (en) Link switching method, device, equipment, system and storage medium
US8477655B2 (en) Method, device, and system for establishing label switching path in fast rerouting switching
CN109691031B (en) Service message transmission method and node equipment
WO2021093797A1 (en) Information reporting method and information processing method, and device
WO2017041577A1 (en) Method and device for managing link aggregation member port packet loss
CN112995002B (en) Switch ring network design method, switch and storage medium
WO2014101125A1 (en) Aggregation group link negotiation method, device and system
EP2953299B1 (en) Protection switching method, system and node
WO2016082516A1 (en) Link bundling method and system
WO2021219049A1 (en) Information submitting method, information processing method, apparatus, and device
WO2018040916A1 (en) Message forwarding method and device
EP4094421A2 (en) Pce controlled network reliability
EP2953294A1 (en) Protection switching method, system, and node
WO2021082820A1 (en) Method and device for choosing to switch to port under working state during dual-homing access
WO2022143689A1 (en) Method and system for session protection
WO2016065754A1 (en) Method and apparatus for reducing message quantity in lmp
CN108737263B (en) Data center system and data stream processing method

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: 13897287

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13897287

Country of ref document: EP

Kind code of ref document: A1