「IPv4 使いのための IPv6 入門」の版間の差分

提供: hkatou_Lab
ナビゲーションに移動 検索に移動
 
(同じ利用者による、間の32版が非表示)
1行目: 1行目:
1981 年に IPv6 が最初にプロトコルとして制定されてから、40 年以上経過していますが、まだまだ苦手に思っている人が多いのではないかと思います。
+
1981 年に IPv6 が最初にプロトコルとして制定されてから、40 年以上経過し、2011 年 6 月には World IPv6 Day が行われ 10 年以上が経過しました。
  
このページでは IPv4 が使える人向けに、ISP の NW で IPv6 を導入・設計・運用するための情報を扱います。
+
しかしながら ISP を除いてまだまだ案件が多い状況とは言い難く、苦手に思っている人が多いのではないかと思います。
 +
 
 +
このページでは IPv4 が使える人向けに、ISP の NW で IPv6 を構築するための情報を扱います。
 +
 
 +
= ターゲット =
 +
IPv4 はだいたい設計・検証・構築できるけど、IPv6 に自信がない人向けです。
 +
 
 +
エンタープライズは範囲外で、主に ISP 向けの NW です。
  
 
= 扱うプロトコル =
 
= 扱うプロトコル =
 
BGP
 
BGP
 +
 +
OSPFv2
  
 
OSPFv3
 
OSPFv3
  
ICMPv6
+
DHCP
 +
 
 +
DHCPv6
 +
 
 +
ICMPv6 ND RA (Neighbor Discovery Router Advertisement)
  
 
= ドキュメント =
 
= ドキュメント =
18行目: 31行目:
 
内容は網羅的になっていますので、最初からすべて読まなくても大丈夫です。
 
内容は網羅的になっていますので、最初からすべて読まなくても大丈夫です。
  
まずは目次からどのような機能があるのか、ざっと把握するようにして、辞書を引いて活用できるような状態を目指します。
+
まずは目次からどのような機能があるのか、ざっと把握するようにして、辞書を引くように上記のドキュメントやコンフィギュレーション ガイドなどの情報を活用できるような状態を目指します。
  
 
= ラボ =
 
= ラボ =
26行目: 39行目:
  
 
ドキュメントを読んでも思ったようには動かせません。設定した通りに動きます。(動かせない)
 
ドキュメントを読んでも思ったようには動かせません。設定した通りに動きます。(動かせない)
 +
 +
 +
次の段落以降で、筆者が作成した EVE-NG + Cisco CSR1000V で作成したラボの情報を記載します。
 +
 +
= IPv6 で知っておいたほうが良いこと =
 +
 +
* ARP の役割は、ICMPv6 が行う
 +
 +
* DHCP の役割は、DHCPv6 + ICMPv6 ND RA (Neighbor Discovery Router Advertisement) が行う
  
 
= IP アドレッシング =
 
= IP アドレッシング =
33行目: 55行目:
  
 
* 192.0.2.0/24 (TEST-NET-1) : LAN 用プライベート IP
 
* 192.0.2.0/24 (TEST-NET-1) : LAN 用プライベート IP
 +
** /30 に分割して、OSPF P2P に使用
 
* 198.51.100.0/24 (TEST-NET-2) : 内部用グローバル IP
 
* 198.51.100.0/24 (TEST-NET-2) : 内部用グローバル IP
 +
** 198.51.100.0/25 : CPE に使用
 +
** 198.51.100.128/25 : /32 単位で Loopback アドレスに使用
 
* 203.0.113.0/24 (TEST-NET-3) : 外部用グローバル IP
 
* 203.0.113.0/24 (TEST-NET-3) : 外部用グローバル IP
 +
** BGP-PE に割り当て
 +
** 疎通確認の宛先に使用
  
 
=== IPv6 ===
 
=== IPv6 ===
 
+
IPv6 は文書用アドレスが /32 1 つしかないため、/48 で複数にサブネット分割して使用します。
 
* 2001:db8::/32
 
* 2001:db8::/32
 +
** 2001:db8:203::/48 : BGP-PE
 +
** 2001:db8:192::/48 : OSPF P2P
 +
** 2001:db8:198::/48 : CPE
 +
** 2001:db8:254::/48 : Loopback
  
 
{| class="wikitable"
 
{| class="wikitable"
51行目: 82行目:
 
!IPv6 Host
 
!IPv6 Host
 
!BGP IPv6 広報アドレス
 
!BGP IPv6 広報アドレス
 +
!備考
 
|-
 
|-
 
| rowspan="2" |BGP-PE
 
| rowspan="2" |BGP-PE
60行目: 92行目:
 
|::88
 
|::88
 
|  -
 
|  -
 +
|BGP / OSPF ルータ ID と疎通確認に使用
 +
CPE からここに ping する
 
|-
 
|-
 
|Gi1
 
|Gi1
68行目: 102行目:
 
|:1
 
|:1
 
|2001:db8:203::/48
 
|2001:db8:203::/48
 +
| rowspan="2" |BGP P2P セグメント
 +
WAN 用ですべてのホストから疎通可能
 
|-
 
|-
 
| rowspan="3" |BGP-CE
 
| rowspan="3" |BGP-CE
86行目: 122行目:
 
|:254
 
|:254
 
|  -
 
|  -
 +
|BGP / OSPF ルータ ID と疎通確認に使用
 
|-
 
|-
 
|Gi1
 
|Gi1
94行目: 131行目:
 
|:1
 
|:1
 
|  -
 
|  -
 +
| rowspan="2" |OSPF P2P セグメント
 +
LAN 用で BGP-PE には疎通不可
 
|-
 
|-
 
| rowspan="3" |Core
 
| rowspan="3" |Core
109行目: 148行目:
 
|:253
 
|:253
 
|  -
 
|  -
 +
|OSPF ルータ ID と疎通確認に使用
 
|-
 
|-
 
|Gi1
 
|Gi1
117行目: 157行目:
 
|:1
 
|:1
 
|  -
 
|  -
 +
|
 
|-
 
|-
 
|CPE
 
|CPE
124行目: 165行目:
 
|:11
 
|:11
 
|  -
 
|  -
 +
|グローバル IP を模擬
 +
BGP-PE までアクセスさせる
 
|}
 
|}
  
130行目: 173行目:
  
 
= 要件 =
 
= 要件 =
BGP-PE Lo0 と CPE Gi4 が IPv4 と IPv6 で通信できること。
+
各機器の Lo0 同士で疎通できること。
 +
 
 +
最終的に BGP-PE Lo0 と CPE Gi4 が IPv4 と IPv6 で通信できること。
  
 
どのコマンドで正常性が確認できるか洗い出すこと。
 
どのコマンドで正常性が確認できるか洗い出すこと。
  
= サンプルコンフィグ =
+
= 疎通確認 =
IPv4 IPv6 でコンフィグを比較します。
+
最終的に以下の疎通が取れるのが想定になります。
 +
{| class="wikitable"
 +
|+ping / traceroute
 +
!host
 +
!IPv4
 +
!IPv6
 +
!備考
 +
|-
 +
|CPE
 +
|'''ping 203.0.113.88'''
 +
Type escape sequence to abort.
  
例示しているコンフィグは、IPv4 と IPv6 でそれぞれ抜き出しているため、実際には混合されて show running-config で表示されます。
+
Sending 5, 100-byte ICMP Echos to 203.0.113.88, timeout is 2 seconds:
  
== BGP コンフィグ ==
+
<nowiki>!!!!!</nowiki>
  
=== BGP 要件 ===
+
Success rate is 100 percent (5/5), round-trip min/avg/max = 2/2/3 ms
IPv4 IPv6 デュアル スタックで設定します。
 
  
疎通するために最低限の設定を行います。
 
  
* グローバル IP を BGP で対向 AS に広報します
+
'''traceroute 203.0.113.88'''
  
=== IPv4 IPv6 コンフィギュレーション比較 ===
+
Type escape sequence to abort.
{| class="wikitable"
 
|+IPv4 vs IPv6
 
!host
 
!IPv4
 
!IPv6
 
!備考
 
|-
 
|BGP-PE
 
|ip routing
 
<nowiki>!</nowiki>
 
  
interface GigabitEthernet1
+
Tracing the route to 203.0.113.88
  
description BGP-CE_Gi4
+
VRF info: (vrf in name/id, vrf out name/id)
  
ip address 203.0.113.1 255.255.255.252
+
  1 198.51.100.1 1 msec 2 msec 2 msec
  
 +
  2 192.0.2.1 2 msec 3 msec 2 msec
  
 +
  3 203.0.113.1 5 msec *  4 msec
 +
|'''ping 2001:DB8:203:88::88'''
 +
Type escape sequence to abort.
  
<nowiki>!</nowiki>
+
Sending 5, 100-byte ICMP Echos to 2001:DB8:203:88::88, timeout is 2 seconds:
  
router bgp 203
+
<nowiki>!!!!!</nowiki>
  
bgp router-id 203.0.113.88
+
Success rate is 100 percent (5/5), round-trip min/avg/max = 2/2/3 ms
  
bgp log-neighbor-changes
 
  
neighbor 203.0.113.2 remote-as 198
+
'''traceroute 2001:DB8:203:88::88'''
  
<nowiki>!</nowiki>
+
Type escape sequence to abort.
  
address-family ipv4
+
Tracing the route to 2001:DB8:203:88::88
  
  network 0.0.0.0
+
  1 2001:DB8:198::1 3 msec 2 msec 2 msec
  
  network 203.0.113.0
+
  2 2001:DB8:192::1 3 msec 3 msec 2 msec
  
  no neighbor 2001:DB8:203::2 activate
+
  3 2001:DB8:203::1 4 msec 4 msec 4 msec
 +
|
 +
|}
  
  neighbor 203.0.113.2 activate
+
= サンプルコンフィグ =
 +
IPv4 と IPv6 でコンフィグを比較します。
  
  neighbor 203.0.113.2 soft-reconfiguration inbound
+
例示しているコンフィグは、IPv4 と IPv6 でそれぞれ抜き出しているため、実際には混合されて show running-config で表示されます。
  
 +
各プロトコルのコンフィグは、デフォルトで表示されないようにしてあるため、ラボで試してできないときに見てみると良いと思います。
  
  default-information originate
+
== BGP コンフィグ ==
  
exit-address-family
+
=== BGP 要件 ===
 +
IPv4 IPv6 デュアル スタックで設定します。router-id を Lo0 のアドレスで設定してください。
  
<nowiki>!</nowiki>
+
疎通するための設定を行います。
  
ip route 0.0.0.0 0.0.0.0 Null0 254
+
* グローバル IP を BGP で対向 AS に広報します
 +
* アドレスファミリは IPv4 , IPv6 それぞれに設定します
 +
以下が達成できること。
  
ip route 203.0.113.0 255.255.255.0 Null0 254
+
* BGP-PE Lo0 と BGP-CE Lo0 間で ping 疎通が成功すること
|ipv6 unicast-routing
 
<nowiki>!</nowiki>
 
  
interface GigabitEthernet1
+
=== IPv4 IPv6 コンフィギュレーション比較 ===
 +
{| class="wikitable mw-collapsible mw-collapsed"
 +
|+BGP コンフィグ サンプル IPv4 vs IPv6
 +
!host
 +
!IPv4
 +
!IPv6
 +
!備考
 +
|-
 +
|BGP-PE
 +
|
 +
ip routing
 +
<nowiki>!
 +
interface GigabitEthernet1
 +
  description BGP-CE_Gi4
 +
  ip address 203.0.113.1 255.255.255.252
 +
 +
 +
!
 +
router bgp 203
 +
  bgp router-id 203.0.113.88
 +
  bgp log-neighbor-changes
 +
  neighbor 203.0.113.2 remote-as 198
 +
!
 +
  address-family ipv4
 +
  network 0.0.0.0
 +
  network 203.0.113.0
 +
  no neighbor 2001:DB8:203::2 activate
 +
  neighbor 203.0.113.2 activate
 +
  neighbor 203.0.113.2 soft-reconfiguration inbound
 +
  default-information originate
 +
  exit-address-family
 +
  !
 +
ip route 0.0.0.0 0.0.0.0 Null0 254
 +
ip route 203.0.113.0 255.255.255.0 Null0 254</nowiki>
  
description BGP-CE_Gi4
+
|
 +
ipv6 unicast-routing
 +
<nowiki>!
 +
  interface GigabitEthernet1
 +
  description BGP-CE_Gi4
 +
  ipv6 address 2001:DB8:203::1/64
 +
  ipv6 enable
 +
  ipv6 nd ra suppress all
 +
  !
 +
  router bgp 203
 +
  bgp router-id 203.0.113.88
 +
  bgp log-neighbor-changes
 +
  neighbor 2001:DB8:203::2 remote-as 198
 +
  !
 +
  address-family ipv6
 +
    network</nowiki> ::/0
 +
<nowiki> </nowiki>  network 2001:DB8:203::/48
 +
<nowiki> </nowiki>
 +
<nowiki> </nowiki>  neighbor 2001:DB8:203::2 activate
 +
<nowiki> </nowiki>  neighbor 2001:DB8:203::2 soft-reconfiguration inbound
 +
<nowiki> </nowiki>  default-information originate
 +
<nowiki> </nowiki> exit-address-family
 +
<nowiki> </nowiki> <nowiki>!
 +
  ipv6 route</nowiki> ::/0 Null0 254
 +
  ipv6 route 2001:DB8:203::/48 Null0 254
  
ipv6 address 2001:DB8:203::1/64
+
|
 +
|-
 +
|BGP-CE
 +
|
 +
ip routing
 +
<nowiki>!
 +
  interface GigabitEthernet4
 +
  description BGP-PE_Gi1
 +
  ip address 203.0.113.2 255.255.255.252
 +
 
 +
 
 +
  !
 +
  router bgp 198
 +
  bgp router-id 198.51.100.254
 +
  bgp log-neighbor-changes
 +
  neighbor 203.0.113.1 remote-as 203
 +
  !
 +
  address-family ipv4
 +
    network 198.51.100.0
 +
 
 +
 
 +
    no neighbor 2001:DB8:203::1 activate
 +
    neighbor 203.0.113.1 activate
 +
    neighbor 203.0.113.1 soft-reconfiguration inbound
 +
  exit-address-family
 +
  !
 +
  ip route 198.51.100.0 255.255.255.0 Null0 254</nowiki>
 +
 +
.
  
ipv6 enable
+
|
 +
ipv6 unicast-routing
 +
<nowiki>!
 +
interface GigabitEthernet4
 +
  description BGP-PE_Gi1
 +
  ipv6 address 2001:DB8:203::2/64
 +
  ipv6 enable
 +
  ipv6 nd ra suppress all
 +
!
 +
router bgp 198
 +
  bgp router-id 198.51.100.254
 +
  bgp log-neighbor-changes
 +
  neighbor 2001:DB8:203::1 remote-as 203
 +
  !
 +
  address-family ipv6
 +
  network 2001:DB8:192::/48
 +
  network 2001:DB8:198::/48
 +
  network 2001:DB8:254::/48
 +
 +
  neighbor 2001:DB8:203::1 activate
 +
  neighbor 2001:DB8:203::1 soft-reconfiguration inbound
 +
  exit-address-family
 +
  !
 +
ipv6 route 2001:DB8:192::/48 Null0 254
 +
ipv6 route 2001:DB8:198::/48 Null0 254
 +
ipv6 route 2001:DB8:254::/48 Null0 254</nowiki>
  
ipv6 nd ra suppress all
+
|
 +
|-
 +
|ポイント
 +
| colspan="3" |'''ipv6 nd ra suppress all'''
  
<nowiki>!</nowiki>
+
ルータ間でルーティング プロトコルを動作させる場合、ルータを広報する ICMPv6 RA (ルータ アドバタイズメント) は無効化しましょう。
  
router bgp 203
+
* EVPN で RFC5549 を実装したい場合は、あえて有効化する場合もあります
 +
'''address-family ipv6'''
  
bgp router-id 203.0.113.88
+
デュアル スタックの IPv6 で BGP ピアを確立させる場合、ここで設定します。
  
bgp log-neighbor-changes
+
IPv4 BGP ピアで IPv6 ネットワークを受信・広報することも可能と思われますが、v6 ルーティングに v4 ネクストホップを使うのは特別な設定が要ると思われます。
  
neighbor 2001:DB8:203::2 remote-as 198
+
商用でも筆者は見たことがありません。(逆はあり)
  
<nowiki>!</nowiki>
+
'''ipv6 route <内部ルート> Null0 254'''
  
address-family ipv6
+
BGP でルートを広報する場合、IGP でルートを持っている (=自 AS でルートを保持している) ことが必要です。
  
 +
この例では Null0 インターフェース宛のルートを持つことで、常に IGP でルートを持つように設定しています。
 +
|}
  
 +
=== 総評 ===
 +
BGP でルート広報・受信する分には、IPv4 であっても IPv6 であってもそこまで違いはありません。
  
  default-information originate
+
同じような感覚で設定できます。
  
  network ::/0
+
== OSPF コンフィグ ==
  
  network 2001:DB8:203::/48
+
=== 要件 ===
 +
router-id を Lo0 のアドレスで設定してください。
  
  neighbor 2001:DB8:203::2 activate
+
OSPF で LAN のルートを送受信します。
  
  neighbor 2001:DB8:203::2 soft-reconfiguration inbound
+
* OSPFv2 で IPv4
 +
* OSPFv3 で IPv6
 +
以下が達成できること。
 +
* BGP-CE Lo0 と Core Lo0 間で ping 疎通が成功すること
 +
* BGP-PE Lo0 と Core Lo0 間で ping 疎通が成功すること
 +
以下の設定は禁止します。
  
exit-address-family
+
* BGP-PE の BGP ルートを、OSPF に再配布する
  
<nowiki>!</nowiki>
+
=== IPv4 IPv6 コンフィギュレーション比較 ===
 
+
{| class="wikitable mw-collapsible mw-collapsed"
ipv6 route 2001:DB8:203::/48 Null0 254
+
|+OSPF コンフィグ サンプル IPv4 vs IPv6
 
+
!host
ipv6 route ::/0 Null0 254
+
!IPv4
|
+
!IPv6
 +
!備考
 
|-
 
|-
 
|BGP-CE
 
|BGP-CE
|ip routing
+
|
<nowiki>!</nowiki>
+
ip routing
 +
<nowiki>!
 +
interface Loopback0
 +
  description Router-ID
 +
  ip address 198.51.100.254 255.255.255.255
 +
 +
!
 +
interface GigabitEthernet1
 +
  description Core_Gi4
 +
  ip address 192.0.2.1 255.255.255.252
 +
 
 +
 
 +
 +
  ip ospf network point-to-point
 +
!
 +
router ospf 1
 +
  router-id 198.51.100.254
 +
  passive-interface default
 +
  no passive-interface GigabitEthernet1
 +
  network 192.0.2.0 0.0.0.3 area 0.0.0.0
 +
  network 198.51.100.254 0.0.0.0 area 0.0.0.0
 +
  default-information originate</nowiki>
  
interface GigabitEthernet4
+
|
 +
ipv6 unicast-routing
 +
<nowiki>!
 +
  interface Loopback0
 +
  description Router-ID
 +
  ipv6 address 2001:DB8:254::254/128
 +
  ipv6 ospf 1 area 0.0.0.0
 +
  !
 +
  interface GigabitEthernet1
 +
  description Core_Gi4
 +
  ipv6 address 2001:DB8:192::1/64
 +
  ipv6 enable
 +
  ipv6 nd ra suppress all
 +
  ipv6 ospf 1 area 0.0.0.0
 +
  ipv6 ospf network point-to-point
 +
  !
 +
  ipv6 router ospf 1
 +
  router-id 198.51.100.254
 +
  default-information originate
 +
  passive-interface default
 +
  no passive-interface GigabitEthernet1</nowiki>
 +
 +
.
  
description BGP-PE_Gi1
+
|
 +
|-
 +
|Core
 +
|
 +
ip routing
 +
<nowiki>!
 +
interface Loopback0
 +
  description Router-ID
 +
  ip address 198.51.100.253 255.255.255.255
 +
 +
!
 +
interface GigabitEthernet4
 +
  description BGP-CE_Gi1
 +
  ip address 192.0.2.2 255.255.255.252
 +
 +
 +
 +
  ip ospf network point-to-point
 +
!
 +
router ospf 1
 +
  router-id 198.51.100.253
 +
  passive-interface default
 +
  no passive-interface GigabitEthernet4
 +
  network 192.0.2.0 0.0.0.3 area 0.0.0.0
 +
  network 198.51.100.0 0.0.0.127 area 0.0.0.0
 +
  network 198.51.100.253 0.0.0.0 area 0.0.0.0</nowiki>
  
ip address 203.0.113.2 255.255.255.252
+
|
 +
ipv6 unicast-routing
 +
<nowiki>!
 +
  interface Loopback0
 +
    description Router-ID
 +
    ipv6 address 2001:DB8:254::253/128
 +
    ipv6 ospf 1 area 0.0.0.0
 +
  !
 +
  interface GigabitEthernet4
 +
    description BGP-CE_Gi1
 +
    ipv6 address 2001:DB8:192::2/64
 +
    ipv6 enable
 +
    ipv6 nd ra suppress all
 +
    ipv6 ospf 1 area 0.0.0.0
 +
    ipv6 ospf network point-to-point
 +
  !
 +
  ipv6 router ospf 1
 +
    router-id 198.51.100.253
 +
    passive-interface default
 +
    no passive-interface GigabitEthernet4 </nowiki>
 +
 +
 +
.
  
 +
|
 +
|-
 +
|ポイント
 +
| colspan="3" |IPv4 と IPv6 では、エリア指定の方法が異なります。
  
 +
* IPv4 の OSPFv2 では、OSPF のエリアに参加させるインターフェースを router ospf 配下の network で指定します
  
<nowiki>!</nowiki>
+
* IPv6 の OSPFv3 では、インターフェースで直接指定します
  
router bgp 198
+
OSPFv3 で address-family ipv4 と ipv6 を設定する方法もあります。
  
bgp router-id 198.51.100.254
 
  
bgp log-neighbor-changes
+
'''passive-interface default'''
  
neighbor 203.0.113.1 remote-as 203
+
インターフェースの設定をデフォルトでパッシブとし、OSPF Hello を送信させないようにします。
  
<nowiki>!</nowiki>
+
IPv4 では network , IPv6 では area を指定することで、OSPF に参加させることが可能です。
  
address-family ipv4
+
このとき OSPF が動作しているホストが存在すると、OSPF ネイバーが意図せず隣接関係を確立してしまう場合があります。
  
  network 198.51.100.0
+
このように意図しない隣接関係の確立を防ぐため、特に複数のホストを収容するブロードキャスト ネットワークのホストでは passive-interface default が推奨される設定になります。
  
  
  no neighbor 2001:DB8:203::1 activate
+
'''no passive-interface <インターフェース ID>'''
  
  neighbor 203.0.113.1 activate
+
OSPF 隣接関係を確立したいインターフェースは、no passive-interface で明示的に OSPF Hello を送受信させるようにします。
  
  neighbor 203.0.113.1 soft-reconfiguration inbound
 
  
exit-address-family
+
'''ip ospf network point-to-point / ipv6 ospf network point-to-point'''
  
<nowiki>!</nowiki>
+
/30 や /64 など、参加しているホストが 1:1 接続の場合は、ネットワークタイプをポイントツーポイントに設定します。
  
ip route 198.51.100.0 255.255.255.0 Null0 254
+
* 隣接関係の確立を早めるため
 +
* 障害時の切り替え時間を短縮するため
  
  
|ipv6 unicast-routing
+
'''default-information originate'''
<nowiki>!</nowiki>
 
  
interface GigabitEthernet4
+
デフォルト ルートを OSPF に広報します。
  
description BGP-PE_Gi1
+
BGP や Null0 ルートなどでデフォルト ルートを持っている場合に広報されます。
  
ipv6 address 2001:DB8:203::2/64
+
持っていなくても広報したい場合、alway オプションをつけると常に広報されます。
  
ipv6 enable
 
  
ipv6 nd ra suppress all
+
'''ip address / ipv6 address'''
  
<nowiki>!</nowiki>
+
IPv4 では OSPF に IPv4 アドレスは必須ですが、IPv6 では OSPFv3 にグローバル ユニキャスト アドレスは必須ではありません。
  
router bgp 198
+
ただ、traceroute の経路確認のため、グローバル ユニキャスト アドレスは設定するのが推奨です。
  
bgp router-id 198.51.100.254
 
  
bgp log-neighbor-changes
+
'''ipv6 enable'''
  
neighbor 2001:DB8:203::1 remote-as 203
+
IPv6 リンク ローカル アドレスを生成し、インターフェースで IPv6 を有効化します。
  
<nowiki>!</nowiki>
+
OSPFv3 はルーティングにリンク ローカル アドレスを使用するため、このコマンドか、手動でリンク ローカル アドレスを設定することが必要です。
 +
|}
  
address-family ipv6
+
=== 総評 ===
 +
OSPF でルート広報・受信には、以下の異なる点があります。
  
  network 2001:DB8:192::/48
+
* ルートを広報・受信する分には、OSPFv3 で IPv6 グローバル ユニキャストを設定する必要がない
 +
** traceroute が分かりづらいため、設定したほうが良い
 +
* エリアの設定が router ospf モードか、インターフェース モードで行うかという違いがある
  
  network 2001:DB8:198::/48
+
== ゲートウェイ (Core) とホスト (CPE) コンフィグ ==
  
  network 2001:DB8:254::/48
+
=== 要件 ===
 +
固定 IPv4 IPv6 をデュアル スタックで設定します。
 +
 
 +
==== ゲートウェイ (Core) ====
 +
IPv4 は DHCP でデフォルト ゲートウェイを広報します。
  
  neighbor 2001:DB8:203::1 activate
+
IPv6 は ICMPv6 でデフォルト ゲートウェイを広報します。アドレスと DNS は DHCPv6 サーバから広報します。
  
  neighbor 2001:DB8:203::1 soft-reconfiguration inbound
+
==== ホスト (CPE) ====
 +
IPv4 : DHCP で IP アドレスと DNS サーバ情報、デフォルト ゲートウェイを取得します。
  
exit-address-family
+
IPv6 : DHCPv6 で IP アドレス DNS サーバ情報を取得します。デフォルト ゲートウェイは ICMPv6 ND RA で取得します。
  
<nowiki>!</nowiki>
+
==== 疎通確認 ====
 +
CPE から Core Lo0 に疎通できること
  
ipv6 route 2001:DB8:192::/48 Null0 254
+
CPE から BGP-CE Lo0 に疎通できること
  
ipv6 route 2001:DB8:198::/48 Null0 254
+
CPE から BGP-PE Lo0 に疎通できること
  
ipv6 route 2001:DB8:254::/48 Null0 254
+
=== IPv6 コンフィギュレーション比較 ===
 +
{| class="wikitable mw-collapsible mw-collapsed"
 +
|+ゲートウェイとホスト コンフィグ サンプル IPv4 vs IPv6
 +
!host
 +
!IPv4
 +
!IPv6
 +
!備考
 +
|-
 +
|Core
 
|
 
|
|}
+
ip routing
 +
<nowiki>!
 +
  ip dhcp excluded-address 198.51.100.1 198.51.100.10
 +
  !
 +
  ip dhcp pool IPv4
 +
  network 198.51.100.0 255.255.255.128
 +
  default-router 198.51.100.1
 +
  dns-server 8.8.8.8
 +
  !
 +
  interface GigabitEthernet1
 +
  description CPE_Gi4
 +
 
 +
  ip address 198.51.100.1 255.255.255.128</nowiki>
 +
 +
 +
 +
.
  
=== コンフィギュレーションのポイント ===
+
|
 +
ipv6 unicast-routing
 +
<nowiki>!
 +
 +
!
 +
ipv6 dhcp pool IPv6
 +
  address prefix 2001:DB8:198::/64
 +
 +
  dns-server 2001:4860:4860::8888
 +
!
 +
interface GigabitEthernet1
 +
  description CPE_Gi4
 +
  ipv6 address FE80::198:1 link-local
 +
  ipv6 address 2001:DB8:198::1/64
 +
  ipv6 enable
 +
  ipv6 nd prefix default no-advertise
 +
  ipv6 nd managed-config-flag
 +
  ipv6 nd other-config-flag
 +
  ipv6 dhcp server IPv6</nowiki>
  
==== ipv6 nd ra suppress all ====
+
|
ルータ間でルーティング プロトコルを動作させる場合、ルータを広告する ICMPv6 RA (ルータ アドバタイズメント) は無効化しましょう。
+
|-
 +
|CPE
 +
|
 +
ip routing
 +
<nowiki>!
 +
  interface GigabitEthernet4
 +
  description Core_Gi1
 +
  ip address dhcp</nowiki>
 +
 +
 +
 +
.
  
* EVPN で RFC5549 を実装したい場合は、あえて有効化する場合もあります
+
|
 +
ipv6 unicast-routing
 +
<nowiki>!
 +
interface GigabitEthernet4
 +
  description Core_Gi1
 +
  ipv6 address dhcp
 +
  ipv6 address autoconfig default
 +
  ipv6 enable
 +
  ipv6 nd ra suppress all
 +
  ipv6 dhcp client request vendor</nowiki>
  
==== address-family ipv6 ====
+
|
デュアル スタックの IPv6 で BGP ピアを確立させる場合、ここで設定します。
+
|-
 +
|ポイント
 +
| colspan="3" |IPv4 と異なる最大の点は、ゲートウェイの設定は ICMPv6 で配布する点が IPv4 と最も異なる点です。
 +
IPv6 は最初期に ICMPv6 で何でも配布しよう、と RFC で考えられていましたが、現在の ISP では DHCPv6 で配布するケースが多数です。
  
IPv4 BGP ピアで IPv6 ネットワークを受信・広報することも可能と思われますが、v6 ルーティングに v4 ネクストホップを使うのは特別な設定が要ると思われます。
+
このため、ICMPv6 ではアドレスの配布を停止するが、ゲートウェイの広報は行う、DHCPv6 サーバを使用する、という設定が必要になります。
  
商用でも筆者は見たことがありません。(逆はあり)
+
また、継続してゲートウェイの設定を広報・受信するため、マルチキャストの IPv6 ND RA が、定期的に送信・受信されることが重要です。
  
==== ipv6 route <内部ルート> Null0 254 ====
 
BGP でルートを広報する場合、IGP でルートを持っている (=自 AS でルートを保持している) ことが必要です。
 
  
この例では Null0 インターフェース宛のルートを持つことで、常に IGP でルートを持つように設定しています。
+
'''ipv6 address <リンク ローカル アドレス> link-local'''
  
=== 総評 ===
+
固定 IPv6 を設定するホストがいる環境では、設定するのが推奨です。
BGP でルート広告・受信する分には、IPv4 であっても IPv6 であってもそこまで違いはありません。
 
  
同じような感覚で設定できます。
+
これはルータをリプレースした際にリンク ローカル アドレスが変わってしまい、ホストのデフォルト ルート ネクストホップも変化してしまうためです。
  
== OSPF コンフィグ ==
+
また、fe80::/64 となるように設定します。
  
=== 要件 ===
+
* Windows Firewall が fe80::/64 でフィルタリングしているため
OSPF で LAN のルートを送受信します。
 
  
* OSPFv2 で IPv4
 
* OSPFv3 で IPv6
 
  
=== IPv4 IPv6 コンフィギュレーション比較 ===
+
'''ipv6 nd prefix default no-advertise'''
{| class="wikitable"
 
|+IPv4 vs IPv6
 
!host
 
!IPv4
 
!IPv6
 
!備考
 
|-
 
|BGP-CE
 
|ip routing
 
<nowiki>!</nowiki>
 
  
interface GigabitEthernet1
+
ICMPv6 ND のアドレス広報を停止します。
  
description Core_Gi4
 
  
ip address 192.0.2.1 255.255.255.252
+
'''ipv6 nd managed-config-flag'''
  
 +
アドレスやプレフィックスの広報を DHCPv6 サーバに管理させます。
  
 +
(デフォルトは ND RA)
  
  
ip ospf network point-to-point
+
'''ipv6 nd other-config-flag'''
  
<nowiki>!</nowiki>
+
DNS サーバの広報を、DHCPv6 サーバに管理させます。
  
router ospf 1
 
  
router-id 198.51.100.254
+
'''ipv6 dhcp server <Pool 名>'''
  
passive-interface default
+
DHCPv6 サーバを有効にします。
  
no passive-interface GigabitEthernet1
+
商用ではリレーエージェントで DHCPv6 サーバに転送するため、検証用のコマンドです。
  
network 192.0.2.0 0.0.0.3 area 0.0.0.0
 
  
network 198.51.100.254 0.0.0.0 area 0.0.0.0
+
'''ipv6 address autoconfig (default)'''
  
default-information originate
+
受信した ICMPv6 ND RA のアドレスを使用します。
|ipv6 unicast-routing
 
<nowiki>!</nowiki>
 
  
interface GigabitEthernet1
+
default オプションをつけた場合は、RA のデフォルト ゲートウェイをルーティング テーブルにインストールします。
 +
|}
  
description Core_Gi4
+
=== 総評 ===
 +
IPv4 の DHCP は、IPv6 だと ICMPv6 ND RA でゲートウェイ アドレスを広報し、アドレスと DNS サーバは DHCPv6 サーバで配布します。
  
ipv6 address 2001:DB8:192::1/64
+
other や managed のフラグを変更することで DHCPv6 サーバ無し、という設定も可能であるため選択肢が多くなっており、多くの人はここで混乱していると思われます。
  
ipv6 enable
+
= 動作確認 =
 +
各プロトコルの確認方法も、デフォルトで表示されないようにしてあるため、ラボで試してできないときに見てみると良いと思います。
  
ipv6 nd ra suppress all
+
== BGP 確認 ==
  
ipv6 ospf 1 area 0.0.0.0
+
=== BGP 確認要件 ===
 +
BGP のステータスが Establish であること。
  
ipv6 ospf network point-to-point
+
広報しているルートを確認できること。
  
<nowiki>!</nowiki>
+
受信しているルートを確認できること。
  
ipv6 router ospf 1
+
=== IPv4 IPv6 確認コマンド比較 ===
 +
{| class="wikitable mw-collapsible mw-collapsed"
 +
|+BGP 確認サンプル IPv4 vs IPv6
 +
!host
 +
!IPv4
 +
!IPv6
 +
!備考
 +
|-
 +
|BGP-PE
 +
|'''show ip bgp summary'''
 +
BGP router identifier 203.0.113.88, local AS number 203
  
router-id 198.51.100.254
+
BGP table version is 6, main routing table version 6
  
default-information originate
+
3 network entries using 744 bytes of memory
  
passive-interface default
+
3 path entries using 408 bytes of memory
  
no passive-interface GigabitEthernet1
+
2/2 BGP path/bestpath attribute entries using 576 bytes of memory
  
 +
1 BGP AS-PATH entries using 24 bytes of memory
  
|
+
0 BGP route-map cache entries using 0 bytes of memory
|-
 
|Core
 
|ip routing
 
<nowiki>!</nowiki>
 
  
interface GigabitEthernet4
+
0 BGP filter-list cache entries using 0 bytes of memory
  
description BGP-CE_Gi1
+
BGP using 1752 total bytes of memory
  
ip address 192.0.2.2 255.255.255.252
+
BGP activity 9/1 prefixes, 9/1 paths, scan interval 60 secs
  
 +
3 networks peaked at 00:14:13 May 14 2024 UTC (02:29:34.128 ago)
  
 +
Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  '''State/PfxRcd'''
  
 +
203.0.113.2     4          198     172     171        6    0    0 02:32:04        '''1'''
  
ip ospf network point-to-point
+
.
  
<nowiki>!</nowiki>
+
'''show ip bgp neighbors 203.0.113.2 advertised-routes'''
  
router ospf 1
+
BGP table version is 6, local router ID is 203.0.113.88
  
router-id 198.51.100.253
+
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
  
passive-interface default
+
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
  
no passive-interface GigabitEthernet4
+
              x best-external, a additional-path, c RIB-compressed,
  
network 192.0.2.0 0.0.0.3 area 0.0.0.0
+
              t secondary path, L long-lived-stale,
  
network 198.51.100.0 0.0.0.127 area 0.0.0.0
+
Origin codes: i - IGP, e - EGP, ? - incomplete
  
network 198.51.100.253 0.0.0.0 area 0.0.0.0
+
RPKI validation codes: V valid, I invalid, N Not found
|ipv6 unicast-routing
 
<nowiki>!</nowiki>
 
  
interface GigabitEthernet4
+
     Network          Next Hop            Metric LocPrf Weight Path
  
description BGP-CE_Gi1
+
'''<nowiki>*</nowiki>>   0.0.0.0          0.0.0.0                  0         32768 i'''
  
ipv6 address 2001:DB8:192::2/64
+
'''<nowiki>*</nowiki>>   203.0.113.0      0.0.0.0                  0         32768 i'''
  
ipv6 enable
+
Total number of prefixes 2
  
ipv6 nd ra suppress all
+
.
  
ipv6 ospf 1 area 0.0.0.0
+
'''show ip bgp neighbors 203.0.113.2 received-routes'''
  
ipv6 ospf network point-to-point
+
BGP table version is 6, local router ID is 203.0.113.88
  
<nowiki>!</nowiki>
+
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
  
ipv6 router ospf 1
+
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
  
router-id 198.51.100.253
+
              x best-external, a additional-path, c RIB-compressed,
  
passive-interface default
+
              t secondary path, L long-lived-stale,
  
no passive-interface GigabitEthernet4
+
Origin codes: i - IGP, e - EGP, ? - incomplete
  
 +
RPKI validation codes: V valid, I invalid, N Not found
  
 +
     Network          Next Hop            Metric LocPrf Weight Path
  
|
+
'''<nowiki>*</nowiki>>   198.51.100.0     203.0.113.2              0             0 198 i'''
|}
 
  
=== コンフィギュレーションのポイント ===
+
Total number of prefixes 1
IPv4 の OSPFv2 では、OSPF に参加させるインターフェースを router ospf 配下の network で指定し、IPv6 の OSPFv3 ではインターフェースで指定する点が異なります。
 
  
OSPFv3 で address-family ipv4 と ipv6 を設定する方法もあります。
+
.
  
==== passive-interface default ====
+
.
インターフェースの設定をデフォルトでパッシブとし、OSPF Hello を送信させないようにします。
 
  
IPv4 では network , IPv6 では area を指定することで、OSPF に参加させることが可能です。
+
.
  
このとき OSPF が動作しているホストが存在すると、OSPF ネイバーが意図せず隣接関係を確立してしまう場合があります。
+
.
  
このように意図しない隣接関係の確立を防ぐため、特に複数のホストを収容するブロードキャスト ネットワークのホストでは passive-interface default が推奨される設定になります。
+
.
  
==== no passive-interface <インターフェース ID> ====
+
'''show ip route bgp'''
OSPF 隣接関係を確立したいインターフェースは、no passive-interface で明示的に OSPF Hello を送受信させるようにします。
 
  
==== ip ospf network point-to-point / ipv6 ospf network point-to-point ====
+
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
/30 や /64 など、参加しているホストが 1:1 接続の場合は、ネットワークタイプをポイントツーポイントに設定します。
 
  
* 隣接関係の確立を早めるため
+
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
* 障害時の切り替え時間を短縮するため
 
  
==== default-information originate ====
+
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
デフォルト ルートを OSPF に広告します。
 
  
BGP や Null0 ルートなどでデフォルト ルートを持っている場合に広告されます。
+
       E1 - OSPF external type 1, E2 - OSPF external type 2, m - OMP
  
持っていなくても広告したい場合、alway オプションをつけると常に広告されます。
+
       n - NAT, Ni - NAT inside, No - NAT outside, Nd - NAT DIA
  
==== ip address / ipv6 address ====
+
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
IPv4 では OSPF に IPv4 アドレスは必須ですが、IPv6 では OSPFv3 にグローバル ユニキャスト アドレスは必須ではありません。
 
  
traceroute の経路確認のため、
+
       ia - IS-IS inter area, * - candidate default, U - per-user static route
  
==== ipv6 enable ====
+
       H - NHRP, G - NHRP registered, g - NHRP registration summary
IPv6 リンク ローカル アドレスを生成し、インターフェースで IPv6 を有効化します。
 
  
OSPFv3 はルーティングにリンク ローカル アドレスを使用するため、このコマンドか、手動でリンク ローカル アドレスを設定することが必要です。
+
       o - ODR, P - periodic downloaded static route, l - LISP
  
=== 総評 ===
+
       a - application route
OSPF でルート広告・受信には、以下の異なる点があります。
 
  
* ルートを広告・受信する分には、OSPFv3 で IPv6 グローバル ユニキャストを設定する必要がない
+
       + - replicated route, % - next hop override, p - overrides from PfR
** traceroute が分かりづらいため、設定したほうが良い
 
* エリアの設定が router ospf モードか、インターフェース モードで行うかという違いがある
 
  
== ゲートウェイ (Core) とホスト (CPE) コンフィグ ==
+
       & - replicated local route overrides by connected
  
=== 要件 ===
+
Gateway of last resort is 0.0.0.0 to network 0.0.0.0
固定 IPv4 IPv6 をデュアル スタックで設定します。
 
  
==== ゲートウェイ (Core) ====
+
'''B     198.51.100.0/24 [20/0] via 203.0.113.2, 03:29:19'''
IPv4 は DHCP でデフォルト ゲートウェイを広告します。
 
  
IPv6 は ICMPv6 でデフォルト ゲートウェイを広告します。アドレスと DNS は DHCPv6 サーバから広告します。
 
  
===== ホスト (CPE) =====
+
|'''show bgp ipv6 unicast summary'''
IPv4 : DHCP で IP アドレスと DNS サーバ情報を取得します。
+
BGP router identifier 203.0.113.88, local AS number 203
  
IPv6 : DHCPv6 で IP アドレス DNS サーバ情報を取得します。
+
BGP table version is 6, main routing table version 6
  
=== IPv6 コンフィギュレーション比較 ===
+
5 network entries using 1360 bytes of memory
{| class="wikitable"
 
|+IPv4 vs IPv6
 
!host
 
!IPv4
 
!IPv6
 
!備考
 
|-
 
|Core
 
|ip routing
 
<nowiki>!</nowiki>
 
  
ip dhcp excluded-address 198.51.100.1 198.51.100.10
+
5 path entries using 800 bytes of memory
  
<nowiki>!</nowiki>
+
2/2 BGP path/bestpath attribute entries using 576 bytes of memory
  
ip dhcp pool IPv4
+
1 BGP AS-PATH entries using 24 bytes of memory
  
network 198.51.100.0 255.255.255.128
+
0 BGP route-map cache entries using 0 bytes of memory
  
default-router 198.51.100.1
+
0 BGP filter-list cache entries using 0 bytes of memory
  
dns-server 8.8.8.8
+
BGP using 2760 total bytes of memory
  
<nowiki>!</nowiki>
+
BGP activity 9/1 prefixes, 9/1 paths, scan interval 60 secs
  
interface GigabitEthernet1
+
5 networks peaked at 00:24:51 May 14 2024 UTC (02:20:17.295 ago)
  
description CPE_Gi4
+
Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  '''State/PfxRcd'''
  
 +
2001:DB8:203::2 4          198     164     163        6    0    0 02:22:36        '''3'''
  
ip address 198.51.100.1 255.255.255.128
+
.  
  
 +
'''show bgp ipv6 unicast neighbors 2001:DB8:203::2 advertised-routes'''
  
 +
BGP table version is 6, local router ID is 203.0.113.88
  
 +
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
  
 +
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
  
|ipv6 unicast-routing
+
              x best-external, a additional-path, c RIB-compressed,
<nowiki>!</nowiki>
 
  
 +
              t secondary path, L long-lived-stale,
  
 +
Origin codes: i - IGP, e - EGP, ? - incomplete
  
ipv6 dhcp pool IPv6
+
RPKI validation codes: V valid, I invalid, N Not found
  
address prefix 2001:DB8:198::/64
+
     Network          Next Hop            Metric LocPrf Weight Path
  
 +
'''<nowiki>*</nowiki>>   ::/0             ::                       0         32768 i'''
  
dns-server 2001:4860:4860::8888
+
'''<nowiki>*</nowiki>>   2001:DB8:203::/48'''
  
<nowiki>!</nowiki>
+
'''                      ::                       0         32768 i'''
  
interface GigabitEthernet1
+
Total number of prefixes 2
  
description CPE_Gi4
+
'''show bgp ipv6 unicast neighbors 2001:DB8:203::2 received-routes'''
  
ipv6 address FE80::198:1 link-local
+
BGP table version is 6, local router ID is 203.0.113.88
  
ipv6 address 2001:DB8:198::1/64
+
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
  
ipv6 enable
+
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
  
ipv6 nd prefix default no-advertise
+
              x best-external, a additional-path, c RIB-compressed,
  
ipv6 nd managed-config-flag
+
              t secondary path, L long-lived-stale,
  
ipv6 nd other-config-flag
+
Origin codes: i - IGP, e - EGP, ? - incomplete
  
ipv6 dhcp server IPv6
+
RPKI validation codes: V valid, I invalid, N Not found
|
 
|-
 
|CPE
 
|ip routing
 
<nowiki>!</nowiki>
 
  
interface GigabitEthernet4
+
     Network          Next Hop            Metric LocPrf Weight Path
  
description Core_Gi1
+
'''<nowiki>*</nowiki>>   2001:DB8:192::/48'''
  
ip address dhcp
+
'''                      2001:DB8:203::2          0             0 198 i'''
  
 +
'''<nowiki>*</nowiki>>   2001:DB8:198::/48'''
  
 +
'''                      2001:DB8:203::2          0             0 198 i'''
  
 +
'''<nowiki>*</nowiki>>   2001:DB8:254::/48'''
  
|ipv6 unicast-routing
+
'''                      2001:DB8:203::2          0             0 198 i'''
<nowiki>!</nowiki>
 
  
interface GigabitEthernet4
+
Total number of prefixes 3
  
description Core_Gi1
+
'''show ipv6 route bgp'''
  
ipv6 address dhcp
+
IPv6 Routing Table - default - 9 entries
  
ipv6 address autoconfig default
+
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
  
ipv6 enable
+
       B - BGP, R - RIP, H - NHRP, I1 - ISIS L1
  
ipv6 nd ra suppress all
+
       I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary, D - EIGRP
  
ipv6 dhcp client request vendor
+
       EX - EIGRP external, ND - ND Default, NDp - ND Prefix, DCE - Destination
|
 
|}
 
  
=== コンフィギュレーションのポイント ===
+
       NDr - Redirect, RL - RPL, O - OSPF Intra, OI - OSPF Inter
IPv4 と異なる最大の点は、ゲートウェイの設定は ICMPv6 で配布する点が IPv4 と最も異なる点です。
 
  
IPv6 は最初期に ICMPv6 で何でも配布しよう、と RFC で考えられていましたが、現在の ISP では DHCPv6 で配布するケースが多数です。
+
       OE1 - OSPF ext 1, OE2 - OSPF ext 2, ON1 - OSPF NSSA ext 1
  
このため、ICMPv6 ではアドレスの配布を停止するが、ゲートウェイの広告は行う、DHCPv6 サーバを使用する、という設定が必要になります。
+
       ON2 - OSPF NSSA ext 2, la - LISP alt, lr - LISP site-registrations
  
また、継続してゲートウェイの設定を広告・受信するため、マルチキャストの IPv6 ND RA が、定期的に送信・受信されることが重要です。
+
       ld - LISP dyn-eid, lA - LISP away, le - LISP extranet-policy
  
==== ipv6 address <リンク ローカル アドレス> link-local ====
+
       lp - LISP publications, a - Application, m - OMP
固定 IPv6 を設定するホストがいる環境では、設定するのが推奨です。
 
  
これはルータをリプレースした際にリンク ローカル アドレスが変わってしまい、ホストのデフォルト ルート ネクストホップも変化してしまうためです。
+
B   '''2001:DB8:192::/48''' [20/0], tag 198
  
また、fe80::/64 となるように設定します。
+
     via FE80::5200:FF:FE02:3, GigabitEthernet1
  
* Windows Firewall が fe80::/64 でフィルタリングしているため
+
B   '''2001:DB8:198::/48''' [20/0], tag 198
  
==== ipv6 nd prefix default no-advertise ====
+
     via FE80::5200:FF:FE02:3, GigabitEthernet1
ICMPv6 ND のアドレス広告を停止します。
 
  
==== ipv6 nd managed-config-flag ====
+
B   '''2001:DB8:254::/48''' [20/0], tag 198
アドレスやプレフィックスの広告を DHCPv6 サーバに管理させます。
 
  
==== ipv6 nd other-config-flag ====
+
     via FE80::5200:FF:FE02:3, GigabitEthernet1
DNS サーバの広告を、DHCPv6 サーバに管理させます。
+
|
 +
|-
 +
|BGP-CE
 +
|'''show ip bgp summary'''
 +
BGP router identifier 198.51.100.254, local AS number 198
  
==== ipv6 dhcp server <Pool 名> ====
+
BGP table version is 4, main routing table version 4
DHCPv6 サーバを有効にします。
 
  
==== ipv6 address autoconfig (default) ====
+
3 network entries using 744 bytes of memory
受信した ICMPv6 ND RA のアドレスを使用します。
 
  
default をつけた場合は、RA のデフォルト ゲートウェイをルーティング テーブルにインストールします。
+
3 path entries using 408 bytes of memory
  
=== 総評 ===
+
2/2 BGP path/bestpath attribute entries using 576 bytes of memory
IPv4 の DHCP は、IPv6 だと ICMPv6 ND RA でゲートウェイ アドレスを広告し、アドレスと DNS サーバは DHCPv6 サーバで配布します。
 
  
DHCPv6 サーバ無し、という設定も可能であるため、選択肢が多くなっており、多くの人はここで混乱していると思われます。
+
1 BGP AS-PATH entries using 24 bytes of memory
  
== BGP 確認 ==
+
0 BGP route-map cache entries using 0 bytes of memory
  
=== BGP 確認要件 ===
+
0 BGP filter-list cache entries using 0 bytes of memory
BGP のステータスが Establish であること。
 
  
広告しているルートを確認できること。
+
BGP using 1752 total bytes of memory
  
受信しているルートを確認できること。
+
BGP activity 8/0 prefixes, 8/0 paths, scan interval 60 secs
  
=== IPv4 IPv6 確認コマンド比較 ===
+
3 networks peaked at 00:14:13 May 14 2024 UTC (02:32:52.950 ago)
{| class="wikitable"
 
|+IPv4 vs IPv6
 
!host
 
!IPv4
 
!IPv6
 
!備考
 
|-
 
|BGP-PE
 
|'''show ip bgp summary'''
 
BGP router identifier 203.0.113.88, local AS number 203
 
  
BGP table version is 6, main routing table version 6
+
Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  '''State/PfxRcd'''
  
3 network entries using 744 bytes of memory
+
203.0.113.1     4          203     175     176        4    0    0 02:35:23        '''2'''
  
3 path entries using 408 bytes of memory
+
  
2/2 BGP path/bestpath attribute entries using 576 bytes of memory
+
'''show ip bgp neighbors 203.0.113.1 advertised-routes'''
  
1 BGP AS-PATH entries using 24 bytes of memory
+
BGP table version is 4, local router ID is 198.51.100.254
  
0 BGP route-map cache entries using 0 bytes of memory
+
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
  
0 BGP filter-list cache entries using 0 bytes of memory
+
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
  
BGP using 1752 total bytes of memory
+
              x best-external, a additional-path, c RIB-compressed,
 +
 
 +
              t secondary path, L long-lived-stale,
 +
 
 +
Origin codes: i - IGP, e - EGP, ? - incomplete
 +
 
 +
RPKI validation codes: V valid, I invalid, N Not found
 +
 
 +
     Network          Next Hop            Metric LocPrf Weight Path
 +
 
 +
'''*>   198.51.100.0     0.0.0.0                  0         32768 i'''
 +
 
 +
Total number of prefixes 1
  
BGP activity 9/1 prefixes, 9/1 paths, scan interval 60 secs
+
  
3 networks peaked at 00:14:13 May 14 2024 UTC (02:29:34.128 ago)
+
.  
  
Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  '''State/PfxRcd'''
+
  
203.0.113.2     4          198     172     171        6    0    0 02:32:04        '''1'''
+
.  
  
.  
+
.  
  
'''show ip bgp neighbors 203.0.113.2 advertised-routes'''
+
'''show ip bgp neighbors 203.0.113.1 received-routes'''
  
BGP table version is 6, local router ID is 203.0.113.88
+
BGP table version is 4, local router ID is 198.51.100.254
  
 
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
 
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
774行目: 1,086行目:
 
     Network          Next Hop            Metric LocPrf Weight Path
 
     Network          Next Hop            Metric LocPrf Weight Path
  
'''<nowiki>*</nowiki>>   0.0.0.0          0.0.0.                       32768 i'''
+
'''*>   0.0.0.0          203.0.113.                       0 203 i'''
  
'''<nowiki>*</nowiki>>   203.0.113.0      0.0.0.                       32768 i'''
+
'''*>   203.0.113.0      203.0.113.                       0 203 i'''
  
 
Total number of prefixes 2
 
Total number of prefixes 2
  
.  
+
.  
  
'''show ip bgp neighbors 203.0.113.2 received-routes'''
+
.  
  
BGP table version is 6, local router ID is 203.0.113.88
+
'''show ip route bgp''' 
  
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
+
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
  
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
+
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
  
              x best-external, a additional-path, c RIB-compressed,
+
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
  
              t secondary path, L long-lived-stale,
+
       E1 - OSPF external type 1, E2 - OSPF external type 2, m - OMP
  
Origin codes: i - IGP, e - EGP, ? - incomplete
+
       n - NAT, Ni - NAT inside, No - NAT outside, Nd - NAT DIA
  
RPKI validation codes: V valid, I invalid, N Not found
+
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
  
     Network          Next Hop            Metric LocPrf Weight Path
+
       ia - IS-IS inter area, * - candidate default, U - per-user static route
  
'''<nowiki>*</nowiki>>   198.51.100.0     203.0.113.2              0             0 198 i'''
+
       H - NHRP, G - NHRP registered, g - NHRP registration summary
  
Total number of prefixes 1
+
       o - ODR, P - periodic downloaded static route, l - LISP
  
.
+
       a - application route
  
.
+
       + - replicated route, % - next hop override, p - overrides from PfR
  
.
+
       & - replicated local route overrides by connected
  
.  
+
Gateway of last resort is 203.0.113.1 to network 0.0.0.0
  
.  
+
B*    '''0.0.0.0/0''' [20/0] via 203.0.113.1, 03:31:28
  
'''show ip route bgp'''
+
      203.0.113.0/24 is variably subnetted, 3 subnets, 3 masks
  
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
+
B        '''203.0.113.0/24''' [20/0] via 203.0.113.1, 03:32:09
  
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
+
|'''show bgp ipv6 unicast summary'''
 +
BGP router identifier 198.51.100.254, local AS number 198
  
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
+
BGP table version is 6, main routing table version 6
  
       E1 - OSPF external type 1, E2 - OSPF external type 2, m - OMP
+
5 network entries using 1360 bytes of memory
  
       n - NAT, Ni - NAT inside, No - NAT outside, Nd - NAT DIA
+
5 path entries using 800 bytes of memory
  
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
+
2/2 BGP path/bestpath attribute entries using 576 bytes of memory
  
       ia - IS-IS inter area, * - candidate default, U - per-user static route
+
1 BGP AS-PATH entries using 24 bytes of memory
  
       H - NHRP, G - NHRP registered, g - NHRP registration summary
+
0 BGP route-map cache entries using 0 bytes of memory
  
       o - ODR, P - periodic downloaded static route, l - LISP
+
0 BGP filter-list cache entries using 0 bytes of memory
  
       a - application route
+
BGP using 2760 total bytes of memory
  
       + - replicated route, % - next hop override, p - overrides from PfR
+
BGP activity 8/0 prefixes, 8/0 paths, scan interval 60 secs
  
       & - replicated local route overrides by connected
+
5 networks peaked at 00:25:02 May 14 2024 UTC (02:23:03.379 ago)
  
Gateway of last resort is 0.0.0.0 to network 0.0.0.0
+
Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  '''State/PfxRcd'''
  
'''B     198.51.100.0/24 [20/0] via 203.0.113.2, 03:29:19'''
+
2001:DB8:203::1 4          203     166     167        6    0    0 02:25:34        '''2'''
  
 +
  
|'''show bgp ipv6 unicast summary'''
+
'''show bgp ipv6 unicast neighbors 2001:DB8:203::1 advertised-routes'''
BGP router identifier 203.0.113.88, local AS number 203
 
  
BGP table version is 6, main routing table version 6
+
BGP table version is 6, local router ID is 198.51.100.254
  
5 network entries using 1360 bytes of memory
+
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
  
5 path entries using 800 bytes of memory
+
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
  
2/2 BGP path/bestpath attribute entries using 576 bytes of memory
+
              x best-external, a additional-path, c RIB-compressed,
  
1 BGP AS-PATH entries using 24 bytes of memory
+
              t secondary path, L long-lived-stale,
 +
 
 +
Origin codes: i - IGP, e - EGP, ? - incomplete
 +
 
 +
RPKI validation codes: V valid, I invalid, N Not found
  
0 BGP route-map cache entries using 0 bytes of memory
+
     Network          Next Hop            Metric LocPrf Weight Path
  
0 BGP filter-list cache entries using 0 bytes of memory
+
'''*>   2001:DB8:192::/48'''
  
BGP using 2760 total bytes of memory
+
'''                      ::                       0         32768 i'''
  
BGP activity 9/1 prefixes, 9/1 paths, scan interval 60 secs
+
'''*>   2001:DB8:198::/48'''
  
5 networks peaked at 00:24:51 May 14 2024 UTC (02:20:17.295 ago)
+
'''                      ::                       0         32768 i'''
  
Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  '''State/PfxRcd'''
+
'''*>   2001:DB8:254::/48'''
  
2001:DB8:203::2 4          198     164     163            0 02:22:36        '''3'''
+
'''                      ::                       0         32768 i'''
  
.
+
Total number of prefixes 3
  
'''show bgp ipv6 unicast neighbors 2001:DB8:203::2 advertised-routes'''
+
'''show bgp ipv6 unicast neighbors 2001:DB8:203::1 received-routes'''
  
BGP table version is 6, local router ID is 203.0.113.88
+
BGP table version is 6, local router ID is 198.51.100.254
  
 
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
 
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
892行目: 1,209行目:
 
     Network          Next Hop            Metric LocPrf Weight Path
 
     Network          Next Hop            Metric LocPrf Weight Path
  
'''<nowiki>*</nowiki>>   ::/0             ::                       0         32768 i'''
+
'''*>   ::/0             2001:DB8:203::                   0 203 i'''
  
'''<nowiki>*</nowiki>>   2001:DB8:203::/48'''
+
'''*>   2001:DB8:203::/48'''
  
'''                      ::                       0         32768 i'''
+
'''                      2001:DB8:203::1                     0 203 i'''
  
 
Total number of prefixes 2
 
Total number of prefixes 2
  
'''show bgp ipv6 unicast neighbors 2001:DB8:203::2 received-routes'''
+
  
BGP table version is 6, local router ID is 203.0.113.88
+
'''show ipv6 route bgp''' 
  
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
+
IPv6 Routing Table - default - 13 entries
  
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
+
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
  
              x best-external, a additional-path, c RIB-compressed,
+
       B - BGP, R - RIP, H - NHRP, I1 - ISIS L1
  
              t secondary path, L long-lived-stale,
+
       I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary, D - EIGRP
  
Origin codes: i - IGP, e - EGP, ? - incomplete
+
       EX - EIGRP external, ND - ND Default, NDp - ND Prefix, DCE - Destination
  
RPKI validation codes: V valid, I invalid, N Not found
+
       NDr - Redirect, RL - RPL, O - OSPF Intra, OI - OSPF Inter
  
     Network          Next Hop            Metric LocPrf Weight Path
+
       OE1 - OSPF ext 1, OE2 - OSPF ext 2, ON1 - OSPF NSSA ext 1
  
'''<nowiki>*</nowiki>>   2001:DB8:192::/48'''
+
       ON2 - OSPF NSSA ext 2, la - LISP alt, lr - LISP site-registrations
  
'''                      2001:DB8:203::2          0             0 198 i'''
+
       ld - LISP dyn-eid, lA - LISP away, le - LISP extranet-policy
  
'''<nowiki>*</nowiki>>   2001:DB8:198::/48'''
+
       lp - LISP publications, a - Application, m - OMP
  
'''                      2001:DB8:203::2          0             0 198 i'''
+
B   '''::/0''' [20/0], tag 203
  
'''<nowiki>*</nowiki>>   2001:DB8:254::/48'''
+
     via FE80::5200:FF:FE01:0, GigabitEthernet4
  
'''                      2001:DB8:203::2          0             0 198 i'''
+
B   '''2001:DB8:203::/48''' [20/0], tag 203
  
Total number of prefixes 3
+
     via FE80::5200:FF:FE01:0, GigabitEthernet4
  
'''show ipv6 route bgp'''
+
.
  
IPv6 Routing Table - default - 9 entries
+
.
 +
|
 +
|-
 +
|ポイント
 +
| colspan="3" |'''State/PfxRcd'''
  
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
+
数字が出ているのが正常で、Establish ステータス + 受信しているルート数を意味します。
  
       B - BGP, R - RIP, H - NHRP, I1 - ISIS L1
+
Open や Connect は BGP が Up しておらず、異常を意味します。
  
       I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary, D - EIGRP
 
  
       EX - EIGRP external, ND - ND Default, NDp - ND Prefix, DCE - Destination
+
'''show ip bgp neighbors <Peer_IP> advertised-routes / show bgp ipv6 unicast neighbors <Peer_IP> advertised-routes'''
  
       NDr - Redirect, RL - RPL, O - OSPF Intra, OI - OSPF Inter
+
指定した BGP ピアに広報するプレフィックスを表示します。
  
       OE1 - OSPF ext 1, OE2 - OSPF ext 2, ON1 - OSPF NSSA ext 1
+
この例では自ルータが Null0 インターフェース宛ルートを持っているため、ネクストホップが 0.0.0.0 or :: になっています。
  
       ON2 - OSPF NSSA ext 2, la - LISP alt, lr - LISP site-registrations
 
  
       ld - LISP dyn-eid, lA - LISP away, le - LISP extranet-policy
+
'''show ip bgp neighbors <Peer_IP> received-routes / show bgp ipv6 unicast neighbors <Peer_IP> received-routes'''
  
       lp - LISP publications, a - Application, m - OMP
+
指定した BGP ピアから受信しているプレフィックスを表示します。
  
B   '''2001:DB8:192::/48''' [20/0], tag 198
+
neighbor <Peer_IP> soft-reconfiguration inbound 設定が必要です。
  
     via FE80::5200:FF:FE02:3, GigabitEthernet1
+
この表示は BGP の RIB を意味します。
  
B   '''2001:DB8:198::/48''' [20/0], tag 198
+
ネクストホップに到達性がない場合、到達できないため有効なルートに選択されません。
  
     via FE80::5200:FF:FE02:3, GigabitEthernet1
 
  
B   '''2001:DB8:254::/48''' [20/0], tag 198
+
'''show ip route bgp / show ipv6 route bgp'''
  
     via FE80::5200:FF:FE02:3, GigabitEthernet1
+
BGP のルーティング テーブルを表示します。
|
 
|-
 
|BGP-CE
 
|'''show ip bgp summary'''
 
BGP router identifier 198.51.100.254, local AS number 198
 
  
BGP table version is 4, main routing table version 4
+
この表示は FIB を意味します。
 +
|}
  
3 network entries using 744 bytes of memory
+
== OSPF 確認 ==
  
3 path entries using 408 bytes of memory
+
=== 要件 ===
 +
隣接関係を確立したい OSPF インターフェースで有効になっていること。
  
2/2 BGP path/bestpath attribute entries using 576 bytes of memory
+
OSPF 隣接関係が確立されていること。
  
1 BGP AS-PATH entries using 24 bytes of memory
+
=== IPv4 IPv6 確認比較 ===
 +
{| class="wikitable mw-collapsible mw-collapsed"
 +
|+OSPF 確認サンプル IPv4 vs IPv6
 +
!host
 +
!IPv4
 +
!IPv6
 +
!備考
 +
|-
 +
|BGP-CE
 +
|'''show ip ospf interface brief'''
 +
Interface    PID   Area            IP Address/Mask    Cost  State Nbrs F/C
  
0 BGP route-map cache entries using 0 bytes of memory
+
Lo0          1     0.0.0.0         198.51.100.254/32  1     LOOP  0/0
  
0 BGP filter-list cache entries using 0 bytes of memory
+
Gi1          1     0.0.0.0         192.0.2.1/30       1     '''P2P'''   1/1
  
BGP using 1752 total bytes of memory
 
  
BGP activity 8/0 prefixes, 8/0 paths, scan interval 60 secs
+
'''show ip ospf neighbor'''
  
3 networks peaked at 00:14:13 May 14 2024 UTC (02:32:52.950 ago)
+
Neighbor ID     Pri   State           Dead Time   Address         Interface
  
Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  '''State/PfxRcd'''
+
198.51.100.253     '''FULL'''/  -        00:00:31    192.0.2.2       GigabitEthernet1
  
203.0.113.1     4          203     175     176        4    0    0 02:35:23        '''2'''
 
  
+
'''show ip route ospf'''
  
'''show ip bgp neighbors 203.0.113.1 advertised-routes'''
+
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
  
BGP table version is 4, local router ID is 198.51.100.254
+
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
  
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
+
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
  
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
+
       E1 - OSPF external type 1, E2 - OSPF external type 2, m - OMP
  
              x best-external, a additional-path, c RIB-compressed,
+
       n - NAT, Ni - NAT inside, No - NAT outside, Nd - NAT DIA
  
              t secondary path, L long-lived-stale,
+
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
  
Origin codes: i - IGP, e - EGP, ? - incomplete
+
       ia - IS-IS inter area, * - candidate default, U - per-user static route
  
RPKI validation codes: V valid, I invalid, N Not found
+
       H - NHRP, G - NHRP registered, g - NHRP registration summary
  
     Network          Next Hop            Metric LocPrf Weight Path
+
       o - ODR, P - periodic downloaded static route, l - LISP
  
'''*>   198.51.100.0     0.0.0.0                  0         32768 i'''
+
       a - application route
  
Total number of prefixes 1
+
       + - replicated route, % - next hop override, p - overrides from PfR
  
+
       & - replicated local route overrides by connected
  
.  
+
Gateway of last resort is 203.0.113.1 to network 0.0.0.0
  
.  
+
      198.51.100.0/24 is variably subnetted, 4 subnets, 3 masks
  
.  
+
O        '''198.51.100.0/25''' [110/2] via 192.0.2.2, 03:34:12, GigabitEthernet1
  
.  
+
O        '''198.51.100.253/32''' [110/2] via 192.0.2.2, 03:34:12, GigabitEthernet1
 +
|'''show ipv6 ospf interface brief'''
 +
Interface    PID   Area            Intf ID    Cost  State Nbrs F/C
  
'''show ip bgp neighbors 203.0.113.1 received-routes''' 
+
Lo0          1     0.0.0.0         12         1     LOOP  0/0
  
BGP table version is 4, local router ID is 198.51.100.254
+
Gi1          1     0.0.0.0         7          1     '''P2P'''   1/1
  
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
 
  
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
+
'''show ipv6 ospf neighbor'''
  
              x best-external, a additional-path, c RIB-compressed,
+
            OSPFv3 Router with ID (198.51.100.254) (Process ID 1)
  
              t secondary path, L long-lived-stale,
+
Neighbor ID     Pri   State           Dead Time   Interface ID    Interface
  
Origin codes: i - IGP, e - EGP, ? - incomplete
+
198.51.100.253    0   '''FULL'''/  -        00:00:32    10              GigabitEthernet1
  
RPKI validation codes: V valid, I invalid, N Not found
 
  
     Network          Next Hop            Metric LocPrf Weight Path
+
'''show ipv6 route ospf'''
  
'''*>   0.0.0.0          203.0.113.1              0             0 203 i'''
+
IPv6 Routing Table - default - 13 entries
  
'''*>   203.0.113.0      203.0.113.1              0             0 203 i'''
+
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
  
Total number of prefixes 2
+
       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
  
'''show ip route bgp''' 
+
       NDr - Redirect, RL - RPL, O - OSPF Intra, OI - OSPF Inter
  
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
+
       OE1 - OSPF ext 1, OE2 - OSPF ext 2, ON1 - OSPF NSSA ext 1
  
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
+
       ON2 - OSPF NSSA ext 2, la - LISP alt, lr - LISP site-registrations
  
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
+
       ld - LISP dyn-eid, lA - LISP away, le - LISP extranet-policy
  
       E1 - OSPF external type 1, E2 - OSPF external type 2, m - OMP
+
       lp - LISP publications, a - Application, m - OMP
  
       n - NAT, Ni - NAT inside, No - NAT outside, Nd - NAT DIA
+
 '''2001:DB8:198::/64''' [110/2]
  
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
+
     via FE80::5200:FF:FE03:3, GigabitEthernet1
  
       ia - IS-IS inter area, * - candidate default, U - per-user static route
+
 '''2001:DB8:254::253/128''' [110/1]
  
       H - NHRP, G - NHRP registered, g - NHRP registration summary
+
     via FE80::5200:FF:FE03:3, GigabitEthernet1
  
       o - ODR, P - periodic downloaded static route, l - LISP
+
|
 
+
|-
       a - application route
+
|Core
 +
|'''show ip ospf interface brief'''
 +
Interface    PID   Area            IP Address/Mask    Cost  State Nbrs F/C
  
       + - replicated route, % - next hop override, p - overrides from PfR
+
Lo0          1     0.0.0.0         198.51.100.253/32  1     LOOP  0/0
  
       & - replicated local route overrides by connected
+
Gi4          1     0.0.0.0         192.0.2.2/30       1     P2P   1/1
  
Gateway of last resort is 203.0.113.1 to network 0.0.0.0
+
Gi1          1     0.0.0.0         198.51.100.1/25    1     DR    0/0
  
B*    '''0.0.0.0/0''' [20/0] via 203.0.113.1, 03:31:28
+
.
  
      203.0.113.0/24 is variably subnetted, 3 subnets, 3 masks
+
'''show ip ospf neighbor'''
  
      '''203.0.113.0/24''' [20/0] via 203.0.113.1, 03:32:09
+
Neighbor ID     Pri   State           Dead Time   Address         Interface
  
|'''show bgp ipv6 unicast summary'''
+
198.51.100.254    0   '''FULL'''/  -        00:00:36    192.0.2.1       GigabitEthernet4
BGP router identifier 198.51.100.254, local AS number 198
 
  
BGP table version is 6, main routing table version 6
+
.
  
5 network entries using 1360 bytes of memory
+
.
  
5 path entries using 800 bytes of memory
+
'''show ip route ospf'''
  
2/2 BGP path/bestpath attribute entries using 576 bytes of memory
+
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
  
1 BGP AS-PATH entries using 24 bytes of memory
+
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
  
0 BGP route-map cache entries using 0 bytes of memory
+
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
  
0 BGP filter-list cache entries using 0 bytes of memory
+
       E1 - OSPF external type 1, E2 - OSPF external type 2, m - OMP
  
BGP using 2760 total bytes of memory
+
       n - NAT, Ni - NAT inside, No - NAT outside, Nd - NAT DIA
  
BGP activity 8/0 prefixes, 8/0 paths, scan interval 60 secs
+
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
  
5 networks peaked at 00:25:02 May 14 2024 UTC (02:23:03.379 ago)
+
       ia - IS-IS inter area, * - candidate default, U - per-user static route
  
Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  '''State/PfxRcd'''
+
       H - NHRP, G - NHRP registered, g - NHRP registration summary
  
2001:DB8:203::1 4          203     166     167        6    0    0 02:25:34        '''2'''
+
       o - ODR, P - periodic downloaded static route, l - LISP
  
+
       a - application route
  
'''show bgp ipv6 unicast neighbors 2001:DB8:203::1 advertised-routes'''
+
       + - replicated route, % - next hop override, p - overrides from PfR
  
BGP table version is 6, local router ID is 198.51.100.254
+
       & - replicated local route overrides by connected
  
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
+
Gateway of last resort is 192.0.2.1 to network 0.0.0.0
  
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
+
O*E2  '''0.0.0.0/0''' [110/1] via 192.0.2.1, 03:33:47, GigabitEthernet4
  
              x best-external, a additional-path, c RIB-compressed,
+
      198.51.100.0/24 is variably subnetted, 4 subnets, 2 masks
  
              t secondary path, L long-lived-stale,
+
      '''198.51.100.254/32''' [110/2] via 192.0.2.1, 03:33:47, GigabitEthernet4
 +
|'''show ipv6 ospf interface brief'''
 +
Interface    PID   Area            Intf ID    Cost  State Nbrs F/C
  
Origin codes: i - IGP, e - EGP, ? - incomplete
+
Lo0          1     0.0.0.0         12         1     LOOP  0/0
  
RPKI validation codes: V valid, I invalid, N Not found
+
Gi1          1     0.0.0.0         7          1     DR    0/0
  
     Network          Next Hop            Metric LocPrf Weight Path
+
Gi4             0.0.0.0         10         1     '''P2P'''   1/1
  
'''*>   2001:DB8:192::/48'''
+
.
  
'''                      ::                       0         32768 i'''
+
'''show ipv6 ospf neighbor'''
  
'''*>   2001:DB8:198::/48'''
+
            OSPFv3 Router with ID (198.51.100.253) (Process ID 1)
  
'''                      ::                       0         32768 i'''
+
Neighbor ID     Pri   State           Dead Time   Interface ID    Interface
  
'''*>   2001:DB8:254::/48'''
+
198.51.100.254    0   '''FULL'''/  -        00:00:33    7               GigabitEthernet4
  
'''                      ::                       0         32768 i'''
+
.
  
Total number of prefixes 3
+
'''show ipv6 route ospf'''
  
'''show bgp ipv6 unicast neighbors 2001:DB8:203::1 received-routes'''
+
IPv6 Routing Table - default - 8 entries
  
BGP table version is 6, local router ID is 198.51.100.254
+
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
  
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
+
       B - BGP, R - RIP, H - NHRP, I1 - ISIS L1
  
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
+
       I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary, D - EIGRP
  
              x best-external, a additional-path, c RIB-compressed,
+
       EX - EIGRP external, ND - ND Default, NDp - ND Prefix, DCE - Destination
  
              t secondary path, L long-lived-stale,
+
       NDr - Redirect, RL - RPL, O - OSPF Intra, OI - OSPF Inter
  
Origin codes: i - IGP, e - EGP, ? - incomplete
+
       OE1 - OSPF ext 1, OE2 - OSPF ext 2, ON1 - OSPF NSSA ext 1
  
RPKI validation codes: V valid, I invalid, N Not found
+
       ON2 - OSPF NSSA ext 2, la - LISP alt, lr - LISP site-registrations
  
     Network          Next Hop            Metric LocPrf Weight Path
+
       ld - LISP dyn-eid, lA - LISP away, le - LISP extranet-policy
  
'''*>   ::/0             2001:DB8:203::1          0             0 203 i'''
+
       lp - LISP publications, a - Application, m - OMP
  
'''*>   2001:DB8:203::/48'''
+
OE2 '''::/0''' [110/1], tag 1
  
'''                      2001:DB8:203::1          0             0 203 i'''
+
     via FE80::5200:FF:FE02:0, GigabitEthernet4
  
Total number of prefixes 2
+
O   '''2001:DB8:254::254/128''' [110/1]
  
+
     via FE80::5200:FF:FE02:0, GigabitEthernet4
  
'''show ipv6 route bgp''' 
+
.
  
IPv6 Routing Table - default - 13 entries
+
.
  
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
+
|
 +
|-
 +
|ポイント
 +
| colspan="3" |IPv4 の OSPFv2 でも IPv6 の OSPFv3 でも、確認するポイントはあまり変わりません。
 +
IPv6 の場合はネクスト ホップがリンク ローカル アドレスになる点は、把握しておいたほうが良いでしょう。
  
       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
+
'''show ip ospf interface brief / show ipv6 ospf interface brief'''
  
       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
+
'''show ip ospf neighbor / show ipv6 ospf neighbor'''
  
       lp - LISP publications, a - Application, m - OMP
+
State が Full になっていること。
  
B   '''::/0''' [20/0], tag 203
 
  
     via FE80::5200:FF:FE01:0, GigabitEthernet4
+
'''show ip route ospf / show ipv6 route ospf'''
  
B   '''2001:DB8:203::/48''' [20/0], tag 203
+
OSPFv2 / OSPFv3 でルートを受信していること。
  
     via FE80::5200:FF:FE01:0, GigabitEthernet4
+
OSPF ではエリアに属しているインターフェースのプレフィックスが、OSPF ルートにインストールされます。
 +
|}
  
.
+
== ゲートウェイ (Core) とホスト (CPE) 確認 ==
 +
=== 要件 ===
 +
ARP エントリに MAC アドレスが表示されること。
  
.
+
IPv6 ネイバーにグローバル ユニキャストアドレスとリンク ローカル アドレスが表示されること。
|
 
|}
 
  
=== 確認のポイント ===
+
==== ゲートウェイ (Core) ====
 +
IPv4 DHCP サーバが有効になっていること。
  
==== State/PfxRcd ====
+
IPv6 ND RA が有効になっていること。
数字が出ているのが正常で、Establish ステータス + 受信しているルート数を意味します。
 
  
Open や Connect は BGP が Up しておらず、異常を意味します。
+
DHCPv6 がインターフェースにおいて、サーバ モードで有効になっていること。
  
==== show ip bgp neighbors <Peer_IP> advertised-routes / show bgp ipv6 unicast neighbors <Peer_IP> advertised-routes ====
+
==== ホスト (CPE) ====
指定した BGP ピアに広報するプレフィックスを表示します。
+
IPv4 DHCP クライアントが有効になっていること
  
この例では自ルータが Null0 インターフェース宛ルートを持っているため、ネクストホップが 0.0.0.0 or :: になっています。
+
IPv6 ND クライアントが有効になっていること。
  
==== show ip bgp neighbors <Peer_IP> received-routes / show bgp ipv6 unicast neighbors <Peer_IP> received-routes ====
+
DHCPv6 がクライアント モードで有効になっていること。
指定した BGP ピアから受信しているプレフィックスを表示します。
 
  
neighbor <Peer_IP> soft-reconfiguration inbound 設定が必要です。
+
=== IPv4 IPv6 確認比較 ===
 +
{| class="wikitable mw-collapsible mw-collapsed"
 +
|+ゲートウェイとホスト 確認サンプル IPv4 vs IPv6
 +
!host
 +
!IPv4
 +
!IPv6
 +
!備考
 +
|-
 +
|Core
 +
|'''show ip interface brief'''
 +
Interface              IP-Address      OK? Method Status                Protocol
  
この表示は BGP の RIB を意味します。
+
GigabitEthernet1       198.51.100.1    YES manual up                    up
  
ネクストホップに到達性がない場合、到達できないため有効なルートに選択されません。
+
.
  
==== show ip route bgp / show ipv6 route bgp ====
+
.
BGP のルーティング テーブルを表示します。
 
  
この表示は FIB を意味します。
+
.
  
== OSPF 確認 ==
+
.
  
=== 要件 ===
+
.
隣接関係を確立したい OSPF インターフェースで有効になっていること。
 
  
OSPF 隣接関係が確立されていること。
+
'''show ip arp Gi1'''
  
=== IPv4 IPv6 確認比較 ===
+
Protocol  Address          Age (min)  Hardware Addr   Type   Interface
{| class="wikitable"
 
|+IPv4 vs IPv6
 
!host
 
!IPv4
 
!IPv6
 
!備考
 
|-
 
|BGP-CE
 
|'''show ip ospf interface brief'''
 
Interface    PID   Area            IP Address/Mask    Cost  State Nbrs F/C
 
  
Lo0          1     0.0.0.0         198.51.100.254/32  1     LOOP  0/0
+
Internet  198.51.100.1            -   5000.0003.0000  ARPA   GigabitEthernet1
  
Gi1          1     0.0.0.       192.0.2.1/30       1     '''P2P'''   1/1
+
Internet  198.51.100.14         104   5000.0004.0003  ARPA   GigabitEthernet1
  
  
'''show ip ospf neighbor'''
+
'''show ip dhcp binding'''
  
Neighbor ID     Pri   State           Dead Time   Address         Interface
+
Bindings from all pools not associated with VRF:
  
198.51.100.253     '''FULL'''-        00:00:31    192.0.2.2       GigabitEthernet1
+
IP address      Client-ID/              Lease expiration        Type       State      Interface
  
 +
                Hardware address/
  
'''show ip route ospf'''
+
                User name
  
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
+
198.51.100.14   0063.6973.636f.2d35.    May 15 2024 02:32 AM    Automatic  Active     GigabitEthernet1
  
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
+
                3030.302e.3030.3034.
  
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
+
                2e30.3030.332d.4769.
  
       E1 - OSPF external type 1, E2 - OSPF external type 2, m - OMP
+
                34
  
       n - NAT, Ni - NAT inside, No - NAT outside, Nd - NAT DIA
 
  
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
+
|'''show ipv6 interface brief'''
 +
GigabitEthernet1       [up/up]
  
       ia - IS-IS inter area, * - candidate default, U - per-user static route
+
    FE80::198:1
  
       H - NHRP, G - NHRP registered, g - NHRP registration summary
+
    2001:DB8:198::1
  
       o - ODR, P - periodic downloaded static route, l - LISP
 
  
       a - application route
+
'''show ipv6 neighbors Gi1'''
  
       + - replicated route, % - next hop override, p - overrides from PfR
+
ND cache expire time is 14400 seconds
  
       & - replicated local route overrides by connected
+
IPv6 Address                              Age Link-layer Addr State Interface
  
Gateway of last resort is 203.0.113.1 to network 0.0.0.0
+
2001:DB8:198:0:9465:2DA7:8F08:1B80          0 5000.0004.0003  REACH Gi1
  
      198.51.100.0/24 is variably subnetted, 4 subnets, 3 masks
+
FE80::5200:FF:FE04:3                        0 5000.0004.0003  REACH Gi1
  
O        '''198.51.100.0/25''' [110/2] via 192.0.2.2, 03:34:12, GigabitEthernet1
 
  
O        '''198.51.100.253/32''' [110/2] via 192.0.2.2, 03:34:12, GigabitEthernet1
+
'''show ipv6 interface Gi1 | in router'''
|'''show ipv6 ospf interface brief'''
 
Interface    PID   Area            Intf ID    Cost  State Nbrs F/C
 
  
Lo0          1     0.0.0.0         12         1     LOOP  0/0
+
  ND router advertisements are sent every 200 seconds
  
Gi1          1     0.0.0.0         7          1     '''P2P'''   1/1
+
  ND router advertisements live for 1800 seconds
  
 +
  ND advertised default router preference is Medium
  
'''show ipv6 ospf neighbor'''
 
  
            OSPFv3 Router with ID (198.51.100.254) (Process ID 1)
+
'''show ipv6 dhcp binding'''
  
Neighbor ID     Pri   State           Dead Time   Interface ID    Interface
+
Client: FE80::5200:FF:FE04:3
  
198.51.100.253    0   '''FULL'''/  -        00:00:32    10              GigabitEthernet1
+
  DUID: 00030001001E14D86300
  
 +
  Username : unassigned
  
'''show ipv6 route ospf'''
+
  VRF : default
  
IPv6 Routing Table - default - 13 entries
+
  IA NA: IA ID 0x000A0001, T1 43200, T2 69120
  
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
+
    Address: 2001:DB8:198:0:9465:2DA7:8F08:1B80
  
       B - BGP, R - RIP, H - NHRP, I1 - ISIS L1
+
            preferred lifetime 86400, valid lifetime 172800
  
       I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary, D - EIGRP
+
            expires at May 16 2024 02:32 AM (166036 seconds)
  
       EX - EIGRP external, ND - ND Default, NDp - ND Prefix, DCE - Destination
 
  
       NDr - Redirect, RL - RPL, O - OSPF Intra, OI - OSPF Inter
+
'''show ipv6 dhcp interface'''
  
       OE1 - OSPF ext 1, OE2 - OSPF ext 2, ON1 - OSPF NSSA ext 1
+
GigabitEthernet1 is in '''server mode'''
  
       ON2 - OSPF NSSA ext 2, la - LISP alt, lr - LISP site-registrations
+
  Using pool: IPv6
  
       ld - LISP dyn-eid, lA - LISP away, le - LISP extranet-policy
+
  Preference value: 0
  
       lp - LISP publications, a - Application, m - OMP
+
  Hint from client: ignored
  
 '''2001:DB8:198::/64''' [110/2]
+
  Rapid-Commit: disabled
 +
|
 +
|-
 +
|CPE
 +
|'''show ip interface brief'''
 +
Interface              IP-Address      OK? Method Status                Protocol
  
     via FE80::5200:FF:FE03:3, GigabitEthernet1
+
<snip>
  
 '''2001:DB8:254::253/128''' [110/1]
+
GigabitEthernet4       198.51.100.14   YES DHCP   up                    up
  
     via FE80::5200:FF:FE03:3, GigabitEthernet1
+
.
  
|
 
|-
 
|Core
 
|'''show ip ospf interface brief'''
 
Interface    PID   Area            IP Address/Mask    Cost  State Nbrs F/C
 
  
Lo0          1     0.0.0.0         198.51.100.253/32  1     LOOP  0/0
+
'''show ip arp Gi4'''
  
Gi4             0.0.0.0         192.0.2.2/30       1     P2P   1/1
+
Protocol  Address          Age (min)  Hardware Addr   Type   Interface
  
Gi1          1     0.0.0.       198.51.100.1/25       DR    0/0
+
Internet  198.51.100.14           -   5000.0004.0003  ARPA   GigabitEthernet4
  
.
+
Internet  198.51.100.1          110   5000.0003.0000  ARPA   GigabitEthernet4
  
'''show ip ospf neighbor'''
 
  
Neighbor ID     Pri   State           Dead Time   Address         Interface
+
'''show ip route'''
  
198.51.100.254    0   '''FULL'''/  -        00:00:36    192.0.2.1       GigabitEthernet4
+
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
 
 
.
 
 
 
.
 
 
 
'''show ip route ospf'''
 
 
 
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
 
  
 
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
 
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
1,403行目: 1,716行目:
 
       & - replicated local route overrides by connected
 
       & - replicated local route overrides by connected
  
Gateway of last resort is 192.0.2.1 to network 0.0.0.0
+
Gateway of last resort is 198.51.100.1 to network 0.0.0.0
 +
 
 +
'''S*    0.0.0.0/0''' [254/0] via 198.51.100.1
  
O*E2  '''0.0.0.0/0''' [110/1] via 192.0.2.1, 03:33:47, GigabitEthernet4
+
      198.51.100.0/24 is variably subnetted, 2 subnets, 2 masks
  
      198.51.100.0/24 is variably subnetted, 4 subnets, 2 masks
+
      198.51.100.0/25 is directly connected, GigabitEthernet4
  
      '''198.51.100.254/32''' [110/2] via 192.0.2.1, 03:33:47, GigabitEthernet4
+
      198.51.100.14/32 is directly connected, GigabitEthernet4
|'''show ipv6 ospf interface brief'''
 
Interface    PID   Area            Intf ID    Cost  State Nbrs F/C
 
  
Lo0          1     0.0.0.0         12         1     LOOP  0/0
 
  
Gi1          1     0.0.0.0         7          1     DR    0/0
+
'''show ip interface Gi4 | in DHCP'''
  
Gi4          1     0.0.0.0         10         1     '''P2P'''   1/1
+
  Address determined by '''DHCP'''
  
 
.
 
.
  
'''show ipv6 ospf neighbor'''
+
.
  
            OSPFv3 Router with ID (198.51.100.253) (Process ID 1)
+
.
  
Neighbor ID     Pri   State           Dead Time   Interface ID    Interface
+
.
  
198.51.100.254    0   '''FULL'''/  -        00:00:33    7               GigabitEthernet4
+
.
  
 
.
 
.
  
'''show ipv6 route ospf'''
+
.
  
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
+
.
  
OE2 '''::/0''' [110/1], tag 1
+
.
  
     via FE80::5200:FF:FE02:0, GigabitEthernet4
+
.
  
O   '''2001:DB8:254::254/128''' [110/1]
+
'''show ip name-servers'''
  
     via FE80::5200:FF:FE02:0, GigabitEthernet4
+
2001:4860:4860::8888
  
.
+
8.8.8.8
  
.
+
|'''show ipv6 interface brief'''
 +
<snip>
  
|
+
GigabitEthernet4       [up/up]
|}
 
  
=== 確認のポイント ===
+
    FE80::5200:FF:FE04:3
IPv4 の OSPFv2 でも IPv6 の OSPFv3 でも、確認するポイントはあまり変わりません。
 
  
IPv6 の場合はネクスト ホップがリンク ローカル アドレスになる点は、把握しておいたほうが良いでしょう。
+
    2001:DB8:198:0:9465:2DA7:8F08:1B80
  
* リンク ローカル アドレスを複数のインターフェースで同一のプレフィックスを使用できない
 
  
==== show ip ospf interface brief / show ipv6 ospf interface brief ====
+
'''show ipv6 neighbors Gi4'''
指定したネットワーク タイプが表示されていること。
 
  
ローカルとリモートで同一のタイプが表示されていること。
+
ND cache expire time is 14400 seconds
  
==== show ip ospf neighbor / show ipv6 ospf neighbor ====
+
IPv6 Address                              Age Link-layer Addr State Interface
State が Full になっていること。
+
 
 +
2001:DB8:198::1                             0 5000.0003.0000  REACH Gi4
  
==== show ip route ospf / show ipv6 route ospf ====
+
FE80::198:1                                 0 5000.0003.0000  REACH Gi4
OSPFv2 / OSPFv3 でルートを受信していること。
 
  
OSPF ではエリアに属しているインターフェースのプレフィックスが、OSPF ルートにインストールされます。
 
  
== ゲートウェイ (Core) とホスト (CPE) 確認 ==
+
'''show ipv6 route'''
=== 要件 ===
 
ARP エントリに MAC アドレスが表示されること。
 
  
IPv6 ネイバーにグローバル ユニキャストアドレスとリンク ローカル アドレスが表示されること。
+
IPv6 Routing Table - default - 3 entries
  
==== ゲートウェイ (Core) ====
+
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
IPv4 DHCP サーバが有効になっていること。
 
  
IPv6 ND RA が有効になっていること。
+
       B - BGP, R - RIP, H - NHRP, I1 - ISIS L1
  
DHCPv6 がインターフェースにおいて、サーバ モードで有効になっていること。
+
       I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary, D - EIGRP
  
===== ホスト (CPE) =====
+
       EX - EIGRP external, ND - ND Default, NDp - ND Prefix, DCE - Destination
IPv4 DHCP クライアントが有効になっていること
 
  
IPv6 ND クライアントが有効になっていること。
+
       NDr - Redirect, RL - RPL, O - OSPF Intra, OI - OSPF Inter
  
DHCPv6 がインターフェースにおいて、クライアント モードで有効になっていること。
+
       OE1 - OSPF ext 1, OE2 - OSPF ext 2, ON1 - OSPF NSSA ext 1
  
=== IPv4 IPv6 確認比較 ===
+
       ON2 - OSPF NSSA ext 2, la - LISP alt, lr - LISP site-registrations
{| class="wikitable"
 
|+IPv4 vs IPv6
 
!host
 
!IPv4
 
!IPv6
 
!備考
 
|-
 
|Core
 
|'''show ip interface brief'''
 
Interface              IP-Address      OK? Method Status                Protocol
 
  
GigabitEthernet1       198.51.100.1    YES manual up                    up
+
       ld - LISP dyn-eid, lA - LISP away, le - LISP extranet-policy
  
.
+
       lp - LISP publications, a - Application, m - OMP
  
.
+
'''ND  ::/0''' [2/0]
  
.
+
     via FE80::198:1, GigabitEthernet4
  
.
+
LC  2001:DB8:198:0:9465:2DA7:8F08:1B80/128 [0/0]
  
.
+
     via GigabitEthernet4, receive
  
'''show ip arp Gi1'''
+
L   FF00::/8 [0/0]
  
Protocol  Address          Age (min)  Hardware Addr   Type   Interface
+
     via Null0, receive
  
Internet  198.51.100.1            -   5000.0003.0000  ARPA   GigabitEthernet1
+
.
  
Internet  198.51.100.14         104   5000.0004.0003  ARPA   GigabitEthernet1
 
  
 +
'''show ipv6 dhcp interface'''
  
'''show ip dhcp binding'''
+
GigabitEthernet4 is in '''client mode'''
  
Bindings from all pools not associated with VRF:
+
  Prefix State is IDLE (0)
  
IP address      Client-ID/              Lease expiration        Type       State      Interface
+
  Information refresh timer expires in 22:05:55
  
                Hardware address/
+
  Address State is OPEN
  
                User name
+
  Renew for address will be sent in 10:05:55
  
198.51.100.14   0063.6973.636f.2d35.    May 15 2024 02:32 AM    Automatic  Active     GigabitEthernet1
+
  List of known servers:
  
                3030.302e.3030.3034.
+
    Reachable via address: FE80::198:1
  
                2e30.3030.332d.4769.
+
    DUID: 00030001001E493C5C00
  
                34
+
    Preference: 0
  
 +
    Configuration parameters:
  
|'''show ipv6 interface brief'''
+
      '''IA NA''': IA ID 0x000A0001, T1 43200, T2 69120
GigabitEthernet1       [up/up]
 
  
    FE80::198:1
+
        Address: '''2001:DB8:198:0:9465:2DA7:8F08:1B80/128'''
  
    2001:DB8:198::1
+
                preferred lifetime 86400, valid lifetime 172800
  
 +
                expires at May 16 2024 02:32 AM (165955 seconds)
  
'''show ipv6 neighbors Gi1'''
+
      DNS server: 2001:4860:4860::8888
  
ND cache expire time is 14400 seconds
+
      Information refresh time: 0
  
IPv6 Address                              Age Link-layer Addr State Interface
+
  Prefix Rapid-Commit: disabled
  
2001:DB8:198:0:9465:2DA7:8F08:1B80          0 5000.0004.0003  REACH Gi1
+
  Address Rapid-Commit: disabled
  
FE80::5200:FF:FE04:3                        0 5000.0004.0003  REACH Gi1
 
  
 +
'''show ip name-servers'''
  
'''show ipv6 interface Gi1 | in router'''
+
2001:4860:4860::8888
  
  ND router advertisements are sent every 200 seconds
+
8.8.8.8
 +
|
 +
|-
 +
|ポイント
 +
| colspan="3" |設定でも同様ですが、IPv4 の DHCP は IPv6 だと ICMPv6 ND RA + DHCPv6 に変わっているため、コマンドも別々に取る必要があります。
  
  ND router advertisements live for 1800 seconds
 
  
  ND advertised default router preference is Medium
+
'''show ip interface brief / show ipv6 interface brief'''
  
 +
設定している IPv4 IPv6 を確認します。
  
'''show ipv6 dhcp binding'''
+
ping を打つ場合など、ここで表示された値をコピペして、対向側で ping を打つと確実性が高いオペレーションになります。
  
Client: FE80::5200:FF:FE04:3
 
  
  DUID: 00030001001E14D86300
+
'''show ip route / show ipv6 route'''
  
  Username : unassigned
+
DHCP クライアントの場合、デフォルト ルートはスタティック ルート扱いになります。
  
  VRF : default
+
DHCPv6 はデフォルト ルートを配布できないため、ICMPv6 ND RA を使ってデフォルト ゲートウェイが設定されていることを確認します。
 
 
  IA NA: IA ID 0x000A0001, T1 43200, T2 69120
 
 
 
    Address: 2001:DB8:198:0:9465:2DA7:8F08:1B80
 
 
 
            preferred lifetime 86400, valid lifetime 172800
 
 
 
            expires at May 16 2024 02:32 AM (166036 seconds)
 
 
 
 
 
'''show ipv6 dhcp interface'''
 
 
 
GigabitEthernet1 is in '''server mode'''
 
 
 
  Using pool: IPv6
 
 
 
  Preference value: 0
 
 
 
  Hint from client: ignored
 
 
 
  Rapid-Commit: disabled
 
|
 
|-
 
|CPE
 
|'''show ip interface brief'''
 
Interface              IP-Address      OK? Method Status                Protocol
 
 
 
<snip>
 
 
 
GigabitEthernet4       198.51.100.14   YES DHCP   up                    up
 
 
 
.
 
 
 
 
 
'''show ip arp Gi4'''
 
 
 
Protocol  Address          Age (min)  Hardware Addr   Type   Interface
 
 
 
Internet  198.51.100.14           -   5000.0004.0003  ARPA   GigabitEthernet4
 
 
 
Internet  198.51.100.1          110   5000.0003.0000  ARPA   GigabitEthernet4
 
 
 
 
 
'''show ip route'''
 
 
 
Codes: L - local, C - connected, S - static, 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, m - OMP
 
 
 
       n - NAT, Ni - NAT inside, No - NAT outside, Nd - NAT DIA
 
 
 
       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
 
 
 
       H - NHRP, G - NHRP registered, g - NHRP registration summary
 
 
 
       o - ODR, P - periodic downloaded static route, l - LISP
 
 
 
       a - application route
 
 
 
       + - replicated route, % - next hop override, p - overrides from PfR
 
 
 
       & - replicated local route overrides by connected
 
 
 
Gateway of last resort is 198.51.100.1 to network 0.0.0.0
 
 
 
'''S*    0.0.0.0/0''' [254/0] via 198.51.100.1
 
 
 
      198.51.100.0/24 is variably subnetted, 2 subnets, 2 masks
 
 
 
C        198.51.100.0/25 is directly connected, GigabitEthernet4
 
 
 
L        198.51.100.14/32 is directly connected, GigabitEthernet4
 
 
 
 
 
'''show ip interface Gi4 | in DHCP'''
 
 
 
  Address determined by '''DHCP'''
 
 
 
.
 
 
 
.
 
 
 
.
 
 
 
.
 
 
 
.
 
 
 
.
 
 
 
.
 
 
 
.
 
 
 
.
 
 
 
.
 
 
 
.
 
 
 
.
 
 
 
.
 
 
 
.
 
 
 
.
 
 
 
.
 
 
 
.
 
 
 
.
 
 
 
.
 
 
 
'''show ip name-servers'''
 
 
 
2001:4860:4860::8888
 
 
 
8.8.8.8
 
 
 
|'''show ipv6 interface brief'''
 
<snip>
 
 
 
GigabitEthernet4       [up/up]
 
 
 
    FE80::5200:FF:FE04:3
 
 
 
    2001:DB8:198:0:9465:2DA7:8F08:1B80
 
 
 
 
 
'''show ipv6 neighbors Gi4'''
 
 
 
ND cache expire time is 14400 seconds
 
 
 
IPv6 Address                              Age Link-layer Addr State Interface
 
 
 
2001:DB8:198::1                             0 5000.0003.0000  REACH Gi4
 
 
 
FE80::198:1                                 0 5000.0003.0000  REACH Gi4
 
 
 
 
 
'''show ipv6 route'''
 
 
 
IPv6 Routing Table - default - 3 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
 
 
 
'''ND  ::/0''' [2/0]
 
 
 
     via FE80::198:1, GigabitEthernet4
 
 
 
LC  2001:DB8:198:0:9465:2DA7:8F08:1B80/128 [0/0]
 
 
 
     via GigabitEthernet4, receive
 
 
 
L   FF00::/8 [0/0]
 
 
 
     via Null0, receive
 
 
 
.
 
 
 
 
 
'''show ipv6 dhcp interface'''
 
 
 
GigabitEthernet4 is in '''client mode'''
 
 
 
  Prefix State is IDLE (0)
 
 
 
  Information refresh timer expires in 22:05:55
 
 
 
  Address State is OPEN
 
 
 
  Renew for address will be sent in 10:05:55
 
 
 
  List of known servers:
 
 
 
    Reachable via address: FE80::198:1
 
 
 
    DUID: 00030001001E493C5C00
 
 
 
    Preference: 0
 
 
 
    Configuration parameters:
 
 
 
      '''IA NA''': IA ID 0x000A0001, T1 43200, T2 69120
 
 
 
        Address: '''2001:DB8:198:0:9465:2DA7:8F08:1B80/128'''
 
  
                preferred lifetime 86400, valid lifetime 172800
 
  
                expires at May 16 2024 02:32 AM (165955 seconds)
+
'''show ip interface Gi4 | in DHCP / show ipv6 dhcp interface'''
  
      DNS server: 2001:4860:4860::8888
+
ホストで DHCP クライアント、DHCPv6 クライアントであることを確認します。
  
      Information refresh time: 0
+
DHCPv6 はアドレスだけ (IANA) でなく、プレフィックスを受信する (IAPD) ことも可能です。
 
 
  Prefix Rapid-Commit: disabled
 
 
 
  Address Rapid-Commit: disabled
 
  
  
 
'''show ip name-servers'''
 
'''show ip name-servers'''
  
2001:4860:4860::8888
+
DHCP と DHCPv6 で受信した DNS サーバ情報を確認します。
  
8.8.8.8
+
個別に確認するコマンドは、IOS-XE に無いようです。
|
 
 
|}
 
|}
  
=== 確認のポイント ===
+
= リファレンス =
設定でも同様ですが、IPv4 の DHCP は IPv6 だと ICMPv6 ND RA + DHCPv6 に変わっているため、コマンドも別々に取る必要があります。
 
  
==== show ip interface brief / show ipv6 interface Brief ====
+
=== [https://www.cisco.com/c/ja_jp/support/routers/cloud-services-router-1000v-series/products-installation-and-configuration-guides-list.html Cisco Cloud Services Router 1000V シリーズ コンフィギュレーション ガイド] ===
設定している IPv4 IPv6 を確認します。
+
* [https://www.cisco.com/c/ja_jp/td/docs/ios-xml/ios/iproute_bgp/configuration/xe-16-10/irg-xe-16-10-book.html IP ルーティング:BGP コンフィギュレーション ガイド(Cisco IOS XE Gibraltar 16.10.x 向け)]
  
ping を打つ場合など、ここで表示された値をコピペして、対向側で ping を打つと確実性が高いオペレーションになります。
+
* [https://www.cisco.com/c/dam/global/ja_jp/td/docs/ios-xml/ios/iproute_ospf/configuration/xe-16/iro-xe-16-book.pdf IP ルーティング:OSPF コンフィギュレーションガイド]
  
==== show ip route / show ipv6 route ====
+
* [https://www.cisco.com/c/dam/global/ja_jp/td/docs/ios-xml/ios/ipv6_basic/configuration/xe-16/ip6b-xe-16-book.pdf IPv6 アドレッシングおよび基本接続コンフィギュレーション ガイド]
DHCP クライアントの場合、デフォルト ルートはスタティック ルート扱いになります。
 
  
DHCPv6 はデフォルト ルートを配布できないため、ICMPv6 ND RA を使ってデフォルト ゲートウェイが設定されていることを確認します。
+
=== [https://www.cisco.com/c/ja_jp/support/docs/ip/border-gateway-protocol-bgp/19345-bgp-noad.html アドバタイズしないボーダー ゲートウェイ プロトコル ルートのトラブルシューティング] ===
 
 
==== show ip interface Gi4 | in DHCP / show ipv6 dhcp interface ====
 
ホストで DHCP クライアント、DHCPv6 クライアントであることを確認します。
 
 
 
DHCPv6 はアドレスだけ (IANA) でなく、プレフィックスを受信する (IAPD) ことも可能です。
 
 
 
==== show ip name-servers ====
 
DHCP と DHCPv6 で受信した DNS サーバ情報を確認します。
 
 
 
個別に確認するコマンドは、IOS-XE に無いようです。
 
 
[[カテゴリ:ラボ]]
 
[[カテゴリ:ラボ]]
 
[[カテゴリ:IPv6]]
 
[[カテゴリ:IPv6]]

2024年5月27日 (月) 15:37時点における最新版

1981 年に IPv6 が最初にプロトコルとして制定されてから、40 年以上経過し、2011 年 6 月には World IPv6 Day が行われ 10 年以上が経過しました。

しかしながら ISP を除いてまだまだ案件が多い状況とは言い難く、苦手に思っている人が多いのではないかと思います。

このページでは IPv4 が使える人向けに、ISP の NW で IPv6 を構築するための情報を扱います。

ターゲット

IPv4 はだいたい設計・検証・構築できるけど、IPv6 に自信がない人向けです。

エンタープライズは範囲外で、主に ISP 向けの NW です。

扱うプロトコル

BGP

OSPFv2

OSPFv3

DHCP

DHCPv6

ICMPv6 ND RA (Neighbor Discovery Router Advertisement)

ドキュメント

まずは以下を読みましょう。無料版もあります。

プロフェッショナルIPv6 第2版


内容は網羅的になっていますので、最初からすべて読まなくても大丈夫です。

まずは目次からどのような機能があるのか、ざっと把握するようにして、辞書を引くように上記のドキュメントやコンフィギュレーション ガイドなどの情報を活用できるような状態を目指します。

ラボ

エンジニアであれば、検証環境で実際に動作するか、実証できるようにすることが求められます。

EVE-NG や CML , 実機を用いて検証できる環境を整えましょう。

ドキュメントを読んでも思ったようには動かせません。設定した通りに動きます。(動かせない)


次の段落以降で、筆者が作成した EVE-NG + Cisco CSR1000V で作成したラボの情報を記載します。

IPv6 で知っておいたほうが良いこと

  • ARP の役割は、ICMPv6 が行う
  • DHCP の役割は、DHCPv6 + ICMPv6 ND RA (Neighbor Discovery Router Advertisement) が行う

IP アドレッシング

文書用 IP アドレスを元に、サブネット分割して各ホストに割り当てました。

IPv4

  • 192.0.2.0/24 (TEST-NET-1) : LAN 用プライベート IP
    • /30 に分割して、OSPF P2P に使用
  • 198.51.100.0/24 (TEST-NET-2) : 内部用グローバル IP
    • 198.51.100.0/25 : CPE に使用
    • 198.51.100.128/25 : /32 単位で Loopback アドレスに使用
  • 203.0.113.0/24 (TEST-NET-3) : 外部用グローバル IP
    • BGP-PE に割り当て
    • 疎通確認の宛先に使用

IPv6

IPv6 は文書用アドレスが /32 1 つしかないため、/48 で複数にサブネット分割して使用します。

  • 2001:db8::/32
    • 2001:db8:203::/48 : BGP-PE
    • 2001:db8:192::/48 : OSPF P2P
    • 2001:db8:198::/48 : CPE
    • 2001:db8:254::/48 : Loopback
ネットワーク アドレス一覧
host Interface IPv4 Network IPv4 Host BGP IPv4 広報アドレス IPv6 Network IPv6 Host BGP IPv6 広報アドレス 備考
BGP-PE Lo0 203.0.113.88/32 .88 - 2001:db8:203:88::/128 ::88 - BGP / OSPF ルータ ID と疎通確認に使用

CPE からここに ping する

Gi1 203.0.113.0/30 .1 203.0.113.0/24 2001:db8:203::/64 :1 2001:db8:203::/48 BGP P2P セグメント

WAN 用ですべてのホストから疎通可能

BGP-CE Gi4 .2 198.51.100.0/24 :2 2001:db8:192::/48

2001:db8:198::/48

2001:db8:254::/48

Lo0 198.51.100.254/32 .254 - 2001:db8:254::/128 :254 - BGP / OSPF ルータ ID と疎通確認に使用
Gi1 192.0.2.0/30 .1 - 2001:db8:192::/64 :1 - OSPF P2P セグメント

LAN 用で BGP-PE には疎通不可

Core Gi4 .2 - :2 -
Lo0 198.51.100.253/32 .253 - 2001:db8:254::/128 :253 - OSPF ルータ ID と疎通確認に使用
Gi1 198.51.100.0/25 .1 - 2001:db8:198::/64 :1 -
CPE Gi4 .11 - :11 - グローバル IP を模擬

BGP-PE までアクセスさせる

構成図

この例では CSR1000V IOS-XE 17.03.04a を使用しています。

20240514_IPv6_Lab_Diagram

要件

各機器の Lo0 同士で疎通できること。

最終的に BGP-PE Lo0 と CPE Gi4 が IPv4 と IPv6 で通信できること。

どのコマンドで正常性が確認できるか洗い出すこと。

疎通確認

最終的に以下の疎通が取れるのが想定になります。

ping / traceroute
host IPv4 IPv6 備考
CPE ping 203.0.113.88

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 203.0.113.88, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 2/2/3 ms


traceroute 203.0.113.88

Type escape sequence to abort.

Tracing the route to 203.0.113.88

VRF info: (vrf in name/id, vrf out name/id)

  1 198.51.100.1 1 msec 2 msec 2 msec

  2 192.0.2.1 2 msec 3 msec 2 msec

  3 203.0.113.1 5 msec *  4 msec

ping 2001:DB8:203:88::88

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 2001:DB8:203:88::88, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 2/2/3 ms


traceroute 2001:DB8:203:88::88

Type escape sequence to abort.

Tracing the route to 2001:DB8:203:88::88

  1 2001:DB8:198::1 3 msec 2 msec 2 msec

  2 2001:DB8:192::1 3 msec 3 msec 2 msec

  3 2001:DB8:203::1 4 msec 4 msec 4 msec

サンプルコンフィグ

IPv4 と IPv6 でコンフィグを比較します。

例示しているコンフィグは、IPv4 と IPv6 でそれぞれ抜き出しているため、実際には混合されて show running-config で表示されます。

各プロトコルのコンフィグは、デフォルトで表示されないようにしてあるため、ラボで試してできないときに見てみると良いと思います。

BGP コンフィグ

BGP 要件

IPv4 IPv6 デュアル スタックで設定します。router-id を Lo0 のアドレスで設定してください。

疎通するための設定を行います。

  • グローバル IP を BGP で対向 AS に広報します
  • アドレスファミリは IPv4 , IPv6 それぞれに設定します

以下が達成できること。

  • BGP-PE Lo0 と BGP-CE Lo0 間で ping 疎通が成功すること

IPv4 IPv6 コンフィギュレーション比較

BGP コンフィグ サンプル IPv4 vs IPv6
host IPv4 IPv6 備考
BGP-PE
ip routing
!
 interface GigabitEthernet1
  description BGP-CE_Gi4
  ip address 203.0.113.1 255.255.255.252
 
 
 !
 router bgp 203
  bgp router-id 203.0.113.88
  bgp log-neighbor-changes
  neighbor 203.0.113.2 remote-as 198
 !
  address-family ipv4
   network 0.0.0.0
   network 203.0.113.0
   no neighbor 2001:DB8:203::2 activate
   neighbor 203.0.113.2 activate
   neighbor 203.0.113.2 soft-reconfiguration inbound
   default-information originate
  exit-address-family
  !
 ip route 0.0.0.0 0.0.0.0 Null0 254
 ip route 203.0.113.0 255.255.255.0 Null0 254
ipv6 unicast-routing
!
  interface GigabitEthernet1
   description BGP-CE_Gi4
   ipv6 address 2001:DB8:203::1/64
   ipv6 enable
   ipv6 nd ra suppress all
  !
  router bgp 203
   bgp router-id 203.0.113.88
   bgp log-neighbor-changes
   neighbor 2001:DB8:203::2 remote-as 198
  !
   address-family ipv6
    network ::/0
   network 2001:DB8:203::/48
 
   neighbor 2001:DB8:203::2 activate
   neighbor 2001:DB8:203::2 soft-reconfiguration inbound
   default-information originate
  exit-address-family
  !
  ipv6 route ::/0 Null0 254
 ipv6 route 2001:DB8:203::/48 Null0 254
BGP-CE
ip routing
!
  interface GigabitEthernet4
   description BGP-PE_Gi1
   ip address 203.0.113.2 255.255.255.252
  
  
  !
  router bgp 198
   bgp router-id 198.51.100.254
   bgp log-neighbor-changes
   neighbor 203.0.113.1 remote-as 203
  !
   address-family ipv4
    network 198.51.100.0
  
  
    no neighbor 2001:DB8:203::1 activate
    neighbor 203.0.113.1 activate
    neighbor 203.0.113.1 soft-reconfiguration inbound
   exit-address-family
   !
  ip route 198.51.100.0 255.255.255.0 Null0 254 

.
ipv6 unicast-routing
!
 interface GigabitEthernet4
  description BGP-PE_Gi1
  ipv6 address 2001:DB8:203::2/64
  ipv6 enable
  ipv6 nd ra suppress all
 !
 router bgp 198
  bgp router-id 198.51.100.254
  bgp log-neighbor-changes
  neighbor 2001:DB8:203::1 remote-as 203
  !
  address-family ipv6
   network 2001:DB8:192::/48
   network 2001:DB8:198::/48
   network 2001:DB8:254::/48
 
   neighbor 2001:DB8:203::1 activate
   neighbor 2001:DB8:203::1 soft-reconfiguration inbound
  exit-address-family
  !
 ipv6 route 2001:DB8:192::/48 Null0 254
 ipv6 route 2001:DB8:198::/48 Null0 254
 ipv6 route 2001:DB8:254::/48 Null0 254
ポイント ipv6 nd ra suppress all

ルータ間でルーティング プロトコルを動作させる場合、ルータを広報する ICMPv6 RA (ルータ アドバタイズメント) は無効化しましょう。

  • EVPN で RFC5549 を実装したい場合は、あえて有効化する場合もあります

address-family ipv6

デュアル スタックの IPv6 で BGP ピアを確立させる場合、ここで設定します。

IPv4 BGP ピアで IPv6 ネットワークを受信・広報することも可能と思われますが、v6 ルーティングに v4 ネクストホップを使うのは特別な設定が要ると思われます。

商用でも筆者は見たことがありません。(逆はあり)

ipv6 route <内部ルート> Null0 254

BGP でルートを広報する場合、IGP でルートを持っている (=自 AS でルートを保持している) ことが必要です。

この例では Null0 インターフェース宛のルートを持つことで、常に IGP でルートを持つように設定しています。

総評

BGP でルート広報・受信する分には、IPv4 であっても IPv6 であってもそこまで違いはありません。

同じような感覚で設定できます。

OSPF コンフィグ

要件

router-id を Lo0 のアドレスで設定してください。

OSPF で LAN のルートを送受信します。

  • OSPFv2 で IPv4
  • OSPFv3 で IPv6

以下が達成できること。

  • BGP-CE Lo0 と Core Lo0 間で ping 疎通が成功すること
  • BGP-PE Lo0 と Core Lo0 間で ping 疎通が成功すること

以下の設定は禁止します。

  • BGP-PE の BGP ルートを、OSPF に再配布する

IPv4 IPv6 コンフィギュレーション比較

OSPF コンフィグ サンプル IPv4 vs IPv6
host IPv4 IPv6 備考
BGP-CE
ip routing
!
 interface Loopback0
  description Router-ID
  ip address 198.51.100.254 255.255.255.255
 
 !
 interface GigabitEthernet1
  description Core_Gi4
  ip address 192.0.2.1 255.255.255.252
  
  
 
  ip ospf network point-to-point
 !
 router ospf 1
  router-id 198.51.100.254
  passive-interface default
  no passive-interface GigabitEthernet1
  network 192.0.2.0 0.0.0.3 area 0.0.0.0
  network 198.51.100.254 0.0.0.0 area 0.0.0.0
  default-information originate
ipv6 unicast-routing
!
  interface Loopback0
   description Router-ID
   ipv6 address 2001:DB8:254::254/128
   ipv6 ospf 1 area 0.0.0.0
  !
  interface GigabitEthernet1
   description Core_Gi4
   ipv6 address 2001:DB8:192::1/64
   ipv6 enable
   ipv6 nd ra suppress all
   ipv6 ospf 1 area 0.0.0.0
   ipv6 ospf network point-to-point
  !
  ipv6 router ospf 1
   router-id 198.51.100.254
   default-information originate
   passive-interface default
   no passive-interface GigabitEthernet1 

.
Core
ip routing
!
 interface Loopback0
  description Router-ID
  ip address 198.51.100.253 255.255.255.255
 
 !
 interface GigabitEthernet4
  description BGP-CE_Gi1
  ip address 192.0.2.2 255.255.255.252
 
 
 
  ip ospf network point-to-point
 !
 router ospf 1
  router-id 198.51.100.253
  passive-interface default
  no passive-interface GigabitEthernet4
  network 192.0.2.0 0.0.0.3 area 0.0.0.0
  network 198.51.100.0 0.0.0.127 area 0.0.0.0
  network 198.51.100.253 0.0.0.0 area 0.0.0.0
ipv6 unicast-routing
!
   interface Loopback0
    description Router-ID
    ipv6 address 2001:DB8:254::253/128
    ipv6 ospf 1 area 0.0.0.0
   !
   interface GigabitEthernet4
    description BGP-CE_Gi1
    ipv6 address 2001:DB8:192::2/64
    ipv6 enable
    ipv6 nd ra suppress all
    ipv6 ospf 1 area 0.0.0.0
    ipv6 ospf network point-to-point
   !
   ipv6 router ospf 1
    router-id 198.51.100.253
    passive-interface default
    no passive-interface GigabitEthernet4 


.
ポイント IPv4 と IPv6 では、エリア指定の方法が異なります。
  • IPv4 の OSPFv2 では、OSPF のエリアに参加させるインターフェースを router ospf 配下の network で指定します
  • IPv6 の OSPFv3 では、インターフェースで直接指定します

OSPFv3 で address-family ipv4 と ipv6 を設定する方法もあります。


passive-interface default

インターフェースの設定をデフォルトでパッシブとし、OSPF Hello を送信させないようにします。

IPv4 では network , IPv6 では area を指定することで、OSPF に参加させることが可能です。

このとき OSPF が動作しているホストが存在すると、OSPF ネイバーが意図せず隣接関係を確立してしまう場合があります。

このように意図しない隣接関係の確立を防ぐため、特に複数のホストを収容するブロードキャスト ネットワークのホストでは passive-interface default が推奨される設定になります。


no passive-interface <インターフェース ID>

OSPF 隣接関係を確立したいインターフェースは、no passive-interface で明示的に OSPF Hello を送受信させるようにします。


ip ospf network point-to-point / ipv6 ospf network point-to-point

/30 や /64 など、参加しているホストが 1:1 接続の場合は、ネットワークタイプをポイントツーポイントに設定します。

  • 隣接関係の確立を早めるため
  • 障害時の切り替え時間を短縮するため


default-information originate

デフォルト ルートを OSPF に広報します。

BGP や Null0 ルートなどでデフォルト ルートを持っている場合に広報されます。

持っていなくても広報したい場合、alway オプションをつけると常に広報されます。


ip address / ipv6 address

IPv4 では OSPF に IPv4 アドレスは必須ですが、IPv6 では OSPFv3 にグローバル ユニキャスト アドレスは必須ではありません。

ただ、traceroute の経路確認のため、グローバル ユニキャスト アドレスは設定するのが推奨です。


ipv6 enable

IPv6 リンク ローカル アドレスを生成し、インターフェースで IPv6 を有効化します。

OSPFv3 はルーティングにリンク ローカル アドレスを使用するため、このコマンドか、手動でリンク ローカル アドレスを設定することが必要です。

総評

OSPF でルート広報・受信には、以下の異なる点があります。

  • ルートを広報・受信する分には、OSPFv3 で IPv6 グローバル ユニキャストを設定する必要がない
    • traceroute が分かりづらいため、設定したほうが良い
  • エリアの設定が router ospf モードか、インターフェース モードで行うかという違いがある

ゲートウェイ (Core) とホスト (CPE) コンフィグ

要件

固定 IPv4 IPv6 をデュアル スタックで設定します。

ゲートウェイ (Core)

IPv4 は DHCP でデフォルト ゲートウェイを広報します。

IPv6 は ICMPv6 でデフォルト ゲートウェイを広報します。アドレスと DNS は DHCPv6 サーバから広報します。

ホスト (CPE)

IPv4 : DHCP で IP アドレスと DNS サーバ情報、デフォルト ゲートウェイを取得します。

IPv6 : DHCPv6 で IP アドレス DNS サーバ情報を取得します。デフォルト ゲートウェイは ICMPv6 ND RA で取得します。

疎通確認

CPE から Core Lo0 に疎通できること

CPE から BGP-CE Lo0 に疎通できること

CPE から BGP-PE Lo0 に疎通できること

IPv6 コンフィギュレーション比較

ゲートウェイとホスト コンフィグ サンプル IPv4 vs IPv6
host IPv4 IPv6 備考
Core
ip routing
!
  ip dhcp excluded-address 198.51.100.1 198.51.100.10
  !
  ip dhcp pool IPv4
   network 198.51.100.0 255.255.255.128
   default-router 198.51.100.1
   dns-server 8.8.8.8
  !
  interface GigabitEthernet1
   description CPE_Gi4
  
   ip address 198.51.100.1 255.255.255.128 



.
ipv6 unicast-routing
!
 
 !
 ipv6 dhcp pool IPv6
  address prefix 2001:DB8:198::/64
 
  dns-server 2001:4860:4860::8888
 !
 interface GigabitEthernet1
  description CPE_Gi4
  ipv6 address FE80::198:1 link-local
  ipv6 address 2001:DB8:198::1/64
  ipv6 enable
  ipv6 nd prefix default no-advertise
  ipv6 nd managed-config-flag
  ipv6 nd other-config-flag
  ipv6 dhcp server IPv6
CPE
ip routing
!
  interface GigabitEthernet4
   description Core_Gi1
   ip address dhcp 



.
ipv6 unicast-routing
!
 interface GigabitEthernet4
  description Core_Gi1
  ipv6 address dhcp
  ipv6 address autoconfig default
  ipv6 enable
  ipv6 nd ra suppress all
  ipv6 dhcp client request vendor
ポイント IPv4 と異なる最大の点は、ゲートウェイの設定は ICMPv6 で配布する点が IPv4 と最も異なる点です。

IPv6 は最初期に ICMPv6 で何でも配布しよう、と RFC で考えられていましたが、現在の ISP では DHCPv6 で配布するケースが多数です。

このため、ICMPv6 ではアドレスの配布を停止するが、ゲートウェイの広報は行う、DHCPv6 サーバを使用する、という設定が必要になります。

また、継続してゲートウェイの設定を広報・受信するため、マルチキャストの IPv6 ND RA が、定期的に送信・受信されることが重要です。


ipv6 address <リンク ローカル アドレス> link-local

固定 IPv6 を設定するホストがいる環境では、設定するのが推奨です。

これはルータをリプレースした際にリンク ローカル アドレスが変わってしまい、ホストのデフォルト ルート ネクストホップも変化してしまうためです。

また、fe80::/64 となるように設定します。

  • Windows Firewall が fe80::/64 でフィルタリングしているため


ipv6 nd prefix default no-advertise

ICMPv6 ND のアドレス広報を停止します。


ipv6 nd managed-config-flag

アドレスやプレフィックスの広報を DHCPv6 サーバに管理させます。

(デフォルトは ND RA)


ipv6 nd other-config-flag

DNS サーバの広報を、DHCPv6 サーバに管理させます。


ipv6 dhcp server <Pool 名>

DHCPv6 サーバを有効にします。

商用ではリレーエージェントで DHCPv6 サーバに転送するため、検証用のコマンドです。


ipv6 address autoconfig (default)

受信した ICMPv6 ND RA のアドレスを使用します。

default オプションをつけた場合は、RA のデフォルト ゲートウェイをルーティング テーブルにインストールします。

総評

IPv4 の DHCP は、IPv6 だと ICMPv6 ND RA でゲートウェイ アドレスを広報し、アドレスと DNS サーバは DHCPv6 サーバで配布します。

other や managed のフラグを変更することで DHCPv6 サーバ無し、という設定も可能であるため選択肢が多くなっており、多くの人はここで混乱していると思われます。

動作確認

各プロトコルの確認方法も、デフォルトで表示されないようにしてあるため、ラボで試してできないときに見てみると良いと思います。

BGP 確認

BGP 確認要件

BGP のステータスが Establish であること。

広報しているルートを確認できること。

受信しているルートを確認できること。

IPv4 IPv6 確認コマンド比較

BGP 確認サンプル IPv4 vs IPv6
host IPv4 IPv6 備考
BGP-PE show ip bgp summary

BGP router identifier 203.0.113.88, local AS number 203

BGP table version is 6, main routing table version 6

3 network entries using 744 bytes of memory

3 path entries using 408 bytes of memory

2/2 BGP path/bestpath attribute entries using 576 bytes of memory

1 BGP AS-PATH entries using 24 bytes of memory

0 BGP route-map cache entries using 0 bytes of memory

0 BGP filter-list cache entries using 0 bytes of memory

BGP using 1752 total bytes of memory

BGP activity 9/1 prefixes, 9/1 paths, scan interval 60 secs

3 networks peaked at 00:14:13 May 14 2024 UTC (02:29:34.128 ago)

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd

203.0.113.2     4          198     172     171        6    0    0 02:32:04        1

.

show ip bgp neighbors 203.0.113.2 advertised-routes

BGP table version is 6, local router ID is 203.0.113.88

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,

              x best-external, a additional-path, c RIB-compressed,

              t secondary path, L long-lived-stale,

Origin codes: i - IGP, e - EGP, ? - incomplete

RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path

*>   0.0.0.0          0.0.0.0                  0         32768 i

*>   203.0.113.0      0.0.0.0                  0         32768 i

Total number of prefixes 2

.

show ip bgp neighbors 203.0.113.2 received-routes

BGP table version is 6, local router ID is 203.0.113.88

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,

              x best-external, a additional-path, c RIB-compressed,

              t secondary path, L long-lived-stale,

Origin codes: i - IGP, e - EGP, ? - incomplete

RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path

*>   198.51.100.0     203.0.113.2              0             0 198 i

Total number of prefixes 1

.

.

.

.

.

show ip route bgp

Codes: L - local, C - connected, S - static, 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, m - OMP

       n - NAT, Ni - NAT inside, No - NAT outside, Nd - NAT DIA

       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

       H - NHRP, G - NHRP registered, g - NHRP registration summary

       o - ODR, P - periodic downloaded static route, l - LISP

       a - application route

       + - replicated route, % - next hop override, p - overrides from PfR

       & - replicated local route overrides by connected

Gateway of last resort is 0.0.0.0 to network 0.0.0.0

B     198.51.100.0/24 [20/0] via 203.0.113.2, 03:29:19


show bgp ipv6 unicast summary

BGP router identifier 203.0.113.88, local AS number 203

BGP table version is 6, main routing table version 6

5 network entries using 1360 bytes of memory

5 path entries using 800 bytes of memory

2/2 BGP path/bestpath attribute entries using 576 bytes of memory

1 BGP AS-PATH entries using 24 bytes of memory

0 BGP route-map cache entries using 0 bytes of memory

0 BGP filter-list cache entries using 0 bytes of memory

BGP using 2760 total bytes of memory

BGP activity 9/1 prefixes, 9/1 paths, scan interval 60 secs

5 networks peaked at 00:24:51 May 14 2024 UTC (02:20:17.295 ago)

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd

2001:DB8:203::2 4          198     164     163        6    0    0 02:22:36        3

.

show bgp ipv6 unicast neighbors 2001:DB8:203::2 advertised-routes

BGP table version is 6, local router ID is 203.0.113.88

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,

              x best-external, a additional-path, c RIB-compressed,

              t secondary path, L long-lived-stale,

Origin codes: i - IGP, e - EGP, ? - incomplete

RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path

*>   ::/0             ::                       0         32768 i

*>   2001:DB8:203::/48

                      ::                       0         32768 i

Total number of prefixes 2

show bgp ipv6 unicast neighbors 2001:DB8:203::2 received-routes

BGP table version is 6, local router ID is 203.0.113.88

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,

              x best-external, a additional-path, c RIB-compressed,

              t secondary path, L long-lived-stale,

Origin codes: i - IGP, e - EGP, ? - incomplete

RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path

*>   2001:DB8:192::/48

                      2001:DB8:203::2          0             0 198 i

*>   2001:DB8:198::/48

                      2001:DB8:203::2          0             0 198 i

*>   2001:DB8:254::/48

                      2001:DB8:203::2          0             0 198 i

Total number of prefixes 3

show ipv6 route bgp

IPv6 Routing Table - default - 9 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

B   2001:DB8:192::/48 [20/0], tag 198

     via FE80::5200:FF:FE02:3, GigabitEthernet1

B   2001:DB8:198::/48 [20/0], tag 198

     via FE80::5200:FF:FE02:3, GigabitEthernet1

B   2001:DB8:254::/48 [20/0], tag 198

     via FE80::5200:FF:FE02:3, GigabitEthernet1

BGP-CE show ip bgp summary

BGP router identifier 198.51.100.254, local AS number 198

BGP table version is 4, main routing table version 4

3 network entries using 744 bytes of memory

3 path entries using 408 bytes of memory

2/2 BGP path/bestpath attribute entries using 576 bytes of memory

1 BGP AS-PATH entries using 24 bytes of memory

0 BGP route-map cache entries using 0 bytes of memory

0 BGP filter-list cache entries using 0 bytes of memory

BGP using 1752 total bytes of memory

BGP activity 8/0 prefixes, 8/0 paths, scan interval 60 secs

3 networks peaked at 00:14:13 May 14 2024 UTC (02:32:52.950 ago)

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd

203.0.113.1     4          203     175     176        4    0    0 02:35:23        2

.

show ip bgp neighbors 203.0.113.1 advertised-routes

BGP table version is 4, local router ID is 198.51.100.254

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,

              x best-external, a additional-path, c RIB-compressed,

              t secondary path, L long-lived-stale,

Origin codes: i - IGP, e - EGP, ? - incomplete

RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path

*>   198.51.100.0     0.0.0.0                  0         32768 i

Total number of prefixes 1

.

.

.

.

.

show ip bgp neighbors 203.0.113.1 received-routes

BGP table version is 4, local router ID is 198.51.100.254

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,

              x best-external, a additional-path, c RIB-compressed,

              t secondary path, L long-lived-stale,

Origin codes: i - IGP, e - EGP, ? - incomplete

RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path

*>   0.0.0.0          203.0.113.1              0             0 203 i

*>   203.0.113.0      203.0.113.1              0             0 203 i

Total number of prefixes 2

.

.

show ip route bgp

Codes: L - local, C - connected, S - static, 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, m - OMP

       n - NAT, Ni - NAT inside, No - NAT outside, Nd - NAT DIA

       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

       H - NHRP, G - NHRP registered, g - NHRP registration summary

       o - ODR, P - periodic downloaded static route, l - LISP

       a - application route

       + - replicated route, % - next hop override, p - overrides from PfR

       & - replicated local route overrides by connected

Gateway of last resort is 203.0.113.1 to network 0.0.0.0

B*    0.0.0.0/0 [20/0] via 203.0.113.1, 03:31:28

      203.0.113.0/24 is variably subnetted, 3 subnets, 3 masks

B        203.0.113.0/24 [20/0] via 203.0.113.1, 03:32:09

show bgp ipv6 unicast summary

BGP router identifier 198.51.100.254, local AS number 198

BGP table version is 6, main routing table version 6

5 network entries using 1360 bytes of memory

5 path entries using 800 bytes of memory

2/2 BGP path/bestpath attribute entries using 576 bytes of memory

1 BGP AS-PATH entries using 24 bytes of memory

0 BGP route-map cache entries using 0 bytes of memory

0 BGP filter-list cache entries using 0 bytes of memory

BGP using 2760 total bytes of memory

BGP activity 8/0 prefixes, 8/0 paths, scan interval 60 secs

5 networks peaked at 00:25:02 May 14 2024 UTC (02:23:03.379 ago)

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd

2001:DB8:203::1 4          203     166     167        6    0    0 02:25:34        2

.

show bgp ipv6 unicast neighbors 2001:DB8:203::1 advertised-routes

BGP table version is 6, local router ID is 198.51.100.254

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,

              x best-external, a additional-path, c RIB-compressed,

              t secondary path, L long-lived-stale,

Origin codes: i - IGP, e - EGP, ? - incomplete

RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path

*>   2001:DB8:192::/48

                      ::                       0         32768 i

*>   2001:DB8:198::/48

                      ::                       0         32768 i

*>   2001:DB8:254::/48

                      ::                       0         32768 i

Total number of prefixes 3

show bgp ipv6 unicast neighbors 2001:DB8:203::1 received-routes

BGP table version is 6, local router ID is 198.51.100.254

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,

              x best-external, a additional-path, c RIB-compressed,

              t secondary path, L long-lived-stale,

Origin codes: i - IGP, e - EGP, ? - incomplete

RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path

*>   ::/0             2001:DB8:203::1          0             0 203 i

*>   2001:DB8:203::/48

                      2001:DB8:203::1          0             0 203 i

Total number of prefixes 2

.

show ipv6 route bgp

IPv6 Routing Table - default - 13 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

B   ::/0 [20/0], tag 203

     via FE80::5200:FF:FE01:0, GigabitEthernet4

B   2001:DB8:203::/48 [20/0], tag 203

     via FE80::5200:FF:FE01:0, GigabitEthernet4

.

.

ポイント State/PfxRcd

数字が出ているのが正常で、Establish ステータス + 受信しているルート数を意味します。

Open や Connect は BGP が Up しておらず、異常を意味します。


show ip bgp neighbors <Peer_IP> advertised-routes / show bgp ipv6 unicast neighbors <Peer_IP> advertised-routes

指定した BGP ピアに広報するプレフィックスを表示します。

この例では自ルータが Null0 インターフェース宛ルートを持っているため、ネクストホップが 0.0.0.0 or :: になっています。


show ip bgp neighbors <Peer_IP> received-routes / show bgp ipv6 unicast neighbors <Peer_IP> received-routes

指定した BGP ピアから受信しているプレフィックスを表示します。

neighbor <Peer_IP> soft-reconfiguration inbound 設定が必要です。

この表示は BGP の RIB を意味します。

ネクストホップに到達性がない場合、到達できないため有効なルートに選択されません。


show ip route bgp / show ipv6 route bgp

BGP のルーティング テーブルを表示します。

この表示は FIB を意味します。

OSPF 確認

要件

隣接関係を確立したい OSPF インターフェースで有効になっていること。

OSPF 隣接関係が確立されていること。

IPv4 IPv6 確認比較

OSPF 確認サンプル IPv4 vs IPv6
host IPv4 IPv6 備考
BGP-CE show ip ospf interface brief

Interface    PID   Area            IP Address/Mask    Cost  State Nbrs F/C

Lo0          1     0.0.0.0         198.51.100.254/32  1     LOOP  0/0

Gi1          1     0.0.0.0         192.0.2.1/30       1     P2P   1/1


show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface

198.51.100.253    0   FULL/  -        00:00:31    192.0.2.2       GigabitEthernet1


show ip route ospf

Codes: L - local, C - connected, S - static, 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, m - OMP

       n - NAT, Ni - NAT inside, No - NAT outside, Nd - NAT DIA

       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

       H - NHRP, G - NHRP registered, g - NHRP registration summary

       o - ODR, P - periodic downloaded static route, l - LISP

       a - application route

       + - replicated route, % - next hop override, p - overrides from PfR

       & - replicated local route overrides by connected

Gateway of last resort is 203.0.113.1 to network 0.0.0.0

      198.51.100.0/24 is variably subnetted, 4 subnets, 3 masks

O        198.51.100.0/25 [110/2] via 192.0.2.2, 03:34:12, GigabitEthernet1

O        198.51.100.253/32 [110/2] via 192.0.2.2, 03:34:12, GigabitEthernet1

show ipv6 ospf interface brief

Interface    PID   Area            Intf ID    Cost  State Nbrs F/C

Lo0          1     0.0.0.0         12         1     LOOP  0/0

Gi1          1     0.0.0.0         7          1     P2P   1/1


show ipv6 ospf neighbor

            OSPFv3 Router with ID (198.51.100.254) (Process ID 1)

Neighbor ID     Pri   State           Dead Time   Interface ID    Interface

198.51.100.253    0   FULL/  -        00:00:32    10              GigabitEthernet1


show ipv6 route ospf

IPv6 Routing Table - default - 13 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   2001:DB8:198::/64 [110/2]

     via FE80::5200:FF:FE03:3, GigabitEthernet1

O   2001:DB8:254::253/128 [110/1]

     via FE80::5200:FF:FE03:3, GigabitEthernet1

Core show ip ospf interface brief

Interface    PID   Area            IP Address/Mask    Cost  State Nbrs F/C

Lo0          1     0.0.0.0         198.51.100.253/32  1     LOOP  0/0

Gi4          1     0.0.0.0         192.0.2.2/30       1     P2P   1/1

Gi1          1     0.0.0.0         198.51.100.1/25    1     DR    0/0

.

show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface

198.51.100.254    0   FULL/  -        00:00:36    192.0.2.1       GigabitEthernet4

.

.

show ip route ospf

Codes: L - local, C - connected, S - static, 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, m - OMP

       n - NAT, Ni - NAT inside, No - NAT outside, Nd - NAT DIA

       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

       H - NHRP, G - NHRP registered, g - NHRP registration summary

       o - ODR, P - periodic downloaded static route, l - LISP

       a - application route

       + - replicated route, % - next hop override, p - overrides from PfR

       & - replicated local route overrides by connected

Gateway of last resort is 192.0.2.1 to network 0.0.0.0

O*E2  0.0.0.0/0 [110/1] via 192.0.2.1, 03:33:47, GigabitEthernet4

      198.51.100.0/24 is variably subnetted, 4 subnets, 2 masks

O        198.51.100.254/32 [110/2] via 192.0.2.1, 03:33:47, GigabitEthernet4

show ipv6 ospf interface brief

Interface    PID   Area            Intf ID    Cost  State Nbrs F/C

Lo0          1     0.0.0.0         12         1     LOOP  0/0

Gi1          1     0.0.0.0         7          1     DR    0/0

Gi4          1     0.0.0.0         10         1     P2P   1/1

.

show ipv6 ospf neighbor

            OSPFv3 Router with ID (198.51.100.253) (Process ID 1)

Neighbor ID     Pri   State           Dead Time   Interface ID    Interface

198.51.100.254    0   FULL/  -        00:00:33    7               GigabitEthernet4

.

show ipv6 route ospf

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

OE2 ::/0 [110/1], tag 1

     via FE80::5200:FF:FE02:0, GigabitEthernet4

O   2001:DB8:254::254/128 [110/1]

     via FE80::5200:FF:FE02:0, GigabitEthernet4

.

.

ポイント IPv4 の OSPFv2 でも IPv6 の OSPFv3 でも、確認するポイントはあまり変わりません。

IPv6 の場合はネクスト ホップがリンク ローカル アドレスになる点は、把握しておいたほうが良いでしょう。

  • リンク ローカル アドレスを複数のインターフェースで同一のプレフィックスを使用できない


show ip ospf interface brief / show ipv6 ospf interface brief

指定したネットワーク タイプが表示されていること。

ローカルとリモートで同一のタイプが表示されていること。


show ip ospf neighbor / show ipv6 ospf neighbor

State が Full になっていること。


show ip route ospf / show ipv6 route ospf

OSPFv2 / OSPFv3 でルートを受信していること。

OSPF ではエリアに属しているインターフェースのプレフィックスが、OSPF ルートにインストールされます。

ゲートウェイ (Core) とホスト (CPE) 確認

要件

ARP エントリに MAC アドレスが表示されること。

IPv6 ネイバーにグローバル ユニキャストアドレスとリンク ローカル アドレスが表示されること。

ゲートウェイ (Core)

IPv4 DHCP サーバが有効になっていること。

IPv6 ND RA が有効になっていること。

DHCPv6 がインターフェースにおいて、サーバ モードで有効になっていること。

ホスト (CPE)

IPv4 DHCP クライアントが有効になっていること

IPv6 ND クライアントが有効になっていること。

DHCPv6 がクライアント モードで有効になっていること。

IPv4 IPv6 確認比較

ゲートウェイとホスト 確認サンプル IPv4 vs IPv6
host IPv4 IPv6 備考
Core show ip interface brief

Interface              IP-Address      OK? Method Status                Protocol

GigabitEthernet1       198.51.100.1    YES manual up                    up

.

.

.

.

.

show ip arp Gi1

Protocol  Address          Age (min)  Hardware Addr   Type   Interface

Internet  198.51.100.1            -   5000.0003.0000  ARPA   GigabitEthernet1

Internet  198.51.100.14         104   5000.0004.0003  ARPA   GigabitEthernet1


show ip dhcp binding

Bindings from all pools not associated with VRF:

IP address      Client-ID/              Lease expiration        Type       State      Interface

                Hardware address/

                User name

198.51.100.14   0063.6973.636f.2d35.    May 15 2024 02:32 AM    Automatic  Active     GigabitEthernet1

                3030.302e.3030.3034.

                2e30.3030.332d.4769.

                34


show ipv6 interface brief

GigabitEthernet1       [up/up]

    FE80::198:1

    2001:DB8:198::1


show ipv6 neighbors Gi1

ND cache expire time is 14400 seconds

IPv6 Address                              Age Link-layer Addr State Interface

2001:DB8:198:0:9465:2DA7:8F08:1B80          0 5000.0004.0003  REACH Gi1

FE80::5200:FF:FE04:3                        0 5000.0004.0003  REACH Gi1


show ipv6 interface Gi1 | in router

  ND router advertisements are sent every 200 seconds

  ND router advertisements live for 1800 seconds

  ND advertised default router preference is Medium


show ipv6 dhcp binding

Client: FE80::5200:FF:FE04:3

  DUID: 00030001001E14D86300

  Username : unassigned

  VRF : default

  IA NA: IA ID 0x000A0001, T1 43200, T2 69120

    Address: 2001:DB8:198:0:9465:2DA7:8F08:1B80

            preferred lifetime 86400, valid lifetime 172800

            expires at May 16 2024 02:32 AM (166036 seconds)


show ipv6 dhcp interface

GigabitEthernet1 is in server mode

  Using pool: IPv6

  Preference value: 0

  Hint from client: ignored

  Rapid-Commit: disabled

CPE show ip interface brief

Interface              IP-Address      OK? Method Status                Protocol

<snip>

GigabitEthernet4       198.51.100.14   YES DHCP   up                    up

.


show ip arp Gi4

Protocol  Address          Age (min)  Hardware Addr   Type   Interface

Internet  198.51.100.14           -   5000.0004.0003  ARPA   GigabitEthernet4

Internet  198.51.100.1          110   5000.0003.0000  ARPA   GigabitEthernet4


show ip route

Codes: L - local, C - connected, S - static, 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, m - OMP

       n - NAT, Ni - NAT inside, No - NAT outside, Nd - NAT DIA

       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

       H - NHRP, G - NHRP registered, g - NHRP registration summary

       o - ODR, P - periodic downloaded static route, l - LISP

       a - application route

       + - replicated route, % - next hop override, p - overrides from PfR

       & - replicated local route overrides by connected

Gateway of last resort is 198.51.100.1 to network 0.0.0.0

S*    0.0.0.0/0 [254/0] via 198.51.100.1

      198.51.100.0/24 is variably subnetted, 2 subnets, 2 masks

C        198.51.100.0/25 is directly connected, GigabitEthernet4

L        198.51.100.14/32 is directly connected, GigabitEthernet4


show ip interface Gi4 | in DHCP

  Address determined by DHCP

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

show ip name-servers

2001:4860:4860::8888

8.8.8.8

show ipv6 interface brief

<snip>

GigabitEthernet4       [up/up]

    FE80::5200:FF:FE04:3

    2001:DB8:198:0:9465:2DA7:8F08:1B80


show ipv6 neighbors Gi4

ND cache expire time is 14400 seconds

IPv6 Address                              Age Link-layer Addr State Interface

2001:DB8:198::1                             0 5000.0003.0000  REACH Gi4

FE80::198:1                                 0 5000.0003.0000  REACH Gi4


show ipv6 route

IPv6 Routing Table - default - 3 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

ND  ::/0 [2/0]

     via FE80::198:1, GigabitEthernet4

LC  2001:DB8:198:0:9465:2DA7:8F08:1B80/128 [0/0]

     via GigabitEthernet4, receive

L   FF00::/8 [0/0]

     via Null0, receive

.


show ipv6 dhcp interface

GigabitEthernet4 is in client mode

  Prefix State is IDLE (0)

  Information refresh timer expires in 22:05:55

  Address State is OPEN

  Renew for address will be sent in 10:05:55

  List of known servers:

    Reachable via address: FE80::198:1

    DUID: 00030001001E493C5C00

    Preference: 0

    Configuration parameters:

      IA NA: IA ID 0x000A0001, T1 43200, T2 69120

        Address: 2001:DB8:198:0:9465:2DA7:8F08:1B80/128

                preferred lifetime 86400, valid lifetime 172800

                expires at May 16 2024 02:32 AM (165955 seconds)

      DNS server: 2001:4860:4860::8888

      Information refresh time: 0

  Prefix Rapid-Commit: disabled

  Address Rapid-Commit: disabled


show ip name-servers

2001:4860:4860::8888

8.8.8.8

ポイント 設定でも同様ですが、IPv4 の DHCP は IPv6 だと ICMPv6 ND RA + DHCPv6 に変わっているため、コマンドも別々に取る必要があります。


show ip interface brief / show ipv6 interface brief

設定している IPv4 IPv6 を確認します。

ping を打つ場合など、ここで表示された値をコピペして、対向側で ping を打つと確実性が高いオペレーションになります。


show ip route / show ipv6 route

DHCP クライアントの場合、デフォルト ルートはスタティック ルート扱いになります。

DHCPv6 はデフォルト ルートを配布できないため、ICMPv6 ND RA を使ってデフォルト ゲートウェイが設定されていることを確認します。


show ip interface Gi4 | in DHCP / show ipv6 dhcp interface

ホストで DHCP クライアント、DHCPv6 クライアントであることを確認します。

DHCPv6 はアドレスだけ (IANA) でなく、プレフィックスを受信する (IAPD) ことも可能です。


show ip name-servers

DHCP と DHCPv6 で受信した DNS サーバ情報を確認します。

個別に確認するコマンドは、IOS-XE に無いようです。

リファレンス

Cisco Cloud Services Router 1000V シリーズ コンフィギュレーション ガイド

アドバタイズしないボーダー ゲートウェイ プロトコル ルートのトラブルシューティング