cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1587
Views
0
Helpful
18
Replies

STP Config on Cisco Switch

sudhir.bhagat
Level 1
Level 1

Hii Freinds,

I have two links(L-2) between Same cisco 4507 L-3 Switches.First link is in production(with multiple Vlans i.e 2,3,4,5),second link(allowed with same vlans as on First link) and kept admin down/shut always.We only maually activate the second link for shifting traffic when there is failure on First link.

I want to make the traffic shifting automate i.e auto-shifting of traffic to Second Link after outage of first/Primary link.

I am planning to make one Switch as root by command "spanning-tree vlan 2,3,4,5 root primary" .

Please suggest is this a good solution in sense of future prospects or there may be any other simple way for fullfilling the requirement.

Atached is the scenerio.

Regards

18 Replies 18

Jon Marshall
Hall of Fame
Hall of Fame

Sudhir

You have 3 choices really

1) Run both of them as individual trunks and have one blocked by STP

OR

2) run both active and load-balance vlans across the links

OR

2) etherchannel the links together. If you make an etherchannel out of the 2 links they will both be active and STP will treat the 2 links as one logical link.

Is there any reason you don't want to Etherchannel ?

Jon

Sudhir has valid points. Good job buddy.

Hii Jon,

Thanks ..!!! but there are some limitations in scenerio..

1)For first point...We can block one link by using STP "spaning-tree vlan 2,3,4,5 root" command as i mentioned in previous mail.

If any other way please share with necessary configs that have to be done on both switches.

2)For second point, As mentioned Same Vlans are allowed on both link. Hence there is no question for ACTIVE & Load balance Vlans. All Vlans are active in scenerio.

3)For third point, In requested scenerio first link having capactity 100 Mbps & second link is of 30 Mbps only. Hence ether-channel can be created but it can't working properly.Surely, there may be errors.

Overall, First solution is good one..but have to explore it out to avoid complex scenerio in keeping future network expansion in mind.

Please share your ideas.

Regards

First scenario is your only option if you have disparate speeds on the links as you cannot create etherchannels from different media and or speed interfaces. Not sure where you would get a 100 meg link and a 30 meg link from but the 30 meg link is going to be a choke point if you lose the 100 meg link and if you have more than say 25 meg of traffic flowing across the 100 meg link.

Hii Glen,

Obvoulsy, Your concern is true that 30Mbps will be chock where there is outage on first link.

For your Info second link is help in case of any emergency if First link goes down.

Hii freinds,,,Please share some configs to achieve the goal.

Regards

Setting the root will not help achieving load balancing, STP will block the link with the lowest bandwidth regardless of where the root is in your topology.

If the fastest link goes down, the slow link will be automatically unblocked by STP, so you already have a backup plan.

Now, if you want to use the slow link while the fast link is up, you just need a cost configuration: assuming that the root is bridge A for all vlans, you just need to increase the cost of the first fast for the vlans you want to use the slow link. For example, if you want vlan 1 to use the slow link as a primary path, on the interface g1/1 of switch B enter:

spanning-tree vlan 1 cost XXX

where XXX is a high value (higher than the cost of link g1/2). I don't give a precise value here because there are two different cost type in STP and I don't know which one you are using. Just put something big;-)

Regards,

Francois

Hi,

If you have configured the bandwidth statement on the second link then spanning tree will prefer the 100M link.

Alternatively you can set the spanning tree cost on the secondary link like so

interface fa0/1

spanning-tree cost 100

BTW: the spanning tree cost of a 100M link should be 19

Regards

Hii Freinds,

As mentioned in my previous comments If i can use "Spaning-tree vlan 2,3,4,5 root" global command on Switch "A". And also configured the secondary link(30 Mb) Gig interfaces of Both switches with "bandwidth 102400" command, will this work. i.e will make the secondary link with lowest cost.

Because by degault Gig Port bandwidth is 1000Mbps i.e 1024000 or cost 19.by doing this secondary link cost (which is configured as bandwidth 102400) is lowest and traffic will prefer lowest cost path during failure of primary link,I think it should work.

Please discuss.

Regards

Don't change the bandwidth of your links. You're making an STP configuration, so change the cost directly. 19 is not the cost for 1gig (and 1gig btw is really 1000MBps, not 1024MBps, we're not in the hard drive business;-).

So, configure A to be the root (you don't need the root macro for that, but what you mentioned should work). On switch B, if you want vlan 2 to use the slow link, go on the fast link (g1/1) and configure: spanning-tree vlan 2 cost 2000000. If the switch does not accept this latter value, use say 1000.

Regards,

Francois

Hii Francois,

I think there is some mis-confusion. from command "bandwith 102400" (102400 in Kbps) i meant that cost of secondary link Gig port allowed with same Vlans(as on Primary link 2,3,4,5) is decreasd to 100Mb from 1000 Mbps (i.e 100 x 1024= 102400 Kbps thats why bandwidth command changed to 102400) for decreasing cost. So that after failure of primary link traffic automatic shifted on seondary link temporarily.

Cost 19 was a Typo mistake. 19 is cost for 100Mb. 4 is cost for 1000 Mb.

Second & important thing,I am looking for solution of traffic auto shifting after failure of Primary link. I am not looking for load balancing or particular Vlan traffic segregation on both links. as shared and posted by many freinds.

PLease suggest.

Regards

I don't understand. If you don't need load balancing, you don't need to do anything with STP. It will automatically block the link with lowest bandwidth. Are you talking about a link that adjusts its bandwidth?

My comment on the bandwidth was just that 1 mega bit per seconds is 10^6 bit per second, not 2^20 bit per second for example. But that was on tongue-in-cheek unrelated remark.

Regards,

Francois

:) Hii Francois/Freinds,

Here i am again trying to clear proposed scenrio.

I have two cisco 4507 L-3 Switches in between these switches two simaltaneous links are connected. Out of which one link is using as primary (Vlans allowed are 2,3,4,5) and another link is kept admin down/shutdown (Vlans allowed are 2,3,4,5) and only need to activate second link while there is failure on primary link. I want that second link should always be active(i'll keep second link active only) and ther should not be any manual intervention required to shift the traffic from primary link to secondary. it should be automatic only. and for achieving this setup what all necessary configs or command i need to execute on switches.

As fracios suggested that nothing need to do on switches to acheive the goal. but i already tryed to test the things on existing scenerio(i.e activate the secondary link and unplugged the first link cable) but traffic was not shifted.

Hope now somehow clear...

please discuss.

regards

How long did you wait before deciding that the failover didn't work? Default spanning tree on Cisco devices uses PVST+ which (assuming you are using default timers) will take appx. 50 seconds for traffic to converge to your backup link.

If you are looking to speed up your convergence time (10 seconds and some cases sub-second), you need to change your network to run a flavor of RSTP (rapid spanning-tree protocol) (MST or RPVST+).

Are we talking about just switching failover (layer 2) or also routing failover (layer 3)?

Here is a link that explains RPVST+ migration and configurations:

http://www.cisco.com/en/US/products/hw/switches/ps708/products_configuration_example09186a00807b0670.shtml

HTH,

Craig

Sudhir,

Stupid question: are you doing bridging? If you do, there is no configuration. STP will do what you want automatically. From the problem you describe, I'm starting to wonder if you don't have ip address configured directly on the primary "fast" link, as an L3 interface. I think it's time to send some config;-) We understood what you are trying to achieve.

Thanks and regards,

Francois

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card