[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: MAC address of bridge interfaces



On 29.06.2022 07:27, Steve Keller wrote:
I upgraded a Debian machine from stretch to bullseye and see
a change of the IP address of a ethernet bridge interface.

The bridge has a physical LAN interface as one fixed bridge port
and additional ports for kvm virtual machines I may start.

Before the upgrade the bridge interface got its MAC address from
the physical LAN interface.  With Bullseye this is no longer the
case.  Instead, the MAC address seems to be generated "somehow".
At least, this new address is fixed and doesn't change on each
reboot.

But how is that MAC address generated?  Is it stored somewhere?
Can I set it to an address of my own preference?
And why was this changed, why don't we still use the address of
the physical port connected to it?

Steve

I didn't experienced any problems with libvirt networks after host OS dist-upgrades. On my KVM host, physical ethernet interface and virtual network bridges (route mode) have different MAC addresses. Libvirt\KVM network configurations are explained in the libvirt documentation¹. I don't remember if I ever had to assign any MAC addresses for virtual bridges or ports manually. I've used "Virtual Machine Manager" to create virtual networks and used auto-generated MAC addresses, as suggested in the docs. At some point in time I had to make use of fixed DHCP IP addresses for my VMs and also made hook scripts to dynamically add\remove firewall rules for VM guests. All virtual network configurations are defined in xml format and "virsh" utility is used to view\edit them.
    $ sudo virsh net-list
    $ sudo virsh net-dumpxml --network <libvirt network>
    $ sudo virsh net-port-list --network <libvirt network>
    $ sudo virsh net-port-dumpxml --port <port GUID> --network <libvirt network>


¹ : https://libvirt.org/formatnetwork.html#addressing

--
With kindest regards, Alexander.

⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀⠀⠀⠀


Reply to: