Layer 2

Last Updated : Nov 24, 2023 |

Layer 2 configuration of the switches supporting the cluster should use IEEE 802.1w Rapid Spanning Tree Protocol (RSTP) to prevent loops and for selection between redundant links. Most modern switches implement this protocol. The G4xx media gateway supports RSTP. Selecting a device for Layer 2 access that does not support RSTP should be very carefully considered since those devices are likely to be obsolete and lacking in other highly desirable features in areas such as Quality of Service, security, and manageability. RSTP is also preferred over most alternative solutions that are typically not standards based and can cause problems with interoperability, scalability and configuration complexity. The selected redundancy protocol must be well understood by the IT staff responsible for maintaining the network.

It is good policy to enable RSTP on all ports of the Layer 2 switches, including the ports directly connected to hosts. Misconfiguration and human error are more likely to occur than link failure and the added protection of loop avoidance is worth the minimal overhead. This possibility is an additional argument in favor of using RSTP as a redundancy protocol since other solutions cannot be uniformly applicable to the subnet.

With modular configuration, the spanning tree is kept simple and deterministic. Consider the sample spanning tree configuration in Figure : 1. The topology has been redrawn and the host connections have been removed to simplify the explanation. Assume the bridge priorities are assigned such that the VRRP primary router has the highest priority, the secondary router is next, Switch 1 is third, and Switch 2 is last. It is also important that the bandwidth of all links be equivalent and adequate to handle the aggregated traffic.

In Figure : 1, links A and B are directly attached to the root bridge so links A and B will be in forwarding mode. Link C connects to a higher priority bridge than link D, so link D will be disabled and Switch 1 will be the designated root for the secondary router. In this configuration, traffic from the attached devices flows directly to the primary router on links A and B.

Figure : 1. Sample spanning tree
Displays a sample spanning tree

If the primary router fails, the secondary router becomes both the active router and the root bridge, and traffic from the switches flows on the reconfigured spanning tree along links C and D. If bridge priorities are not managed, traffic from one switch can be directed through the secondary router and the other switch as normal operation.

Figure : 2. Alternate configuration - Layer 2
Displays alternate configuration with two routers

In the alternate integrated device configuration, bridge priority is less significant but other factors such as link sizing becomes an issue if there are not enough Gigabit Ethernet aggregation ports. If a link aggregation group (LAG) is used, flow distributions must be understood to ensure correct behavior.