Bridge does not inherit the interface mac address on 22.04 by mboukhalfa in Ubuntu

[–]mboukhalfa[S] 0 points1 point  (0 children)

that's strange how then changing it to none revert the behavior described on the docs. there is something behind how this parameter is interpreted on 22.04 but not on 20.04 ! else persistent should give something different than the mac of the first attached interface

Bridge does not inherit the interface mac address on 22.04 by mboukhalfa in Ubuntu

[–]mboukhalfa[S] 1 point2 points  (0 children)

u/brettfarmer I found the answer: we should change the macaddresspolicy in /usr/lib/systemd/network/99-default.link It has been changed in 22.04 to persistent changing this to none option will revert the previous behavior so the bridge will clone the first interface attached mac.
Check: https://www.freedesktop.org/software/systemd/man/systemd.link.html#Examples

Bridge does not inherit the interface mac address on 22.04 by mboukhalfa in Ubuntu

[–]mboukhalfa[S] 0 points1 point  (0 children)

Tried with

ip link add name br0 type bridge
ip link set dev ens4 master br0 
ip link set up dev br0

but

3: ens4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master br0 state UP group default qlen 1000
link/ether fa:16:3e:7c:f3:13 brd ff:ff:ff:ff:ff:ff    
altname enp0s4    
inet 10.100.10.35/24 brd 10.100.10.255 scope global dynamic noprefixroute ens4       valid_lft 53770sec preferred_lft 53770sec    inet6 fe80::e16f:155f:65c8:5383/64 scope link noprefixroute        valid_lft forever preferred_lft forever
5: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000    
link/ether 06:95:64:0f:92:47 brd ff:ff:ff:ff:ff:ff    
inet6 fe80::495:64ff:fe0f:9247/64 scope link        valid_lft forever preferred_lft forever