実習:シングルエリアでの
OSPFv3 の基本設定
トポロジ
アドレス
テーブル
デバイス
インターフェイス
IPv6 アドレス
デフォルト
ゲートウェイ
R1
G0/0
2001:DB8:ACAD:A::1/64
FE80::1 link-local
該当なし
S0/0/0 (DCE)
2001:DB8:ACAD:12::1/64
FE80::1 link-local
該当なし
S0/0/1
2001:DB8:ACAD:13::1/64
FE80::1 link-local
該当なし
R2
G0/0
2001:DB8:ACAD:B::2/64
FE80::2 link-local
該当なし
S0/0/0
2001:DB8:ACAD:12::2/64
FE80::2 link-local
該当なし
S0/0/1 (DCE)
2001:DB8:ACAD:23::2/64
FE80::2 link-local
該当なし
R3
G0/0
2001:DB8:ACAD:C::3/64
FE80::3 link-local
該当なし
S0/0/0 (DCE)
2001:DB8:ACAD:13::3/64
FE80::3 link-local
該当なし
S0/0/1
2001:DB8:ACAD:23::3/64
FE80::3 link-local
該当なし
PC-A
NIC
2001:DB8:ACAD:A::A/64
FE80::1
PC-B
NIC
2001:DB8:ACAD:B::B/64
FE80::2
PC-C
NIC
2001:DB8:ACAD:C::C/64
FE80::3
学習目標
パート
1:ネットワークの構築とデバイスの基本設定
パート
2:OSPFv3 ルーティングの設定と確認
パート
3:OSPFv3 受動インターフェイスの設定
背景
/シナリオ
Open Shortest Path First(OSPF)は、IP ネットワークのリンクステート ルーティング プロトコルです。OSPFv2 は
IPv4 ネットワークに対して定義され、OSPFv3 は IPv6 ネットワークに対して定義されます。
この実習では、ネットワーク
トポロジでの OSPFv3 ルーティングの設定、ルータ ID の割り当て、受動インターフェイス
の設定、多数の
CLI コマンドを使用した OSPFv3 ルーティング情報の表示と確認を実行します。
注:
CCNA の実習で使用するルータは、Cisco IOS Release 15.2(4)M3(universalk9 イメージ)を搭載した Cisco
1941 Integrated Services Router(ISR)です。他のルータおよび Cisco IOS バージョンを使用できます。モデルと
Cisco IOS バージョンによっては、使用できるコマンドと生成される出力が、実習とは異なる場合があります。正しい
インターフェイス
ID については、この実習の最後にあるルータ インターフェイスの集約表を参照してください。
注:ルータが消去され、スタートアップ
コンフィギュレーションがないことを確認してください。不明な場合は、インストラ
クターに相談してください。
必要なリソース
•
ルータ 3 台(Cisco IOS Release 15.2(4)M3 ユニバーサル イメージまたは同等イメージを搭載した Cisco 1941)
•
PC 3 台(Tera Term などのターミナル エミュレーション プログラムを備えた Windows 7、Vista、または XP 搭載
PC)
•
コンソール ポート経由で Cisco IOS デバイスを設定するためのコンソール ケーブル
•
トポロジに示すようなイーサネット ケーブルとシリアル ケーブル
パート
1: ネットワークの構築とデバイスの基本設定
パート
1 では、ネットワーク トポロジを設定し、PC ホストおよびルータの基本設定を行います。
手順
1: トポロジに示すようにネットワークを配線します。
手順
2: 必要に応じて、ルータを初期化し、リロードします。
手順
3: 各ルータの基本設定を行います。
a. DNS lookup をディセーブルにします。
b. トポロジに示すようにデバイス名を設定します。
c. 特権 EXEC パスワードとして
class を割り当てます。
d. VTY パスワードとして
cisco を割り当てます。
e. 不正アクセスが禁止されていることをユーザに警告する MOTD バナーを設定します。
f. コンソール回線のロギングの同期を設定します。
g. プレーン テキスト パスワードを暗号化します。
h. アドレス テーブルにリストされた IPv6 ユニキャストおよびとリンク ローカル アドレスをすべてのインターフェイス
に設定します。
i. 各ルータで IPv6 ユニキャスト ルーティングをイネーブルにします。
j. 実行コンフィギュレーションをスタートアップ コンフィギュレーションにコピーします。
手順
4: PC ホストを設定します。
手順
5: 接続をテストします。
ルータは互いに
ping でき、各 PC はデフォルト ゲートウェイに ping できます。OSPFv3 ルーティングが設定されるま
で、
PC は他の PC へ ping を実行できません。必要に応じて確認し、トラブルシューティングします。
パート
2: OSPFv3 ルーティングの設定
パート
2 では、ネットワーク内のすべてのルータに OSPFv3 ルーティングを設定し、ルーティング テーブルが正しく更
新されていることを確認します。
手順
1: ルータ ID を割り当てます。
OSPFv3 では、ルータ ID に 32 ビット アドレスが引き続き使用されます。ルータには IPv4 アドレスは設定されていな
いため、
router-id コマンドを使用して、ルータ ID を手動で割り当てます。
a.
ipv6 router ospf コマンドを実行して、ルータへの OSPFv3 プロセスを開始します。
R1(config)# ipv6 router ospf 1
注:
OSPF プロセス ID はローカルで保持され、ネットワーク上の他のルータにとっては無意味です。
b. R1 に OSPFv3 ルータ ID
1.1.1.1 を割り当てます。
R1(config-rtr)# router-id 1.1.1.1
c. OSPFv3 ルーティング プロセスを開始し、R2 にルータ ID
2.2.2.2 を、R3 にルータ ID 3.3.3.3 を割り当てます。
d. すべてのルータのルータ ID を確認するには、
show ipv6 ospf コマンドを実行します。
R2# show ipv6 ospf
Routing Process "ospfv3 1" with ID 2.2.2.2
Event-log enabled, Maximum number of events: 1000, Mode: cyclic Router is not originating router-LSAs with maximum metric <出力を省略>
手順
2: R1 で OSPFv6 ルーティングを設定します。
IPv6 では、インターフェイスに複数の IPv6 アドレスが設定されるのが一般的です。OSPFv3 では network 文は削除
されました。代わりに
OSPFv3 ルーティングはインターフェイス レベルでイネーブルになります。
a. OSPFv3 ルーティングに参加する R1 の各インターフェイスで
ipv6 ospf 1 area 0 コマンドを実行します。
R1(config)# interface g0/0
R1(config-if)# ipv6 ospf 1 area 0
R1(config-if)# interface s0/0/0
R1(config-if)# ipv6 ospf 1 area 0
R1(config-if)# interface s0/0/1
R1(config-if)# ipv6 ospf 1 area 0
注:プロセス
ID は、手順 1a で使用したプロセス ID に一致している必要があります。
b. OSPFv3 エリア 0 に R2 および R3 のインターフェイスを割り当てます。インターフェイスをエリア 0 に追加すると、
ネイバー
ルータとの隣接関係のメッセージが表示されます。
R1#
*Mar 19 22:14:43.251: %OSPFv3-5-ADJCHG: Process 1, Nbr 2.2.2.2 on Serial0/0/0 from LOADING to FULL, Loading Done
R1#
*Mar 19 22:14:46.763: %OSPFv3-5-ADJCHG: Process 1, Nbr 3.3.3.3 on Serial0/0/1 from LOADING to FULL, Loading Done
手順
3: OSPFv3 ネイバーを確認します。
show ipv6 ospf neighbor コマンドを実行して、ルータがネイバー ルータと隣接関係を形成していることを確認しま
す。ネイバー
ルータのルータ ID が表示されない場合、または状態が「フル」として表示されない場合は、2 台のルー
タは
OSPF 隣接関係を形成していません。
R1# show ipv6 ospf neighbor
OSPFv3 Router with ID (1.1.1.1) (Process ID 1)
Neighbor ID Pri State Dead Time Interface ID Interface 3.3.3.3 0 FULL/ - 00:00:39 6 Serial0/0/1 2.2.2.2 0 FULL/ - 00:00:36 6 Serial0/0/0
手順
4: OSPFv3 プロトコルの設定を確認します。
show ipv6 protocols コマンドは、OSPF プロセス ID、ルータ ID、および OSPFv3 対応のインターフェイスなどの
重要な
OSPFv3 設定情報を確認するための簡単な方法です。
R1# show ipv6 protocols
IPv6 Routing Protocol is "connected" IPv6 Routing Protocol is "ND"
IPv6 Routing Protocol is "ospf 1" Router ID 1.1.1.1
Number of areas: 1 normal, 0 stub, 0 nssa Interfaces (Area 0): Serial0/0/1 Serial0/0/0 GigabitEthernet0/0 Redistribution: None
手順
5: OSPFv3 インターフェイスを確認します。
a. show
ipv6 ospf interface コマンドを実行して、各 OSPF 対応インターフェイスの詳細リストを表示します。
R1# show ipv6 ospf interface
Serial0/0/1 is up, line protocol is up Link Local Address FE80::1, Interface ID 7
Area 0, Process ID 1, Instance ID 0, Router ID 1.1.1.1 Network Type POINT_TO_POINT, Cost: 64
Transmit Delay is 1 sec, State POINT_TO_POINT
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 Hello due in 00:00:05
Graceful restart helper support enabled Index 1/3/3, flood queue length 0 Next 0x0(0)/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 3.3.3.3
Serial0/0/0 is up, line protocol is up Link Local Address FE80::1, Interface ID 6
Area 0, Process ID 1, Instance ID 0, Router ID 1.1.1.1 Network Type POINT_TO_POINT, Cost: 64
Transmit Delay is 1 sec, State POINT_TO_POINT
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 Hello due in 00:00:00
Graceful restart helper support enabled Index 1/2/2, flood queue length 0 Next 0x0(0)/0x0(0)/0x0(0)
Last flood scan length is 1, 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 2.2.2.2
Suppress hello for 0 neighbor(s)
GigabitEthernet0/0 is up, line protocol is up Link Local Address FE80::1, Interface ID 3
Area 0, Process ID 1, Instance ID 0, Router ID 1.1.1.1 Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 1.1.1.1, local address FE80::1 No backup designated router on this network
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 Hello due in 00:00:03
Graceful restart helper support enabled Index 1/1/1, flood queue length 0 Next 0x0(0)/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)
b. OSPFv3 対応インターフェイスの集約を表示するには、
show ipv6 ospf interface brief コマンドを実行します。
R1# show ipv6 ospf interface brief
Interface PID Area Intf ID Cost State Nbrs F/C Se0/0/1 1 0 7 64 P2P 1/1 Se0/0/0 1 0 6 64 P2P 1/1 Gi0/0 1 0 3 1 DR 0/0
手順
6: IPv6 ルーティング テーブルを確認します。
show ipv6 route コマンドを実行して、すべてのネットワークがルーティング テーブルに表示されることを確認します。
R2# show ipv6 route
IPv6 Routing Table - default - 10 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route B - BGP, R - RIP, I1 - ISIS L1, I2 - ISIS L2
IA - ISIS interarea, IS - ISIS summary, D - EIGRP, EX - EIGRP external ND - ND Default, NDp - ND Prefix, DCE - Destination, NDr - Redirect O - OSPF Intra, OI - OSPF Inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2 O 2001:DB8:ACAD:A::/64 [110/65]
via FE80::1, Serial0/0/0 C 2001:DB8:ACAD:B::/64 [0/0]
via GigabitEthernet0/0, directly connected L 2001:DB8:ACAD:B::2/128 [0/0]
via GigabitEthernet0/0, receive O 2001:DB8:ACAD:C::/64 [110/65] via FE80::3, Serial0/0/1 C 2001:DB8:ACAD:12::/64 [0/0]
via Serial0/0/0, directly connected L 2001:DB8:ACAD:12::2/128 [0/0]
via Serial0/0/0, receive O 2001:DB8:ACAD:13::/64 [110/128] via FE80::3, Serial0/0/1 via FE80::1, Serial0/0/0 C 2001:DB8:ACAD:23::/64 [0/0]
via Serial0/0/1, directly connected L 2001:DB8:ACAD:23::2/128 [0/0]
via Serial0/0/1, receive L FF00::/8 [0/0]
via Null0, receive
ルーティング
テーブルの OSPF ルートのみを表示するには、どのコマンドを使用しますか?
_______________________________________________________________________________________
手順
7: エンドツーエンド接続を確認します。
各
PC はトポロジ内の他の PC に ping できます。必要に応じて確認し、トラブルシューティングします。
注:
PC 間で ping するには、場合によっては、PC のファイアウォールをディセーブルにする必要があります。
パート
3: OSPFv3 受動インターフェイスの設定
passive-interface コマンドは、ルーティング アップデートが指定したルータ インターフェイスを介して送信されるのを
防ぎます。通常、これは、ダイナミック
ルーティング プロトコル通信を受信する必要がない LAN 上のトラフィックを減
らすために行われます。パート
3 では、
passive-interface コマンドを使用して、単一のインターフェイスを受動として
設定します。また、ルータのすべてのインターフェイスがデフォルトで受動にされるように
OSPFv3 を設定し、その後、
選択したインターフェイスの
OSPF ルーティング アドバタイズメントをイネーブルにします。
手順
1: 受動インターフェイスを設定します。
a. R1 で
show ipv6 ospf interface g0/0 コマンドを実行します。次の Hello パケットが予想される時点を示すタイ
マーに注目してください。
Hello パケットは 10 秒ごとに送信され、OSPF ルータ間でネイバーがアップの状態にあ
ることを確認するために使用されます。
R1# show ipv6 ospf interface g0/0
GigabitEthernet0/0 is up, line protocol is up Link Local Address FE80::1, Interface ID 3
Area 0, Process ID 1, Instance ID 0, Router ID 1.1.1.1 Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 1.1.1.1, local address FE80::1 No backup designated router on this network
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 Hello due in 00:00:05
Graceful restart helper support enabled Index 1/1/1, flood queue length 0 Next 0x0(0)/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)
b.
passive-interface コマンドを発行して、R1 の G0/0 インターフェイスをパッシブに変更します。
R1(config)# ipv6 router ospf 1
R1(config-rtr)# passive-interface g0/0
c.
show ipv6 ospf interface g0/0 コマンドを再度実行して、G0/0 が現在受動であることを確認します。
R1# show ipv6 ospf interface g0/0
GigabitEthernet0/0 is up, line protocol is up Link Local Address FE80::1, Interface ID 3
Area 0, Process ID 1, Instance ID 0, Router ID 1.1.1.1 Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State WAITING, Priority 1 No designated router on this network
No backup designated router on this network
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 No Hellos (Passive interface)
Wait time before Designated router selection 00:00:34 Graceful restart helper support enabled
Index 1/1/1, flood queue length 0 Next 0x0(0)/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)
d. R2 および R3 で
show ipv6 route ospf コマンドを実行し、2001:DB8:ACAD:A::/64 ネットワークへのルートが
引き続き使用可能であることを確認します。
R2# show ipv6 route ospf
IPv6 Routing Table - default - 10 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route B - BGP, R - RIP, I1 - ISIS L1, I2 - ISIS L2
IA - ISIS interarea, IS - ISIS summary, D - EIGRP, EX - EIGRP external ND - ND Default, NDp - ND Prefix, DCE - Destination, NDr - Redirect O - OSPF Intra, OI - OSPF Inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2 ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
O 2001:DB8:ACAD:A::/64 [110/65] via FE80::1, Serial0/0/0 O 2001:DB8:ACAD:C::/64 [110/65]
via FE80::3, Serial0/0/1 O 2001:DB8:ACAD:13::/64 [110/128] via FE80::3, Serial0/0/1 via FE80::1, Serial0/0/0
手順
2: ルータで受動インターフェイスをデフォルトとして設定します。
a. R2 で
passive-interface default コマンドを実行して、すべての OSPFv3 インターフェイスのデフォルトを受動
として設定します。
R2(config)# ipv6 router ospf 1
R2(config-rtr)# passive-interface default
b. R1 で
show ipv6 ospf neighbor コマンドを実行します。デッド タイマーの期限が切れると、R2 はそれ以降
OSPF ネイバーとしてはリストされません。
R1# show ipv6 ospf neighbor
OSPFv3 Router with ID (1.1.1.1) (Process ID 1)
Neighbor ID Pri State Dead Time Interface ID Interface 3.3.3.3 0 FULL/ - 00:00:37 6 Serial0/0/1
c. R2 で
show ipv6 ospf interface s0/0/0 コマンドを実行して、S0/0/0 インターフェイスの OSPF ステータスを表
示します。
R2# show ipv6 ospf interface s0/0/0
Serial0/0/0 is up, line protocol is up Link Local Address FE80::2, Interface ID 6
Area 0, Process ID 1, Instance ID 0, Router ID 2.2.2.2 Network Type POINT_TO_POINT, Cost: 64
Transmit Delay is 1 sec, State POINT_TO_POINT
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 No Hellos (Passive interface)
Graceful restart helper support enabled Index 1/2/2, flood queue length 0 Next 0x0(0)/0x0(0)/0x0(0)
Last flood scan length is 2, maximum is 3
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)