どうも、0 -Ray- です!
今回は仮想環境にて、IPv6のOSPF設定を検証したので、
結果をメモとして残そうと思います!
それでは行ってみましょう!
検証環境
- EVE-NG
- Cisco IOL (Router/L3SW)
検証結果
設定
(config)#ipv6 router ospf [process id]
(config-router)#router-id [任意のアドレス]
(config)#interface [任意のIF]
(config-if)#ipv6 ospf 1 area 0
>ipv6 router ospf [process id]
この設定でipv6 ospfを有効にします。
router-idは設定しなくて良いかもですが、設定するのが一般的なので記載してます。
router-idはipv4と同じ形式で大丈夫です。(1.1.1.1 など)
>interface [任意のIF]
>ipv6 ospf 1 area 0
IFにもipv6 ospfを有効にするコマンドを入れます。
この辺りがipv4と違いますね。
※注意点としてipv6を使用する際はipv6を使用できるような設定をする必要があります。
こちらの記事に記載したので、慣れてない方や思い出したい方は是非!
検証(構築)
構成
config
interface Ethernet0/0
no ip address
ipv6 address 2001:192:168:10::1/64
ipv6 enable
ipv6 ospf 1 area 0
!
ipv6 router ospf 1
router-id 1.1.1.1
interface Ethernet0/0
no ip address
ipv6 address 2001:192:168:20::2/64
ipv6 enable
ipv6 ospf 1 area 0
!
ipv6 router ospf 1
router-id 2.2.2.2
vlan 10,30
!
interface Ethernet0/0
switchport access vlan 10
switchport mode access
duplex auto
!
interface Ethernet0/1
switchport access vlan 30
switchport mode access
duplex auto
!
interface Vlan10
no ip address
ipv6 address 2001:192:168:10::11/64
ipv6 enable
ipv6 ospf 1 area 0
ipv6 ospf priority 255
!
interface Vlan30
no ip address
ipv6 address 2001:192:168:30::11/64
ipv6 enable
ipv6 ospf 1 area 0
ipv6 ospf priority 255
!
ipv6 router ospf 1
router-id 11.11.11.11
vlan 20,30
!
interface Ethernet0/0
switchport access vlan 20
switchport mode access
duplex auto
!
interface Ethernet0/1
switchport access vlan 30
switchport mode access
duplex auto
!
interface Vlan20
no ip address
ipv6 address 2001:192:168:20::12/64
ipv6 enable
ipv6 ospf 1 area 0
!
interface Vlan30
no ip address
ipv6 address 2001:192:168:30::12/64
ipv6 enable
ipv6 ospf 1 area 0
!
ipv6 router ospf 1
router-id 12.12.12.12
なんとなくSW1がDRになるようにpriorityを設定しています。
検証(確認)
#show ipv6 route ospf
#show ipv6 ospf interface [任意のIF]
#show ipv6 ospf neighbor
#show ipv6 ospf database
上記で確認しました。
RT1#show 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:3000, Ethernet0/0
O 2001:192:168:30::/64 [110/11]
via FE80::A8BB:CCFF:FE80:3000, Ethernet0/0
RT2#show 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:10::/64 [110/12]
via FE80::A8BB:CCFF:FE80:8000, Ethernet0/0
O 2001:192:168:30::/64 [110/11]
via FE80::A8BB:CCFF:FE80:8000, Ethernet0/0
SW1#show ipv6 route ospf
IPv6 Routing Table – default – 6 entries
Codes: C – Connected, L – Local, S – Static, U – Per-user Static route
B – BGP, R – RIP, 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
O – OSPF Intra, OI – OSPF Inter, OE1 – OSPF ext 1, OE2 – OSPF ext 2
ON1 – OSPF NSSA ext 1, ON2 – OSPF NSSA ext 2
O 2001:192:168:20::/64 [110/2]
via FE80::A8BB:CCFF:FE80:8000, Vlan30
SW2#show ipv6 route ospf
IPv6 Routing Table – default – 6 entries
Codes: C – Connected, L – Local, S – Static, U – Per-user Static route
B – BGP, R – RIP, 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
O – OSPF Intra, OI – OSPF Inter, OE1 – OSPF ext 1, OE2 – OSPF ext 2
ON1 – OSPF NSSA ext 1, ON2 – OSPF NSSA ext 2
O 2001:192:168:10::/64 [110/2]
via FE80::A8BB:CCFF:FE80:3000, Vlan30
RT1#show ipv6 ospf int e 0/0
Ethernet0/0 is up, line protocol is up
Link Local Address FE80::A8BB:CCFF:FE00:1000, Interface ID 3
Area 0, Process ID 1, Instance ID 0, Router ID 1.1.1.1
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:3000
Backup Designated router (ID) 1.1.1.1, local address FE80::A8BB:CCFF:FE00:1000
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:06
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)
RT2#show ipv6 ospf int e 0/0
Ethernet0/0 is up, line protocol is up
Link Local Address FE80::A8BB:CCFF:FE00:2000, Interface ID 3
Area 0, Process ID 1, Instance ID 0, Router ID 2.2.2.2
Network Type BROADCAST, Cost: 10
Transmit Delay is 1 sec, State BDR, Priority 1
Designated Router (ID) 12.12.12.12, local address FE80::A8BB:CCFF:FE80:8000
Backup Designated router (ID) 2.2.2.2, local address FE80::A8BB:CCFF:FE00:2000
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:08
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 1 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 12.12.12.12 (Designated Router)
Suppress hello for 0 neighbor(s)
SW1#show ipv6 ospf int vl 10
Vlan10 is up, line protocol is up
Link Local Address FE80::A8BB:CCFF:FE80:3000, Interface ID 7
Area 0, Process ID 1, Instance ID 0, Router ID 11.11.11.11
Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State DR, Priority 255
Designated Router (ID) 11.11.11.11, local address FE80::A8BB:CCFF:FE80:3000
Backup Designated router (ID) 1.1.1.1, local address FE80::A8BB:CCFF:FE00:1000
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:07
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 1, maximum is 4
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 1.1.1.1 (Backup Designated Router)
Suppress hello for 0 neighbor(s)
SW1#show ipv6 ospf int vl 30
Vlan30 is up, line protocol is up
Link Local Address FE80::A8BB:CCFF:FE80:3000, Interface ID 8
Area 0, Process ID 1, Instance ID 0, Router ID 11.11.11.11
Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State DR, Priority 255
Designated Router (ID) 11.11.11.11, local address FE80::A8BB:CCFF:FE80:3000
Backup Designated router (ID) 12.12.12.12, local address FE80::A8BB:CCFF:FE80:8000
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:02
Graceful restart helper support enabled
Index 1/2/2, flood queue length 0
Next 0x0(0)/0x0(0)/0x0(0)
Last flood scan length is 0, maximum is 5
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 12.12.12.12 (Backup Designated Router)
Suppress hello for 0 neighbor(s)
SW2#show ipv6 ospf int vl 20
Vlan20 is up, line protocol is up
Link Local Address FE80::A8BB:CCFF:FE80:8000, Interface ID 8
Area 0, Process ID 1, Instance ID 0, Router ID 12.12.12.12
Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 12.12.12.12, local address FE80::A8BB:CCFF:FE80:8000
Backup Designated router (ID) 2.2.2.2, local address FE80::A8BB:CCFF:FE00:2000
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:03
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 1, maximum is 4
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 2.2.2.2 (Backup Designated Router)
Suppress hello for 0 neighbor(s)
SW2#show ipv6 ospf int vl 30
Vlan30 is up, line protocol is up
Link Local Address FE80::A8BB:CCFF:FE80:8000, Interface ID 9
Area 0, Process ID 1, Instance ID 0, Router ID 12.12.12.12
Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State BDR, Priority 1
Designated Router (ID) 11.11.11.11, local address FE80::A8BB:CCFF:FE80:3000
Backup Designated router (ID) 12.12.12.12, local address FE80::A8BB:CCFF:FE80:8000
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:08
Graceful restart helper support enabled
Index 1/2/2, flood queue length 0
Next 0x0(0)/0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 4
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)
RT1#sh ipv6 ospf nei
OSPFv3 Router with ID (1.1.1.1) (Process ID 1)
Neighbor ID Pri State Dead Time Interface ID Interface
11.11.11.11 255 FULL/BDR 00:00:35 7 Ethernet0/0
RT2#sh ipv6 ospf nei
OSPFv3 Router with ID (2.2.2.2) (Process ID 1)
Neighbor ID Pri State Dead Time Interface ID Interface
12.12.12.12 1 FULL/DR 00:00:32 8 Ethernet0/0
SW1#sh ipv6 ospf nei
OSPFv3 Router with ID (11.11.11.11) (Process ID 1)
Neighbor ID Pri State Dead Time Interface ID Interface
12.12.12.12 1 FULL/DR 00:00:38 9 Vlan30
1.1.1.1 1 FULL/DR 00:00:38 3 Vlan10
SW2#sh ipv6 ospf nei
OSPFv3 Router with ID (12.12.12.12) (Process ID 1)
Neighbor ID Pri State Dead Time Interface ID Interface
11.11.11.11 255 FULL/BDR 00:00:31 8 Vlan30
2.2.2.2 1 FULL/BDR 00:00:31 3 Vlan20
RT1#show ipv6 ospf database
OSPFv3 Router with ID (1.1.1.1) (Process ID 1)
Router Link States (Area 0)
ADV Router Age Seq# Fragment ID Link count Bits
1.1.1.1 742 0x80000003 0 1 None
2.2.2.2 712 0x80000003 0 1 None
11.11.11.11 794 0x80000005 0 2 None
12.12.12.12 896 0x80000005 0 2 None
Net Link States (Area 0)
ADV Router Age Seq# Link ID Rtr count
11.11.11.11 794 0x80000003 7 2
11.11.11.11 1050 0x80000003 8 2
12.12.12.12 896 0x80000003 8 2
Link (Type-8) Link States (Area 0)
ADV Router Age Seq# Link ID Interface
1.1.1.1 742 0x80000003 3 Et0/0
11.11.11.11 1050 0x80000004 7 Et0/0
Intra Area Prefix Link States (Area 0)
ADV Router Age Seq# Link ID Ref-lstype Ref-LSID
11.11.11.11 794 0x80000003 7168 0x2002 7
11.11.11.11 1050 0x80000003 8192 0x2002 8
12.12.12.12 896 0x80000003 8192 0x2002 8
RT2#show ipv6 ospf database
OSPFv3 Router with ID (2.2.2.2) (Process ID 1)
Router Link States (Area 0)
ADV Router Age Seq# Fragment ID Link count Bits
1.1.1.1 1231 0x80000003 0 1 None
2.2.2.2 1195 0x80000003 0 1 None
11.11.11.11 1281 0x80000005 0 2 None
12.12.12.12 1381 0x80000005 0 2 None
Net Link States (Area 0)
ADV Router Age Seq# Link ID Rtr count
11.11.11.11 1281 0x80000003 7 2
11.11.11.11 1537 0x80000003 8 2
12.12.12.12 1381 0x80000003 8 2
Link (Type-8) Link States (Area 0)
ADV Router Age Seq# Link ID Interface
2.2.2.2 1195 0x80000003 3 Et0/0
12.12.12.12 1381 0x80000003 8 Et0/0
Intra Area Prefix Link States (Area 0)
ADV Router Age Seq# Link ID Ref-lstype Ref-LSID
11.11.11.11 1281 0x80000003 7168 0x2002 7
11.11.11.11 1537 0x80000003 8192 0x2002 8
12.12.12.12 1381 0x80000003 8192 0x2002 8
SW1#show ipv6 ospf database
OSPFv3 Router with ID (11.11.11.11) (Process ID 1)
Router Link States (Area 0)
ADV Router Age Seq# Fragment ID Link count Bits
1.1.1.1 1613 0x80000003 0 1 None
2.2.2.2 1581 0x80000003 0 1 None
11.11.11.11 1663 0x80000005 0 2 None
12.12.12.12 1765 0x80000005 0 2 None
Net Link States (Area 0)
ADV Router Age Seq# Link ID Rtr count
11.11.11.11 1663 0x80000003 7 2
11.11.11.11 1919 0x80000003 8 2
12.12.12.12 1765 0x80000003 8 2
Link (Type-8) Link States (Area 0)
ADV Router Age Seq# Link ID Interface
11.11.11.11 1919 0x80000004 8 Vl30
12.12.12.12 1765 0x80000003 9 Vl30
1.1.1.1 1613 0x80000003 3 Vl10
11.11.11.11 1919 0x80000004 7 Vl10
Intra Area Prefix Link States (Area 0)
ADV Router Age Seq# Link ID Ref-lstype Ref-LSID
11.11.11.11 1663 0x80000003 7168 0x2002 7
11.11.11.11 1919 0x80000003 8192 0x2002 8
12.12.12.12 1765 0x80000003 8192 0x2002 8
SW2#show ipv6 ospf database
OSPFv3 Router with ID (12.12.12.12) (Process ID 1)
Router Link States (Area 0)
ADV Router Age Seq# Fragment ID Link count Bits
1.1.1.1 1712 0x80000003 0 1 None
2.2.2.2 1678 0x80000003 0 1 None
11.11.11.11 1762 0x80000005 0 2 None
12.12.12.12 1862 0x80000005 0 2 None
Net Link States (Area 0)
ADV Router Age Seq# Link ID Rtr count
11.11.11.11 1762 0x80000003 7 2
11.11.11.11 12 0x80000004 8 2
12.12.12.12 1862 0x80000003 8 2
Link (Type-8) Link States (Area 0)
ADV Router Age Seq# Link ID Interface
11.11.11.11 12 0x80000005 8 Vl30
12.12.12.12 1862 0x80000003 9 Vl30
2.2.2.2 1678 0x80000003 3 Vl20
12.12.12.12 1862 0x80000003 8 Vl20
Intra Area Prefix Link States (Area 0)
ADV Router Age Seq# Link ID Ref-lstype Ref-LSID
11.11.11.11 1762 0x80000003 7168 0x2002 7
11.11.11.11 12 0x80000004 8192 0x2002 8
12.12.12.12 1862 0x80000003 8192 0x2002 8
ちなみにRT1からRT2へpingも通ることも確認してます!
RT1#ping ipv6 2001:192:168:20::2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001:192:168:20::2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/5/23 ms
RT1#
所感
network address [アドレス] [ワイルドカードマスク] area [area id]に慣れてるので
ipv6だとちょっと戸惑いました。
ただ、設定はシンプルなので覚えやすいです。色んなオプションも試して記事にしたいです!
最後までご覧いただきありがとうございます!
それでは良いエンジニアライフを!!
コメント