質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
Cisco IOS

Cisco IOSは、シスコシステムズ社が提供しているOSです。同社のほとんどのルーターやスイッチに使用されており、特徴のあるコマンドラインインターフェースをもちます。実行操作に制限があるユーザーモードと特権モードのセキュリティレベルがあります。

Cisco

シスコ(Cisco Systems,Inc.)は、アメリカ合衆国に本社を置く、世界最大のコンピュータネットワーク機器開発会社及び同社の製品

Q&A

解決済

1回答

2175閲覧

IP SLAの設定方法がわかりません

narururu

総合スコア170

Cisco IOS

Cisco IOSは、シスコシステムズ社が提供しているOSです。同社のほとんどのルーターやスイッチに使用されており、特徴のあるコマンドラインインターフェースをもちます。実行操作に制限があるユーザーモードと特権モードのセキュリティレベルがあります。

Cisco

シスコ(Cisco Systems,Inc.)は、アメリカ合衆国に本社を置く、世界最大のコンピュータネットワーク機器開発会社及び同社の製品

0グッド

0クリップ

投稿2018/02/18 09:49

編集2018/02/19 14:02

GNS3
スタティックルートの構成でip slaを使った冗長構成
イメージ説明

###実現したいこと
R1のfa1/3とR4のfa1/2をshutdownしても主系から副系に切り替わるように設定したい。
主系:R1→R2→R4
副系:R1→R3→R4

###現時点での切り替わり結果
【R2】
筐体断→〇
fa1/2断→〇
fa1/4断→〇

【R1】
fa1/2断→×

【R4】
fa1/2断→×

###ステータス
※ip slaの設定について、GNS3では一部コマンドが違いますのでご了承ください。

R1#show run Building configuration... Current configuration : 2104 bytes ! version 12.4 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R1 ! boot-start-marker boot-end-marker ! ! no aaa new-model memory-size iomem 5 no ip icmp rate-limit unreachable ip cef ! ! ! ! no ip domain lookup ip auth-proxy max-nodata-conns 3 ip admission max-nodata-conns 3 ip sla monitor 1 type echo protocol ipIcmpEcho 192.168.2.2 source-interface FastEthernet1/2 ip sla monitor schedule 1 life forever start-time now ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ip tcp synwait-time 5 ! track 1 rtr 1 reachability ! ! ! ! ! interface FastEthernet0/0 no ip address shutdown duplex auto speed auto ! interface Serial0/0 no ip address shutdown clock rate 2000000 ! interface FastEthernet0/1 no ip address shutdown duplex auto speed auto ! interface Serial0/1 no ip address shutdown clock rate 2000000 ! interface Serial0/2 no ip address shutdown clock rate 2000000 ! interface FastEthernet1/0 ! interface FastEthernet1/1 no switchport ip address 192.168.10.1 255.255.255.0 ! interface FastEthernet1/2 no switchport ip address 192.168.1.1 255.255.255.0 ! interface FastEthernet1/3 no switchport ip address 192.168.3.1 255.255.255.0 ! interface FastEthernet1/4 ! interface FastEthernet1/5 ! interface FastEthernet1/6 ! interface FastEthernet1/7 ! interface FastEthernet1/8 ! interface FastEthernet1/9 ! interface FastEthernet1/10 ! interface FastEthernet1/11 ! interface FastEthernet1/12 ! interface FastEthernet1/13 ! interface FastEthernet1/14 ! interface FastEthernet1/15 ! interface Vlan1 no ip address ! ip forward-protocol nd ip route 192.168.20.0 255.255.255.0 192.168.1.2 track 1 ip route 192.168.2.0 255.255.255.0 192.168.1.2 ip route 192.168.4.0 255.255.255.0 192.168.3.2 2 ip route 192.168.20.0 255.255.255.0 192.168.3.2 2 ! ! no ip http server no ip http secure-server ! no cdp log mismatch duplex ! ! ! control-plane ! ! ! ! ! ! ! ! ! ! line con 0 exec-timeout 0 0 privilege level 15 logging synchronous line aux 0 exec-timeout 0 0 privilege level 15 logging synchronous line vty 0 4 login ! ! end
R2#show run Building configuration... Current configuration : 1768 bytes ! version 12.4 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R2 ! boot-start-marker boot-end-marker ! ! no aaa new-model memory-size iomem 5 no ip icmp rate-limit unreachable ip cef ! ! ! ! no ip domain lookup ip auth-proxy max-nodata-conns 3 ip admission max-nodata-conns 3 ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ip tcp synwait-time 5 ! ! ! ! ! interface FastEthernet0/0 no ip address shutdown duplex auto speed auto ! interface Serial0/0 no ip address shutdown clock rate 2000000 ! interface FastEthernet0/1 no ip address shutdown duplex auto speed auto ! interface Serial0/1 no ip address shutdown clock rate 2000000 ! interface Serial0/2 no ip address shutdown clock rate 2000000 ! interface FastEthernet1/0 ! interface FastEthernet1/1 ! interface FastEthernet1/2 no switchport ip address 192.168.1.2 255.255.255.0 ! interface FastEthernet1/3 ! interface FastEthernet1/4 no switchport ip address 192.168.2.1 255.255.255.0 ! interface FastEthernet1/5 ! interface FastEthernet1/6 ! interface FastEthernet1/7 ! interface FastEthernet1/8 ! interface FastEthernet1/9 ! interface FastEthernet1/10 ! interface FastEthernet1/11 ! interface FastEthernet1/12 ! interface FastEthernet1/13 ! interface FastEthernet1/14 ! interface FastEthernet1/15 ! interface Vlan1 no ip address ! ip forward-protocol nd ip route 192.168.10.0 255.255.255.0 192.168.1.1 ip route 192.168.20.0 255.255.255.0 192.168.2.2 ! ! no ip http server no ip http secure-server ! no cdp log mismatch duplex ! ! ! control-plane ! ! ! ! ! ! ! ! ! ! line con 0 exec-timeout 0 0 privilege level 15 logging synchronous line aux 0 exec-timeout 0 0 privilege level 15 logging synchronous line vty 0 4 login ! ! end
R4#show run Building configuration... Current configuration : 2114 bytes ! version 12.4 service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption ! hostname R4 ! boot-start-marker boot-end-marker ! ! no aaa new-model memory-size iomem 5 no ip icmp rate-limit unreachable ip cef ! ! ! ! no ip domain lookup ip auth-proxy max-nodata-conns 3 ip admission max-nodata-conns 3 ip sla monitor 1 type echo protocol ipIcmpEcho 192.168.1.1 source-interface FastEthernet1/2 ip sla monitor schedule 1 life forever start-time now ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ip tcp synwait-time 5 ! track 1 rtr 1 reachability ! ! ! ! ! interface FastEthernet0/0 no ip address shutdown duplex auto speed auto ! interface Serial0/0 no ip address shutdown clock rate 2000000 ! interface FastEthernet0/1 no ip address shutdown duplex auto speed auto ! interface Serial0/1 no ip address shutdown clock rate 2000000 ! interface Serial0/2 no ip address shutdown clock rate 2000000 ! interface FastEthernet1/0 ! interface FastEthernet1/1 no switchport ip address 192.168.20.1 255.255.255.0 ! interface FastEthernet1/2 no switchport ip address 192.168.2.2 255.255.255.0 ! interface FastEthernet1/3 no switchport ip address 192.168.4.2 255.255.255.0 ! interface FastEthernet1/4 ! interface FastEthernet1/5 ! interface FastEthernet1/6 ! interface FastEthernet1/7 ! interface FastEthernet1/8 ! interface FastEthernet1/9 ! interface FastEthernet1/10 ! interface FastEthernet1/11 ! interface FastEthernet1/12 ! interface FastEthernet1/13 ! interface FastEthernet1/14 ! interface FastEthernet1/15 ! interface Vlan1 no ip address ! ip forward-protocol nd ip route 192.168.10.0 255.255.255.0 192.168.2.1 track 1 ip route 192.168.1.0 255.255.255.0 192.168.2.1 ip route 192.168.3.0 255.255.255.0 192.168.4.1 2 ip route 192.168.10.0 255.255.255.0 192.168.4.1 2 ! ! no ip http server no ip http secure-server ! no cdp log mismatch duplex ! ! ! control-plane ! ! ! ! ! ! ! ! ! ! line con 0 exec-timeout 0 0 privilege level 15 logging synchronous line aux 0 exec-timeout 0 0 privilege level 15 logging synchronous line vty 0 4 login ! ! end

###疑問点
ip slaとtrackの番号の使い分けや、どの機器に何のコマンドを入れればいいのか良く分かりません。

以上、ip slaについてご存知の方、アドバイスいただけると助かります。
よろしくお願いいたします(>_<)

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

この構成ですと、R1/R4でtrack、SLAを動作させるのが自然だと思いますが、いかがですかね。
それでよければ、以下で行けると思います。

■R1の動作(R4も同等の設定)
・sla宛先
⇒R4 fa1/2(192.168.2.2)を監視。
・trackの設定
⇒設定したslaをtrackに紐付けて、正系のスタティックルート(Dst:192.168.20.0/24 NH:192.168.1.2)に設定
⇒ダウンすると、設定済みのフロスタが浮かび上がってくる。
(Dst:192.168.20.0/24 NH:192.168.3.2 AD:2)

■R2の動作
track、SLAは無し。

上記を踏まえた修正Configは以下の通りです。

■R1修正Config(R4も同じように変更)
conf t
!
no ip route 192.168.2.0 255.255.255.0 192.168.1.2 track 1
ip route 192.168.2.0 255.255.255.0 192.168.1.2
!
ip sla monitor 1
type echo protocol ipIcmpEcho 192.168.2.2 source-interface FastEthernet1/2
exit
!
ip sla monitor schedule 1 life forever start-time now
!
track 1 rtr 1 reachability
exit
!
ip route 192.168.20.0 255.255.255.0 192.168.1.2 track 1
!
end

※"no ip route 192.168.2.0 255.255.255.0 192.168.1.2 track 1"の意味は監視用の通信に
trackを設定してしまうと、当該trackがダウンしたらルートが消えるため、以後監視が
できなくなる=ルートが永久に復活しなくなるからです。

■R2修正Config
no ip route 192.168.10.0 255.255.255.0 192.168.1.1 track 1
no ip route 192.168.20.0 255.255.255.0 192.168.2.2 track 2
!
ip route 192.168.10.0 255.255.255.0 192.168.1.1
ip route 192.168.20.0 255.255.255.0 192.168.2.2
!
no ip sla monitor schedule 1 life forever start-time now
no ip sla monitor 1
!
no ip sla monitor schedule 2 life forever start-time now
no ip sla monitor 2
!
no track 1
!
no track 2
!

以上です。
ちなみに、R2で正副切替を検知させる場合、R2自身がfa1/2のダウンを検知して自分のfa1/4をshutしなければならないと思います。
その為には、EEM(Embedded Event Manager)などでスクリプトを動かして、自動でコマンド入力するなど、トリッキーことをしなければならず、あまり一般的ではないように思えます。

投稿2018/02/19 07:56

taichi_0807

総合スコア252

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

narururu

2018/02/22 11:32 編集

ご回答ありがとうございます。taichiさん☺ ご連絡が遅くなりました。申し訳ございません。 頂いたコンフィグを基に試しました。 R2のfa1/2とfa1/4のshutdown、筐体断はきちんと切り替わりました。 しかし、R1のfa1/2、R4のfa1/2のポートshutodownは切り替わりませんでした。 ip slaはやはり苦手です。 今回、なぜR1のfa1/2、R4のfa1/2のポートshutodownでは切り替わらないのか、理由はわかりませんが、R2の箇所であれば今回のコンフィグで実現できることを知ることができましたので充分です。 もし、差し支えなければ理由を教えていただけると助かります。
taichi_0807

2018/02/23 04:06

ご提示頂いたConfigをGNS3で構築してみましたが、当方では迂回できました。 迂回が出来ない時の切り分けのポイントとしては、 以下ですかね。 ①設定したtrackが想定通りDownしているか?  ⇒show track brief ②想定したフロスタが浮かんできているか?  ⇒show ip ro ③(①と②が想定通りなら)どこの部分で疎通が取れないのか  ⇒各機器でping、traceをしてみる
narururu

2018/02/23 12:53

ご回答ありがとうございます☺ ななんと、taichiさんの場合ですと迂回されてるのですね('_') 私の設定に誤りがありそうですね。 R1とR4で問題の切り分けを行いましたが、以下の結果になりました。 ①と②は想定通りの結果になってると思ってます。 ③のtraceの結果を見ると、R1とR3を繋いでいる箇所に原因がありそうな気がしてます。 【R1】 ① R1#show track b Track Object Parameter Value 1 rtr 1 reachability Down ② C 192.168.10.0/24 is directly connected, FastEthernet1/1 S 192.168.4.0/24 [2/0] via 192.168.3.2 S 192.168.20.0/24 [2/0] via 192.168.3.2 C 192.168.3.0/24 is directly connected, FastEthernet1/3 ③ PC-1> trace 192.168.20.10 trace to 192.168.20.10, 8 hops max, press Ctrl+C to stop 1 192.168.10.1 15.041 ms 28.075 ms 30.082 ms 2 * * * 3 * * * 【R4】 ① R4#show track b Track Object Parameter Value 1 rtr 1 reachability Down ②こちらは今回R1のfa1/2のshutdownなのでフロスタを設定していない全てのルートが表示されています。想定通りだと思ってます。 S 192.168.10.0/24 [2/0] via 192.168.4.1 C 192.168.4.0/24 is directly connected, FastEthernet1/3 C 192.168.20.0/24 is directly connected, FastEthernet1/1 S 192.168.1.0/24 [1/0] via 192.168.2.1 C 192.168.2.0/24 is directly connected, FastEthernet1/2 S 192.168.3.0/24 [2/0] via 192.168.4.1 ③ PC-2> trac 192.168.10.10 trace to 192.168.10.10, 8 hops max, press Ctrl+C to stop 1 192.168.20.1 15.630 ms 31.251 ms 46.880 ms 2 192.168.4.1 46.883 ms 46.878 ms 31.254 ms 3 * * * 4 * * * 再度、確認してみます!
narururu

2018/02/23 13:01

あ、でもR4のshow ip routeの結果はおかしいかもですね。 本来ならR1と同じようにフロスタの設定が浮かび上がってくるような気がします。 なぜなら、R1と同じようにR4でもtrackの設定をしているので、R1のfa1/2のshutdownはR4に検知されるはずですよね。 よって、R4の設定に原因がありそうな気がしてきました。 確認いたします!
narururu

2018/02/25 06:48

せっかくアドバイス下さったのに、迂回されない原因がいまだに解明できず('_') ひとまず保留にします。 アドバイスありがとうございました!
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問