Method and switching device for stack port configuration
Granted 3 Jul 2012 · 1 office action
Current assignee: Hewlett Packard Enterprise Development LP · originally Hewlett Packard Enterprise
Law firm: Law firm · Log in to unlock
Attorney: Attorney · Log in to unlock
Inventors: Yong Wang, Xiaolong Hu · Examiner: Robert Wilson · AU 2475 · TC 2400
Life of the application
11 dated eventsAbstract
The invention provides a method and switching device for configuring stack ports. A switching device in a stacking system searches in the neighbor information table to determine whether the neighbor ID carried in a stack link negotiation packet is contained in the table after it receives the stack link negotiation packet on one of its physical ports that is enabled with the stacking function. If the neighbor ID is contained in the table, the switching device adds the physical port to the stack port corresponding to the neighbor ID in the neighbor information table; if it is not contained in the table, the switching device creates a stack port not in use, creates a binding between the neighbor ID and the stack port, and adds the physical port to the stack port. The present invention can automatically configure stack ports, greatly reducing the configuration work of administrators, and avoiding stacking device faults caused by manual configuration errors at the same time.
Description
9 parts›CROSS-REFERENCE TO RELATED APPLICATIONS
This application claims the benefit under 35 U.S.C. §119(a)-(d) of Chinese Application 200910076759.7 filed on Jan. 19, 2009.
›TECHNICAL FIELD
This invention relates in general to the field of network communications and more particularly to a method and switching device for stack port configuration.
›BACKGROUND OF THE INVENTION
To improve the availability and expandability of devices and simplify device management, stacking technology has been developed and applied. Stacking technology connects two or more distributed switching devices to form a logical device, and users can manage the entire stack through the logical device. The switching devices in a stack are connected by stack links. A stack link can be one physical link or aggregated from multiple physical links. Stack management packets, data forwarding packets and high availability backup packets are transmitted over stack links. In application, stack aggregate links are adopted to improve the bandwidth and availability of the switching devices. In this case, physical ports connecting to the same neighbor need to be configured as a stack port. This stack port is a logical port aggregated from multiple physical ports.
Currently, stack ports are manually configured. A physical port enabled with the stacking function is manually added to a stack port according to the connection status of the stack links between switching devices. This manual stack port configuration method increases the configuration work load of administrators and increases the possibility of configuration errors when there are many physical ports. An example of incorrectly configured physical ports and stack ports associated with a stack configuration is shown in FIG. 1 . In the example, physical port 1 on switching device 2 is a common service port not enabled with the stacking function, but the administrator adds the physical port to stack port 1 ; also, a stack link exists between physical port 3 on switching device 2 and switching device 1 , and the physical port should be added to stack port 1 , but the administrator adds the physical port to stack port 2 connecting to switching device 3 . These wrong configurations may cause stack establishment failure, device failure or stack loop, cause the stack unable to operate normally.
›SUMMARY OF THE INVENTION
This invention provides a method and switching device for configuring stack ports, thus to reduce the configuration work load of administrators and avoid abnormal operation of a stack due to manual configuration errors.
A switching device in a stacking system receives a stack link negotiation packet on one of its physical ports that is enabled with the stacking function, and thereafter searches in a neighbor information table to determine whether the neighbor ID carried in the stack link negotiation packet is contained in the table. If it is, then the switching device adds the physical port to a stack port in a stack port information table in the switching device, wherein the stack port corresponds to the neighbor ID in the neighbor information table; if it is not, then the switching device creates a stack port not in use, creates a binding between the neighbor and the created stack port, and adds the physical port to the stack port in the stack port information table.
A switching device, which is applied in a stacking system, comprises an ID query unit, a first port configuration unit, a second port configuration unit and a device information table storage unit.
The ID query unit is used for querying whether a neighbor ID carried in a stack link negotiation packet is contained in a neighbor information table, after the switching device receives the stack link negotiation packet on a physical port enabled with the stacking function. If the neighbor ID is in the neighbor information table, the switching device sends the neighbor ID to the first port configuration unit; otherwise, it sends the neighbor ID to the second port configuration unit.
The first port configuration unit is used for adding the physical port on which the packet was received to the stack port corresponding to the neighbor ID in the neighbor information table after receiving the neighbor ID.
The second port configuration unit is used for creating a stack port not in use after receiving the neighbor ID, creating a binding between the neighbor ID and the created stack port in the neighbor information table, and adding the physical port to the stack port.
The device information table storage unit is used for saving the neighbor information table.
The preceding technology scheme shows that after a switching device in a stacking system receives a stack link negotiation packet on one of its physical ports that is enabled with the stacking function, it searches in the neighbor information table to determine whether the neighbor ID carried in the stack link negotiation packet is contained in the table. If it is, the switching device adds the physical port to the stack port corresponding to the neighbor ID in the neighbor information table; if it is not, the switching device creates a stack port not in use, creates a binding between the neighbor ID and the stack port, and adds the physical port to the stack port. According to the stack link negotiation packets exchanged between switching devices and the connection relations between physical ports and neighbor devices, the present invention can determine the stack ports to which the physical ports belong and automatically configure stack ports, greatly reducing the configuration work load of administrators, and, at the same time, avoiding stacking device failure caused by manual configuration errors.
›DESCRIPTION ON THE DRAWINGS
FIG. 1 is a schematic diagram illustrating stack port configuration errors.
FIG. 2 illustrates a flow chart of the method provided by the present invention.
FIG. 3 a is a schematic diagram illustrating stack port collision according to an embodiment of the present invention.
FIG. 3 b is a schematic diagram illustrating collision resolution.
FIG. 4 a is a schematic diagram illustrating an architecture of the switching device according to an embodiment of the present invention.
FIG. 4 b is a schematic diagram illustrating another architecture of the switching device according to an embodiment of the present invention.
FIG. 5 is a schematic diagram illustrating the architecture after the method provided by this invention is adopted.
›DETAILED DESCRIPTION OF THE EMBODIMENTS · 1 of 4
To clarify the aims, technical proposals, and advantages of the present invention, the present invention is described below in conjunction with the figures and embodiments.
This invention provides a method, comprising: a switching device searching in a neighbor information table to determine whether a neighbor ID carried in a Stack Negotiate Hello (SN-Hello) packet is contained in the table, after the switching device receives the SN-Hello packet on one of its physical ports that is enabled with a stacking function. If the neighbor ID is contained in the table, the switching device adds the physical port to the stack port corresponding to the neighbor ID in the neighbor information table. If the neighbor ID is not contained in the table, the switching device creates a stack port not in use, creates a binding between the neighbor ID and the stack port, and adds the physical port to the stack port.
Further, in the following description of embodiments of the present invention, specific details are provided for a complete understanding of the embodiments of the invention. FIG. 2 illustrates a flow chart of the method provided by this invention, comprising the following steps:
At step 201 : When the switching device receives an SN-Hello packet on (by way of example) physical port 1 , it gets the neighbor ID carried in the packet.
When the stack link of a physical port on a switching device in a stack is connected, that is, when the physical port is in the up state and enabled with the stacking function, the switching device sends an SN-Hello packet through the physical port; or the switching device sends a response to a neighbor device after receiving the SN-Hello packet sent from the neighbor device on the physical port if the physical port is enabled with the stacking function. The SN-Hello packet carries ID information of the switching device that sends the SN-Hello packet, for example the bridge MAC address information of the switching device.
If the switching device receives an SN-Hello packet on a physical port not enabled with the stacking function, it discards the packet, or enables the stacking function of the physical port to correct the stack configuration.
At step 202 : The switching device searches the neighbor information table to check if the neighbor ID exists in the table. If the neighbor ID does exist in the table, the switching device executes step 203 ; otherwise, the switching device executes step 205 .
Each switching device stores a neighbor information table in which the neighbor IDs of the neighbor devices and the information of the stack ports connecting the neighbors are saved. Taking FIG. 1 as an example, the neighbor information table in switching device 2 is as shown in Table 1.
At step 203 : The switching device adds physical port 1 to the stack port corresponding to the neighbor ID in the neighbor information table.
If the stack port corresponding to the neighbor device exists in a stack port information table stored in the switching device, configure physical port 1 as a member of the stack port (as described in step 204 ).
At step 204 : In the stack port information table, the switching device adds physical port 1 to the entry corresponding to the stack port to complete this branch of the process.
A stack port information table can be stored in each switching device. The stack port information table contains stack port IDs, an indication of whether the stack ports are in use, and information of the physical ports in the stack ports. Taking FIG. 1 as an example, the stack port information table in switching device 2 is as shown in Table 2.
At step 205 : The switching device checks whether the current number of stack ports has reached an allowed upper limit. If the upper limit has been reached, the switching device executes step 206 ; otherwise, the switching device executes step 207 .
At step 206 : The device disables physical port 1 from being added to any stack port, and disables the physical port from sending and receiving packets to complete this branch of the process.
If the current number of stack ports has reached the upper limit, the connection between the neighbor device and physical port 1 is an illegal connection, which may result in stack loop. Therefore, above steps taken ensure that this will not result in stack device failure or other network problems.
A step 207 : The switching device creates a stack port not in use based on the stack port information table, creates a binding between the neighbor ID and the stack port in the neighbor information table, adds physical port 1 to the stack port. The switching device then marks the stack port as used in the stack port information table, and adds physical port 1 to the entry corresponding to the stack port to complete the process.
More specifically, since on this branch (from step 203 ), the neighbor ID is not in the neighbor information table, there is no stack port corresponding to the neighbor device configured on the switching device. So the switching device finds a stack port ID not in use in the stack port information table, creates a stack port and assigns the port the stack port ID, marks the stack port as used, and adds physical port 1 to the stack port. Thereafter, it creates a binding between the neighbor ID and the stack port in the neighbor information table for later use.
If the stack link on a physical port is disconnected, that is, the physical port is in the down state, the switching device removes the physical port from the stack port to which it belongs, meaning removing it from the stack port information table. If there are no other physical ports in the stack port, the switching device marks the stack port as unused, and removes the entry corresponding to the stack port in the neighbor information table.
If the switching devices in a stack are required to be connected in a daisy chain configuration, that is, the stack ports of each switching device are connected in a fixed way, for example, stack port 1 of the switching device must be connected to stack port 2 of a neighbor device, the following two methods can be used:
›DETAILED DESCRIPTION OF THE EMBODIMENTS · 2 of 4
Method 1: If there are only two switching devices in the stack, or several switching devices start up in turn, the SN-Hello packet can further carry the stack port ID for sending the SN-Hello packet. When the switching device receives the SN-Hello packet on physical port 1 , it changes the ID of the stack port to which physical port 1 is added to a different stack port ID from that carried in the SN-Hello packet. For example, switching device 2 receives the SN-Hello packet sent by switching device 1 on its physical port 1 . The SN-Hello packet carries the ID of switching device 1 , and also the stack port ID for sending the SN-Hello packet by switching device 1 . If stack port 1 is used, switching device 2 changes the ID of the stack port to which physical port 1 is added to stack port 2 so that it can be used in a daisy chain connection.
Method 2: After adding a physical port to a stack port, each switching device checks whether the stack port conflicts with the stack port connecting to the neighbor device. If their IDs are the same, the switching device and the neighbor device send ID adjustment packets through their respective physical port connecting them. The ID adjustment packet contains the ID of the switching device and the ID of the stack port to which the physical port that sends the ID adjustment packet belongs. When the switching device receives an ID adjustment packet from another switching device, it checks whether its own priority is smaller than the priority of the switching device that sends the ID adjustment packet according to the switching device ID information carried in the ID adjustment packet; if its priority is smaller, it stops sending the ID adjustment packet that carries its ID information, and changes its stack port ID according to the stack port ID carried in the received ID adjustment packet. More specifically, the switching device changes the ID of the stack port to which the physical port that receives the ID adjustment packet belongs to a different stack port ID from that carried in the ID adjustment packet, and changes the IDs of other stack ports. Otherwise, the switching device discards the received ID adjustment packet.
As illustrated in FIG. 3 a , suppose switching device C configures the physical port connecting switching device B as stack port 2 following the process shown in FIG. 2 . It then detects that stack port 2 conflicts with the stack port connecting switching device B, that is, the IDs of the stack ports connecting switching device B and switching device C are both stack port 2 . The details of this collision detection method are as follows. Switching device C and switching device B both send an ID query packet that carries their own stack port IDs, or carry their own stack port IDs in the SN-Hello packet illustrated in FIG. 2 . After a collision is detected, switching device B sends to switching device C through stack port 2 an ID adjustment packet that carries the device ID and ID of stack port 2 of switching device B, and switching device C sends to switching device B through stack port 2 an ID adjustment packet that carries the device ID and ID of stack port 2 of switching device C. Suppose a smaller device ID represents a higher priority. In this stack, the ID of switching device C is the smallest, so its priority is the highest. When switching device B receives the ID adjustment packet from switching device C, it determines that its priority is smaller than that of switching device C. Therefore, switching device B stops sending the ID adjustment packet that carries its device ID, changes stack port 2 that receives the ID adjustment packet to stack port 1 according to the ID of stack port 2 carried in the ID adjustment packet, and changes stack port 1 of switching device B to stack port 2 and forwards the ID adjustment packet to switching device A. When switching device C receives the ID adjustment packet from switching device B, it determines that its priority is higher than that of switching device B, so it discards the ID adjustment packet. Other switching devices follow the same operations. Their stack port IDs are adjusted according to the ID adjustment packet sent by switching device C to satisfy the requirement of a daisy chain connection. The result is as illustrated in FIG. 3 b.
The above is the detailed description of the method provided by the present invention. The following is the detailed description of the switching device provided by this invention. As illustrated in FIG. 4 a and FIG. 4 b , the switching device comprises an ID query unit 401 , a first port configuration unit 402 , a second port configuration unit 403 , and a device information table storage unit 404 .
ID query unit 401 is used for querying whether the neighbor ID carried in the stack link negotiation packet is contained in the neighbor information table after the switching device receives the stack link negotiation packet on the physical port enabled with the stacking function. If the neighbor ID is in the neighbor information table, the switching device sends the neighbor ID to first port configuration unit 402 ; otherwise, it sends the neighbor ID to second port configuration unit 403 .
First port configuration unit 402 is used for adding the physical port to the stack port corresponding to the neighbor ID in the neighbor information table after it receives the neighbor ID.
Second port configuration unit 403 is used for creating a stack port that is not used by the switching device, creating a binding between the neighbor ID and the stack port in the neighbor information table, and adding the physical port to the stack port after receiving the neighbor ID.
Device information table storage unit 404 is used for saving the neighbor information table.
The switching device further comprises port information table storage unit 405 , which is used for saving the stack port information table.
First port configuration unit 402 further functions to add the physical port to the entry corresponding to the stack port in the stack port information table when adding the physical port to the stack port corresponding to the neighbor ID in the neighbor information table.
›DETAILED DESCRIPTION OF THE EMBODIMENTS · 3 of 4
Second port configuration unit 403 further functions to mark the stack port as used in the stack port information table, and add the physical port to the entry corresponding to the stack port when adding the physical port to the stack port.
The switching device further comprises a determination unit 406 and a third port configuration unit 407 .
Determination unit 406 , which can be set between the ID query unit and second port configuration unit, is used for receiving the neighbor ID sent by the ID query unit 401 , and determining whether the number of stack ports used by the switching device has reached the upper limit allowed. If the upper limit has been reached, the determination unit sends an execution notification to third port configuration unit 407 ; otherwise, it sends the neighbor ID to second port configuration unit 403 .
Third port configuration unit 407 is used for disabling the physical port from being added to any stack port, and disabling the physical port from sending and receiving packets after receiving the execution notification.
The switching device further comprises a packet receiving unit 408 and a function determination unit 409 .
Packet receiving unit 408 is used for receiving link negotiation packets on a physical port.
Function determination unit 409 is used for checking whether the physical port is enabled with the stacking function. If the physical port is enabled, it sends the link negotiation packet to ID query unit 401 ; otherwise, it discards the link negotiation packet or enables the stacking function of the physical port.
The switching device further comprises port removal unit 410 , which is used for removing the physical port from the stack port to which the physical port is added when the stack link that the port is connected to is disconnected, and marking the stack port as unused and removing the entry corresponding to the stack port in the neighbor information table when there is no other physical port in the stack port.
Preferably, the switching device further comprises a port ID adjustment function when the stack port IDs in a stacking system need to meet the requirement of a daisy chain connection. In this case, the link negotiation packet carries the stack port ID for sending the negotiation packet. The switching device further comprises first ID adjustment unit 411 , which is used for getting the stack port ID carried in the link negotiation packet, and changing the ID of the stack port to which the physical port is added to an ID different from the stack port ID carried in the link negotiation packet.
First ID adjustment unit 411 needs to adjust the ID of this stack port in both the neighbor information table and stack port information table.
The switching device with the port ID adjustment function has another architecture, as illustrated in FIG. 4 b , in which the switching device further comprises a collision detection unit 412 , an adjustment packet sending unit 413 , a priority determination unit 414 , and a second ID adjustment unit 415 .
Collision detection unit 412 is used for checking whether the stack port that first port configuration unit 402 or second port configuration unit 403 adds the physical port to conflicts with the stack port on the device to which the physical port is connected.
Adjustment packet sending unit 413 is used for sending an ID adjustment packet that carries the switching device ID and the stack port ID to which the physical port is added from the physical port when conflict is detected by collision detection unit 412 .
Priority determination unit 414 is used for determining whether the priority of the switching device where it resides is smaller than that of the switching device that sends the ID adjustment packet according to the switching device ID carried in the ID adjustment packet after the switching device receives the ID adjustment packet on the physical port; if the priority is smaller, it sends an adjustment notification to second ID adjustment unit 415 ; otherwise, it discards the received ID adjustment packet.
Second ID adjustment unit 415 is used for disabling adjustment packet sending unit 413 from sending the ID adjustment packet, adjusting the ID of the stack port to which the physical port is added according to the stack port ID carried in the ID adjustment packet received, and forwarding the received ID adjustment packet.
Collision detection unit 412 checks whether the stack port to which the physical port is added conflicts with the stack port on the neighbor device to which the physical port is connected. Details of collision detection are as follows. The switching device and neighbor device send a detection packet that carries the stack port ID through their respective stack port. If collision detection unit 412 determines that the ID of the stack port that receives the packet is the same as that carried in the collision detection packet, a collision is determined to have occurred. Alternatively or additionally, if the link negotiation packet carries the stack port ID used by the packet, collision detection unit 412 determines whether the ID of the stack port to which the physical port is added conflicts with the stack port ID carried in the link negotiation packet. If there is a conflict, a collision is determined to have occurred.
The method and switching device provided by this invention feature the following advantages:
1) After a switching device in a stacking system receives a stack link negotiation packet on one of its physical ports that is enabled with the stacking function, it searches in the neighbor information table to determine whether the neighbor ID carried in the stack link negotiation packet is contained in the table. If it is, the switching device adds the physical port to the stack port corresponding to the neighbor ID in the neighbor information table; if it is not, the switching device creates a stack port not in use, creates a binding between the neighbor ID and the created stack port, and adds the physical port to the stack port. The present invention uses stack link negotiation packets sent between switching devices to determine the stack port to which a physical port belongs according to the connection between each physical port and its neighbor device, thus automatically configuring stack ports, greatly reducing the configuration work of administrators, and avoiding stacking device failure caused by manual configuration errors at the same time.
›DETAILED DESCRIPTION OF THE EMBODIMENTS · 4 of 4
2) The problem of stack configuration inconsistency of physical ports is solved. As shown in FIG. 1 , physical port 1 on switching device 2 is not enabled with the stacking function. When switching device 2 receives a link negotiation packet on physical port 1 with this invention, it discards the link negotiation packet, and physical port 1 will not be added to any stack port and will not send link negotiation packets because the stacking function is not enabled on the physical port, thus avoiding device failure or stack loop. Or, when switching device 2 receives a link negotiation packet on physical port 1 with this invention, it automatically enables the stacking function on the port, and adds the physical port to the corresponding stack port, thus to solving the problem of stack configuration inconsistency.
After the method provided by this invention is used, the connection type shown in FIG. 1 becomes what is shown in FIG. 5 .
Although an embodiment of the invention and its advantages are described in detail, a person skilled in the art could make various alternations, additions, and omissions without departing from the spirit and scope of the present invention as defined by the appended claims.
›Tables in the description — 2
| Neighbor ID | Stack port |
| Switching device 1 | Stack port 1 |
| Switching device 3 | Stack port 2 |
| Stack port ID | Whether in use | Member port |
| Stack port 1 | Used | Physical port 1 |
| Physical port 2 | ||
| Physical port 3 | ||
| . . . | ||
| Stack port 2 | Unused |
Claims as granted
33 claimsLog in to read the claims of this application.
Log in to unlockClassifications
3 codes- G01R31/08
Claim changes
SoonSee which claims were amended, added or cancelled during examination, with every added and removed word marked.
The published claims of this application are not paired with the granted ones in what we hold.
File wrapper
See the full prosecution history — every USPTO and applicant action on this file, in order.
Log in to unlockDocuments
Log in to open the documents of this file: the application as filed, every office action and response, the notice of allowance.
Log in to unlockChain of title
See the full assignment history — every owner this patent has passed through, with recordation dates and reel/frame numbers.
Log in to unlock