[SOLVED] MAC Addressing in Linux Bridge and VM

cmdre64

Member
Jun 21, 2020
10
0
6
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.
 

Attachments

  • VM_MAC_addr.JPG
    VM_MAC_addr.JPG
    116.4 KB · Views: 173
Last edited:
Hi,
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.
Well, this is normal, each vm have a different mac address. mac address of the bridge has nothing related to vm mac address. (mac address of the bridge is more for traffic coming from the bridge itself, if you have an ip on the bridge).

just do:

#bridge fdb show, to display mac address table of the bridge.

They are nothing diffrent between a linux bridge vs a true physical switch.



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).

maybe do you have enable proxy arp on your vmbrX ? (You shouldn't see bridge mac address in arp response until you have enable proxy arp)

can you share your /etc/network/interfaces ?
 
Hey Spirit, thanks for the reply.

Sorry about my delay, I didn't get a notification. Saw this because I came back to close this out.

Good to know that that is normal. I think I just misapplied the bridge.

I had an IP assigned to each vmbrX and I guess my network didn't like that. It looks like doing it that way my some devices saw the correct IP/MAC combination and some did not.

Once I removed the ip assignment in the bridge (in node>network) everything was fine. All devices can talk to each other.

Thanks again!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!