Re:NAT Is the Enemy of Low Power Devices
by pjc50 on Friday February 14, 2025 @03:30AM
(#43046175)
Shouldn't the VMs have their own MACs?
[ Parent
| on HN ]
Re:NAT Is the Enemy of Low Power Devices
by jeroenhd on Friday February 14, 2025 @04:55AM
(#43046732)
If they're not routed directly through the network card but use a virtual switch instead, the network upstream only sees the server MAC. If they're directly hooked into the network card they can have their own MACs, but that approach can make it hard to communicate between host and VM.
Re:NAT Is the Enemy of Low Power Devices
by nolist_policy on Friday February 14, 2025 @05:53AM
(#43047104)
Also, multiple MACs does not work with wlan.
Why would it not? There's even a third MAC address field in the 802.11 headers for just that scenario, as far as I remember (i.e. to distinguish between "802.11 source/destination" and "Ethernet-level actual source/destination").
Re:NAT Is the Enemy of Low Power Devices
by nolist_policy on Friday February 14, 2025 @04:40PM
(#43053367)
You actually need to use special 4addr/WDS frames with 4 addresses[1]. However no one accepts these by default so it's unusable for a Laptop that you want to connect to random wlan networks.
[1] https://lore.kernel.org/netdev/1258465585.3682.7.camel@johan...
Hm, maybe I'm mixing up something here, but all I can say is that it works like this on my machine: I have a VM running in bridged mode, I'm connected to my home router using Wi-Fi, and I can see the virtual MAC address of the VM on the router management interface.
Possibly this is just at the DHCP level, though, and what the router sees just comes from my host MAC address? A quick packet trace suggests that.