我有两个 Debian Bullseye 容器,其中一个充当路由器。客户端获取路由器通告并正确自动配置其 IPv6 地址,但未设置应通过 DHCPv6 获取的 DNS 服务器地址。
我尝试在其他环境和机器上做同样的事情,即使仅有的IPv6 总是一样。我很困惑,不知道还能做什么。我是不是漏掉了什么?
路由器
/etc/network/interfaces
文件中的接口配置:
auto eth1
iface eth1 inet static
address 192.168.11.1/24
iface eth1 inet6 static
address a:b:c:11::1/64
iface eth1 inet6 static
address fe80::1/64
/etc/dhcp/dhcpd6.conf
文件的子网部分isc-dhcp-server.service
:
subnet6 a:b:c:11::/64 {
option dhcp6.name-servers 2001:4860:4860::8888, 2001:4860:4860::8844;
}
- 文件内容
/etc/radvd.conf
:
interface eth1 {
AdvSendAdvert on;
AdvOtherConfigFlag on;
prefix a:b:c:11::/64 {};
# route a:b:c:11::/64 {};
};
客户
- 文件内容
/etc/network/interfaces
:
auto eth0
iface eth0 inet dhcp
iface eth0 inet6 auto
- 使用以下命令捕获路由器通告
radvdump
:
#
# radvd configuration generated by radvdump 2.18
# based on Router Advertisement from fe80::1
# received by interface eth0
#
interface eth0
{
AdvSendAdvert on;
# Note: {Min,Max}RtrAdvInterval cannot be obtained with radvdump
AdvManagedFlag off;
AdvOtherConfigFlag on;
AdvReachableTime 0;
AdvRetransTimer 0;
AdvCurHopLimit 64;
AdvDefaultLifetime 1800;
AdvHomeAgentFlag off;
AdvDefaultPreference medium;
AdvSourceLLAddress on;
prefix a:b:c:11::/64
{
AdvValidLifetime 86400;
AdvPreferredLifetime 14400;
AdvOnLink on;
AdvAutonomous on;
AdvRouterAddr off;
}; # End of prefix definition
}; # End of interface definition