WO2015106680A1 - Stacking implementation method and stackable device - Google Patents

Stacking implementation method and stackable device Download PDF

Info

Publication number
WO2015106680A1
WO2015106680A1 PCT/CN2015/070663 CN2015070663W WO2015106680A1 WO 2015106680 A1 WO2015106680 A1 WO 2015106680A1 CN 2015070663 W CN2015070663 W CN 2015070663W WO 2015106680 A1 WO2015106680 A1 WO 2015106680A1
Authority
WO
WIPO (PCT)
Prior art keywords
port
stack
mac address
format
message
Prior art date
Application number
PCT/CN2015/070663
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 华为技术有限公司
Publication of WO2015106680A1 publication Critical patent/WO2015106680A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/64Hybrid switching systems
    • H04L12/6418Hybrid transport

Definitions

  • the present invention relates to the field of communications, and in particular, to a stack implementation method and a stackable device.
  • Stacking refers to combining more than one switch to work together to provide as many ports as possible in a limited space. Multiple switches are stacked to form a stacking system, and connected devices outside the stacking system form a stacking system. A switch is a switch. One of the multiple switches that make up the stack system serves as the master device and is responsible for the management of the entire stack system.
  • a dedicated stacking port is provided on the switch, and the stacking port is only used for information transmission in the stacking system, such as consistency information between switches and real-time synchronization data.
  • Another type of stack is implemented as a port. This means that a common service port can also be used as a stack port. You can specify a port as a common service port or stack port by specifying the role of the port. waste. In this mode, you need to manually specify the role of the connected port between the stacking devices. When the number of stacking devices is large, the workload of the staff is large, which may cause misconfiguration and affect the operation of the stacking system.
  • the present invention provides a method for implementing a stack, the method comprising:
  • the first device broadcasts the first stack enable message in the Ethernet format by using the first port, the source address of the first stack enable message is the MAC address of the first device, and the first stack enable report
  • the device carries the information that the other device can establish a stack relationship with the first device, where the first device is the master device of the stacking system to be established, and the first port is located in the first device;
  • the first device receives the first stack acknowledgment message in the Ethernet format sent by the second device, where the destination address of the first stack acknowledgment message is the MAC address of the first device, and the source address is the second a MAC address of the device, where the second port is used as the information about the stack port of the second device, and the second port is located in the second device;
  • the first device switches the first port from a normal service port to a stack port, and records a MAC address of the second device and a topological relationship between the first port and the second port.
  • the first device switches the first port from a normal service port to a stack port, and records a MAC address and a location of the second device.
  • the topological relationship between the first port and the second port includes:
  • the first port Receiving, by the first port, a second stack acknowledgment message in a stack format sent by the second device, where the second stack acknowledgment message carries a MAC address of the second device and the third device, and the third port is As the information of the stack port facing the third device, and the information that the fourth port is the stack port of the third device facing the second device, the fourth port is located in the third device, The third port is located in the second device;
  • the first device records a MAC address of the third device, and a topological relationship between the fourth port and the third port.
  • an embodiment of the present invention provides a method for implementing a stack, where the method includes:
  • the first stack enable message in the Ethernet format broadcasted by the first device by using the second port, where the source address of the first stack enable message is the MAC address of the first device, where the A stack-enabled packet carries information that another device can establish a stack relationship with the first device, where the first device is a master device of a stacking system to be established;
  • the second device records the MAC address of the first device
  • the second device sends a first stack acknowledgement packet in an Ethernet format to the first device by using the second port, where the destination address is the MAC address of the first device, and the source address is the MAC address of the second device.
  • An address, the first stack confirmation message carrying the second port as the information of the second device facing the stack port of the first device, and the second port is located in the second device;
  • the second port is switched from a normal service port to a stack port, and a stacking relationship with the first device is established, and then, include:
  • the second device converts the second stack enable message into a third stack enable message in an Ethernet format
  • the second device sends the third stack enable message in an Ethernet format to the third device by using the third port, where the third port is located in the second device;
  • a third stack acknowledgment message in an Ethernet format sent by the fourth port where the fourth port is located in the third device, and the destination address of the third stack acknowledgment message is the a MAC address of the second device, where the source address of the third stack acknowledgment message is the third device, and the information of the fourth port is used as a stack port facing the second device;
  • the second device converts the third stack acknowledgment message into a second stack acknowledgment message in a stack format, where the second stack acknowledgment message carries the MAC address of the second device and the third device,
  • the third port is used as the information of the second device facing the stack port of the third device
  • the fourth port is used as the information of the third device facing the stack port of the second device, the fourth port Located in the third device, the third port is located in the second device;
  • the method further includes:
  • the third port After receiving the stack-disabled acknowledgement packet in the stack format sent by the third device, the third port is converted into a normal service port.
  • an embodiment of the present invention provides a stackable device, where the stackable device includes:
  • a sending unit configured to broadcast, by using the first port, a first stack-enabled packet in an Ethernet format, where a source address of the first stack-enabled packet is a MAC address of the local device, where the first stack is configured Can carry other equipment in the message.
  • the first device is located at the local device, where the local device is the master device of the stacking system to be established.
  • a receiving unit configured to receive a first stack acknowledgment message in an Ethernet format sent by the second device, where a destination address of the first stack acknowledgment message is a MAC address of the local device, and a source address is the second a MAC address of the device, where the second port is used as the information about the stack port of the local device, and the second port is located in the second device;
  • a switching unit configured to switch the first port from a normal service port to a stack port
  • a storage unit configured to record a MAC address of the second device and a topological relationship between the first port and the second port.
  • the sending unit is further configured to: send, by using the first port, a second stack enable message in a stack format to the second device;
  • the receiving unit is further configured to: receive, by using the first port, a second stack acknowledgment message in a stack format sent by the second device, where the second stack acknowledgment message carries a MAC address of the second device and the third device,
  • the third port is located as information facing a stack port of the third device, and the fourth port is used as information of the third device facing a stack port of the second device, where the fourth port is located
  • the third device, the third port is located in the second device;
  • the storage unit is further configured to: record a MAC address of the third device, and a topological relationship between the fourth port and the third port.
  • the embodiment of the present invention further provides a stackable device, where the stackable device includes:
  • a first receiving unit configured to receive, by using the second port, the first stack enable message in an Ethernet format broadcast by the first device, where the source address of the first stack enable message is the first device MAC address, the first stack enable message carries information that another device can establish a stack relationship with the first device, and the first device is a master device of the stack system to be established;
  • a storage unit configured to record, by the local device, a MAC address of the first device
  • a first sending unit configured to send, by using the second port, the first stack acknowledgement packet in an Ethernet format to the first device, where the destination address of the first stack acknowledgement packet is the first
  • the MAC address of the device the source address is the MAC address of the second device
  • the first stack acknowledgment message carries the second port as the information of the stack port of the second device facing the first device.
  • the second port is located at the local device;
  • a creating unit configured to switch the second port from a normal service port to a stack port.
  • the first receiving unit is further configured to: receive, by using the second port, a second stack enable message in a stack format sent by the first device, Translating the second stack enable message into a third stack enable message in an Ethernet format;
  • the stacking device further includes:
  • a second sending unit configured to send, by using the third port, the third stack enable message in an Ethernet format to the third device, where the third port is located in the second device;
  • a second receiving unit configured to receive a third stack acknowledgment message in an Ethernet format sent by the third device by using the fourth port, where the fourth port is located in the third device, and the third stack acknowledges the packet
  • the destination address is the MAC address of the second device
  • the source address of the third stack acknowledgment packet is the third device
  • the fourth port is configured as a stack port facing the local device.
  • a generating unit configured to encapsulate, by the local device, the third stack acknowledgment message into a second stack acknowledgment message in a stack format, where the second stack acknowledgment message carries the local device and the third device a MAC address, the information of the third port being the stack port of the local device, and the fourth port being the information of the third device facing the stack port of the local device, The fourth port is located in the third device, and the third port is located in the local device;
  • a switching unit configured to switch the third port from a normal service port to a stack port
  • a third sending unit configured to send the second stack confirmation packet to the first device by using the second port, to establish a stacking relationship between the local device and the third device.
  • the device further includes:
  • a fourth receiving unit configured to receive a stack-disabled packet in a stack format that is broadcast by the first device, where the stack-disabled packet carries a MAC address of the first device, and is used to notify a non-master of the stacking system The device is unstacked;
  • the storage unit is further configured to delete the information saved by the local device
  • a fourth sending unit configured to send, by the local device, the stack format of the stack format to enable the acknowledgement packet to the first device by using the second port;
  • the switching unit converts the second port from a stack port to a normal service port.
  • the device further includes:
  • a fifth sending unit configured to forward the stack de-enabled packet in a stack format to the third device by using the third port, to release a stacking relationship with the third device;
  • the interface conversion unit is configured to convert the third port into a common service port after receiving the stack deactivation confirmation message sent by the third device.
  • the stack implementation method provided by the present invention implements the functions of the different ports of the switch through the protocol packets, and implements different functions of the ports, and implements stack enable and stack disable.
  • the switch can create a stack system through auto-negotiation without manual configuration.
  • 1 is a system architecture diagram of a stack system construction
  • FIG. 2 is a flowchart of an embodiment of a stack implementation method according to an embodiment of the present invention
  • FIG. 3 is an interaction diagram of another embodiment of a stack implementation method according to an embodiment of the present invention.
  • FIG. 4 is an interaction diagram of still another embodiment of a stack implementation method according to an embodiment of the present invention.
  • FIG. 5 is a device state interaction diagram of a stack implementation method according to an embodiment of the present invention.
  • FIG. 6 is a structural diagram of an embodiment of a stackable device according to an embodiment of the present invention.
  • FIG. 7 is a structural diagram of an embodiment of a stackable switch according to an embodiment of the present invention.
  • FIG. 8 is a structural diagram of an embodiment of a stackable device according to an embodiment of the present invention.
  • FIG. 9 is a structural diagram of an embodiment of a stackable switch according to an embodiment of the present invention.
  • the stack implementation method provided by the embodiment of the present invention is used to construct a stacking system as shown in FIG. 1.
  • the stacking system includes multiple switches, one of which is configured or designated as a master device, and the remaining switches are used as Non-master devices. Because the stacking system uses a linear (English: linear) connection, each non-master device has no more than two ports for the stack system.
  • the port can be a physical port or a logical chain. Road aggregation (English: link aggregation) port.
  • the first device in FIG. 1 is connected to the second port eth2 on the second device through the first port eth1, and the second device is connected to the fourth terminal on the third device through the third port eth3. Mouth eth4.
  • the switch device in the stack system can automatically establish a stacking system in three different scenarios.
  • the embodiment of the present invention provides a method for implementing a stack, which is applied to the master device in FIG. 1.
  • the master device is referred to as a first device, and the method includes:
  • the first device broadcasts a first stack enable message in an Ethernet format by using the first port.
  • FIG. 3 is a state interaction diagram of the first embodiment of the present invention.
  • the first device has been Designated as the primary device in several switches that will be building a stacking system.
  • the first stack-enabled packet is a broadcast packet sent by the master device, and the first stack enables the packet in the Ethernet format, the source address of which is the MAC address of the sender, and the first stack
  • the destination address of the enabled packet is the broadcast address.
  • the first stack enable message is used to notify other switches in several switches that are about to establish a stack system.
  • the master device wants to establish a stack system with other switches.
  • the source address of the first stack-enabled packet is the MAC address of the first device
  • the first stack-enabled packet indicates that the first device wants to establish a stack relationship with the second device.
  • the second device may establish a stack relationship with the first device according to the information that the first device wants to establish a stack relationship with the second device.
  • the first device sends a stack enable message every 1 second (English: second, symbol: s) from the first port Eth1 connected to the second device. If the first device does not receive the confirmation message within the set time, the stacking system is abandoned.
  • the second device has not yet established a stack relationship with the first device. After receiving the first stack enable packet in the Ethernet format, the second device records the MAC address of the first device carried in the first stack enable packet. The stack-enabled packet is discarded, and then the first stack acknowledgement packet is sent from the second port Eth2 of the second device to the first device.
  • the first stack acknowledgment message is sent by the second device, and is used to respond to the packet of the stacking enable message of the first device. format.
  • the destination address is the MAC address of the first device
  • the source address is the MAC address of the second device.
  • the first stack acknowledgement packet includes a MAC address of the device on the forwarding path of the first stack acknowledgement packet and a port identifier of the second port.
  • the first stack acknowledgement packet carries the MAC address of the second device and the information that the second port is configured as a stack port, and after the second device sends the first stack acknowledgement packet, the second device The second device switches the state of the second port from the normal service port to the stack port.
  • the second port After the second port is configured to switch the second port to the stack port, the second port needs to encapsulate the packet in the stack format. For example, the stack identifier field is added to the header of the Ethernet packet. Business The service packets sent by the port are differentiated. After that, the format of the stack acknowledgement packet that is continuously sent is also changed to the packet in the stack format.
  • the first device receives a first stack acknowledgement packet in an Ethernet format sent by the second device.
  • the destination address of the first stack acknowledgment message is a MAC address of the first device
  • the source address of the first stack acknowledgment message is a MAC address of the second device
  • the first stack The confirmation message carries the MAC address of the second device and the second port as the information of the second device facing the stack port of the first device.
  • the first device switches the state of the first port from the normal service port to the stack port, and records the MAC address of the second device and the topological relationship between the first port and the second port.
  • the first device switches the state of the first port from the normal service port to the stack port, and then the first device needs to encapsulate the packet sent by the stack port as A packet in the stack format, for example, adds a stack identifier field to the header of the Ethernet packet to distinguish it from the service packet sent by the common service port.
  • the format of the stack-enabled packet that is sent continuously is also changed to the packet in the stack format.
  • the first port of the first device has been converted into a stack port, and the first device does not process the first stack acknowledgement packet in the stack packet format sent by the second device.
  • the first device is still continuously sending the second stack enable message in the stack packet format, and the second device can still receive the second stack continuously. Enable the message.
  • the stack identifier field in the stack-enabled packet is removed from the stack-enabled packet.
  • the third stack enable message is formed in the normal Ethernet packet format, and then the third stack enable message in the Ethernet packet format is forwarded to the third device through the third port Eth3.
  • the third device Similar to the processing after the first device receives the first stack enable message, the third device records the MAC address of the first device, and sends a third stack acknowledgement packet in the Ethernet format to the fourth port Eth4. a second device, where the fourth port is located in the third device, the third stack acknowledgement packet carries a MAC address of the third device, and the fourth port is used as the second device Information about the stacking port. Thereafter, the third device switches the working state of the fourth port from the normal service port to the stack port.
  • the first device needs to encapsulate the packet in the stack format for the packets sent through the stack port, for example, adding a stack identifier field to the header of the Ethernet packet, and The service packets sent by the service port are differentiated. Then, the format of the stack acknowledgement packet sent to the second device is also changed to the packet in the stack format.
  • the second device receives the third stack acknowledgement packet in the Ethernet format sent by the third device by using the fourth port, and then switches the third port from the normal service port to the stack port. And generating a second stack acknowledgment message in a stack format, where the second stack acknowledgment message carries a MAC address of the second device and the third device, and the third port is configured as the second device Information of a stack port of the third device, and information of the fourth port as a stack port of the third device facing the second device.
  • the second port Transmitting, by the second port, the second stack acknowledgment message to the first device, after receiving the second stack acknowledgment message, the first device records a MAC address of the third device, and the fourth
  • the port is associated with the stack of the third port, and the second stack acknowledgement packet is also a packet in a stack format.
  • the above embodiment is in a scenario where several switching devices of the stacking system have established a physical connection and the first device has been designated as the primary device of the stacking system.
  • the first device has been designated as the primary device of the stacking system.
  • only the physical connection is established between the stacking devices, but the non-master device does not know whether the master device has been established.
  • FIG. 4 is an interaction of another embodiment. Figure.
  • step 201 the method further includes:
  • Step 1 The first device receives a stack query message in an Ethernet format sent by the second device.
  • the stack query message is sent by the non-master device to detect the existence of the master device.
  • the packet is in the Ethernet packet format.
  • the stack query message is a broadcast packet, and the source address is the MAC address of the device that sends the stack query message, and the destination address is broadcast.
  • the source address of the stack query message is the MAC address of the second device.
  • Step 2 The first device sends a stack response message in an Ethernet format to the second device, where the stack response message is used to notify the second device, where the first device is a master device of the stack system, and Agree to build a stacking system.
  • the first device is the same as the embodiment shown in FIG. 2, and will not be described again.
  • the first device broadcasts a stack-disabled packet in a stack format, and the stack-disabled packet carries a MAC address of the first device, and is used to notify the non-master device of the stack system to cancel the stacking system.
  • the second device receives the stack de-enabled message broadcasted by the first device, and deletes the information saved by the second device.
  • the second device sends a stack format-enabled acknowledgement packet to the first device by using the second port, and converts the second port into a common service port.
  • the first device After receiving the stack deactivation confirmation message sent by the second device, the first device deletes the information saved by the first device, converts the first port into a common service port, and then stacks the first device and the second device. The relationship is lifted.
  • the second device forwards the stack de-enabled message to the third device to release the stacking relationship between the third device and the second device.
  • the second device may forward the stack de-enable message to the third device before or after sending the stack de-encryption acknowledgement message to the first device by using the second port, or may perform the two steps in parallel.
  • the switches of the stacking system are configured to negotiate the different ports of the switch through the protocol packets, and the different ports have different functions, and the stacking and stacking are disabled, so that the switches can be enabled. Create a stack system by auto-negotiation without manual configuration.
  • an embodiment of the present invention further provides a stackable device.
  • the embodiment may be, for example, a second device that is a non-master device of the stack system in FIG. 1 .
  • the stacking device is called a local device, and the device includes:
  • the first receiving unit 601 is configured to receive, by the local device, a first stack enable message in an Ethernet format broadcast by the first device, where a source address of the first stack enable message is a MAC address of the first device.
  • the first stack-enabled packet carries information about a stacking relationship between the other devices in the switch that is about to establish the stacking system, and the first device is a master device of the stacking system.
  • the storage unit 602 is configured to record, by the local device, the MAC address of the first device.
  • the first sending unit 603 is configured to send, by the local device, the first stack acknowledgement packet in the Ethernet format from the second port to the first device, where the first stack acknowledgement packet carries the local device.
  • the MAC address and the second port are used as the information of the stack port, and the second port is located at the local device.
  • the creating unit 604 is configured to switch the second port from a normal service port to a stack port, and establish a stacking relationship with the first device.
  • the first receiving unit is further configured to: receive a second stack enable message in a stack format sent by the first device, and convert the second stack enable message into an Ethernet
  • the first stack of the network format enables the message.
  • the stackable device further includes:
  • a second sending unit configured to send, by using the third port, the first stack enable message in an Ethernet format to the third device.
  • a second receiving unit configured to receive a third stack acknowledgment message in an Ethernet format sent by the third device by using the fourth port, where the fourth port is located in the third device, and the third stack acknowledges the packet
  • the MAC address of the third device is carried, and the fourth port is used as information for the stack port of the local device.
  • a generating unit configured to encapsulate, by the local device, the third stack acknowledgment message into a second stack acknowledgment message in a stack format, where the second stack acknowledgment message carries the local device and the third device a MAC address, the third port as the information of the stack port facing the third device, and the fourth port as the third device facing the stack port of the local device, where the The fourth port is located in the third device, and the third port is located in the local device.
  • a switching unit configured to switch the third port from a normal service port to a stack port facing the third device.
  • a third sending unit configured to send the second stack confirmation packet to the first device by using the second port, to establish a stacking relationship between the local device and the third device.
  • the stackable device further includes:
  • the fourth sending unit is configured to broadcast, by the local device, a stack query message in an Ethernet format, where a source address of the stack query message is a MAC address of the local device, and a destination address is a broadcast.
  • a third receiving unit configured to receive a stack response message in an Ethernet format sent by the first device, where the stack response message is used to notify the local device, where the first device is a master device of the stacking system, and Establish a stack relationship with the first device.
  • the stacking device further includes:
  • a fourth receiving unit configured to receive a stack-disabled packet in a stack format that is broadcast by the first device, where the stack-disabled packet carries a MAC address of the first device, and is used to notify a non-master of the stacking system The device is unstacked;
  • the storage unit is further configured to delete the information saved by the local device.
  • the fourth sending unit is configured to send, by the local device, the stack format of the stack format to the first device to enable the acknowledgement message.
  • the switching unit converts the second port from a stack port to a normal service port.
  • the stacking device further includes:
  • a fifth sending unit configured to forward the stack de-enabled packet in a stack format to the third device by using the third port, to release a stacking relationship with the third device.
  • the stacking device further includes:
  • the interface conversion unit is configured to convert the third port into a common service port after receiving the stack deactivation confirmation message sent by the third device.
  • the switches of the stacking system can be configured to negotiate the different ports of the switch, and the different ports have different functions, and the stacking is enabled and the stacking is disabled.
  • a stacking system can be created by auto-negotiation without manual configuration.
  • the embodiment of the present invention further provides a stackable switch.
  • the embodiment may be, for example, a second device that is a non-master device of the stack system in FIG. 1 .
  • the stacking device in the middle is called a local device, and the device includes two network interfaces 701, 705, a processor 702, and a memory 703.
  • System bus 704 is used to connect network interface 701, processor 702, and memory 703.
  • the network interfaces 701 and 705 are hardware ports that can be switched between the normal service port and the stack port, and are respectively connected to a stackable switch.
  • the network interface 701 is connected to the first device.
  • the network interface 705 is coupled to a third device for communicating with other stackable switches, and the processor 702 can be a CPU.
  • the memory 703 may be a persistent storage such as a hard disk drive and a flash memory having a software module and a device driver therein.
  • the software modules are capable of performing the various functional modules of the above described methods of the present invention; the device drivers can be network and interface drivers.
  • a stack enable message broadcasted by the first device where the source address of the stack enable message is a MAC address of the first device, and the stack enable message carries other stacking systems to be established.
  • the other device in the switch may establish the information of the stack relationship with the first device, where the first device is the master device of the stack system.
  • the processor 702 records the MAC address of the first device.
  • the network interface 701 And sending, by the network interface 701, a stack acknowledgment message to the first device, where the stack acknowledgment message carries a MAC address of the second device and information that uses the network interface 701 as a stack port.
  • the processor 702 switches the network interface 701 from a normal service port to a stack port to establish a stack relationship with the first device.
  • the embodiment of the present invention further provides a stackable device, which may be, for example, the first device in FIG. 1 as a non-master device of the stack system.
  • a stackable device which may be, for example, the first device in FIG. 1 as a non-master device of the stack system.
  • the stack device in this embodiment is referred to as The local device includes:
  • the sending unit 801 is configured to broadcast, by using the first port, the first stack-enabled packet in the Ethernet format, where the source address of the first stack-enabled packet is the MAC address of the local device, and the first stack Enable packets to carry other settings
  • the device can be configured to establish a stack relationship with the local device, where the local device is the master device of the stacking system to be established, and the first port is located at the local device.
  • the receiving unit 802 is configured to receive a first stack acknowledgment message in an Ethernet format sent by the second device, where a destination address of the first stack acknowledgment message is a MAC address of the local device, and a source address is the The MAC address of the second device, where the second port is used as the information about the stack port of the local device, and the second port is located in the second device.
  • the switching unit 803 is configured to switch the first port from a normal service port to a stack port.
  • the storage unit 804 is configured to record a MAC address of the second device and a topological relationship between the first port and the second port.
  • the receiving unit 802 is further configured to: receive a second stack acknowledgement packet in a stack format sent by the second device, where the second stack acknowledgement packet carries a MAC address of the second device and the third device, The third port is located as information facing a stack port of the third device, and the fourth port is used as information of the third device facing a stack port of the second device, where the fourth port is located The third device, the third port is located in the second device.
  • the storage unit 804 is further configured to: record a MAC address of the third device, and a topological relationship between the fourth port and the third port.
  • the receiving unit 802 is further configured to receive a stack query message in an Ethernet format sent by the second device, where a source address of the stack query message is a MAC address of the second device.
  • the sending unit 801 is further configured to send, to the second device, a stack response message in an Ethernet format, where the stack response message is used to notify the second device, where the local device is a master of the stacking system.
  • a device can establish a stack relationship with the first device.
  • the sending unit 801 is further configured to: broadcast a stack-disabled packet in a stack format, where the stack-disabled packet carries a MAC address of the first device, and is used to notify the non-master device of the stacking system to release the The stacking system.
  • the storage unit 804 is further configured to delete the information saved by the first device after receiving the stack de-enabled acknowledgement message sent by the second device.
  • the switching unit 803 converts the first port from a stack port to a normal service port.
  • the embodiment of the present invention further provides a stackable switch, which may be, for example, the first device in FIG. 1 as a main device of the stack system.
  • the stacking device is called a local device, and the device includes a network interface 901, a processor 902, and a memory 903.
  • System bus 904 is used to connect network interface 901, processor 902, and memory 903.
  • the network interface 901 is a hardware port that can perform state switching between a common service port and a stack port, and is respectively connected to a stackable switch.
  • the network interface 901 is connected to the second device.
  • the processor 902 can be a CPU.
  • the memory 903 may be a persistent storage such as a hard disk drive and a flash memory having a software module and a device driver therein.
  • the software modules are capable of performing the various functional modules of the above described methods of the present invention; the device drivers can be network and interface drivers.
  • the first stack-enabled packet in the Ethernet format is broadcasted through the network interface 901, the source address of the first stack-enabled packet is the MAC address of the local device, and the first stack-enabled packet carries other
  • the device can establish a stack relationship with the local device, where the local device is the master device of the stacking system to be established.
  • a first stack acknowledgment message in an Ethernet format sent by the second device where the destination address of the first stack acknowledgment message is a MAC address of the local device, and the source address is the second device And a MAC address, where the second port is used as the information about the stack port of the local device, and the second port is located in the second device.
  • the processor 902 device switches the network interface 901 from a normal service port to a stack port, and the memory 3 records a MAC address of the second device and a topological relationship between the first port and the second port.
  • the steps of a method or algorithm described in connection with the embodiments disclosed herein can be implemented in hardware, a software module executed by a processor, or a combination of both.
  • the software module can be placed in random access memory (English random access memory, abbreviation: RAM), memory, read-only memory (English: read only memory, abbreviation: ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, A hard disk, a removable disk, a compact disk read-only memory (English: Compact Disc Read-Only Memory, CD-ROM), or any other form of storage medium known in the art.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)

Abstract

An embodiment of the present invention provides a stacking implementation method. The method comprises: a first device broadcasting a stacking enabled packet through a first port, the stacking enabled packet carrying information through which another device can establish a stacking relationship with the first device, the first device being a main device of a stacking system, the first port for broadcasting the stacking enabled packet being used as a stacking port of the first device, and the first port being located at the first device; the first device receiving a first stacking confirmation packet sent by a second device, the first stacking confirmation packet carrying a MAC address of the second device and information for using the second part as a stacking port oriented to the first device, of the second device, and the second port being located at the second device; and the first device switching the first port from a common service port to a stacking port, and recording the MAC address of the second device and a topological relationship between the first port and the second port. By using the foregoing embodiment, the switches can establish, by means of autonegotiation, a stacking system without manual configuration.

Description

堆叠实现方法及可堆叠设备Stack implementation method and stackable device
本申请要求于2014年1月14日提交中国专利局、申请号为201410015370.2、发明名称为“堆叠实现方法及可堆叠设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. 201410015370.2, entitled "Stacking Implementation Method and Stackable Device", filed on January 14, 2014, the entire contents of which is incorporated herein by reference. .
技术领域Technical field
本发明涉及通信领域,具体涉及一种堆叠实现方法及可堆叠设备。The present invention relates to the field of communications, and in particular, to a stack implementation method and a stackable device.
背景技术Background technique
堆叠是指将一台以上的交换机组合起来共同工作,以便在有限的空间内提供尽可能多的端口,多台交换机经过堆叠形成一个堆叠系统,对堆叠系统外的连接设备,组成堆叠系统的几台交换机是一台交换机。组成该堆叠系统的多台交换机中的一台交换机作为主设备,负责整个堆叠系统的管理。Stacking refers to combining more than one switch to work together to provide as many ports as possible in a limited space. Multiple switches are stacked to form a stacking system, and connected devices outside the stacking system form a stacking system. A switch is a switch. One of the multiple switches that make up the stack system serves as the master device and is responsible for the management of the entire stack system.
通常地,存在几种堆叠系统的实现方式,例如,交换机上设置有专用的堆叠端口,堆叠端口仅用于堆叠系统内的信息传递,例如交换机之间的一致性信息以及实时同步数据等信息,不能作为普通业务端口向外部设备做业务转发。但是这种方式中,对交换设备的端口有一定浪费。另一种堆叠的实现方式为端口混用的方式,也就是说普通业务端口也可以作为堆叠端口,通过命令指定端口的角色,指定某一个端口为普通业务端口或者堆叠端口,这种方式可以防止端口浪费。但是这种方式需要手动指定堆叠设备间相连端口的角色,当堆叠设备数量较多时,工作人员部署的工作量大,容易产生错误配置,影响堆叠系统运行。Generally, there are several implementations of the stacking system. For example, a dedicated stacking port is provided on the switch, and the stacking port is only used for information transmission in the stacking system, such as consistency information between switches and real-time synchronization data. You cannot forward traffic to an external device as a normal service port. However, in this way, there is a waste of the port of the switching device. Another type of stack is implemented as a port. This means that a common service port can also be used as a stack port. You can specify a port as a common service port or stack port by specifying the role of the port. waste. In this mode, you need to manually specify the role of the connected port between the stacking devices. When the number of stacking devices is large, the workload of the staff is large, which may cause misconfiguration and affect the operation of the stacking system.
发明内容Summary of the invention
本发明的目的是提供一种堆叠实现方法,以实现无需手工配置情况下,多个交换机设备实现堆叠系统。It is an object of the present invention to provide a stack implementation method to implement a stacking system for multiple switch devices without manual configuration.
为实现上述目的,本发明提供了一种堆叠实现方法,所述方法包括:To achieve the above object, the present invention provides a method for implementing a stack, the method comprising:
第一设备通过第一端口广播以太网格式的第一堆叠使能报文,所述第一堆叠使能报文的源地址为所述第一设备的MAC地址,所述第一堆叠使能报文携带其他设备可以与所述第一设备建立堆叠关系的信息,所述第一设备为即将建立的堆叠系统的主设备,所述第一端口位于所述第一设备; The first device broadcasts the first stack enable message in the Ethernet format by using the first port, the source address of the first stack enable message is the MAC address of the first device, and the first stack enable report The device carries the information that the other device can establish a stack relationship with the first device, where the first device is the master device of the stacking system to be established, and the first port is located in the first device;
所述第一设备接收第二设备发送的以太网格式的第一堆叠确认报文,所述第一堆叠确认报文的目的地址为所述第一设备的MAC地址,源地址为所述第二设备的MAC地址,其中携带有将所述第二端口作为所述第二设备的面向所述第一设备的堆叠端口的信息,所述第二端口位于所述第二设备;The first device receives the first stack acknowledgment message in the Ethernet format sent by the second device, where the destination address of the first stack acknowledgment message is the MAC address of the first device, and the source address is the second a MAC address of the device, where the second port is used as the information about the stack port of the second device, and the second port is located in the second device;
所述第一设备将所述第一端口从普通业务端口切换为堆叠端口,记录所述第二设备的MAC地址和所述第一端口和所述第二端口的拓扑关系。The first device switches the first port from a normal service port to a stack port, and records a MAC address of the second device and a topological relationship between the first port and the second port.
基于第一方面,在第一方面的第一种可能的实施方式中,所述第一设备将所述第一端口从普通业务端口切换为堆叠端口,记录所述第二设备的MAC地址和所述第一端口和所述第二端口的拓扑关系,之后,还包括:In a first possible implementation manner of the first aspect, the first device switches the first port from a normal service port to a stack port, and records a MAC address and a location of the second device. The topological relationship between the first port and the second port, and then includes:
通过所述第一端口向所述第二设备发送堆叠格式的第二堆叠使能报文;Sending, by the first port, a second stack enable message in a stack format to the second device;
通过所述第一端口接收第二设备发送的堆叠格式的第二堆叠确认报文,所述第二堆叠确认报文中携带有第二设备和第三设备的MAC地址,将所述第三端口作为面向所述第三设备的堆叠端口的信息、以及将所述第四端口作为所述第三设备面向所述第二设备的堆叠端口的信息,所述第四端口位于所述第三设备,所述第三端口位于所述第二设备;Receiving, by the first port, a second stack acknowledgment message in a stack format sent by the second device, where the second stack acknowledgment message carries a MAC address of the second device and the third device, and the third port is As the information of the stack port facing the third device, and the information that the fourth port is the stack port of the third device facing the second device, the fourth port is located in the third device, The third port is located in the second device;
所述第一设备记录所述第三设备的MAC地址,和所述第四端口与所述第三端口的拓扑关系。The first device records a MAC address of the third device, and a topological relationship between the fourth port and the third port.
第二方面,本发明实施例提供了一种堆叠实现方法,所述方法包括:In a second aspect, an embodiment of the present invention provides a method for implementing a stack, where the method includes:
第二设备通过第二端口接收第一设备广播的以太网格式的第一堆叠使能报文,所述第一堆叠使能报文的源地址为所述第一设备的MAC地址,所述第一堆叠使能报文携带其他设备可以与所述第一设备建立堆叠关系的信息,所述第一设备为即将建立的堆叠系统的主设备;Receiving, by the second device, the first stack enable message in the Ethernet format broadcasted by the first device by using the second port, where the source address of the first stack enable message is the MAC address of the first device, where the A stack-enabled packet carries information that another device can establish a stack relationship with the first device, where the first device is a master device of a stacking system to be established;
第二设备记录所述第一设备的MAC地址;The second device records the MAC address of the first device;
所述第二设备通过第二端口向所述第一设备发送以太网格式的第一堆叠确认报文,的目的地址为所述第一设备的MAC地址,源地址为所述第二设备的MAC地址,所述第一堆叠确认报文携带将所述第二端口作为所述第二设备的面向所述第一设备的堆叠端口的信息,所述第二端口位于所述第二设备;The second device sends a first stack acknowledgement packet in an Ethernet format to the first device by using the second port, where the destination address is the MAC address of the first device, and the source address is the MAC address of the second device. An address, the first stack confirmation message carrying the second port as the information of the second device facing the stack port of the first device, and the second port is located in the second device;
将所述第二端口从普通业务端口切换为堆叠端口。Switching the second port from a normal service port to a stack port.
基于第二方面,在第二方面的第一种可能的实施方式中,所述将所述第二端口从普通业务端口切换为堆叠端口,建立与所述第一设备的堆叠关系,之后,还包括:According to the second aspect, in a first possible implementation manner of the second aspect, the the second port is switched from a normal service port to a stack port, and a stacking relationship with the first device is established, and then, include:
第二设备通过第二端口接收第一设备发送的堆叠格式的第二堆叠使能报文; Receiving, by the second device, the second stack enable message in the stack format sent by the first device by using the second port;
第二设备将所述第二堆叠使能报文转换为以太网格式的第三堆叠使能报文;The second device converts the second stack enable message into a third stack enable message in an Ethernet format;
第二设备通过第三端口向第三设备发送以太网格式的所述第三堆叠使能报文,所述第三端口位于所述第二设备;The second device sends the third stack enable message in an Ethernet format to the third device by using the third port, where the third port is located in the second device;
接收所述第三设备通过第四端口发送的以太网格式的第三堆叠确认报文,所述第四端口位于所述第三设备,所述第三堆叠确认报文的目的地址为所述第二设备的MAC地址,所述第三堆叠确认报文的源地址为所述第三设备的,携带将所述第四端口作为面向所述第二设备的堆叠端口的信息;And receiving, by the third device, a third stack acknowledgment message in an Ethernet format sent by the fourth port, where the fourth port is located in the third device, and the destination address of the third stack acknowledgment message is the a MAC address of the second device, where the source address of the third stack acknowledgment message is the third device, and the information of the fourth port is used as a stack port facing the second device;
所述第二设备将所述第三堆叠确认报文转换为堆叠格式的第二堆叠确认报文,所述第二堆叠确认报文中携带有第二设备和第三设备的MAC地址,将所述第三端口作为第二设备面向所述第三设备的堆叠端口的信息、以及将所述第四端口作为所述第三设备面向所述第二设备的堆叠端口的信息,所述第四端口位于所述第三设备,所述第三端口位于所述第二设备;The second device converts the third stack acknowledgment message into a second stack acknowledgment message in a stack format, where the second stack acknowledgment message carries the MAC address of the second device and the third device, The third port is used as the information of the second device facing the stack port of the third device, and the fourth port is used as the information of the third device facing the stack port of the second device, the fourth port Located in the third device, the third port is located in the second device;
将所述第三端口从普通业务端口切换为堆叠端口;Switching the third port from a normal service port to a stack port;
通过第二端口向所述第一设备发送所述第二堆叠确认报文。Sending, by the second port, the second stack acknowledgement message to the first device.
基于第二方面,在第二方面的第二种可能的实施方式中,在建立与所述第一设备的堆叠关系,之后,还包括:Based on the second aspect, in a second possible implementation manner of the second aspect, after establishing a stacking relationship with the first device, the method further includes:
接收所述第一设备广播的堆叠格式的堆叠去使能报文,该堆叠去使能报文携带所述第一设备的MAC地址,用于通知堆叠系统的非主设备解除堆叠系统;Receiving a stack-disabled packet in a stack format that is broadcast by the first device, where the stack-disabled packet carries a MAC address of the first device, and is used to notify the non-master device of the stacking system to cancel the stacking system;
删除所述第二设备保存的信息;Deleting information saved by the second device;
第二设备通过所述第二端口向所述第一设备发送堆叠格式的堆叠去使能确认报文;Sending, by the second device, the stack format of the stack format to the first device to enable the acknowledgement message;
将所述第二端口从堆叠端口转换为普通业务端口。Converting the second port from a stack port to a normal service port.
基于第二方面的第二种可能的实施方式,在第二方面的第三种可能的实施方式中,所述将所述第二端口从堆叠端口转换为普通业务端口,之后,还包括:Based on the second possible implementation of the second aspect, in a third possible implementation manner of the second aspect, the converting the second port from the stack port to the normal service port, and then:
通过所述第三端口向所述第三设备转发所述堆叠格式的堆叠去使能报文,以解除与所述第三设备的堆叠关系;Forwarding, by the third port, the stack-disabled packet in the stack format to the third device, to release the stacking relationship with the third device;
接收到所述第三设备发送的堆叠格式的堆叠去使能确认报文后,将所述第三端口转换为普通业务端口。After receiving the stack-disabled acknowledgement packet in the stack format sent by the third device, the third port is converted into a normal service port.
第三方面,本发明实施例提供了一种可堆叠设备,所述可堆叠设备包括:In a third aspect, an embodiment of the present invention provides a stackable device, where the stackable device includes:
发送单元,用于通过第一端口广播以太网格式的第一堆叠使能报文,所述第一堆叠使能报文的源地址为所述本端设备的MAC地址,所述第一堆叠使能报文携带其他设备可 以与所述本端设备建立堆叠关系的信息,所述本端设备为即将建立的堆叠系统的主设备,所述第一端口位于所述本端设备;a sending unit, configured to broadcast, by using the first port, a first stack-enabled packet in an Ethernet format, where a source address of the first stack-enabled packet is a MAC address of the local device, where the first stack is configured Can carry other equipment in the message. The first device is located at the local device, where the local device is the master device of the stacking system to be established.
接收单元,用于接收第二设备发送的以太网格式的第一堆叠确认报文,所述第一堆叠确认报文的目的地址为所述本端设备的MAC地址,源地址为所述第二设备的MAC地址,其中携带有将所述第二端口作为所述第二设备的面向所述本端设备的堆叠端口的信息,所述第二端口位于所述第二设备;a receiving unit, configured to receive a first stack acknowledgment message in an Ethernet format sent by the second device, where a destination address of the first stack acknowledgment message is a MAC address of the local device, and a source address is the second a MAC address of the device, where the second port is used as the information about the stack port of the local device, and the second port is located in the second device;
切换单元,用于将所述第一端口从普通业务端口切换为堆叠端口;a switching unit, configured to switch the first port from a normal service port to a stack port;
存储单元,用于记录所述第二设备的MAC地址和所述第一端口和所述第二端口的拓扑关系。a storage unit, configured to record a MAC address of the second device and a topological relationship between the first port and the second port.
基于第三方面,在第三方面的第一种可能的实施方式中,Based on the third aspect, in a first possible implementation manner of the third aspect,
所述发送单元还用于:通过所述第一端口向所述第二设备发送堆叠格式的第二堆叠使能报文;The sending unit is further configured to: send, by using the first port, a second stack enable message in a stack format to the second device;
所述接收单元还用于:通过第一端口接收第二设备发送的堆叠格式的第二堆叠确认报文,所述第二堆叠确认报文中携带有第二设备和第三设备的MAC地址,将所述第三端口作为面向所述第三设备的堆叠端口的信息、以及将所述第四端口作为所述第三设备面向所述第二设备的堆叠端口的信息,所述第四端口位于所述第三设备,所述第三端口位于所述第二设备;The receiving unit is further configured to: receive, by using the first port, a second stack acknowledgment message in a stack format sent by the second device, where the second stack acknowledgment message carries a MAC address of the second device and the third device, The third port is located as information facing a stack port of the third device, and the fourth port is used as information of the third device facing a stack port of the second device, where the fourth port is located The third device, the third port is located in the second device;
所述存储单元还用于:记录所述第三设备的MAC地址,和所述第四端口与所述第三端口的拓扑关系。The storage unit is further configured to: record a MAC address of the third device, and a topological relationship between the fourth port and the third port.
第四方面,本发明实施例还提供了一种可堆叠设备,所述可堆叠设备包括:In a fourth aspect, the embodiment of the present invention further provides a stackable device, where the stackable device includes:
第一接收单元,用于本端设备通过第二端口接收第一设备广播的以太网格式的第一堆叠使能报文,所述第一堆叠使能报文的源地址为所述第一设备的MAC地址,所述第一堆叠使能报文携带其他设备可以与所述第一设备建立堆叠关系的信息,所述第一设备为即将建立的堆叠系统的主设备;a first receiving unit, configured to receive, by using the second port, the first stack enable message in an Ethernet format broadcast by the first device, where the source address of the first stack enable message is the first device MAC address, the first stack enable message carries information that another device can establish a stack relationship with the first device, and the first device is a master device of the stack system to be established;
存储单元,用于本端设备记录所述第一设备的MAC地址;a storage unit, configured to record, by the local device, a MAC address of the first device;
第一发送单元,用于所述本端设备通过第二端口向所述第一设备发送以太网格式的第一堆叠确认报文,所述第一堆叠确认报文的目的地址为所述第一设备的MAC地址,源地址为所述第二设备的MAC地址,所述第一堆叠确认报文携带将所述第二端口作为所述第二设备的面向所述第一设备的堆叠端口的信息,所述第二端口位于所述本端设备;a first sending unit, configured to send, by using the second port, the first stack acknowledgement packet in an Ethernet format to the first device, where the destination address of the first stack acknowledgement packet is the first The MAC address of the device, the source address is the MAC address of the second device, and the first stack acknowledgment message carries the second port as the information of the stack port of the second device facing the first device. The second port is located at the local device;
创建单元,用于将所述第二端口从普通业务端口切换为堆叠端口。 And a creating unit, configured to switch the second port from a normal service port to a stack port.
基于第四方面,在第四方面的第一种可能的实施方式中,所述第一接收单元还用于:通过第二端口接收第一设备发送的堆叠格式的第二堆叠使能报文,将所述第二堆叠使能报文转换为以太网格式的第三堆叠使能报文;According to the fourth aspect, in a first possible implementation manner of the fourth aspect, the first receiving unit is further configured to: receive, by using the second port, a second stack enable message in a stack format sent by the first device, Translating the second stack enable message into a third stack enable message in an Ethernet format;
所述堆叠设备还包括:The stacking device further includes:
第二发送单元,用于通过第三端口向第三设备发送以太网格式的所述第三堆叠使能报文,所述第三端口位于所述第二设备;a second sending unit, configured to send, by using the third port, the third stack enable message in an Ethernet format to the third device, where the third port is located in the second device;
第二接收单元,用于接收所述第三设备通过第四端口发送的以太网格式的第三堆叠确认报文,所述第四端口位于所述第三设备,所述第三堆叠确认报文的目的地址为所述第二设备的MAC地址,所述第三堆叠确认报文的源地址为所述第三设备的,携带将所述第四端口作为面向所述本端设备的堆叠端口的信息;a second receiving unit, configured to receive a third stack acknowledgment message in an Ethernet format sent by the third device by using the fourth port, where the fourth port is located in the third device, and the third stack acknowledges the packet The destination address is the MAC address of the second device, and the source address of the third stack acknowledgment packet is the third device, and the fourth port is configured as a stack port facing the local device. information;
生成单元,用于所述本端设备将所述第三堆叠确认报文封装为堆叠格式的第二堆叠确认报文,所述第二堆叠确认报文中携带有本端设备和第三设备的MAC地址,将所述第三端口作为本端设备面向所述第三设备的堆叠端口的信息、以及将所述第四端口作为所述第三设备面向所述本端设备的堆叠端口的信息,所述第四端口位于所述第三设备,所述第三端口位于所述本端设备;a generating unit, configured to encapsulate, by the local device, the third stack acknowledgment message into a second stack acknowledgment message in a stack format, where the second stack acknowledgment message carries the local device and the third device a MAC address, the information of the third port being the stack port of the local device, and the fourth port being the information of the third device facing the stack port of the local device, The fourth port is located in the third device, and the third port is located in the local device;
切换单元,用于将所述第三端口从普通业务端口切换为堆叠端口;a switching unit, configured to switch the third port from a normal service port to a stack port;
第三发送单元,用于通过第二端口向所述第一设备发送所述第二堆叠确认报文,以建立所述本端设备和所述第三设备的堆叠关系。And a third sending unit, configured to send the second stack confirmation packet to the first device by using the second port, to establish a stacking relationship between the local device and the third device.
基于第四方面的第一种可能的实施方式,在第四方面的第二种可能的实施方式中,所述设备还包括:According to a first possible implementation manner of the fourth aspect, in a second possible implementation manner of the fourth aspect, the device further includes:
第四接收单元,用于接收所述第一设备广播的堆叠格式的堆叠去使能报文,该堆叠去使能报文携带所述第一设备的MAC地址,用于通知堆叠系统的非主设备解除堆叠系统;a fourth receiving unit, configured to receive a stack-disabled packet in a stack format that is broadcast by the first device, where the stack-disabled packet carries a MAC address of the first device, and is used to notify a non-master of the stacking system The device is unstacked;
所述存储单元还用于,删除所述本端设备保存的信息;The storage unit is further configured to delete the information saved by the local device;
第四发送单元,用于本端设备通过所述第二端口向所述第一设备发送堆叠格式的堆叠去使能确认报文;a fourth sending unit, configured to send, by the local device, the stack format of the stack format to enable the acknowledgement packet to the first device by using the second port;
所述切换单元将所述第二端口从堆叠端口转换为普通业务端口。The switching unit converts the second port from a stack port to a normal service port.
基于第四方面的第二种可能的实施方式,在第四方面的第三种可能的实施方式中,所述设备还包括:According to a second possible implementation manner of the fourth aspect, in a third possible implementation manner of the fourth aspect, the device further includes:
第五发送单元,用于通过所述第三端口向所述第三设备转发堆叠格式的所述堆叠去使能报文,以解除与所述第三设备的堆叠关系; a fifth sending unit, configured to forward the stack de-enabled packet in a stack format to the third device by using the third port, to release a stacking relationship with the third device;
接口转换单元,用于在接收到所述第三设备发送的堆叠去使能确认报文后,将所述第三端口转换为普通业务端口。The interface conversion unit is configured to convert the third port into a common service port after receiving the stack deactivation confirmation message sent by the third device.
本发明提供的堆叠实现方法,通过构建堆叠系统的交换机之间,通过协议报文,协商交换机不同端口的角色,实现不同端口具有不同的功能,并且实现堆叠使能和堆叠去使能,使得这些交换机能够在不需要人工配置的情况下,自协商创建堆叠系统。The stack implementation method provided by the present invention implements the functions of the different ports of the switch through the protocol packets, and implements different functions of the ports, and implements stack enable and stack disable. The switch can create a stack system through auto-negotiation without manual configuration.
附图说明DRAWINGS
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the embodiments or the description of the prior art will be briefly described below. It is obvious that the drawings in the following description are only the present invention. For some embodiments, other drawings may be obtained from those of ordinary skill in the art in light of the inventive workability.
图1是堆叠系统构建的系统架构图;1 is a system architecture diagram of a stack system construction;
图2是本发明实施例提供的堆叠实现方法一种实施例的流程图;2 is a flowchart of an embodiment of a stack implementation method according to an embodiment of the present invention;
图3是本发明实施例提供的堆叠实现方法另一实施例的交互图;3 is an interaction diagram of another embodiment of a stack implementation method according to an embodiment of the present invention;
图4是本发明实施例提供的堆叠实现方法又一实施例的交互图;4 is an interaction diagram of still another embodiment of a stack implementation method according to an embodiment of the present invention;
图5是本发明实施例提供的堆叠实现方法的一种设备状态交互图;FIG. 5 is a device state interaction diagram of a stack implementation method according to an embodiment of the present invention; FIG.
图6是本发明实施例提供的可堆叠设备的一种实施例的结构图;FIG. 6 is a structural diagram of an embodiment of a stackable device according to an embodiment of the present invention; FIG.
图7是本发明实施例提供的可堆叠交换机的一种实施例的结构图;7 is a structural diagram of an embodiment of a stackable switch according to an embodiment of the present invention;
图8是本发明实施例提供的可堆叠设备的一种实施例的结构图;FIG. 8 is a structural diagram of an embodiment of a stackable device according to an embodiment of the present invention; FIG.
图9是本发明实施例提供的可堆叠交换机的一种实施例的结构图。FIG. 9 is a structural diagram of an embodiment of a stackable switch according to an embodiment of the present invention.
具体实施方式detailed description
下面通过附图和实施例,对本发明的技术方案做进一步的详细描述。The technical solution of the present invention will be further described in detail below through the accompanying drawings and embodiments.
本发明实施例提供的堆叠实现方法用于构建如图1所示的堆叠系统,在所述的堆叠系统中包括多个交换机,其中的一个交换机被配置或者指定为主设备,剩余的交换机则作为非主设备,由于堆叠系统采用线形(英文:linear)连接方式,所以每个非主设备具有不超过两个用于堆叠系统创建的端口,该端口可以是物理端口,也可以是逻辑上的链路聚合(英文:link aggregation)端口。图1中第一设备通过第一端口eth1连接到第二设备上的第二端口eth2,第二设备再通过第三端口eth3连接到第三设备上的第四端 口eth4。本发明实施例可以实现在三种不同的场景下,使得堆叠系统中的交换机设备,能够自动建立堆叠系统。The stack implementation method provided by the embodiment of the present invention is used to construct a stacking system as shown in FIG. 1. The stacking system includes multiple switches, one of which is configured or designated as a master device, and the remaining switches are used as Non-master devices. Because the stacking system uses a linear (English: linear) connection, each non-master device has no more than two ports for the stack system. The port can be a physical port or a logical chain. Road aggregation (English: link aggregation) port. The first device in FIG. 1 is connected to the second port eth2 on the second device through the first port eth1, and the second device is connected to the fourth terminal on the third device through the third port eth3. Mouth eth4. In the embodiment of the present invention, the switch device in the stack system can automatically establish a stacking system in three different scenarios.
如图2所示,本发明实施例提供了一种堆叠实现方法,该实施例应用于图1中的主设备,为便于说明,该主设备称为第一设备,所述方法包括:As shown in FIG. 2, the embodiment of the present invention provides a method for implementing a stack, which is applied to the master device in FIG. 1. For convenience of description, the master device is referred to as a first device, and the method includes:
201,第一设备通过第一端口广播以太网格式的第一堆叠使能报文。201. The first device broadcasts a first stack enable message in an Ethernet format by using the first port.
具体而言,可进一步参考图3,其为本发明第一实施例的状态交互图,在本实施例中,堆叠系统的几个交换设备已经建立了物理连接,并且所述第一设备已经被指定为即将建立堆叠系统的几个交换机中的主设备。Specifically, reference may be made to FIG. 3, which is a state interaction diagram of the first embodiment of the present invention. In this embodiment, several switching devices of the stacking system have established physical connections, and the first device has been Designated as the primary device in several switches that will be building a stacking system.
更具体的,第一堆叠使能报文是由主设备发出的广播报文,该第一堆叠使能报文位以太网格式的报文,其源地址为发送端的MAC地址,该第一堆叠使能报文的目的地址为广播地址。第一堆叠使能报文用来通知即将建立堆叠系统的几个交换机中的其他交换机,主设备想要与其他交换机建立堆叠系统。More specifically, the first stack-enabled packet is a broadcast packet sent by the master device, and the first stack enables the packet in the Ethernet format, the source address of which is the MAC address of the sender, and the first stack The destination address of the enabled packet is the broadcast address. The first stack enable message is used to notify other switches in several switches that are about to establish a stack system. The master device wants to establish a stack system with other switches.
在本实施例中,所述第一堆叠使能报文的源地址为所述第一设备的MAC地址,所述第一堆叠使能报文指示第一设备想要与第二设备建立堆叠关系的信息,第二设备可以根据第一设备想要与第二设备建立堆叠关系的信息与所述第一设备建立堆叠关系。In this embodiment, the source address of the first stack-enabled packet is the MAC address of the first device, and the first stack-enabled packet indicates that the first device wants to establish a stack relationship with the second device. The second device may establish a stack relationship with the first device according to the information that the first device wants to establish a stack relationship with the second device.
例如,在30秒的时间内,第一设备从与第二设备连接的第一端口Eth1每间隔1秒(英文:second,符号:s)发送一次堆叠使能报文。如果第一设备在设定时间内未收到确认报文,放弃建立堆叠系统。For example, in a period of 30 seconds, the first device sends a stack enable message every 1 second (English: second, symbol: s) from the first port Eth1 connected to the second device. If the first device does not receive the confirmation message within the set time, the stacking system is abandoned.
此时第二设备尚未与第一设备建立堆叠关系,第二设备收到以太网格式的第一堆叠使能报文后,记录第一堆叠使能报文中携带的第一设备的MAC地址,丢弃堆叠使能报文,之后从第二设备的第二端口Eth2发送第一堆叠确认报文给第一设备。The second device has not yet established a stack relationship with the first device. After receiving the first stack enable packet in the Ethernet format, the second device records the MAC address of the first device carried in the first stack enable packet. The stack-enabled packet is discarded, and then the first stack acknowledgement packet is sent from the second port Eth2 of the second device to the first device.
具体的,第一堆叠确认报文是由第二设备发出的,用来应答第一设备的堆叠使能报文的报文,此时尚未建立堆叠系统,因此第一堆叠确认报文为以太网格式。其目的地址为第一设备的MAC地址,源地址为第二设备的MAC地址。该第一堆叠确认报文中包括该第一堆叠确认报文转发路径上的设备的MAC地址和所述第二端口的端口标识。Specifically, the first stack acknowledgment message is sent by the second device, and is used to respond to the packet of the stacking enable message of the first device. format. The destination address is the MAC address of the first device, and the source address is the MAC address of the second device. The first stack acknowledgement packet includes a MAC address of the device on the forwarding path of the first stack acknowledgement packet and a port identifier of the second port.
在本实施例中,所述第一堆叠确认报文中携带所述第二设备的MAC地址和将所述第二端口作为堆叠端口的信息,第二设备发送第一堆叠确认报文后,第二设备将第二端口的状态从普通业务端口切换为堆叠端口。In this embodiment, the first stack acknowledgement packet carries the MAC address of the second device and the information that the second port is configured as a stack port, and after the second device sends the first stack acknowledgement packet, the second device The second device switches the state of the second port from the normal service port to the stack port.
在第二设备将第二端口切换为堆叠端口之后,第二端口对通过堆叠端口发送的报文都需要封装为堆叠格式的报文,例如在以太报文的头部添加堆叠标识字段,和普通业务 端口发送的业务报文的进行区分。之后,持续发送的堆叠确认报文的格式也变更为堆叠格式的报文。After the second port is configured to switch the second port to the stack port, the second port needs to encapsulate the packet in the stack format. For example, the stack identifier field is added to the header of the Ethernet packet. Business The service packets sent by the port are differentiated. After that, the format of the stack acknowledgement packet that is continuously sent is also changed to the packet in the stack format.
202,所述第一设备接收第二设备发送的以太网格式的第一堆叠确认报文。202. The first device receives a first stack acknowledgement packet in an Ethernet format sent by the second device.
具体的,所述第一堆叠确认报文的目的地址为所述第一设备的MAC地址,所述第一堆叠确认报文的源地址为所述第二设备的MAC地址,所述第一堆叠确认报文的中携带有所述第二设备的MAC地址和将所述第二端口作为所述第二设备的面向所述第一设备的堆叠端口的信息。Specifically, the destination address of the first stack acknowledgment message is a MAC address of the first device, and the source address of the first stack acknowledgment message is a MAC address of the second device, the first stack The confirmation message carries the MAC address of the second device and the second port as the information of the second device facing the stack port of the first device.
203,第一设备将第一端口的状态从普通业务端口切换为堆叠端口,记录所述第二设备的MAC地址和所述第一端口和所述第二端口的拓扑关系。203. The first device switches the state of the first port from the normal service port to the stack port, and records the MAC address of the second device and the topological relationship between the first port and the second port.
具体而言,第一设备在接收到第一堆叠确认报文之后,将第一端口的状态从普通业务端口切换为堆叠端口,之后,第一设备对通过堆叠端口发送的报文都需要封装为堆叠格式的报文,例如在以太报文的头部添加堆叠标识字段,和普通业务端口发送的业务报文的进行区分。之后,持续发送的堆叠使能报文的格式也变更为堆叠格式的报文。Specifically, after receiving the first stack acknowledgement packet, the first device switches the state of the first port from the normal service port to the stack port, and then the first device needs to encapsulate the packet sent by the stack port as A packet in the stack format, for example, adds a stack identifier field to the header of the Ethernet packet to distinguish it from the service packet sent by the common service port. After that, the format of the stack-enabled packet that is sent continuously is also changed to the packet in the stack format.
具体的,此时第一设备的第一端口已经转换为堆叠端口,此后,第一设备对之后收到的第二设备发送的堆叠报文格式的第一堆叠确认报文将不做处理。Specifically, the first port of the first device has been converted into a stack port, and the first device does not process the first stack acknowledgement packet in the stack packet format sent by the second device.
进一步,在第一设备与第二设备已经建立堆叠关系之后,第一设备仍然在不断发送堆叠报文格式的第二堆叠使能报文,此时,第二设备仍然能够不断收到第二堆叠使能报文。第二设备从第二端口再次接收到第二堆叠使能报文之后,由于与第三设备并未建立堆叠关系,因此需要将堆叠报文格式的堆叠使能报文中的堆叠标识字段去除,形成普通以太报文格式的第三堆叠使能报文,之后,通过第三端口Eth3向第三设备转发所述以太报文格式的第三堆叠使能报文。Further, after the first device and the second device have established the stacking relationship, the first device is still continuously sending the second stack enable message in the stack packet format, and the second device can still receive the second stack continuously. Enable the message. After the second device receives the second stack-enabled packet from the second port, the stack identifier field in the stack-enabled packet is removed from the stack-enabled packet. The third stack enable message is formed in the normal Ethernet packet format, and then the third stack enable message in the Ethernet packet format is forwarded to the third device through the third port Eth3.
与第二设备第一次接收到第一堆叠使能报文后的处理类似,第三设备记录第一设备的MAC地址,并通过第四端口Eth4发送以太网格式的第三堆叠确认报文给第二设备,所述第四端口位于所述第三设备,所述第三堆叠确认报文中携带所述第三设备的MAC地址,和将所述第四端口作为面向所述第二设备的堆叠端口的信息。之后,第三设备将第四端口的工作状态从普通业务端口切换为堆叠端口。Similar to the processing after the first device receives the first stack enable message, the third device records the MAC address of the first device, and sends a third stack acknowledgement packet in the Ethernet format to the fourth port Eth4. a second device, where the fourth port is located in the third device, the third stack acknowledgement packet carries a MAC address of the third device, and the fourth port is used as the second device Information about the stacking port. Thereafter, the third device switches the working state of the fourth port from the normal service port to the stack port.
第三设备在将第四端口切换为堆叠端口之后,第一设备对通过堆叠端口发送的报文都需要封装为堆叠格式的报文,例如在以太报文的头部添加堆叠标识字段,和普通业务端口发送的业务报文的进行区分。之后,给第二设备发送的堆叠确认报文的格式也变更为堆叠格式的报文。 After the third device is configured to switch the fourth port to the stack port, the first device needs to encapsulate the packet in the stack format for the packets sent through the stack port, for example, adding a stack identifier field to the header of the Ethernet packet, and The service packets sent by the service port are differentiated. Then, the format of the stack acknowledgement packet sent to the second device is also changed to the packet in the stack format.
第二设备接收所述第三设备通过第四端口发送的以太网格式的第三堆叠确认报文,之后,将第三端口从普通业务端口切换为堆叠端口。并且,生成堆叠格式的第二堆叠确认报文,所述第二堆叠确认报文中携带有第二设备和第三设备的MAC地址,将所述第三端口作为所述第二设备面向所述第三设备的堆叠端口的信息、以及将所述第四端口作为所述第三设备面向所述第二设备的堆叠端口的信息。通过第二端口向所述第一设备发送所述第二堆叠确认报文,所述第一设备接收到第二堆叠确认报文之后,记录所述第三设备的MAC地址,和所述第四端口与所述第三端口的堆叠对应关系,第二堆叠确认报文也为堆叠格式的报文。The second device receives the third stack acknowledgement packet in the Ethernet format sent by the third device by using the fourth port, and then switches the third port from the normal service port to the stack port. And generating a second stack acknowledgment message in a stack format, where the second stack acknowledgment message carries a MAC address of the second device and the third device, and the third port is configured as the second device Information of a stack port of the third device, and information of the fourth port as a stack port of the third device facing the second device. Transmitting, by the second port, the second stack acknowledgment message to the first device, after receiving the second stack acknowledgment message, the first device records a MAC address of the third device, and the fourth The port is associated with the stack of the third port, and the second stack acknowledgement packet is also a packet in a stack format.
依次类推,直到全部设备都建立堆叠关系,之后,停止发送任何与堆叠系统建立有关的报文。And so on, until all devices establish a stack relationship, and then stop sending any packets related to the establishment of the stack system.
上述的实施例在一种场景中,堆叠系统的几个交换设备已经建立了物理连接,并且所述第一设备已经被指定为堆叠系统的主设备的场景中。在另一种场景中,堆叠设备之间只是建立了物理连接,但是非主设备并不知道是否已经制定了主设备,此时,可进一步参考图4,该图为另一种实施例的交互图。The above embodiment is in a scenario where several switching devices of the stacking system have established a physical connection and the first device has been designated as the primary device of the stacking system. In another scenario, only the physical connection is established between the stacking devices, but the non-master device does not know whether the master device has been established. In this case, reference may be further made to FIG. 4, which is an interaction of another embodiment. Figure.
在步骤201之前,还包括:Before step 201, the method further includes:
步骤1,第一设备接收第二设备发送的以太网格式的堆叠查询报文。Step 1: The first device receives a stack query message in an Ethernet format sent by the second device.
具体而言,堆叠查询报文由非主设备主动发出,用来探测主设备的存在,由于尚未建立堆叠系统,因此该报文为以太报文格式。该堆叠查询报文为广播报文,源地址为发出该堆叠查询报文的设备的MAC地址,目的地址为广播。在该实施例中,所述堆叠查询报文的源地址为所述第二设备的MAC地址。Specifically, the stack query message is sent by the non-master device to detect the existence of the master device. The packet is in the Ethernet packet format. The stack query message is a broadcast packet, and the source address is the MAC address of the device that sends the stack query message, and the destination address is broadcast. In this embodiment, the source address of the stack query message is the MAC address of the second device.
步骤2,第一设备向所述第二设备发送以太网格式的堆叠应答报文,所述堆叠应答报文用于告知所述第二设备,所述第一设备为堆叠系统的主设备,并且同意建立堆叠系统。之后,第一设备才与图2所示的实施例相同,不多赘述。Step 2: The first device sends a stack response message in an Ethernet format to the second device, where the stack response message is used to notify the second device, where the first device is a master device of the stack system, and Agree to build a stacking system. After that, the first device is the same as the embodiment shown in FIG. 2, and will not be described again.
如图5所示,在另一种场景中,需要解除已经建立好的堆叠系统,此时,解除堆叠系统的流程如图5所示:As shown in Figure 5, in another scenario, the established stacking system needs to be removed. At this time, the process of releasing the stacking system is as shown in Figure 5:
首先,所述第一设备广播堆叠格式的堆叠去使能报文,该堆叠去使能报文携带所述第一设备的MAC地址,用于通知堆叠系统的非主设备解除堆叠系统。First, the first device broadcasts a stack-disabled packet in a stack format, and the stack-disabled packet carries a MAC address of the first device, and is used to notify the non-master device of the stack system to cancel the stacking system.
之后,第二设备接收所述第一设备广播的堆叠去使能报文,删除所述第二设备保存的信息。第二设备通过所述第二端口向所述第一设备发送堆叠格式的堆叠去使能确认报文,并将所述第二端口转换为普通业务端口。 Then, the second device receives the stack de-enabled message broadcasted by the first device, and deletes the information saved by the second device. The second device sends a stack format-enabled acknowledgement packet to the first device by using the second port, and converts the second port into a common service port.
第一设备在接收到第二设备发送的堆叠去使能确认报文后,删除第一设备保存的信息,将所述第一端口转换为普通业务端口,之后第一设备和第二设备的堆叠关系解除。After receiving the stack deactivation confirmation message sent by the second device, the first device deletes the information saved by the first device, converts the first port into a common service port, and then stacks the first device and the second device. The relationship is lifted.
类似的,第二设备向第三设备转发堆叠去使能报文,以解除第三设备和第二设备的堆叠关系。第二设备可以在通过所述第二端口向所述第一设备发送堆叠去使能确认报文之前或之后向第三设备转发堆叠去使能报文,也可以并行的执行这两个步骤。Similarly, the second device forwards the stack de-enabled message to the third device to release the stacking relationship between the third device and the second device. The second device may forward the stack de-enable message to the third device before or after sending the stack de-encryption acknowledgement message to the first device by using the second port, or may perform the two steps in parallel.
通过上述的实施例,通过构建堆叠系统的交换机之间,通过协议报文,协商交换机不同端口的觉得,实现不同端口具有不同的功能,并且实现堆叠使能和堆叠去使能,使得这些交换机能够在不需要人工配置的情况下,自协商创建堆叠系统。Through the foregoing embodiments, the switches of the stacking system are configured to negotiate the different ports of the switch through the protocol packets, and the different ports have different functions, and the stacking and stacking are disabled, so that the switches can be enabled. Create a stack system by auto-negotiation without manual configuration.
相应的,如图6所示,本发明实施例还提供了一种可堆叠设备,该实施例例如可以是图1中作为堆叠系统非主设备的第二设备,为便于描述,将该实施例中的堆叠设备称为本端设备,所述设备包括:Correspondingly, as shown in FIG. 6 , an embodiment of the present invention further provides a stackable device. The embodiment may be, for example, a second device that is a non-master device of the stack system in FIG. 1 . The stacking device is called a local device, and the device includes:
第一接收单元601,用于本端设备接收第一设备广播的以太网格式的第一堆叠使能报文,所述第一堆叠使能报文的源地址为所述第一设备的MAC地址,所述第一堆叠使能报文携带即将建立堆叠系统的几个交换机中的其他设备可以与所述第一设备建立堆叠关系的信息,所述第一设备为堆叠系统的主设备。The first receiving unit 601 is configured to receive, by the local device, a first stack enable message in an Ethernet format broadcast by the first device, where a source address of the first stack enable message is a MAC address of the first device The first stack-enabled packet carries information about a stacking relationship between the other devices in the switch that is about to establish the stacking system, and the first device is a master device of the stacking system.
存储单元602,用于本端设备记录所述第一设备的MAC地址。The storage unit 602 is configured to record, by the local device, the MAC address of the first device.
第一发送单元603,用于所述本端设备从第二端口向所述第一设备发送以太网格式的第一堆叠确认报文,所述第一堆叠确认报文中携带所述本端设备的MAC地址和将所述第二端口作为堆叠端口的信息,所述第二端口位于所述本端设备。The first sending unit 603 is configured to send, by the local device, the first stack acknowledgement packet in the Ethernet format from the second port to the first device, where the first stack acknowledgement packet carries the local device The MAC address and the second port are used as the information of the stack port, and the second port is located at the local device.
创建单元604,用于将所述第二端口从普通业务端口切换为堆叠端口,建立与所述第一设备的堆叠关系。The creating unit 604 is configured to switch the second port from a normal service port to a stack port, and establish a stacking relationship with the first device.
在第一种可能的实施方式中,所述第一接收单元还用于:接收第一设备发送的堆叠格式的第二堆叠使能报文,将所述第二堆叠使能报文转换为以太网格式的第一堆叠使能报文。In a first possible implementation manner, the first receiving unit is further configured to: receive a second stack enable message in a stack format sent by the first device, and convert the second stack enable message into an Ethernet The first stack of the network format enables the message.
所述可堆叠设备还包括:The stackable device further includes:
第二发送单元,用于通过第三端口向第三设备发送以太网格式的所述第一堆叠使能报文。And a second sending unit, configured to send, by using the third port, the first stack enable message in an Ethernet format to the third device.
第二接收单元,用于接收所述第三设备通过第四端口发送的以太网格式的第三堆叠确认报文,所述第四端口位于所述第三设备,所述第三堆叠确认报文中携带所述第三设备的MAC地址,和将所述第四端口作为面向所述本端设备的堆叠端口的信息。 a second receiving unit, configured to receive a third stack acknowledgment message in an Ethernet format sent by the third device by using the fourth port, where the fourth port is located in the third device, and the third stack acknowledges the packet The MAC address of the third device is carried, and the fourth port is used as information for the stack port of the local device.
生成单元,用于所述本端设备将所述第三堆叠确认报文封装为堆叠格式的第二堆叠确认报文,所述第二堆叠确认报文中携带有本端设备和第三设备的MAC地址,将所述第三端口作为面向所述第三设备的堆叠端口的信息、以及将所述第四端口作为所述第三设备面向所述本端设备的堆叠端口的信息,所述第四端口位于所述第三设备,所述第三端口位于所述本端设备。a generating unit, configured to encapsulate, by the local device, the third stack acknowledgment message into a second stack acknowledgment message in a stack format, where the second stack acknowledgment message carries the local device and the third device a MAC address, the third port as the information of the stack port facing the third device, and the fourth port as the third device facing the stack port of the local device, where the The fourth port is located in the third device, and the third port is located in the local device.
切换单元,用于将所述第三端口从普通业务端口切换为面向所述第三设备的堆叠端口。And a switching unit, configured to switch the third port from a normal service port to a stack port facing the third device.
第三发送单元,用于通过第二端口向所述第一设备发送所述第二堆叠确认报文,以建立所述本端设备和所述第三设备的堆叠关系。And a third sending unit, configured to send the second stack confirmation packet to the first device by using the second port, to establish a stacking relationship between the local device and the third device.
在第二种可能的实施方式中,所述可堆叠设备还包括:In a second possible implementation manner, the stackable device further includes:
第四发送单元,用于所述本端设备广播以太网格式的堆叠查询报文,所述堆叠查询报文的源地址为所述本端设备的MAC地址,目的地址为广播。The fourth sending unit is configured to broadcast, by the local device, a stack query message in an Ethernet format, where a source address of the stack query message is a MAC address of the local device, and a destination address is a broadcast.
第三接收单元,用于接收第一设备发送的以太网格式的堆叠应答报文,所述堆叠应答报文用于告知所述本端设备,所述第一设备为堆叠系统的主设备,可以与第一设备建立堆叠关系。a third receiving unit, configured to receive a stack response message in an Ethernet format sent by the first device, where the stack response message is used to notify the local device, where the first device is a master device of the stacking system, and Establish a stack relationship with the first device.
在第三种可能的实施方式中,所述堆叠设备还包括:In a third possible implementation manner, the stacking device further includes:
第四接收单元,用于接收所述第一设备广播的堆叠格式的堆叠去使能报文,该堆叠去使能报文携带所述第一设备的MAC地址,用于通知堆叠系统的非主设备解除堆叠系统;a fourth receiving unit, configured to receive a stack-disabled packet in a stack format that is broadcast by the first device, where the stack-disabled packet carries a MAC address of the first device, and is used to notify a non-master of the stacking system The device is unstacked;
所述存储单元还用于,删除所述本端设备保存的信息。The storage unit is further configured to delete the information saved by the local device.
第四发送单元,用于本端设备通过所述第二端口向所述第一设备发送堆叠格式的堆叠去使能确认报文。The fourth sending unit is configured to send, by the local device, the stack format of the stack format to the first device to enable the acknowledgement message.
所述切换单元将所述第二端口从堆叠端口转换为普通业务端口。The switching unit converts the second port from a stack port to a normal service port.
在第四种可能的实施方式中,所述堆叠设备还包括:In a fourth possible implementation manner, the stacking device further includes:
第五发送单元,用于通过所述第三端口向所述第三设备转发堆叠格式的所述堆叠去使能报文,以解除与所述第三设备的堆叠关系。And a fifth sending unit, configured to forward the stack de-enabled packet in a stack format to the third device by using the third port, to release a stacking relationship with the third device.
在第五种可能的实施方式中,所述堆叠设备还包括:In a fifth possible implementation manner, the stacking device further includes:
接口转换单元,用于在接收到所述第三设备发送的堆叠去使能确认报文后,将所述第三端口转换为普通业务端口。 The interface conversion unit is configured to convert the third port into a common service port after receiving the stack deactivation confirmation message sent by the third device.
通过上述的实施例,可以通过构建堆叠系统的交换机之间,通过协议报文,协商交换机不同端口的觉得,实现不同端口具有不同的功能,并且实现堆叠使能和堆叠去使能,使得这些交换机能够在不需要人工配置的情况下,自协商创建堆叠系统。With the above-mentioned embodiments, the switches of the stacking system can be configured to negotiate the different ports of the switch, and the different ports have different functions, and the stacking is enabled and the stacking is disabled. A stacking system can be created by auto-negotiation without manual configuration.
相应的,如图7所示,本发明实施例还提供了一种可堆叠交换机,该实施例例如可以是图1中作为堆叠系统非主设备的第二设备,为便于描述,将该实施例中的堆叠设备称为本端设备,所述设备包括两个网络接口701、705、处理器702和存储器703。系统总线704用于连接网络接口701、处理器702和存储器703。Correspondingly, as shown in FIG. 7 , the embodiment of the present invention further provides a stackable switch. The embodiment may be, for example, a second device that is a non-master device of the stack system in FIG. 1 . The stacking device in the middle is called a local device, and the device includes two network interfaces 701, 705, a processor 702, and a memory 703. System bus 704 is used to connect network interface 701, processor 702, and memory 703.
网络接口701和705是可以在普通业务端口和堆叠端口之间进行状态切换的硬件端口,分别与一个可堆叠交换机连接,例如图1中所示的实施例中,网络接口701与第一设备连接,网络接口705与第三设备连接,用于与其他可堆叠交换机通信,处理器702可以是CPU。The network interfaces 701 and 705 are hardware ports that can be switched between the normal service port and the stack port, and are respectively connected to a stackable switch. For example, in the embodiment shown in FIG. 1, the network interface 701 is connected to the first device. The network interface 705 is coupled to a third device for communicating with other stackable switches, and the processor 702 can be a CPU.
存储器703可以是永久存储器,例如硬盘驱动器和闪存,存储器703中具有软件模块和设备驱动程序。软件模块能够执行本发明上述方法的各种功能模块;设备驱动程序可以是网络和接口驱动程序。The memory 703 may be a persistent storage such as a hard disk drive and a flash memory having a software module and a device driver therein. The software modules are capable of performing the various functional modules of the above described methods of the present invention; the device drivers can be network and interface drivers.
在启动时,这些软件组件被加载到存储器703中,然后被处理器702访问并发送指令:At startup, these software components are loaded into memory 703 and then accessed by processor 702 and sent instructions:
通过网络接口701接收第一设备广播的堆叠使能报文,所述堆叠使能报文的源地址为所述第一设备的MAC地址,所述堆叠使能报文携带其他即将建立堆叠系统的几个交换机中的其他设备可以与所述第一设备建立堆叠关系的信息,所述第一设备为堆叠系统的主设备。Receiving, by the network interface 701, a stack enable message broadcasted by the first device, where the source address of the stack enable message is a MAC address of the first device, and the stack enable message carries other stacking systems to be established. The other device in the switch may establish the information of the stack relationship with the first device, where the first device is the master device of the stack system.
处理器702记录所述第一设备的MAC地址。The processor 702 records the MAC address of the first device.
通过网络接口701向所述第一设备发送堆叠确认报文,所述堆叠确认报文中携带所述第二设备的MAC地址和将所述网络接口701作为堆叠端口的信息。And sending, by the network interface 701, a stack acknowledgment message to the first device, where the stack acknowledgment message carries a MAC address of the second device and information that uses the network interface 701 as a stack port.
处理器702将所述网络接口701从普通业务端口切换为堆叠端口,建立与所述第一设备的堆叠关系。The processor 702 switches the network interface 701 from a normal service port to a stack port to establish a stack relationship with the first device.
相应的,本发明实施例还提供了一种可堆叠设备,该实施例例如可以是图1中作为堆叠系统非主设备的第一设备,为便于描述,将该实施例中的堆叠设备称为本端设备,所述设备包括:Correspondingly, the embodiment of the present invention further provides a stackable device, which may be, for example, the first device in FIG. 1 as a non-master device of the stack system. For convenience of description, the stack device in this embodiment is referred to as The local device includes:
发送单元801,用于通过第一端口广播以太网格式的第一堆叠使能报文,所述第一堆叠使能报文的源地址为所述本端设备的MAC地址,所述第一堆叠使能报文携带其他设 备可以与所述本端设备建立堆叠关系的信息,所述本端设备为即将建立的堆叠系统的主设备,所述第一端口位于所述本端设备。The sending unit 801 is configured to broadcast, by using the first port, the first stack-enabled packet in the Ethernet format, where the source address of the first stack-enabled packet is the MAC address of the local device, and the first stack Enable packets to carry other settings The device can be configured to establish a stack relationship with the local device, where the local device is the master device of the stacking system to be established, and the first port is located at the local device.
接收单元802,用于接收第二设备发送的以太网格式的第一堆叠确认报文,所述第一堆叠确认报文的目的地址为所述本端设备的MAC地址,源地址为所述第二设备的MAC地址,其中携带有将所述第二端口作为所述第二设备的面向所述本端设备的堆叠端口的信息,所述第二端口位于所述第二设备。The receiving unit 802 is configured to receive a first stack acknowledgment message in an Ethernet format sent by the second device, where a destination address of the first stack acknowledgment message is a MAC address of the local device, and a source address is the The MAC address of the second device, where the second port is used as the information about the stack port of the local device, and the second port is located in the second device.
切换单元803,用于将所述第一端口从普通业务端口切换为堆叠端口。The switching unit 803 is configured to switch the first port from a normal service port to a stack port.
存储单元804,用于记录所述第二设备的MAC地址和所述第一端口和所述第二端口的拓扑关系。The storage unit 804 is configured to record a MAC address of the second device and a topological relationship between the first port and the second port.
进一步的,所述接收单元802还用于:接收第二设备发送的堆叠格式的第二堆叠确认报文,所述第二堆叠确认报文中携带有第二设备和第三设备的MAC地址,将所述第三端口作为面向所述第三设备的堆叠端口的信息、以及将所述第四端口作为所述第三设备面向所述第二设备的堆叠端口的信息,所述第四端口位于所述第三设备,所述第三端口位于所述第二设备。Further, the receiving unit 802 is further configured to: receive a second stack acknowledgement packet in a stack format sent by the second device, where the second stack acknowledgement packet carries a MAC address of the second device and the third device, The third port is located as information facing a stack port of the third device, and the fourth port is used as information of the third device facing a stack port of the second device, where the fourth port is located The third device, the third port is located in the second device.
所述存储单元804还用于:记录所述第三设备的MAC地址,和所述第四端口与所述第三端口的拓扑关系。The storage unit 804 is further configured to: record a MAC address of the third device, and a topological relationship between the fourth port and the third port.
进一步的,所述接收单元802还用于接收第二设备发送的以太网格式的堆叠查询报文,所述堆叠查询报文的源地址为所述第二设备的MAC地址。Further, the receiving unit 802 is further configured to receive a stack query message in an Ethernet format sent by the second device, where a source address of the stack query message is a MAC address of the second device.
所述发送单元801,还用于向所述第二设备发送以太网格式的堆叠应答报文,所述堆叠应答报文用于告知所述第二设备,所述本端设备为堆叠系统的主设备,可以与第一设备建立堆叠关系。The sending unit 801 is further configured to send, to the second device, a stack response message in an Ethernet format, where the stack response message is used to notify the second device, where the local device is a master of the stacking system. A device can establish a stack relationship with the first device.
以及,所述发送单元801还用于:广播堆叠格式的堆叠去使能报文,该堆叠去使能报文携带所述第一设备的MAC地址,用于通知堆叠系统的非主设备解除所述堆叠系统。And the sending unit 801 is further configured to: broadcast a stack-disabled packet in a stack format, where the stack-disabled packet carries a MAC address of the first device, and is used to notify the non-master device of the stacking system to release the The stacking system.
所述存储单元804还用于:在接收到第二设备发送的所述堆叠去使能确认报文后,删除所述第一设备保存的信息。The storage unit 804 is further configured to delete the information saved by the first device after receiving the stack de-enabled acknowledgement message sent by the second device.
所述切换单元803将所述第一端口从堆叠端口转换为普通业务端口。The switching unit 803 converts the first port from a stack port to a normal service port.
相应的,如图9所示,本发明实施例还提供了一种可堆叠交换机,该实施例例如可以是图1中作为堆叠系统主设备的第一设备,为便于描述,将该实施例中的堆叠设备称为本端设备,所述设备包括一个网络接口901、处理器902和存储器903。系统总线904用于连接网络接口901、处理器902和存储器903。 Correspondingly, as shown in FIG. 9 , the embodiment of the present invention further provides a stackable switch, which may be, for example, the first device in FIG. 1 as a main device of the stack system. For convenience of description, in this embodiment, The stacking device is called a local device, and the device includes a network interface 901, a processor 902, and a memory 903. System bus 904 is used to connect network interface 901, processor 902, and memory 903.
网络接口901是可以在普通业务端口和堆叠端口之间进行状态切换的硬件端口,分别与一个可堆叠交换机连接,例如图1中所示的实施例中,网络接口901与第二设备连接,用于与其他可堆叠交换机通信,处理器902可以是CPU。The network interface 901 is a hardware port that can perform state switching between a common service port and a stack port, and is respectively connected to a stackable switch. For example, in the embodiment shown in FIG. 1, the network interface 901 is connected to the second device. In communication with other stackable switches, the processor 902 can be a CPU.
存储器903可以是永久存储器,例如硬盘驱动器和闪存,存储器903中具有软件模块和设备驱动程序。软件模块能够执行本发明上述方法的各种功能模块;设备驱动程序可以是网络和接口驱动程序。The memory 903 may be a persistent storage such as a hard disk drive and a flash memory having a software module and a device driver therein. The software modules are capable of performing the various functional modules of the above described methods of the present invention; the device drivers can be network and interface drivers.
在启动时,这些软件组件被加载到存储器903中,然后被处理器902访问并发送指令:At startup, these software components are loaded into memory 903 and then accessed by processor 902 and sent instructions:
通过网络接口901广播以太网格式的第一堆叠使能报文,所述第一堆叠使能报文的源地址为所述本端设备的MAC地址,所述第一堆叠使能报文携带其他设备可以与所述本端设备建立堆叠关系的信息,所述本端设备为即将建立的堆叠系统的主设备。The first stack-enabled packet in the Ethernet format is broadcasted through the network interface 901, the source address of the first stack-enabled packet is the MAC address of the local device, and the first stack-enabled packet carries other The device can establish a stack relationship with the local device, where the local device is the master device of the stacking system to be established.
通过网络接口901接收第二设备发送的以太网格式的第一堆叠确认报文,所述第一堆叠确认报文的目的地址为所述本端设备的MAC地址,源地址为所述第二设备的MAC地址,其中携带有将所述第二端口作为所述第二设备的面向所述本端设备的堆叠端口的信息,所述第二端口位于所述第二设备。Receiving, by using the network interface 901, a first stack acknowledgment message in an Ethernet format sent by the second device, where the destination address of the first stack acknowledgment message is a MAC address of the local device, and the source address is the second device And a MAC address, where the second port is used as the information about the stack port of the local device, and the second port is located in the second device.
所述处理器902设备将所述网络接口901从普通业务端口切换为堆叠端口,所述存储器3记录所述第二设备的MAC地址和所述第一端口和所述第二端口的拓扑关系。The processor 902 device switches the network interface 901 from a normal service port to a stack port, and the memory 3 records a MAC address of the second device and a topological relationship between the first port and the second port.
本领域的技术人员应该还可以进一步意识到,结合本文中所公开的实施例描述的各示例的单元,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Those skilled in the art will further appreciate that the elements of the various examples described in connection with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both, for clarity of hardware and software. Interchangeability, the composition and steps of the various examples have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods for implementing the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the present invention.
结合本文中所公开的实施例描述的方法或算法的步骤可以用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(英文random access memory,缩写:RAM)、内存、只读存储器(英文:read only memory,缩写:ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、只读光盘(英文:Compact Disc Read-Only Memory,缩写:CD-ROM)、或技术领域内所公知的任意其它形式的存储介质中。The steps of a method or algorithm described in connection with the embodiments disclosed herein can be implemented in hardware, a software module executed by a processor, or a combination of both. The software module can be placed in random access memory (English random access memory, abbreviation: RAM), memory, read-only memory (English: read only memory, abbreviation: ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, A hard disk, a removable disk, a compact disk read-only memory (English: Compact Disc Read-Only Memory, CD-ROM), or any other form of storage medium known in the art.
以上所述的具体实施方式,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上所述仅为本发明的具体实施方式而已,并不用于限定本发 明的保护范围,凡在本发明的技术基础上,所做的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。 The embodiments, the technical solutions, and the beneficial effects of the present invention are further described in detail. It is to be understood that the foregoing description is only exemplary embodiments of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made by the present invention are intended to be included within the scope of the present invention.

Claims (12)

  1. 一种堆叠实现方法,其特征在于,所述方法包括:A stack implementation method, the method comprising:
    第一设备通过第一端口广播以太网格式的第一堆叠使能报文,所述第一堆叠使能报文的源地址为所述第一设备的MAC地址,所述第一堆叠使能报文携带其他设备可以与所述第一设备建立堆叠关系的信息,所述第一设备为即将建立的堆叠系统的主设备,所述第一端口位于所述第一设备;The first device broadcasts the first stack enable message in the Ethernet format by using the first port, the source address of the first stack enable message is the MAC address of the first device, and the first stack enable report The device carries the information that the other device can establish a stack relationship with the first device, where the first device is the master device of the stacking system to be established, and the first port is located in the first device;
    所述第一设备接收第二设备发送的以太网格式的第一堆叠确认报文,所述第一堆叠确认报文的目的地址为所述第一设备的MAC地址,源地址为所述第二设备的MAC地址,其中携带有将第二端口作为所述第二设备的面向所述第一设备的堆叠端口的信息,所述第二端口位于所述第二设备;The first device receives the first stack acknowledgment message in the Ethernet format sent by the second device, where the destination address of the first stack acknowledgment message is the MAC address of the first device, and the source address is the second a MAC address of the device, where the second port is used as the information about the stack port of the second device, and the second port is located in the second device;
    所述第一设备将所述第一端口从普通业务端口切换为堆叠端口,记录所述第二设备的MAC地址和所述第一端口和所述第二端口的拓扑关系。The first device switches the first port from a normal service port to a stack port, and records a MAC address of the second device and a topological relationship between the first port and the second port.
  2. 如权利要求1所述的方法,其特征在于,所述第一设备将所述第一端口从普通业务端口切换为堆叠端口,记录所述第二设备的MAC地址和所述第一端口和所述第二端口的拓扑关系,之后,还包括:The method of claim 1, wherein the first device switches the first port from a normal service port to a stack port, and records a MAC address of the second device and the first port and The topology relationship of the second port, and then includes:
    通过所述第一端口向所述第二设备发送堆叠格式的第二堆叠使能报文;Sending, by the first port, a second stack enable message in a stack format to the second device;
    通过所述第一端口接收第二设备发送的堆叠格式的第二堆叠确认报文,所述第二堆叠确认报文中携带有第二设备和第三设备的MAC地址,将第三端口作为面向所述第三设备的堆叠端口的信息、以及将所述第四端口作为所述第三设备面向所述第二设备的堆叠端口的信息,所述第四端口位于所述第三设备,所述第三端口位于所述第二设备;Receiving, by the first port, a second stack acknowledgment message in a stack format sent by the second device, where the second stack acknowledgment message carries a MAC address of the second device and the third device, and the third port is used as a Information about a stack port of the third device, and information that the fourth port is used as a stack port of the third device facing the second device, where the fourth port is located in the third device, The third port is located at the second device;
    所述第一设备记录所述第三设备的MAC地址,和所述第四端口与所述第三端口的拓扑关系。The first device records a MAC address of the third device, and a topological relationship between the fourth port and the third port.
  3. 一种堆叠实现方法,其特征在于,所述方法包括:A stack implementation method, the method comprising:
    第二设备通过第二端口接收第一设备广播的以太网格式的第一堆叠使能报文,所述第一堆叠使能报文的源地址为所述第一设备的MAC地址,所述第一堆叠使能报文携带其他设备可以与所述第一设备建立堆叠关系的信息,所述第一设备为即将建立的堆叠系统的主设备;Receiving, by the second device, the first stack enable message in the Ethernet format broadcasted by the first device by using the second port, where the source address of the first stack enable message is the MAC address of the first device, where the A stack-enabled packet carries information that another device can establish a stack relationship with the first device, where the first device is a master device of a stacking system to be established;
    第二设备记录所述第一设备的MAC地址;The second device records the MAC address of the first device;
    所述第二设备通过第二端口向所述第一设备发送以太网格式的第一堆叠确认报文,所述第一堆叠确认报文的目的地址为所述第一设备的MAC地址,源地址为所述第二设备 的MAC地址,所述第一堆叠确认报文携带将所述第二端口作为所述第二设备的面向所述第一设备的堆叠端口的信息,所述第二端口位于所述第二设备;The second device sends a first stack acknowledgment message in the Ethernet format to the first device by using the second port, where the destination address of the first stack acknowledgment message is the MAC address of the first device, and the source address For the second device MAC address, the first stack acknowledgment message carries the second port as the information of the second device facing the stack port of the first device, and the second port is located in the second device;
    将所述第二端口从普通业务端口切换为堆叠端口。Switching the second port from a normal service port to a stack port.
  4. 如权利要求3所述的方法,其特征在于,所述将所述第二端口从普通业务端口切换为堆叠端口,建立与所述第一设备的堆叠关系,之后,还包括:The method of claim 3, wherein the switching the second port from the normal service port to the stack port, establishing a stacking relationship with the first device, and further comprising:
    第二设备通过第二端口接收第一设备发送的堆叠格式的第二堆叠使能报文;Receiving, by the second device, the second stack enable message in the stack format sent by the first device by using the second port;
    第二设备将所述第二堆叠使能报文转换为以太网格式的第三堆叠使能报文;The second device converts the second stack enable message into a third stack enable message in an Ethernet format;
    第二设备通过第三端口向第三设备发送所述第三堆叠使能报文,所述第三端口位于所述第二设备;The second device sends the third stack enable message to the third device by using the third port, where the third port is located in the second device;
    接收所述第三设备通过第四端口发送的以太网格式的第三堆叠确认报文,所述第四端口位于所述第三设备,所述第三堆叠确认报文的目的地址为所述第二设备的MAC地址,所述第三堆叠确认报文的源地址为所述第三设备的MAC地址,携带将所述第四端口作为面向所述第二设备的堆叠端口的信息;And receiving, by the third device, a third stack acknowledgment message in an Ethernet format sent by the fourth port, where the fourth port is located in the third device, and the destination address of the third stack acknowledgment message is the a MAC address of the second device, where the source address of the third stack acknowledgment message is a MAC address of the third device, and carrying the fourth port as information for a stack port of the second device;
    所述第二设备将所述第三堆叠确认报文转换为堆叠格式的第二堆叠确认报文,所述第二堆叠确认报文中携带有第二设备和第三设备的MAC地址,将所述第三端口作为第二设备面向所述第三设备的堆叠端口的信息、以及将所述第四端口作为所述第三设备面向所述第二设备的堆叠端口的信息,所述第四端口位于所述第三设备;The second device converts the third stack acknowledgment message into a second stack acknowledgment message in a stack format, where the second stack acknowledgment message carries the MAC address of the second device and the third device, The third port is used as the information of the second device facing the stack port of the third device, and the fourth port is used as the information of the third device facing the stack port of the second device, the fourth port Located at the third device;
    将所述第三端口从普通业务端口切换为堆叠端口;Switching the third port from a normal service port to a stack port;
    通过第二端口向所述第一设备发送所述第二堆叠确认报文。Sending, by the second port, the second stack acknowledgement message to the first device.
  5. 如权利要求3所述的方法,在建立与所述第一设备的堆叠关系,之后,还包括:The method of claim 3, after establishing a stacking relationship with the first device, further comprising:
    接收所述第一设备广播的堆叠格式的堆叠去使能报文,该堆叠去使能报文携带所述第一设备的MAC地址,用于通知堆叠系统的非主设备解除堆叠系统;Receiving a stack-disabled packet in a stack format that is broadcast by the first device, where the stack-disabled packet carries a MAC address of the first device, and is used to notify the non-master device of the stacking system to cancel the stacking system;
    删除所述第二设备保存的信息;Deleting information saved by the second device;
    第二设备通过所述第二端口向所述第一设备发送堆叠格式的堆叠去使能确认报文;Sending, by the second device, the stack format of the stack format to the first device to enable the acknowledgement message;
    将所述第二端口从堆叠端口转换为普通业务端口。Converting the second port from a stack port to a normal service port.
  6. 如权利要求5所述的方法,其特征在于,所述将所述第二端口从堆叠端口转换为普通业务端口,之后,还包括:The method of claim 5, wherein the converting the second port from a stack port to a normal service port further comprises:
    通过所述第三端口向所述第三设备转发所述堆叠格式的堆叠去使能报文,以解除与所述第三设备的堆叠关系; Forwarding, by the third port, the stack-disabled packet in the stack format to the third device, to release the stacking relationship with the third device;
    接收到所述第三设备发送的堆叠格式的堆叠去使能确认报文后,将所述第三端口转换为普通业务端口。After receiving the stack-disabled acknowledgement packet in the stack format sent by the third device, the third port is converted into a normal service port.
  7. 一种可堆叠设备,其特征在于,所述可堆叠设备包括:A stackable device, wherein the stackable device comprises:
    发送单元,用于通过第一端口广播以太网格式的第一堆叠使能报文,所述第一堆叠使能报文的源地址为所述本端设备的MAC地址,所述第一堆叠使能报文携带其他设备可以与所述本端设备建立堆叠关系的信息,所述本端设备为即将建立的堆叠系统的主设备,所述第一端口位于所述本端设备;a sending unit, configured to broadcast, by using the first port, a first stack-enabled packet in an Ethernet format, where a source address of the first stack-enabled packet is a MAC address of the local device, where the first stack is configured The device can carry the information that the other device can establish a stack relationship with the local device, where the local device is the master device of the stacking system to be established, and the first port is located at the local device;
    接收单元,用于接收第二设备发送的以太网格式的第一堆叠确认报文,所述第一堆叠确认报文的目的地址为所述本端设备的MAC地址,源地址为所述第二设备的MAC地址,其中携带有将所述第二端口作为所述第二设备的面向所述本端设备的堆叠端口的信息,所述第二端口位于所述第二设备;a receiving unit, configured to receive a first stack acknowledgment message in an Ethernet format sent by the second device, where a destination address of the first stack acknowledgment message is a MAC address of the local device, and a source address is the second a MAC address of the device, where the second port is used as the information about the stack port of the local device, and the second port is located in the second device;
    切换单元,用于将所述第一端口从普通业务端口切换为堆叠端口;a switching unit, configured to switch the first port from a normal service port to a stack port;
    存储单元,用于记录所述第二设备的MAC地址和所述第一端口和所述第二端口的拓扑关系。a storage unit, configured to record a MAC address of the second device and a topological relationship between the first port and the second port.
  8. 如权利要求7所述的设备,其特征在于,The device of claim 7 wherein:
    所述发送单元还用于:通过所述第一端口向所述第二设备发送堆叠格式的第二堆叠使能报文;The sending unit is further configured to: send, by using the first port, a second stack enable message in a stack format to the second device;
    所述接收单元还用于:通过第一端口接收第二设备发送的堆叠格式的第二堆叠确认报文,所述第二堆叠确认报文中携带有第二设备和第三设备的MAC地址,将第三端口作为面向所述第三设备的堆叠端口的信息、以及将所述第四端口作为所述第三设备面向所述第二设备的堆叠端口的信息,所述第四端口位于所述第三设备,所述第三端口位于所述第二设备;The receiving unit is further configured to: receive, by using the first port, a second stack acknowledgment message in a stack format sent by the second device, where the second stack acknowledgment message carries a MAC address of the second device and the third device, The third port is located as information for the stack port of the third device, and the fourth port is used as information of the third device facing the stack port of the second device, where the fourth port is located a third device, where the third port is located in the second device;
    所述存储单元还用于:记录所述第三设备的MAC地址,和所述第四端口与所述第三端口的拓扑关系。The storage unit is further configured to: record a MAC address of the third device, and a topological relationship between the fourth port and the third port.
  9. 一种可堆叠设备,其特征在于,所述可堆叠设备包括:A stackable device, wherein the stackable device comprises:
    第一接收单元,用于本端设备通过第二端口接收第一设备广播的以太网格式的第一堆叠使能报文,所述第一堆叠使能报文的源地址为所述第一设备的MAC地址,所述第一堆叠使能报文携带其他设备可以与所述第一设备建立堆叠关系的信息,所述第一设备为即将建立的堆叠系统的主设备;a first receiving unit, configured to receive, by using the second port, the first stack enable message in an Ethernet format broadcast by the first device, where the source address of the first stack enable message is the first device MAC address, the first stack enable message carries information that another device can establish a stack relationship with the first device, and the first device is a master device of the stack system to be established;
    存储单元,用于本端设备记录所述第一设备的MAC地址; a storage unit, configured to record, by the local device, a MAC address of the first device;
    第一发送单元,用于所述本端设备通过第二端口向所述第一设备发送以太网格式的第一堆叠确认报文,所述第一堆叠确认报文的目的地址为所述第一设备的MAC地址,源地址为所述第二设备的MAC地址,所述第一堆叠确认报文携带将所述第二端口作为所述第二设备的面向所述第一设备的堆叠端口的信息,所述第二端口位于所述本端设备;a first sending unit, configured to send, by using the second port, the first stack acknowledgement packet in an Ethernet format to the first device, where the destination address of the first stack acknowledgement packet is the first The MAC address of the device, the source address is the MAC address of the second device, and the first stack acknowledgment message carries the second port as the information of the stack port of the second device facing the first device. The second port is located at the local device;
    创建单元,用于将所述第二端口从普通业务端口切换为堆叠端口。And a creating unit, configured to switch the second port from a normal service port to a stack port.
  10. 如权利要求9所述的堆叠设备,其特征在于,所述第一接收单元还用于:通过第二端口接收第一设备发送的堆叠格式的第二堆叠使能报文,将所述第二堆叠使能报文转换为以太网格式的第三堆叠使能报文;The stacking device according to claim 9, wherein the first receiving unit is further configured to: receive, by using the second port, a second stack enable message in a stack format sent by the first device, where the second The stack-enabled packet is converted to the third stack-enabled packet in the Ethernet format.
    所述堆叠设备还包括:The stacking device further includes:
    第二发送单元,用于通过第三端口向第三设备发送以太网格式的所述第三堆叠使能报文,所述第三端口位于所述第二设备;a second sending unit, configured to send, by using the third port, the third stack enable message in an Ethernet format to the third device, where the third port is located in the second device;
    第二接收单元,用于接收所述第三设备通过第四端口发送的以太网格式的第三堆叠确认报文,所述第四端口位于所述第三设备,所述第三堆叠确认报文的目的地址为所述第二设备的MAC地址,所述第三堆叠确认报文的源地址为所述第三设备的,携带将所述第四端口作为面向所述本端设备的堆叠端口的信息;a second receiving unit, configured to receive a third stack acknowledgment message in an Ethernet format sent by the third device by using the fourth port, where the fourth port is located in the third device, and the third stack acknowledges the packet The destination address is the MAC address of the second device, and the source address of the third stack acknowledgment packet is the third device, and the fourth port is configured as a stack port facing the local device. information;
    生成单元,用于所述本端设备将所述第三堆叠确认报文封装为堆叠格式的第二堆叠确认报文,所述第二堆叠确认报文中携带有本端设备和第三设备的MAC地址,将所述第三端口作为本端设备面向所述第三设备的堆叠端口的信息、以及将所述第四端口作为所述第三设备面向所述本端设备的堆叠端口的信息,所述第四端口位于所述第三设备,所述第三端口位于所述本端设备;a generating unit, configured to encapsulate, by the local device, the third stack acknowledgment message into a second stack acknowledgment message in a stack format, where the second stack acknowledgment message carries the local device and the third device a MAC address, the information of the third port being the stack port of the local device, and the fourth port being the information of the third device facing the stack port of the local device, The fourth port is located in the third device, and the third port is located in the local device;
    切换单元,用于将所述第三端口从普通业务端口切换为堆叠端口;a switching unit, configured to switch the third port from a normal service port to a stack port;
    第三发送单元,用于通过第二端口向所述第一设备发送所述第二堆叠确认报文。And a third sending unit, configured to send the second stack acknowledgement message to the first device by using the second port.
  11. 如权利要求10所述的堆叠设备,其特征在于,还包括:The stacking device of claim 10, further comprising:
    第四接收单元,用于接收所述第一设备广播的堆叠格式的堆叠去使能报文,该堆叠去使能报文携带所述第一设备的MAC地址,用于通知堆叠系统的非主设备解除堆叠系统;a fourth receiving unit, configured to receive a stack-disabled packet in a stack format that is broadcast by the first device, where the stack-disabled packet carries a MAC address of the first device, and is used to notify a non-master of the stacking system The device is unstacked;
    所述存储单元还用于,删除所述本端设备保存的信息;The storage unit is further configured to delete the information saved by the local device;
    第四发送单元,用于本端设备通过所述第二端口向所述第一设备发送堆叠格式的堆叠去使能确认报文;a fourth sending unit, configured to send, by the local device, the stack format of the stack format to enable the acknowledgement packet to the first device by using the second port;
    所述切换单元将所述第二端口从堆叠端口转换为普通业务端口。The switching unit converts the second port from a stack port to a normal service port.
  12. 如权利要求11所述的堆叠设备,其特征在于,还包括: The stacking device of claim 11, further comprising:
    第五发送单元,用于通过所述第三端口向所述第三设备转发堆叠格式的所述堆叠去使能报文,以解除与所述第三设备的堆叠关系;a fifth sending unit, configured to forward the stack de-enabled packet in a stack format to the third device by using the third port, to release a stacking relationship with the third device;
    接口转换单元,用于在接收到所述第三设备发送的堆叠去使能确认报文后,将所述第三端口转换为普通业务端口。 The interface conversion unit is configured to convert the third port into a common service port after receiving the stack deactivation confirmation message sent by the third device.
PCT/CN2015/070663 2014-01-14 2015-01-14 Stacking implementation method and stackable device WO2015106680A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410015370.2A CN103746944B (en) 2014-01-14 2014-01-14 Stacking realization method and stackable equipment
CN201410015370.2 2014-01-14

Publications (1)

Publication Number Publication Date
WO2015106680A1 true WO2015106680A1 (en) 2015-07-23

Family

ID=50503933

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/070663 WO2015106680A1 (en) 2014-01-14 2015-01-14 Stacking implementation method and stackable device

Country Status (2)

Country Link
CN (1) CN103746944B (en)
WO (1) WO2015106680A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114726801A (en) * 2022-04-01 2022-07-08 北京东土军悦科技有限公司 Encrypted flow forwarding method and system
CN115022261A (en) * 2022-05-20 2022-09-06 浪潮思科网络科技有限公司 Multicast table item synchronization method, device and medium based on stack environment
CN115086251A (en) * 2022-06-28 2022-09-20 北京东土军悦科技有限公司 Stack data processing method and device, electronic equipment and storage medium

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103746944B (en) * 2014-01-14 2017-01-25 华为技术有限公司 Stacking realization method and stackable equipment
CN105471752B (en) * 2014-08-21 2019-11-19 中兴通讯股份有限公司 Equipment, the method and system of rack stacking are realized based on switching network
CN105099958A (en) * 2015-08-28 2015-11-25 北京星网锐捷网络技术有限公司 Method and device for establishing virtual switching framework VSF system
CN107528788B (en) * 2016-06-20 2020-12-04 新华三技术有限公司 Method and device for realizing automatic stacking between network devices
CN107426031B (en) * 2017-08-08 2020-06-02 迈普通信技术股份有限公司 Stack configuration method and device
CN110391979B (en) * 2018-04-23 2021-01-15 华为技术有限公司 Network equipment stacking method, network equipment and storage medium
CN109672571B (en) * 2019-01-16 2022-04-08 新华三技术有限公司 Stacking method, device and storage medium
CN116545914B (en) * 2023-04-21 2024-03-29 南京金阵微电子技术有限公司 Method and system for synchronizing switch chip logic stacking two-layer table items and switch

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1744489A1 (en) * 2005-07-12 2007-01-17 Alcatel Loop prevention system and method in a stackable ethernet switch system
CN101478434A (en) * 2009-01-19 2009-07-08 杭州华三通信技术有限公司 Method for configuring stacking port and exchange equipment
CN103401708A (en) * 2013-07-29 2013-11-20 福建星网锐捷网络有限公司 Port configuration method and device
CN103684857A (en) * 2013-12-02 2014-03-26 杭州华三通信技术有限公司 Method and device for setting working modes of member ports of stacking ports of switchboards
CN103746944A (en) * 2014-01-14 2014-04-23 华为技术有限公司 Stacking realization method and stackable equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101478492B (en) * 2009-02-10 2011-04-13 杭州华三通信技术有限公司 Method and apparatus for stacking member port detection
CN102006184B (en) * 2010-11-09 2013-01-02 福建星网锐捷网络有限公司 Management method, device and network device of stack link

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1744489A1 (en) * 2005-07-12 2007-01-17 Alcatel Loop prevention system and method in a stackable ethernet switch system
CN101478434A (en) * 2009-01-19 2009-07-08 杭州华三通信技术有限公司 Method for configuring stacking port and exchange equipment
CN103401708A (en) * 2013-07-29 2013-11-20 福建星网锐捷网络有限公司 Port configuration method and device
CN103684857A (en) * 2013-12-02 2014-03-26 杭州华三通信技术有限公司 Method and device for setting working modes of member ports of stacking ports of switchboards
CN103746944A (en) * 2014-01-14 2014-04-23 华为技术有限公司 Stacking realization method and stackable equipment

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114726801A (en) * 2022-04-01 2022-07-08 北京东土军悦科技有限公司 Encrypted flow forwarding method and system
CN114726801B (en) * 2022-04-01 2024-03-29 北京东土军悦科技有限公司 Method and system for forwarding encrypted traffic
CN115022261A (en) * 2022-05-20 2022-09-06 浪潮思科网络科技有限公司 Multicast table item synchronization method, device and medium based on stack environment
CN115022261B (en) * 2022-05-20 2024-04-12 浪潮思科网络科技有限公司 Multicast table item synchronization method, equipment and medium based on stacking environment
CN115086251A (en) * 2022-06-28 2022-09-20 北京东土军悦科技有限公司 Stack data processing method and device, electronic equipment and storage medium
CN115086251B (en) * 2022-06-28 2023-10-03 北京东土军悦科技有限公司 Stacked data processing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN103746944B (en) 2017-01-25
CN103746944A (en) 2014-04-23

Similar Documents

Publication Publication Date Title
WO2015106680A1 (en) Stacking implementation method and stackable device
US11765000B2 (en) Method and system for virtual and physical network integration
US8705526B1 (en) Extending VPLS support for CE lag multi-homing
EP3863237A1 (en) Packet forwarding method, packet transmission device, and packet reception device
US10791053B2 (en) Service function chain SFC-based communication method, and apparatus
US9819574B2 (en) Concerted multi-destination forwarding in a joint TRILL fabric and VXLAN/IP fabric data center
WO2016062169A1 (en) Message transmission method and apparatus
JP2016511978A (en) Method, device and routing system for network virtualization data transmission
CN105812259A (en) Packet forwarding method and device
EP2680507B1 (en) Packet forwarding method and system, and relay agent device
WO2015144018A1 (en) Information transmission method, device and communication system
WO2016184283A1 (en) Data stream management method and system for virtual machine
WO2021082803A1 (en) Routing information transmission method and apparatus, and data center interconnection network
WO2020108531A1 (en) Packet forwarding
US10686730B2 (en) Function-expandable wired network device
US9036465B2 (en) Hierarchical network with active redundant links
EP4054149A1 (en) Method and apparatus for configuring aging time of media access control address
CN112702251B (en) Message detection method, connectivity negotiation relationship establishment method and related equipment
JP2023530347A (en) BIER OAM detection method, device and system
EP3902228B1 (en) Data message transmission methods
WO2016082573A1 (en) Packet forwarding method and apparatus for stacking system, and stacking device
WO2023143186A1 (en) Data transmission method, system and apparatus
WO2018205728A1 (en) Method for processing stack split, computer device and computer readable storage medium
US11855792B2 (en) Multicast rendezvous point deployment in a virtual gateway of a distributed tunnel fabric
CN104270280A (en) System and method for realizing LSP (Label Switching Path) ping and tracert on router

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

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

Country of ref document: EP

Kind code of ref document: A1