How will VRRP and OSPF interact in the following scenario?


Where the OSPF area is comprised of the Local and Remote L3 Switches. Remote Network is advertised to Remote Switch 1 and 2 using BGP (by the Remote Routers), both switches redistribute this route via OSPF. Remote switch 2 also advertises the directly connected VLAN 20 The Local Switches both only advertise VLAN 10

My question is about the inter-operation of VRRP and OSPF. Will the next hop for traffic from the Remote Switches to VLAN 10 simply be - and so is traffic from the Remote Network just as likely to go via either Remote Router (assuming the metrics are the same)? Or have I completely missed the mark?

  • Yeah - I apologize, the diagram is fairly poor. The links from the Remote Switches are all separate VLANs. I will bolster my diagram a bit, and update the question. Basically, do the point-to-point VLANs to the Remote Switches need to exist across both Local Switches using VRRP, or can they exist independently on either Local Switch?
    – unclemeat
    Commented Nov 18, 2015 at 23:55
  • Well, it's the same network/subnet on either switch. Your remote routers should get the advertisement from both sides regardless of which way you flip a single IP, because OSPF just cares about where the subnets are. I thought you'd need to play with metrics to make it act differently. I'm still fairly amatuer at this, and I've only seen VRRP with static route next-hops, so maybe someone else can chime in and confirm.
    – Radhil
    Commented Nov 19, 2015 at 0:02

1 Answer 1


These are two completely independent protocols. VRRP doesn't interact with OSPF, or vice versa.

VRRP will create a virtual gateway, and one router (layer-3 switch?) will be the primary and the other router will be the secondary which takes over if the primary router fails. This has nothing to do with the routing protocol.

The real concern with an FHRP is that it match its primary router with the STP root switch for the VLAN. Not matching the FHRP primary router with the root switch can cause sub-optimal traffic paths as the layer-2 traffic is switched to the root switch via STP, then to the other router (layer-3 switch) as the FHRP primary gateway.

OSPF will populate the routing tables of the routers, and whichever router the traffic goes to (based on the FHRP) will route the traffic based on the best route in the routing table.

  • Thanks very much. Interact was probably a poor choice of word. The two Local (layer-3) Switches will both be advertising VLAN 10 to each other, correct? If so, will they ignore the OSPF route to VLAN 10 via the opposing Local Switch due to the fact that they each have the network locally? i.e. Will the potential route to VLAN 10 from LS1 via LS2 never populate the routing table, due to the fact that LS1 already has a direct connection to VLAN 10 (and visa-versa)?
    – unclemeat
    Commented Nov 19, 2015 at 3:28
  • 1
    With both routers connected to the same route, the connected route will be what is in the routing table on each one, but OSPF will advertise that route between them in the OSPF tables if you have it in the network statements or are redistributing connected routes into OSPF. The AD of the connected route is much better than OSPF, so only the connected route will be in the routing table until the connected route fails. You have to remember that the traffic is first layer-2 switched to the root switch before it gets to the layer-3 router.
    – Ron Maupin
    Commented Nov 19, 2015 at 3:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.