Friday, February 23, 2018

Per-VLAN Spanning Tree (PVST+)

**** diagram

sw1 --------->sw2
|                       |
---------sw3--------

os version
Cisco IOS Software, 3700 Software (C3745-ADVENTERPRISEK9-M), Version 12.4(18), RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2007 by Cisco Systems, Inc.
Compiled Fri 30-Nov-07 22:31 by prod_rel_team

ROM: ROMMON Emulation Microcode
ROM: 3700 Software (C3745-ADVENTERPRISEK9-M), Version 12.4(18), RELEASE SOFTWARE (fc1)


- there're 3 vlans
2---> sw1 as root bridge
3--- > sw2 as root bridge
4---> sw3 as root bridge


1- configuration of those switch

- sw1

vlan database
vlan 2
vlan 3
vlan 4
apply
exit


spanning-tree vlan 2 priority 80
vtp file nvram:vlan.dat


interface FastEthernet0/0
 description *** Unused for Layer2 SW ***
 no ip address
 no ip route-cache
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet0/1
 description *** Unused for Layer2 SW ***
 no ip address
 no ip route-cache
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet1/0
 switchport mode trunk
 duplex full
 speed 100
!
interface FastEthernet1/1
 switchport mode trunk
 duplex full
 speed 100
!
interface FastEthernet1/2
 switchport mode trunk
 duplex full
 speed 100







- sw2

vlan database
vlan 2
vlan 3
vlan 4
apply
exit 


spanning-tree vlan 3 priority 80
vtp file nvram:vlan.dat

interface FastEthernet0/0
 description *** Unused for Layer2 SW ***
 no ip address
 no ip route-cache
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet0/1
 description *** Unused for Layer2 SW ***
 no ip address
 no ip route-cache
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet1/0
 switchport mode trunk
 duplex full
 speed 100
!
interface FastEthernet1/1
 switchport mode trunk
 duplex full
 speed 100



- sw3

vlan database
vlan 2
vlan 3
vlan 4
apply
exit

spanning-tree vlan 4 priority 80
vtp file nvram:vlan.dat

interface FastEthernet0/0
 description *** Unused for Layer2 SW ***
 no ip address
 no ip route-cache
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet0/1
 description *** Unused for Layer2 SW ***
 no ip address
 no ip route-cache
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet1/0
 duplex full
 speed 100
!
interface FastEthernet1/1
 switchport mode trunk
 duplex full
 speed 100
!
interface FastEthernet1/2
 switchport mode trunk
 duplex full
 speed 100




2- show command
-sw1
#show interfaces trunk

Port      Mode         Encapsulation  Status        Native vlan
Fa1/0     on           802.1q         trunking      1
Fa1/2     on           802.1q         trunking      1

Port      Vlans allowed on trunk
Fa1/0     1-1005
Fa1/2     1-1005

Port      Vlans allowed and active in management domain
Fa1/0     1-4
Fa1/2     1-4

Port      Vlans in spanning tree forwarding state and not pruned
Fa1/0     1-4
Fa1/2     1-4


------------------------

#show spanning-tree brief

VLAN1
  Spanning tree enabled protocol ieee
  Root ID    Priority    32768
             Address     c407.23ae.0000
             This bridge is the root
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32768
             Address     c407.23ae.0000
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time 300

Interface                                   Designated
Name                 Port ID Prio Cost  Sts Cost  Bridge ID            Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet1/0      128.41   128    19 FWD     0 32768 c407.23ae.0000 128.41
FastEthernet1/2      128.43   128    19 FWD     0 32768 c407.23ae.0000 128.43

         
VLAN2
  Spanning tree enabled protocol ieee
  Root ID    Priority    80
             Address     c407.23ae.0001
             This bridge is the root
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    80
             Address     c407.23ae.0001
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time 300

Interface                                   Designated
Name                 Port ID Prio Cost  Sts Cost  Bridge ID            Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet1/0      128.41   128    19 FWD     0    80 c407.23ae.0001 128.41
FastEthernet1/2      128.43   128    19 FWD     0    80 c407.23ae.0001 128.43

         
VLAN3
  Spanning tree enabled protocol ieee
  Root ID    Priority    80
             Address     c408.23ae.0002
             Cost        19
             Port        41 (FastEthernet1/0)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32768
             Address     c407.23ae.0002
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time 300

Interface                                   Designated
Name                 Port ID Prio Cost  Sts Cost  Bridge ID            Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet1/0      128.41   128    19 FWD     0    80 c408.23ae.0002 128.41
FastEthernet1/2      128.43   128    19 FWD    19 32768 c407.23ae.0002 128.43

         
VLAN4
  Spanning tree enabled protocol ieee
  Root ID    Priority    80
             Address     c409.23ae.0003
             Cost        19
             Port        43 (FastEthernet1/2)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32768
             Address     c407.23ae.0003
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time 300

Interface                                   Designated
Name                 Port ID Prio Cost  Sts Cost  Bridge ID            Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet1/0      128.41   128    19 FWD    19 32768 c407.23ae.0003 128.41
FastEthernet1/2      128.43   128    19 FWD     0    80 c409.23ae.0003 128.43 


--------------------------
#show spanning-tree summary
Root bridge for: VLAN1, VLAN2.
PortFast BPDU Guard is disabled
UplinkFast is disabled
BackboneFast is disabled

Name                 Blocking Listening Learning Forwarding STP Active
-------------------- -------- --------- -------- ---------- ----------
VLAN1                0        0         0        2          2        
VLAN2                0        0         0        2          2        
VLAN3                0        0         0        2          2        
VLAN4                0        0         0        2          2        
-------------------- -------- --------- -------- ---------- ----------
             4 VLANs 0        0         0        8          8        



-sw2
#show interfaces trunk

Port      Mode         Encapsulation  Status        Native vlan
Fa1/0     on           802.1q         trunking      1
Fa1/1     on           802.1q         trunking      1

Port      Vlans allowed on trunk
Fa1/0     1-1005
Fa1/1     1-1005

Port      Vlans allowed and active in management domain
Fa1/0     1-4
Fa1/1     1-4

Port      Vlans in spanning tree forwarding state and not pruned
Fa1/0     1-3
Fa1/1     1-4


----------------------------------------
#  show spanning-tree brief

VLAN1
  Spanning tree enabled protocol ieee
  Root ID    Priority    32768
             Address     c407.23ae.0000
             Cost        19
             Port        41 (FastEthernet1/0)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32768
             Address     c408.23ae.0000
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time 300

Interface                                   Designated
Name                 Port ID Prio Cost  Sts Cost  Bridge ID            Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet1/0      128.41   128    19 FWD     0 32768 c407.23ae.0000 128.41
FastEthernet1/1      128.42   128    19 FWD    19 32768 c408.23ae.0000 128.42

         
VLAN2
  Spanning tree enabled protocol ieee
  Root ID    Priority    80
             Address     c407.23ae.0001
             Cost        19
             Port        41 (FastEthernet1/0)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32768
             Address     c408.23ae.0001
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time 300

Interface                                   Designated
Name                 Port ID Prio Cost  Sts Cost  Bridge ID            Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet1/0      128.41   128    19 FWD     0    80 c407.23ae.0001 128.41
FastEthernet1/1      128.42   128    19 FWD    19 32768 c408.23ae.0001 128.42

         
VLAN3
  Spanning tree enabled protocol ieee
  Root ID    Priority    80
             Address     c408.23ae.0002
             This bridge is the root
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    80
             Address     c408.23ae.0002
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time 300

Interface                                   Designated
Name                 Port ID Prio Cost  Sts Cost  Bridge ID            Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet1/0      128.41   128    19 FWD     0    80 c408.23ae.0002 128.41
FastEthernet1/1      128.42   128    19 FWD     0    80 c408.23ae.0002 128.42

         
VLAN4
  Spanning tree enabled protocol ieee
  Root ID    Priority    80
             Address     c409.23ae.0003
             Cost        19
             Port        42 (FastEthernet1/1)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32768
             Address     c408.23ae.0003
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time 300

Interface                                   Designated
Name                 Port ID Prio Cost  Sts Cost  Bridge ID            Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet1/0      128.41   128    19 BLK    19 32768 c407.23ae.0003 128.41
FastEthernet1/1      128.42   128    19 FWD     0    80 c409.23ae.0003 128.42



--------------------------------------------------------------------
#  show spanning-tree summary
Root bridge for: VLAN3.
PortFast BPDU Guard is disabled
UplinkFast is disabled
BackboneFast is disabled

Name                 Blocking Listening Learning Forwarding STP Active
-------------------- -------- --------- -------- ---------- ----------
VLAN1                0        0         0        2          2        
VLAN2                0        0         0        2          2        
VLAN3                0        0         0        2          2        
VLAN4                1        0         0        1          2        
-------------------- -------- --------- -------- ---------- ----------
             4 VLANs 1        0         0        7          8   


No comments:

Post a Comment