【検証】IPv6 OSPF 設定(OSPFv3/address-family)

どうも、0 -Ray- です!

今回は仮想環境にて、IPv6のOSPF設定(address-family)を検証したので、
結果をメモとして残そうと思います!

今回の記事でわかること   IPv6のOSPFv3設定(address-family)方法
  IPv6のOSPFv3設定(address-family)注意点

それでは行ってみましょう!

スポンサーリンク

検証環境

  • EVE-NG
  • Cisco IOL (Router/L3SW)

検証結果

設定

(config)#router ospfv3 [process id]
(config-router)#router-id [任意のアドレス]
(config-router)#address-family ipv6 unicast

(config)#interface [任意のIF]
(config-if)#ospfv3 1 ipv6 area 0

>router ospfv3 [process id]
この設定でospfv3を有効にします。

>router-id [任意のアドレス]
router-idはaddress-family毎でも設定可能です。

>interface [任意のIF]
>ospfv3 1 ipv6 area 0
IFにもospfv3を有効にするコマンドを入れます。

※注意点としてipv6を使用する際はipv6を使用できるような設定をする必要があります。
こちらの記事に記載したので、慣れてない方や思い出したい方は是非!


検証(構築)

構成
config

interface Ethernet0/0
no ip address
ipv6 address 2001:192:168:10::9/64
ipv6 enable
ospfv3 1 ipv6 area 0
!
router ospfv3 1
!
address-family ipv6 unicast
router-id 9.9.9.9
exit-address-family

interface Ethernet0/0
no ip address
ipv6 address 2001:192:168:20::10/64
ipv6 enable
ospfv3 1 ipv6 area 0
!
router ospfv3 1
!
address-family ipv6 unicast
router-id 10.10.10.10
exit-address-family

vlan 10,30
!
interface Ethernet0/0
switchport access vlan 30
switchport mode access
duplex auto
!
interface Ethernet0/1
switchport access vlan 10
switchport mode access
duplex auto
!
interface Vlan10
no ip address
ipv6 address 2001:192:168:10::11/64
ipv6 enable
ospfv3 1 ipv6 area 0
!
interface Vlan30
no ip address
ipv6 address 2001:192:168:30::11/64
ipv6 enable
ospfv3 1 ipv6 area 0
!
router ospfv3 1
!
address-family ipv4 unicast
router-id 11.11.11.11
exit-address-family
!
address-family ipv6 unicast
router-id 11.11.11.11
exit-address-family

vlan 20,30
!
interface Ethernet0/0
switchport access vlan 30
switchport mode access
duplex auto
!
interface Ethernet0/1
switchport access vlan 20
switchport mode access
duplex auto
!
interface Vlan20
no ip address
ipv6 address 2001:192:168:20::12/64
ipv6 enable
ospfv3 1 ipv6 area 0
!
interface Vlan30
no ip address
ipv6 address 2001:192:168:30::12/64
ipv6 enable
ospfv3 1 ipv6 area 0
!
router ospfv3 1
!
address-family ipv6 unicast
router-id 12.12.12.12
exit-address-family

検証(確認)

#show ipv6 route ospf
#show ipv6 ospf interface [任意のIF]
#show ipv6 ospf neighbor
#show ipv6 ospf database

上記で確認しました。

RT9#sh ipv6 route ospf
IPv6 Routing Table – default – 5 entries
Codes: C – Connected, L – Local, S – Static, U – Per-user Static route
B – BGP, HA – Home Agent, MR – Mobile Router, R – RIP
H – NHRP, I1 – ISIS L1, I2 – ISIS L2, IA – ISIS interarea
IS – ISIS summary, D – EIGRP, EX – EIGRP external, NM – NEMO
ND – ND Default, NDp – ND Prefix, DCE – Destination, NDr – Redirect
O – OSPF Intra, OI – OSPF Inter, OE1 – OSPF ext 1, OE2 – OSPF ext 2
ON1 – OSPF NSSA ext 1, ON2 – OSPF NSSA ext 2, ls – LISP site
ld – LISP dyn-EID, a – Application

O 2001:192:168:20::/64 [110/12]
via FE80::A8BB:CCFF:FE80:B000, Ethernet0/0
O 2001:192:168:30::/64 [110/11]
via FE80::A8BB:CCFF:FE80:B000, Ethernet0/0

RT9#sh ipv6 ospf int e 0/0
Ethernet0/0 is up, line protocol is up
Link Local Address FE80::A8BB:CCFF:FE00:9000, Interface ID 3
Area 0, Process ID 1, Instance ID 0, Router ID 9.9.9.9
Network Type BROADCAST, Cost: 10
Transmit Delay is 1 sec, State BDR, Priority 1
Designated Router (ID) 11.11.11.11, local address FE80::A8BB:CCFF:FE80:B000
Backup Designated router (ID) 9.9.9.9, local address FE80::A8BB:CCFF:FE00:9000
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:05
Graceful restart helper support enabled
Index 1/1/1, flood queue length 0
Next 0x0(0)/0x0(0)/0x0(0)
Last flood scan length is 2, maximum is 2
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 11.11.11.11 (Designated Router)
Suppress hello for 0 neighbor(s)

RT9#sh ipv6 ospf nei
OSPFv3 Router with ID (9.9.9.9) (Process ID 1)
Neighbor ID Pri State Dead Time Interface ID Interface
11.11.11.11 1 FULL/DR 00:00:39 7 Ethernet0/0

RT9#sh ipv6 ospf database

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

Router Link States (Area 0)

ADV Router Age Seq# Fragment ID Link count Bits
9.9.9.9 775 0x80000002 0 1 None
11.11.11.11 771 0x80000003 0 2 None
12.12.12.12 772 0x80000002 0 1 None

Net Link States (Area 0)

ADV Router Age Seq# Link ID Rtr count
11.11.11.11 776 0x80000001 7 2
12.12.12.12 773 0x80000001 8 2

Link (Type-8) Link States (Area 0)

ADV Router Age Seq# Link ID Interface
9.9.9.9 837 0x80000002 3 Et0/0
11.11.11.11 812 0x80000002 7 Et0/0

Intra Area Prefix Link States (Area 0)

ADV Router Age Seq# Link ID Ref-lstype Ref-LSID
11.11.11.11 776 0x80000001 7168 0x2002 7
12.12.12.12 772 0x80000002 0 0x2001 0
12.12.12.12 773 0x80000001 8192 0x2002 8

ちなみにRT9からRT10へpingも通ることも確認してます!

RT9#ping ipv6 2001:192:168:20::10
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:192:168:20::10, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/3/12 ms

注意点/トラブルシューティング

router-id 必須

router-idが無ければneighbor張れないようです。

Router#sh ipv6 ospf nei
%OSPFv3 1 address-family ipv6 not running, please configure a router-id

所感

address-familyを使用すればipv4,v6もospfv3で動作するので、デュアルスタック環境で便利そうです!
定期的に復習してospfv3の感覚を忘れないようにしなければ….
今後記事を書く時に、ospfとospfv3どちらでもやっていこうと思います!

最後までご覧いただきありがとうございます!
それでは良いエンジニアライフを!!

コメント

タイトルとURLをコピーしました