NOTE
OSPFのルータIDを変更したらOSPFプロセス再起動かルータ再起動のどちらが必要か?
OSPFプロセス再起動で変更できるのはrouter-idコマンドのみ。後から追加したインタフェース利用のルータIDはプロセス再起動では変更できない。ルータ再起動が必要。
VERIFICATION
大きいアドレスを持つ物理IFを追加
初期状態は物理IFを1つだけ設定。当然ルータIDも物理と同じ。
R1#sh ip int b | inc up Ethernet0/0 10.1.2.1 YES NVRAM up up R1# R1#sh ip os | inc ID Routing Process "ospf 1" with ID 10.1.2.1 R1#
ここで大きいアドレスを持つ物理IFを追加してプロセス再起動。しかし、ルータIDは変わらず。
R1(config)#int e0/1 R1(config-if)#ip add 10.2.2.1 255.255.255.0 R1(config-if)#ip os 1 area 0 R1(config-if)#no shut R1(config-if)#end R1# R1#clear ip os pro Reset ALL OSPF processes? [no]: yes R1# *Mar 1 00:03:18.443: %OSPF-5-ADJCHG: Process 1, Nbr 10.1.2.2 on Ethernet0/0 from FULL to DOWN, Neighbor Down: Interface down or detached *Mar 1 00:03:18.603: %OSPF-5-ADJCHG: Process 1, Nbr 10.1.2.2 on Ethernet0/0 from LOADING to FULL, Loading Done R1# R1#sh ip os | inc ID Routing Process "ospf 1" with ID 10.1.2.1 R1#
ルータ再起動後は変わってくれた。
R1#sh ip int b | inc up Ethernet0/0 10.1.2.1 YES NVRAM up up Ethernet0/1 10.2.2.1 YES NVRAM up up R1#sh ip os | inc ID Routing Process "ospf 1" with ID 10.2.2.1 R1#
Loopback IF追加
ここでループバックを新設して、プロセス再起動するも変わらず。
R1#conf t Enter configuration commands, one per line. End with CNTL/Z. R1(config)#int loop 0 *Mar 1 00:02:18.055: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up R1(config-if)#ip add 10.0.0.1 255.255.255.255 R1(config-if)#ip os 1 area 0 R1(config-if)#end R1# R1#clear ip os pro Reset ALL OSPF processes? [no]: yes R1# *Mar 1 00:02:52.151: %OSPF-5-ADJCHG: Process 1, Nbr 10.1.2.2 on Ethernet0/0 from FULL to DOWN, Neighbor Down: Interface down or detached *Mar 1 00:02:52.295: %OSPF-5-ADJCHG: Process 1, Nbr 10.1.2.2 on Ethernet0/0 from LOADING to FULL, Loading Done R1#sh ip os | inc ID Routing Process "ospf 1" with ID 10.2.2.1 R1#
ルータ再起動後は変わってくれた。
R1#sh ip int b | inc up Ethernet0/0 10.1.2.1 YES NVRAM up up Ethernet0/1 10.2.2.1 YES NVRAM up up Loopback0 10.0.0.1 YES NVRAM up up R1# R1#sh ip os | inc ID Routing Process "ospf 1" with ID 10.0.0.1 R1#
Loopback IF追加(アドレスは大きいものを指定)
さらにループバックを追加(アドレスは大きいものを指定)
R1#conf t Enter configuration commands, one per line. End with CNTL/Z. R1(config)#int loop 1 R1(config-if)#ip add 10.1.1.1 255.255.255.255 R1(config-if)#^Z R1# R1#sh ip int b | inc up Ethernet0/0 10.1.2.1 YES NVRAM up up Ethernet0/1 10.2.2.1 YES NVRAM up up Loopback0 10.0.0.1 YES NVRAM up up Loopback1 10.1.1.1 YES manual up up R1#
プロセス再起動するも変わらず
R1#clear ip os pro Reset ALL OSPF processes? [no]: yes R1# *Mar 1 00:04:32.319: %OSPF-5-ADJCHG: Process 1, Nbr 10.1.2.2 on Ethernet0/0 from FULL to DOWN, Neighbor Down: Interface down or detached *Mar 1 00:04:32.487: %OSPF-5-ADJCHG: Process 1, Nbr 10.1.2.2 on Ethernet0/0 from LOADING to FULL, Loading Done R1# R1#sh ip os | inc ID Routing Process "ospf 1" with ID 10.0.0.1 R1#
ルータ再起動後は変わってくれた。
R1#sh ip int b | inc up Ethernet0/0 10.1.2.1 YES NVRAM up up Ethernet0/1 10.2.2.1 YES NVRAM up up Loopback0 10.0.0.1 YES NVRAM up up Loopback1 10.1.1.1 YES NVRAM up up R1#sh ip os | inc ID Routing Process "ospf 1" with ID 10.1.1.1 R1#
router-id 設定
最後にrouter-id コマンド利用、これはプロセス再起動で変わってくれた
R1#conf t R1(config)#router os 1 R1(config-router)#router-id 1.1.1.1 Reload or use "clear ip ospf process" command, for this to take effect R1(config-router)#do clear ip os pro Reset ALL OSPF processes? [no]: yes R1(config-router)# *Mar 1 00:02:18.603: %OSPF-5-ADJCHG: Process 1, Nbr 10.1.2.2 on Ethernet0/0 from FULL to DOWN, Neighbor Down: Interface down or detached R1(config-router)#do sh ip os | inc ID Routing Process "ospf 1" with ID 1.1.1.1 R1(config-router)#
router-idコマンドで変更、これもプロセス再起動で変わってくれた
R1(config-router)#do sh ip os | inc ID Routing Process "ospf 1" with ID 1.1.1.1 R1(config-router)#router-id 1.1.1.11 Reload or use "clear ip ospf process" command, for this to take effect R1(config-router)#do clear ip os pro Reset ALL OSPF processes? [no]: yes R1(config-router)# *Mar 1 00:03:39.719: %OSPF-5-ADJCHG: Process 1, Nbr 10.1.2.2 on Ethernet0/0 from FULL to DOWN, Neighbor Down: Interface down or detached R1(config-router)#do sh ip os | inc ID Routing Process "ospf 1" with ID 1.1.1.11 R1(config-router)#
コメント