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 страница 28

СКАЧАТЬ that the link is a link between only two switches. Thus, each switch knows that it needs to negotiate with only one switch on the other end of the link. RSTP will automatically set the P2P link type on any full-duplex link. You can manually set the P2P link type using the interface command spanning-tree link-type point-to-point.

      This type is reserved for edge devices that don't run Spanning Tree, such as computers, servers, and phones. An edge port skips over the learning state and transitions instantly to a forwarding state. RSTP still sends BPDUs on edge ports just in case there's a switch on the other end. But if it receives a BPDU, it will change the port type to a normal Spanning Tree port. If you're familiar with PortFast, this is essentially the same thing. In fact, IOS uses the portfast keyword to configure an edge port, as follows:

      SW2(config)#int gi1/3 SW2(config-if)#spanning-tree portfast edge ? trunk Enable portfast edge on the interface even in trunk mode <cr> SW2(config-if)#spanning-tree portfast edge trunk %Warning: portfast should only be enabled on ports connected to a single host. Connecting hubs, concentrators, switches, bridges, etc... to this interface when portfast is enabled, can cause temporary bridging loops. Use with CAUTION

      Keep in mind that an edge port can be an access port or a trunk port that's connected to multiple devices. If the port is a single-VLAN access port, you should use the spanning-tree portfast edge interface command. But if it's a trunked interface—such as one connected to a server running virtual machines or a computer plugged in behind an IP phone on a separate voice VLAN—you must use the spanning-tree portfast edge trunk interface command.

      Shared

      The Shared port type is one you shouldn't expect to see very often. It's for a port that may be connected to multiple devices, usually via a hub. RSTP considers any half-duplex link to be shared. In this case, RSTP falls back to timer-based 802.1D behavior and may take up to 50 seconds to converge.

      Multiple Spanning Tree

      MST is designed as an alternative to PVST+. MST allows you to reduce the number of Spanning Tree instances required when you have a large number of VLANs. In per-VLAN Spanning Tree, you must have one Spanning Tree instance per VLAN. For example, if you have 500 VLANs, you must have 500 instances of Spanning Tree.

       Region name

       Revision number

       List of VLAN-to-instance mappings

      As long as all three parameters match on each switch in the topology, they're considered to be in the same region and will form a stable Spanning Tree topology. When you enable MST, it spawns a default Spanning Tree instance called MST0. By default, MST0 maps to all VLANs (1-4094). MST0 is also known as the Internal Spanning Tree (IST). The following example on SW1 illustrates how you could map VLANs 1, 3, and 5 to instance MST1, and VLANs 2, 4, and 6 to MST2:

      ! Enable MST SW1(config)#spanning-tree mode mst ! Enter MST configuration mode SW1(config)#spanning-tree mst configuration ! Set the region name to myRegion SW1(config-mst)#name myRegion ! Map VLANs 1, 3, and 5 to instance 1 SW1(config-mst)#instance 1 vlan 1,3,5 ! Map VLANs 2,4 and 6 to instance 2 SW1(config-mst)#instance 2 vlan 2,4,6 ! Configure the revision number SW1(config-mst)#revision 1 ! Display the pending configuration SW1(config-mst)#show Pending MST configuration Name [myRegion] Revision 1 Instances configured 3 Instance Vlans mapped -------- --------------------------------------------------------------------- 0 7-4094 1 1,3,5 2 2,4,6 ------------------------------------------------------------------------------- ! Remember to issue the exit command to save the MST configuration to the running config SW1(config-mst)#exit ! Exit global configuration mode, then save the running configuration SW1(config)#exit SW1#write memory

      

Behind the scenes, each MST instance uses RSTP.

      Root Bridges and Port Priority

The figure shows an example of the multiple spanning tree.

      Enter configuration commands, one per line. End with CNTL/Z. SW1(config)#spanning-tree mst 1 priority 0 SW1(config)#exit SW1#show spanning-tree mst 1 ##### MST1 vlans mapped: 1,3,5 Bridge address 0015.f9fb.1e80 priority 1 (0 sysid 1) Root this switch for MST1 ! Output truncated

      SW1(config)#interface gi2/1 SW1(config-if)#spanning-tree mst 1 port-priority 32

      Internal Spanning Tree

      MST can interoperate with other Spanning Tree protocols and even other MST regions. When an MST region is connected to switches in another MST region, or simply not running MST at all, it will make the MST region appear as a single RPVST+ or PVST+ topology, depending on what the peer switch is running. This is called PVST simulation. To illustrate, let's change SW2 back to RPVST+ mode:

      SW2(config)#spanning-tree mode rapid-pvst SW2(config)#do show spanning-tree vlan 1-10 summary Switch is in rapid-pvst mode Root bridge for VLAN0001 is 32768.0015.f9fb.1e80. Root bridge for VLAN0002 is 32768.0015.f9fb.1e80. Root bridge for VLAN0003 is 32768.0015.f9fb.1e80. Root bridge for VLAN0004 is 32768.0015.f9fb.1e80. Root bridge for VLAN0005 is 32768.0015.f9fb.1e80. Root bridge for VLAN0006 is 32768.0015.f9fb.1e80. Root bridge for VLAN0007 is 32768.0015.f9fb.1e80. Root bridge for VLAN0008 is 32768.0015.f9fb.1e80. Root bridge for VLAN0009 is 32768.0015.f9fb.1e80. Root bridge for VLAN0010 is 32768.0015.f9fb.1e80. ! Output truncated