設定例 > 冗長機能の設定 |
1.L3ping監視による冗長 |
192.168.1.1 及び 192.168.1.2 をL3ping監視先とし、両方に対してL3pingの疎通ができなくなったら、dst=192.168.1.0/24
nexthop=192.168.2.2 の経路情報を追加します。
設定内容 | 設定モード | 設定コマンド名 | 設定項目 | 入力値 |
---|---|---|---|---|
L3ping監視対象の設定 | ICMPクラス設定モード | address | 監視対象のIPアドレス | 192.168.1.1 192.168.1.2 |
description | event-action名の設定 | ICMP-CLASS#1 L3PingA ICMP-CLASS#1 L3PingB |
||
経路情報の追加条件 | イベントクラス設定モード | check ip-icmp | 経路追加条件の監視対象先ICMPクラス | 1 invert 2 invert |
description | event-class名の設定 | EVENT-CLASS#1 | ||
追加する経路情報の設定 | イベントアクション設定モード | add ip route | 追加する経路情報 | 192.168.1.0 255.255.255.0 192.168.2.2 |
description | イベントアクション名を設定 | EVENT-ACTION#1 | ||
event-classとevent-actionの関連づけ | イベントマップ設定モード | event-class event-action | event-classとevent-actionの関連づけ | event-class 1 event-action 1 |
! ! ! LAN側IPアドレスを設定します(設定例1を参照)。 ! Router> enable Enter password: super ←パスワードを入力します。(実際は表示されない) Router# Router# configure terminal Router(config)# ! ! ! L3ping対象を設定します。 ! Router(config)# icmp-class 1 Router(config-icmp-class 1)# address 192.168.1.1 Router(config-icmp-class 1)# description ICMP-CLASS#1 L3PingA Router(config-icmp-class 1)# exit Router(config)# Router(config)# icmp-class 2 Router(config-icmp-class 1)# address 192.168.1.2 Router(config-icmp-class 1)# description ICMP-CLASS#1 L3PingB Router(config-icmp-class 1)# exit ! ! ! 経路情報を追加する条件を設定します。 ! Router(config)# event-class 1 Router(config-event-class 1)# check ip-icmp 1 invert Router(config-event-class 1)# check ip-icmp 2 invert Router(config-event-class 1)# description EVENT-CLASS#1 Router(config-event-class 1)# exit ! ! ! 追加する経路情報の設定をします。 ! Router(config)# event-action 1 Router(config-event-action 1)# add ip route 192.168.1.0 255.255.255.0 192.168.2.2 Router(config-event-action 1)# description EVENT-ACTION#1 Router(config-event-action 1)# exit ! ! ! 経路の指定を行うために、action-mapの設定をします。 ! Router(config)# action-map MAIL-Data Router(config-action-map)# set ip next-hop pppoe 2 Router(config-action-map)# exit ! ! ! event-classとevent-actionの関連づけをします。 ! Router(config)# event-map Router(config-event-map)# event-class 1 event-action 1 Router(config-event-map)# exit ! ! ! 設定を保存します。 ! Router# save SIDE-A.cfg % saving working-config % finished saving Router# ! ! ! 設定を有効にするために再起動します。 ! Router# reset Are you OK to cold start?(y/n) y |