VirtualBox

Opened 3 months ago

Last modified 3 months ago

#22153 new defect

Bridge mode with WiFi interface: IPv6 does not work via router

Reported by: Thomas Dreibholz Owned by:
Component: network Version: VirtualBox-7.0.20
Keywords: IPv6 WiFi bridge Cc:
Guest type: all Host type: other

Description

Setup for reproduction:

A Debian-12 VM is running in VirtualBox 7.0.20 on Ubuntu 24.04. The issue also occurs for Ubuntu and FreeBSD VMs, but I did not examine it in detail for these OSs. The VM has bridged network connectivity via the hosts's WiFi NIC. The WiFi networks' router provides IPv4 DHCP as well as IPv6 auto-configuration.

From the *host*, IPv4 and IPv6 are working:

dreibh@nordmarka:~$ ping -4 -c3 www.heise.de PING (193.99.144.85) 56(84) bytes of data. 64 bytes from www.heise.de (193.99.144.85): icmp_seq=1 ttl=243 time=29.7 ms ... dreibh@nordmarka:~$ ping -6 -c3 www.heise.de PING www.heise.de(www.heise.de (2a02:2e0:3fe:1001:7777:772e:2:85)) 56 data bytes 64 bytes from www.heise.de (2a02:2e0:3fe:1001:7777:772e:2:85): icmp_seq=1 ttl=52 time=35.3 ms ...

From the *VM*, IPv4 is working: nornetpp@localhost:~$ ping -4 -c3 www.heise.de PING (193.99.144.85) 56(84) bytes of data. 64 bytes from www.heise.de (193.99.144.85): icmp_seq=1 ttl=243 time=35.3 ms ...

However, from the *VM*, IPv6 is not working: nornetpp@localhost:~$ ping -6 -c3 www.heise.de PING www.heise.de(www.heise.de (2a02:2e0:3fe:1001:7777:772e:2:85)) 56 data bytes

--- www.heise.de ping statistics --- 3 packets transmitted, 0 received, 100% packet loss, time 2040ms

IPv6 uses auto-configuration, both on *host* and *VM*. Both get the same, correct route, i.e.:

*Host*: dreibh@nordmarka:~$ ip -6 route show ... default via fe80::<ROUTER INTERFACE ID> dev wlp4s0 proto ra metric 600 pref medium

*VM*: nornetpp@localhost:~$ ip -6 route show ... default via fe80::<ROUTER INTERFACE ID> dev enp0s3 proto ra metric 1024 expires 293sec hoplimit 64 pref medium

IPv6 auto-configuration is okay, the VM got its prefix as well as the route. However, routing does not work from the VM via the router, while local connectivity in the bridge network is okay.

The router's address is in both neighbor tables, i.e.: *Host*: dreibh@nordmarka:~$ ip -6 neigh show fe80::<ROUTER INTERFACE ID> dev wlp4s0 lladdr <ROUTER MAC> router STALE

*VM*: nornetpp@localhost:~$ ip -6 neigh show fe80::<ROUTER INTERFACE ID> dev enp0s3 lladdr <ROUTER MAC> router STALE

I discovered a strange work-around: I have the global prefix of the network, and combined it with the interface ID of the router to get the router's global address: 2a02:fe1:e08b:5000::<ROUTER INTERFACE ID>.

A ping to this global router address works: nornetpp@localhost:~$ ping 2a02:fe1:e08b:5000:<ROUTER INTERFACE ID> PING 2a02:fe1:e08b:5000:<ROUTER INTERFACE ID>(2a02:fe1:e08b:5000:<ROUTER INTERFACE ID 56 data bytes 64 bytes from 2a02:fe1:e08b:5000:<ROUTER INTERFACE ID>: icmp_seq=1 ttl=64 time=19.4 ms

But now, after this initial ping to the router's global address, IPv6 Internet connectivity is also working as well!

nornetpp@localhost:~$ ping -6 www.heise.de PING www.heise.de(www.heise.de (2a02:2e0:3fe:1001:7777:772e:2:85)) 56 data bytes 64 bytes from www.heise.de (2a02:2e0:3fe:1001:7777:772e:2:85): icmp_seq=1 ttl=52 time=35.8 ms ...

Also very strange, after rebooting the VM (just reboot, not turning it off/on!), IPv6 Internet connectivity remains working!

But turning the VM off and on again, the issue is back -- and pinging the router's global address once again gets IPv6 Internet connectivity again.

I suspect something is wrong with VirtualBox's bridging functionality when the network interface is a WiFi interface. Using an Ethernet interface instead seems to be okay. May be something around handling link-local addresses, or the mapping of addresses to MAC addresses via IPv6 Neighbour Discovery is buggy?

Attachments (1)

Basic-Debian-12-2024-08-28-22-30-53.log (96.2 KB ) - added by Thomas Dreibholz 3 months ago.
VBox.log

Download all attachments as: .zip

Change History (3)

by Thomas Dreibholz, 3 months ago

VBox.log

comment:1 by Thomas Dreibholz, 3 months ago

This document seems to describe the same or a related issue: https://gist.github.com/0xquad/6090af4fe2c5b5fc6299 , with a similar work-around.

Note: See TracTickets for help on using tickets.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette