为了跟进一下时代,尝尝IPV6的鲜,我打算给我的二级内网搞出IPV6来

因为我是家网络有两级,一级是主路由,他可以获取到由运营商分配的IPV6和IPV6-PD,并且可以给接入他的设备分配一个公网IPV6;还有一级时我书房的,他只能自己获取到一个公网IPV6,给接入设备的却只有一个内网的IPV6

打开二级路由 OpenWRT设置–>接口–>WAN6–>DHCP服务器–>IPV6设置

把路由通告服务、DHCPv6 服务、NDP 代理全部设置为中继模式,并且勾上选项主

Designated master 打勾

Set this interface as master for RA and DHCPv6 relaying as well as NDP proxying.
RA-Service relay mode

Configures the operation mode of the RA service on this interface.
DHCPv6-Service relay mode

Configures the operation mode of the DHCPv6 service on this interface.
NDP-Proxy relay mode

然后打开OpenWRT设置–>接口–>LAN->DHCP服务器–>IPV6设置

把路由通告服务、DHCPv6 服务、NDP 代理全部设置为中继模式,注意此时不勾 Designated master

最后全部保存并应用,然后再次测试IPV6,发现IPV6已经可以正常获取到了

最终 uci

root@OpenWRT-MY:~# uci show dhcp.lan
dhcp.lan=dhcp
dhcp.lan.interface='lan'
dhcp.lan.start='100'
dhcp.lan.limit='150'
dhcp.lan.leasetime='12h'
dhcp.lan.dhcpv4='server'
dhcp.lan.ra='relay'
dhcp.lan.dhcpv6='relay'
dhcp.lan.ndp='relay'
root@OpenWRT-MY:~# uci show dhcp.wan6
dhcp.wan6=dhcp
dhcp.wan6.interface='wan6'
dhcp.wan6.ignore='1'
dhcp.wan6.master='1'
dhcp.wan6.ra='relay'
dhcp.wan6.dhcpv6='relay'
dhcp.wan6.ndp='relay'