R1
ipv6
ospfv3 1
router-id 1.1.1.1 //必须要手动配置ospf id,它不会自动生成
interface GigabitEthernet0/0/0
ipv6 enable
ipv6 address 2000::2/96
ospfv3 1 area 0.0.0.0
interface LoopBack0
ipv6 enable
ipv6 address 2001::1/96
ospfv3 1 area 0.0.0.0
R2
ipv6
dhcp enable
dhcpv6 pool test
address prefix FD::/96
excluded-address FD::1
dns-server 9999::9
ospfv3 1
router-id 2.2.2.2
interface GigabitEthernet0/0/0
ipv6 enable
ipv6 address 2000::1/96
ospfv3 1 area 0.0.0.0
interface GigabitEthernet0/0/1
ipv6 enable
ipv6 address FD::1/96
undo ipv6 nd ra halt
ipv6 nd autoconfig managed-address-flag
//设置M位置位,让其获取网关,dhcpv6不能获取网关,必须要用RS和RA
ospfv3 1 area 0.0.0.0
dhcpv6 server test