You can configure certain HSRP parameters to elect a default gateway router and monitor routers' WAN links. To illustrate, let's configure HSRP on Routers R1 and R2 shown in Figure 5.6. Let's make Router R1 the default gateway, because the link on Router R2 is occasionally prone to WAN problems. All PCs on the network are configured to use the default IP gateway 188.8.131.52/24. Listing 5.3 displays the configuration for Routers R1 and R2.
Hostname R1 interface Ethernet0 ip address 184.108.40.206 255.255.255.0 standby priority 120 !Highest priority wins standby preempt standby ip 220.127.116.11 !HSRP address used by local devices standby track Serial0 ! Monitor serial 0 for failures Hostname R2
ip address 18.104.22.168 255.255.255.0 standby priority 110 standby preempt standby ip 22.214.171.124 standby track Serial0
In Listing 5.3, Router R1 will be the active default gateway, because it has the higher priority. If Router R1 fails, Router R2 will assume the virtual IP address of 126.96.36.199.
Was this article helpful?