Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Community Member

HSRP with VLANs

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

Everyone's tags (3)
13 REPLIES
Community Member

HSRP with VLANs

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

Community Member

HSRP with VLANs

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.

Community Member

HSRP with VLANs

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

Community Member

HSRP with VLANs

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

Community Member

HSRP with VLANs

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.

Community Member

HSRP with VLANs

Sajid,

yes You mentioned the topology I want.

Silver

HSRP with VLANs

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

HTH, Dragan
Community Member

HSRP with VLANs

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

Silver

Re: HSRP with VLANs

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

HTH, Dragan
Community Member

HSRP with VLANs

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

Community Member

HSRP with VLANs

Hi all,

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

thanking you

Chamara

Community Member

HSRP with VLANs

Right

Community Member

HSRP with VLANs

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

194
Views
6
Helpful
13
Replies
CreatePlease to create content