Home > Articles > Certification > Cisco Certification > CCNP

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book

Configuration Example: HSRP

Figure 5-1 shows the network topology for the configuration that follows, which shows how to configure HSRP using the commands covered in this chapter. Note that only the commands specific to HSRP are shown in this example.

Figure 5-1

Figure 5-1 Network Topology for HSRP Configuration Example

Router 1

Router> enable

Moves to privileged mode

Router# configure terminal

Moves to global configuration mode

Router(config)# hostname R1

Sets router name to R1

R1(config)# interface fastethernet 0/0

Moves to interface config mode

R1(config-if)# ip address 172.16.16.5 255.255.255.0

Assigns IP address and netmask

R1(config-if)# standby 1 ip 172.16.16.254

Activates HSRP group 1 on the interface and creates a virtual IP address of 172.16.6.254

R1(config-if)# standby 1 priority 105

Assigns a priority value of 105 to standby group 1

R1(config-if)# standby 1 preempt

This router will preempt, or take control of, the active router if the local priority is higher than the active router

R1(config-if)# standby 1 track serial 0/0

HSRP will track the availability of interface serial 0/0. If serial 0/0 goes down, the router priority will be decremented by the default 10.

R1(config-if)# no shutdown

Enables the interface

R1(config-if)# interface serial 0/0

Moves to interface config mode

R1(config-if)# ip address 198.133.219.1 255.255.255.252

Assigns IP address and netmask

R1(config-if)# no shutdown

Enables the interface

R1(config-if)# exit

Returns to global config mode

R1(config)# exit

Returns to privileged mode

R1# copy running-config startup-config

Saves the configuration to NVRAM

Router 2

Router> enable

Moves to privileged mode

Router# configure terminal

Moves to global config mode

Router(config)# hostname R2

Sets router name to R2

R2(config)# interface fastethernet 0/0

Moves to interface config mode

R2(config-if)# ip address 172.16.16.6 255.255.255.0

Assigns IP address and netmask

R2(config-if)# standby 1 ip 171.16.16.254

Activates HSRP group 1 on the interface and creates a virtual IP address of 172.16.6.254

R2(config-if)# standby 1 priority 100

Assigns a priority value of 100 to standby group 1

R2(config-if)# standby 1 preempt

This router will preempt, or take control of, the active router if the local priority is higher than the active router

R2(config-if)# standby 1 track serial 0/1

HSRP will track the availability of interface serial 0/1. If S0/1 goes down, the router priority will be decremented by the default 10.

R2(config-if)# no shutdown

Enables the interface

R2(config-if)# interface serial 0/1

Moves to interface config mode

R2(config-if)# ip address 198.133.219.5 255.255.255.252

Assigns IP address and netmask

R2(config-if)# no shutdown

Enables the interface

R2(config-if)# exit

Returns to global config mode

R2(config)# exit

Returns to privileged mode

R2# copy running-config startup-config

Saves the configuration to NVRAM

  • + Share This
  • 🔖 Save To Your Account