CN112187637A - Configuration method and device of Ethernet link aggregation group and computer readable storage medium - Google Patents

Configuration method and device of Ethernet link aggregation group and computer readable storage medium Download PDF

Info

Publication number
CN112187637A
CN112187637A CN202010977858.9A CN202010977858A CN112187637A CN 112187637 A CN112187637 A CN 112187637A CN 202010977858 A CN202010977858 A CN 202010977858A CN 112187637 A CN112187637 A CN 112187637A
Authority
CN
China
Prior art keywords
port
backup
lag
link
aggregation group
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010977858.9A
Other languages
Chinese (zh)
Inventor
刘铮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202010977858.9A priority Critical patent/CN112187637A/en
Publication of CN112187637A publication Critical patent/CN112187637A/en
Pending legal-status Critical Current

Links

Images

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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/22Alternate routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/28Routing or path finding of packets in data switching networks using route fault recovery

Landscapes

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

Abstract

The invention provides a configuration method and a configuration device of an Ethernet link aggregation group and a computer readable storage medium, belongs to the technical field of computer network communication, and solves the technical problems that in the prior art, too many steps are required for configuring an Eth-LAG, the processing time is too long, and the processing of equipment at two ends of a link is asynchronous, so that a message is lost. The method comprises setting all member ports of an Ethernet link aggregation group to a forwarding state; configuring a backup port for each member port, wherein the backup port is another member port in the Ethernet link aggregation group; when the state of a certain member port changes, the output port link of the member port is switched between the member port and the backup port.

Description

Configuration method and device of Ethernet link aggregation group and computer readable storage medium
Technical Field
The present invention relates to the field of computer network communication technologies, and in particular, to a method and an apparatus for configuring an ethernet link aggregation group, and a computer-readable storage medium.
Background
Ethernet Link Aggregation Group (Eth-LAG) refers to a method for binding multiple Ethernet physical ports (Trunk) into one logical port. Switches or routers in the field of data communications typically use this technique to provide link redundancy and increase network bandwidth.
The Eth-LAG is a logical port, and when a packet is forwarded from the Eth-LAG, in order to achieve load balancing at a member port of the Eth-LAG, a certain physical port in the Eth-LAG is selected for forwarding through a certain routing mechanism (e.g., a hash algorithm) according to the content of the packet (e.g., MAC, IP, etc.). When the state of a link of a member port of the Eth-LAG changes, the devices at both ends of the link need to reset the Eth-LAG, and the setting of the devices at both ends may not be completely synchronous, which may result in the loss of a packet.
In the prior art, in the process of changing an Eth-LAG member port from down to up, a link two-end device acquires a state change of the Eth-LAG member, or adopts an interrupt mode, or adopts a task polling mode. In any way, the time for the devices at two ends to acquire the port to change from down to up is inconsistent. Under the influence of the asynchronism, after the end device completes the port state update and the setting of the Eth-LAG, the message is forwarded from the newly added member port to the opposite end device, and the opposite end device may not complete the port state update and the setting of the Eth-LAG, so that the message is lost.
In the prior art, when the Eth-LAG member port is changed from up to down, the link is not available. In practical application, an interruption mode is adopted to detect the state of a link changing from up to down, but in the subsequent processing process, a series of chip table entries are set, so that the time consumption is too long, and the packet loss is too much.
In summary, when the state of the member port of the Eth-LAG changes, the prior art has the problems of excessive configuration steps for the Eth-LAG, too long processing time, and asynchronous processing of the devices at the two ends of the link, thereby causing packet loss.
Disclosure of Invention
The invention aims to provide a configuration method and a configuration device of an Ethernet link aggregation group and a computer readable storage medium, which solve the technical problems of excessive configuration steps, overlong processing time and asynchronous processing of equipment at two ends of a link, which cause message loss in the prior art when the state of a member port of an Eth-LAG is changed.
In a first aspect, the present invention provides a method for configuring an ethernet link aggregation group, including:
setting all member ports of the Ethernet link aggregation group to be in a forwarding state;
configuring a backup port for each member port, wherein the backup port is another member port in the Ethernet link aggregation group;
when the state of a certain member port changes, the output port link of the member port is switched between the member port and the backup port.
Further, the step of setting all member ports of the ethernet link aggregation group to a forwarding state includes:
setting all member ports of the Ethernet link aggregation group to be in a forwarding state;
marking all member ports of the Ethernet link aggregation group as member ports of the LAG, and distributing LAG-ID;
all member ports of the Ethernet link aggregation group are added to the port bitmap of the LAG-ID index.
Further, the step of configuring a backup port for each member port includes:
calculating a port link according to a member port of the Ethernet link aggregation group;
and configuring a backup port for each member port to serve as a backup egress port link.
Further, when the state of a certain member port changes, the step of switching the outgoing port link of the member port between the member port and the backup port thereof includes:
when the state of a certain member port is changed from open to closed, the output port link of the member port is switched to a backup port by the member port.
Further, when the state of a certain member port changes, the step of switching the outgoing port link of the member port between the member port and the backup port thereof includes:
when the state of a certain member port is changed from closed to open, the output port link of the member port is switched to the member port by the backup port.
Further, the step of switching the output port link of the member port to the backup port includes:
detecting whether a configuration update period is reached;
before the configuration updating period is reached, keeping the backup port as an output port link of the member port;
and when the configuration updating period is reached, switching the output port link route backup port of the member port to the member port.
Further, the configuration update period is longer than the time for detecting and setting the port state by the devices at both ends of the link.
In a second aspect, the present invention further provides a device for configuring an ethernet link aggregation group, including:
the member port module is used for setting all member ports of the Ethernet link aggregation group to be in a forwarding state;
a configuration module, configured to configure a backup port for each member port, where the backup port is another member port in the ethernet link aggregation group;
and the switching module is used for switching the output port link of a member port between the member port and the backup port when the state of the member port changes.
In a third aspect, the present invention also provides a computer readable storage medium having stored thereon machine executable instructions which, when invoked and executed by a processor, cause the processor to execute a method of configuration of the ethernet link aggregation group.
The configuration method and the configuration device of the Ethernet link aggregation group set all member ports of the Ethernet link aggregation group to be in a forwarding state, configure a backup port for each member port, switch an output port link of the member port between the member port and the backup port when the state of a certain member port changes, keep the LAG attribute and the forwarding state of the port unchanged, only modify the output port of an Eth-LAG forwarding link corresponding to the port, reduce the setting steps of a chip, realize the quick switching of the link in the port up/down process, reduce the loss of messages, improve the network performance and increase the competitiveness of company products.
Accordingly, the computer-readable storage medium provided by the embodiment of the invention also has the technical effects.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic diagram of a data communication device communicating via Eth-LAG according to an embodiment of the present invention;
fig. 2 is a schematic diagram illustrating initial setup of Eth-LAG in a chip according to an embodiment of the present invention;
fig. 3 is a schematic configuration diagram of an Eth-LAG in a chip when a port status of a member of the Eth-LAG is changed from up to down according to an embodiment of the present invention;
fig. 4 is a flowchart of a configuration method of Eth-LAG when a member port state of the Eth-LAG is changed according to an embodiment of the present invention.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "comprising" and "having," and any variations thereof, as referred to in embodiments of the present invention, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements but may alternatively include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Referring to fig. 1-4, a method for configuring an ethernet link aggregation group according to an embodiment of the present invention includes:
setting all member ports of the Ethernet link aggregation group to be in a forwarding state;
configuring a backup port for each member port, wherein the backup port is another member port in the Ethernet link aggregation group;
when the state of a certain member port changes, the output port link of the member port is switched between the member port and the backup port.
All member ports of the Ethernet link aggregation group are set to be in a forwarding state, a backup port is configured for each member port, when the state of a certain member port changes, an output port link of the member port is switched between the member port and the backup port, the LAG attribute and the forwarding state of the port can be kept unchanged, only the output port of an Eth-LAG forwarding link corresponding to the port is modified, the setting steps of a chip are reduced, the link is quickly switched in the port up/down process, the loss of messages is reduced, the network performance is improved, and the competitiveness of company products is increased.
In the embodiment of the present invention, the step of setting all member ports of the ethernet link aggregation group to the forwarding state includes:
setting all member ports of the Ethernet link aggregation group to be in a forwarding state;
marking all member ports of the Ethernet link aggregation group as member ports of the LAG, and distributing LAG-ID;
all member ports of the Ethernet link aggregation group are added to the port bitmap of the LAG-ID index.
In the embodiment of the present invention, the step of configuring a backup port for each member port includes:
calculating a port link according to a member port of the Ethernet link aggregation group;
and configuring a backup port for each member port to serve as a backup egress port link.
In this embodiment of the present invention, when the state of a certain member port changes, the step of switching the output port link of the member port between the member port and the backup port thereof includes:
when the state of a certain member port is changed from open to closed, the output port link of the member port is switched to a backup port by the member port.
In this embodiment of the present invention, when the state of a certain member port changes, the step of switching the output port link of the member port between the member port and the backup port thereof includes:
when the state of a certain member port is changed from closed to open, the output port link of the member port is switched to the member port by the backup port.
In the embodiment of the present invention, the step of switching the output port link of the member port to the backup port includes:
detecting whether a configuration update period is reached;
before the configuration updating period is reached, keeping the backup port as an output port link of the member port;
and when the configuration updating period is reached, switching the output port link route backup port of the member port to the member port.
In the embodiment of the invention, the configuration updating period is longer than the time for detecting and setting the port state by the equipment at two ends of the link.
An embodiment of the present invention further provides a device for configuring an ethernet link aggregation group, where the device includes:
the member port module is used for setting all member ports of the Ethernet link aggregation group to be in a forwarding state;
the configuration module is used for configuring a backup port for each member port, wherein the backup port is another member port in the Ethernet link aggregation group;
and the switching module is used for switching the output port link of a member port between the member port and the backup port when the state of the member port changes.
Embodiments of the present invention also provide a computer-readable storage medium storing machine-executable instructions, which, when invoked and executed by a processor, cause the processor to execute a method for configuring an ethernet link aggregation group.
The configuration method of the embodiment of the invention specifically comprises the following steps:
step 1, setting a chip, and setting member ports of all Eth-LAG to be in a forwarding state in the chip.
Step 2, setting the chip, and marking all the member ports of the Eth-LAG as the member ports of the LAG in the chip, see fig. 2.
Step 3 sets up the chip, adds all the member ports of the Eth-LAG to the LAG port bitmap, see fig. 3.
And 4, calculating a port link according to the member ports of the Eth-LAG, setting the output ports of the Eth-LAG of the chips corresponding to different hash results, and including the member ports of all the Eth-LAG in the output ports. Meanwhile, each member Port is allocated with a backup Port, the backup Port is required to be a member Port of the Eth-LAG, and assuming that the Eth-LAG comprises 4 member ports 1-4, the backup Port of Port1 is set to be Port2, the backup Port of Port2 is set to be Port3, the backup Port of Port3 is set to be Port4, and the backup Port of Port4 is set to be Port1, which is shown in FIG. 3.
Step 5, when detecting that the Port status of a member is changed from up to down, for example, the Port1 status is changed to down, the LAG Port attribute and forwarding status of Port1 are kept unchanged, but the Eth-LAG output Port link set in step 3 is modified, the link with the output Port being Port1 is modified to the backup Port2 of Port1, and the message forwarded by the Port1 of Eth-LAG selected through hash operation is forwarded from Port2, see fig. 3.
Step 6, when detecting that the state of a member Port is changed from down to up, because the Eth-LAG output Port link corresponding to the down Port has been modified to its backup Port in step 4, for example, the output Port link corresponding to Port1 is modified to backup Port 2. Therefore, the packet forwarded from Port1 is selected according to the hash operation and forwarded from backup Port2, and the forwarding state of Port1 is not changed, so that the packet received from Port1 can be forwarded normally. When the update cycle is over, the Port of the outgoing Port link of the Eth-LAG corresponding to Port1 is modified from the backup Port2 to the primary Port1, and the packet is forwarded from Port1, as shown in fig. 3. The update period must be longer than the time for the devices at both ends of the link to detect and set the port state, and can be configured by command.
The flow of Eth-LAG configuration provided by the present invention is shown in fig. 4. In summary, the technical solution provided by the present invention has the following advantages:
by setting a backup port which is also the LAG member port for each Eth-LAG member port, when the state of the Eth-LAG member port is changed, the LAG member port attribute and the forwarding state of the port are not modified, only an output port link of the Eth-LAG is modified, and switching is performed between a main port and a backup port, so that the time for setting the forwarding state and the port LAG attribute is saved, and when the port is changed from up to down, quick switching can be performed, and packet loss is reduced; when the port is changed from down to up, the output port of the link is changed from the backup port to the main port after the update period is up, thereby effectively preventing packet loss.
As shown in fig. 4, a configuration method of Eth-LAG according to the technical solution of the present invention specifically includes:
501: and setting a chip, and setting all member ports of the Eth-LAG to be in a forwarding state.
502: setting up the chip, marking all member ports of the Eth-LAG as member ports of the LAG in the chip, and assigning LAG-IDs for indexing the LAG Portbitmap table and the LAG Group table, see 301 of fig. 2.
503: the chip is set up to add all member ports of the Eth-LAG to the LAG Portbitmap of the LAG ID index, indicating that the port belongs to the LAG Group, see 302 of fig. 2.
504: setting a chip, adding all member ports of the Eth-LAG to a LAG Group table, when a message is forwarded to the LAG, performing hash operation on the chip by using the content (such as MAC or IP) of the message, and indexing a hash result to the LAG Group table to obtain an egress port, which is an egress port for forwarding the message, as shown in 303-306 of fig. 2; meanwhile, a backup port is preset for each Eth-LAG member port, and the backup port must be a member port of LAG. For example, an Eth-LAG includes 4 ports 1-4, a backup Port for Port1 is Port2, a backup Port for Port2 is Port3, a backup Port for Port3 is Port4, and a backup Port for Port4 is Port 1.
505: and acquiring the link states of each member of the Eth-LAG one by one, if the hardware supports an interruption mode, acquiring the link states of the ports by adopting the interruption mode, and completing the updating of the message forwarding links of the equipment more quickly to reduce packet loss, otherwise, acquiring the link states of the Eth-LAG members by adopting a task timing query mode.
506: and comparing the link state of the member port of the Eth-LAG acquired this time with the last state, and judging whether the link state is changed.
507: and changing the link state of the member port of the Eth-LAG from down to up, and executing 509, otherwise, executing 508.
508: detecting that the member port of the Eth-LAG is changed from up to down, keeping the forwarding state of the port in a chip unchanged, keeping the attribute of the LAG member port of the port unchanged, keeping the port still in a bitmap of the LAG port, modifying an exit port in an LAG Group as an item of the member port, and modifying the exit port as a backup port of the member port. For example, the member Port1 status is changed from up to down, and the entry with the Port1 as the egress Port in the LAG Group is modified to be the backup Port2 of Port1, as shown in fig. 3.
509: and detecting that the down of the Eth-LAG port is changed into the up, wherein the port attribute is still a member port of the LAG because the forwarding state of the port is not changed, and the port is still in the LAG port bitmap, so that the port can normally receive the message and send the message to a forwarding engine of a local chip for forwarding. At 508, the message forwarded from the link is set to be forwarded from the backup port thereof, so that the port does not send the message to the outside temporarily, after the update period is up, the chip LAG Group table is modified, the egress port of the entry corresponding to the port is modified from the backup port to the main port, see 403 in fig. 3 to 303 in fig. 2, and thus, the main port participates in the egress port link forwarding of the LAG again. The update cycle must be longer than the interval time of port state detection and update of the devices at both ends of the link, and after the update cycle arrives, the ports of the devices at both ends of the link can normally receive and send messages, and the update cycle can be configured by commands.
In the processing process when the Eth-LAG member port state changes, when the port is changed from up to down, the LAG attribute and the forwarding state of the port in the chip are kept unchanged, and only the output port of the Eth-LAG forwarding link corresponding to the port is modified into the backup port, so that the setting steps of the chip are reduced, the purpose of quickly switching the flow to the backup port is achieved, and the packet loss is reduced; when the port is changed from down to up, the port can receive the flow, the sending of the message is still forwarded from the backup port, and the flow is switched from the backup port to the main port after the update period is up, so that the loss of the message is prevented.
The embodiment of the invention provides a method for configuring an Ethernet link aggregation group, which comprises the following processing steps:
the method comprises the following steps: setting a chip, setting all members of the Eth-LAG into a forwarding state, marking the members as LAG ports, adding the LAG ports into a LAG port bitmap, calculating port links according to the member ports of the Eth-LAG, and adding all the member ports of the Eth-LAG into output ports of LAG groups of the chip corresponding to different hash results;
step two: assigning a backup port to each member port of the Eth-LAG, wherein the backup port also belongs to the Eth-LAG and is stored in software;
step three: judging whether the state of a member port of the Eth-LAG is changed or not;
step four: when detecting that the state of a member port of the Eth-LAG is changed from up to down, modifying the list item of the port in the LAG Group table with the exit port as the port into a backup port without modifying the forwarding state and the LAG attribute of the port in the chip, so that the flow forwarded from the hash to the port is forwarded from the backup port;
step five: when the condition that the state of a certain member port of the Eth-LAG is changed from down to up is detected, after the updating period is up, the table entry of which the output port is the port in the LAG Group table is changed from the backup port to the main port.
In the embodiment of the invention, the attribute of all member ports of the Eth-LAG in a chip is the LAG port, and is always set to be in a forwarding state.
And the CPU calculates a port forwarding link according to the member port of the Eth-LAG, and sets the port into an LAG Group table of a hash result index according to different hash results corresponding to different Eth-LAG member ports.
And setting a backup port for each member port of the Eth-LAG, wherein the backup port also belongs to the Eth-LAG and is stored in software.
Judging the state change of the member port of the Eth-LAG: the state change of the port can be acquired by adopting an interrupt mode or a task polling mode.
When the port state is changed from up to down, the list item of the LAG Group table with the port as the port is modified into a backup port, and the message from the hash to the port is forwarded from the backup port.
When the port state is changed from down to up, the port can receive the message, when the set update period is reached, the output port of the LAG Group table corresponding to the port is changed from the backup port to the local port, and the update period needs to be longer than the time for detecting and updating the port state at two ends of the link.
In the embodiment of the invention, the key point is how to quickly switch the message forwarded from the port to other links when detecting that the port is changed from up to down:
keeping the port in a forwarding state in the chip;
not modifying LAG attributes of ports in a chip and still belonging to port bitmaps of LAGs;
only the output port of the LAG Group table corresponding to the port is set as a backup port, when the message is transmitted to the LAG and the LAG Group table is selected through a hash algorithm, the message is transmitted from the backup port, the backup port is an up port, if the backup port is down, the backup port of the backup port is selected, and the like.
In the embodiment of the invention, the key of the configuration method for realizing the Ethernet link aggregation group is how to ensure that the message forwarded from the port is not lost when the port is detected to be changed from down to up:
because the port can not transmit state in the chip all the time, the message can be received normally;
because the port attribute is the LAG attribute and is in the LAG port bitmap, the received message can not be forwarded in the Eth-LAG and can be normally forwarded to other ports;
before the update period is not reached, forwarding the message from the hash to the port from the backup port;
and after the update period is up, the link at the opposite end can already receive the message, the output port of the LAG Group table corresponding to the port is changed from the backup port to the main port, the port participates in the actual message transmission, and the update period is configurable.
In the embodiment of the invention, the method for realizing the fast link switching from up to down of the ports of the aggregation group members can quickly replace the output port of the forwarding link corresponding to the down member port with the backup port, realize the fast switching of the flow and reduce the packet loss.
In the embodiment of the invention, the link switching method from down to up of the member port of the aggregation group is realized, after the update period is up, the output port of the forwarding link corresponding to the up member port is changed from the backup port to the main port, and the loss of the message is effectively prevented.
In the embodiment of the invention, when the member port of the Eth-LAG is changed from down to up, no packet is lost, and when the member port of the Eth-LAG is changed from up to down, the packet loss is reduced.
In the embodiment of the invention, Eth-LAG: ethernet Link Aggregation Group, Ethernet Link Aggregation Group.
And (5) Trunk: and (4) port binding.
Corresponding to the method, the embodiment of the invention also provides a computer readable storage medium, wherein the computer readable storage medium stores machine executable instructions, and when the computer executable instructions are called and executed by a processor, the computer executable instructions cause the processor to execute the steps of the method.
The apparatus provided by the embodiment of the present invention may be specific hardware on the device, or software or firmware installed on the device, etc. The device provided by the embodiment of the present invention has the same implementation principle and technical effect as the method embodiments, and for the sake of brief description, reference may be made to the corresponding contents in the method embodiments without reference to the device embodiments. It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the foregoing systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
For another example, a division of elements into only one logical division may be implemented in a different manner, and multiple elements or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments provided by the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus once an item is defined in one figure, it need not be further defined and explained in subsequent figures, and moreover, the terms "first", "second", "third", etc. are used merely to distinguish one description from another and are not to be construed as indicating or implying relative importance.
In the description of the present invention, it should also be noted that, unless otherwise explicitly specified or limited, the terms "disposed," "mounted," "connected," and "connected" are to be construed broadly and may, for example, be fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present invention, which are used for illustrating the technical solutions of the present invention and not for limiting the same, and the protection scope of the present invention is not limited thereto, although the present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; and the modifications, changes or substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention. Are intended to be covered by the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (9)

1. A method for configuring an ethernet link aggregation group, comprising:
setting all member ports of the Ethernet link aggregation group to be in a forwarding state;
configuring a backup port for each member port, wherein the backup port is another member port in the Ethernet link aggregation group;
when the state of a certain member port changes, the output port link of the member port is switched between the member port and the backup port.
2. The method according to claim 1, wherein the step of setting all the member ports of the ethernet link aggregation group to the forwarding state comprises:
setting all member ports of the Ethernet link aggregation group to be in a forwarding state;
marking all member ports of the Ethernet link aggregation group as member ports of the LAG, and distributing LAG-ID;
all member ports of the Ethernet link aggregation group are added to the port bitmap of the LAG-ID index.
3. The method of claim 1, wherein the step of configuring a backup port for each member port comprises:
calculating a port link according to a member port of the Ethernet link aggregation group;
and configuring a backup port for each member port to serve as a backup egress port link.
4. The method according to claim 3, wherein the step of switching the egress port link of a member port between the member port and its backup port when the status of the member port changes comprises:
when the state of a certain member port is changed from open to closed, the output port link of the member port is switched to a backup port by the member port.
5. The method according to claim 1, wherein the step of switching the egress port link of a member port between the member port and its backup port when the status of the member port changes comprises:
when the state of a certain member port is changed from closed to open, the output port link of the member port is switched to the member port by the backup port.
6. The method of claim 5, wherein the step of switching the egress port link of the member port from the backup port to the member port comprises:
detecting whether a configuration update period is reached;
before the configuration updating period is reached, keeping the backup port as an output port link of the member port;
and when the configuration updating period is reached, switching the output port link route backup port of the member port to the member port.
7. The method according to claim 6, wherein the configuration update period is longer than the time for the devices at both ends of the link to detect and set the port status.
8. An apparatus for configuring an ethernet link aggregation group, comprising:
the member port module is used for setting all member ports of the Ethernet link aggregation group to be in a forwarding state;
a configuration module, configured to configure a backup port for each member port, where the backup port is another member port in the ethernet link aggregation group;
and the switching module is used for switching the output port link of a member port between the member port and the backup port when the state of the member port changes.
9. A computer readable storage medium having stored thereon machine executable instructions which, when invoked and executed by a processor, cause the processor to execute the method of any of claims 1 to 7.
CN202010977858.9A 2020-09-17 2020-09-17 Configuration method and device of Ethernet link aggregation group and computer readable storage medium Pending CN112187637A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010977858.9A CN112187637A (en) 2020-09-17 2020-09-17 Configuration method and device of Ethernet link aggregation group and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010977858.9A CN112187637A (en) 2020-09-17 2020-09-17 Configuration method and device of Ethernet link aggregation group and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN112187637A true CN112187637A (en) 2021-01-05

Family

ID=73921505

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010977858.9A Pending CN112187637A (en) 2020-09-17 2020-09-17 Configuration method and device of Ethernet link aggregation group and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112187637A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116032819A (en) * 2022-12-16 2023-04-28 迈普通信技术股份有限公司 Equivalent load sharing method, device, network equipment and storage medium
CN116074234A (en) * 2021-11-04 2023-05-05 苏州盛科通信股份有限公司 Method and device for quickly updating multicast table, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101841432A (en) * 2010-05-26 2010-09-22 中兴通讯股份有限公司 Port backup method, device and system for service access router
CN102299846A (en) * 2011-08-19 2011-12-28 杭州华三通信技术有限公司 Method for transmitting BFD (Bidirectional Forwarding Detection) message and equipment
CN102412979A (en) * 2010-09-26 2012-04-11 杭州华三通信技术有限公司 Method and communication device for reducing message loss of link aggregation port
CN103595567A (en) * 2013-11-13 2014-02-19 杭州华三通信技术有限公司 Method and device for mapping ports in aggregation link
CN104253747A (en) * 2014-10-17 2014-12-31 杭州晨晓科技有限公司 Transmission method and transmission device for performing 1: 1 protection on message in link aggregation group
CN105379221A (en) * 2014-06-30 2016-03-02 华为技术有限公司 Link aggregation method and device
CN106789264A (en) * 2016-12-26 2017-05-31 北京东土军悦科技有限公司 The method and apparatus that a kind of link aggregation group passage is switched fast

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101841432A (en) * 2010-05-26 2010-09-22 中兴通讯股份有限公司 Port backup method, device and system for service access router
CN102412979A (en) * 2010-09-26 2012-04-11 杭州华三通信技术有限公司 Method and communication device for reducing message loss of link aggregation port
CN105099906A (en) * 2010-09-26 2015-11-25 杭州华三通信技术有限公司 Method for reducing message loss of link aggregation port, and hardware control unit
CN102299846A (en) * 2011-08-19 2011-12-28 杭州华三通信技术有限公司 Method for transmitting BFD (Bidirectional Forwarding Detection) message and equipment
CN103595567A (en) * 2013-11-13 2014-02-19 杭州华三通信技术有限公司 Method and device for mapping ports in aggregation link
CN105379221A (en) * 2014-06-30 2016-03-02 华为技术有限公司 Link aggregation method and device
CN104253747A (en) * 2014-10-17 2014-12-31 杭州晨晓科技有限公司 Transmission method and transmission device for performing 1: 1 protection on message in link aggregation group
CN106789264A (en) * 2016-12-26 2017-05-31 北京东土军悦科技有限公司 The method and apparatus that a kind of link aggregation group passage is switched fast

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116074234A (en) * 2021-11-04 2023-05-05 苏州盛科通信股份有限公司 Method and device for quickly updating multicast table, electronic equipment and storage medium
CN116032819A (en) * 2022-12-16 2023-04-28 迈普通信技术股份有限公司 Equivalent load sharing method, device, network equipment and storage medium

Similar Documents

Publication Publication Date Title
US9485194B2 (en) Virtual link aggregation of network traffic in an aggregation switch
EP3169024B1 (en) Designated forwarder (df) election based on static df election procedure
EP3229406B1 (en) Performing a protocol, such as micro bidirectional forwarding detection, on member links of an aggregated link that uses an address of the aggregated link
EP3316555B1 (en) Mac address synchronization method, device and system
CN110191064B (en) Flow load balancing method, device, equipment, system and storage medium
CN108512751B (en) Port state processing method and network equipment
EP3297224A1 (en) Preventing data traffic loops associated with designated forwarder selection
CN105791126B (en) Ternary Content Addressable Memory (TCAM) table look-up method and device
CN106656857B (en) Message speed limiting method and device
WO2018108149A1 (en) Data-link switching method and apparatus and data-link switching device
CN112187637A (en) Configuration method and device of Ethernet link aggregation group and computer readable storage medium
WO2014204850A1 (en) Virtual chassis topology management
CN110798400B (en) Message forwarding method and device
CN113839862B (en) Method, system, terminal and storage medium for synchronizing ARP information between MCLAG neighbors
CN113328916B (en) BFD detection mode switching method, device and equipment
WO2014106438A1 (en) Link problem handling
CN108989204B (en) Link state determination method and device
EP3291486B1 (en) Selective transmission of bidirectional forwarding detection (bfd) messages for verifying multicast connectivity
CN110768917B (en) Message transmission method and device
US11258666B2 (en) Method, device, and system for implementing MUX machine
US11743114B1 (en) Bidirectional forwarding detection control packet to indicate maintenance mode operation
CN116566752B (en) Safety drainage system, cloud host and safety drainage method
US10097457B1 (en) Resolving a mismatch among control plane parameter values received from multiple routing control devices
CN115333991B (en) Cross-device link aggregation method, device, system and computer readable storage medium
WO2016138705A1 (en) Method and device for managing link in load sharing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20210105

RJ01 Rejection of invention patent application after publication