JANOG 51 NETCON 問題解説 (Level 2-2)
- 2023年1月31日
- 読了時間: 6分
JANOG 51 にスタッフ(NETCON委員)として参加させていただきました。 作成した問題について、回答と解説を記載します。 私の作成した問題は以下となっています。
Level 2-2 HSRP & OSPF 問題

技術要素
OSPFv2、HSRP
構成解説
Cisco CSR1000v x 4 、通信確認用端末(Linux) x 2、SW (cEOS) x 1
OSPF area 0 のシングルエリア構成、R1とR2で HSRP Group 1 を構成
問題文
■トラブル① R1とR2でHSRPを構成しようとしています。 R1をメインのActiveルータとし、R1のG2がDOWNした場合にはR2がActiveルータに 切り替わる設定を投入して、R2への切り替わりは成功することを確認しました。
R1(config)#int g2
R1(config-if)#shut
R1(config-if)#do sh stand b
P indicates configured to preempt.
|
Interface Grp Pri P State Active Standby Virtual IP
Gi3 1 105 Standby 192.168.0.2 local 192.168.0.254R2#show standby brief
P indicates configured to preempt.
|
Interface Grp Pri P State Active Standby Virtual IP
Gi3 1 100 P Active local 192.168.0.1 192.168.0.254
しかしR1のG2をUPさせた後、R1がActiveルータに戻りません。
R1(config)#int g2
R1(config-if)#no shutR1#show standby brief
P indicates configured to preempt.
|
Interface Grp Pri P State Active Standby Virtual IP
Gi3 1 105 Standby 192.168.0.2 local 192.168.0.254
R2#show standby b
P indicates configured to preempt.
|
Interface Grp Pri P State Active Standby Virtual IP
Gi3 1 100 P Active local 192.168.0.1 192.168.0.254
R1のGi2がUPした後に、R1がActiveルータに戻るように設定を変更して下さい。 ただし、このトラブルを解決するための設定変更はR1のみとします。 他のデバイスの設定を変更してはいけません。
■トラブル② PC1とPC2との間でpingが通りません。 この問題を解決し、PC1から以下のようにpingコマンドが成功するようにして下さい。 ただし、このトラブルを解決するための設定変更はR4のみとします。 他のデバイスの設定を変更してはいけません。
PC1> ping 10.0.4.200
84 bytes from 10.0.4.200 icmp_seq=1 ttl=61 time=4.003 ms
84 bytes from 10.0.4.200 icmp_seq=2 ttl=61 time=1.824 ms
84 bytes from 10.0.4.200 icmp_seq=3 ttl=61 time=1.928 ms
84 bytes from 10.0.4.200 icmp_seq=4 ttl=61 time=2.077 ms
84 bytes from 10.0.4.200 icmp_seq=5 ttl=61 time=4.921 ms制約事項
トラブル①、トラブル②共に、以下の制限事項があります。
・OSPF以外のルーティングプロトコルを動作させてはいけません
・スタティックルートやPBR(Policy Base Routing)を使用してはいけません
・R1~R4の GigabitEthernet1 インターフェースは管理用のため、設定変更を実施してはいけません
(機器にログイン出来なくなります)
ゴール
以下の状態になること。
・トラブル①
R1のG2を shut / no shut した後に、R1がActive、R2がStandbyになっていること
・トラブル②
PC1からPC2(10.0.4.200)へPingが到達すること
※設定を追加・修正したconfigも回答として送信してください。
問題解説
■トラブル①
R1#show standby brief
P indicates configured to preempt.
|
Interface Grp Pri P State Active Standby Virtual IP
Gi3 1 105 Active local 192.168.0.2 192.168.0.254
R2#show standby brief
P indicates configured to preempt.
|
Interface Grp Pri P State Active Standby Virtual IP
Gi3 1 100 P Standby 192.168.0.1 local 192.168.0.254R1の G2 を shutdown する
R1(config)#int g2
R1(config-if)#shut
R1(config-if)#do sh stand b
P indicates configured to preempt.
|
Interface Grp Pri P State Active Standby Virtual IP
Gi3 1 95 Standby 192.168.0.2 local 192.168.0.254
R2#show standby brief
P indicates configured to preempt.
|
Interface Grp Pri P State Active Standby Virtual IP
Gi3 1 100 P Active local 192.168.0.1 192.168.0.254→R2がActiveルータになった。
R1の G2 を no shutdown する
R1(config-if)#no shut
R1(config-if)#do sh stand b
P indicates configured to preempt.
|
Interface Grp Pri P State Active Standby Virtual IP
Gi3 1 105 Standby 192.168.0.2 local 192.168.0.254
R2#show standby brief
P indicates configured to preempt.
|
Interface Grp Pri P State Active Standby Virtual IP
Gi3 1 100 P Active local 192.168.0.1 192.168.0.254→R2の方が Priority が低い が、Activeルータのままになっている。
R1(config-if)#do sh run | sec stand
standby 1 ip 192.168.0.254
standby 1 priority 105
standby 1 track 1 decrement 10
R2#sh run | sec stand
standby 1 ip 192.168.0.254
standby 1 preempt→R1のHSRPの設定に preempt が抜けている。
【修正】
R1(config-if)#int g3
R1(config-if)#standby 1 preempt
R1#sh stand b
P indicates configured to preempt.
|
Interface Grp Pri P State Active Standby Virtual IP
Gi3 1 105 P Active local 192.168.0.2 192.168.0.254
R2#show stand brief
P indicates configured to preempt.
|
Interface Grp Pri P State Active Standby Virtual IP
Gi3 1 100 P Standby 192.168.0.1 local 192.168.0.254
【解説】 HSRPは、デフォルトでは preempt が有効になっていませんので、 一旦 standby 状態になったルータはpriority が高い状態に復旧しても Coup メッセージを送信しません。 結果、priority が低いルータが active ルータの役割を継続します。
priority 値が高い状態になったルータが active ルータになるためには、preempt を有効にする必要があります。
■Cisco:Standby PreemptおよびStandby Trackコマンドの使用 https://www.cisco.com/c/ja_jp/support/docs/ip/hot-standby-router-protocol-hsrp/13780-6.html#anc8
■トラブル②
PC1:~$ ping 10.0.4.200
*192.168.0.1 icmp_seq=1 ttl=255 time=0.526 ms (ICMP type:3, code:1, Destination host unreachable)
*192.168.0.1 icmp_seq=2 ttl=255 time=0.631 ms (ICMP type:3, code:1, Destination host unreachable)
*192.168.0.1 icmp_seq=3 ttl=255 time=0.733 ms (ICMP type:3, code:1, Destination host unreachable)
*192.168.0.1 icmp_seq=4 ttl=255 time=0.903 ms (ICMP type:3, code:1, Destination host unreachable)
*192.168.0.1 icmp_seq=5 ttl=255 time=0.536 ms (ICMP type:3, code:1, Destination host unreachable)→192.168.0.1(R1)から Destination host unreachable が返っています。
R1#show ip route ospf | begin Gateway
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
O 10.0.23.0/24 [110/2] via 10.0.13.3, 00:11:43, GigabitEthernet2
O 10.0.34.0/24 [110/2] via 10.0.13.3, 00:11:43, GigabitEthernet2→R1は10.0.4.0/24 をOSPFで学習していません。
R3#show ip route ospf | begin Gateway
Gateway of last resort is not set
O 192.168.0.0/24 [110/2] via 10.0.23.2, 00:15:31, GigabitEthernet3
[110/2] via 10.0.13.1, 00:12:36, GigabitEthernet2→R3も10.0.4.0/24 をOSPFで学習していません。
R3#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
4.4.4.4 1 INIT/DROTHER 00:00:30 10.0.34.4 GigabitEthernet4
2.2.2.2 1 FULL/BDR 00:00:30 10.0.23.2 GigabitEthernet3
1.1.1.1 1 FULL/BDR 00:00:38 10.0.13.1 GigabitEthernet2R4#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
3.3.3.3 1 DOWN/DROTHER - 10.0.34.3 GigabitEthernet2
R4#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
3.3.3.3 1 EXSTART/DROTHER 00:00:37 10.0.34.3 GigabitEthernet2
R4#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
3.3.3.3 1 DOWN/DROTHER - 10.0.34.3 GigabitEthernet2→R3とR4のアジャセンシー関係がFULLになりません。
R4#sh run int g2
Building configuration...
Current configuration : 131 bytes
!
interface GigabitEthernet2
ip address 10.0.34.4 255.255.255.0
ip mtu 1454
negotiation auto
no mop enabled
no mop sysid
end
R3#sh run int g4
Building configuration...
Current configuration : 118 bytes
!
interface GigabitEthernet4
ip address 10.0.34.3 255.255.255.0
negotiation auto
no mop enabled
no mop sysid
end→R4にだけ ip mtu 1454 が設定されています。 解決方法: ip mtu の値を修正する この問題では、R4のみ設定変更が許可されています。 R4側で ip mtu 1500 (または no ip mtu ) 、もしくは ip ospf mtu-ignore を設定して、 インターフェースの shut / no shut 、 またはOSPFのプロセスリセットを実施します。
R4(config)# int g2
R4(config-if)#no ip mtu (もしくは ip ospf mtu-ignore)
R4(config-if)#shut
R4(config-if)#no shut
R4#sh ip ospf nei
Neighbor ID Pri State Dead Time Address Interface
3.3.3.3 1 FULL/DR 00:00:38 10.0.34.3 GigabitEthernet2
R4#sh ip route ospf | be Gateway
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
O 10.0.13.0/24 [110/2] via 10.0.34.3, 00:00:28, GigabitEthernet2
O 10.0.23.0/24 [110/2] via 10.0.34.3, 00:00:28, GigabitEthernet2
O 192.168.0.0/24 [110/3] via 10.0.34.3, 00:00:28, GigabitEthernet2
R3#sh ip route ospf | be Gateway
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 7 subnets, 2 masks
O 10.0.4.0/24 [110/2] via 10.0.34.4, 00:00:56, GigabitEthernet4
O 192.168.0.0/24 [110/2] via 10.0.23.2, 00:25:29, GigabitEthernet3
[110/2] via 10.0.13.1, 00:22:34, GigabitEthernet2→10.0.4.0/24 をOSPFで学習出来ました。
PC1:~$ ping 10.0.4.200
PING 10.0.4.200 (10.0.4.200) 56(84) bytes of data.
464 bytes from 10.0.4.200: icmp_seq=2 ttl=61 time=12.7 ms
64 bytes from 10.0.4.200: icmp_seq=3 ttl=61 time=4.98 ms
64 bytes from 10.0.4.200: icmp_seq=4 ttl=61 time=4.89 ms
64 bytes from 10.0.4.200: icmp_seq=5 ttl=61 time=4.80 ms
64 bytes from 10.0.4.200: icmp_seq=6 ttl=61 time=4.73 ms→PingOKになりました。 OSPFのネイバー形成のプロセスの中で、DBDパケットの交換がありますが、 MTUの値が異なるとDatabase Descriptionパケットが拒否されます。 ■Cisco:OSPF、MTU、および LSA パッキングのテクニカル ノート https://www.cisco.com/c/ja_jp/support/docs/ip/open-shortest-path-first-ospf/116119-technote-ospf-mtu-00.html#anc2 NETCONでの回答は、no ip mtu が多かったです。 ip ospf mtu-ignore は1割程度の方が回答してくださいました。
(どちらでも正解となっています)
初期コンフィグ
R1
R2
R3
R4















コメント