A stacking system is a logical device formed by connecting two or more devices, providing high availability, high scalability and streamlined management for users. Devices in a stacking system are connected by stack cables in a daisy chain connection mode or ring connection mode.
The present invention comprises: when the daisy chain topology is stable, a device joins the stacking system and the topology changes to ring topology. As shown in
When the daisy chain topology of the stacking system is stable, each device in the stacking system calculates the shortest forwarding path and packet discarding rules. When device S3 joins the stacking system, if a stack port of S3 is blocked, meaning it stops sending and receiving packets. As illustrated in
Although the method in the current technology can implement traffic switching from the daisy chain topology to ring topology, traffic interruption will occur between some devices because master S1 sends notification packets for topology change to trigger other devices to calculate the shortest forwarding path after calculating its own shortest forwarding path. For example, after master S1 calculates its shortest forwarding path, the forwarding path for switching traffic from S1 to S4 changes to S1-S2-S3-S4; however, when calculation of the shortest forwarding path of S2 is not completed, traffic is forwarded over path S2-S1-S8-S7-S6-S5-S4, and this results in traffic interruption between S1 and S4.
This invention provides a stacking system and a method for traffic switching in the stacking system, thus to avoid traffic interruption when the topology of the stacking system changes from daisy chain to ring.
A traffic switching method in a stacking system, comprising: when devices that newly join the stacking system make the topology change from daisy chain to ring, blocking a stack port of one of the newly joined devices, further comprising:
A. After each device in the stacking system performs another topology convergence process, the master restores the configuration of the newly joined device.
B. After the configuration of the newly joined device one of whose stack ports is blocked is restored, it sets the blocked stack port to the forwarding state, calculates the shortest forwarding path based on the ring topology, and sends first notification packets for topology change from daisy chain type to ring type through its two stack ports.
C. Each device that receives the first notification packets re-calculates the shortest forwarding path and switches the traffic, and then forwards the first notification packets.
A stacking system, comprising: when the newly joined devices in the stacking system make the topology change from daisy chain type to ring type, a stack port of one of the newly joined devices is blocked;
The master in the stacking system, used for restoring the configurations of the newly joined devices after the devices in the stacking system perform another daisy chain topology convergence process based on the newly joined devices;
The newly joined device one of whose stack ports is blocked in the stacking system, used for setting the blocked stack port to the forwarding state, calculating the shortest forwarding path based on the ring topology, and sending first notification packets for topology change from daisy chain type to ring type through its two stack ports after its configuration is restored;
Upon receiving the first notification packets, each device re-calculates the shortest forwarding path and switches the traffic, and then forwards the first notification packet.
The preceding technology scheme shows that the method and system provided by this invention blocks a stack port of one of the newly joined devices in the stacking system to keep the daisy chain topology when these devices make the topology change to ring topology, thus to ensure that forwarding path of other devices will not be affected before the configuration of the newly joined devices are restored. After the configurations of the newly joined devices are restored, the blocked stack port is set to the forwarding state, and the newly joined device one of whose stack port is blocked starts to calculate the shortest forwarding path based on the ring topology, and then sends notification packets for topology change to ensure that other devices perform shortest forwarding path calculation and traffic switch in turn, thus to ensure that the shortest forwarding path of each device is the same at a time and avoid traffic interruption.
To clarify the aims, technical proposals, and advantages of the present invention, the following part describes the present invention detailedly in conjunction with the figures and embodiments.
The method provided by this invention is as illustrated in
At step 301: When newly joined devices make the topology change from daisy chain to ring, blocks a stack port of one of the newly joined devices.
At step 302: After each device in the stacking system performs another topology convergence process, the master restores the configuration of the newly devices.
At step 303: After the configuration of the newly joined device one of whose stack ports is blocked is restored, the device sets the blocked stack port to the forwarding state, calculates the shortest forwarding path based on the ring topology, and sends first notification packets for topology change from daisy chain type to ring type through its two stack ports.
At step 304: Each device that receives the first notification packets re-calculates its shortest forwarding path and switches the traffic, and then forwards the first notification packets.
Reference will now be made, by way of example, to the accompanying drawing which aids in understanding an embodiment of the present invention and in which: in the stacking system, a stable daisy chain topology has been formed, each node has calculated its own shortest forwarding tree, and the path from each node to all the other nodes is reachable, for example, the forwarding path from S2 to S1, S8, S7, S6, S5, and S4 is anticlockwise, and that from S4 to S5, S6, S7, S8 and S1 is clockwise. At this time, joining of S3 makes the topology of the stacking system change to ring type. As illustrated in
At step 401: After S3 joins the stacking system, one of its stack ports is blocked, as shown in
To avoid topology collection and shortest forwarding path calculation caused by topology change and traffic interruption caused by shortest forwarding path calculation and traffic switching in an abnormal order after S3 joins the stacking system, a stack port (the right stack port as shown in
At step 402: Each device in the stacking system performs another daisy chain topology convergence process.
Joining of S3 makes each device in the stacking system aware of that, thus to trigger topology collection and shortest forwarding path calculation. Because a stack port of S3 is blocked, the topology is still of daisy chain type. After topology convergence, joining of S3 will not affect the forwarding path of other nodes, and they still forward packets over the shortest forwarding path of the original topology. However, because any path between S2 and S4 is reachable, it ensures that the path from S3 to any other node is reachable and traffic will not be interrupted.
At step 403: Master S1 restores the configuration of S3 over the calculated path S1-S2-S3, and sends notification packets for configuration restoration completion after configuration restoration is completed.
At this step, configuration restoration of S3 performed by S1 includes: member ID distribution and stack port configuration.
At step 404: Upon receiving the notification packets for configuration restoration completion, S3 sets its blocked stack port to the forwarding state, calculates the shortest forwarding path and packet discarding rules based on the ring topology with the shortest path forwarding algorithm, and sends notification packets for topology change from daisy chain type to ring type through its two stack ports.
Upon receiving the notification packets for configuration restoration completion, S3, one of whose stack ports is blocked confirms is configuration restoration completion, and sets the blocked stack port to the forwarding state, and then the topology changes from daisy chain type to ring type. At this time, S3 will perform ring topology collection, calculate the shortest forwarding path and packet discarding rules based on the ring topology.
The packet discarding rules of this invention comprise: 1) Discarding a packet sent by the local device, thus ensuring that no loop occurs in any case. 2) Discarding a packet not from the shortest forwarding path, thus ensuring that no more than one packet is received. Packets involved include broadcasts, multicasts and unknown unicasts.
After step 403 is performed, only S3 has finished ring topology-based shortest forwarding path calculation. This does not affect the forwarding paths of other nodes, and they can forward packets based on the shortest forwarding paths of the original daisy chain topology. However, because any path between S2 and S4 is reachable, it ensures that the paths from S3 to any other nodes are reachable and the traffic will not be interrupted.
At step 405: When other nodes receive the notification packet for topology change from daisy chain type to ring type, they calculate the shortest forwarding paths and packet discarding rules, switch the traffic, and then forward the notification packet.
For example, in the anticlockwise direction, when S2 receives the notification packets sent by S3 for topology change from daisy chain type to ring type, it re-calculates the shortest forwarding path and packet discarding rules based on the collected ring topology information, switches the traffic, and then sends the notification packets to next hop S1; in the clockwise direction, when S2 receives the notification packets sent by S3 for topology change from daisy chain type to ring type, it re-calculates the shortest forwarding path and packet discarding rules based on the collected ring topology information, switches the traffic, and then sends the notification packet to next hop S1, and so on. This ensures that the shortest path switching is started from S3 in turn, the traffic switch of S2 does not affect the forwarding path of other devices, and any path between S2 and S4 is reachable. Therefore, no traffic interruption will occur.
The speed for the devices in the clockwise direction and anticlockwise direction to process the notification packet for topology change from daisy chain type to ring type may be different. For example, if S2 is too busy, and cannot process the notification packet sent by S3 for a long time in the clockwise direction, while S1 has processed the notification packet for topology change from daisy chain type to ring type, namely, S1 has switched the shortest forwarding path, while S2 has not, S1 may consider that the path to S4 is S1-S2-S3-S4, while the shortest forwarding path of S2 is still S2-S1-S8-S7-S6-S5-S4, which will result in traffic interruption between S1 and S2. To avoid this problem, the forwarding hop information can be carried in the notification packet for topology change sent by S3 from daisy chain type to ring type. If the number of the devices M in the stacking system is an even number, the forwarding hops carried in the first notification packet at step B is
if the number of the devices M in the stacking system is an odd number, the forwarding hops carried in the first notification packet sent through the stack port whose status changed from blocked to forwarding at step B is
and the forwarding hops carried in the first notification packet sent through the other stack port is
or
Upon receiving the notification packet for topology change from daisy chain type to ring type, each device decreases the forwarding hops carried in the notification packet by 1, and determines whether the forwarding hop is 0 after that; if yes, they do not process the packet; otherwise, they process the packet following step 404. Take
After steps 401 through 405, load balancing is implemented in the stacking system, and the ring topology of the stacking system is stable. The path from S1 to S4 changes to S1-S2-S3-S4, not S1-S8-S7-S6-S5-S4.
When joining of more than one device makes the daisy chain topology change to ring topology, for example, as shown in
At step 701: When S0 and S3 join the stacking system, blocks the right stack port of S3, as shown in
When more than one device joins the stacking system to make the topology change from daisy chain type to ring type, blocks a stack port of one of the newly joined devices in the stacking system to stop it from sending and receiving packets. The right stack port of S3 is blocked in this embodiment, and the stack ports on S2 can also be blocked.
At step 702: Each device in the stacking system performs another daisy chain topology convergence process.
Joining of S0 and S3 makes each device in the stacking system aware of that, thus triggering topology collection and shortest forwarding path calculation. Because a stack port of S3 is blocked, the topology is still of daisy chain type. After topology convergence, joining of S0 and S3 will not affect the forwarding paths of other nodes, and they still forward packets over the shortest forwarding path of the original daisy chain topology. However, because any path between S2 and S4 is reachable, it ensures that the path from S0 and S3 to any other node is reachable and traffic will not be interrupted.
At step 703: Master S1 restores the configurations of S0 and S3 through path S1-S2-S0-S3. After configuration restoration is completed, S1 sends a notification packet in the stacking system for configuration restoration completion.
At step 704: Upon receiving the notification packet for configuration restoration completion, S3 sets its blocked stack port to the forwarding state, calculates the shortest forwarding path and packet discarding rules based on the ring topology with the shortest path forwarding algorithm, and sends notification packets for topology change from daisy chain type to ring type through its two stack ports.
Upon receiving the notification packet for configuration restoration completion, S3 confirms configuration restoration completion, and sets the blocked stack port to the forwarding state, and then the topology changes from daisy chain type to ring type. At this time, S3 will perform ring topology collection, calculate the shortest forwarding path and packet discarding rules based on the ring topology.
In an embodiment of this invention, the newly joined device one of whose stack ports is blocked calculates the shortest forwarding path and packet discarding rules, and then sends notification packets for topology change from daisy chain type to ring type to trigger other devices to calculate the shortest forwarding path.
Step 705 is the same as step 405.
Similarly, to avoid the problem caused by inconsistent processing speed of the configuration restoration completion notification packet by devices in the clockwise and anticlockwise directions, the forwarding hop information can be carried in the notification packet sent by S3 for configuration restoration completion. If the number of the devices M in the stacking system is an even number, the forwarding hops carried in the first notification packets at step B is
if the number of the devices M in the stacking system is an odd number, the forwarding hops carried in the first notification packet sent through the stack port whose status changed from blocked to forwarding at step B is
and the forwarding hops carried in the other first notification packet sent through the other stack port is
or
Upon receiving the notification packet for configuration restoration completion, each device decreases the forwarding hop number carried in the notification packet by 1, and determines whether the forwarding hop is 0 after that; if yes, they do not process the packet; otherwise, they process the packet following step 705.
Take
Based on the preceding method, when newly added devices in the stacking system provided by this invention make the topology change from daisy chain type to ring type, a stack port of one of the newly joined devices is blocked.
The master in the stacking system, used for restoring the configurations of the newly added devices after the devices in the stacking system perform another daisy chain topology convergence process based on the newly joined devices.
In the stacking system, the newly joined device one of whose stack ports is blocked, used for setting the blocked stack port to the forwarding state, calculating the shortest forwarding path based on the ring topology, and sending first notification packets for topology change from daisy chain type to ring type through its two stack ports after its configuration is restored.
Upon receiving the first notification packet, each device re-calculates the shortest forwarding path and switches the traffic, and then forwards the first notification packet.
When new devices join the stacking system, and a stack port of one of the newly joined devices is blocked, the devices in the stacking system collect topology information and calculate the shortest forwarding path based on the daisy chain topology formed by blocking a stack port of one of the newly joined devices, thus to implement daisy chain topology convergence based on the newly joined devices.
The master in the stacking system, also used for sending a second notification packet for configuration restoration completion after restoring the configuration of the newly joined devices.
The newly joined device one of whose stack ports is blocked, also used for confirming that its configuration is restored upon receiving the second notification packet.
Further, after each device in the stacking system calculates the shortest forwarding path, they also calculate the packet discarding rules, which comprise at least: discarding the packets sent by the local device, and discarding the packets not on the shortest forwarding path.
Preferably, the newly joined device one of whose stack ports is blocked is also used for carrying forwarding hop information in the first notification packets sent; wherein if the number of the devices M in the stacking system is an even number,
is used as the forwarding hop to be carried in the first notification packets; if the number of the devices M in the stacking system is an odd number,
is used as the forwarding hops to be carried in the first notification packet sent through the stack port whose status changed from blocked to forwarding, and
or
is used as the forwarding hop to be carried in the other first notification packet sent through the other stack port.
The devices that receive the first notification packets, also used for decreasing the forwarding hop carried in the first notification packets by 1, and determining whether the forwarding hop is 0 after that; if yes, they do not process the packets and discard the packets; otherwise, they continue to calculate the shortest forwarding path.
The preceding description shows that the method and system provided by this invention blocks a stack port of one of the newly joined devices in the stacking system to keep the daisy chain topology when the devices make the topology change to ring topology, thus to ensure that forwarding path of other devices will not be affected before the configurations of the newly joined devices are restored. After the configurations of the newly joined devices are restored, the blocked stack port is set to the forwarding state, and the newly joined device whose stack port is blocked starts to calculate the shortest forwarding path based on the ring topology, and then sends notification packets for topology change from daisy chain type to ring type to ensure that other devices perform shortest forwarding path calculation and traffic switch in turn, thus to ensure that the shortest forwarding path of each device is the same at a time and avoid traffic interruption.
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.
| Number | Date | Country | Kind |
|---|---|---|---|
| 200910088673.6 | Jul 2009 | CN | national |