Routing – OSPF and VRRP Network Advertisements Explained

bgpfhrpospfroutingvrrp

How will VRRP and OSPF interact in the following scenario?

http://i.imgur.com/E4ymG2e.jpg

Where the OSPF area is comprised of the Local and Remote L3 Switches. Remote Network 3.3.3.0 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 2.2.2.0. The Local Switches both only advertise VLAN 10 1.1.1.0.

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 1.1.1.1 – and so is traffic from the Remote Network 3.3.3.0 just as likely to go via either Remote Router (assuming the metrics are the same)? Or have I completely missed the mark?

Best Answer

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.