! track 90 ip sla 20 ! interface FastEthernet1/0/1 switchport access vlan 100 switchport mode access ! interface FastEthernet1/0/2 switchport access vlan 200 switchport mode access ! interface Vlan100 ip address 10.10.10.10 255.255.255.0 standby version 2 standby 1 ip 10.10.10.254 standby 1 priority 105 standby 1 preempt standby 1 track 90 decrement 10 ! interface Vlan200 ip address 172.16.16.10 255.255.255.0 standby 2 ip 172.16.16.254 standby 2 priority 105 standby 2 preempt standby 2 track 90 decrement 10 ! ip sla 20 icmp-echo 10.10.10.20 ip sla schedule 20 life forever start-time now !
! interface FastEthernet1/0/1 switchport access vlan 100 switchport mode access ! interface FastEthernet1/0/2 switchport access vlan 200 switchport mode access ! interface Vlan100 ip address 10.10.10.10 255.255.255.0 standby 1 ip 10.10.10.254 standby 1 priority 100 (Eef100省略可) standby 1 preempt ! interface Vlan200 ip address 172.16.16.10 255.255.255.0 standby 2 ip 172.16.16.254 standby 2 priority 100 (Eef100省略可) standby 2 preempt !
Version2にすると認証が可能だが、一度も認証しないとINITになる。
Switch(config-if)#standby version 2 Switch(config-if)#standby 1 authentication text cisco
Switch#show standby Vlan100 - Group 1 State is Active 8 state changes, last state change 00:01:33 Virtual IP address is 10.10.10.254 Active virtual MAC address is 0000.0c07.ac01 Local virtual MAC address is 0000.0c07.ac01 (v1 default) Hello time 3 sec, hold time 10 sec Next hello sent in 2.000 secs Preemption enabled Active router is local Standby router is unknown Priority 105 (configured 105) Track object 90 state Up decrement 12 Group name is "hsrp-Vl100-1" (default)
~VLAN200は接続無いので省略~
! track 20 interface FastEthernet0 line-protocol ! interface FastEthernet0 ip address 10.10.10.201 255.255.255.0 vrrp 1 ip 10.10.10.200 vrrp 1 timers advertise msec 500 vrrp 1 priority 105 vrrp 1 authentication cisco vrrp 1 track 20 !
! interface FastEthernet0 ip address 10.10.10.202 255.255.255.0 vrrp 1 ip 10.10.10.200 vrrp 1 timers advertise msec 500 vrrp 1 authentication cisco !
※アドバタイズメントの送信間隔はデフォルトで1秒です。 ※HSRPのようにIFトラッキングを直接設定することは出来ません。
R1#show vrrp FastEthernet0 - Group 1 State is Master Virtual IP address is 10.10.10.200 Virtual MAC address is 0000.5e00.0101 Advertisement interval is 0.500 sec Preemption enabled Priority is 105 Track object 20 state Up decrement 10 Authentication text "cisco" Master Router is 10.10.10.201 (local), priority is 105 Master Advertisement interval is 0.500 sec Master Down interval is 2.089 sec
R2#show vrrp FastEthernet0 - Group 1 State is Backup Virtual IP address is 10.10.10.200 Virtual MAC address is 0000.5e00.0101 Advertisement interval is 0.500 sec Preemption enabled Priority is 100 Authentication text "cisco" Master Router is 10.10.10.201, priority is 105 Master Advertisement interval is 1.000 sec Master Down interval is 2.109 sec (expires in 1.825 sec)
R2#show vrrp brief Interface Grp Pri Time Own Pre State Master addr Group addr Fa0 1 100 2109 Y Backup 10.10.10.201 10.10.10.200