Читать книгу CCNP Enterprise Certification Study Guide: Implementing and Operating Cisco Enterprise Network Core Technologies - Ben Piper, David Higby Clinton - Страница 64
Calculating the Root Ports of Indirectly Connected Switches
ОглавлениеIt's fairly easy to determine the root port for a bridge that's directly connected to the root. But what about the root port of a bridge that's indirectly connected, perhaps separated by one or two switches? Looking at Figure 2.4, you can see that SW2 has four possible paths back to the root:
SW1—BIA 0015.f9fb.1e80, bridge priority 36865Gi0/0Gi0/1
SW4—BIA 001d.45cf.e800, bridge priority 32769Gi1/0Gi1/1
SW2 will first consider which port offers the lowest cost to the root, which is the sum of all interface costs between SW2 and the root. Let's first look at the path through SW1.
1 SW2 Gi0/0 or Gi0/1 has an interface cost of 4.
2 SW1 Gi1/0 (root port) has an interface cost of 4.
SW2's path through SW1 to the root has a total cost of 8. Now let's consider the path through SW4.
1 SW2 Gi1/0 or Gi1/1 has an interface cost of 4.
2 SW4 Gi0/0 has an interface cost of 4.
SW2's path through SW4 to the root also has a cost of 8. Because both path costs are equal, SW2 will choose the bridge with the lowest bridge ID, which in this case is SW4. Although SW4 has a higher BIA than SW1, it has a lower priority. Because the costs are equal, SW2 will select the port with the lowest port priority as the root port, as shown in the following output:
SW2#show spanning-tree vlan 1 interface gigabitEthernet 1/0 detail Port 5 (GigabitEthernet1/0) of VLAN0001 is root forwarding Port path cost 4, Port priority 128, Port Identifier 128.5. Designated root has priority 32769, address 0015.fa83.e900 Designated bridge has priority 32769, address 001d.45cf.e800 Designated port id is 128.5, designated path cost 4 Timers: message age 15, forward delay 0, hold 0 Number of transitions to forwarding state: 1 Link type is shared by default BPDU: sent 37, received 823 SW2#show spanning-tree vlan 1 interface gigabitEthernet 1/1 detail Port 6 (GigabitEthernet1/1) of VLAN0001 is alternate blocking Port path cost 4, Port priority 128, Port Identifier 128.6. Designated root has priority 32769, address 0015.fa83.e900 Designated bridge has priority 32769, address 001d.45cf.e800 Designated port id is 128.6, designated path cost 4 Timers: message age 15, forward delay 0, hold 0 Number of transitions to forwarding state: 0 Link type is shared by default BPDU: sent 3, received 822
SW4 is advertising a port priority of 128.5 on Gi1/0, which is lower than the port priority of 128.6 that it's advertising on Gi1/1. SW2 will thus select Gi1/0 as the root port. But suppose that you wanted Gi1/1 to be the root port instead. Although there are a few ways to do this, I recommend one of the following:
Decrease the port cost of Gi1/1 on SW2
Decrease the port priority of Gi1/1 on SW4
Alternatively, you could increase the port cost or priority, but it's best not to. If you were to add another connection between the switches later—say using a lower port number like Gi0/3—it would then become the root port. By decreasing the port cost or priority, you can ensure that your desired port always remains the root port.