R&S Blog

Just another WordPress.com site

STP Port Cost

Vlans from 1-10 created on both switches will the default priority with sw2 being the root bridge based on the bridge priority field + Mac.
On SW1 fa 0/2 is blocking state for all vlans which based on the port priority
SW1 Interface        Role Sts Cost      Prio.Nbr Type

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

Fa0/1            Root FWD 19        128.1    P2p

Fa0/2            Altn BLK 19        128.2    P2p

We want to change fa 0/2 to be the root port for VLANS 1-5 and blocking for VLANS 6-10, we can either change the port-priority or the path cost. We will look at both methods as an example below.

The BPDU are sent by the Root Bridge which include the port-priority field, so we have to make the changes on SW2 fa 0/2 for the vlans 1-5

SW2(config-if)#spanning-tree vlan 1-5 port-priority 64

SW1#sh spanning-tree vlan 1 interface fa 0/2 detail

 Port 2 (FastEthernet0/2) of VLAN0001 is root forwarding

   Port path cost 19, Port priority 128, Port Identifier 128.2 (Local Port Priority)

   Designated root has priority 32769, address 0009.7c0b.9880

   Designated bridge has priority 32769, address 0009.7c0b.9880

   Designated port id is 64.2(SW2 Port Priority)

   Timers: message age 15, forward delay 0, hold 0

   Number of transitions to forwarding state: 3

   Link type is point-to-point by default

   BPDU: sent 10, received 1066

 Port 2 SW1 are in the blocking state as the command includes only vlans 1-5

SW1#sh spanning-tree vlan 6 interface fa 0/2 detail

 
 Port 2 (FastEthernet0/2) of VLAN0006 is alternate blocking

   Port path cost 19, Port priority 128, Port Identifier 128.2.

   Designated root has priority 32774, address 0009.7c0b.9880

   Designated bridge has priority 32774, address 0009.7c0b.9880

   Designated port id is 128.2, designated path cost 0

   Timers: message age 16, forward delay 0, hold 0

   Number of transitions to forwarding state: 0

   Link type is point-to-point by default

   BPDU: sent 1, received 936

Option 2 Changing the Pathc

Change the path cost on Interface fa 0/2 for vlans 1-5

Interface        Role Sts Cost      Prio.Nbr Type

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

Fa0/1            Root FWD 19        128.1    P2p

Fa0/2            Altn BLK 19        128.2    P2p

 

SW1(config-if)#spanning-tree vlan 1-5 cost 16

Interface        Role Sts Cost      Prio.Nbr Type

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

Fa0/1            Altn BLK 19        128.1    P2p

Fa0/2            Root FWD 16        128.2    P2p

 

 

Advertisements

Single Post Navigation

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: