win10 1803 启用 hyperV 宿主机无法通过 dhcpv6 获得 ipv6 地址

2018-09-10 11:55:54 +08:00
 redsonic
dhcpv6 服务端为 dnsmasq 配置如下:

dhcp-authoritative
domain-needed
localise-queries
read-ethers
bogus-priv
expand-hosts
server=/lan/
dhcp-leasefile=/tmp/dhcp.leases
resolv-file=/tmp/resolv.conf.auto
addn-hosts=/tmp/hosts
conf-dir=/tmp/dnsmasq.d
stop-dns-rebind
rebind-localhost-ok
dhcp-broadcast=tag:needs-broadcast
dhcp-range=lan,192.168.1.100,192.168.1.249,255.255.255.0,12h
no-dhcp-interface=eth0.2
dhcp-range=fd11:4401::100, fd11:4401::200, 64, 12h
enable-ra

win10 1803 未启用 hyperV 时可正常获取 ipv6 地址,启用之后并新建 external vswitch,宿主机和客户机都会通过这个 vswitch 和物理网路桥接来和外部网络通信。此时 vswitch 无法获得 ipv6 地址,但 ra 正常可以获得 ipv6 前缀长度和缺省路由以及 dns 等等。而且此时客户机也正常,可以和外部 ipv6 通信。

用以下步骤尝试解决未果:
1. netsh interface ipv6 reset 重置网络配置
2. 完全关闭 win10 内建防火墙

通过抓包发现宿主机可以正确发出 dhcpv6 的请求,但好像没有收到回应一样多次重试请求:

11:46:18.204794 IP6 fe80::e1ef:3ab8:4f9d:69ca.dhcpv6-client > ff02::1:2.dhcpv6-server: dhcp6 solicit
11:46:18.207006 IP6 fe80::20c:43ff:fe28:80a6.dhcpv6-server > fe80::e1ef:3ab8:4f9d:69ca.dhcpv6-client: dhcp6 advertise
11:46:18.231870 IP6 fe80::e1ef:3ab8:4f9d:69ca.dhcpv6-client > ff02::1:2.dhcpv6-server: dhcp6 solicit
11:46:18.233859 IP6 fe80::20c:43ff:fe28:80a6.dhcpv6-server > fe80::e1ef:3ab8:4f9d:69ca.dhcpv6-client: dhcp6 advertise
11:46:19.246108 IP6 fe80::e1ef:3ab8:4f9d:69ca.dhcpv6-client > ff02::1:2.dhcpv6-server: dhcp6 solicit
11:46:19.247919 IP6 fe80::20c:43ff:fe28:80a6.dhcpv6-server > fe80::e1ef:3ab8:4f9d:69ca.dhcpv6-client: dhcp6 advertise
11:46:20.254656 IP6 fe80::e1ef:3ab8:4f9d:69ca.dhcpv6-client > ff02::1:2.dhcpv6-server: dhcp6 solicit
11:46:20.256491 IP6 fe80::20c:43ff:fe28:80a6.dhcpv6-server > fe80::e1ef:3ab8:4f9d:69ca.dhcpv6-client: dhcp6 advertise
11:46:22.257985 IP6 fe80::e1ef:3ab8:4f9d:69ca.dhcpv6-client > ff02::1:2.dhcpv6-server: dhcp6 solicit
11:46:22.259784 IP6 fe80::20c:43ff:fe28:80a6.dhcpv6-server > fe80::e1ef:3ab8:4f9d:69ca.dhcpv6-client: dhcp6 advertise
11:46:26.257935 IP6 fe80::e1ef:3ab8:4f9d:69ca.dhcpv6-client > ff02::1:2.dhcpv6-server: dhcp6 solicit
11:46:26.259782 IP6 fe80::20c:43ff:fe28:80a6.dhcpv6-server > fe80::e1ef:3ab8:4f9d:69ca.dhcpv6-client: dhcp6 advertise
11:46:34.276753 IP6 fe80::e1ef:3ab8:4f9d:69ca.dhcpv6-client > ff02::1:2.dhcpv6-server: dhcp6 solicit
11:46:34.342910 IP6 fe80::20c:43ff:fe28:80a6.dhcpv6-server > fe80::e1ef:3ab8:4f9d:69ca.dhcpv6-client: dhcp6 advertise
11:46:50.290112 IP6 fe80::e1ef:3ab8:4f9d:69ca.dhcpv6-client > ff02::1:2.dhcpv6-server: dhcp6 solicit
11:46:50.292013 IP6 fe80::20c:43ff:fe28:80a6.dhcpv6-server > fe80::e1ef:3ab8:4f9d:69ca.dhcpv6-client: dhcp6 advertise
3805 次点击
所在节点    Windows
4 条回复
PublicDNS
2019-02-05 14:28:53 +08:00
楼主这个问题后来解决了吗?我碰到了同样的问题,通过 wireshark 可以看到发出了 dhcpv6 请求而且也收到回复,但是一直在重发。
redsonic
2019-02-05 15:09:26 +08:00
@PublicDNS 没有解决,目前只能手动。奇怪的是很少有人反应这个问题,更没有 bug 提交。
404error
2019-11-30 21:18:34 +08:00
我在 win10 1909 上遇到相同问题,不知道怎么解决。
redsonic
2019-11-30 21:24:43 +08:00
@404error 我升级到 1909 反而好了,宿主机可以拿到 ipv6 地址了。你把原来虚拟出来的 external vswitch 删掉重建一个新的试试。

@PublicDNS

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/487810

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX