Skip to content
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

Inherit MAC address for bridge from physical device #12558

Closed
olafhering opened this issue May 14, 2019 · 0 comments · Fixed by #12560
Closed

Inherit MAC address for bridge from physical device #12558

olafhering opened this issue May 14, 2019 · 0 comments · Fixed by #12560
Labels
network RFE 🎁 Request for Enhancement, i.e. a feature request

Comments

@olafhering
Copy link
Contributor

With ifcfg or NetworkManager it is possible to have generic config files for every system to configure a bridge on the one and only physical network interface. See the examples below how such configuration looks like.

With systemd-networkd it is apparently required to specify the MAC in the configuration. As a result, such configuration is per host and not generic anymore:

==> /etc/systemd/network/br0.netdev <==
[NetDev]
Name=br0
Kind=bridge
==> /etc/systemd/network/br0.network <==
[Match]
Name=br0
[Link]
MACAddress=b8:ac:6f:a3:7d:0a
[Network]
DHCP=ipv4
==> /etc/systemd/network/em1.network <==
[Match]
MACAddress=b8:ac:6f:a3:7d:0a
[Network]
Bridge=br0

Here the physical link b8:ac:6f:a3:7d:0a should be part of bridge br0. Without [Link] MACAddress=b8:ac:6f:a3:7d:0a in br0.network the assigned MAC will be random. If there is just one single interface for the bridge, the MAC should be inherited. With more physical interfaces, like in the examples provided by systemd.network(5), the decision what MAC should be assigned to br0 is not straight forward.

==> /etc/sysconfig/network/ifcfg-br0 <==  
BOOTPROTO='dhcp'
BRIDGE='yes'
BRIDGE_PORTS='eth0'
BRIDGE_STP='off'
STARTMODE='auto'
==> /etc/sysconfig/network/ifcfg-eth0 <==  
BOOTPROTO='none'
STARTMODE='auto'

==> /etc/NetworkManager/system-connections/eth <==  
[connection]
id=eth
uuid=11111111-1111-1111-1111-111111111111
type=ethernet
interface-name=eth0
master=br0
permissions=
slave-type=bridge
[ethernet]
mac-address-blacklist=
==> /etc/NetworkManager/system-connections/br <==  
[connection]
autoconnect-slaves=1
id=br
interface-name=br0
permissions=
type=bridge
uuid=22222222-2222-2222-2222-222222222222
[bridge]
stp=false
[ipv4]
dhcp-timeout=2147483647
dns-search=
method=auto
[ipv6]
addr-gen-mode=stable-privacy
dns-search=
ip6-privacy=0
method=auto
@yuwata yuwata added network RFE 🎁 Request for Enhancement, i.e. a feature request labels May 14, 2019
ssahani added a commit to ssahani/systemd that referenced this issue May 14, 2019
ssahani added a commit to ssahani/systemd that referenced this issue May 14, 2019
ssahani added a commit to ssahani/systemd that referenced this issue May 14, 2019
yuwata pushed a commit that referenced this issue May 15, 2019
edevolder pushed a commit to edevolder/systemd that referenced this issue Jun 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
network RFE 🎁 Request for Enhancement, i.e. a feature request
Development

Successfully merging a pull request may close this issue.

2 participants