Cisco VRRP HSRP – Compatibility with Different Upstream ISPs

ciscofhrphsrproutervrrp

We setup two Cisco ASRs as edge routers, each with a connection to a unique upstream ISP. Both routers are advertising the same IPv4 /24 prefix to their ISP via BGP, and both are connected to the same LAN. No further configuration has been done.

It seems to be working fine right now, although the routers have different IPs on the IPv4 network, e.g. R1 is 1.2.3.1 and R2 is 1.2.3.2. I believe this will cause problems when 1.2.3.1 is down, and hosts inside the network are trying to go out through the /24's default gateway, which will always be 1.2.3.1 and never 1.2.3.2.

The goal of having two routers and two ISPs is to achieve redundancy for both incoming and outgoing traffic, in case one router or ISP fails.

Does VRRP or HSRP apply to this scenario? Is iBGP between the routers required to set them up? Can incoming/outgoing redundancy be achieved without one of those protocols?

Best Answer

An FRHP (First Hop Redundancy Protocol), like HSRP and VRRP, will present virtual IP and MAC addresses to the LAN, and the LAN hosts can be configured to use the virtual IP address for the LAN gateway. One real router will respond to the virtual addressing, and using preempt, the other real router can take over in the event of the failure of the first router. That can be used for your LAN redundancy.

The two routers must be able to communicate over the LAN on which you want to use your FHRP.

For HSRP, you could use something like this on you LAN interfaces of your routers:

Router 1:

track 1 interface GigabitEthernet0/0 line-protocol     ! router WAN interface
!
interface GigabitEthernet0/1        ! router LAN interface
 ip address 1.2.3.2 255.255.255.0   ! router LAN IP address
 standby version 2
 standby 1 ip 1.2.3.1               ! HSRP virtual address
 standby 1 priority 105             ! HSRP primary priority
 standby 1 preempt                  ! will take control if priority is highest
 standby 1 preempt delay 30         ! delay preempt in case of flapping
 standby 1 track 1 decrement 10     ! decrement the priority when tracked interface is down

Router 2:

track 1 interface GigabitEthernet0/0 line-protocol     ! router WAN interface
!
interface GigabitEthernet0/1        ! router LAN interface
 ip address 1.2.3.3 255.255.255.0   ! router LAN IP address
 standby version 2
 standby 1 ip 1.2.3.1               ! HSRP virtual address
 standby 1 priority 100             ! HSRP secondary (default) priority
 standby 1 preempt                  ! will take control if priority is highest
 standby 1 preempt delay 30         ! delay preempt in case of flapping
 standby 1 track 1 decrement 10     ! decrement the priority when tracked interface is down

Configuring VRRP is nearly identical to HSRP.