Spanning-tree port-priority


When you’re using spanning-tree the device is following :
-lower Root Bridge ID.
-lower path cost to the Root.
-lower Sending Bridge ID.
-lower Sending Port ID.

If a switch has two connection to another switch, option 4 takes place.

Here you’ll see an example of SwitchA connected with 2 cables to SwitchB and just a default configuration :
W2960_Standalone#sh spanning-tree vlan 145

VLAN0145
Spanning tree enabled protocol ieee
Root ID Priority 4241
Address 001e.499b.5080
Cost 38
Port 7 (FastEthernet0/7)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32913 (priority 32768 sys-id-ext 145)
Address 0023.05e5.2180
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 15

Interface Role Sts Cost Prio.Nbr Type
——————- —- — ——— ——– ——————————–
Fa0/7 Root FWD 19 128.7 P2p
Fa0/8 Altn BLK 19 128.8 P2p

As you can see fa0/8 is blocking, because the port priority is higher.

If you want the traffic of a certain vlan is crossing over f0/8 instead of f0/7, you can configure port-priority AT THE UPSTREAM Switch.. (So SwitchA instead of SwitchB…)

SW2960_1(config-if)#spanning-tree vlan 145 port-priority 16
SW2960_1#
int f0/2

Vlan Role Sts Cost Prio.Nbr Type
——————- —- — ——— ——– ——————————–
VLAN0001 Desg FWD 19 128.2 P2p
VLAN0020 Desg FWD 19 128.2 P2p
VLAN0145 Desg FWD 19 16.2 P2p
VLAN0146 Desg FWD 19 128.2 P2p
VLAN0147 Desg FWD 19 128.2 P2p
VLAN0148 Desg FWD 19 128.2 P2p
SW2960_1#

And at SwitchB we’ll see :
SW2960_Standalone#sh spanning-tree vlan 145

VLAN0145
Spanning tree enabled protocol ieee
Root ID Priority 4241
Address 001e.499b.5080
Cost 38
Port 8 (FastEthernet0/8)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32913 (priority 32768 sys-id-ext 145)
Address 0023.05e5.2180
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 15

Interface Role Sts Cost Prio.Nbr Type
——————- —- — ——— ——– ——————————–
Fa0/7 Altn BLK 19 128.7 P2p
Fa0/8 Root FWD 19 128.8 P2p

About Joost van der Made

Me

2 responses to “Spanning-tree port-priority”

  1. NetworkGeek says :

    You have things a bit mixed up here.

    In your first example, you state that fa0/8 is blocking because fa0/7 has a higher port priority. This is incorrect.

    The reason fa0/8 is blocking is because port fa0/7 has a lower port ID (7), not a lower priority. Fa0/7 and Fa0/8 have the same priorities (128 – default)

    Also, your list of tie breakers is missing an item, the tie breakers are as follows.

    1) Lowest root bridge ID
    2) Lowest cost path to the root switch (from the switch that will get the root port).
    3) Lowest upstream (towards the root switch) Bridge ID.
    4) Lowest upstream (towards the root switch) port priority.
    5) Lowest upstream (towards the root switch) port ID.

    Good post, thanks for sharing.

Leave a reply to . Cancel reply