Per-Vlan Spanning-Tree Issue

Answered Question
Feb 16th, 2009
User Badges:

Hi all,

I have a topology like on the attachment. Please check it out...


I have four VLANs (10,20,30,40). The Core 1 is the root primary for the 10 and 20 VLAN.

The Core 2 is the root primary for the 30,40 VLAN.


On the SW1, the output of command "show spanning-tree root" shows me that the port g0/49 is the root port for all VLANs.


Root Hello Max Fwd

Vlan Root ID Cost Time Age Dly Root Port

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

VLAN0010 24584 0019.55f2.f000 8 2 20 15 Gi0/49

VLAN0020 24585 0019.55f2.f000 8 2 20 15 Gi0/49

VLAN0030 24586 0019.55f2.edc0 4 2 20 15 Gi0/49

VLAN0040 24587 0019.55f2.edc0 4 2 20 15 Gi0/49


The output on SW2 shows me that the port 0/52 is the root port for all VLANs.


Root Hello Max Fwd

Vlan Root ID Cost Time Age Dly Root Port

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

VLAN0010 24584 0019.55f2.f000 4 2 20 15 Gi0/52

VLAN0020 24585 0019.55f2.f000 4 2 20 15 Gi0/52

VLAN0030 24586 0019.55f2.edc0 8 2 20 15 Gi0/52

VLAN0040 24587 0019.55f2.edc0 8 2 20 15 Gi0/52


Does it mean that the traffic is flowing through this ports?


The traffic wouldn't be balanced bettween the uplinks, on both switches?


I mean, on SW 1, wouldn't the VLAN 10 and 20 traffic flow through the interface G0/49 and the VLAN 30 and 40 traffic flow throught the interface G0/52?


Thanks


Tauer




Attachment: 
Correct Answer by Marwan ALshawi about 8 years 4 months ago

i agreew ith edeson

just go to the interface g0/52 and increase the cost for those vlans

try the following command


interface gig0/52

spanning-tree vlan 10,20 cost 100


this way the cost through g0/49 will be less for those vlans then will be chosen


good luck

if helpful Rate

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (2 ratings)
Loading.
Edison Ortiz Mon, 02/16/2009 - 13:14
User Badges:
  • Super Bronze, 10000 points or more
  • Hall of Fame,

    Founding Member

You did noticed the MAC-Address is different on Vlan 30,40 from Vlan 10,20?


What's the output telling you that it knows the root port via that switchport but the MAC-Address indicates what switch is the root for that Vlan.


HTH,


__


Edison.

Tauer Drumond Mon, 02/16/2009 - 13:18
User Badges:

Hi Edison,

I did.


But, the VLAN 10 and 20 on SW 2, wouldn't flow out the interface G0/49, instead 0/52?


Thanks


Tauer

Edison Ortiz Mon, 02/16/2009 - 13:23
User Badges:
  • Super Bronze, 10000 points or more
  • Hall of Fame,

    Founding Member

The cost is lower via Core 2 <-> Core 1 than SW1 <-> Core 1.


Please post the show spanning-tree from SW2 and SW1.



Correct Answer
Marwan ALshawi Mon, 02/16/2009 - 13:35
User Badges:
  • Purple, 4500 points or more
  • Community Spotlight Award,

    Best Publication, December 2015

i agreew ith edeson

just go to the interface g0/52 and increase the cost for those vlans

try the following command


interface gig0/52

spanning-tree vlan 10,20 cost 100


this way the cost through g0/49 will be less for those vlans then will be chosen


good luck

if helpful Rate

Tauer Drumond Mon, 02/16/2009 - 13:39
User Badges:

Hi Edson,

follow the output on SW1.


SW 1


VLAN0010

Spanning tree enabled protocol ieee

Root ID Priority 24584

Address 0019.55f2.f000

Cost 8

Port 49 (GigabitEthernet0/49)

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec


Bridge ID Priority 32776 (priority 32768 sys-id-ext 8)

Address 0019.55e0.f680

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Aging Time 300


Interface Role Sts Cost Prio.Nbr Type

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

Gi0/52 Altn BLK 4 128.48 P2p

Gi0/49 Root FWD 4 128.49 P2p



VLAN0020

Spanning tree enabled protocol ieee

Root ID Priority 24585

Address 0019.55f2.f000

Cost 8

Port 49 (GigabitEthernet0/49)

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec


Bridge ID Priority 32777 (priority 32768 sys-id-ext 9)

Address 0019.55e0.f680

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Aging Time 300


Interface Role Sts Cost Prio.Nbr Type

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

Gi0/52 Altn BLK 4 128.48 P2p

Gi0/49 Root FWD 4 128.49 P2p



VLAN0030

Spanning tree enabled protocol ieee

Root ID Priority 24586

Address 0019.55f2.edc0

Cost 4

Port 49 (GigabitEthernet0/49)

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec


Bridge ID Priority 32778 (priority 32768 sys-id-ext 10)

Address 0019.55e0.f680

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Aging Time 300


Interface Role Sts Cost Prio.Nbr Type

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

Gi0/52 Desg FWD 4 128.48 P2p

Gi0/49 Root FWD 4 128.49 P2p



VLAN0040

Spanning tree enabled protocol ieee

Root ID Priority 24587

Address 0019.55f2.edc0

Cost 4

Port 49 (GigabitEthernet0/49)

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec


Bridge ID Priority 32779 (priority 32768 sys-id-ext 11)

Address 0019.55e0.f680

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Aging Time 300


Interface Role Sts Cost Prio.Nbr Type

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

Gi0/52 Desg FWD 4 128.48 P2p

Gi0/49 Root FWD 4 128.49 P2p


Tauer Drumond Mon, 02/16/2009 - 13:40
User Badges:

SW 2

_________


VLAN0010

Spanning tree enabled protocol ieee

Root ID Priority 24584

Address 0019.55f2.f000

Cost 4

Port 52 (GigabitEthernet0/52)

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec


Bridge ID Priority 32776 (priority 32768 sys-id-ext 8)

Address 001c.0e11.6480

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Aging Time 300


Interface Role Sts Cost Prio.Nbr Type

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

Gi0/49 Desg FWD 4 128.48 P2p

Gi0/52 Root FWD 4 128.52 P2p



VLAN0020

Spanning tree enabled protocol ieee

Root ID Priority 24585

Address 0019.55f2.f000

Cost 4

Port 52 (GigabitEthernet0/52)

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec


Bridge ID Priority 32777 (priority 32768 sys-id-ext 9)

Address 001c.0e11.6480

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Aging Time 300


Interface Role Sts Cost Prio.Nbr Type

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

Gi0/49 Desg FWD 4 128.48 P2p

Gi0/52 Root FWD 4 128.52 P2p



VLAN0030

Spanning tree enabled protocol ieee

Root ID Priority 24586

Address 0019.55f2.edc0

Cost 8

Port 52 (GigabitEthernet0/52)

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec


Bridge ID Priority 32778 (priority 32768 sys-id-ext 10)

Address 001c.0e11.6480

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Aging Time 300


Interface Role Sts Cost Prio.Nbr Type

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

Gi0/49 Altn BLK 4 128.48 P2p

Gi0/52 Root FWD 4 128.52 P2p



VLAN0040

Spanning tree enabled protocol ieee

Root ID Priority 24587

Address 0019.55f2.edc0

Cost 8

Port 52 (GigabitEthernet0/52)

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec


Bridge ID Priority 32779 (priority 32768 sys-id-ext 11)

Address 001c.0e11.6480

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Aging Time 300


Interface Role Sts Cost Prio.Nbr Type

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

Gi0/49 Altn BLK 4 128.48 P2p

Gi0/52 Root FWD 4 128.52 P2p




Edison Ortiz Mon, 02/16/2009 - 13:54
User Badges:
  • Super Bronze, 10000 points or more
  • Hall of Fame,

    Founding Member

Tauer,


In your case, the cost is equal. There are other variables to determine the root port:


When selecting the root port on a switch stack, spanning tree follows this sequence:


-Selects the lowest root bridge ID


-Selects the lowest path cost to the root switch


-Selects the lowest designated bridge ID


-Selects the lowest designated path cost


-Selects the lowest port ID


http://www.cisco.com/en/US/docs/switches/lan/catalyst3750e_3560e/software/release/12.2_46_se/configuration/guide/swstp.html


It could be the Cores have a lower bridge ID than the access switches.


HTH,


__


Edison.

Tauer Drumond Mon, 02/16/2009 - 14:04
User Badges:

Hi Edson,

My Core Switches have the follow priority... It forces them to have a lower ID, than access switches... So they have the lowest root bridge ID...


CORE 1


spanning-tree mode pvst

spanning-tree extend system-id

spanning-tree vlan 10-20 priority 24576

spanning-tree vlan 30-40 priority 28672


CORE 2


spanning-tree mode pvst

spanning-tree extend system-id

spanning-tree vlan 10-20 priority 28672

spanning-tree vlan 30-40 priority 24576

Edison Ortiz Mon, 02/16/2009 - 14:24
User Badges:
  • Super Bronze, 10000 points or more
  • Hall of Fame,

    Founding Member

Then, that answers your question/dilemma.


__


Edison.


Please rate helpful posts

Tauer Drumond Tue, 02/17/2009 - 04:41
User Badges:

hi Edison,

I didn't figure out yet..

With this configuration, wouldn't the traffic from VLAN 30,40, on SW 1, flow out throught the port 0/52?...and only traffic from VLAN 10,20 flow out through port 0/49?


Thanks

Tauer


Mohamed Sobair Mon, 02/16/2009 - 13:31
User Badges:
  • Gold, 750 points or more

Tauer,


What is the type of connection between Core-01 and Core-02? Is it Giga Interface?



HTH

Mohamed

Marwan ALshawi Mon, 02/16/2009 - 14:25
User Badges:
  • Purple, 4500 points or more
  • Community Spotlight Award,

    Best Publication, December 2015

Hi Tauer


the link cost shown abov look the same

however i need to chec kis the inter switch trunk is etherchannel

??


also if you try to change the port cost for those vlans on that port i as i mentioned above you will get it working as you want


good luck

Tauer Drumond Tue, 02/17/2009 - 08:22
User Badges:

Hi marwanshawi,

your advice cleared my mind and solved the problem...

Thank you

Tauer

Marwan ALshawi Tue, 02/17/2009 - 13:12
User Badges:
  • Purple, 4500 points or more
  • Community Spotlight Award,

    Best Publication, December 2015

u welcome :)

Mohamed Sobair Tue, 02/17/2009 - 00:55
User Badges:
  • Gold, 750 points or more


Tauer,


As Edison pointed out, Since all connection are Giga, then the Cost toward the root bridge is equal for both direction. The (Tie breaker) for spanning-tree path selection would be choosing the lease port-ID which is G0/49 to reach the root.



HTH

Mohamed

Actions

This Discussion