Showing results for 
Search instead for 
Did you mean: 
Join Customer Connection to register!
Cisco Junky




Please see my diagram attachment for a clearer picture.


I currently have  a pair of Distribution switches connected to the Core using OSPF load balancing. The DL then runs RPVST+ each with a layer two link to the access switch, and a connection a dLsw router. GLBP is the first hop redundancy method of choice as these certain VLANs are not stretched. However this would cause an issue should a access switch uplink fail as the SVI will stay up on the DL switch, and potentially 50% of packets could be dropped depending on the load balancing.


My solution is to add a layer 2 link between the DL switches, although I would need to alter the Spanning tree cost of that link to make sure that it is only used if a uplink to the access switch goes down.


Hopefully the attachment will clear the scenario up a little.


Can anyone advise the best way to configure the spanning tree cost on a per VLAN basis on the DL switch. (HSRP also runs for certain stretched VLANs so the same L2 link will need to be forwarding for them)


Thanks in advance.



Jon Marshall
Hall of Fame Guru

Easiest way is on the STP secondary distribution switch apply a cost per vlan on the link connecting to the STP primary distribution switch.

Basically you want the secondary STP switch to think the best path to root is via the access switch so it blocks the interconnect to the primary STP distribution switch.

So to work out the cost on the STP secondary pick one of the GLBP vlans and do a -

"sh spanning-tree vlan <x>"

this will show you the cost on the link to the other distribution switch and to the access switch.

Then go onto the access switch and repeat the above command and you want the cost of the link to the STP root distribution switch.

You then need to make the cost of the direct link between the two distribution switches greater than the sum of the links via the access switch ie. on the STP secondary -

int <x/y>    <-- this goes to the other distribution switch
spanning-tree vlan <vlan IDs> cost <value>

note that there will be downtime on those vlans as it recalculates the path via the access switches for each GLBP vlan but as you haven't yet added the interconnect between the distribution switches you are going to get downtime anyway.