×

Warning message

  • Cisco Support Forums is in Read Only mode while the site is being migrated.
  • Cisco Support Forums is in Read Only mode while the site is being migrated.

HSRP with VLANs

Unanswered Question
Mar 5th, 2014
User Badges:

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

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 3 (2 ratings)
Loading.
Sajid Ali Wed, 03/05/2014 - 03:09
User Badges:

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

chamara siyamba... Wed, 03/05/2014 - 03:17
User Badges:

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.

Inderjeet Singh Wed, 03/05/2014 - 03:17
User Badges:

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 ??

chamara siyamba... Wed, 03/05/2014 - 03:22
User Badges:

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

Sajid Ali Wed, 03/05/2014 - 03:31
User Badges:

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.

Dragan Ilic Wed, 03/05/2014 - 03:33
User Badges:
  • Silver, 250 points or more

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

Inderjeet Singh Wed, 03/05/2014 - 03:42
User Badges:

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..

Dragan Ilic Wed, 03/05/2014 - 03:54
User Badges:
  • Silver, 250 points or more

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

Sajid Ali Wed, 03/05/2014 - 03:58
User Badges:

Correct no need for AD, just put static router pointing to virtual IP of Standby group. Hardware floating will done by HSRP.

chamara siyamba... Wed, 03/05/2014 - 06:23
User Badges:

Hi all,



it means my previous configurations are correct right? thank you for the information


thanking you

Chamara

Inderjeet Singh Wed, 03/05/2014 - 06:28
User Badges:

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..

Actions

This Discussion

Related Content