我有一台 Gentoo Linux 机器,通过路由器的 DHCP 获得了 V6 地址。有 V4/V6 网络。对于 DHCP,我使用 dhcpcd 并进行以下配置:
duid
persistent
option rapid_commit
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
option interface_mtu
require dhcp_server_identifier
slaac private
noipv6rs
interface eth0
ipv6rs
ia_na
interface wlan0
noipv6rs
noipv4
ipv6only
我尝试创建一个仅用于内部无线 v6 网络的路由器。
我尝试执行以下操作:
从 v6 网络为 wlan0 分配静态地址:
# ip addr show wlan0 5: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1480 qdisc mq state UP group default qlen 1000 link/ether 50:3e:aa:54:c2:c5 brd ff:ff:ff:ff:ff:ff inet6 2001:470:xxxx:1000::1/64 scope global valid_lft forever preferred_lft forever inet6 fe80::b614:22ce:a510:66e3/64 scope link valid_lft forever preferred_lft forever
添加 dnsmasq 巫师配置:
interface=wlan0 listen-address=2001:470:xxxx:1000::1 no-resolv server=2001:470:xxxx::1 local=/subnet1/ domain=subnet1 dhcp-fqdn enable-ra dhcp-range=::100,::1ff, constructor:wlan0, ra-names, 64, 12h log-queries log-dhcp
客户端有 V6 地址,但无法访问互联网。我可以从 Gentoo 机器 ping wlan0 客户端,但无法从 wlan0 和客户端 ping 全局地址。
# ping6 google.com -I wlan0
connect: Network is unreachable
我应该为 wlan0 添加一些静态路由吗?
当前路线表:
2001:470:yyyy:zzzz::/64 dev eth0 proto ra metric 204 mtu 1480 pref medium
anycast 2001:470:xxxx:: dev eth0 proto kernel metric 0 pref medium
2001:470:xxxx::/64 dev eth0 proto ra metric 204 mtu 1480 pref medium
anycast 2001:470:xxxx:1000:: dev wlan0 proto kernel metric 0 pref medium
2001:470:xxxx:1000::/64 dev eth0 metric 1 pref medium
2001:470:xxxx:1000::/64 dev wlan0 proto kernel metric 256 pref medium
anycast fe80:: dev dummy0 proto kernel metric 0 pref medium
anycast fe80:: dev eth0 proto kernel metric 0 pref medium
anycast fe80:: dev wlan0 proto kernel metric 0 pref medium
fe80::/64 dev dummy0 proto kernel metric 256 pref medium
fe80::/64 dev eth0 proto kernel metric 256 pref medium
fe80::/64 dev wlan0 proto kernel metric 256 pref medium
ff00::/8 dev dummy0 metric 256 pref medium
ff00::/8 dev eth0 metric 256 pref medium
ff00::/8 dev wlan0 metric 256 pref medium
default via fe80::76d0:2bff:fed2:7b40 dev eth0 proto ra metric 204 mtu 1480 pref medium