|
大家好!
我目前正在尝试使能路由器上的IPV6功能, 我用的版本是OpenWRT BB (14.07)。我的网络拓扑图如下:
Test PC <---------> OpenWRT router <-------> 外网
目前我的问题是:Test PC能ping通OpenWRT Router的WAN或LAN口的IPV6全局地址,但是不能ping外网,router可以ping外网。
我尝试了网上介绍的多种方法,包括在firewall.user中增加:
ip6tables -t nat -I POSTROUTING -s xxxx -j MASQUERADE
等办法,都没能解决这个问题,该问题已经折磨我一周了,一直不能得到解决,恳请各位专家不吝赐教!万分感谢!
我的整个配置如下:
/etc/config/network:
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config interface 'lan'
option ifname 'usbnet0 eth0'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'
config interface 'wan4'
option ifname 'ccinet4'
option proto 'static'
option auto '1'
option ip6addr 'fe80::1/64'
option ip6prefix '2001::/64'
==========================================================================
/etc/config/dhcp:
config dnsmasq
option domainneeded '1'
option boguspriv '1'
option filterwin2k '0'
option localise_queries '1'
option rebind_protection '1'
option rebind_localhost '1'
option local '/lan/'
option domain 'lan'
option expandhosts '1'
option nonegcache '0'
option authoritative '1'
option readethers '1'
option leasefile '/tmp/dhcp.leases'
option resolvfile '/tmp/resolv.conf.auto'
option dhcpscript '/lib/stat/dhcp_action.sh'
config dhcp 'lan'
option interface 'lan'
option start '100'
option limit '150'
option leasetime '12h'
option ra 'relay'
option ndp 'relay'
config dhcp 'wan4'
option interface 'wan4'
# option ignore '1'
option ra 'relay'
option ndp 'relay'
option master '1'
config odhcpd 'odhcpd'
option maindhcp '0'
option leasefile '/tmp/hosts/odhcpd'
option leasetrigger '/usr/sbin/odhcpd-update'
=======================================================
ifconfig的结果:
br-lan Link encap:Ethernet HWaddr AA:0E4:E2:B4:77
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: 2001::3/64 Scope:Global
inet6 addr: fe80::a80e:d4ff:fee2:b477/64 Scopeink
inet6 addr: 2001::1/64 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:268 errors:0 dropped:0 overruns:0 frame:0
TX packets:73 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:14188 (13.8 KiB) TX bytes:5327 (5.2 KiB)
ccinet4 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet6 addr: 2001::3/64 Scope:Global
inet6 addr: fe80::1/64 Scopeink
UP RUNNING NOARP MTU:1500 Metric:1
RX packets:18 errors:0 dropped:0 overruns:0 frame:0
TX packets:48 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1783 (1.7 KiB) TX bytes:6288 (6.1 KiB)
===========================================================================
ifstatus wan4
{
"up": true,
"pending": false,
"available": true,
"autostart": true,
"uptime": 170,
"l3_device": "ccinet4",
"proto": "static",
"device": "ccinet4",
"updated": [
"addresses",
"prefixes"
],
"metric": 0,
"delegation": true,
"ipv4-address": [
],
"ipv6-address": [
{
"address": "fe80::1",
"mask": 64
}
],
"ipv6-prefix": [
{
"address": "2001::",
"mask": 64,
"class": "wan4",
"assigned": {
"lan": {
"address": "2001::",
"mask": 64
}
}
}
],
"ipv6-prefix-assignment": [
],
"route": [
],
"dns-server": [
],
"dns-search": [
],
"inactive": {
"ipv4-address": [
],
"ipv6-address": [
],
"route": [
],
"dns-server": [
],
"dns-search": [
]
},
"data": {
}
}
请不要胡乱输入以及粘贴、复制等方式灌水
请尊重作者、并共同维护网站的正常阅读,否则账户将会被限制发帖、回帖,站内短信以及阅读权限等都会受到影响,谢谢。
具体限制方式:https://www.right.com.cn/forum/thread-8307840-1-1.html
|
|