
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2010 03:22 AM - edited 03-06-2019 02:27 PM
Hi to all, i'm Fabio and i have a simple question reguarding load-balancing in a trunk link using port-priority.
Topology is:
and logically i want to get:
1)This link is forwarding traffic for vlan 2,4
2)This link is forwarding traffic for vlan 3,5:
Switch0's configuration is:
interface FastEthernet0/1
switchport mode trunk
switchport nonegotiate
spanning-tree vlan 2,4 port-priority 16
!
interface FastEthernet0/2
switchport mode trunk
switchport nonegotiate
spanning-tree vlan 3,5 port-priority 16
Switch1's configuration is:
interface FastEthernet0/1
switchport mode trunk
switchport nonegotiate
spanning-tree vlan 2,4 port-priority 16
!
interface FastEthernet0/2
switchport mode trunk
switchport nonegotiate
spanning-tree vlan 3,5 port-priority 16
Based on the logical schema on point 2, i expected interface Fa0/2 of switch 1 to be in forwarding for VLAN 3 e 5 and in blocking for VLAN 2,4.
Instead i have:
S1#show spanning-tree vlan 3
VLAN0003
Spanning tree enabled protocol ieee
Root ID Priority 32771
Address 0040.0BAA.4B63
Cost 19
Port 1(FastEthernet0/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32771 (priority 32768 sys-id-ext 3)
Address 0060.5C85.A2B1
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1 Root FWD 19 128.1 P2p
Fa0/2 Altn BLK 19 16.2 P2p
Fa0/3 Desg FWD 19 128.3 P2p
Fa0/2 is in blocking for vlan 03.
Why?
Sure, i did not get how STP load balancing works.....
Thanks, Fabio.
Solved! Go to Solution.
- Labels:
-
Other Switching
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2010 08:03 AM
Hi Fabio,
This became a bit frustrating for me so I built a quick GNS3 lab with a (good old) 3640 and an NM-16ESW.
In this setup, I simulated your scenario and it works as designed with the following config:
R1 (root switch)
interface FastEthernet0/1
switchport mode trunk
!
interface FastEthernet0/2
switchport mode trunk
spanning-tree vlan 3 port-priority 16
spanning-tree vlan 4 port-priority 16
!
That was basically all I needed to modify from a default config. On R2, the only setting on fa0/1 and fa0/2 is trunk mode:
!
interface FastEthernet0/1
switchport mode trunk
!
interface FastEthernet0/2
switchport mode trunk
!
This gives the following results:
VLAN1
Spanning tree enabled protocol ieee
Root ID Priority 32768
Address cc00.120c.0000
Cost 19
Port 2 (FastEthernet0/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32768
Address cc01.120c.0000
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300
Interface Designated
Name Port ID Prio Cost Sts Cost Bridge ID Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet0/1 128.2 128 19 FWD 0 32768 cc00.120c.0000 128.2
FastEthernet0/2 128.3 128 19 BLK 0 32768 cc00.120c.0000 128.3
VLAN3
Spanning tree enabled protocol ieee
Root ID Priority 32768
Address cc00.120c.0002
Cost 19
Port 3 (FastEthernet0/2)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32768
Address cc01.120c.0002
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300
Interface Designated
Name Port ID Prio Cost Sts Cost Bridge ID Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet0/1 128.2 128 19 BLK 0 32768 cc00.120c.0002 128.2
FastEthernet0/2 128.3 128 19 FWD 0 32768 cc00.120c.0002 16.3
And the results are the same for vlan's 2 and 4, i.e. vlan 2 is same as vlan 1, vlan 4 is as vlan 3.
If you need more details, feel free to ask!
reagards,
Leo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2010 03:48 AM
Hi,
Surely packet tracer behaving weird but anyhow you can remove these statements on sw1 :spanning-tree vlan 2,4 port-priority 16 spanning-tree vlan 3,5 port-priority 16
because the tie-breaker must be on sw1( as sw0 is the root bridge) and it is the lowest priority received.
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2010 03:52 AM
In your example, you have configured equal port costs on all interfaces between S0 and S1.
In that way, all paths will be equal and hence the topology for all vlans will be identical as well.
STP then resorts to putting the lowest interface in forwarding mode.
What also strikes me as incorrect is the output of the show spanning tree command on S1.
It lists all costs as 19 which is the default value. I also notice that S0 is probably the root for all vlans but at least for vlan 3.
The port with the lowest cost will become the root port (ad hence forwarding).
This can be established by lowering the cost for vlan 3,5 on S1-fa0/2 while keeping them at their default value for S1-fa0/1.
Please check your settings, you are not too far from the solution!
regards,
Leo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2010 03:58 AM
Hi Leo,
STP then resorts to putting the lowest interface in forwarding mode.
Is it still true when port-priority is configured?
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2010 04:00 AM
It is when all ports have the same priority.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2010 04:31 AM
Leo,
interface FastEthernet0/2
switchport mode trunk
switchport nonegotiate
spanning-tree vlan 3,5 port-priority 16
so on this switch (sw0) f0/2 will have port-priority of 16.2 for vlans 3 and 5 but 128.2 for vlans 2 and 4, no?
so when sw1 must choose root port it will look first for cost and as they are the same on each interface then he looks for lowest sending bid which again are the same and then he looks for port-priority and by default sw0 will have f0/1 as 128.1 for all vlans except 2 and 4 where it will be 16.1 so f0/2 for vlan 3 is sending port-priority of 16.2 which is better than 128.1 Where am I wrong in my reasoning?
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2010 06:15 AM
Hi Cadetalain, you got my question.
My reasoning was the same and i have some doubt how load balancing work usning stp/port-priority
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2010 06:42 AM
First of all, S0 is the root so it will be sending bpdu's with a priority of 0 out on all ports.
On S1, both f0/1 and f0/2 receive these bpdu's and will determine the least-cost path to the root.
Because you are running rapid-PVST, this occurs four times, one instance per vlan.
The cost is calculated by adding the port cost -in outbound direction- to the received cost.
This results in a cost of 19 without changing the cost on any port/vlan.
Changing the cost on S0 is useless; these are not taken into consideration because they are designated ports.
Simply set the interface cost for vlan 3,5 on S1-fa0/2 to 16 and it works.
OK, well. The above is about how I would do it but you intend to do this by using port priority. That's somewhat different and you must take care not to mess up the two like I did by misreading your original post. Perhaps it is the best when you check the attached link:
http://www.cisco.com/en/US/tech/tk389/tk621/technologies_tech_note09186a00800ae96a.shtml
regards,'
Leo

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2010 06:59 AM
Hi Leo,
i read the suggested document and there you can see that for swicth Catalyst_D there is the same situation, but the output is how i exepected:
Catalyst_D> (enable) show spantree 5/1
Port Vlan Port-State Cost Priority Fast-Start Group-Method
--------- ---- ------------- ----- -------- ---------- ------------
5/1 1 blocking 19 32 disabled
5/1 2 forwarding 19 32 disabled
Catalyst_D> (enable) show spantree 5/2
Port Vlan Port-State Cost Priority Fast-Start Group-Method
--------- ---- ------------- ----- -------- ---------- ------------
5/2 1 forwarding 19 32 disabled
5/2 2 blocking 19 32 disabled
Catalyst_D> (enable)
--Port 5/1 in blocking for vlan 1 and forwarding for vlan 2
--Port 5/2 in blocking for vlan 2 and forwarding for vlan 1
So, may be my problem is due to packet tracer?????
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2010 07:10 AM
So, may be my problem is due to packet tracer?????
I don't think so. You must configure it like in the document: set a different priority on the root bridge for fa0/1 and fa0/2.
regards,
Leo

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2010 06:47 AM
What also strikes me as incorrect is the output of the show spanning tree command on S1.
It lists all costs as 19 which is the default value. I also notice that S0 is probably the root for all vlans but at least for vlan 3.
The port with the lowest cost will become the root port (ad hence forwarding).
This can be established by lowering the cost for vlan 3,5 on S1-fa0/2 while keeping them at their default value for S1-fa0/1.
Please check your settings, you are not too far from the solution!
regards,
Leo
Hi Leo,
thanks for your response.
Your observation is correct, but my doubt is different.
My target is to have load balancing using port priority.
I don't care about port cost, and it is set to the default value.
The question is that based on the priority used, i want to have (for example on switch 1):
-VLAN 3-5 traffic carried by port 0/2
-VLAN 2-4 traffic carried by port 0/1
-port 0/1 has to be a backup port for VLAN 3-5 traffic
-port 0/2 has to be a backup port for VLAN 2-4 traffic
Sure i can get this using port cost or using one STP instance for each vlan, but i need to use priority.
Thanks,
Fabio.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2010 08:03 AM
Hi Fabio,
This became a bit frustrating for me so I built a quick GNS3 lab with a (good old) 3640 and an NM-16ESW.
In this setup, I simulated your scenario and it works as designed with the following config:
R1 (root switch)
interface FastEthernet0/1
switchport mode trunk
!
interface FastEthernet0/2
switchport mode trunk
spanning-tree vlan 3 port-priority 16
spanning-tree vlan 4 port-priority 16
!
That was basically all I needed to modify from a default config. On R2, the only setting on fa0/1 and fa0/2 is trunk mode:
!
interface FastEthernet0/1
switchport mode trunk
!
interface FastEthernet0/2
switchport mode trunk
!
This gives the following results:
VLAN1
Spanning tree enabled protocol ieee
Root ID Priority 32768
Address cc00.120c.0000
Cost 19
Port 2 (FastEthernet0/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32768
Address cc01.120c.0000
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300
Interface Designated
Name Port ID Prio Cost Sts Cost Bridge ID Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet0/1 128.2 128 19 FWD 0 32768 cc00.120c.0000 128.2
FastEthernet0/2 128.3 128 19 BLK 0 32768 cc00.120c.0000 128.3
VLAN3
Spanning tree enabled protocol ieee
Root ID Priority 32768
Address cc00.120c.0002
Cost 19
Port 3 (FastEthernet0/2)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32768
Address cc01.120c.0002
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300
Interface Designated
Name Port ID Prio Cost Sts Cost Bridge ID Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet0/1 128.2 128 19 BLK 0 32768 cc00.120c.0002 128.2
FastEthernet0/2 128.3 128 19 FWD 0 32768 cc00.120c.0002 16.3
And the results are the same for vlan's 2 and 4, i.e. vlan 2 is same as vlan 1, vlan 4 is as vlan 3.
If you need more details, feel free to ask!
reagards,
Leo
