このドキュメントでは、フレーム リレー サブインターフェイスでの Open Shortest Path First(OSPF)の設定例を提供します。
この設定を開始する前に、次の要件が満たされていることを確認してください。
フレーム リレーおよび OSPF 設定の基本について理解している。
詳細については、『OSPF の設定』および『フレーム リレーの設定およびトラブルシューティング』を参照してください。
このドキュメントの情報は、次のソフトウェアとハードウェアのバージョンに基づくものです。
Cisco 2503 ルータ
両方のルータの Cisco IOS® ソフトウェア バージョン 12.3(3)
本書の情報は、特定のラボ環境にあるデバイスに基づいて作成されたものです。 このドキュメントで使用するすべてのデバイスは、初期(デフォルト)設定の状態から起動しています。 稼働中のネットワークで作業を行う場合、コマンドの影響について十分に理解したうえで作業してください。
ドキュメント表記の詳細は、『シスコ テクニカル ティップスの表記法』を参照してください。
ネットワークを介して OSPF を設定およびトラブルシューティングするには、基礎となるネットワーク トポロジを十分に理解しておく必要があります。 ネイバー探索メカニズム、指定ルータ(DR)およびバックアップ指定ルータ(BDR)の選択、アップデート フラッディングは、これに依存します。 基礎となるレイヤ 2 トポロジは次のいずれかです。
ブロードキャスト マルチアクセス(イーサネットなど):ブロードキャスト ネットワークは、ネットワークを介してブロードキャストまたはマルチキャスト パケットを送信でき、すべてのデバイスがセグメントのその他のすべてのセグメントと直接通信できるネットワークです。 マルチアクセス ネットワークは、3 台以上のデバイスを接続するネットワークです。 詳細については、『ブロードキャスト メディアを介した OSPF の初期設定』を参照してください。
ポイントツーポイント(ポイントツーポイントが付いているシリアルリンクのようなおよび High-Level Data Link Control(HDLC) (PPP/HDLC)) —ポイントツーポイント ネットワークはまたネットワークに送信 されるべきブロードキャストかマルチキャスト パケットを可能にしこれらのネットワークはセグメントの 2 つのデバイスだけ接続します。 詳細については、『ポイントツーポイント リンクを介した OSPF の初期設定』を参照してください。
フレーム リレーなどの非ブロードキャスト マルチアクセス(NBMA):これらのネットワークは、ブロードキャストまたはマルチキャストをサポートしませんが、複数のデバイスを接続でき、マルチアクセスをサポートします。 詳細については、『非ブロードキャスト リンクを介した OSPF の初期設定』を参照してください。
ポイントツーマルチポイント:これは、セグメントのさまざまなデバイス間のポイントツーポイントリンクの集合です。 これらのネットワークでは、ネットワークを介してブロードキャストまたはマルチキャスト パケットを送信できます。 これらのネットワークは、セグメントのすべてのデバイスを接続する複数のポイントツーポイント リンクとして、マルチアクセス セグメントを表現できます。
OSPF がネットワークで使用されている場合、ルーティング情報を交換する前に、次の 2 つの重量なイベントが発生します。
マルチキャスト hello パケットを使用してネイバーが検出されます。
DR および BDR がすべてのマルチアクセス ネットワークで選択され、隣接関係の形成プロセスが最適化されます。 そのセグメントのすべてのルータは、DR および BDR と直接通信して適切な隣接関係を形成できる必要があります(ポイントツーポイント ネットワークの場合、セグメントのルータが 2 つだけで選択が行われないため、DR および BDR は必要ありません)。
セグメントのネイバー探索を正常に行うには、ネットワークで、ブロードキャストまたはマルチキャスト パケットを送信できる必要があります。
ブロードキャスト マルチアクセス レイヤ 2 トポロジでは、ブロードキャストはサポートされます。 そのため、OSPF を実行するルータは、OSPF ネイバーを自動的に検出し、DR および BDR としてルータを選択できます。これは、任意のデバイスがそのブロードキャスト セグメントの他のすべてのルータと通信できるためです。
ポイントツーポイント トポロジでは、ネイバーがポイントツーポイント リンクを介して直接相互通信され、ブロードキャストまたはマルチキャスト パケットがネットワークを介して転送されるので、ネイバーは自動的に検出されます。 ただし、前述のとおり、DR および BDR 選択は発生しません。
本質的に非ブロードキャストである、NBMA ネットワーク トポロジでは、ネイバーは自動的には検出されません。 OSPF は、ネットワークのマルチアクセス性質により、DR および BDR を選択しようとしますが、ネイバーが検出されないため選択は失敗します。 ネイバーを手動で設定して、これらの問題を解決する必要があります。 また、ハブおよびスポーク トポロジで追加設定を行い、他のすべてのスポークルータと接続するハブ ルータを DR および BDR として選択する必要があります。 または、NBMA インターフェイスで設定を変更して、このような問題のない別のネットワーク タイプであることを OSPF に通知することもできます。
OSPF が正常に動作するには、設定を正しく行う必要があります。
フレーム リレー サブインターフェイスは、次の 2 つのモードで実行できます。
ポイントツーポイント:フレーム リレー ポイントツーポイント サブインターフェイスが設定される場合、サブインターフェイスは、ポイントツーポイント ネットワークをエミュレートして、OSPF はこれをポイントツーポイント ネットワーク タイプとして扱います。
マルチポイント:フレーム リレー マルチポイント サブインターフェイスが設定される場合、OSPF はこのサブインターフェイスを NBMA ネットワーク タイプとして扱います。
Cisco IOS ソフトウェアは、ip ospf network コマンドを使用して、さまざまなモードによりインターフェイスで OSPF を柔軟に実行できます。
ip ospf network {broadcast | non-broadcast | {point-to-multipoint [non-broadcast] | point-to-point}}
このドキュメントの「設定」セクションでは、フレーム リレー ポイントツーポイント サブインターフェイスを介した OSPF の設定例、ブロードキャスト、非ブロードキャスト、ポイントツーマルチポイント ネットワークでのフレーム リレー マルチポイント サブインターフェイスを介した OSPF の設定例を提供しています。
この項では、このドキュメントで説明する機能の設定に必要な情報を提供します。
注: このドキュメントで使用されているコマンドの詳細を調べるには、Command Lookup Tool(登録ユーザ専用)を使用してください。
このドキュメントは、次に示すネットワーク構成を使用しています。
このドキュメントでは、このセクションで示す設定を使用しています。
R4-2503 |
---|
interface Loopback0 ip address 3.3.3.3 255.255.255.255 ! interface Serial0 no ip address encapsulation frame-relay !--- To enable Frame Relay encapsulation !--- on the interface. no keepalive ! interface Serial0.1 point-to-point !--- The subinterface is configured to !--- function as a point-to-point link !--- with this command. ip address 1.1.1.2 255.255.255.0 frame-relay interface-dlci 16 !--- To assign a data-link connection identifier !--- (DLCI) to a specified Frame Relay subinterface. !--- Without this command, all the DLCIs are assigned !--- to the physical interface. ! router ospf 1 network 1.1.1.0 0.0.0.255 area 0 ! |
R1-2503 |
---|
interface Loopback0 ip address 2.2.2.2 255.255.255.255 ! interface Serial0 no ip address encapsulation frame-relay !--- To enable Frame Relay encapsulation on !--- the interface. no keepalive clockrate 2000000 ! interface Serial0.1 point-to-point !--- The subinterface is configured to function !--- as a point-to-point link with this command. ip address 1.1.1.1 255.255.255.0 frame-relay interface-dlci 16 !--- To assign a data-link connection identifier !--- (DLCI) to a specified Frame Relay subinterface. !--- Without this command, all the DLCIs are !--- assigned to the physical interface. ! router ospf 1 network 1.1.1.0 0.0.0.255 area 0 ! |
ここで説明するコマンドは、確認に役立ちます。
show ip ospf neighbor:このコマンドは、OSPF ネイバー情報を表示するときに使用されます。
show ip ospf interface:このコマンドは、OSPF に関連する情報を表示するときに使用されます。
次に、これらのコマンドの出力を示します。
R4-2503# show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 2.2.2.2 1 FULL/ - 00:00:33 1.1.1.1 Serial0.1
注: この出力では、OSPF ネイバーは「FULL / -」と示されていますが、DR および BDR の状態は示されていません。 これは、ポイントツーポイント リンクでは DR および BDR 選択が行われないためです。
R4-2503# show ip ospf interface s0 %OSPF: OSPF not enabled on Serial0 R4-2503# show ip ospf interface s0.1 Serial0.1 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 oob-resync timeout 40 Hello due in 00:00:09 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) R1-2503# show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 3.3.3.3 1 FULL/ - 00:00:37 1.1.1.2 Serial0.1 R1-2503# show ip ospf interface s0 %OSPF: OSPF not enabled on Serial0 R1-2503# show ip ospf interface s0.1 Serial0.1 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 oob-resync timeout 40 Hello due in 00:00:03 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)
この設定では、ネットワーク タイプが変更され、ip ospf network broadcast コマンドでブロードキャストします。 ここで、NBMA ネットワークは、DR および BDR 選択が行われるため、ドキャスト マルチアクセス ネットワークとして表示されます。 frame relay map コマンドは、ブロードキャスト アドレスを転送するように設定されています。
R4-2503 |
---|
interface Loopback0 ip address 3.3.3.3 255.255.255.255 ! interface Serial0 no ip address encapsulation frame-relay no keepalive ! interface Serial0.2 multipoint !--- The subinterface is treated as a multipoint link. ip address 1.1.1.2 255.255.255.0 ip ospf network broadcast !--- This command is used to define the network !--- type as broadcast. The network type is defined !--- on non-broadcast networks so as to not configur !--- the neighbors explicitly. frame-relay map ip 1.1.1.1 16 broadcast !--- To define the mapping between a destination !--- protocol address and the data-link connection !--- identifier (DLCI) used to connect to the !--- destination address. The broadcast keyword !--- is used to forward broadcasts and multicasts !--- to this address. ! ! router ospf 1 network 1.1.1.0 0.0.0.255 area 0 ! |
R1-2503 |
---|
interface Loopback0 ip address 2.2.2.2 255.255.255.255 ! ! interface Serial0 no ip address encapsulation frame-relay no keepalive clockrate 2000000 ! interface Serial0.2 multipoint !--- The subinterface is treated as a multipoint link. ip address 1.1.1.1 255.255.255.0 ip ospf network broadcast !--- This command is used to define the network !--- type as broadcast. The network type is defined !--- on non-broadcast networks so as not configure !--- the neighbors explicitly. frame-relay map ip 1.1.1.2 16 broadcast !--- To define the mapping between a !--- destination protocol address and the data-link !--- connection identifier (DLCI) used to connect !--- to the destination address. The broadcast !--- keyword is used to forward broadcasts and multicasts !--- to this address. ! router ospf 1 network 1.1.1.0 0.0.0.255 area 0 ! |
注: サブインターフェイスがポイントツーポイントとして設定される場合、ルータがリロードされない限り、同じサブインターフェイスをマルチポイント サブインターフェイスとして割り当てることはできません。 この場合、別のサブインターフェイスがマルチポイント設定に使用されます。
R4-2503# show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 2.2.2.2 1 FULL/BDR 00:00:32 1.1.1.1 Serial 0.2 R4-2503# show ip ospf interface s0 %OSPF: OSPF not enabled on Serial0 R4-2503# show ip ospf interface s0.2 Serial0.2 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 BROADCAST, Cost: 64 Transmit Delay is 1 sec, State DR, Priority 1 Designated Router (ID) 3.3.3.3, Interface address 1.1.1.2 Backup Designated router (ID) 2.2.2.2, Interface address 1.1.1.1 Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 oob-resync timeout 40 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 (Backup Designated Router) Suppress hello for 0 neighbor(s) R1-2503# show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 3.3.3.3 1 FULL/DR 00:00:35 1.1.1.2 Serial0.2 R1-2503# show ip ospf interface s0 %OSPF: OSPF not enabled on Serial0 R1-2503# show ip ospf interface s0.2 Serial0.2 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 BROADCAST, Cost: 64 Transmit Delay is 1 sec, State BDR, Priority 1 Designated Router (ID) 3.3.3.3, Interface address 1.1.1.2 Backup Designated router (ID) 2.2.2.2, Interface address 1.1.1.1 Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 oob-resync timeout 40 Hello due in 00:00:01 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 (Designated Router) Suppress hello for 0 neighbor(s)
この設定では、ネットワークは非ブロードキャストで、ネイバーは自動的には検出されません。 neighbor コマンドは、手動での OSPF ネイバーの設定に使用されます。 ただし、このコマンドが必要なのは、10.0 より前のバージョンの Cisco IOS ソフトウェアだけです。 この代わりに、ip ospf network コマンドを実行して、デフォルトのネットワーク タイプを変更します(「ブロードキャスト ネットワークでのマルチポイント設定」の設定例を参照してください)。 詳細については、『OSPF 設計ガイド』の『NBMA での DR およびネイバー コマンドの回避』セクションを参照してください。 DR および BDR は、マルチアクセス性質により選択されます。
R4-2503 |
---|
interface Loopback0 ip address 3.3.3.3 255.255.255.255 ! interface Serial0 no ip address encapsulation frame-relay no keepalive ! interface Serial0.2 multipoint ip address 1.1.1.2 255.255.255.0 frame-relay map ip 1.1.1.1 16 broadcast ip ospf priority 2 !--- This command assigns a higher priority for this router on this interface, !--- so that it gets elected as the DR. In case of a Hub and Spoke topology, !--- the hub should be elected as the DR as it has connectivity to all the spokes. ! router ospf 1 network 1.1.1.0 0.0.0.255 area 0 ! |
R1-2503 |
---|
interface Loopback0 ip address 2.2.2.2 255.255.255.255 ! interface Serial0 no ip address encapsulation frame-relay no keepalive clockrate 2000000 ! interface Serial0.2 multipoint ip address 1.1.1.1 255.255.255.0 frame-relay map ip 1.1.1.2 16 broadcast ! router ospf 1 network 1.1.1.0 0.0.0.255 area 0 neighbor 1.1.1.2 !--- Used to manually configure neighbors. |
R4-2503# show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 2.2.2.2 1 FULL/BDR 00:01:56 1.1.1.1 Serial0.2 R4-2503# show ip ospf interface s0 %OSPF: OSPF not enabled on Serial0 R4-2503# show ip ospf interface s0.2 Serial0.2 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 NON_BROADCAST, Cost: 64 Transmit Delay is 1 sec, State DR,Priority 2 Designated Router (ID) 3.3.3.3, Interface address 1.1.1.2 Backup Designated router (ID) 2.2.2.2, Interface address 1.1.1.1 Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5 oob-resync timeout 40 Hello due in 00:00:25 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 (Backup Designated Router) Suppress hello for 0 neighbor(s) R1-2503# show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 3.3.3.3 2 FULL/DR 00:01:52 1.1.1.2 Serial0.2 R1-2503# show ip ospf interface s0 %OSPF: OSPF not enabled on Serial0 R1-2503# show ip ospf interface s0.2 Serial0.2 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 NON_BROADCAST, Cost: 64 Transmit Delay is 1 sec, State BDR, Priority 1 Designated Router (ID) 3.3.3.3, Interface address 1.1.1.2 Backup Designated router (ID) 2.2.2.2, Interface address 1.1.1.1 Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5 oob-resync timeout 40 Hello due in 00:00:01 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 (Designated Router) Suppress hello for 0 neighbor(s)
この設定では、ネットワーク タイプは、ポイントツーポイント リンクの集合として機能するように、ip ospf network point-to-multipoint コマンドを使用して変更されます。 ネイバーは自動的に検出され、DR および BDR 選択は行われません。
R4-2503 |
---|
interface Loopback0 ip address 3.3.3.3 255.255.255.255 ! interface Serial0 no ip address encapsulation frame-relay no keepalive ! interface Serial0.2 multipoint ip address 1.1.1.2 255.255.255.0 ip ospf network point-to-multipoint !--- To configure an interface as !--- point-to-multipoint for non-broadcast media. frame-relay map ip 1.1.1.1 16 broadcast ! ! router ospf 1 network 1.1.1.0 0.0.0.255 area 0 ! |
R1-2503 |
---|
interface Loopback0 ip address 2.2.2.2 255.255.255.255 ! interface Serial0 no ip address encapsulation frame-relay no keepalive clockrate 2000000 ! interface Serial0.2 multipoint ip address 1.1.1.1 255.255.255.0 ip ospf network point-to-multipoint !--- To configure an interface as !--- point-to-multipoint for non-broadcast media. frame-relay map ip 1.1.1.2 16 broadcast ! router ospf 1 network 1.1.1.0 0.0.0.255 area 0 ! |
R4-2503# show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 2.2.2.2 1 FULL/ - 00:01:58 1.1.1.1 Serial0.2 R4-2503# show ip ospf interface s0 %OSPF: OSPF not enabled on Serial0 R4-2503# show ip ospf interface s0.2 Serial2.1 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_MULTIPOINT, Cost: 64 Transmit Delay is 1 sec, State POINT_TO_MULTIPOINT, Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5 oob-resync timeout 40 Hello due in 00:00:07 Index 1/1, flood queue length 0 Next 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) R1-2503# show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 3.3.3.3 1 FULL/ - 00:01:49 1.1.1.2 Serial0.2 R1-2503# show ip ospf interface s0 %OSPF: OSPF not enabled on Serial0 R1-2503# show ip ospf interface s0.2 Serial0.2 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_MULTIPOINT, Cost: 64 Transmit Delay is 1 sec, State POINT_TO_MULTIPOINT, Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5 oob-resync timeout 40 Hello due in 00:00:00 Index 1/1, flood queue length 0 Next 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 3.3.3.3 Suppress hello for 0 neighbor(s)
設定を確認するには、このドキュメントの「設定」セクションにあるサブセクションを参照してください。
ここでは、設定のトラブルシューティングに役立つ情報について説明します。
NBMA ネットワークで OSPF ネイバー関連の問題をトラブルシューティングする前に、NBMA ネットワークが、ip ospf network コマンドにより次のモードに設定できることを確認してください。
ポイントツーポイント
ポイントツーマルチポイント
ブロードキャスト
NBMA
各モードの Hello およびデッド インターバルについては、次の表で説明します。
ネットワーク タイプ | Hello インターバル(秒) | デッド インターバル(秒) |
---|---|---|
ポイントツーポイント | 10 | 40 |
ポイントツーマルチポイント | 30 | 120 |
ブロードキャスト | 10 | 40 |
Non-broadcast | 30 | 120 |
OSPF が、フレーム リレーなどの非ブロードキャスト マルチアクセス トポロジの物理インターフェイス(たとえば、インターフェイス S0)で設定されている場合、NON_BROADCAST のデフォルト ネットワーク タイプが割り当てられます。 OSPF がポイントツーポイント サブインターフェイスで設定されている場合、POINT_TO_POINT のデフォルト インターフェイス タイプが割り当てられます。 OSPF がマルチポイント サブインターフェイスで設定されている場合、NON_BROADCAST のデフォルト インターフェイス タイプが割り当てられます。
NBMA ネットワークが、異なるルータの物理および論理インターフェイス(サブインターフェイス)の組み合わせで構成されている場合、異なる OSPF ネットワーク タイプが割り当てられます。 このような場合、Hello の不一致が発生する可能性があるため、 OSPF 隣接関係は形成されません。
OSPF のトラブルシューティングの詳細については、『フレーム リレーを介した NBMA モードでの OSPF 実行に関する問題』および『OSPF のトラブルシューティング』を参照してください。