Configuring HSRP

Configuring HSRP

This area discusses the agreement of HSRP. The alive apparatus of the configuration

are HSRP standby interface, standby preempt, and accost bulletin timers. This area also

covers tracking the HSRP interface and troubleshooting HSRP.

Configuring an HSRP Standby Interface

To configure a router as a affiliate of an HSRP standby group, access the afterward command in

interface agreement mode:

Router(config-if)#standby group-number ip ip-address

where the alternative group-number altercation indicates the HSRP accumulation to which this interface

belongs. Specifying a different accumulation cardinal in the standby commands enables the conception of

multiple HSRP groups. The absence accumulation is 0.

The ip-address altercation indicates the IP abode of the basic HSRP router

While alive HSRP, it is important that the end-user stations do not ascertain the absolute MAC

addresses of the routers in the standby group. Any agreement that informs a host of the router’s

actual abode charge be disabled. To ensure that the absolute addresses of the accommodating HSRP

routers are not discovered, enabling HSRP on a Cisco router interface automatically disables

ICMP redirects on that interface.

NOTE Abutment for HSRP and ICMP redirects was alien with IOS 12.1(3)T.

After the standby ip command is issued, the interface changes to the adapted state. The

following is an archetype of the accompaniment bulletin generated. This bulletin is automatically

generated aloft acknowledged beheading of the standby ip command:

3w1d : %STANDBY-6-STATECHANGE: Standby: 50: Vlan100 accompaniment Speak -> Standby

3w1d : %STANDBY-6-STATECHANGE: Standby: 50: Vlan100 accompaniment Standby -> Active

Example 9-2 illustrates that interface VLAN100 is a affiliate of the HSRP standby accumulation 50,

that the basic router IP abode for that accumulation is 192.168.100.50, and that ICMP redirects are

disabled.

To abolish an interface from an HSRP group, access the no standby accumulation ip command.

318 Chapter 9: Overview of Hot Standby Router Protocol

Configuring HSRP Standby Priority

Each standby accumulation has its own alive and standby routers. The arrangement ambassador can

assign a antecedence bulk to anniversary router in a standby group, acceptance the ambassador to control

the adjustment in which alive routers for that accumulation are selected.

To set the antecedence bulk of a router, access the afterward command in interface configuration

mode:

Router#(config-if) standby group-number antecedence priority-value

where group-number indicates the HSRP standby group. This cardinal can be in the ambit of

0 to 255. The priority-value altercation indicates the cardinal that prioritizes a abeyant HSRP

router. The ambit is 0 to 255; the absence is 100.

The router in an HSRP accumulation with the accomplished antecedence becomes the forwarding router.

Example 9-3 illustrates that interface VLAN100 has a antecedence bulk of 160 in HSRP standby

group 50. If this antecedence bulk is the accomplished cardinal in that HSRP standby group, the RSM on

which this interface resides is the alive router for that group.

To reinstate the absence standby antecedence value, access the no standby antecedence command.

Example 9-2 appearance run Command Output Displays VLAN Membership, HSRP Accumulation Address, and the Cachet of

ICMP Redirects

Router#show run

Building configuration...

Current configuration:

!

(text deleted)

interface Vlan100

ip abode 192.168.100.1 255.255.255.0

no ip redirects

standby 50 ip 192.168.100.50

!

Example 9-3 appearance run Command Output Displays the HSRP Accumulation Antecedence Value

Router#show run

Building configuration...

Current configuration:

!

(text deleted)

interface Vlan100

ip abode 192.168.100.1 255.255.255.0

no ip redirects

standby 50 antecedence 160

standby 50 ip 192.168.100.50

Configuring HSRP 319

Configuring HSRP Standby Preempt

The standby router automatically assumes the alive router role back the alive router fails or

is removed from service. This new alive router charcoal the forwarding router alike back the

former alive router with the college antecedence regains account in the network.

The above alive router can be configured to resume the forwarding router role from a router

with a lower priority. To accredit a router to resume the forwarding router role, access the

following command in interface agreement approach on the alive router:

Router(config-if)#standby group-number preempt

After the standby accroach command is issued, the interface changes to the adapted state.

The afterward is an archetype of the accompaniment bulletin generated.

3w1d : %STANDBY-6-STATECHANGE: Standby: 50: Vlan100 accompaniment Standby -> Active

This bulletin is automatically generated as anon as the router becomes alive in the network.

Example 9-4 states that interface VLAN100 is configured to resume its role as the alive router

in HSRP accumulation 50, bold interface VLAN100 on this router has the accomplished antecedence in that

standby group.

To abolish the interface from preemptive status, access the no standby accumulation preempt

command.

Configuring the Accost Bulletin Timers

An HSRP-enabled router sends accost letters to announce that the router is alive and is

capable of acceptable either the alive or standby router. The Accost bulletin contains the priority

of the router, as able-bodied as a hellotime and holdtime value. The hellotime bulk indicates the

interval amid the accost letters that the router sends. The holdtime bulk contains the

amount of time that the accepted accost bulletin is advised valid. If an alive router sends a

hello message, accepting routers accede that accost bulletin to be accurate for one holdtime.

Example 9-4 appearance run Command Output Displays the Role of the Alive Router

Router#show run

Building configuration...

Current configuration:

!

(text deleted)

interface Vlan100

ip abode 192.168.100.1 255.255.255.0

no ip redirects

standby 50 antecedence 160

standby 50 preempt

standby 50 ip 192.168.100.50

320 Chapter 9: Overview of Hot Standby Router Protocol

TIP In general, the bulk of the holdtime should be at atomic three times the bulk of the hellotime and

is appropriate to be greater than the hellotime.

The hellotime and the holdtime ambit are configurable. To configure the time between

hellos and the time afore added accumulation routers acknowledge the alive or standby router to be

nonfunctioning, access the afterward command in interface agreement mode:

Router(config-if)#standby group-number timers hellotime holdtime

where the alternative group-number altercation indicates the accumulation cardinal on the interface to

which the timers apply. The absence is 0. The hellotime altercation indicates the accost breach in

seconds. This breach is an accumulation from 1 through 255. The absence is 3 seconds. The holdtime

argument indicates the time, in seconds, afore the alive or standby router is declared to be

down. This is an accumulation from 1 through 255. The absence is 10 seconds.

To reinstate the absence standby timer values, access the no standby accumulation timers command.

Understanding HSRP Interface Tracking

In some situations, the cachet of an interface anon affects which router needs to become the

active router. This is decidedly accurate back anniversary of the routers in an HSRP accumulation has a different

path to assets aural the campus network.

In the campus LAN archetype in Figure 9-6, Router A and Router B abide in a annex office.

These two routers anniversary abutment a consecutive articulation to headquarters. Router A has the college priority

and is the alive forwarding router for standby accumulation 47. Router B is the standby router for that

group. Router A and Router B are exchanging accost letters through their E0 interfaces.

However, the consecutive articulation amid the alive forwarding router for the standby accumulation and

headquarters has an outage. Without HSRP enabled, Router A detects the bootless articulation and sends

an ICMP alter to Router B. Back HSRP is enabled, however, ICMP redirects are disabled.

Therefore, neither Router A nor the basic router sends an ICMP alter and, although the S1

interface on Router A is no best functional, Router A still communicates accost letters out

interface E0 advertence that Router A is still the alive router. Packets beatific to the basic router

for forwarding the address cannot be routed.

Configuring HSRP 321

Figure 9-6 Standby Accumulation Normal Operation

Interface tracking enables the antecedence of a standby accumulation router to be automatically adjusted

based on availability of the interfaces of that router. Back a tracked interface becomes

unavailable, the HSRP antecedence of the router is decreased. The HSRP tracking affection reduces

the likelihood that a router with an bare key interface will abide the alive router.

In the campus LAN archetype in Figure 9-7, the E0 interface on Router A advance the S1 interface.

If the articulation amid the S1 interface and address fails, the router automatically decrements

its antecedence on that interface and stops transmitting accost letters out interface E0. Router B

assumes the alive router role back no accost letters are detected for the specific holdtime

period.

Server

Main site

Remote site

Normal cartage flow

PC

Standby accumulation 47

Router A

Active

Router B

Standby

Virtual router

S1

S1

E0

E0

322 Chapter 9: Overview of Hot Standby Router Protocol

Figure 9-7 Standby Accumulation Experience Failure

Configuring HSRP Tracking

To configure HSRP tracking, access the afterward command in interface agreement mode:

Router(config-if)#standby group-number clue type-number interface-priority

The command arguments for this command are authentic as follows:

• group-number—This alternative altercation indicates the accumulation cardinal on the interface to

which the tracking applies. The absence cardinal is 0.

• type—This altercation indicates the interface blazon (combined with the interface number) to

be tracked.

• number—This altercation indicates the interface cardinal (combined with the interface

type) to be tracked.

• interface-priority—When the interface becomes disabled, this alternative argument

indicates the bulk by how abundant the HSRP antecedence for the router is decremented. The

priority of the router is incremented by this bulk back the interface becomes available.

The absence bulk is 10.

To attenuate interface tracking, access the no standby accumulation clue command.

Server

Main site

Remote site

Standby cartage flow

PC

Standby accumulation 47

Router A

Active

Router B

Standby

Virtual router

S1

S1

E0

E0

X