CCNP Enterprise Certification Study Guide: Implementing and Operating Cisco Enterprise Network Core Technologies. Ben Piper

Чтение книги онлайн.

Читать онлайн книгу CCNP Enterprise Certification Study Guide: Implementing and Operating Cisco Enterprise Network Core Technologies - Ben Piper страница 27

CCNP Enterprise Certification Study Guide: Implementing and Operating Cisco Enterprise Network Core Technologies - Ben Piper

Скачать книгу

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

      Modifying Port Cost

      To get SW2 to use Gi1/1 as the root port, you can decrease the port cost from 4 to 2:

      Gi1/1 is now the root port. Let's change it back to 4:

      SW2(config-if)#spanning-tree vlan 1 cost 4 SW2(config-if)#do show spanning-tree vlan 1 VLAN0001 Spanning tree enabled protocol rstp Root ID Priority 32769 Address 0015.fa83.e900 Cost 8 Port 5 (GigabitEthernet1/0) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32769 (priority 32768 sys-id-ext 1) Address 0015.fa88.4e80 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300 sec Interface Role Sts Cost Prio.Nbr Type ------------------- ---- --- --------- -------- -------------------------------- Gi0/0 Altn BLK 4 128.1 P2p Gi0/1 Altn BLK 4 128.2 P2p Gi0/2 Desg BLK 4 128.3 P2p Gi0/3 Desg BLK 4 128.4 P2p Gi1/0 Root FWD 4 128.5 P2p Gi1/1 Altn BLK 4 128.6 P2p ! Output truncated

      Gi1/0 is once again the root port.

      Modifying Port Priority

      You can change the port priority for Gi1/1 on SW4 as follows:

      SW4(config)#int gigabitEthernet 1/1 SW4(config-if)#spanning-tree vlan 1 port-priority ? <0-224> port priority in increments of 32 SW4(config-if)#spanning-tree vlan 1 port-priority 64

      On SW2, you can see the designated port ID for Gi1/1 is now 64.6, and it's the root port:

The figure shows the converged VLAN 1 topology with SW2 Gi1/0 blocking.

      Calculating Blocked Ports

      Now we come to perhaps the easiest part of Spanning Tree: determining which remaining ports to block. Consider the connections between SW1 and SW4. Both are directly connected to the root, SW3, and have no need of a link to each other. Because SW1 has the higher bridge priority, it will block both its ports, like so:

      SW1#show spanning-tree vlan 1 | i Gi2/0|Gi2/1 Gi2/0 Altn BLK 4 128.9 P2p Gi2/1 Altn BLK 4 128.10 P2p

      Blocked ports don't forward traffic, but they still receive and process BPDUs. This ensures that every bridge can learn about changes to the Spanning Tree topology. SW4 has a lower bridge priority and has both its ports forwarding:

      SW4#show spanning-tree vlan 1 | i Gi2/0|Gi2/1 Gi2/0 Desg FWD 4 128.9 P2p Gi2/1 Desg FWD 4 128.10 P2p

      Any non-root ports that aren't blocking are called designated ports. The job of designated ports is to forward BPDUs from the root bridge so that Spanning Tree can reconverge in the event of a topology change.

      In RSTP, a port can have one of three states: learning, forwarding, or discarding. A port eventually settles into either a forwarding or discarding state. The learning state is transitory and only occurs when RSTP is in the process of determining which ports to block.

       Discarding—The port processes incoming BPDUs but doesn't send them. IOS lists a port in the discarding state as BLK or blocking. This is the initial state for all ports.

       Learning—The port sends and receives BPDUs but doesn't forward data traffic. The switch looks at ingressing Ethernet frames and adds the source MAC addresses to its MAC address table.

       Forwarding—Sends and receives BPDUs, and it also passes normal user and control plane traffic.

      Port Roles

      In addition to the root and designated port roles, RSTP has two additional port roles you need to know: alternate and backup.

       Alternate—An alternate port provides an alternate path to the root. If a root port fails, the switch will place the best (lowest cost) alternate port into a forwarding state. This lets the topology reconverge in a matter of milliseconds.

       Backup—You're unlikely to ever see a backup port role, except on an exam. Imagine that two ports are connected to a hub and hence are on the same segment. The port with the lowest cost—or if the costs are equal, the port with the lowest designated port priority—will be the designated port. The other port connected to the segment will be the backup.

      Link Types

      One way that RSTP achieves a fast convergence time is by avoiding putting some ports through the three-step process of discarding, learning, and forwarding. The idea is that by predefining ports that are directly connected to another switch or to an edge device, RSTP can more quickly figure out which ports to block and which to transition to the forwarding state. RSTP defines three link types:

       Point-to-point (P2P)

       P2P Edge

       Shared

      Point-to-Point (P2P)

      The P2P link type

Скачать книгу