tap interface interaction with Bridge vmbr0

oah433

Member
Apr 8, 2021
31
1
8
40
When looking into the configuration of the Linux bridge (vmbr0) I can see the following:
Code:
auto lo
iface lo inet loopback

iface eno1 inet manual

auto vmbr0
iface vmbr0 inet static
        address 192.168.10.2/24
        gateway 192.168.10.1
        bridge-ports eno1
        bridge-stp off
        bridge-fd 0

However I am not seeing the configuration that connects the tap-devices to the bridge, how are they added (tap-devices), how is the bridge aware of these devices?
Lets assume I want to add a 2nd Lan to a VM and we want to connect it to vmbr0, what are the steps required to add it to vmbr0 (assume command line).
How this can be done in pure linux-bridge, tap, commands?
How is proxmox implementing them, what kind of abstraction is it doing?
Thx
 
Last edited:
When looking into the configuration of the Linux bridge (vmbr0) I can see the following:
Code:
auto lo
iface lo inet loopback

iface eno1 inet manual

auto vmbr0
iface vmbr0 inet static
        address 192.168.10.2/24
        gateway 192.168.10.1
        bridge-ports eno1
        bridge-stp off
        bridge-fd 0

However I am not seeing the configuration that connects the tap-devices to the bridge, how are they added (tap-devices), how is the bridge aware of these devices?
Lets assume I want to add a 2nd Lan to a VM and we want to connect it to vmbr0, what are the steps required to add it to vmbr0 (assume command line).
How this can be done in pure linux-bridge, tap, commands?
How is proxmox implementing them, what kind of abstraction is it doing?
Thx
tap devices are assigned to the bridge as configured in the VM settings in the moment when the respective VM starts. You can manipulate the assignments by running the linux bridge commands but it is not the approach of Proxmox, the supported way is to use the respective `qm set` command, for details see `man qm`.
 
  • Like
Reactions: oah433
tap devices are assigned to the bridge as configured in the VM settings in the moment when the respective VM starts. You can manipulate the assignments by running the linux bridge commands but it is not the approach of Proxmox, the supported way is to use the respective `qm set` command, for details see `man qm`.
thx a ton, that answers myq question.
So what you are saying is that in proxmox when I add a virtual interface to a VM, two interfaces are added, one the "virtual LAN" which is added to VM from one side and at the same time, a tap device is added to the switch on the other. That makes sense now. Thank you again.
If you confirm the above, I will go ahead and mark my question as solved @Richard

(I also attached the url for qm for the other members to make user of
https://pve.proxmox.com/pve-docs/qm.1.html
}
 
Last edited:
So what you are saying is that in proxmox when I add a virtual interface to a VM, two interfaces are added, one the "virtual LAN" which is added to VM from one side and at the same time, a tap device is added to the switch on the other.
Correct - additional remark: for the "virtual LAN" I recommend to configure an empty bridge (e.g. vmbr1) at the Proxmox host - even it would work with vmbr0 only too, but having a separated LAN would be clearer.
 
  • Like
Reactions: oah433
Is there a way to give this tap device a fixed static MAC address?
not directly, what you can do is to change the original MAC address:
Code:
ip link set <tap-tinterface-name> address <new-mac-address>
When performing the above by a script you have the effect you request.
 
  • Like
Reactions: mzhaqs
not directly, what you can do is to change the original MAC address:
Code:
ip link set <tap-tinterface-name> address <new-mac-address>
When performing the above by a script you have the effect you request.
Thanks for this. I’ll give it a go.
 

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!