[systemd-devel] systemd-networkd bridge with DHCP not working
Henrik /KaarPoSoft
henrik at kaarposoft.dk
Tue Mar 18 02:38:47 PDT 2014
On 03/18/2014 10:10 AM, Tom Gundersen wrote:
> On Tue, Mar 18, 2014 at 10:00 AM, Henrik /KaarPoSoft
> <henrik at kaarposoft.dk> wrote:
>> On 03/18/2014 09:18 AM, Henrik /KaarPoSoft wrote:
>>>
>>> On 03/17/2014 10:32 PM, Tom Gundersen wrote:
>>>>
>>>> On Mon, Mar 17, 2014 at 10:21 PM, Henrik /KaarPoSoft
>>>> <henrik at kaarposoft.dk> wrote:
>>>>>
>>>>> Hi Tom,
>>>>>
>>>>> Thanks for your feedback...
>>>>>
>>>>> I was briefly looking through git commits after 211 without finding
>>>>> anything
>>>>> related. But then again I did not look into too much detail.
>>>>>
>>>>> Do you know which commit would solve this?
>>>>
>>>>
>>>> Ah, this was not obvious at all. This was almost certainly fixed as a
>>>> side-effect of refactoring the rtnl_message_read_*() code, so if you
>>>> pull in 9842de0d93d and the commits it relies on that should do it (I
>>>> haven't verified that that's the culprit, but it seems likely from
>>>> looking at it).
>>>>
>>>> Cheers,
>>>>
>>>> Tom
>>>>
>>> Tom,
>>> As far as I can see, 9842de0d93d was already included in 211.
>>> I have rebuild my systemd from the head of git 4dd5da7f.
>>> And the problem remains )))-:
>>> /Henrik
>>
>>
>> As a quick hack, I tried this:
>>
>> cat > /etc/systemd/network/42-br0.link<<EOF
>> [Match]
>> Type=bridge
>> [Link]
>> MACAddress=10:bf:48:d7:68:e1
>> EOF
>>
>> And now I get an IP address by DHCP, and I have connectivity.
>>
>> But hard-coding the MAC is hardly a viable long-term solution...
>
> Yeah, that's not going to fly.
>
> Could you attach the full debug output of a failing run? To get it,
> you probably want to stop systemd-networkd, "ip link del" the bridge,
> and start networkd from the commandline:
>
> # SYSTEMD_LOG_LEVEL=debug /lib/systemd/systemd-networkd
>
> I think I understand what's going on, but I'd like to have it verified
> before changing anything.
>
> Cheers,
>
> Tom
>
I guess running from the commandline should not be necessary since I have
[Service]
Environment=SYSTEMD_LOG_LEVEL=debug
in
/etc/systemd/system/systemd-networkd.service.d/debug.conf
Log attached.
/henrik
-------------- next part --------------
cat > /etc/systemd/network/42-br0.netdev<<EOF
[NetDev]
Name=br0
Kind=bridge
EOF
cat > /etc/systemd/network/44-en.network<<EOF
[Match]
Name=${IF}
[Network]
Bridge=br0
EOF
cat > /etc/systemd/network/46-br0.network<<EOF
[Match]
Name=br0
[Network]
DHCP=yes
EOF
journalctl -b _SYSTEMD_UNIT=systemd-networkd.service|cat
Mar 18 10:27:24 komplett-21 systemd-networkd[2667]: timestamp of '/etc/systemd/network' changed
Mar 18 10:27:24 komplett-21 systemd-networkd[2667]: timestamp of '/run/systemd/network' changed
Mar 18 10:27:24 komplett-21 systemd-networkd[2667]: br0: creating netdev
Mar 18 10:27:24 komplett-21 systemd-networkd[2667]: eno1: found matching network '/etc/systemd/network/44-en.network'
Mar 18 10:27:24 komplett-21 systemd-networkd[2667]: eno1: requesting link status
Mar 18 10:27:24 komplett-21 systemd-networkd[2667]: eno1: enslaving by 'br0'
Mar 18 10:27:24 komplett-21 systemd-networkd[2667]: eno1: link (with ifindex 2) added
Mar 18 10:27:24 komplett-21 systemd-networkd[2667]: enp11s0: link (with ifindex 3) added
Mar 18 10:27:24 komplett-21 systemd-networkd[2667]: br0: found matching network '/etc/systemd/network/46-br0.network'
Mar 18 10:27:24 komplett-21 systemd-networkd[2667]: br0: requesting link status
Mar 18 10:27:24 komplett-21 systemd-networkd[2667]: br0: bringing link up
Mar 18 10:27:24 komplett-21 systemd-networkd[2667]: br0: link (with ifindex 5) added
Mar 18 10:27:24 komplett-21 systemd-networkd[2667]: lo: link (with ifindex 1) added
Mar 18 10:27:24 komplett-21 systemd-networkd[2667]: sit0: link (with ifindex 4) added
Mar 18 10:27:24 komplett-21 systemd-networkd[2667]: br0: link already exists, ignoring
Mar 18 10:27:24 komplett-21 systemd-networkd[2667]: br0: netdev ready
Mar 18 10:27:24 komplett-21 systemd-networkd[2667]: br0: enslaving link 'eno1'
Mar 18 10:27:24 komplett-21 systemd-networkd[2667]: br0: MAC address: 26:1b:73:27:88:8d
Mar 18 10:27:24 komplett-21 systemd-networkd[2667]: br0: link status updated: 00000000 -> 0x00001002
Mar 18 10:27:24 komplett-21 systemd-networkd[2667]: Sent message type=method_call sender=n/a destination=org.freedesktop.DBus object=/org/freedesktop/DBus interface=org.freedesktop.DBus member=Hello cookie=1 reply_cookie=0 error=n/a
Mar 18 10:27:24 komplett-21 systemd-networkd[2667]: eno1: MAC address: 10:bf:48:d7:68:e1
Mar 18 10:27:24 komplett-21 systemd-networkd[2667]: eno1: link status updated: 00000000 -> 0x00001002
Mar 18 10:27:24 komplett-21 systemd-networkd[2667]: Got message type=method_return sender=org.freedesktop.DBus destination=:1.3 object=n/a interface=n/a member=n/a cookie=1 reply_cookie=1 error=n/a
Mar 18 10:27:24 komplett-21 systemd-networkd[2667]: br0: MAC address: 26:1b:73:27:88:8d
Mar 18 10:27:24 komplett-21 systemd-networkd[2667]: Got message type=signal sender=org.freedesktop.DBus destination=:1.3 object=/org/freedesktop/DBus interface=org.freedesktop.DBus member=NameAcquired cookie=2 reply_cookie=0 error=n/a
Mar 18 10:27:24 komplett-21 systemd-networkd[2667]: br0: MAC address: 26:1b:73:27:88:8d
Mar 18 10:27:24 komplett-21 systemd-networkd[2667]: br0: link is up
Mar 18 10:27:24 komplett-21 systemd-networkd[2667]: br0: carrier on
Mar 18 10:27:24 komplett-21 systemd-networkd[2667]: DHCP CLIENT: set MAC address to 26:1b:73:27:88:8d
Mar 18 10:27:24 komplett-21 systemd-networkd[2667]: br0: acquiring DHCPv4 lease
Mar 18 10:27:24 komplett-21 systemd-networkd[2667]: DHCP CLIENT: STARTED
Mar 18 10:27:24 komplett-21 systemd-networkd[2667]: br0: link status updated: 0x00001002 -> 0x00011043
Mar 18 10:27:24 komplett-21 systemd-networkd[2667]: DHCP CLIENT: DISCOVER
Mar 18 10:27:24 komplett-21 systemd-networkd[2667]: eno1: MAC address: 10:bf:48:d7:68:e1
Mar 18 10:27:24 komplett-21 systemd-networkd[2667]: eno1: MAC address: 10:bf:48:d7:68:e1
Mar 18 10:27:24 komplett-21 systemd-networkd[2667]: br0: MAC address: 26:1b:73:27:88:8d
Mar 18 10:27:24 komplett-21 systemd-networkd[2667]: eno1: MAC address: 10:bf:48:d7:68:e1
Mar 18 10:27:24 komplett-21 systemd-networkd[2667]: br0: MAC address: 10:bf:48:d7:68:e1
Mar 18 10:27:24 komplett-21 systemd-networkd[2667]: br0: carrier off
Mar 18 10:27:24 komplett-21 systemd-networkd[2667]: DHCP CLIENT: STOPPED
Mar 18 10:27:24 komplett-21 systemd-networkd[2667]: br0: link status updated: 0x00011043 -> 0x00001043
Mar 18 10:27:24 komplett-21 systemd-networkd[2667]: eno1: enslaved
Mar 18 10:27:24 komplett-21 systemd-networkd[2667]: eno1: bringing link up
Mar 18 10:27:25 komplett-21 systemd-networkd[2667]: eno1: link configured
Mar 18 10:27:25 komplett-21 systemd-networkd[2667]: eno1: MAC address: 10:bf:48:d7:68:e1
Mar 18 10:27:25 komplett-21 systemd-networkd[2667]: eno1: link is up
Mar 18 10:27:25 komplett-21 systemd-networkd[2667]: eno1: link status updated: 0x00001002 -> 0x00001003
Mar 18 10:27:25 komplett-21 systemd-networkd[2667]: eno1: MAC address: 10:bf:48:d7:68:e1
Mar 18 10:27:25 komplett-21 systemd-networkd[2667]: br0: MAC address: 10:bf:48:d7:68:e1
Mar 18 10:27:25 komplett-21 systemd-networkd[2667]: br0: link status updated: 0x00001043 -> 0x00001003
Mar 18 10:27:27 komplett-21 systemd-networkd[2667]: eno1: MAC address: 10:bf:48:d7:68:e1
Mar 18 10:27:27 komplett-21 systemd-networkd[2667]: eno1: carrier on
Mar 18 10:27:27 komplett-21 systemd-networkd[2667]: eno1: link status updated: 0x00001003 -> 0x00011043
Mar 18 10:27:27 komplett-21 systemd-networkd[2667]: eno1: MAC address: 10:bf:48:d7:68:e1
Mar 18 10:27:27 komplett-21 systemd-networkd[2667]: eno1: MAC address: 10:bf:48:d7:68:e1
Mar 18 10:27:27 komplett-21 systemd-networkd[2667]: eno1: MAC address: 10:bf:48:d7:68:e1
Mar 18 10:27:27 komplett-21 systemd-networkd[2667]: br0: MAC address: 10:bf:48:d7:68:e1
Mar 18 10:27:27 komplett-21 systemd-networkd[2667]: br0: carrier on
Mar 18 10:27:27 komplett-21 systemd-networkd[2667]: br0: acquiring DHCPv4 lease
Mar 18 10:27:27 komplett-21 systemd-networkd[2667]: DHCP CLIENT: STARTED
Mar 18 10:27:27 komplett-21 systemd-networkd[2667]: br0: link status updated: 0x00001003 -> 0x00011043
Mar 18 10:27:27 komplett-21 systemd-networkd[2667]: DHCP CLIENT: DISCOVER
Mar 18 10:27:28 komplett-21 systemd-networkd[2667]: DHCP CLIENT: ignoring packet: to port 9303, which is not the DHCP client port (68)
Mar 18 10:27:29 komplett-21 systemd-networkd[2667]: DHCP CLIENT: DISCOVER
Mar 18 10:27:31 komplett-21 systemd-networkd[2667]: DHCP CLIENT: DISCOVER
Mar 18 10:27:33 komplett-21 systemd-networkd[2667]: DHCP CLIENT: ignoring packet: to port 9303, which is not the DHCP client port (68)
Mar 18 10:27:35 komplett-21 systemd-networkd[2667]: DHCP CLIENT: DISCOVER
Mar 18 10:27:42 komplett-21 systemd-networkd[2667]: eno1: MAC address: 10:bf:48:d7:68:e1
Mar 18 10:27:43 komplett-21 systemd-networkd[2667]: DHCP CLIENT: ignoring packet: to port 9303, which is not the DHCP client port (68)
Mar 18 10:27:43 komplett-21 systemd-networkd[2667]: DHCP CLIENT: DISCOVER
Mar 18 10:27:53 komplett-21 systemd-networkd[2667]: DHCP CLIENT: ignoring packet: to port 9303, which is not the DHCP client port (68)
Mar 18 10:27:58 komplett-21 systemd-networkd[2667]: DHCP CLIENT: DISCOVER
Mar 18 10:28:02 komplett-21 systemd-networkd[2667]: DHCP CLIENT: ignoring packet: to port 137, which is not the DHCP client port (68)
Mar 18 10:28:02 komplett-21 systemd-networkd[2667]: DHCP CLIENT: ignoring packet: to port 137, which is not the DHCP client port (68)
Mar 18 10:28:03 komplett-21 systemd-networkd[2667]: DHCP CLIENT: ignoring packet: to port 9303, which is not the DHCP client port (68)
Mar 18 10:28:13 komplett-21 systemd-networkd[2667]: DHCP CLIENT: ignoring packet: to port 9303, which is not the DHCP client port (68)
Mar 18 10:28:23 komplett-21 systemd-networkd[2667]: DHCP CLIENT: ignoring packet: to port 9303, which is not the DHCP client port (68)
Mar 18 10:28:30 komplett-21 systemd-networkd[2667]: DHCP CLIENT: DISCOVER
Mar 18 10:28:33 komplett-21 systemd-networkd[2667]: DHCP CLIENT: ignoring packet: to port 9303, which is not the DHCP client port (68)
Mar 18 10:28:43 komplett-21 systemd-networkd[2667]: DHCP CLIENT: ignoring packet: to port 9303, which is not the DHCP client port (68)
Mar 18 10:28:53 komplett-21 systemd-networkd[2667]: DHCP CLIENT: ignoring packet: to port 9303, which is not the DHCP client port (68)
Mar 18 10:29:03 komplett-21 systemd-networkd[2667]: DHCP CLIENT: ignoring packet: to port 9303, which is not the DHCP client port (68)
Mar 18 10:29:13 komplett-21 systemd-networkd[2667]: DHCP CLIENT: ignoring packet: to port 9303, which is not the DHCP client port (68)
Mar 18 10:29:23 komplett-21 systemd-networkd[2667]: DHCP CLIENT: ignoring packet: to port 9303, which is not the DHCP client port (68)
cat > /etc/systemd/network/42-br0.link<<EOF
[Match]
Type=bridge
[Link]
MACAddress=10:bf:48:d7:68:e1
EOF
Mar 18 09:49:54 komplett-21 systemd-networkd[2680]: timestamp of '/etc/systemd/network' changed
Mar 18 09:49:54 komplett-21 systemd-networkd[2680]: timestamp of '/run/systemd/network' changed
Mar 18 09:49:54 komplett-21 systemd-networkd[2680]: br0: creating netdev
Mar 18 09:49:54 komplett-21 systemd-networkd[2680]: eno1: found matching network '/etc/systemd/network/44-en.network'
Mar 18 09:49:54 komplett-21 systemd-networkd[2680]: eno1: requesting link status
Mar 18 09:49:54 komplett-21 systemd-networkd[2680]: eno1: enslaving by 'br0'
Mar 18 09:49:54 komplett-21 systemd-networkd[2680]: eno1: link (with ifindex 2) added
Mar 18 09:49:54 komplett-21 systemd-networkd[2680]: enp11s0: link (with ifindex 3) added
Mar 18 09:49:54 komplett-21 systemd-networkd[2680]: br0: found matching network '/etc/systemd/network/46-br0.network'
Mar 18 09:49:54 komplett-21 systemd-networkd[2680]: br0: requesting link status
Mar 18 09:49:54 komplett-21 systemd-networkd[2680]: br0: bringing link up
Mar 18 09:49:54 komplett-21 systemd-networkd[2680]: br0: link (with ifindex 5) added
Mar 18 09:49:54 komplett-21 systemd-networkd[2680]: lo: link (with ifindex 1) added
Mar 18 09:49:54 komplett-21 systemd-networkd[2680]: sit0: link (with ifindex 4) added
Mar 18 09:49:54 komplett-21 systemd-networkd[2680]: br0: link already exists, ignoring
Mar 18 09:49:54 komplett-21 systemd-networkd[2680]: br0: netdev ready
Mar 18 09:49:54 komplett-21 systemd-networkd[2680]: br0: enslaving link 'eno1'
Mar 18 09:49:54 komplett-21 systemd-networkd[2680]: br0: MAC address: 1e:ec:19:08:9f:2f
Mar 18 09:49:54 komplett-21 systemd-networkd[2680]: br0: link status updated: 00000000 -> 0x00001002
Mar 18 09:49:54 komplett-21 systemd-networkd[2680]: Sent message type=method_call sender=n/a destination=org.freedesktop.DBus object=/org/freedesktop/DBus interface=org.freedesktop.DBus member=Hello cookie=1 reply_cookie=0 error=n/a
Mar 18 09:49:54 komplett-21 systemd-networkd[2680]: br0: MAC address: 10:bf:48:d7:68:e1
Mar 18 09:49:54 komplett-21 systemd-networkd[2680]: eno1: MAC address: 10:bf:48:d7:68:e1
Mar 18 09:49:54 komplett-21 systemd-networkd[2680]: eno1: link status updated: 00000000 -> 0x00001002
Mar 18 09:49:54 komplett-21 systemd-networkd[2680]: Got message type=method_return sender=org.freedesktop.DBus destination=:1.3 object=n/a interface=n/a member=n/a cookie=1 reply_cookie=1 error=n/a
Mar 18 09:49:54 komplett-21 systemd-networkd[2680]: Got message type=signal sender=org.freedesktop.DBus destination=:1.3 object=/org/freedesktop/DBus interface=org.freedesktop.DBus member=NameAcquired cookie=2 reply_cookie=0 error=n/a
Mar 18 09:49:54 komplett-21 systemd-networkd[2680]: br0: MAC address: 10:bf:48:d7:68:e1
Mar 18 09:49:54 komplett-21 systemd-networkd[2680]: br0: MAC address: 10:bf:48:d7:68:e1
Mar 18 09:49:54 komplett-21 systemd-networkd[2680]: br0: link is up
Mar 18 09:49:54 komplett-21 systemd-networkd[2680]: br0: link status updated: 0x00001002 -> 0x00001043
Mar 18 09:49:54 komplett-21 systemd-networkd[2680]: eno1: MAC address: 10:bf:48:d7:68:e1
Mar 18 09:49:54 komplett-21 systemd-networkd[2680]: eno1: MAC address: 10:bf:48:d7:68:e1
Mar 18 09:49:54 komplett-21 systemd-networkd[2680]: br0: MAC address: 10:bf:48:d7:68:e1
Mar 18 09:49:54 komplett-21 systemd-networkd[2680]: eno1: MAC address: 10:bf:48:d7:68:e1
Mar 18 09:49:54 komplett-21 systemd-networkd[2680]: eno1: enslaved
Mar 18 09:49:54 komplett-21 systemd-networkd[2680]: eno1: bringing link up
Mar 18 09:49:55 komplett-21 systemd-networkd[2680]: eno1: link configured
Mar 18 09:49:55 komplett-21 systemd-networkd[2680]: eno1: MAC address: 10:bf:48:d7:68:e1
Mar 18 09:49:55 komplett-21 systemd-networkd[2680]: eno1: link is up
Mar 18 09:49:55 komplett-21 systemd-networkd[2680]: eno1: link status updated: 0x00001002 -> 0x00001003
Mar 18 09:49:55 komplett-21 systemd-networkd[2680]: eno1: MAC address: 10:bf:48:d7:68:e1
Mar 18 09:49:55 komplett-21 systemd-networkd[2680]: br0: MAC address: 10:bf:48:d7:68:e1
Mar 18 09:49:55 komplett-21 systemd-networkd[2680]: br0: link status updated: 0x00001043 -> 0x00001003
Mar 18 09:49:57 komplett-21 systemd-networkd[2680]: eno1: MAC address: 10:bf:48:d7:68:e1
Mar 18 09:49:57 komplett-21 systemd-networkd[2680]: eno1: carrier on
Mar 18 09:49:57 komplett-21 systemd-networkd[2680]: eno1: link status updated: 0x00001003 -> 0x00011043
Mar 18 09:49:57 komplett-21 systemd-networkd[2680]: eno1: MAC address: 10:bf:48:d7:68:e1
Mar 18 09:49:57 komplett-21 systemd-networkd[2680]: eno1: MAC address: 10:bf:48:d7:68:e1
Mar 18 09:49:57 komplett-21 systemd-networkd[2680]: eno1: MAC address: 10:bf:48:d7:68:e1
Mar 18 09:49:57 komplett-21 systemd-networkd[2680]: br0: MAC address: 10:bf:48:d7:68:e1
Mar 18 09:49:57 komplett-21 systemd-networkd[2680]: br0: carrier on
Mar 18 09:49:57 komplett-21 systemd-networkd[2680]: DHCP CLIENT: set MAC address to 10:bf:48:d7:68:e1
Mar 18 09:49:57 komplett-21 systemd-networkd[2680]: br0: acquiring DHCPv4 lease
Mar 18 09:49:57 komplett-21 systemd-networkd[2680]: DHCP CLIENT: STARTED
Mar 18 09:49:57 komplett-21 systemd-networkd[2680]: br0: link status updated: 0x00001003 -> 0x00011043
Mar 18 09:49:57 komplett-21 systemd-networkd[2680]: DHCP CLIENT: DISCOVER
Mar 18 09:49:58 komplett-21 systemd-networkd[2680]: DHCP CLIENT: ignoring packet: to port 9303, which is not the DHCP client port (68)
Mar 18 09:49:58 komplett-21 systemd-networkd[2680]: DHCP CLIENT: DISCOVER
Mar 18 09:49:59 komplett-21 systemd-networkd[2680]: DHCP CLIENT: OFFER
Mar 18 09:50:00 komplett-21 systemd-networkd[2680]: DHCP CLIENT: REQUEST
Mar 18 09:50:00 komplett-21 systemd-networkd[2680]: DHCP CLIENT: ACK
Mar 18 09:50:00 komplett-21 systemd-networkd[2680]: br0: DHCPv4 address 192.168.99.161/24 via 192.168.99.254
Mar 18 09:50:00 komplett-21 systemd-networkd[2680]: br0: setting addresses
Mar 18 09:50:00 komplett-21 systemd-networkd[2680]: br0: addresses set
Mar 18 09:50:00 komplett-21 systemd-networkd[2680]: br0: setting routes
Mar 18 09:50:00 komplett-21 systemd-networkd[2680]: br0: routes set
Mar 18 09:50:00 komplett-21 systemd-networkd[2680]: br0: link configured
Mar 18 09:50:12 komplett-21 systemd-networkd[2680]: eno1: MAC address: 10:bf:48:d7:68:e1
More information about the systemd-devel
mailing list