03-05-2014 02:42 AM - edited 03-04-2019 10:30 PM
Hi,
Is there any way to configure HSRP on 2 switches on two separate vlans? if I configured two switches like below, is it possible to send two separate traffics to two gateways using static routes?
Switch 1
int vlan 2
ip add 192.168.0.1 255.255.255.0
standby 1 ip 192.168.0.254
standby 1 priority 150
int vlan 3
ip add 192.168.3.1 255.255.255.0
standby 2 ip 192.168.3.254
ip route 172.16.0.0 0.0.0.255 192.168.3.250
ip route 0.0.0.0 0.0.0.0 192.168.0.250
switch 2
int vlan 2
ip add 192.168.0.2 255.255.255.0
standby 1 ip 192.168.0.254
int vlan 3
ip add 192.168.3.2 255.255.255.0
standby 2 ip 192.168.3.254
standby 2 priority 150
ip route 172.16.0.0 0.0.0.255 192.168.3.250
ip route 0.0.0.0 0.0.0.0 192.168.0.250
please help me with your expertise.
thanking you
Chamara
03-05-2014 03:09 AM
Hi chamara,
As I understand the first part of your question, you want configure each VLAN as in active LAN Gateway on per Switch, if so you need to configure two HSRP Groups, one for each VLAN. Please refer to below example:
SW1
___________________________
interface Vlan3
ip address 10.1.3.2 255.255.255.0
standby 3 ip 10.1.3.1
standby 3 priority 150
standby 3 preempt
!
interface Vlan6
ip address 10.1.6.2 255.255.255.0
standby 6 ip 10.1.6.1
standby 6 preempt
!
SW2
________________________________
interface Vlan3
ip address 10.1.3.3 255.255.255.0
standby 3 ip 10.1.3.1
standby 3 preempt
!
interface Vlan6
ip address 10.1.6.3 255.255.255.0
standby 6 ip 10.1.6.1
standby 6 priority 150
standby 6 preempt
!
Now VLAN 3 is in active state at SW1 and VLAN 6 is in active state at SW2
03-05-2014 03:17 AM
thank you, it means my suggetion is correct right? I'm wondering that will this set up good to go for production environment or not.
03-05-2014 03:17 AM
You can put static for traffic 1 pointing to HSRP 1 and HSRP 2 but putting higher AD for HSRP2 ..
Same way putting Second static pointing to HSRP1 and HSRP2 but putting higher AD for HSRP1 ..
Is this what you mean ??
03-05-2014 03:22 AM
singh thats the thing I have a concern. When I have identical static routes on each switches will there be any issues when selecting paths? Lets assume that vlan 2 active router has gone. then what will be the behaviour? later on dueto preempt switch again become active. what will happen next? any one has experienced that?
thanking you
Chamara
03-05-2014 03:31 AM
Chamare,
First of all please share your topology. If there is two switches one for each LAN Subnet and Two routers as CE and you want to configure full redundant solution, there are multiple thing s that you need to configure, but first please share you topolgy.
03-05-2014 06:18 AM
Sajid,
yes You mentioned the topology I want.
03-05-2014 03:33 AM
You put your static routes pointing to HSRP virtual IP and as long as you have one of switches live it's going to be routed properly.
So if you configure HSRP like Sajid Ali suggested then you are ready to go - just put static routes with next hop pointing to virtual IP of HSRP groups.
I hope this is what you wanted...
HTH,
Dragan
03-05-2014 03:42 AM
Chamara,
You won't have identical static routes on each switch .. Let me put it differently..
Switch 1
ip route x.x.x.x 255.255.255.0 y.y.y.y >>> y.y.y.y is HSRP 1
ip route p.p.p.p 255.255.255.0 z.z.z.z 150 >>> z.z.z.z is HSRP 2
switch 2
ip route x.x.x.x 255.255.255.0 y.y.y.y 150
ip route p.p.p.p 255.255.255.0 z.z.z.z
this will route perfectly.. coz you will see traffic for destination x.x.x.x will go to router serving primary for HSRP 1
and traffic for p.p.p.p will go to router serving primary for HSRP2 .. if the primary fails, HSRP will send it to backup router..
03-05-2014 03:54 AM
Singh,
if we configure that HSRP decide who is going to be forwarder (priority) why we must configure AD for routes?
If we put:
ip route x.x.x.x 255.255.255.0 y.y.y.y >>> y.y.y.y is HSRP 1 VIP
ip route p.p.p.p 255.255.255.0 z.z.z.z >>> z.z.z.z is HSRP 2 VIP
then forwarder for HSRP 2 is going to route p.p.p.p traffic and forwarder for HSRP 1 is going to route x.x.x.x traffic.
Right?
Maybe we are looking things from different perspectives
HTH,
Dragan
03-05-2014 03:58 AM
Correct no need for AD, just put static router pointing to virtual IP of Standby group. Hardware floating will done by HSRP.
03-05-2014 06:23 AM
Hi all,
it means my previous configurations are correct right? thank you for the information
thanking you
Chamara
03-05-2014 07:13 AM
Right
03-05-2014 06:28 AM
Dragan/ Sajid,
You are correct as long as the switches are access switches.. HSRP is for first hop redudancy .. so if the devices are directly connected to access switches, you are correct.. if the switches are distribution switches than my solution will work and the statics will require to put on access switches to forward packet to distribution switches..
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