Spanning-tree Cost


You can define different cost at a port/vlan to manipulate the spanning-tree flow.

Here we see a default spanningtree :

SW2960_1(config-if)#do sh span vl 145

VLAN0145
Spanning tree enabled protocol ieee
Root ID Priority 4241
Address 001e.499b.5080
Cost 19
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 aca0.166c.2600
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300

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

Not I want that the spanning-tree blocks port f0/8 instead of 0/7

We’re using :

SW2960_1(config-if)#int f0/7
SW2960_1(config-if)#spanning-tree vlan 145 cost 1
SW2960_1(config-if)#do sh span vl 145

VLAN0145
Spanning tree enabled protocol ieee
Root ID Priority 4241
Address 001e.499b.5080
Cost 19
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 aca0.166c.2600
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300

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

The interface is still not forwarding the VLAN 145 traffic….

SW2960_1(config-if)#int f 0/8
SW2960_1(config-if)#spanning-tree vl 145 cos 21
and now we’ll see :

VLAN0145
Spanning tree enabled protocol ieee
Root ID Priority 4241
Address 001e.499b.5080
Cost 20
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 aca0.166c.2600
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300

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

The default path cost is computed from the interface bandwidth setting. These are the IEEE default path cost values:
•1000 Mbps—4
•100 Mbps—19
•10 Mbps—100

As you can see I’m using a 100 mb switch….

About Joost van der Made

Me

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: