11-23-2020 08:29 PM
i have 2 switches connected with 2 links.
i want to set 1 connection to vlan 10
and the other one to vlan 20 and fallback for vlan 10 in case the first connection fails
how do i do that?
Solved! Go to Solution.
11-23-2020 11:32 PM
Hi,
You can do that by playing with Spanning Tree Protocol which blocks links to prevents loops from happening.
What you will do as following
First: configure both links on both switches as trunk and add to them Vlan 10 and 20 with this command: "" switchport trunk allowed vlan 10,20 ""
Second: now STP is running and I will assume bridge pritority for both SW are same so SW that has lowest mac value will be elected. the elected root SW for both vlans will have all ports up and forwarded.
Third: There will be STP instance for each vlan. the Non-root SW will have one port blocked and now you will modify STP cost per interface to meet your requirement.
Fourth: at Non-root SW, choose one of the port and apply this command to the interface: "" spanning-tree vlan 10 cost 3 ""
and in the other one apply this: spanning-tree vlan 20 cost 3
Now you will have one link primary for vlan 10 and it will fallback to the other link if the primary fails.
Ans also you will have one link primary for vlan 20 and it will fallback to the other link if primary fails.
To confirm your configurations, here is the commands you can check the output "" show spanning-tree vlan 10 "" and "" show spanning-tree vlan 20 ""
you should see one port blocked for vlan 10 and same port forwarded for vlan 10 and also same with vlan 20.
Important note: if you have vlan 1 configured and you need it traverse between switches, add it also to the ports.
I hope this clear to you.
Please rate if it helps you.
Best regards
Asem
11-23-2020 11:32 PM
Hi,
You can do that by playing with Spanning Tree Protocol which blocks links to prevents loops from happening.
What you will do as following
First: configure both links on both switches as trunk and add to them Vlan 10 and 20 with this command: "" switchport trunk allowed vlan 10,20 ""
Second: now STP is running and I will assume bridge pritority for both SW are same so SW that has lowest mac value will be elected. the elected root SW for both vlans will have all ports up and forwarded.
Third: There will be STP instance for each vlan. the Non-root SW will have one port blocked and now you will modify STP cost per interface to meet your requirement.
Fourth: at Non-root SW, choose one of the port and apply this command to the interface: "" spanning-tree vlan 10 cost 3 ""
and in the other one apply this: spanning-tree vlan 20 cost 3
Now you will have one link primary for vlan 10 and it will fallback to the other link if the primary fails.
Ans also you will have one link primary for vlan 20 and it will fallback to the other link if primary fails.
To confirm your configurations, here is the commands you can check the output "" show spanning-tree vlan 10 "" and "" show spanning-tree vlan 20 ""
you should see one port blocked for vlan 10 and same port forwarded for vlan 10 and also same with vlan 20.
Important note: if you have vlan 1 configured and you need it traverse between switches, add it also to the ports.
I hope this clear to you.
Please rate if it helps you.
Best regards
Asem
11-24-2020 12:06 AM
thank you,
i ended up using
spanning-tree vlan 10 priority 4096 spanning-tree vlan 20 priority 0
on switch 1 and
spanning-tree vlan 10 priority 0 spanning-tree vlan 20 priority 4096
on switch 2
11-24-2020 12:09 AM
That's great and you are welcome.
Best regards
Asem
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide