网桥不转发邻居通告

网桥不转发邻居通告

我使用 libvirt 和两个虚拟机创建了一个桥接器。我可以使用 ipv4 对两个虚拟机进行 ping 操作。但是,使用 ipv6 地址进行 ping 操作时,它不起作用。我可以看到邻居请求离开 VM1 并到达 VM2。然后,我可以看到 VM2 使用邻居通告进行回复。但是,桥接器“吃掉”了该数据包,因为我不再在 VM1 链接中看到它。

VM1 链路上的 tcpdump:

16:25:57.230617 IP6 2001:db8:42:2::2 > ff02::1:ff00:1: ICMP6, neighbor solicitation, who has 2001:db8:42:2::1, length 32
16:25:58.250591 IP6 2001:db8:42:2::2 > ff02::1:ff00:1: ICMP6, neighbor solicitation, who has 2001:db8:42:2::1, length 32
16:25:59.274597 IP6 2001:db8:42:2::2 > ff02::1:ff00:1: ICMP6, neighbor solicitation, who has 2001:db8:42:2::1, length 32

VM2 链路上的 tcpdump:

16:26:07.466659 IP6 2001:db8:42:2::2 > ff02::1:ff00:1: ICMP6, neighbor solicitation, who has 2001:db8:42:2::1, length 32
16:26:07.466859 IP6 2001:db8:42:2::1 > 2001:db8:42:2::2: ICMP6, neighbor advertisement, tgt is 2001:db8:42:2::1, length 32
16:26:08.490685 IP6 2001:db8:42:2::2 > ff02::1:ff00:1: ICMP6, neighbor solicitation, who has 2001:db8:42:2::1, length 32
16:26:08.490914 IP6 2001:db8:42:2::1 > 2001:db8:42:2::2: ICMP6, neighbor advertisement, tgt is 2001:db8:42:2::1, length 32

这是我的桥:

bridge name bridge id       STP enabled interfaces
virbr0      8000.5254001323d4   no      virbr0-nic
                            vnet0
                            vnet1

请注意,我已关注此链接https://askubuntu.com/a/491752并配置:

sysctl net.ipv6.conf.virbr0.disable_ipv6=0
sysctl net.ipv6.conf.virbr0.autoconf=1
sysctl net.ipv6.conf.virbr0.accept_ra=1
sysctl net.ipv6.conf.virbr0.accept_ra_defrtr=1

但是,网桥仍然不会转发邻居广告,只会转发请求

答案1

我重启了所有程序,执行了 sysctl 命令,并在创建 libvirt 网络时添加了

<network ipv6='yes'>正如解释的那样https://libvirt.org/formatnetwork.html#elementsMetadata. Ping 现已运行

相关内容