ā07-20-2022 12:03 PM
Hi,
Short and simple question just to clear some doubt.
Is it possible to advertise a VRRP/HSRP virtual IP over an IGP such as OSPF? Or is the only way to reach this IP by configuring a static route to it?
Thank you.
ā07-20-2022 12:13 PM
both HSRP will advertise the Subnet of HSRP group which include the VIP IP
ā07-20-2022 12:22 PM
Ok so how would you configure that so that it advertises these IPs over OSPF?
I assume it would be the same principle with VRRP?
I don't have access to a lab to try it out.
ā07-20-2022 01:40 PM
the config is as following :-
both side is HSRP
one side is HSRP other side is each router connect via different subnet
case1
both side you need to be sure that the active router is in both side
otherwise the traffic is asymmetric
Case2
one side is HSRP other not, here if the router connect to other router via same Link Cost then you get load balance if not
always the retrun traffic will flow via one router.
here you need some more route-map or EEM to shift traffic.
ā07-21-2022 12:54 AM
Hello
@hassan4917 wrote:
Ok so how would you configure that so that it advertises these IPs over OSPF?
Int x/x
ip ospf x area 0
ā07-20-2022 01:01 PM
Hello,
Can you elaborate more on the requirement? HSRP/VRRP uses L2 to establish Active/Standby/Forwarding routers. The L3 devices you configure this on will be a part of the same subnet (usually configured on SVIs, but not required). You shouldn't have L3 routing between HSRP/VRRP, unless you're using EVPN or possibly L2TP. IGPs advertise networks (as in the network the interface is associated with active in that IGP. For instance if you enable OSPF on an interface it will advertise the "network" that interface is configured for, not a single IP.
Secondly the VIP is just the default GW for the hosts on that network to have redundancy out in case a device fails. Its not an IP that's advertised in an IGP, its advertised by the Active/AVF device, if that makes sense.
Maybe a drawing would help too.
-David
ā07-21-2022 03:09 AM
Thanks for the responses,
My doubt was whether the config that @paul driver suggested will actually work? So that whatever VRRP/HSRP IP is configured on that interface can be advertised over OSPF so that it can be reached across the rest of the network.
As the VIP is just a gateway then my understanding is that the actual network is to be configured on another router, which in turn is advertised using OSPF and then that VIP sits within that advertised network as below:
end devices <--> L2 switch <--> Router (running OSPF) <--> VIP
Or in an even simpler network end user devices connect to a L2 switch which are connected to two or more routers running VRRP/HSRP which will be the GW address:
end devices <--> L2 switch <--> VIP
My question is will the below work?:
end devices <--> L2 switch <--> Router <--> VIP (running OSPF)
Sorry i don't have a proper drawing right now as it's just in the concept stage.
ā07-21-2022 04:08 AM
here config the Subnet of interface config as HSRP in OSPF do job, but you must focus in return traffic.
return traffic must solve otherwise there is big issue if the one HSRP peer is down the traffic will be blackhole.
as I mention before, using advance Route-map or EEM can help you here
example of HSRP with BGP and route-map
https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13768-hsrp-bgp.html
ā07-21-2022 04:13 AM
and for you friend I will make small LAB how you config the HSRP with OSPF and EEM.
ā07-21-2022 07:49 AM
Lab 1,
R1-R2 interconnect to each other
R1-R2-R3 run ospf for all interfaces.
the R2 is active and S3/3 link have ospf cost 100 where s3/0 have 1000
so R3 always use for return path s3/3
when the s3/3 is UP/UP and R2 is active
when the S3/3 is DOWN and R2 is active HSRP
see the packet form R4 go to R2 and R2 will forward it to R1 and from R1 to R3
here we get redundancy.
I will add later same lab but when there is SW between the R2 & R3 and the R2 side is down and R3 is UP
ā07-21-2022 08:54 AM - edited ā07-21-2022 08:54 AM
Hello
The OP asked the question how to advertise a HSRP VIP running over and igp (OSPF) which they could do by simply attaching that vips interfaces into ospf
However it seems this has now evolved from route advertisment into the realms of FHRP redundancy- correct?
ā07-21-2022 08:58 AM
Yes he ask about add VIP to HSRP but I give him more detail may be in feature he need it.
ā07-21-2022 09:28 AM
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