はじめに
このドキュメントでは、インターフェイスで IPv6 の Open Shortest Path First(OSPF)バージョン 3 を有効にする方法について説明します。
前提条件
要件
インターフェイスでOSPF for IPv6を有効にする前に、次の作業を行う必要があります。
-
ご使用の IPv6 ネットワークに対する OSPF ネットワーク戦略と計画を完成させます。たとえば、複数のエリアが必要かどうかを決定します。
-
IPv6 ユニキャスト ルーティングをイネーブルにします。
-
インターフェイスで IPv6 をイネーブルにします。
-
OSPF for IPv6 で IP Security(IPsec; IP セキュリティ)セキュア ソケット Application Program Interface(API; アプリケーション プログラム インターフェイス)を設定して、認証および暗号化をイネーブルにします。
使用するコンポーネント
このドキュメントの内容は、特定のソフトウェアやハードウェアのバージョンに限定されるものではありません。
このドキュメントの情報は、特定のラボ環境にあるデバイスに基づいて作成されました。このドキュメントで使用するすべてのデバイスは、クリアな(デフォルト)設定で作業を開始しています。本稼働中のネットワークでは、各コマンドによって起こる可能性がある影響を十分確認してください。
表記法
表記法の詳細については、『シスコ テクニカル ティップスの表記法』を参照してください。
背景説明
Open Shortest Path First(OSPF)は、IP のルーティング プロトコルです。これは、ディスタンスベクトル プロトコルとは異なり、リンクステート プロトコルです。
リンクステート プロトコルでは、送信元マシンと宛先マシンを接続するリンクのステートに基づいて、ルートを選択します。
リンクの状態とは、そのインターフェイスの説明と、そのネイバーネットワークデバイスとの関係です。
インターフェイスの情報には、たとえば、インターフェイスの IPv6 プレフィクス、ネットワーク マスク、接続先のネットワークのタイプ、そのネットワークに接続されているルータなどが含まれます。
この情報は、さまざまなタイプの Link-State Advertisement(LSA; リンクステート アドバタイズメント)に伝搬されます。 RFC 2740 で説明されている OSPF バージョン 3 は、IPv6 をサポートしています。
設定
このセクションでは、このドキュメントで説明する機能を設定するために必要な情報を提供しています。
注:このドキュメントで使用されているコマンドの詳細を調べるには、Command Lookup Tool /a>を使用してください。
注:シスコの内部ツールおよび情報にアクセスできるのは、シスコの登録ユーザーのみです。
ネットワーク図
このドキュメントでは、次のネットワーク セットアップを使用します。
ネットワーク図
コンフィギュレーション
次に、図に示されているルータの OSPFv3 の設定を示します。
スタブ ルータ |
ipv6 unicast-routing
ipv6 cef
!
interface GigabitEthernet0/0
no ip address
ipv6 address FD01:ABAB::/64 eui-64 ipv6 enable
ipv6 ospf 1 area 2 ipv6 ospf network point-to-point
!
ipv6 router ospf 1
router-id 10.3.3.3
area 2 stub
!
|
ABR1 ルータ |
ipv6 unicast-routing
ipv6 cef
!
interface GigabitEthernet1
no ip address
speed auto
ipv6 address FD03::1/124
ipv6 enable
ipv6 ospf 1 area 0
!
interface GigabitEthernet2
no ip address
ipv6 address FD02:ABAB::/64 eui-64
ipv6 enable
ipv6 ospf 1 area 2 ipv6 ospf network point-to-point
!
ipv6 router ospf 1
router-id 10.1.1.1
area 2 stub no-summary
!
|
ASBR ルータ |
ipv6 unicast-routing
ipv6 cef
!
interface GigabitEthernet1
no ip address
ipv6 address FD03::2/124
ipv6 enable
ipv6 ospf 1 area 0
!
interface GigabitEthernet2
no ip address
ipv6 address FD03::1:1/124
ipv6 enable
ipv6 rip EXT enable
!
ipv6 router ospf 1
router-id 10.2.2.2
default-metric 25
redistribute rip EXT metric-type 1 include-connected
!
ipv6 router rip EXT
redistribute ospf 1 match internal external 1 external 2 include-connected
! |
外部ルータ |
ipv6 unicast-routing ipv6 cef
!
interface Loopback0
no ip address
ipv6 address FD04:ABAB::/64 eui-64
ipv6 enable
ipv6 rip EXT enable
!
interface GigabitEthernet0/0
no ip address
ipv6 address FD03::1:2/124
ipv6 enable
ipv6 rip EXT enable
!
ipv6 router rip EXT
|
確認
このセクションでは、設定が正常に動作していることを確認します。
アウトプットインタープリタツールでは、特定のshowコマンドがサポートされています。OIT を使用して show コマンド出力の解析を表示します。
show ipv6 ospf database コマンドは、ルータの Link State Database(LSDB; リンクステート データベース)を表示します。
注:シスコの内部ツールおよび情報にアクセスできるのは、登録済みのシスコユーザーのみです。
Stub_Router#show ipv6 ospf database
OSPFv3 Router with ID (10.3.3.3) (Process ID 1)
Router Link States (Area 2)
ADV Router Age Seq# Fragment ID Link count Bits
10.1.1.1 5 0x8000000F 0 1 B
10.3.3.3 38 0x8000000E 0 1 None
Inter Area Prefix Link States (Area 2)
ADV Router Age Seq# Prefix
10.1.1.1 5 0x80000002 ::/0
Link (Type-8) Link States (Area 2)
ADV Router Age Seq# Link ID Interface
10.1.1.1 5 0x8000000A 8 Gi0/0
10.3.3.3 292 0x80000005 2 Gi0/0
Intra Area Prefix Link States (Area 2)
ADV Router Age Seq# Link ID Ref-lstype Ref-LSID
10.1.1.1 5 0x8000000B 0 0x2001 0
10.3.3.3 548 0x80000002 0 0x2001 0
show ipv6 ospf database routerコマンドは、ルータが発信および受信するルータLSAを表示します。ルータ LSA は、アドレスまたはプレフィクスの情報は伝送しません。
Stub_Router#show ipv6 ospf database router
OSPFv3 Router with ID (10.3.3.3) (Process ID 1)
Router Link States (Area 2)
Routing Bit Set on this LSA
LS age: 141
Options: (V6-Bit, R-Bit, DC-Bit)
LS Type: Router Links
Link State ID: 0
Advertising Router: 10.1.1.1
LS Seq Number: 8000000F
Checksum: 0x9C2C
Length: 40
Area Border Router
Number of Links: 1
Link connected to: another Router (point-to-point)
Link Metric: 1
Local Interface ID: 8
Neighbor Interface ID: 2
Neighbor Router ID: 10.3.3.3
LS age: 174
Options: (V6-Bit, R-Bit, DC-Bit)
LS Type: Router Links
Link State ID: 0
Advertising Router: 10.3.3.3
LS Seq Number: 8000000E
Checksum: 0xBBF
Length: 40
Number of Links: 1
Link connected to: another Router (point-to-point)
Link Metric: 1
Local Interface ID: 2
Neighbor Interface ID: 8
Neighbor Router ID: 10.1.1.1
LSA は、次のビットを持つオプション フィールドを伝送します。
-
V6ビット:ルーティング計算にルータおよびリンクを使用する必要があるかどうかを示します。
-
Rビット:「ルータビット」です。 送信元がアクティブ ルータかどうかを示します。
-
DCビット:ルータのデマンド回線の処理方法を示します。
show ipv6 ospf database link self-originate コマンドは、リンクLSAがリンク固有のアドレスを伝送していることを示します。
Stub_Router#show ipv6 ospf database link self-originate
OSPFv3 Router with ID (10.3.3.3) (Process ID 1)
Link (Type-8) Link States (Area 2)
LS age: 650
Options: (V6-Bit, R-Bit, DC-Bit)
LS Type: Link-LSA (Interface: GigabitEthernet0/0)
Link State ID: 2 (Interface ID)
Advertising Router: 10.3.3.3
LS Seq Number: 80000005
Checksum: 0x8578
Length: 56
Router Priority: 1
Link Local Address: FE80::5054:FF:FE00:3A
Number of Prefixes: 1
Prefix Address: FD01:ABAB::
Prefix Length: 64, Options: None
スタブ ルータは完全エリアに属しているため、ABR1 ルータはスタブ ルータにデフォルトのルートのみを送信します。
Stub_Router#show ipv6 route
IPv6 Routing Table - default - 5 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
B - BGP, HA - Home Agent, MR - Mobile Router, R - RIP
H - NHRP, I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea
IS - ISIS summary, D - EIGRP, EX - EIGRP external, NM - NEMO
ND - ND Default, NDp - ND Prefix, DCE - Destination, NDr - Redirect
RL - RPL, O - OSPF Intra, OI - OSPF Inter, OE1 - OSPF ext 1
OE2 - OSPF ext 2, ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
la - LISP alt, lr - LISP site-registrations, ld - LISP dyn-eid
lA - LISP away, a - Application
OI ::/0 [110/2] via FE80::5054:FF:FE00:15, GigabitEthernet0/0
C FD01:ABAB::/64 [0/0]
via GigabitEthernet0/0, directly connected
L FD01:ABAB::5054:FF:FE00:3A/128 [0/0]
via GigabitEthernet0/0, receive
O FD02:ABAB::/64 [110/2]
via FE80::5054:FF:FE00:15, GigabitEthernet0/0
L FF00::/8 [0/0]
via Null0, receive
ABR1 ルータは、エリア境界ルータです。
ABR1#show ipv6 ospf
Routing Process "ospfv3 1" with ID 10.1.1.1
Supports NSSA (compatible with RFC 3101)
Supports Database Exchange Summary List Optimization (RFC 5243)
Event-log enabled, Maximum number of events: 1000, Mode: cyclic
It is an area border router
Router is not originating router-LSAs with maximum metric
Initial SPF schedule delay 50 msecs
Minimum hold time between two consecutive SPFs 200 msecs
Maximum wait time between two consecutive SPFs 5000 msecs
Initial LSA throttle delay 50 msecs
Minimum hold time for LSA throttle 200 msecs
Maximum wait time for LSA throttle 5000 msecs
Minimum LSA arrival 100 msecs
LSA group pacing timer 240 secs
Interface flood pacing timer 33 msecs
Retransmission pacing timer 66 msecs
Retransmission limit dc 24 non-dc 24
EXCHANGE/LOADING adjacency limit: initial 300, process maximum 300
Number of external LSA 2. Checksum Sum 0x011699
Number of areas in this router is 2. 1 normal 1 stub 0 nssa
Graceful restart helper support enabled
Reference bandwidth unit is 100 mbps
RFC1583 compatibility enabled
Area BACKBONE(0)
Number of interfaces in this area is 1
SPF algorithm executed 17 times
Number of LSA 8. Checksum Sum 0x05579B
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
Flood list length 0
Area 2
Number of interfaces in this area is 1
It is a stub area, no summary LSA in this area
Generates stub default route with cost 1
SPF algorithm executed 20 times
Number of LSA 7. Checksum Sum 0x0380EA
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
Flood list length 0
ABR1 ルータは、ASBR ルータから外部ルート(RIP ルート)を受信します。
ABR1#show ipv6 route
IPv6 Routing Table - default - 8 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
B - BGP, R - RIP, H - NHRP, 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, RL - RPL, O - OSPF Intra, OI - OSPF Inter
OE1 - OSPF ext 1, OE2 - OSPF ext 2, ON1 - OSPF NSSA ext 1
ON2 - OSPF NSSA ext 2, la - LISP alt, lr - LISP site-registrations
ld - LISP dyn-eid, lA - LISP away, le - LISP extranet-policy
lp - LISP publications, a - Application, m - OMP
O FD01:ABAB::/64 [110/2]
via FE80::5054:FF:FE00:3A, GigabitEthernet2
C FD02:ABAB::/64 [0/0]
via GigabitEthernet2, directly connected
L FD02:ABAB::5054:FF:FE00:15/128 [0/0]
via GigabitEthernet2, receive
C FD03::/124 [0/0]
via GigabitEthernet1, directly connected
L FD03::1/128 [0/0]
via GigabitEthernet1, receive
OE1 FD03::1:0/124 [110/26] via FE80::5054:FF:FE00:3E, GigabitEthernet1 OE1 FD04:ABAB::/64 [110/26] via FE80::5054:FF:FE00:3E, GigabitEthernet1
L FF00::/8 [0/0]
via Null0, receive
ASBR ルータは、ネットワークの自律システム境界ルータです。これは、シリアル 0/0 インターフェイスを経由して RIP ネットワークに接続しています。
ASBR#show ipv6 ospf
Routing Process "ospfv3 1" with ID 10.2.2.2
Supports NSSA (compatible with RFC 3101)
Supports Database Exchange Summary List Optimization (RFC 5243)
Event-log enabled, Maximum number of events: 1000, Mode: cyclic
It is an autonomous system boundary router
Redistributing External Routes (with default metric 25) from,
rip EXT with metric-type 1 include-connected
Router is not originating router-LSAs with maximum metric
Initial SPF schedule delay 50 msecs
Minimum hold time between two consecutive SPFs 200 msecs
Maximum wait time between two consecutive SPFs 5000 msecs
Initial LSA throttle delay 50 msecs
Minimum hold time for LSA throttle 200 msecs
Maximum wait time for LSA throttle 5000 msecs
Minimum LSA arrival 100 msecs
LSA group pacing timer 240 secs
Interface flood pacing timer 33 msecs
Retransmission pacing timer 66 msecs
Retransmission limit dc 24 non-dc 24
EXCHANGE/LOADING adjacency limit: initial 300, process maximum 300
Number of external LSA 2. Checksum Sum 0x011699
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Graceful restart helper support enabled
Reference bandwidth unit is 100 mbps
RFC1583 compatibility enabled
Area BACKBONE(0)
Number of interfaces in this area is 1
SPF algorithm executed 10 times
Number of LSA 8. Checksum Sum 0x05579B
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
Flood list length 0
ASBR#show ipv6 rip
RIP process "EXT", port 521, multicast-group FF02::9, pid 678
Administrative distance is 120. Maximum paths is 16
Updates every 30 seconds, expire after 180
Holddown lasts 0 seconds, garbage collect after 120
Split horizon is on; poison reverse is off
Default routes are not generated
Periodic updates 267, trigger updates 11
Full Advertisement 1, Delayed Events 0
Interfaces:
GigabitEthernet2
Redistribution:
Redistributing protocol ospf 1 with transparent metric (internal, external 1 & 2, ) include-connected
トラブルシュート
ここでは、設定に関するトラブルシューティングについて説明します。
注:debug コマンドを使用する前に、『debug コマンドの重要な情報』を参照してください。
debug ipv6
スタブ ルータで OSPFv3 がイネーブルになると、OSPFv3 タイプ 1 hello メッセージがただちに FF02::5 マルチキャスト アドレスに送信されます。ABR1ルータからHelloパケットを受信すると、ルータはプライマリ/セカンダリ関係をネゴシエートし、DBDパケットの送信を開始します。
Stub_Router#debug ipv6 ospf events
Stub_Router#debug ipv6 ospf packet
Stub_Router#debug ipv6 ospf adj
*Mar 8 17:47:01.324: OSPFv3-1-IPv6 PAK : Gi0/0: OUT: FE80::5054:FF:FE00:3A->FF02::5: ver:3 type:1 len:36 rid:10.3.3.3 area:0.0.0.2 chksum:A0F9 inst:0
*Mar 8 17:47:03.307: OSPFv3-1-IPv6 PAK : Gi0/0: IN: FE80::5054:FF:FE00:15->FF02::5: ver:3 type:1 len:36 rid:10.1.1.1 area:0.0.0.2 chksum:A31C inst:0
*Mar 8 17:47:03.308: OSPFv3-1-IPv6 ADJ Gi0/0: Added 10.1.1.1 to nbr list
*Mar 8 17:47:03.308: OSPFv3-1-IPv6 PAK : Gi0/0: OUT: FE80::5054:FF:FE00:3A->FE80::5054:FF:FE00:15: ver:3 type:1 len:40 rid:10.3.3.3 area:0.0.0.2 chksum:470D inst:0
*Mar 8 17:47:03.320: OSPFv3-1-IPv6 PAK : Gi0/0: IN: FE80::5054:FF:FE00:15->FE80::5054:FF:FE00:3A: ver:3 type:1 len:40 rid:10.1.1.1 area:0.0.0.2 chksum:4707 inst:0
*Mar 8 17:47:03.321: OSPFv3-1-IPv6 ADJ Gi0/0: 2 Way Communication to 10.1.1.1, state 2WAY
*Mar 8 17:47:03.321: OSPFv3-1-IPv6 ADJ Gi0/0: Nbr 10.1.1.1: Prepare dbase exchange
*Mar 8 17:47:03.322: OSPFv3-1-IPv6 ADJ Gi0/0: Send DBD to 10.1.1.1 seq 0x983C9C0 opt 0x11 flag 0x7 len 28
*Mar 8 17:47:03.322: OSPFv3-1-IPv6 PAK : Gi0/0: OUT: FE80::5054:FF:FE00:3A->FE80::5054:FF:FE00:15: ver:3 type:2 len:28 rid:10.3.3.3 area:0.0.0.2 chksum:7A33 inst:0
*Mar 8 17:47:03.328: OSPFv3-1-IPv6 PAK : Gi0/0: IN: FE80::5054:FF:FE00:15->FE80::5054:FF:FE00:3A: ver:3 type:2 len:148 rid:10.1.1.1 area:0.0.0.2 chksum:141A inst:0
*Mar 8 17:47:03.329: OSPFv3-1-IPv6 ADJ Gi0/0: Rcv DBD from 10.1.1.1 seq 0x983C9C0 opt 0x11 flag 0x2 len 148 mtu 1500 state EXSTART
*Mar 8 17:47:03.330: OSPFv3-1-IPv6 ADJ Gi0/0: NBR Negotiation Done. We are the MASTER
*Mar 8 17:47:03.330: OSPFv3-1-IPv6 ADJ Gi0/0: Nbr 10.1.1.1: Summary list built, size 7
*Mar 8 17:47:03.331: OSPFv3-1-IPv6 ADJ Gi0/0: Send DBD to 10.1.1.1 seq 0x983C9C1 opt 0x11 flag 0x1 len 128
*Mar 8 17:47:03.331: OSPFv3-1-IPv6 PAK : Gi0/0: OUT: FE80::5054:FF:FE00:3A->FE80::5054:FF:FE00:15: ver:3 type:2 len:128 rid:10.3.3.3 area:0.0.0.2 chksum:F771 inst:0
*Mar 8 17:47:03.334: OSPFv3-1-IPv6 PAK : Gi0/0: IN: FE80::5054:FF:FE00:15->FE80::5054:FF:FE00:3A: ver:3 type:3 len:64 rid:10.1.1.1 area:0.0.0.2 chksum:C6FA inst:0
*Mar 8 17:47:03.335: OSPFv3-1-IPv6 PAK : Gi0/0: IN: FE80::5054:FF:FE00:15->FE80::5054:FF:FE00:3A: ver:3 type:2 len:28 rid:10.1.1.1 area:0.0.0.2 chksum:7C3D inst:0
DBD パケットが交換されると、ルータ間で Link-State Request(LS REQ; リンクステート要求)および Link-State Update(LS UPD; リンクステート アップデート)メッセージが送信され、LSDB が確立されます。連続した LS REQ および LS UPD メッセージの後、ステートが FULL に到達すると、ルータは続けて hello パケットを交換します。
Stub_Router#
*Mar 8 17:47:03.337: OSPFv3-1-IPv6 ADJ Gi0/0: Rcv LS REQ from 10.1.1.1 length 64 LSA count 4
*Mar 8 17:47:03.337: OSPFv3-1-IPv6 ADJ Gi0/0: Send LS UPD to FE80::5054:FF:FE00:15 length 172 LSA count 4
*Mar 8 17:47:03.338: OSPFv3-1-IPv6 PAK : Gi0/0: OUT: FE80::5054:FF:FE00:3A->FE80::5054:FF:FE00:15: ver:3 type:4 len:172 rid:10.3.3.3 area:0.0.0.2 chksum:D2CE inst:0
*Mar 8 17:47:03.339: OSPFv3-1-IPv6 ADJ Gi0/0: Rcv DBD from 10.1.1.1 seq 0x983C9C1 opt 0x11 flag 0x0 len 28 mtu 1500 state EXCHANGE
*Mar 8 17:47:03.339: OSPFv3-1-IPv6 ADJ Gi0/0: Exchange Done with 10.1.1.1
*Mar 8 17:47:03.340: OSPFv3-1-IPv6 ADJ Gi0/0: Send LS REQ to 10.1.1.1 length 40
*Mar 8 17:47:03.340: OSPFv3-1-IPv6 PAK : Gi0/0: OUT: FE80::5054:FF:FE00:3A->FE80::5054:FF:FE00:15: ver:3 type:3 len:40 rid:10.3.3.3 area:0.0.0.2 chksum:FD46 inst:0
*Mar 8 17:47:03.343: OSPFv3-1-IPv6 PAK : Gi0/0: IN: FE80::5054:FF:FE00:15->FE80::5054:FF:FE00:3A: ver:3 type:4 len:72 rid:10.1.1.1 area:0.0.0.2 chksum:825E inst:0
*Mar 8 17:47:03.345: OSPFv3-1-IPv6 ADJ Gi0/0: Rcv LS UPD from Nbr ID 10.1.1.1 length 72 LSA count 2
*Mar 8 17:47:03.345: OSPFv3-1-IPv6 ADJ Gi0/0: Synchronized with 10.1.1.1, state FULL
*Mar 8 17:47:03.346: %OSPFv3-5-ADJCHG: Process 1, Nbr 10.1.1.1 on GigabitEthernet0/0 from LOADING to FULL, Loading Done
関連情報