仅在本地wlan网络(子网)中路由ipv6


1

我有一台Gentoo Linux机器,我的路由器通过DHCP获得了V6地址。有V4 / V6网。对于DHCP,我使用dhcpcd和以下conf:

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网络创建路由器。

我尝试执行以下操作:

  1. 从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
    
  2. 添加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客户端,但我不能ping wlan0和客户端的全局地址。

# 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
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.