Hot Standby Routing Protocol (HSRP) and Virtual Router Redundancy Protocol (VRRP) are used to provide redundant routed paths out of a subnet, presented as a single address. This is most useful to provide redundant default gateway connectivity for end hosts. Consider a common scenario:
The active router will answer for all traffic sent to 192.168.0.1, and the standby router will take over should the active router fail; the switch is transparent to the end hosts. While certainly advantageous, one drawback of this setup is the apparent waste of two IP addresses (the addresses assigned to the physical interfaces). Since only the HSRP address is needed by end hosts, can we assign the physical interfaces to a separate subnet?
Observe what happens when we configure Fa0/0 on RouterA with a physical and virtual address in separate subnets:
RouterA(config)# interface fa0/0 RouterA(config-if)# ip address 10.0.0.1 255.255.255.0 RouterA(config-if)# standby 1 ip 192.168.0.1 % Warning: address is not within a subnet on this interface
Upon further inspection we can see that the router does not like this setup at all, as the HSRP group never transitions out of the
RouterA# show standby FastEthernet0/0 - Group 1 State is Init (virtual IP in wrong subnet) Virtual IP address is 192.168.0.1 (wrong subnet for this interface) Active virtual MAC address is unknown Local virtual MAC address is 0000.0c07.ac01 (v1 default) Hello time 3 sec, hold time 10 sec Preemption disabled Active router is unknown Standby router is unknown Priority 200 (configured 200) IP redundancy name is "hsrp-Fa0/0-1" (default)
In fact, the router will not generate HSRP hellos out of the interface, because it does not have routed access into the 192.168.0.0/24 subnet. Similar behavior is observed with VRRP. As such, we will need to use the proper subnet addresses for the physical interfaces. But hey, it's a small price to pay for such convenient redundancy.