ネットワークエンジニアになろう! > HSRPを究める > HSRP を究める - 実践編(2) Standby Group をつくる

この記事は、改訂&リニューアルして『P はプロトコルのP - HSRP を究める』へ移転しました。

HSRP を究める - 実践編(2) Standby Group をつくる

サブネット192.168.1.0/24 にバーチャルルータをつくります。

Router-A、B、C にStandby Group 10を作成します。



Router-A#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router-A(config)#interface ethernet0/0
Router-A(config-if)#standby 10 ip 192.168.1.1
Router-A(config-if)#^Z
Router-A#
Feb 6 20:48:00.585: %SYS-5-CONFIG_I: Configured from console by console
Router-A#
Feb 6 20:48:30.848: %HSRP-6-STATECHANGE: Ethernet0/0 Grp 10 state Speak -> Standby
Feb 6 20:48:30.848: %HSRP-6-STATECHANGE: Ethernet0/0 Grp 10 state Standby -> Active

まずRouter-A のEthernet0/0 にstandby 10 ip 192.168.1.1 を設定します。
しばらくすると、Standby Group 10のActive Router になったことを意味するメッセージが表示されます。

ここでshow standby を実行すると、Standby Group 10の状況を確認できます。



Router-A#show standby
Ethernet0/0 - Group 10
State is Active
2 state changes, last state change 00:04:41
Virtual IP address is 192.168.1.1
Active virtual MAC address is 0000.0c07.ac0a
Local virtual MAC address is 0000.0c07.ac0a (v1 default)
Hello time 3 sec, hold time 10 sec
Next hello sent in 1.132 secs
Preemption disabled
Active router is local
Standby router is unknown
Priority 100 (default 100)
IP redundancy name is "hsrp-Et0/0-10" (default)
Router-A#

HSRP State はActive になっています。
Virtual IP アドレスは、192.168.1.1 です。
Virtual MAC アドレスは、Standby Group 10 を意味する00-00-0c-07-ac-0a です。
Hello Time とHold Time は、それぞれ3秒と10秒です(デフォルト値)。
プライオリティはデフォルト値の100 になっています。

引き続きRouter-B に同じ設定をします。



Router-B#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router-B(config)#interface ethernet0/0
Router-B(config-if)#standby 10 ip 192.168.1.1
Router-B(config-if)#^Z
Router-B#
Feb 6 20:51:18.300: %SYS-5-CONFIG_I: Configured from console by console
Router-B#
Feb 6 20:51:48.400: %HSRP-6-STATECHANGE: Ethernet0/0 Grp 10 state Speak -> Standby

Standby Group 10 のStandby Router になったことを意味するメッセージが表示されます。

show standby を見てみます。



Router-B#show standby
Ethernet0/0 - Group 10
State is Standby
1 state change, last state change 00:02:37
Virtual IP address is 192.168.1.1
Active virtual MAC address is 0000.0c07.ac0a
Local virtual MAC address is 0000.0c07.ac0a (v1 default)
Hello time 3 sec, hold time 10 sec
Next hello sent in 1.920 secs
Preemption disabled
Active router is 192.168.1.101, priority 100 (expires in 8.044 sec)
Standby router is local
Priority 100 (default 100)
IP redundancy name is "hsrp-Et0/0-10" (default)
Router-B#

HSRP State はStandby になっています。
Active Router は、先ほど設定したRouter-A(192.168.1.101) になっています。
Standby Router は、自分自身を意味するLocal になっています。

ここでもう一度Router-A でshow standby を見てみます。



Router-A#show standby
Ethernet0/0 - Group 10
State is Active
2 state changes, last state change 00:16:44
Virtual IP address is 192.168.1.1
Active virtual MAC address is 0000.0c07.ac0a
Local virtual MAC address is 0000.0c07.ac0a (v1 default)
Hello time 3 sec, hold time 10 sec
Next hello sent in 1.992 secs
Preemption disabled
Active router is local
Standby router is 192.168.1.102, priority 100 (expires in 9.756 sec)
Priority 100 (default 100)
IP redundancy name is "hsrp-Et0/0-10" (default)
Router-A#

先ほどはUnknown となっていたStandby Router が、Router-B(192.168.1.102) に変わりました。Router-B からのHello メッセージを受け取ったからです。

IP アドレスが大きいRouter-B(192.168.1.102) が出現しても、Router-A(192.168.1.101) はActive Router であり続けます。
Active Router は、自分から辞めない限り、Active Router のままです。

続けてRouter-C を設定します。



Router-C#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router-C(config)#interface ethernet0/0
Router-C(config-if)#standby 10 ip 192.168.1.1
Router-C(config-if)#^Z
Router-C#

Router-C にStandby Group 10を設定すると、Router-B のコンソールにメッセージが表示されました。



Router-B#
Feb 6 20:53:18.684: %HSRP-6-STATECHANGE: Ethernet0/0 Grp 10 state Standby -> Listen
Router-B#

Router-B がStandby Router では無くなったようです。
Router-C でshow standby を見てみます。



Router-C#show standby
Ethernet0/0 - Group 10
Local state is Standby, priority 100
Hellotime 3 sec, holdtime 10 sec
Next hello sent in 1.292
Virtual IP address is 192.168.1.1 configured
Active router is 192.168.1.101, priority 100 expires in 7.060
Standby router is local
1 state changes, last state change 00:08:31
Router-C#

Router-C がStandby Group 10のStandby Router となったことが確認できます。

※ Router-B はIOS version 12.0 で動作しているので、show コマンドの表示が異なります。

今度はRouter-B のshow standby です。



Router-B#show standby
Ethernet0/0 - Group 10
State is Listen
6 state changes, last state change 00:10:35
Virtual IP address is 192.168.1.1
Active virtual MAC address is 0000.0c07.ac0a
Local virtual MAC address is 0000.0c07.ac0a (v1 default)
Hello time 3 sec, hold time 10 sec
Preemption disabled
Active router is 192.168.1.101, priority 100 (expires in 7.528 sec)
Standby router is 192.168.1.103, priority 100 (expires in 8.988 sec)

Priority 100 (default 100)
IP redundancy name is "hsrp-Et0/0-10" (default)
Router-B#

HSRP State がListen になっています。
Active Router はRouter-A(192.168.1.101)、Standby Router はRouter-C(192.168.1.103) になっているのが確認できます。

Router-B ではなくRouter-C がStandby Router になったのは、Router-C のIP Address(192.168.1.103) の方が、Router-B(192.168.1.102) よりも大きいからです。


ひとまず設定が完了したので、PC-1、2、3 のデフォルトゲートウェイを192.168.1.1 に変更します。

PC1、2、3 からPC4 宛のパケットは、Standby Group 10 のバーチャルルータ(192.168.1.1) 宛に送られます。
今は、Router-A がStandby Group 10のActive Router になっているので、パケットはすべて、Router-A によりルーティングされます。


Router-A とB はIOS version 12.4 で動作しているので、HSRP を設定してもICMP Redirect は有効になっています。
しかし、Standby Group 内に12.0 で動作しているRouter-C が存在するので、Router-A とB でもICMP Redirect を無効にします。



Router-A#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router-A(config)#interface ethernet 0/0
Router-A(config-if)#no ip redirects
Router-A(config-if)#^Z
Router-A#

IOS version 12.0 で動作しているルータでは、ICMP Redirect との協調機能が実装されていません。
そのため、Listen State になっている間はAdvertisement メッセージを送信せず、Router-A やB からはPassive Router であることが分かりません。
そのため、Passive Router であるにもかかわらず、Router-A やB から、Redirect の対象とされてしまいます。

ICMP Redirect を有効にするのは、Standby Group 内のルータがすべて、強調機能をサポートしているときだけにしましょう。

※ Router-C(IOS version 12.0) では、HSRP を設定すると、自動的にICMP Redirect が無効になります。



HSRP を究める (1) はじめに
HSRP を究める (2) バーチャルルータ
HSRP を究める (3) バーチャルルターのアドレス
HSRP を究める (4) Hello の交換
HSRP を究める (5) HSRP のパケットフォーマット
HSRP を究める (6) HSRP メッセージの種類
HSRP を究める (7) HSRP のTimer
HSRP を究める (8) HSRP ステート(State)
HSRP を究める (9) Gratuitous ARP
HSRP を究める(10) Preempt
HSRP を究める(11) Standby Delay コマンド
HSRP を究める(12) Interface Tracking
HSRP を究める(13) BIA (Burnt In Address)
HSRP を究める(14) Authentication
HSRP を究める(15) ICMP Redirect
HSRP を究める(16) ICMP Redirect との協調動作

HSRP を究める - 実践編(1) HSRP を設定する前の状況を確認する
HSRP を究める - 実践編(2) Standby Group をつくる
HSRP を究める - 実践編(3) Active Router に障害を発生させてみる(1)
HSRP を究める - 実践編 (4) Preempt とプライオリティを設定する
HSRP を究める - 実践編 (5) Active Router に障害を発生させてみる(2)
HSRP を究める - 実践編 (6) Interface Tracking
HSRP を究める - 実践編 (7) Timer を変更する
HSRP を究める - 実践編 (8) Standby Group に参加するルータの認証
HSRP を究める - 実践編 (9) Standby Group を追加する
HSRP を究める - 実践編(10) Active Router に障害を発生させてみる(3)
HSRP を究める - 実践編(11) Standby Group に名前を付ける
HSRP を究める - 実践編(12) ICMP Redirect(1)Active Router
HSRP を究める - 実践編(13) ICMP Redirect(2)Passive Router
HSRP を究める - 実践編(14) ICMP Redirect(1)Unknown Router
HSRP を究める - 実践編(15) 設定用コマンド(1)
HSRP を究める - 実践編(16) 設定用コマンド(2)
HSRP を究める - 実践編(17) 設定用コマンド(3)
HSRP を究める - 実践編(18) 設定用コマンド(4)
HSRP を究める - 実践編(19) 設定用コマンド(5)
HSRP を究める - 実践編(20) show コマンド

HSRP を究める - 応用編(1) 複数のインターフェイスをトラッキングする(1)
HSRP を究める - 応用編(2) 複数のインターフェイスをトラッキングする(2)
HSRP を究める - 応用編(3) IP の経路情報 をトラッキングする(1)
HSRP を究める - 応用編(4) 異なる種類のObject をトラッキングする
HSRP を究める - 応用編(5) 特定のIP アドレスへの到達性をトラッキングする
HSRP を究める - 応用編(6) トラッキング対象のObject に重み付けをする
HSRP を究める - 応用編(7) HSRP version 2
HSRP を究める - 応用編(8) HSRP version 2 のパケットフォーマット
HSRP を究める - 応用編(9) HSRP version 2 (2)


ネットワークエンジニアになろう!のトップページへ戻る
サイト内検索
無料メールマガジン「英語でネットワークエンジニア」
マニュアルやRFCを読むのに必要なのは、高度な文法知識ではなく語彙力です。毎回一単語、例文と解説に技術情報を併せてお届けします. (マガジンID:0000181633)
メールアドレス:
Powered by
This website is powered by Movable Type 3.2 Smartnetworks.jp.