Re: Investigating MAC Address Conflict Resolution in libvirt: Log Analysis and Code Location Inquiry

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

 



Dear [Libvirt Developer Team],

It has been quite some time since I initially sent my email, and I never
expected to receive a response after so long.

I sincerely appreciate your time and effort in addressing this case — thank
you!

Regarding your question:

> To further clarify - when you say "vNIC" do you mean the tap device that
> is connected to the bridge on the host side, and "target VM's MAC address"
> is the MAC address of the network device inside the guest (VM)?

Yes, that is precisely what I meant!

Now, returning to the issue at hand: the distinctiveness of MAC addresses
is a fundamental principle of network communication.

This issue was originally raised by a friend of mine. While I was able to
explain the theoretical importance of unique MAC addresses, I couldn't
provide a clear explanation of how libvirt handles the "automatic
modification" of the tap device's MAC address, as I had only observed
changes in the device's state but not the modification itself in the logs.

After carefully reviewing your response multiple times and conducting
additional tests, I now fully understand the mechanism behind the "0xFE"
modification of the first byte of the MAC address, which is handled in
virNetDevTapCreateInBridgePort() at line 638 (starting at line 625).

However, I wanted to confirm one specific point regarding tap device
behavior. According to the official documentation
<https://libvirt.org/formatdomain.html#generic-ethernet-connection>:

> "If no target dev is specified, libvirt will create a new standard tap
> device with a name of the pattern 'vnetN', where 'N' is replaced with a
> number. If a target dev is specified and that device doesn't exist, then a
> new standard tap device will be created with the exact dev name given."

In contrast, you mentioned:

> "Any time you stop/destroy a guest, any tap device(s) associated with that
> guest will be destroyed, and the next time you start the guest, new tap
> devices will be created."


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux