cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
16071
Views
0
Helpful
8
Replies

Spanning-tree with port-priority

pboegli77
Level 1
Level 1

Hi,

stp.jpg

I want vlan 124 use the second path (G2/1/4-G2/1/1), the other vlan use the first path (G1/1/4-G1/1/1)

Here is my conf for both switches :

SW1 :

spanning-tree mode rapid-pvst

spanning-tree extend system-id

spanning-tree vlan 8,62,120,125-126,128-129,172 priority 4096

spanning-tree vlan 124 priority 8192

interface GigabitEthernet1/1/4

switchport trunk encapsulation dot1q

switchport trunk allowed vlan 8,62,120,124-126,128,129,172

switchport mode trunk

spanning-tree vlan 8,62,120,125-126,128-129,172 port-priority 64

SW2 :

spanning-tree mode rapid-pvst

spanning-tree extend system-id

spanning-tree vlan 8,62,120,125-126,128-129,172 priority 8192

spanning-tree vlan 124 priority 4096

interface GigabitEthernet2/1/1

switchport trunk encapsulation dot1q

switchport trunk allowed vlan 8,62,120,124-126,128,129,172

switchport mode trunk

spanning-tree vlan 124 port-priority 64

Anyway, all trafic goes through G1/1/4-G1/1/1, even vlan 124....

SW1#sh spanning-tree vlan 124 det

VLAN0124 is executing the rstp compatible Spanning Tree protocol

  Bridge Identifier has priority 8192, sysid 124, address 6400.f1a6.dc80

  Configured hello time 2, max age 20, forward delay 15, transmit hold-count 6

  Current root has priority 4220, address c464.130f.4180

  Root port is 28 (GigabitEthernet1/1/4), cost of root path is 4

  Topology change flag not set, detected flag not set

  Number of topology changes 22 last change occurred 09:58:48 ago

          from StackPort1

  Times:  hold 1, topology change 35, notification 2

          hello 2, max age 20, forward delay 15

  Timers: hello 0, topology change 0, notification 0, aging 300

Port 28 (GigabitEthernet1/1/4) of VLAN0124 is root forwarding

   Port path cost 4, Port priority 128, Port Identifier 128.28.

   Designated root has priority 4220, address c464.130f.4180

   Designated bridge has priority 4220, address c464.130f.4180

   Designated port id is 128.25, designated path cost 0

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

   Number of transitions to forwarding state: 1

   Link type is point-to-point by default

   BPDU: sent 8, received 17840

Port 84 (GigabitEthernet2/1/4) of VLAN0124 is alternate blocking

   Port path cost 4, Port priority 128, Port Identifier 128.84.

   Designated root has priority 4220, address c464.130f.4180

   Designated bridge has priority 4220, address c464.130f.4180

   Designated port id is 64.81, designated path cost 0

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

   Number of transitions to forwarding state: 1

   Link type is point-to-point by default

   BPDU: sent 7, received 20228

SW2#sh spanning-tree vlan 124 det

VLAN0124 is executing the rstp compatible Spanning Tree protocol

  Bridge Identifier has priority 4096, sysid 124, address c464.130f.4180

  Configured hello time 2, max age 20, forward delay 15, transmit hold-count 6

  We are the root of the spanning tree

  Topology change flag not set, detected flag not set

  Number of topology changes 17 last change occurred 09:58:37 ago

          from GigabitEthernet1/1/1

  Times:  hold 1, topology change 35, notification 2

          hello 2, max age 20, forward delay 15

  Timers: hello 0, topology change 0, notification 0, aging 300

Port 25 (GigabitEthernet1/1/1) of VLAN0124 is designated forwarding

   Port path cost 4, Port priority 128, Port Identifier 128.25.

   Designated root has priority 4220, address c464.130f.4180

   Designated bridge has priority 4220, address c464.130f.4180

   Designated port id is 128.25, designated path cost 0

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

   Number of transitions to forwarding state: 1

   Link type is point-to-point by default

   BPDU: sent 17835, received 3

Port 81 (GigabitEthernet2/1/1) of VLAN0124 is designated forwarding

   Port path cost 4, Port priority 64, Port Identifier  64.81.

   Designated root has priority 4220, address c464.130f.4180

   Designated bridge has priority 4220, address c464.130f.4180

   Designated port id is 64.81, designated path cost 0

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

   Number of transitions to forwarding state: 1

   Link type is point-to-point by default

   BPDU: sent 20223, received 7

Why the path is not used for vlan 124 ??? Where is the mistake ?

1 Accepted Solution

Accepted Solutions

Hi,

sorry, I don't understand, the spanning-tree vlan 124 priority 4096 on SW2 is not enough ?

All this command is gonna do is make SW2 the root bridge but it won't have any effect on load-balancing.

the decision for electing the root port on a non root bridge is lowest Root Path Cost and in case of a tie which is the case here then the switch will elect as root port the one receiving the lowest Bridge id which are equal here too so then it will lookt at lowest received port-priority then if there is a tie the switch will look at lowest advertised port identifier. so the root port will be G1/1/4 for all VLANs as on SW2 G1/1/1 has lowest  port identifier.

So as toshi stated you have two choices here :

1) raise  the cost of G1/1/4 for  VLAN 124 on SW1

2) lower port-priority of g2/1/1 for VLAN 124 on SW2

Regards.

Alain

Don't forget to rate helpful posts.

View solution in original post

8 Replies 8

Hi,

   You just configure "port priority" on upstream switches on designated ports or modify "port cost" on downstream switches on root ports.

HTH,

Toshi

Hi,

sorry, I don't understand, the spanning-tree vlan 124 priority 4096 on SW2 is not enough ?

Pascal

Hi,

sorry, I don't understand, the spanning-tree vlan 124 priority 4096 on SW2 is not enough ?

All this command is gonna do is make SW2 the root bridge but it won't have any effect on load-balancing.

the decision for electing the root port on a non root bridge is lowest Root Path Cost and in case of a tie which is the case here then the switch will elect as root port the one receiving the lowest Bridge id which are equal here too so then it will lookt at lowest received port-priority then if there is a tie the switch will look at lowest advertised port identifier. so the root port will be G1/1/4 for all VLANs as on SW2 G1/1/1 has lowest  port identifier.

So as toshi stated you have two choices here :

1) raise  the cost of G1/1/4 for  VLAN 124 on SW1

2) lower port-priority of g2/1/1 for VLAN 124 on SW2

Regards.

Alain

Don't forget to rate helpful posts.

I have already a lower port-priority on G2/1/1, as you can see in my config.... but it doesn't work

spanning-tree vlan 124 port-priority 64

Look at the show spanning tree vlan detail on SW1 :

Port 28 (GigabitEthernet1/1/4) of VLAN0124 is root forwarding

   Port path cost 4, Port priority 128, Port Identifier 128.28.

   Designated root has priority 4220, address c464.130f.4180

   Designated bridge has priority 4220, address c464.130f.4180

   Designated port id is 128.25, designated path cost 0

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

   Number of transitions to forwarding state: 1

   Link type is point-to-point by default

   BPDU: sent 8, received 17840

Port 84 (GigabitEthernet2/1/4) of VLAN0124 is alternate blocking

   Port path cost 4, Port priority 128, Port Identifier 128.84.

   Designated root has priority 4220, address c464.130f.4180

   Designated bridge has priority 4220, address c464.130f.4180

   Designated port id is 64.81, designated path cost 0

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

   Number of transitions to forwarding state: 1

   Link type is point-to-point by default

   BPDU: sent 7, received 20228

Designated port id is lower (64.81 < 128.21) but it is in the alternate blocking state...

Hi,

Yes indeed then it's weird. Can you try shutting the interfaces and then bring them  back up.

Regards.

Alain

Don't forget to rate helpful posts.

Not really possible because I'm in a production environement.

Anyway, I've removed the

spanning-tree vlan 8,62,120,125-126,128-129,172 port-priority 64 on G1/1/4 and

spanning-tree vlan 124 port-priority 64 on G2/1/1 and added

spanning-tree vlan 8,62,120,125-126,128-129,172 cost 2 on G1/1/1 of SW2 and

spanning-tree vlan 124 cost 2 on G2/1/4 of SW1 and then, it does the job...

I still don't understand why the port-priority is not working... but now, with cost command, it works.

Thank you

Hi,

Happy you solved problem.

Don't forget to rate helpful posts and mark the thread as solved.

Regards.

Alain

Don't forget to rate helpful posts.

ebarticel
Level 4
Level 4

I don't see the config for G2/1/4 on Sw1. I think you need to add the vlan 124 priority on that port and allow it.

Hope this helps

Eugen

Review Cisco Networking products for a $25 gift card