Fan Zhen Coder & Teacher

教育网 OpenWrt 连接原生ipv6

2015-01-22

参考链接

/etc/config/network

config globals 'globals'
	option ula_prefix 'fdc9:0d7a:4c66::/48'

config interface 'lan'
	......
	option ip6assign '60'
	
config interface 'wan6'
	option ifname '@wan'
	option proto 'dhcpv6'

/etc/config/dhcp

config dhcp 'lan'
	......
    option dhcpv6 'hybrid'
    option ra 'hybrid'
    option ndp 'hybrid'	
    
config dhcp 'wan6'
	option interface 'wan'
    option dhcpv6 'hybrid'
    option ra 'hybrid'
    option ndp 'hybrid'
    option master '1'

/etc/config/firewall

config zone
    option name 'wan'
    list network 'wan'
    list network 'wan6'
......

config rule
	option name 'Allow-ICMPv6-Input'
    option src 'wan'
    option proto 'icmp'	......
	list icmp_type 'router-solicitation'
	list icmp_type 'neighbour-solicitation'
	list icmp_type 'router-advertisement'
	list icmp_type 'neighbour-advertisement'
	
config forwarding
	option dest 'wan'
	option src 'lan'

改好后,重启网络 /etc/init.d/network restart

测试

ping6 ipv6.google.com
traceroute6 ipv6.google.com #这个只能在电脑上试

这个配置在 TP-Link WR841n v7.1 和 Netgear WNDRMacv2 上都成功。

nat6

https://wiki.openwrt.org/doc/howto/ipv6.nat6


Comments