HSRP為cisco私有協定:
R1配置:
R1(config)#interface ethernet 0/1
R1(config-if)#standby 10 ip 192.168.10.1
R1(config-if)#standby 10 preempt
R1(config-if)#standby 10 ?
authentication Authentication
ip Enable HSRP and set the virtual IP address
mac-address Virtual MAC address
name Redundancy name string
preempt Overthrow lower priority Active routers
priority Priority level
timers Hello and hold timers
track Priority tracking
R1(config-if)#end
*Mar 1 00:31:43.127: %HSRP-5-STATECHANGE: Ethernet0/1 Grp 10 state Speak -> Standby
*Mar 1 00:31:43.627: %HSRP-5-STATECHANGE: Ethernet0/1 Grp 10 state Standby -> Active
----預設情況下,誰先配的誰就是Active
R1#show standby
Ethernet0/1 - Group 10
State is Standby
4 state changes, last state change 00:00:23
Virtual IP address is 192.168.10.1 ----這個位址是虛拟的,不是真實位址
Active virtual MAC address is 0000.0c07.ac0a ----此處的MAC位址虛拟的,0a表示組号10
Local virtual MAC address is 0000.0c07.ac0a (v1 default)
Hello time 3 sec, hold time 10 sec ----預設時間
Next hello sent in 0.512 secs
Preemption disabled
Active router is 192.168.10.3, priority 200 (expires in 9.476 sec)
Standby router is local
Priority 100 (default 100)
IP redundancy name is "hsrp-Et0/1-10" (default)
R1#
R2配置: