[systemd-devel] Systemd-networkd -- Cannot acquire DHCP lease on bridge interface

James Lott james at lottspot.com
Wed Sep 24 19:16:03 PDT 2014


Hello!

With some help from the kind people on this list, I was able to get my basic 
network interfaces up and runnign with systemd-networkd. Now I've moved on to 
playing with some slightly more complex setups, and have run into some issues 
that as far as I can tell may be bugs (but I'm not quite ready to rule out 
user error, so I thought I'd start here before submitting to the bug tracker 
;) ).

I have configured a vlan interface to be a member of a bridge via the 
appropriate .netdev and .network files, and these interfaces get setup without 
any issues. However, when I try to acquire a dhcp lease through the bridge 
interface, I am unable to do so. Removing the bridge interface and re-adding 
it using brctl (as well as its vlan member) then allows me to gain a lease.

Details are included below. This is on arch linux ARM, systemd 216-r3. As 
always, I'm happy to provide any additional information required!

[root at host01 ~]# networkctl list                                                                                                                                       
[42/59]
IDX LINK             TYPE               OPERATIONAL SETUP     
  1 lo               loopback           carrier     unmanaged 
  2 ifb0             ether              off         unmanaged 
  3 ifb1             ether              off         unmanaged 
  4 eth0             ether              carrier     configured
  5 wlan0            wlan               off         unmanaged 
  6 switch1          ether              carrier     configured
  7 switch0          ether              off         unmanaged 
  8 vlan0            ether              carrier     configured
  9 vlan1            ether              carrier     configured
 10 vb-0             ether              carrier     unmanaged

10 links listed
[root at host01 ~]# brctl show
bridge name     bridge id               STP enabled     interfaces
switch0         8000.4ec1ffd9d149       no              vlan0
switch1         8000.42f3b831050d       no              vb-0
                                                        vlan1
[root at host01 ~]# ip l show switch0
7: switch0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT 
group default 
    link/ether 4e:c1:ff:d9:d1:49 brd ff:ff:ff:ff:ff:ff
[root at host01 ~]# cat /etc/systemd/network/switch0.netdev 
[NetDev]
Description=Virtual switch for container instances
Name=switch0
Kind=bridge
[root at host01 ~]# dhcpcd switch0                                                                                                                                        
[15/59]
dhcpcd[324]: version 6.4.3 starting
dhcpcd[324]: all: IPv6 kernel autoconf disabled
dhcpcd[324]: switch0: IPv6 kernel autoconf disabled
dhcpcd[324]: switch0: adding address fe80::4cc1:ffff:fed9:d149
dhcpcd[324]: if_addaddress6: Operation not supported
dhcpcd[324]: switch0: waiting for carrier
dhcpcd[324]: switch0: carrier acquired
dhcpcd[324]: all: IPv6 kernel autoconf disabled
dhcpcd[324]: switch0: IPv6 kernel autoconf disabled
dhcpcd[324]: DUID 00:01:00:01:c7:92:cd:f9:e2:b2:c0:dd:be:4e
dhcpcd[324]: switch0: IAID ff:d9:d1:49
dhcpcd[324]: switch0: soliciting a DHCP lease
dhcpcd[324]: timed out
dhcpcd[324]: exited
[root at host01 ~]# ip l set switch0 down
[root at host01 ~]# brctl delbr switch0                        
[root at host01 ~]# brctl addbr switch0             
[root at host01 ~]# brctl addif switch0 vlan0
[root at host01 ~]# dhcpcd switch0                       
dhcpcd[370]: version 6.4.3 starting
dhcpcd[370]: all: IPv6 kernel autoconf disabled
dhcpcd[370]: switch0: IPv6 kernel autoconf disabled
dhcpcd[370]: switch0: adding address fe80::1c28:afff:fec4:2bd6
dhcpcd[370]: if_addaddress6: Operation not supported
dhcpcd[370]: switch0: waiting for carrier
dhcpcd[370]: switch0: carrier acquired
dhcpcd[370]: all: IPv6 kernel autoconf disabled
dhcpcd[370]: switch0: IPv6 kernel autoconf disabled
dhcpcd[370]: DUID 00:01:00:01:c7:92:cd:f9:e2:b2:c0:dd:be:4e
dhcpcd[370]: switch0: IAID af:c4:2b:d6
dhcpcd[370]: switch0: soliciting a DHCP lease
dhcpcd[370]: switch0: offered 192.168.0.115 from 192.168.0.1
dhcpcd[370]: switch0: leased 192.168.0.115 for 86400 seconds
dhcpcd[370]: switch0: adding route to 192.168.0.0/24
dhcpcd[370]: switch0: adding default route via 192.168.0.1
dhcpcd[370]: forked to background, child pid 420


More information about the systemd-devel mailing list