HSRPの設定



●HSRP(その1)

 参照
 HSRPの基本

 構成図は下記のとおりです。

hsrp01.png

 L3SW(Catalyst 3750)でHSRPを設定します。
 下記のように設定します。
catalyst3750-5の設定
catalyst3750-5#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
catalyst3750-5(config)#int ra gigabitEthernet 2/0/21-22
catalyst3750-5(config-if-range)#switchport mode access
catalyst3750-5(config-if-range)#switchport access vlan 43
% Access VLAN does not exist. Creating vlan 43
catalyst3750-5(config-if-range)#no shutdown 
catalyst3750-5(config-if-range)#int vlan 43                     
catalyst3750-5(config-if)#ip address 172.43.1.253 255.255.255.0
catalyst3750-5(config-if)#standby 43 ip 172.43.1.251
catalyst3750-5(config-if)#standby 43 priority 255
catalyst3750-5(config-if)#^Z
catalyst3750-5#
catalyst3750-6の設定
catalyst3750-6#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
catalyst3750-6(config)#interface range gigabitEthernet 2/0/21-22
catalyst3750-6(config-if-range)#switchport mode access
catalyst3750-6(config-if-range)#switchport access vlan 43
% Access VLAN does not exist. Creating vlan 43
catalyst3750-6(config-if-range)#no shutdown 
catalyst3750-6(config-if-range)#exit
catalyst3750-6(config)#interface vlan 43
catalyst3750-6(config-if)#ip address 172.43.1.252 255.255.255.0
catalyst3750-6(config-if)#standby 43 ip 172.43.1.251
catalyst3750-6(config-if)#^Z
catalyst3750-6#
Router_Cの設定
Router_C#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router_C(config)#interface range fastEthernet 8-9
Router_C(config-if-range)#switchport mode access
Router_C(config-if-range)#switchport access vlan 43
% Access VLAN does not exist. Creating vlan 43
Router_C(config-if-range)#no shutdown 
Router_C(config-if-range)#exit
Router_C(config)#interface vlan 43
Router_C(config-if)#ip address 172.43.1.254 255.255.255.0
Router_C(config-if)#^Z
Router_C#
 Router_Cの8番ポートとcatalyst3750-5の21番ポート、Router_Cの9番ポートとcatalyst3750-6の21番ポートを接続します。
 catalyst3750-5で設定したPriority値の方が高いので、こちらが有効になります。
catalyst3750-5のログ
Sep  7 09:51:25.891: %LINEPROTO-5-UPDOWN: Line protocol
          on Interface GigabitEthernet2/0/21, changed state to up
Sep  7 09:51:52.911: %LINEPROTO-5-UPDOWN: Line protocol
          on Interface Vlan43, changed state to up
Sep  7 09:52:16.492: %HSRP-5-STATECHANGE: Vlan43 Grp 43 state Standby -> Active
catalyst3750-6のログ
Sep  7 09:51:38.573: %LINK-3-UPDOWN: Interface GigabitEthernet2/0/21, changed state to up
Sep  7 09:51:39.580: %LINEPROTO-5-UPDOWN: Line protocol
          on Interface GigabitEthernet2/0/21, changed state to up
catalyst3750-5のHSRPの状態確認
catalyst3750-5#show standby 
Vlan43 - Group 43
  State is Active
    8 state changes, last state change 00:07:50
  Virtual IP address is 172.43.1.251
  Active virtual MAC address is 0000.0c07.ac2b
    Local virtual MAC address is 0000.0c07.ac2b (v1 default)
  Hello time 3 sec, hold time 10 sec
    Next hello sent in 1.520 secs
  Preemption disabled
  Active router is local
  Standby router is unknown
  Priority 255 (configured 255)
  Group name is "hsrp-Vl43-43" (default)
catalyst3750-6のHSRPの状態確認
catalyst3750-6#show standby 
Vlan43 - Group 43
  State is Init (interface down)
    6 state changes, last state change 09:31:37
  Virtual IP address is 172.43.1.251
  Active virtual MAC address is unknown
    Local virtual MAC address is 0000.0c07.ac2b (v1 default)
  Hello time 3 sec, hold time 10 sec
  Preemption disabled
  Active router is unknown
  Standby router is unknown
  Priority 100 (default 100)
  Group name is "hsrp-Vl43-43" (default)
 仮想IP(VIP)にpingしてください。その後、show arpで確認します。
Router_C#show arp         
Protocol  Address          Age (min)  Hardware Addr   Type   Interface
Internet  172.43.1.251            0   0000.0c07.ac2b  ARPA   Vlan43
 MACアドレスを見ると、0000.0c07.ac2bとなっているのが分かります。これは、catalyst3750-5がARPで返答した仮想IPアドレス(172.43.1.251)に対応する仮想MACアドレスです。
 HSRPでは、「00-00-0c-07-ac-**」という仮想MACアドレスを使います。「**」の部分には、HSRPのグループ番号が入ります。
 今回は、グループ43を指定したので「2b」になったわけです。

 ここで、catalyst3750-5の21番ポートを抜いてみます。
catalyst3750-5のログ
Sep  7 10:20:42.701: %LINEPROTO-5-UPDOWN: Line protocol
          on Interface Vlan43, changed state to down
Sep  7 10:20:42.701: %HSRP-5-STATECHANGE: Vlan43 Grp 43 state Active -> Init
Sep  7 10:20:43.699: %LINEPROTO-5-UPDOWN: Line protocol
          on Interface GigabitEthernet2/0/21, changed state to down
Sep  7 10:20:44.697: %LINK-3-UPDOWN: Interface GigabitEthernet2/0/21, changed state to down
catalyst3750-6のログ
Sep  7 10:21:17.288: %LINEPROTO-5-UPDOWN: Line protocol
          on Interface Vlan43, changed state to up
Sep  7 10:21:40.373: %HSRP-5-STATECHANGE: Vlan43 Grp 43 state Standby -> Active
 では、元に戻します。
catalyst3750-6のログ
Sep  7 10:42:03.954: %LINEPROTO-5-UPDOWN: Line protocol
          on Interface Vlan43, changed state to down
Sep  7 10:42:03.954: %HSRP-5-STATECHANGE: Vlan43 Grp 43 state Active -> Init
catalyst3750-5のログ
Sep  7 10:42:01.405: %LINK-3-UPDOWN: Interface GigabitEthernet2/0/21, changed state to up
Sep  7 10:42:02.412: %LINEPROTO-5-UPDOWN: Line protocol 
         on Interface GigabitEthernet2/0/21, changed state to up
Sep  7 10:42:29.432: %LINEPROTO-5-UPDOWN: Line protocol
         on Interface Vlan43, changed state to up
Sep  7 10:42:52.962: %HSRP-5-STATECHANGE: Vlan43 Grp 43 state Standby -> Active
 catalyst3750-5の21番ポートがダウンしてから、HSRPが移行するのに約60秒かかっています。
 また、catalyst3750-5の21番ポートがアップしてから、HSRPが移行するのに約50秒かかっています。

 このL3SWはMSTPが有効になっているので、VLAN43に対しportfastを設定し、HSRPの動作を確認してみます。
catalyst3750-5のログ
Sep  7 11:06:11.037: %LINEPROTO-5-UPDOWN: Line protocol
          on Interface Vlan43, changed state to down
Sep  7 11:06:11.037: %HSRP-5-STATECHANGE: Vlan43 Grp 43 state Active -> Init
Sep  7 11:06:12.036: %LINEPROTO-5-UPDOWN: Line protocol
          on Interface GigabitEthernet2/0/21, changed state to down
Sep  7 11:06:13.034: %LINK-3-UPDOWN: Interface GigabitEthernet2/0/21, changed state to down
catalyst3750-6のログ
Sep  7 11:06:45.879: %LINEPROTO-5-UPDOWN: Line protocol
          on Interface Vlan43, changed state to up
Sep  7 11:07:20.566: %HSRP-5-STATECHANGE: Vlan43 Grp 43 state Standby -> Active
catalyst3750-6のログ
Sep  7 11:13:38.859: %LINEPROTO-5-UPDOWN: Line protocol
          on Interface Vlan43, changed state to down
Sep  7 11:13:38.859: %HSRP-5-STATECHANGE: Vlan43 Grp 43 state Active -> Init
catalyst3750-5のログ
Sep  7 11:13:35.931: %LINK-3-UPDOWN: Interface GigabitEthernet2/0/21, changed state to up
Sep  7 11:13:36.938: %LINEPROTO-5-UPDOWN: Line protocol
          on Interface GigabitEthernet2/0/21, changed state to up
Sep  7 11:14:03.958: %LINEPROTO-5-UPDOWN: Line protocol
           on Interface Vlan43, changed state to up
Sep  7 11:14:26.649: %HSRP-5-STATECHANGE: Vlan43 Grp 43 state Standby -> Active
 catalyst3750-5の21番ポートがダウンしてから、HSRPが移行するのに約70秒かかっています。
 また、catalyst3750-5の21番ポートがアップしてから、HSRPが移行するのに約50秒かかっています。

 物理ポートに対しportfastを設定し、HSRPの動作を確認してみます。
catalyst3750-5のログ
Sep  7 11:22:03.237: %LINEPROTO-5-UPDOWN: Line protocol
          on Interface Vlan43, changed state to down
Sep  7 11:22:03.237: %HSRP-5-STATECHANGE: Vlan43 Grp 43 state Active -> Init
Sep  7 11:22:04.236: %LINEPROTO-5-UPDOWN: Line protocol
          on Interface GigabitEthernet2/0/21, changed state to down
Sep  7 11:22:05.234: %LINK-3-UPDOWN: Interface GigabitEthernet2/0/21, changed state to down
catalyst3750-6のログ
Sep  7 11:22:38.717: %LINEPROTO-5-UPDOWN: Line protocol
           on Interface Vlan43, changed state to up
Sep  7 11:23:00.410: %HSRP-5-STATECHANGE: Vlan43 Grp 43 state Standby -> Active
catalyst3750-6のログ
Sep  7 11:25:24.098: %LINEPROTO-5-UPDOWN: Line protocol
          on Interface Vlan43, changed state to down
Sep  7 11:25:24.098: %HSRP-5-STATECHANGE: Vlan43 Grp 43 state Active -> Init
catalyst3750-5のログ
Sep  7 11:25:20.179: %LINEPROTO-5-UPDOWN: Line protocol
          on Interface Vlan43, changed state to up
Sep  7 11:25:22.158: %LINK-3-UPDOWN: Interface GigabitEthernet2/0/21, changed state to up
Sep  7 11:25:23.165: %LINEPROTO-5-UPDOWN: Line protocol
          on Interface GigabitEthernet2/0/21, changed state to up
Sep  7 11:25:43.273: %HSRP-5-STATECHANGE: Vlan43 Grp 43 state Standby -> Active
 catalyst3750-5の21番ポートがダウンしてから、HSRPが移行するのに約60秒かかっています。
 また、catalyst3750-5の21番ポートがアップしてから、HSRPが移行するのに約25秒かかっています。

 どうも、Active router is unknownやStandby router is unknownが表示される原因は、HSRPの設定を物理インターフェースではなくVlan **に設定していたためのようです。

 仕切り直して物理インターフェースにHSRPを設定します。
catalyst3750-5の設定
catalyst3750-5#conf t
catalyst3750-5(config)#interface gigabitethernet 2/0/21
catalyst3750-5(config-if)#no switchport 
catalyst3750-5(config-if)#ip address 172.43.1.252 255.255.255.0   
catalyst3750-5(config-if)#standby 43 ip 172.43.1.251
catalyst3750-5(config-if)#standby 43 priority 255
catalyst3750-5(config-if)#^Z
catalyst3750-5#
catalyst3750-6の設定
catalyst3750-6#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
catalyst3750-6(config)#interface gigabitethernet 2/0/21
catalyst3750-6(config-if)#no switchport 
catalyst3750-6(config-if)#ip address 172.43.1.252 255.255.255.0   
catalyst3750-6(config-if)#standby 43 ip 172.43.1.251              
catalyst3750-6(config-if)#^Z
 設定後のHSRPを確認します。
catalyst3750-5のHSRPの状態確認
catalyst3750-5#show standby
GigabitEthernet2/0/21 - Group 43
  State is Active
    2 state changes, last state change 00:06:14
  Virtual IP address is 172.43.1.251
  Active virtual MAC address is 0000.0c07.ac2b
    Local virtual MAC address is 0000.0c07.ac2b (v1 default)
  Hello time 3 sec, hold time 10 sec
    Next hello sent in 0.144 secs
  Preemption disabled
  Active router is local
  Standby router is 172.43.1.252, priority 100 (expires in 10.816 sec)
  Priority 255 (configured 255)
  Group name is "hsrp-Gi2/0/21-43" (default)
catalyst3750-6のHSRPの状態確認
catalyst3750-6#show standby 
GigabitEthernet2/0/21 - Group 43
  State is Standby
    1 state change, last state change 00:00:28
  Virtual IP address is 172.43.1.251
  Active virtual MAC address is 0000.0c07.ac2b
    Local virtual MAC address is 0000.0c07.ac2b (v1 default)
  Hello time 3 sec, hold time 10 sec
    Next hello sent in 1.728 secs
  Preemption disabled
  Active router is 172.43.1.253, priority 255 (expires in 9.168 sec)
  Standby router is local
  Priority 100 (default 100)
  Group name is "hsrp-Gi2/0/21-43" (default)
 catalyst3750-5及びcatalyst3750-6の各物理ポートを「no switchport」とし、各物理インターフェースでHSRPを設定したところ、Active router is unknownやStandby router is unknownの問題は解決しました。
 ここで、catalyst3750-5をreloadし、その直後のcatalyst3750-6のHSRPの状態を確認します。
 下記のとおり、catalyst3750-6が「Active」になっています。
catalyst3750-6#show standby
GigabitEthernet2/0/21 - Group 43
  State is Active
    2 state changes, last state change 00:00:13
  Virtual IP address is 172.43.1.251
  Active virtual MAC address is 0000.0c07.ac2b
    Local virtual MAC address is 0000.0c07.ac2b (v1 default)
  Hello time 3 sec, hold time 10 sec
    Next hello sent in 0.208 secs
  Preemption disabled
  Active router is local
  Standby router is unknown
  Priority 100 (default 100)
  Group name is "hsrp-Gi2/0/21-43" (default)
 catalyst3750-5が起動後も「Standby」のままです。これは正常な動作です。
catalyst3750-5#show standby 
GigabitEthernet2/0/21 - Group 43
  State is Standby
    1 state change, last state change 00:01:21
  Virtual IP address is 172.43.1.251
  Active virtual MAC address is 0000.0c07.ac2b
    Local virtual MAC address is 0000.0c07.ac2b (v1 default)
  Hello time 3 sec, hold time 10 sec
    Next hello sent in 0.352 secs
  Preemption disabled
  Active router is 172.43.1.252, priority 100 (expires in 9.952 sec)
  Standby router is local
  Priority 255 (configured 255)
  Group name is "hsrp-Gi2/0/21-43" (default)
 catalyst3750-6をreloadし、その直後のcatalyst3750-5のHSRPの状態を確認します。
 下記のとおり、catalyst3750-5が「Active」に変化しています。
catalyst3750-5#show standby 
GigabitEthernet2/0/21 - Group 43
  State is Active
    2 state changes, last state change 00:00:09
  Virtual IP address is 172.43.1.251
  Active virtual MAC address is 0000.0c07.ac2b
    Local virtual MAC address is 0000.0c07.ac2b (v1 default)
  Hello time 3 sec, hold time 10 sec
    Next hello sent in 0.736 secs
  Preemption disabled
  Active router is local
  Standby router is unknown
  Priority 255 (configured 255)
  Group name is "hsrp-Gi2/0/21-43" (default)
 catalyst3750-6が起動後も「Standby」のままです。これは正常な動作です。
catalyst3750-6#show standby 
GigabitEthernet2/0/21 - Group 43
  State is Standby
    1 state change, last state change 00:00:55
  Virtual IP address is 172.43.1.251
  Active virtual MAC address is 0000.0c07.ac2b
    Local virtual MAC address is 0000.0c07.ac2b (v1 default)
  Hello time 3 sec, hold time 10 sec
    Next hello sent in 1.904 secs
  Preemption disabled
  Active router is 172.43.1.253, priority 255 (expires in 11.824 sec)
  Standby router is local
  Priority 100 (default 100)
  Group name is "hsrp-Gi2/0/21-43" (default)









●HSRP(その2)

 構成図は下記のとおりです。

hsrp02.png

 ルータ(Cisco 1841)でHSRPを設定します。
 下記のように設定します。
cisco1841-1の設定
cisco1841-1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
cisco1841-1(config)#interface fastEthernet 0/0
cisco1841-1(config-if)#switchport mode access
cisco1841-1(config-if)#no shutdown 
cisco1841-1(config-if)#ip address 172.44.1.253 255.255.255.0
cisco1841-1(config-if)#standby 44 ip 172.44.1.251
cisco1841-1(config-if)#standby 44 priority 255
cisco1841-1(config-if)#^Z
cisco1841-1#
cisco1841-2の設定
cisco1841-2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
cisco1841-2(config)#interface fastEthernet 0/0
cisco1841-2(config-if)#switchport mode access
cisco1841-2(config-if)#no shutdown
cisco1841-2(config-if)#ip address 172.44.1.252 255.255.255.0
cisco1841-2(config-if)#standby 44 ip 172.44.1.251
cisco1841-2(config-if)#^Z
cisco1841-2#
Router_Cの設定
Router_C#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router_C(config)#interface range fastEthernet 6-7
Router_C(config-if-range)#switchport mode access
Router_C(config-if-range)#switchport access vlan 44
% Access VLAN does not exist. Creating vlan 44
Router_C(config-if-range)#no shutdown 
Router_C(config-if-range)#exit
Router_C(config)#interface vlan 44
Router_C(config-if)#ip address 172.44.1.254 255.255.255.0
Router_C(config-if)#^Z
Router_C#
 Router_Cの6番ポートとcisco1841-1の0/0番ポート、Router_Cの7番ポートとcisco1841-2の0/0番ポートを接続します。
 cisco1841-1で設定したPriority値の方が高いので、こちらが有効になります。
cisco1841-1のHSRPの状態確認
cisco1841-1#show standby 
FastEthernet0/0 - Group 44
  State is Active
    2 state changes, last state change 00:39:22
  Virtual IP address is 172.44.1.251
  Active virtual MAC address is 0000.0c07.ac2c
    Local virtual MAC address is 0000.0c07.ac2c (v1 default)
  Hello time 3 sec, hold time 10 sec
    Next hello sent in 1.984 secs
  Preemption disabled
  Active router is local
  Standby router is 172.44.1.252, priority 100 (expires in 7.788 sec)
  Priority 255 (configured 255)
  IP redundancy name is "hsrp-Fa0/0-44" (default)
cisco1841-2のHSRPの状態確認
cisco1841-2#show standby 
FastEthernet0/0 - Group 44
  State is Standby
    4 state changes, last state change 00:07:50
  Virtual IP address is 172.44.1.251
  Active virtual MAC address is 0000.0c07.ac2c
    Local virtual MAC address is 0000.0c07.ac2c (v1 default)
  Hello time 3 sec, hold time 10 sec
    Next hello sent in 2.048 secs
  Preemption disabled
  Active router is 172.44.1.253, priority 255 (expires in 9.840 sec)
  Standby router is local
  Priority 100 (default 100)
  Group name is "hsrp-Fa0/0-44" (default)
 仮想IP(VIP)にpingしてください。その後、show arpで確認します。
Router_C#show arp         
Protocol  Address          Age (min)  Hardware Addr   Type   Interface
Internet  172.44.1.251            0   0000.0c07.ac2c  ARPA   Vlan44
 MACアドレスを見ると、0000.0c07.ac2cとなっているのが分かります。これは、cisco1841-1がARPで返答した仮想IPアドレス(172.44.1.251)に対応する仮想MACアドレスです。
 HSRPでは、「00-00-0c-07-ac-**」という仮想MACアドレスを使います。「**」の部分には、HSRPのグループ番号が入ります。
 今回は、グループ43を指定したので「2b」になったわけです。

 ここで、cisco1841-1の0/0番ポートを抜いてみます。
cisco1841-1のログ
Sep  7 18:56:04.101: %LINEPROTO-5-UPDOWN: Line protocol
          on Interface FastEthernet0/0, changed state to down
Sep  7 18:56:04.101: %HSRP-5-STATECHANGE: FastEthernet0/0 Grp 44 state Active -> Init
cisco1841-1#show standby
FastEthernet0/0 - Group 44
  State is Init (interface down)
    6 state changes, last state change 00:01:24
  Virtual IP address is 172.44.1.251
  Active virtual MAC address is unknown
    Local virtual MAC address is 0000.0c07.ac2c (v1 default)
  Hello time 3 sec, hold time 10 sec
  Preemption disabled
  Active router is unknown
  Standby router is unknown
  Priority 255 (configured 255)
  IP redundancy name is "hsrp-Fa0/0-44" (default)
cisco1841-2のログ
Sep  7 18:56:11.170: %HSRP-5-STATECHANGE: FastEthernet0/0 Grp 44 state Standby -> Active
cisco1841-2#show standby 
FastEthernet0/0 - Group 44
  State is Active
    5 state changes, last state change 00:01:26
  Virtual IP address is 172.44.1.251
  Active virtual MAC address is 0000.0c07.ac2c
    Local virtual MAC address is 0000.0c07.ac2c (v1 default)
  Hello time 3 sec, hold time 10 sec
    Next hello sent in 2.064 secs
  Preemption disabled
  Active router is local
  Standby router is unknown
  Priority 100 (default 100)
  Group name is "hsrp-Fa0/0-44" (default)
 10秒以内に切り替わって、cisco1841-2がactiveに変わっているのが分かります。
 では、元に戻します。
cisco1841-1のログ
Sep  7 18:59:46.528: %LINEPROTO-5-UPDOWN: Line protocol
          on Interface FastEthernet0/0, changed state to up
Sep  7 19:00:06.528: %HSRP-5-STATECHANGE: FastEthernet0/0 Grp 44 state Speak -> Standby
Sep  7 19:00:07.028: %HSRP-5-STATECHANGE: FastEthernet0/0 Grp 44 state Standby -> Active
cisco1841-1#show standby 
FastEthernet0/0 - Group 44
  State is Active
    8 state changes, last state change 00:07:41
  Virtual IP address is 172.44.1.251
  Active virtual MAC address is 0000.0c07.ac2c
    Local virtual MAC address is 0000.0c07.ac2c (v1 default)
  Hello time 3 sec, hold time 10 sec
    Next hello sent in 0.332 secs
  Preemption disabled
  Active router is local
  Standby router is 172.44.1.252, priority 100 (expires in 9.852 sec)
  Priority 255 (configured 255)
  IP redundancy name is "hsrp-Fa0/0-44" (default)
cisco1841-2のログ
Sep  7 19:00:13.037: %HSRP-5-STATECHANGE: FastEthernet0/0 Grp 44 state Active -> Speak
Sep  7 19:00:23.064: %HSRP-5-STATECHANGE: FastEthernet0/0 Grp 44 state Speak -> Standby
cisco1841-2#show standby 
FastEthernet0/0 - Group 44
  State is Standby
    7 state changes, last state change 00:08:53
  Virtual IP address is 172.44.1.251
  Active virtual MAC address is 0000.0c07.ac2c
    Local virtual MAC address is 0000.0c07.ac2c (v1 default)
  Hello time 3 sec, hold time 10 sec
    Next hello sent in 0.368 secs
  Preemption disabled
  Active router is 172.44.1.253, priority 255 (expires in 10.720 sec)
  Standby router is local
  Priority 100 (default 100)
  Group name is "hsrp-Fa0/0-44" (default)
 cisco1841-1がactiveに戻っているのが分かります。

●HSRP(その3)トラッキング

 参照
 インターフェーストラッキング

 構成図は下記のとおりです。

hsrp03.png

 インターフェーストラッキングの設定をする前のcisco1841-1及びcisco1841-2の設定内容は●HSRP(その2) を参照してください。

 catalyst2960-1に接続されているcisco1841-1のポートfa0/0/0がダウンした時にHSRPのActiveをcisco1841-2に切り替えるように設定します。
cisco1841-1の設定
!
interface FastEthernet0/0
 ip address 172.44.1.253 255.255.255.0
 duplex auto
 speed auto
 standby 44 ip 172.44.1.251
 standby 44 priority 255
 standby 44 preempt
 standby 44 track FastEthernet0/0/0 200
!
cisco1841-2の設定
!
interface FastEthernet0/0
 ip address 172.44.1.252 255.255.255.0
 standby 44 ip 172.44.1.251
 standby 44 preempt
 duplex auto
 speed auto
!
 それぞれの状態を確認します。cisco1841-1がActive、cisco1841-2がStandbyとなっています。
cisco1841-1
cisco1841-1#show standby 
FastEthernet0/0 - Group 44
  State is Active
    5 state changes, last state change 2d00h
  Virtual IP address is 172.44.1.251
  Active virtual MAC address is 0000.0c07.ac2c
    Local virtual MAC address is 0000.0c07.ac2c (v1 default)
  Hello time 3 sec, hold time 10 sec
    Next hello sent in 1.264 secs
  Preemption enabled
  Active router is local
  Standby router is 172.44.1.252, priority 100 (expires in 8.624 sec)
  Priority 255 (configured 255)
    Track interface FastEthernet0/0/0 state Up decrement 200
  IP redundancy name is "hsrp-Fa0/0-44" (default)
cisco1841-2
cisco1841-2#show standby
FastEthernet0/0 - Group 44
  State is Standby
    4 state changes, last state change 2d00h
  Virtual IP address is 172.44.1.251
  Active virtual MAC address is 0000.0c07.ac2c
    Local virtual MAC address is 0000.0c07.ac2c (v1 default)
  Hello time 3 sec, hold time 10 sec
    Next hello sent in 1.056 secs
  Preemption enabled
  Active router is 172.44.1.253, priority 255 (expires in 10.256 sec)
  Standby router is local
  Priority 100 (default 100)
  Group name is "hsrp-Fa0/0-44" (default)
 トラッキングが有効かどうかを確認するため、cisco1841-1のポートfa0/0/0の対抗側のcatalyst2960-1のfa0/15をshutdownします。
 ログを確認すると、cisco1841-1がStandby、cisco1841-2がActiveに変化している事がわかります。
cisco1841-1のログ
*Dec 13 23:00:12.579: %TRACKING-5-STATE: 1 interface Fa0/0/0 line-protocol Up->Down
*Dec 13 23:00:12.599: %LINEPROTO-5-UPDOWN: Line protocol on Interface
                                    FastEthernet0/0/0, changed state to down
*Dec 13 23:00:13.599: %LINK-3-UPDOWN: Interface FastEthernet0/0/0, changed state to down
*Dec 13 23:00:13.619: %HSRP-5-STATECHANGE: FastEthernet0/0 Grp 44 state Active -> Speak
*Dec 13 23:00:23.619: %HSRP-5-STATECHANGE: FastEthernet0/0 Grp 44 state Speak -> Standby
cisco1841-2ログ
Dec 13 22:29:41.878: %HSRP-5-STATECHANGE: FastEthernet0/0 Grp 44 state Standby -> Active
cisco1841-1#show standby
FastEthernet0/0 - Group 44
  State is Standby
    7 state changes, last state change 00:04:47
  Virtual IP address is 172.44.1.251
  Active virtual MAC address is 0000.0c07.ac2c
    Local virtual MAC address is 0000.0c07.ac2c (v1 default)
  Hello time 3 sec, hold time 10 sec
    Next hello sent in 0.176 secs
  Preemption enabled
  Active router is 172.44.1.252, priority 100 (expires in 7.804 sec)
  Standby router is local
  Priority 55 (configured 255)
    Track interface FastEthernet0/0/0 state Down decrement 200
  IP redundancy name is "hsrp-Fa0/0-44" (default)
cisco1841-2#show standby
FastEthernet0/0 - Group 44
  State is Active
    5 state changes, last state change 00:05:04
  Virtual IP address is 172.44.1.251
  Active virtual MAC address is 0000.0c07.ac2c
    Local virtual MAC address is 0000.0c07.ac2c (v1 default)
  Hello time 3 sec, hold time 10 sec
    Next hello sent in 1.360 secs
  Preemption enabled
  Active router is local
  Standby router is 172.44.1.253, priority 55 (expires in 9.824 sec)
  Priority 100 (default 100)
  Group name is "hsrp-Fa0/0-44" (default)
 catalyst2960-1のfa0/15をno shutdownします。
  ログを確認すると、cisco1841-1がActive、cisco1841-2がStandbyに変化している事がわかります。
cisco1841-1ログ
*Dec 13 23:09:58.568: %TRACKING-5-STATE: 1 interface Fa0/0/0 line-protocol Down->Up
*Dec 13 23:09:59.936: %LINK-3-UPDOWN: Interface FastEthernet0/0/0, changed state to up
*Dec 13 23:10:00.056: %HSRP-5-STATECHANGE: FastEthernet0/0 Grp 44 state Standby -> Active
*Dec 13 23:10:00.936: %LINEPROTO-5-UPDOWN: Line protocol on Interface
                                    FastEthernet0/0/0, changed state to up
cisco1841-2ログ
Dec 13 22:39:28.285: %HSRP-5-STATECHANGE: FastEthernet0/0 Grp 44 state Active -> Speak
Dec 13 22:39:38.588: %HSRP-5-STATECHANGE: FastEthernet0/0 Grp 44 state Speak -> Standby
cisco1841-1#show standby
FastEthernet0/0 - Group 44
  State is Active
    8 state changes, last state change 00:02:35
  Virtual IP address is 172.44.1.251
  Active virtual MAC address is 0000.0c07.ac2c
    Local virtual MAC address is 0000.0c07.ac2c (v1 default)
  Hello time 3 sec, hold time 10 sec
    Next hello sent in 0.664 secs
  Preemption enabled
  Active router is local
  Standby router is 172.44.1.252, priority 100 (expires in 8.752 sec)
  Priority 255 (configured 255)
    Track interface FastEthernet0/0/0 state Up decrement 200
  IP redundancy name is "hsrp-Fa0/0-44" (default)
cisco1841-2#show standby
FastEthernet0/0 - Group 44
  State is Standby
    7 state changes, last state change 00:02:43
  Virtual IP address is 172.44.1.251
  Active virtual MAC address is 0000.0c07.ac2c
    Local virtual MAC address is 0000.0c07.ac2c (v1 default)
  Hello time 3 sec, hold time 10 sec
    Next hello sent in 1.440 secs
  Preemption enabled
  Active router is 172.44.1.253, priority 255 (expires in 7.248 sec)
  Standby router is local
  Priority 100 (default 100)
  Group name is "hsrp-Fa0/0-44" (default)