Administration · Networks

Switching solution to a SME network 2/2


Scenario 2: Switches using two ports for interconnection

OK, folks, let’s make a quick resume on what I have already covered in my previous examples. I assume that everyone is familiar now that the Spanning-Tree Protocol does not function properly before the network has converged. Also, if you want to control it well, the best practice is first to sketch what you want as a result, then to try it in a lab or a simulator, and finally to implement it onto your network.

Now, that the basics are known, I move on to the other example where the interconnection between the switches is done by using two ports on each switching device. It is important to note that in my case I am managing the flow of five VLANs as follow:

  • VLAN 40 – Management
  • VLAN 20 – Staff
  • VLAN 30 – Students
  • VLAN 50 – Guest (WiFi)
  • VLAN 100 – VoIP

Also keep into account all the STP Variants available out there. There are proprietary ones for the Cisco Layer 2 devices, too. Just for the record the main ones can be organized in the following table.

STP VariantMain characteristics
PVST (Per-VLAN Spanning Tree) Cisco proprietary
 Uses ISL trunking protocol
 Offers BackboneFast, UplinkFast and PortFast features
PVST+ Cisco proprietary
 Supports 802.1q trunking protocol
 Supports Root guard and BPDU guard
Rapid-PVST+ Cisco proprietary
 Based on RSTP (802.1w standard)
 Converges faster than its ancestor
STP Introduced by the IEEE standard
 Does not offer VLANs support
RSTP (Rapid STP) Introduced by the IEEE standard
 Does not offer VLANs support
 Performance improvements
MSTP Introduced by the IEEE standard
 Understands VLANs and VLAN tagging
 Offers Spanning Tree Regions

A quick off topic: as in the example given I am working with Cisco devices, my current explanation is directed to those one precisely. There is not a visible difference between PVST+ and Rapid-PVST+ technologies used. However, keep in mind that Rapid-PVST+ in many cases can be used to integrate Cisco switches with other company’s Layer 2 devices. What’s more, professionally speaking, it is best practice to keep your network up to date, so, please use Rapid-PVST+ as it comes with a bunch of new features, its default timers are: 2 seconds – hello timer, 15 seconds – forward delay timer, and 20 seconds – max-age timer (offers much greater convergence compared to PVST+) and also supports a fall back mechanism if there are older switches in your network infrastructure.

Now, recall the example with the timelines from scenario 1 explanation. It is the same case here, too. The thing is that with the following few configuration lines I try to achieve a different Spanning Tree Topology for each VLAN in the network each one having its own Root Bridge and port roles.

For VLAN 40 the following set of commands are issued to the three switches.

S1(conf)# spanning-tree vlan 40 root primaryMakes S1 the Root Bridge for VLAN 40
S3(conf)# spanning-tree vlan 40 root secondaryWill make S3 the Root Bridge for VLAN 40 if S1 fails.
S2(conf)#interface fa0/3
S2(conf-if)# spanning-tree vlan 40 port-priority 16Changes the priority of an interface. This leads to a change in the Port Role. The idea is to make this interface the Root Port.
S3(conf)#interface fa0/1
S3(conf-if)# spanning-tree vlan 40 port-priority 16Same idea as for interface fa0/3 on S2.
Another command that changes the port role is:
S2(conf-if)spanning-tree vlan 40 cost 2
If the port-priority does not work changing the path cost will do the work.

Port-priority value can vary from 16 to 240 in a 16 value interval. Cost value can vary from 1 to 200000000. For both commands the lower the number the higher the priority.

This gives this final outcome:

Double interconnection

The same procedures are applied to all VLANs that exist in the network. This last table systematizes the final outcome wanted.:

VLANRoot BridgeRoot Port
20S2 – Primary
S3 – Secondary
S1 – interface Fa0/4
S3 – interface Fa0/4
30S3 – Primary
S2 – Secondary
S1 – interface Fa0/1
S2 – interface Fa0/1
50S3 – PrimaryS1 – interface Fa0/2
S2 – interface Fa0/2
100S2 – PrimaryS1 – interface Fa0/3
S3 – interface Fa0/3

Tip: If other outcome is desired, first scheme up what you want to do and then go ahead.