R1:
ipv6 unicast-routing
#全局模式下开启ipv6的路由功能。
ipv6 router ospf 1
router-id 1.1.1.1
#开启ipv6 ospf 进程1标识route-id
interface Ethernet0/0
no ip address
ipv6 address 2012::1/64
ipv6 ospf 1 area 0
#进入接口宣告OSPF。
R2:
ipv6 unicast-routing
#全局模式下开启ipv6的路由功能。
ipv6 router ospf 1
router-id 2.2.2.2
#开启ipv6 ospf 进程1标识route-id
interface Ethernet0/0
no ip address
ipv6 address 2012::2/64
ipv6 ospf 1 area 0
interface Ethernet0/1
no ip address
ipv6 address 2013::1/64
ipv6 ospf 1 area 0
#进入接口宣告ospf。
R3:
ipv6 unicast-routing
#全局模式下开启ipv6的路由功能。
ipv6 router ospf 1
router-id 3.3.3.3
#开启ipv6 ospf 进程1标识route-id
interface Ethernet0/0
no ip address
ipv6 address 2013::2/64
ipv6 ospf 1 area 0
#进入接口宣告ospf。
查看一下邻居关系:
R2#show ipv6 ospf neighbor
OSPFv3 Router with ID (2.2.2.2) (Process ID 1)
Neighbor ID Pri State Dead Time Interface ID Interface
3.3.3.3 1 FULL/DR 00:00:31 3 Ethernet0/1
1.1.1.1 1 FULL/BDR 00:00:34 3 Ethernet0/0
R1上查看ipv6路由表:
#可以发现已经学习到路由了。
#可以访问了。