我正在运行 Ubuntu(全部 20.04)MacOS 和 Windows 10 的混合网络。
我运行 Ubuntu 服务器,它运行 dnsmasq 并充当网络的 DHCP 服务器(机器称为“serv2”,IP 地址为 192.168.2.4)。Serv2 还为网络提供缓存的 DNS(并允许解析本地主机名)(再次使用 dnsmasq)。
我的系统使用 IPv4,我从未尝试配置 IPv6
一个新问题开始了,有时(并且在启动时随机)Ubuntu 桌面客户端无法解析没有我的网络的其他主机的名称。这可以通过重新启动来解决。
我做了很多探讨,我认为以下因素很重要:
resolve.conf
包含:
nameserver 192.168.2.4
nameserver fd52:a81c:df85:1:ded9:16ff:fed5:9a73
search njj.chickenkiller.com connect
仅在第一个列出的名称服务器时才会查看systemd-resolve --status
无法解析本地主机名。fd52...
我的 ifconfig 输出:
enp6s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.2.11 netmask 255.255.255.0 broadcast 192.168.2.255
inet6 fe80::a37a:ffa8:2056:1d1e prefixlen 64 scopeid 0x20<link>
inet6 fd52:a81c:df85:1:389:3ab9:d587:3bb7 prefixlen 64 scopeid 0x0<global>
inet6 fd52:a81c:df85:1:cc9f:3c2f:ad73:fd29 prefixlen 64 scopeid 0x0<global>
ether b4:2e:99:41:5d:bc txqueuelen 1000 (Ethernet)
并且可以看到我已经使用前缀分配了 IPv6 地址fd52:a81c:df85
。同样,我的服务器已经分配了 IPv6 地址fd52:a81c:df85:1:1a31:bfff:fe6a:35bc
在我的 systemd 日志 ( journalctl -b|grep dhcp
) 中,我有以下条目:
May 08 12:16:03 kenickie audit[626]: AVC apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=626 comm="apparmor_parser"
May 08 12:16:03 kenickie audit[626]: AVC apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/NetworkManager/nm-dhcp-helper" pid=626 comm="apparmor_parser"
May 08 12:16:05 kenickie NetworkManager[687]: <info> [1588936565.2384] dhcp-init: Using DHCP client 'internal'
May 08 12:16:08 kenickie NetworkManager[687]: <info> [1588936568.1844] dhcp4 (enp6s0): activation: beginning transaction (timeout in 45 seconds)
May 08 12:16:08 kenickie NetworkManager[687]: <info> [1588936568.2316] dhcp4 (enp6s0): option dhcp_lease_time => '43200'
May 08 12:16:08 kenickie NetworkManager[687]: <info> [1588936568.2316] dhcp4 (enp6s0): option domain_name => 'njj.chickenkiller.com'
May 08 12:16:08 kenickie NetworkManager[687]: <info> [1588936568.2316] dhcp4 (enp6s0): option domain_name_servers => '192.168.2.4'
May 08 12:16:08 kenickie NetworkManager[687]: <info> [1588936568.2316] dhcp4 (enp6s0): option expiry => '1588979768'
May 08 12:16:08 kenickie NetworkManager[687]: <info> [1588936568.2316] dhcp4 (enp6s0): option host_name => 'kenickie'
May 08 12:16:08 kenickie NetworkManager[687]: <info> [1588936568.2316] dhcp4 (enp6s0): option ip_address => '192.168.2.11'
May 08 12:16:08 kenickie NetworkManager[687]: <info> [1588936568.2317] dhcp4 (enp6s0): option next_server => '192.168.2.4'
May 08 12:16:08 kenickie NetworkManager[687]: <info> [1588936568.2317] dhcp4 (enp6s0): option ntp_servers => '192.168.2.4'
May 08 12:16:08 kenickie NetworkManager[687]: <info> [1588936568.2317] dhcp4 (enp6s0): option requested_broadcast_address => '1'
May 08 12:16:08 kenickie NetworkManager[687]: <info> [1588936568.2317] dhcp4 (enp6s0): option requested_domain_name => '1'
May 08 12:16:08 kenickie NetworkManager[687]: <info> [1588936568.2317] dhcp4 (enp6s0): option requested_domain_name_servers => '1'
May 08 12:16:08 kenickie NetworkManager[687]: <info> [1588936568.2317] dhcp4 (enp6s0): option requested_domain_search => '1'
May 08 12:16:08 kenickie NetworkManager[687]: <info> [1588936568.2317] dhcp4 (enp6s0): option requested_host_name => '1'
May 08 12:16:08 kenickie NetworkManager[687]: <info> [1588936568.2317] dhcp4 (enp6s0): option requested_interface_mtu => '1'
May 08 12:16:08 kenickie NetworkManager[687]: <info> [1588936568.2317] dhcp4 (enp6s0): option requested_ms_classless_static_routes => '1'
May 08 12:16:08 kenickie NetworkManager[687]: <info> [1588936568.2317] dhcp4 (enp6s0): option requested_nis_domain => '1'
May 08 12:16:08 kenickie NetworkManager[687]: <info> [1588936568.2317] dhcp4 (enp6s0): option requested_nis_servers => '1'
May 08 12:16:08 kenickie NetworkManager[687]: <info> [1588936568.2318] dhcp4 (enp6s0): option requested_ntp_servers => '1'
May 08 12:16:08 kenickie NetworkManager[687]: <info> [1588936568.2318] dhcp4 (enp6s0): option requested_rfc3442_classless_static_routes => '1'
May 08 12:16:08 kenickie NetworkManager[687]: <info> [1588936568.2318] dhcp4 (enp6s0): option requested_root_path => '1'
May 08 12:16:08 kenickie NetworkManager[687]: <info> [1588936568.2318] dhcp4 (enp6s0): option requested_routers => '1'
May 08 12:16:08 kenickie NetworkManager[687]: <info> [1588936568.2318] dhcp4 (enp6s0): option requested_static_routes => '1'
May 08 12:16:08 kenickie NetworkManager[687]: <info> [1588936568.2318] dhcp4 (enp6s0): option requested_subnet_mask => '1'
May 08 12:16:08 kenickie NetworkManager[687]: <info> [1588936568.2318] dhcp4 (enp6s0): option requested_time_offset => '1'
May 08 12:16:08 kenickie NetworkManager[687]: <info> [1588936568.2318] dhcp4 (enp6s0): option requested_wpad => '1'
May 08 12:16:08 kenickie NetworkManager[687]: <info> [1588936568.2318] dhcp4 (enp6s0): option routers => '192.168.2.1'
May 08 12:16:08 kenickie NetworkManager[687]: <info> [1588936568.2318] dhcp4 (enp6s0): option subnet_mask => '255.255.255.0'
May 08 12:16:08 kenickie NetworkManager[687]: <info> [1588936568.2318] dhcp4 (enp6s0): state changed unknown -> bound
May 08 12:16:09 kenickie NetworkManager[687]: <info> [1588936569.9981] dhcp6 (enp6s0): activation: beginning transaction (timeout in 45 seconds)
May 08 12:16:10 kenickie NetworkManager[687]: <info> [1588936570.0162] dhcp6 (enp6s0): option dhcp6_domain_search => 'connect'
May 08 12:16:10 kenickie NetworkManager[687]: <info> [1588936570.0166] dhcp6 (enp6s0): option dhcp6_name_servers => 'fd52:a81c:1234:1:ded9:16ff:fed5:9a73'
May 08 12:16:10 kenickie NetworkManager[687]: <info> [1588936570.0169] dhcp6 (enp6s0): state changed unknown -> bound
请注意最后一行中分配 IPv6 名称服务器的位置
查看我的路由器,它有一个 IPv6 设置(我的 ISP 不支持我所在地区的 IPv6)提供 ULA 前缀fd52:a81c:df85::
(即出现在我的网络上的那个)。IPv6 设置旁边的文字说明“此页面允许配置家庭网络中使用的 IP 地址。如果使用 DHCP,Vodafone Connect 会自动为连接到网络的设备分配 IP 地址。” 但是,路由器上的 DHCP 已关闭。
所以四个问题:
- ULA 前缀如何在我的网络中共享?(是路由器错误)?
- IPv6 地址是如何分配的
- 名称服务器的dhcp6分配从何而来?
- 有没有一种优雅的方法来停止名称服务器的 dhcp6 分配?