Techniques for simplifying stacking trunk creation and management

Techniques for simplifying stacking trunk creation and management are provided. In one embodiment, a switch in a stacking system can receive first and second control packets from one or more other switches in the stacking system, where the first and second control packets are received on first and second stacking ports of the switch respectively. The switch can then determine, based on the first and second control packets, whether the first and second stacking ports can be configured as a single stacking trunk.

BACKGROUND

As known in the art, a “stackable switch” is a network switch that can operate independently as a standalone device or in concert with one or more other stackable switches in a “stack” or “stacking system.”FIG. 1Aillustrates the front face of an exemplary stackable switch100according to an embodiment. As shown inFIG. 1A, stackable switch100includes a plurality of data ports102that are operable for connecting switch100to one or more hosts and/or data networks. Stackable switch100also includes a set of stacking ports104that are operable for linking switch100to other switch units in a stacking configuration. Stacking ports104can be dedicated ports (i.e., ports designed specifically for stacking) or high bandwidth data uplink ports that can operate in a stacking mode.

Some stackable switches support a feature known as “trunked stacking.” With this feature, multiple stacking ports can be grouped together to behave as a single logical port (referred to as a “stacking trunk”), thereby improving resiliency and bandwidth between units in a stacking system. By way of example,FIG. 1Bdepicts a stacking system where stackable switch100ofFIG. 1Ais connected to another stackable switch110via links112and114. The stacking ports at the ends of these links (i.e., ports116,118on switch100and ports120,122on switch110) are grouped into stacking trunks124and126respectively. In this example, when traffic needs to flow between switches100and110, the traffic may pass over either link112or114since they are considered part of the same logical connection. This increases the aggregate bandwidth between switches100and110and provides redundancy in the case of a link failure.

Unfortunately, despite the advantages provided by trunked stacking, this feature can also significantly complicate stacking system administration and management. For instance, in order to configure stacking trunks124and126shown inFIG. 1B, a system administrator must typically enter trunk creation commands at each switch100and110, which require knowledge of the unit IDs of the switches, the port numbers of the trunked ports, and the format/operation of the commands themselves. Although this manual configuration process may be workable in a small-scale stacking system, it can quickly become cumbersome, time-consuming, and error-prone in systems with larger and/or more complex topologies.

Further, the physical connections between units in a stacking system must correctly match the configuration entered via the trunk commands. If one or more of the physical connections are incorrect, the system administrator must generally inspect the cabling at each unit in order to find the incorrect connection(s), which again can be very difficult and time-consuming in a large/complex topology.

SUMMARY

Techniques for simplifying stacking trunk creation and management are provided. In one embodiment, a switch in a stacking system can receive first and second control packets from one or more other switches in the stacking system, where the first and second control packets are received on first and second stacking ports of the switch respectively. The switch can then determine, based on the first and second control packets, whether the first and second stacking ports can be configured as a single stacking trunk.

DETAILED DESCRIPTION

The present disclosure describes techniques for simplifying the creation and management of stacking trunks in a stacking system. In one set of embodiments, the physical topology of the stacking system can be discovered and stacking trunks can be created/configured automatically based on the discovered topology, thus eliminating the need for any manual trunk configuration.

In another set of embodiments, the discovered topology can be analyzed and erroneous physical connections between switches (e.g., links that do not allow for a valid trunk) can be determined. The location of the erroneous connections (e.g., unit ID/MAC address and port number) can then be reported to the system administrator so that he/she can adjust the cabling at the affected units, without having to inspect each and every unit in the stacking system.

In yet another set of embodiments, the techniques described herein can automatically make changes/corrections to an existing trunk configuration in view of the discovered topology. For example, consider a situation where stacking trunks are created/configured and the physical topology of the stacking system subsequently changes, thereby rendering the existing configuration obsolete. In this case, the errors in the existing configuration can be identified and automatically corrected. In scenarios where there is a non-critical conflict between the physical topology and the trunking configuration, certain rules may be applied to determine whether the configuration should be changed in view of the topology or left intact.

2. Exemplary Stacking System

To provide context for the embodiments described herein,FIG. 2depicts an exemplary stacking system200according to an embodiment. As shown, stacking system200comprises a number of stackable switches202-216connected in a mesh-like topology. Stackable switch202is designated as the “master” unit of stacking system200, which means that switch202serves as the point of user contact for all management functions of system200. For instance, stackable switch202can accept and process user commands directed to the overall configuration of stacking system200. Stackable switch202can also communicate with non-master units204-216in order to send/receive various types of management commands and data to/from those units as needed.

In the example ofFIG. 2, switches202,204, and206are “core” units (indicated by the heavy outline) and switches208,210,212,214, and216are “peripheral” units (indicated by the lighter outline). In various embodiments, core units202-206can have more and/or superior capabilities than peripheral units208-216. For instance, in a particular embodiment, core units202-206can have higher bandwidth data and/or stacking ports than peripheral units208-216. Thus, the links directly interconnecting the core units can support a greater data throughout than the links interconnecting the peripheral units with each other (or with the core units). Alternatively, core units202-206can have other characteristics that distinguish these units from peripheral units208-216(e.g., a larger number of ports, more advanced network processing capabilities, a higher level of security clearance, etc.).

Further, inFIG. 2, some of the switches are interconnected via stacking trunks, rather than individual stacking links. For example, switches202and208are interconnected via a stacking trunk218comprising links220and222. With these stacking trunks, greater throughput and resiliency can be achieved in the stacking system.

As noted in the Background section, one difficulty with managing a complex stacking system such as stacking system200ofFIG. 2involves configuring and maintaining the stacking trunks between switch units. Currently, system administrators handle this task by manually entering trunk creation commands at each switch that is an endpoint for a stacking trunk. However, this manual process can be burdensome, time-consuming, and error prone. Further, in scenarios where the physical connections in the stacking system do not match the manually-entered commands, there is no way for the administrators to easily determine which physical connections are incorrect. As a result, the administrators must manually inspect the cabling at each switch unit to resolve this type of problem.

To address the foregoing and other similar issues, embodiments of the present invention provide techniques for (1) automatically creating/configuring stacking trunks in a stacking system based on the system's physical topology; (2) automatically detecting and identifying incorrect physical connections; and (3) automatically modifying/correcting existing trunking configurations in view of topology changes. With these techniques (which are described in the sections that follow), many of the inefficiencies and burdens associated with manual stacking trunk configuration/management can be minimized or eliminated.

3. Automated Trunk Creation

FIG. 3depicts a flowchart300for automatically creating/configuring trunks for a stacking system according to an embodiment. Flowchart300assumes that each switch in the stacking system floods, on all of its outgoing stacking ports (with certain restrictions as noted below), control packets for the purpose of discovering the physical topology of the system. These control packets are referred to herein as “discovery packets.” The discovery packets are propagated throughout the stacking system and processed at each receiving switch in the manner shown in flowchart300to automatically identify and create stacking trunks.

At block302, the receiving switch can receive a discovery packet on a stacking port from a given source switch in the stacking system. In response, the receiving switch can check whether a discovery packet was previously received from the same source switch (block304). If not, flowchart300can loop back to block302.

If the receiving switch did previously receive a discovery packet from the same source switch, the receiving switch can then check whether the ports on which the current discovery packet and the previous discovery packet were received are consecutive ports (i.e., numbered with consecutive port numbers) (block306). If not, flowchart300can loop back to block302.

On the other hand, if the current and previous discovery packets were received on consecutive ports, the receiving switch can finally check whether the current and previous discovery packets were sent from consecutive source ports (i.e., consecutively numbered ports on the source switch) (block308). In one embodiment, the receiving switch can determine this by evaluating the content of the discovery packets (which should identify the source port number). If not, flowchart300can loop back to block302. Otherwise, the receiving switch can determine that the ports on which the two discovery packets were received can be trunked, and can forward this information to the master switch in the stacking system (block310).

Although not shown inFIG. 3, the master switch can subsequently generate appropriate configuration for defining the two receiving ports and the two source ports as stacking trunks, thereby automatically creating/configuring the trunks without any manual intervention from an administrator or other user.

In some cases, there may be more than two stacking links connecting a source and a receiving switch, where the links use consecutive ports on both ends. In these situations, a deterministic rule may be used to determine which subset of the ports will be used to a form a stacking trunk. One such rule is to form a stacking trunk comprising two ports, where the first port of the trunk is an odd numbered port and the second port of the trunk is an even numbered port.

To better clarify the operation of flowchart300, consider a scenario where switch202ofFIG. 2floods discovery packets to its immediately connected neighbors in stacking system200. In this scenario, switch208will receive two discovery packets from switch202—one packet on link220and another packet on link222. Upon receiving the second discovery packet, switch208will determine that the two packets were (1) received from the same source unit (i.e., switch202); (2) were received on consecutively numbered stacking ports; and (3) were transmitted by switch202on consecutively numbered source stacking ports. Accordingly, switch208will determine that a stacking trunk can be formed on the receiving (and source) stacking ports, and will transmit trunking information to the master switch (e.g., switch202) to that effect. Switch208can also propagate the discovery packets to other connected switches in the system so that they can perform similar processing to identify and create additional stacking trunks.

One important aspect of the discovery mechanism described with respect toFIG. 3is that the discovery packets should not loop around the topology; in other words, the discovery packets should reach each unit in the stacking system, but should not return back to the packet initiator. This prevents broadcast storms, which can completely saturate the bandwidth of the stacking links.

To ensure the foregoing behavior, each switch in the stacking system can enforce a number of rules at the point of determining whether to forward a received discovery packet. For instance, in one embodiment, if the switch is a core unit and has received a discovery packet from a peripheral unit, the switch will not propagate the packet any further. The logic for this rule is that the packet has received the “end” of the peripheral sub-stack in the topology.

In a further embodiment, each switch can enforce a rule where, if a port can form a trunk with the port on which the discovery packet is received, the packet is not forwarded on that “trunkable” port.

In yet a further embodiment, each switch can enforce a rule where discovery packets are not forwarded on user data ports.

In yet a further embodiment, each switch can enforce a rule where discovery packets are not forwarded on ports that lead back to the immediate source of the received packets. One exception to this rule is that discovery packets may be forwarded back to a source unit on ports that are different from (and not trunkable with) the port(s) on which the packets were received.

In some embodiments, the administrator of a stacking system may wish to exclude certain physically connected units from the system's “active” topology. In these cases, the administrator can define a policy for pruning one or more stacking links in the topology, and the system can take this policy in account to prevent the propagation of discovery packets across the pruned links.

In addition to automated trunk creation, the discovery mechanism described above may also be leveraged to automatically detect whether there are any incorrect physical connections in a stacking system topology (i.e., connections that prevent the formation of valid trunks). If one or more incorrect connections are found, the location of the connections can be reported to the system administrator for resolution.FIG. 4depicts a flowchart400of such a detection/reporting process according to an embodiment. It is assumed that flowchart400is performed by each switch of the stacking system at the point of receiving a discovery packet. Accordingly, flowchart400may be performed at substantially the same time as flowchart300ofFIG. 3(i.e., during the same topology discovery process).

At block402, the receiving switch can receive two discovery packets on two consecutive ports (i.e., the ports are candidates for forming a trunk on the receiving side). In response, the receiving switch can check whether the source unit for the two discovery packets are the same (i.e., did the packets arrive from the same unit?) (block404). If not, the receiving switch can determine there is likely an incorrect physical connection and can report an error to the system administrator (with information identifying, e.g., the receiving switch's ID and/or MAC address, the source switches' IDs and/or MAC addresses, and the receiving switch port numbers) (block410). With this information, the system administrator can quick identify the problem and address the issue (by, e.g., rearranging one or more physical cables).

If the source unit for the two discovery packets is the same, the receiving switch can move on to checking whether the source ports for the two packets are consecutive (block406). As noted with respect toFIG. 3, the receiving switch can determine this by evaluating the content of the discovery packets (which should identify the source port number). If the source ports are not consecutive, the receiving switch can determine that there is a connection error and provide a report to the system administrator as per block410. Otherwise, the receiving switch can determine that there is no problem with the physical topology (block408) and flowchart400can end.

5. Automated Trunk Configuration Correction

As discussed previously, in certain cases the existing trunking configuration for a stacking system may become inconsistent with the system's physical topology over time. For example, one or more switch units may be swapped in from a different system with a different configuration/topology, or one or more units in the system may be rearranged. In these cases, it can be extremely difficult to manually correct the configuration, since it can be difficult to pinpoint the consistencies (particularly in large and/or complex topologies). To address this,FIG. 5depicts a flowchart500for automatically identifying and correcting errors in an existing trunking configuration according to an embodiment. In one embodiment, flowchart500can be performed by, e.g., each switch in the stacking system at the conclusion of (or during) the topology discovery process described with respect toFIGS. 3 and 4.

At block502, the switch can create a bit mask of all of the existing ports and trunks in the switch's existing configuration. Further, at block504, the switch can mask out, in the bit mask, all of the ports and trunks found for the switch during the topology discovery process. If there any remaining links in the bitmask, those links are added to the list of discovered links (block506). Thus, blocks502-506essentially allow the switch to identify the discrepancies between the existing configuration and the discovered topology (i.e., which links are in the configuration but not in the topology, and vice versa).

At block508, the switch can apply a set of rules to determine which of the determined discrepancies will result to a change in the switch's trunking configuration. In one set of embodiments, these rules can include the following:On a peripheral unit, if a peripheral port is not a stacking trunk in the discovered topology but is a stacking trunk in the existing configuration, leave the port as a trunk in the final configuration.If there is a stacking port or trunk in the existing configuration that is not found in the discovered topology, keep the stacking port/trunk in the final configuration (as long as it does not contradict the discovered topology).If there is a stacking trunk in the existing configuration but the discovered topology uses the ports of the trunk in two different stacking links, remove the trunk from the final configuration.On a core unit, if the existing configuration has a stacking trunk that is missing from the discovered topology and the missing trunk is not used in the discovered topology, keep the trunk in the final configuration.

Finally, at block510, the switch can generate its new (i.e., final) trunking configuration based on the application of rules at block508and flowchart500can end.

6. Exemplary Network Switch

FIG. 6depicts an exemplary network switch600according to an embodiment. Network switch600can be used to implement any of the stackable switches described in the foregoing disclosure, such as switches202-216ofFIG. 2.

As shown, network switch600includes a management module602, a switch fabric module604, and a number of I/O modules606(1)-606(N). Management module602represents the control plane of network switch600and thus includes one or more management CPUs608for managing/controlling the operation of the device. Each management CPU608can be a general purpose processor, such as a PowerPC, Intel, AMD, or ARM-based processor, that operates under the control of software stored in an associated memory (not shown).

Switch fabric module604and I/O modules606(1)-606(N) collectively represent the data, or forwarding, plane of network switch600. Switch fabric module604is configured to interconnect the various other modules of network switch600. Each I/O module606(1)-606(N) can include one or more input/output ports610(1)-610(N) that are used by network switch600to send and receive data packets. As noted with respect toFIGS. 1A and 1B, ports610(1)-610(N) can comprise data ports for communicating with hosts/other network devices, as well as stacking ports for communicating with other switch units in the same stacking system. Each I/O module606(1)-606(N) can also include a packet processor612(1)-612(N). Packet processor612(1)-612(N) is a hardware processing component (e.g., an FPGA or ASIC) that can make wire speed decisions on how to handle incoming or outgoing data packets.

It should be appreciated that network switch600is illustrative and not intended to limit embodiments of the present invention. Many other configurations having more or fewer components than switch600are possible.

The above description illustrates various embodiments of the present invention along with examples of how aspects of the present invention may be implemented. The above examples and embodiments should not be deemed to be the only embodiments, and are presented to illustrate the flexibility and advantages of the present invention as defined by the following claims. For example, although certain embodiments have been described with respect to particular process flows and steps, it should be apparent to those skilled in the art that the scope of the present invention is not strictly limited to the described flows and steps. Steps described as sequential may be executed in parallel, order of steps may be varied, and steps may be modified, combined, added, or omitted. As another example, although certain embodiments have been described using a particular combination of hardware and software, it should be recognized that other combinations of hardware and software are possible, and that specific operations described as being implemented in software can also be implemented in hardware and vice versa.

The specification and drawings are, accordingly, to be regarded in an illustrative rather than restrictive sense. Other arrangements, embodiments, implementations and equivalents will be evident to those skilled in the art and may be employed without departing from the spirit and scope of the invention as set forth in the following claims.