※noteから引っ越してきた記事
初期設定
— ipv4のみも可能
— 但し、ipv6でカプセル化しているためipv6 unicast-routingとI/Fでのipv6 enableが必要
RT1
en
terminal length 0
conf t
hostname iosv-0
line console 0
logging synchronous
exit
!
ipv6 unicast-routing
!
router ospfv3 1
router-id 1.1.1.1
address-family ipv4 unicast
exit
address-family ipv6 unicast
exit
exit
!
int gi0/0
ip address 192.168.12.1 255.255.255.0
ipv6 address 2001:1:1:12::1/64
ipv6 address fe80::1 link-local
ospfv3 1 ipv4 area 0
ospfv3 1 ipv6 area 0
no shut
exit
!
int gi0/1
ip address 172.16.1.1 255.255.255.0
ipv6 address 2001:1:1:1::1/64
ipv6 address fe80::1 link-local
ospfv3 1 ipv4 area 1
ospfv3 1 ipv6 area 1
no shut
end
!
RT2
en
terminal length 0
conf t
hostname iosv-1
line console 0
logging synchronous
exit
!
ipv6 unicast-routing
!
router ospfv3 1
router-id 2.2.2.2
address-family ipv4 unicast
exit
address-family ipv6 unicast
exit
exit
!
int gi0/0
ip address 192.168.12.2 255.255.255.0
ipv6 address 2001:1:1:12::2/64
ipv6 address fe80::2 link-local
ospfv3 1 ipv4 area 0
ospfv3 1 ipv6 area 0
no shut
exit
!
int gi0/1
ip address 172.16.2.2 255.255.255.0
ipv6 address 2001:2:2:2::2/64
ipv6 address fe80::2 link-local
ospfv3 1 ipv4 area 2
ospfv3 1 ipv6 area 2
no shut
end
!
iosv-0#sh ip route | b Gate
Gateway of last resort is not set
172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks
C 172.16.1.0/24 is directly connected, GigabitEthernet0/1
L 172.16.1.1/32 is directly connected, GigabitEthernet0/1
O IA 172.16.2.0/24 [110/2] via 192.168.12.2, 00:10:12, GigabitEthernet0/0
192.168.12.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.12.0/24 is directly connected, GigabitEthernet0/0
L 192.168.12.1/32 is directly connected, GigabitEthernet0/0
iosv-0#sh ipv6 route | b Application
lA - LISP away, a - Application
C 2001:1:1:1::/64 [0/0]
via GigabitEthernet0/1, directly connected
L 2001:1:1:1::1/128 [0/0]
via GigabitEthernet0/1, receive
C 2001:1:1:12::/64 [0/0]
via GigabitEthernet0/0, directly connected
L 2001:1:1:12::1/128 [0/0]
via GigabitEthernet0/0, receive
OI 2001:2:2:2::/64 [110/2]
via FE80::2, GigabitEthernet0/0
L FF00::/8 [0/0]
via Null0, receive
・v4とv6それぞれでルーティングテーブルを保持していることを確認
iosv-0#sh ip ospf neighbor
iosv-0#sh ipv6 ospf neighbor
OSPFv3 Router with ID (1.1.1.1) (Process ID 1)
Neighbor ID Pri State Dead Time Interface ID Interface
2.2.2.2 1 FULL/DR 00:00:33 2 GigabitEthernet0/0
iosv-0#sh ospfv3 neighbor
OSPFv3 1 address-family ipv4 (router-id 1.1.1.1)
Neighbor ID Pri State Dead Time Interface ID Interface
2.2.2.2 1 FULL/DR 00:00:32 2 GigabitEthernet0/0
OSPFv3 1 address-family ipv6 (router-id 1.1.1.1)
Neighbor ID Pri State Dead Time Interface ID Interface
2.2.2.2 1 FULL/DR 00:00:33 2 GigabitEthernet0/0
・#show ip ospf neighborでは表示されない
・#show ospfv3でv4ospf情報を確認できる
iosv-0#sh ospfv3 int brief
Interface PID Area AF Cost State Nbrs F/C
Gi0/0 1 0 ipv4 1 BDR 1/1
Gi0/1 1 1 ipv4 1 DR 0/0
Gi0/0 1 0 ipv6 1 BDR 1/1
Gi0/1 1 1 ipv6 1 DR 0/0
show ospfv3 int briefめっちゃ見やすいしわかりやすい
◎OSPFv3は複数の設定方法がある
1)(config-if)#ip(v6) ospf 1 area 0
(config-router)#router-id 1.1.1.1
2)(config-if)#ospfv3 1 ipv4(v6) area 0
(config-router)#router-id 1.1.1.1
(config-router)#address-family ipv4(6) unicast