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

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

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