MAC Addressing in Linux Bridge and VM

AdamJaxson

New Member
Aug 5, 2020
1
0
1
31
Hi Proxmoxers,

Running a few VMs and CTs on Proxmox 6.2-4 on a server with multiple NICs. NIC ports are assigned to Linux Bridges and then connected individually to a particular VM or CT via the hardware GUI.

I have noticed that in pve (in shell when I run ifconfig), the MAC address assigned to the Linux Bridge (vmbrX) does not match the MAC addressed assigned in the network device virtio in the GUI hardware section of the associated VM. In the VMs I can see that the MAC address is the one assigned in software (virtio). This doesn't seem to be a problem except a few Linux devices and an Android device can't connect to VMs. I tried to force the virtio MAC to be the same as the vmbrX MAC, but I lost connection from all devices to all VM/CT when I did this.

When trying to connect to the VM the problem devices are trying to connect to the MAC address on the vmbrX and not the MAC address in the VM. Win/Apple devices connect correctly to the proper VM MAC. I can force connection in the Linux machine to point to the correct MAC with an arp command or script in /etc/network/if-up.d and it will connect. I'd prefer not to root my android device to do this (I'm not aware of a way to do this sans-root).

ARP binding on my router (wired - TP Link TL-R600VPN) or assigning IP address doesn't seem to stick very well. The router doesn't seem to honor requests to keep static IPs - i.e. if I request a static IP only in the router outside the DHCP range it still DHCP assigns the same MAC an IP address in it's DHCP range; so I'm leaning towards the idea that the router doesn't feel like handling this kind of traffic on all devices :-/ Probably need a newer beefier router.

Before I try testing different router, am I missing anything in Proxmox? The pve manual isn't super clear on MAC addressing philosophy (or my study was a little too cursory) and I'm not sure if the different MACs in vmbrX and virtio are a real issue.

No firewalls are on.

No VLAN.

I have verified that the VMs are assigned the proper port on the server by disconnecting individual ports on the server.

Attached is a pic with different MAC addresses.

Sorry if this description is a little confusing - I've been in the weeds on this one.

Thanks in advance.
 
Last edited by a moderator:
I have noticed that in pve (in shell when I run ifconfig), the MAC address assigned to the Linux Bridge (vmbrX) does not match the MAC addressed assigned in the network device virtio in the GUI hardware section of the associated VM. In the VMs I can see that the MAC address is the one assigned in software (virtio). This doesn't seem to be a problem except a few Linux devices and an Android device can't connect to VMs. I tried to force the virtio MAC to be the same as the vmbrX MAC, but I lost connection from all devices to all VM/CT when I did this.

This is normal, bridge mac address are not related to vm/ct macs addresses.
(the mac address of the bridge is only used if you haved setup an ip address on bridge, and you to join it).
vm/ct mac addresses/ports are registered in bridge forward database (#bridge fbd show)


When trying to connect to the VM the problem devices are trying to connect to the MAC address on the vmbrX and not the MAC address in the VM.
Until you have configured proxy_arp or use nat, I don't see how it's possible to use the mac address of the vmbrX.
(vmbrX will not respond to arp requests if it don't have the targetip address, or if proxy_arp is not enabled.)


Before I try testing different router, am I missing anything in Proxmox? The pve manual isn't super clear on MAC addressing philosophy (or my study was a little too cursory) and I'm not sure if the different MACs in vmbrX and virtio are a real issue.
Nothing special here, a linux bridge is working like a real physical swich.

Mac address are setup inside the vm, and the vm respond to arp request with his own mac address. (and the vmbrX registered the mac in his fdb when it see the arp reponse from the vm)



can you send your /etc/network/interfaces file ?