www.howtonetwork.org

CCNA & CCNP Certifcation Training

  • About
  • Contact
  • FAQ
  • Join
  • Home
  • CCNA
    • ICND1
    • ICND2
    • 101 CCNA LABS
  • CCNP
    • ROUTE
    • SWITCH
    • TSHOOT
    • 101 CCNP LABS
  • CompTIA
    • Security+
    • Network+
  • Design
    • CCDA
    • CCDP
You are here: Home / ICND2 / Day 31 – Spanning Tree Protocol / Day 31 Lab / Spanning Tree Root Selection Lab

Spanning Tree Root Selection Lab

Topology

 Spanning Tree Root Selection Lab

Purpose

Learn how to influence which switch becomes the Spanning Tree Root Bridge.

Walkthrough

  1. Set the hostname of each switch and connect them with a crossover cable. You can then check whether the interface between them is set to “trunk.”

SwitchA#show interface trunk

  1. You may not see the trunk link become active until you set one side as a trunk link.

SwitchB#conf t

Enter configuration commands, one per line.  End with CNTL/Z.

SwitchB(config)#int FastEthernet0/1

SwitchB(config-if)#switchport mode trunk
SwitchB(config-if)#^Z

SwitchB#sh int trunk

Port        Mode         Encapsulation  Status        Native vlan

Fa0/1       on           802.1q         trunking      1

Port        Vlans allowed on trunk

Fa0/1       1-1005

Port        Vlans allowed and active in management domain

Fa0/1       1

  1. You will see that the other switch is left on auto mode.

SwitchA#show int trunk

Port        Mode         Encapsulation  Status        Native vlan

Fa0/1       auto         n-802.1q       trunking      1

 

Port        Vlans allowed on trunk

Fa0/1       1-1005

 

Port        Vlans allowed and active in management domain

Fa0/1       1

  1. Create two VLANs on each switch.

SwitchA#conf t

Enter configuration commands, one per line.  End with CNTL/Z.

SwitchA(config)#vlan 2

SwitchA(config-vlan)#vlan 3

SwitchA(config-vlan)#^Z

SwitchA#

%SYS-5-CONFIG_I: Configured from console by console

SwitchA#show vlan brief

VLAN Name                         Status    Ports

—- ——————           ——-   ——————–

1    default                      active    Fa0/2, Fa0/3, Fa0/4,

                                            Fa0/5, Fa0/6, Fa0/7,

                                            Fa0/8, Fa0/9, Fa0/10,

                                            Fa0/11, Fa0/12, Fa0/13,

                                            Fa0/14, Fa0/15, Fa0/16,

                                            Fa0/17, Fa0/18, Fa0/19,

                                            Fa0/20, Fa0/21, Fa0/22,

                                            Fa0/23, Fa0/24

2    VLAN0002                       active

3    VLAN0003                       active

1002 fddi-default                   active

1003 token-ring-default             active

Create the VLANs on Switch B as well (copy the commands above).

  1. Determine which switch is the Root Bridge for VLANs 2 and 3.

SwitchB#show spanning-tree vlan 2

VLAN0002

Spanning tree enabled protocol ieee

Root ID    Priority    32770

Address     0001.972A.7A23

This bridge is the root

Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec

 

Bridge ID  Priority    32770  (priority 32768 sys-id-ext 2)

Address     0001.972A.7A23

Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec

Aging Time  20

 

Interface        Role  Sts  Cost      Prio.Nbr Type

———        —-  —  —-      ——– —-

Fa0/1            Desg  FWD  19        128.1    P2p

You can see that Switch B is the Root. Do the same command on Switch A and check for VLAN 3. The priority is 32768 plus the VLAN number, which is 2 in this case. The lowest mac address will then determine the Root Bridge.

SwitchB#show spanning-tree vlan 3

VLAN0003

  Spanning tree enabled protocol ieee

  Root ID    Priority    32771

             Address     0001.972A.7A23

             This bridge is the root

             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32771  (priority 32768 sys-id-ext 3)

             Address     0001.972A.7A23

             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec

             Aging Time  20

Interface        Role  Sts  Cost      Prio.Nbr Type

———-       —-  —  —-      ——– —-

Fa0/1            Desg  FWD  19        128.1    P2p

The mac address I have for Switch A is higher, which is why it didn’t become the Root Bridge:

0010.1123.D245

  1. Set the other switch to be the Root Bridge for VLANs 2 and 3. Use the spanning-tree vlan 2 priority 4096 command for VLAN 2 and the spanning-tree

Vlan 3 root primary for VLAN 3.

SwitchA(config)#spanning-tree vlan 2 priority 4096

SwitchA(config)#spanning-tree vlan 3 root primary

SwitchA#show spanning-tree vlan 2

VLAN0002

  Spanning tree enabled protocol ieee

  Root ID    Priority    4098

             Address     0010.1123.D245

             This bridge is the root

             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    4098  (priority 4096 sys-id-ext 2)

             Address     0010.1123.D245

             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec

             Aging Time  20

Interface        Role  Sts  Cost      Prio.Nbr Type

———        —-  —  —-      ——– —-

Fa0/1            Desg  FWD  19        128.1    P2p

SwitchA#show spanning-tree vlan 3

VLAN0003

  Spanning tree enabled protocol ieee

  Root ID    Priority    24579

             Address     0010.1123.D245

             This bridge is the root

             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    24579  (priority 24576 sys-id-ext 3)

             Address     0010.1123.D245

             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec

             Aging Time  20

Interface        Role  Sts  Cost      Prio.Nbr Type

———        —-  —  —-      ——– —-

Fa0/1            Desg  FWD  19        128.1    P2p

SwitchA#

Note: Despite Switch B having the lower Bridge ID, Switch A was forced to be the Root Bridge.

Visit www.in60days.com and watch me do this lab for free.

About Us

This is a free bonus site for members of www.howtonetwork.com

Copyright

The content on this copyright Reality Press Ltd.
Copyright Reality Press Ltd.