The Virtual Router Redundancy Protocol (VRRP) is a computer networking protocol that provides for automatic assignment of available Internet Protocol (IP) routers to participating hosts. This increases the availability and reliability of routing paths via automatic default gateway selections on an IP subnetwork. See RFC 5798.
VRRP provides information on the state of a router, not the routes processed and exchanged by that router. Each VRRP instance is limited, in scope, to a single subnet. It does not advertise IP routes beyond that subnet or affect the routing table in any way. VRRP can be used in Ethernet, MPLS and token ring networks with Internet Protocol Version 4 (IPv4), as well as IPv6.
Here is an example configuration:
track 1 interface Serial0/0/0.1 ip routing |
! Points at the interface that needs to be |
interface fastethernet0/0.1 |
! VLANs have to be on a Sub-Interface, It is |
encapsulation dot1q 1 |
! Enables IEEE 802.1Q VLAN frame tagging, |
ip address x.x.x.x 255.255.255.0 |
! Make sure the IP is on the same subnet as |
vrrp 1 priority 110 | ! The Priority of the Gateway1 |
vrrp 1 ip <Gateway1> | ! The Virtual Gateway for the VLAN 1 |
vrrp 1 preempt delay minimum 20 |
! If the other router fails it will wait 20 |
vrrp 1 track 1 decrement 15 |
! If the S0/0/0.1 Link fails, This command |
interface fastethernet0/0.5 |
! VLANs have to be on a Sub-Interface, It is |
encapsulation dot1q 5 |
! Enables IEEE 802.1Q VLAN frame tagging, |
ip address x.x.x.x 255.255.255.0 |
! Make sure the IP is on the same subnet as |
vrrp 5 priority 110 | ! The Priority of the Gateway2 |
vrrp 5 ip <Gateway2> | ! The Virtual Gateway for the VLAN 5 |
vrrp 5 preempt delay minimum 20 |
! If the other router fails it will wait 20 |
vrrp 5 track 1 decrement 15 |
! If the Fa0/0.5 Link fails, This command |
router bgp <ASN> | |
network <Gateway1> mask 255.255.255.0 | ! Broadcasts Gateway1 out the WAN through BGP |
network <Gateway1> mask 255.255.255.0 | ! Broadcasts Gateway1 out the WAN through BGP |
We hope this helps you configure VRRP.