High-Level Data Link Control(HDLC; ハイレベル データリンク コントロール)や Point-to-Point Protocol(PPP; ポイントツーポイント プロトコル)などのポイントツーポイント リンク上では、Open Shortest Path First(OSPF)はポイントツーポイント ネットワーク タイプで動作します。このネットワーク タイプはデフォルトで有効になっています。この文書では、ポイントツーポイント リンク上での OSPF の設定例を示します。OSPF は、他にも、ポイントツーマルチポイント、ブロードキャスト、および非ブロードキャストのネットワーク タイプをサポートしています。OSPF を実行するインターフェイスのネットワーク タイプを確認するには、show ip ospf interface コマンドを発行します。
この文書で説明する例は、HDLC と PPP の両方のカプセル化で動作します。
この文書の読者は、OSPF ルーティング プロトコルに関する基本的な知識が必要です。OSPF ルーティング プロトコルの詳細については、『Open Shortest Path First 』を参照してください。
この文書の情報は、次のソフトウェアとハードウェアのバージョンに適用されます。
Cisco 2500 ルータ
ルータで稼働するCisco IOS®ソフトウェアリリース12.2(27)
このドキュメントの情報は、特定のラボ環境にあるデバイスに基づいて作成されました。このドキュメントで使用するすべてのデバイスは、初期(デフォルト)設定の状態から起動しています。対象のネットワークが実稼働中である場合には、どのようなコマンドについても、その潜在的な影響について確実に理解しておく必要があります。
ドキュメント表記の詳細は、「シスコ テクニカル ティップスの表記法」を参照してください。
このセクションでは、OSPF が動作するルータを設定するために使用できる情報を説明します。ここでは、シリアル インターフェイスに IP アドレスが設定され、HDLC カプセル化を使用するポイントツーポイント シリアルリンク経由で接続されているルータを対象としています。
注:このドキュメントで使用するコマンドの詳細を調べるには、Command Lookup Tool(登録ユーザ専用)を使用してください。
このセクションでは、次の設定を使用します。
| Router1 |
|---|
Router1 ! interface Loopback0 ip address 3.3.3.3 255.255.255.255 ! interface Serial0 ip address 1.1.1.2 255.255.255.0 ! router ospf 1 network 1.1.1.0 0.0.0.255 area 0 !--- Configures the Serial Interface S0 under OSPF area 0. ! |
| Router2 |
|---|
Router2 ! interface Loopback0 ip address 2.2.2.2 255.255.255.255 ! interface Serial0 ip address 1.1.1.1 255.255.255.0 clockrate 2000000 ! router ospf 1 network 1.1.1.0 0.0.0.255 area 0 !--- Configures the Serial Interface S0 under OSPF area 0.. |
このセクションでは、ルーティング プロトコルとして OSPF が動作するルータを設定するために使用できる情報を説明します。ここでは、PPP カプセル化と非番号シリアル インターフェイスを使用するポイントツーポイント シリアルリンク経由で接続されているルータを対象としています。非番号シリアル インターフェイスとは、特有の IP アドレスを持たないインターフェイスのことです。これらのインターフェイスは、IP アドレスが設定されている、ルータ上の別のインターフェイスから IP アドレスを借ります。非番号シリアル インターフェイスの詳細については、『ip unnumbered コマンドの説明と設定』を参照してください。
注:このドキュメントで使用するコマンドの詳細を調べるには、Command Lookup Tool(登録ユーザ専用)を使用してください。
このセクションでは、次の設定を使用します。
| Router1 |
|---|
! interface Loopback0 ip address 3.3.3.3 255.255.255.255 ! interface Serial0 ip unnumbered loopback 0 !--- Configures Serial 0 as an unnumbered interface. encapsulation ppp !--- Configures the Encapsulation on the interface as PPP. ! router ospf 1 network 3.3.3.0 0.0.0.255 area 0 !--- Configures the Loopback Interface L0 under OSPF area 0. ! |
| Router2 |
|---|
! interface Loopback0 ip address 2.2.2.2 255.255.255.255 ! interface Serial0 ip unnumbered loopback 0 !--- Configures Serial 0 as an unnumbered interface. encapsulation ppp !--- Configures the Encapsulation on the interface as PPP. ! router ospf 1 network 2.2.2.0 0.0.0.255 area 0 !--- Configures the Loopback Interface L0 under OSPF area 0.. ! |
この項では、設定が正しく動作していることを確認するために使用できる情報を説明します。
一部の show コマンドはアウトプット インタープリタ ツールによってサポートされています(登録ユーザ専用)。このツールを使用することによって、show コマンド出力の分析結果を表示できます。
次に、Router1 で発行したshow ip ospf neighbor コマンドの出力を示します。
Router1#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 1 FULL/ - 00:00:32 1.1.1.1 Serial 0
次の出力は、Router1 には 2.2.2.2 のルータ ID が設定された隣接ルータがあり、この隣接ルータと完全な隣接関係が形成されていることを示しています。アドレス 1.1.1.1 は、Router2 の Serial0 インターフェイスの IP アドレスです。
show ip ospf neighbor コマンドの詳細については、『show ip ospf neighbor コマンドによりわかること』を参照してください。
次に、Router1でのshow ip ospf interface serial 0コマンドの出力を示します。この出力は、インターフェイスSerial0のOSPFネットワークタイプをポイントツーポイントとして示しています。
Router1# show ip ospf interface serial 0 Serial0 is up, line protocol is up Internet Address 1.1.1.2/24, Area 0 Process ID 1, Router ID 3.3.3.3, 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 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 2.2.2.2 Suppress hello for 0 neighbor(s)
同様に、次の例は、Router2 上の show ip ospf neighbor コマンドと show ip ospf interface コマンドの出力を示しています。
Router2# show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
3.3.3.3 1 FULL/ - 00:00:32 1.1.1.2 Serial0
Router2# show ip ospf interface serial 0
Serial0 is up, line protocol is up
Internet Address 1.1.1.1/24, Area 0
Process ID 1, 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
Hello due in 00:00:05
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 3.3.3.3
Suppress hello for 0 neighbor(s)
Router1 と Router2 上の show ip ospf neighbor コマンドの出力により、完全な隣接関係があることが確認できます。次の出力では、Serial0 インターフェイスの OSPF ネットワーク タイプがポイントツーポイントと表示されています。0.0.0.0 になっていることもわかります。これは、ip unnumbered コマンドにより、(この場合は)ループバック インターフェイスから IP アドレスを借用しているためです。
Router1#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 1 FULL/ - 00:00:37 2.2.2.2 Serial0
Router1# show ip ospf interface serial 0
Serial0 is up, line protocol is up
Internet Address 0.0.0.0/24, Area 0
Process ID 1, Router ID 3.3.3.3, 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:08
Index 2/2, 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 2.2.2.2
Suppress hello for 0 neighbor(s)
次の例は、Router2 上の show ip ospf neighbor コマンドと show ip ospf interface serial 0 コマンドの出力を示しています。
Router2#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
3.3.3.3 1 FULL/ - 00:00:30 3.3.3.3 Serial0
Router2# show ip ospf interface serial 0
Serial0 is up, line protocol is up
Internet Address 0.0.0.0/24, Area 0
Process ID 1, 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
Hello due in 00:00:08
Index 2/2, 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 3.3.3.3
Suppress hello for 0 neighbor(s)
次の例は、カプセル化PPPを使用したRouter1でのshow ip routeコマンドの出力と、非番号インターフェイスの使用を示しています。
Router1#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
2.0.0.0/32 is subnetted, 1 subnets
C 2.2.2.2 is directly connected, Serial0
3.0.0.0/32 is subnetted, 1 subnets
C 3.3.3.3 is directly connected, Loopback0
次の例は、カプセル化 PPP と非番号インターフェイスの使用を伴う Router2 上の show ip route コマンドの出力を示しています。
Router2#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
2.0.0.0/32 is subnetted, 1 subnets
C 2.2.2.2 is directly connected, Loopback0
3.0.0.0/32 is subnetted, 1 subnets
C 3.3.3.3 is directly connected, Serial0
次の例は、カプセル化 HDLC と非番号インターフェイスの使用を伴う Router1 上の show ip route コマンドの出力を示しています。
Router1#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/65] via 2.2.2.2, 00:00:08, Serial0
3.0.0.0/32 is subnetted, 1 subnets
C 3.3.3.3 is directly connected, Loopback0
次の例は、カプセル化 HDLC と非番号インターフェイスの使用を伴う Router2 上の show ip route コマンドの出力を示しています。
Router1#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
2.0.0.0/32 is subnetted, 1 subnets
C 2.2.2.2 is directly connected, Loopback0
3.0.0.0/32 is subnetted, 1 subnets
O 3.3.3.3 [110/65] via 3.3.3.3, 00:01:28, Serial0
注:show ip routeコマンドの出力は、シリアルインターフェイスでIPアンナンバード設定を使用する場合は、PPPとHDLCのカプセル化が異なる場合があります。PPP では、他端のシリアル インターフェイスで使用されている IP アドレスへのホスト ルートが直接接続ネットワークとしてインストールされます。この設定と同じプレフィックスが OSPF 経由でも学習される場合は、接続されたルートとしてのみ表示されます(この show ip route の出力が示すように)。 OSPF よりもアドミニストレーティブ ディスタンスが短く、より推奨されるルートであるためです。ホスト ルートのインストールを阻止して OSPF ルートとして処理するシリアル インターフェイスで no peer neighbor-route コマンドを発行すると、この動作を変更できます。
HDLC の場合は、ホスト ルートがインストールされないので、このような問題は発生しません。IP 非番号が使用されている場合は、HDLC が相手側のアドレスの OSPF ルートをインストールします。
OSPF の問題をトラブルシューティングする方法については、『OSPF のトラブルシューティング』を参照してください。
| 改定 | 発行日 | コメント |
|---|---|---|
1.0 |
06-Jul-2007
|
初版 |