ネイバーとアジャセンシーを日本語にすると非常にやっかいで、ネイバー関係を近接関係、アジャセンシー関係を隣接関係と言ったり、ネイバー関係はそのままでアジャセンシー関係だけを隣接関係と言ったり、書籍や各種Webサイトではさまざまの言い方をしていますが、基本的には、OSPF の隣接関係にはネイバーとアジャセンシーの2つがあると考えた方がいいと思います。
[ 注意 ]
SW-A と RT-A のみ電源を入れ、まだ、その他のルータの電源は入れないでください。
- RT-A に以下の設定をしなさい。
< RT-A >
Router# conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)# host RT-A
RT-A(config)# int f0/0
RT-A(config-if)# ip add 192.168.1.1 255.255.255.0
RT-A(config-if)# no shut
RT-A(config-if)# router ospf 1
RT-A(config-router)# net 192.168.1.0 0.0.0.255 area 0
RT-A(config-router)# ^Z
RT-A#
- 少し時間をおいて、RT-A で、sh ip ospf int f0/0 コマンドを実行しなさい。
< RT-A >
RT-A# sh ip ospf int f0/0
FastEthernet0/0 is up, line protocol is up
Internet Address 192.168.1.1/24, Area 0, Attached via Network Statement
Process ID 1, Router ID 192.168.1.1, Network Type BROADCAST, Cost: 1
Topology-MTID Cost Disabled Shutdown Topology Name
0 1 no no Base
Transmit Delay is 1 sec, State DR, Priority 1 ← RT-A は DR
Designated Router (ID) 192.168.1.1, Interface address 192.168.1.1 ← DR は 192.168.1.1 (RT-A)
No backup designated router on this network ← BDR はない
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
oob-resync timeout 40
Hello due in 00:00:08
Supports Link-local Signaling (LLS)
Cisco NSF helper support enabled
IETF NSF helper support enabled
Index 1/1, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 0, maximum is 0
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 0, Adjacent neighbor count is 0
Suppress hello for 0 neighbor(s)
RT-A#
このネットワークセグメントには、まだ RT-A しか OSPF ルータがないので、RT-A が DR になります。
- RT-B の電源を入れ、以下の設定をしなさい。
< RT-B >
Router# conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)# host RT-B
RT-B(config)# int f0/0
RT-B(config-if)# ip add 192.168.1.2 255.255.255.0
RT-B(config-if)# no shut
RT-B(config-if)# router ospf 1
RT-B(config-router)# net 192.168.1.0 0.0.0.255 area 0
RT-B(config-router)# ^Z
RT-B#
- 少し時間をおいて RT-B で、sh ip ospf int f0/0 コマンドを実行しなさい。
< RT-B >
RT-B# sh ip ospf int f0/0
FastEthernet0/0 is up, line protocol is up
Internet Address 192.168.1.2/24, Area 0, Attached via Network Statement
Process ID 1, Router ID 192.168.1.2, Network Type BROADCAST, Cost: 1
Topology-MTID Cost Disabled Shutdown Topology Name
0 1 no no Base
Transmit Delay is 1 sec, State BDR, Priority 1 ← RT-B は BDR
Designated Router (ID) 192.168.1.1, Interface address 192.168.1.1 ← DR は 192.168.1.1 (RT-A)
Backup Designated router (ID) 192.168.1.2, Interface address 192.168.1.2 ← BDR は 192.168.1.2 (RT-B)
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
oob-resync timeout 40
Hello due in 00:00:01
Supports Link-local Signaling (LLS)
Cisco NSF helper support enabled
IETF NSF helper support enabled
Index 1/1, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 1
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 192.168.1.1 (Designated Router)
Suppress hello for 0 neighbor(s)
RT-B#
RT-B の方がルータ ID は大きいですが、このネットワークセグメントでは、既に DR は RT-A に決定しているので、RT-B は BDR になります。
ルータ名 | プライオリティ | ルータ ID | 機能 |
RT-A | 1 | 192.168.1.1 | DR |
RT-B | 1 | 192.168.1.2 | BDR |
- SW-A の電源を切りなさい。
- RT-A で、sh ip ospf int f0/0 コマンドを実行しなさい。
< RT-A >
RT-A# sh ip ospf int f0/0
FastEthernet0/0 is up, line protocol is down
Internet Address 192.168.1.1/24, Area 0, Attached via Network Statement
Process ID 1, Router ID 192.168.1.1, Network Type BROADCAST, Cost: 1
Topology-MTID Cost Disabled Shutdown Topology Name
0 1 no no Base
Transmit Delay is 1 sec, State DOWN, Priority 1
No designated router on this network ← DR はない
No backup designated router on this network ← BDR はない
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
oob-resync timeout 40
RT-A#
ルータ ID はそのままですが、DR も BDR もこのネットワークセグメントにはなくなりました。
一度決定した DR/BBR が変更になる条件は次の通りです。
1) インタフェースのダウン/アップ
2) OSPF プロセスのリセット
3) ルータの再起動
SW-A の電源を OFF したことにより、RT-A、RT-B の F0/0 がダウンしたことになります。
- SW-A の電源を入れなさい。
- SW-A が完全に起動し、少し時間をおいて、RT-A で、sh ip ospf int f0/0 コマンドを実行しなさい。
< RT-A >
RT-A# sh ip ospf int f0/0
FastEthernet0/0 is up, line protocol is up
Internet Address 192.168.1.1/24, Area 0, Attached via Network Statement
Process ID 1, Router ID 192.168.1.1, Network Type BROADCAST, Cost: 1
Topology-MTID Cost Disabled Shutdown Topology Name
0 1 no no Base
Transmit Delay is 1 sec, State BDR, Priority 1 ← RT-A は BDR
Designated Router (ID) 192.168.1.2, Interface address 192.168.1.2 ← DR は 192.168.1.2 (RT-B)
Backup Designated router (ID) 192.168.1.1, Interface address 192.168.1.1 ← BDR は 192.168.1.1 (RT-A)
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
oob-resync timeout 40
Hello due in 00:00:02
Supports Link-local Signaling (LLS)
Cisco NSF helper support enabled
IETF NSF helper support enabled
Index 1/1, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 1
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 192.168.1.2 (Designated Router)
Suppress hello for 0 neighbor(s)
RT-A#
ルータ ID が大きい RT-B が DR、RT-A は BDR になっています。
ルータ名 | プライオリティ | ルータ ID | 機能 |
RT-A | 1 | 192.168.1.1 | BDR |
RT-B | 1 | 192.168.1.2 | DR |
- RT-B で、sh ip ospf int f0/0 コマンドを実行しなさい。
< RT-B >
RT-B# sh ip ospf int f0/0
FastEthernet0/0 is up, line protocol is up
Internet Address 192.168.1.2/24, Area 0, Attached via Network Statement
Process ID 1, Router ID 192.168.1.2, Network Type BROADCAST, Cost: 1
Topology-MTID Cost Disabled Shutdown Topology Name
0 1 no no Base
Transmit Delay is 1 sec, State DR, Priority 1 ← RT-B は DR
Designated Router (ID) 192.168.1.2, Interface address 192.168.1.2 ← DR は 192.168.1.2 (RT-B)
Backup Designated router (ID) 192.168.1.1, Interface address 192.168.1.1 ← BDR は 192.168.1.1 (RT-A)
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
oob-resync timeout 40
Hello due in 00:00:05
Supports Link-local Signaling (LLS)
Cisco NSF helper support enabled
IETF NSF helper support enabled
Index 1/1, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 2, maximum is 2
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 192.168.1.1 (Backup Designated Router)
Suppress hello for 0 neighbor(s)
RT-B#
- RT-C の電源を入れ、以下の設定をしなさい。
< RT-C >
Router# conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)# host RT-C
RT-C(config)# int f0/0
RT-C(config-if)# ip add 192.168.1.3 255.255.255.0
RT-C(config-if)# no shut
RT-C(config-if)# router ospf 1
RT-C(config-router)# net 192.168.1.0 0.0.0.255 area 0
RT-C(config-router)# ^Z
RT-C#
- 少し時間をおいて RT-C で、sh ip ospf int f0/0 コマンドを実行しなさい。
< RT-C >
RT-C# sh ip ospf int f0/0
FastEthernet0/0 is up, line protocol is up
Internet Address 192.168.1.3/24, Area 0, Attached via Network Statement
Process ID 1, Router ID 192.168.1.3, Network Type BROADCAST, Cost: 1
Topology-MTID Cost Disabled Shutdown Topology Name
0 1 no no Base
Transmit Delay is 1 sec, State DROTHER, Priority 1 ← RT-C は DROTHER
Designated Router (ID) 192.168.1.2, Interface address 192.168.1.2 ← DR は 192.168.1.2 (RT-B)
Backup Designated router (ID) 192.168.1.1, Interface address 192.168.1.1 ← BDR は 192.168.1.1 (RT-A)
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
oob-resync timeout 40
Hello due in 00:00:09
Supports Link-local Signaling (LLS)
Cisco NSF helper support enabled
IETF NSF helper support enabled
Index 1/1, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 0, maximum is 1
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 2, Adjacent neighbor count is 2
Adjacent with neighbor 192.168.1.1 (Backup Designated Router)
Adjacent with neighbor 192.168.1.2 (Designated Router)
Suppress hello for 0 neighbor(s)
RT-C#
RT-C はルータ ID が最も大きいですが、既に DR/BDR が決定しているので、RT-C は DROTHER になります。
ルータ名 | プライオリティ | ルータ ID | 機能 |
RT-A | 1 | 192.168.1.1 | BDR |
RT-B | 1 | 192.168.1.2 | DR |
RT-C | 1 | 192.168.1.3 | DROTHER |
- RT-D の電源を入れ、以下の設定をしなさい。
< RT-D >
Router# conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)# host RT-D
RT-D(config)# int f0/0
RT-D(config-if)# ip add 192.168.1.4 255.255.255.0
RT-D(config-if)# no shut
RT-D(config-if)# router ospf 1
RT-D(config-router)# net 192.168.1.0 0.0.0.255 area 0
RT-D(config-router)# ^Z
RT-D#
- 少し時間をおいて RT-D で、sh ip ospf int f0/0 コマンドを実行しなさい。
< RT-D >
RT-D# sh ip ospf int f0/0
FastEthernet0/0 is up, line protocol is up
Internet Address 192.168.1.4/24, Area 0, Attached via Network Statement
Process ID 1, Router ID 192.168.1.4, Network Type BROADCAST, Cost: 1
Topology-MTID Cost Disabled Shutdown Topology Name
0 1 no no Base
Transmit Delay is 1 sec, State DROTHER, Priority 1 ← RT-D は DROTHER
Designated Router (ID) 192.168.1.2, Interface address 192.168.1.2 ← DR は 192.168.1.2 (RT-B)
Backup Designated router (ID) 192.168.1.1, Interface address 192.168.1.1 ← BDR は 192.168.1.1 (RT-A)
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
oob-resync timeout 40
Hello due in 00:00:08
Supports Link-local Signaling (LLS)
Cisco NSF helper support enabled
IETF NSF helper support enabled
Index 1/1, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 0, maximum is 1
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 3, Adjacent neighbor count is 2
Adjacent with neighbor 192.168.1.1 (Backup Designated Router)
Adjacent with neighbor 192.168.1.2 (Designated Router)
Suppress hello for 0 neighbor(s)
RT-D#
- RT-D で、sh ip ospf neighbor コマンドを実行しなさい。
< RT-D >
RT-D# sh ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
192.168.1.1 1 FULL/BDR 00:00:38 192.168.1.1 FastEthernet0/0 ← RT-A
192.168.1.2 1 FULL/DR 00:00:36 192.168.1.2 FastEthernet0/0 ← RT-B
192.168.1.3 1 2WAY/DROTHER 00:00:33 192.168.1.3 FastEthernet0/0 ← RT-C
RT-D#
DR、BDR 以外は全て DROTHER になります。
ルータ名 | プライオリティ | ルータ ID | 機能 |
RT-A | 1 | 192.168.1.1 | BDR |
RT-B | 1 | 192.168.1.2 | DR |
RT-C | 1 | 192.168.1.3 | DROTHER |
RT-D | 1 | 192.168.1.4 | DROTHER |
State に 2WAY と FULL がありますが、これがそのルータとの関係を示します。
State | 関係 | 説明 | 相手 |
2WAY | ネイバー | Hello パケットを定期的に交換し合う関係 | DROTHER 同士の関係 |
FULL | アジャセンシー | LSA (リンクステート情報) を交換し合う関係 | DR/BDR との関係 |
ただし、上記は DR/BDR が選出されるネットワークの場合です。
- SW-A の電源を切りなさい。
- RT-A で、sh ip ospf int f0/0 コマンドを実行し、DR/BDR がないことを確認しなさい。
< RT-A >
RT-A# sh ip ospf int f0/0
FastEthernet0/0 is up, line protocol is down
Internet Address 192.168.1.1/24, Area 0, Attached via Network Statement
Process ID 1, Router ID 192.168.1.1, Network Type BROADCAST, Cost: 1
Topology-MTID Cost Disabled Shutdown Topology Name
0 1 no no Base
Transmit Delay is 1 sec, State DOWN, Priority 1
No designated router on this network ← DR はない
No backup designated router on this network ← BDR はない
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
oob-resync timeout 40
RT-A#
- SW-A の電源を入れなさい。
- SW-A が完全に起動し、少し時間をおいて、RT-A で、sh ip ospf int f0/0 コマンドを実行しなさい。
< RT-A >
RT-A# sh ip ospf int f0/0
FastEthernet0/0 is up, line protocol is up
Internet Address 192.168.1.1/24, Area 0, Attached via Network Statement
Process ID 1, Router ID 192.168.1.1, Network Type BROADCAST, Cost: 1
Topology-MTID Cost Disabled Shutdown Topology Name
0 1 no no Base
Transmit Delay is 1 sec, State DROTHER, Priority 1 ← RT-A は DROTHER
Designated Router (ID) 192.168.1.4, Interface address 192.168.1.4
Backup Designated router (ID) 192.168.1.3, Interface address 192.168.1.3
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
oob-resync timeout 40
Hello due in 00:00:07
Supports Link-local Signaling (LLS)
Cisco NSF helper support enabled
IETF NSF helper support enabled
Index 1/1, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 0, maximum is 1
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 3, Adjacent neighbor count is 2
Adjacent with neighbor 192.168.1.3 (Backup Designated Router)
Adjacent with neighbor 192.168.1.4 (Designated Router)
Suppress hello for 0 neighbor(s)
RT-A#
- RT-A で、sh ip ospf neighbor コマンドを実行しなさい。
< RT-A >
RT-A# sh ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
192.168.1.2 1 2WAY/DROTHER 00:00:32 192.168.1.2 FastEthernet0/0 ← RT-B
192.168.1.3 1 FULL/BDR 00:00:32 192.168.1.3 FastEthernet0/0 ← RT-C
192.168.1.4 1 FULL/DR 00:00:31 192.168.1.4 FastEthernet0/0 ← RT-D
RT-A#
ルータ ID の大きい順に DR/BDR が決定し、それ以外は DROTHER になっています。
ルータ名 | プライオリティ | ルータ ID | 機能 |
RT-A | 1 | 192.168.1.1 | DROTHER |
RT-B | 1 | 192.168.1.2 | DROTHER |
RT-C | 1 | 192.168.1.3 | BDR |
RT-D | 1 | 192.168.1.4 | DR |
- RT-D の設定を保存し、RT-D の電源を切りなさい。
< RT-D >
RT-D# copy run start
Destination filename [startup-config]? < Enter >
Building configuration...
[OK]
RT-D#
- 40秒以上待って、RT-A で、sh ip ospf int f0/0 コマンドを実行しなさい。
< RT-A >
RT-A# sh ip ospf int f0/0
FastEthernet0/0 is up, line protocol is up
Internet Address 192.168.1.1/24, Area 0, Attached via Network Statement
Process ID 1, Router ID 192.168.1.1, Network Type BROADCAST, Cost: 1
Topology-MTID Cost Disabled Shutdown Topology Name
0 1 no no Base
Transmit Delay is 1 sec, State DROTHER, Priority 1 ← RT-A は DROTHER
Designated Router (ID) 192.168.1.3, Interface address 192.168.1.3
Backup Designated router (ID) 192.168.1.2, Interface address 192.168.1.2
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
oob-resync timeout 40
Hello due in 00:00:01
Supports Link-local Signaling (LLS)
Cisco NSF helper support enabled
IETF NSF helper support enabled
Index 1/1, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 1
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 2, Adjacent neighbor count is 2
Adjacent with neighbor 192.168.1.2 (Backup Designated Router)
Adjacent with neighbor 192.168.1.3 (Designated Router)
Suppress hello for 0 neighbor(s)
RT-A#
Dead インターバル (OSPF ルータがダウンしたと判断する時間) の40秒間待ちます。
- RT-A で、sh ip ospf neighbor コマンドを実行しなさい。
< RT-A >
RT-A# sh ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
192.168.1.2 1 FULL/BDR 00:00:39 192.168.1.2 FastEthernet0/0 ← RT-B
192.168.1.3 1 FULL/DR 00:00:31 192.168.1.3 FastEthernet0/0 ← RT-C
RT-A#
DR である RT-D がダウンすると、BDR が DR になり、DROTHER の中で最もルータ ID の大きい RT-B が BDR になります。
ルータ名 | プライオリティ | ルータ ID | 機能 |
RT-A | 1 | 192.168.1.1 | DROTHER |
RT-B | 1 | 192.168.1.2 | DROTHER → BDR |
RT-C | 1 | 192.168.1.3 | BDR → DR |
- RT-D の電源を入れなさい。
- RT-D が完全に起動した後、RT-A で、sh ip ospf neighbor コマンドを実行しなさい。
< RT-A >
RT-A# sh ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
192.168.1.2 1 FULL/BDR 00:00:36 192.168.1.2 FastEthernet0/0 ← RT-B
192.168.1.3 1 FULL/DR 00:00:36 192.168.1.3 FastEthernet0/0 ← RT-C
192.168.1.4 1 2WAY/DROTHER 00:00:39 192.168.1.4 FastEthernet0/0 ← RT-D
RT-A#
ルータ ID が大きくても RT-D は DR にはなりません。
ルータ名 | プライオリティ | ルータ ID | 機能 |
RT-A | 1 | 192.168.1.1 | DROTHER |
RT-B | 1 | 192.168.1.2 | BDR |
RT-C | 1 | 192.168.1.3 | DR |
RT-D | 1 | 192.168.1.4 | DROTHER |
- RT-C の設定を保存し、RT-C の電源を切りなさい。
< RT-C >
RT-C# copy run start
Destination filename [startup-config]? < Enter >
Building configuration...
[OK]
RT-C#
- 40秒以上待って、RT-A で、sh ip ospf int f0/0 コマンドを実行しなさい。
< RT-A >
RT-A# sh ip ospf int f0/0
FastEthernet0/0 is up, line protocol is up
Internet Address 192.168.1.1/24, Area 0, Attached via Network Statement
Process ID 1, Router ID 192.168.1.1, Network Type BROADCAST, Cost: 1
Topology-MTID Cost Disabled Shutdown Topology Name
0 1 no no Base
Transmit Delay is 1 sec, State DROTHER, Priority 1 ← RT-A は DROTHER
Designated Router (ID) 192.168.1.2, Interface address 192.168.1.2
Backup Designated router (ID) 192.168.1.4, Interface address 192.168.1.4
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
oob-resync timeout 40
Hello due in 00:00:02
Supports Link-local Signaling (LLS)
Cisco NSF helper support enabled
IETF NSF helper support enabled
Index 1/1, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 1
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 2, Adjacent neighbor count is 2
Adjacent with neighbor 192.168.1.2 (Designated Router)
Adjacent with neighbor 192.168.1.4 (Backup Designated Router)
Suppress hello for 0 neighbor(s)
RT-A#
- RT-A で、sh ip ospf neighbor コマンドを実行しなさい。
< RT-A >
RT-A# sh ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
192.168.1.2 1 FULL/DR 00:00:35 192.168.1.2 FastEthernet0/0 ← RT-B
192.168.1.4 1 FULL/BDR 00:00:37 192.168.1.4 FastEthernet0/0 ← RT-D
RT-A#
DR である RT-C がダウンすると、BDR が DR になり、DROTHER の中で最もルータ ID の大きい RT-D が BDR になります。
ルータ ID が大きくても DROTHER である RT-D が DR になることはありません。
DR がダウンすると、必ず BDR が DR になります。
ルータ名 | プライオリティ | ルータ ID | 機能 |
RT-A | 1 | 192.168.1.1 | DROTHER |
RT-B | 1 | 192.168.1.2 | BDR → DR |
RT-D | 1 | 192.168.1.4 | DROTHER → BDR |
- RT-C の電源を入れなさい。
- RT-C が完全に起動した後、RT-A で、sh ip ospf neighbor コマンドを実行しなさい。
< RT-A >
RT-A# sh ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
192.168.1.2 1 FULL/DR 00:00:34 192.168.1.2 FastEthernet0/0 ← RT-B
192.168.1.3 1 2WAY/DROTHER 00:00:39 192.168.1.3 FastEthernet0/0 ← RT-C
192.168.1.4 1 FULL/BDR 00:00:39 192.168.1.4 FastEthernet0/0 ← RT-D
RT-A#
ルータ名 | プライオリティ | ルータ ID | 機能 |
RT-A | 1 | 192.168.1.1 | DROTHER |
RT-B | 1 | 192.168.1.2 | DR |
RT-C | 1 | 192.168.1.3 | DROTHER |
RT-D | 1 | 192.168.1.4 | BDR |