New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The bridge does not inherit the MAC address of the NIC. #25555
Comments
Ah, please try to set It is introduced by aaa5ca5 (v250). |
cat /etc/systemd/network/br0.netdev
[NetDev]
Name=br0
Kind=bridge
[Link]
MACAddress=none It doesn't seem to be of much use. |
It must be in |
OK,After this configuration, the bridge inherits the mac address of the NIC. Also, I have two NICs, and sometimes I need to use wildcards to create bridges for these two NICs, so how do I decide which NIC's MAC address the bridge inherits? |
If it is left to the kernel, kernel selects the lowest MAC address among slave interfaces. I do not think you can change it. |
Nice.
If networkd and udevd do not set MAC address for the interface, then the kernel controls it. There is no way we can do in that case, at least now.If you have any suggestions, then please open a new RFE, or submit as a PR. Anyway, the original issue(?) is resolved. Closing. |
Well, then an RFE should indeed be initiated. |
Though, I have no idea about how to implement. Do you? |
Note, there is already a similar RFE #21577. |
Although it may seem inelegant to hardcode NIC names into configuration files, an option should be provided that specifies that the bridge inherits the MAC address of a particular NIC name. |
Sorry, I cannot follow. Could you elaborate more? |
systemd version the issue has been seen with
systemd 252 (252.2-1-manjaro)
Used distribution
manjaro 22.0.0
Linux kernel version used
6.0.10-1-MANJARO
CPU architectures issue was seen on
x86_64
Component
systemd-networkd
Expected behaviour you didn't see
The bridge inherits the MAC address of the NIC.
Unexpected behaviour you saw
The bridge does not inherit the MAC address of the NIC.
Steps to reproduce the problem
cat /etc/systemd/network/98-bridge-inherit-mac.link [Match] Type=bridge [Link] MACAddressPolicy=none cat /etc/systemd/network/99-default.link [Match] OriginalName=* [Link] NamePolicy=keep kernel database onboard slot path AlternativeNamesPolicy=database onboard slot path MACAddressPolicy=persistent WakeOnLan=magic cat /etc/systemd/network/br0_bind.network [Match] Name=enp39s0 [Network] Bridge=br0 cat /etc/systemd/network/br0.netdev [NetDev] Name=br0 Kind=bridge cat /etc/systemd/network/br0.network [Match] Name=br0 [Network] DHCP=yes MulticastDNS=true IPv6Token=prefixstable IPv6PrivacyExtensions=prefer-public
Additional program output to the terminal or log subsystem illustrating the issue
systemd-networkd:
https://gist.github.com/daiaji/8a250930632ce9a8a184e2617451dd40
I checked some configuration instructions. It seems that there should be no problem with the configuration, and I tried to change the kernel version, which seems to be useless.
The text was updated successfully, but these errors were encountered: