Bug 81225 - regression in systemd-networkd: unable to acquire address via DHCP since 63a070415db09f5b
Summary: regression in systemd-networkd: unable to acquire address via DHCP since 63a0...
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-11 11:24 UTC by Alex Bradbury
Modified: 2014-08-15 09:40 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments
output of SYSTEMD_LOG_LEVEL=debug /lib/systemd/systemd-networkd (2.09 KB, text/plain)
2014-07-13 20:19 UTC, Alex Bradbury
Details
pcap of systemd-networkd dhcp (1.99 KB, application/octet-stream)
2014-07-13 20:20 UTC, Alex Bradbury
Details
output of dhcpcd -d eth0 (3.25 KB, text/plain)
2014-07-13 20:20 UTC, Alex Bradbury
Details
pcap of dhcpcd dhcp (2.64 KB, application/octet-stream)
2014-07-13 20:21 UTC, Alex Bradbury
Details
not working systemd-networkd try (1.38 KB, application/vnd.tcpdump.pcap)
2014-07-14 11:06 UTC, gehirn
Details
working dhcpcd try (875 bytes, application/vnd.tcpdump.pcap)
2014-07-14 11:06 UTC, gehirn
Details

Description Alex Bradbury 2014-07-11 11:24:00 UTC
I've been playing with Arch on Linode (a popular VPS provider using Xen for virtualisation) and have found that systemd-networkd fails to acquire an IP via DHCP in systemd-214+. Some googling revealed I'm not the only one to encounter this: https://bbs.archlinux.org/viewtopic.php?pid=1434549. `dhcpcd eth0` works just fine. systemd-networkd gives no useful output, giving nothing after eth0: gained carrier.

I looked through the commit log for likely candidates and came across 63a070415db09f5b5bcc5c487bfc85dabe443dde "sd-dhcp-client: allways request broadcast". I confirmed that running `dhcpcd -J eth0` also failed to acquire an IP (this flag forces the broadcast flag in dhcpcd) and further confirmed that recompiling systemd with the offending patch reverted fixed things for me. This patch did see some discussion which featured ideas on alternate behaviour: http://lists.freedesktop.org/archives/systemd-devel/2014-May/019621.html
Comment 1 Alex Bradbury 2014-07-11 11:25:10 UTC
Adding the patch author and committer to the CC list.
Comment 2 Camilo Aguilar 2014-07-12 23:45:15 UTC
We have been discussion this in the systemd mailing list for a while. Basically, we would like to understand better why this is not working on some networks. If you could send us a dhcp dump (http://www.cyberciti.biz/faq/linux-unix-dhcpdump-monitor-dhcp-traffic/), that will be very useful for us. 

I also did some digging and it seems Linode is filtering ARP broadcasts, I wonder if that might be causing these problems.

Linode Post: https://blog.linode.com/2003/09/24/network-filtering-improvements/
Comment 3 Alex Bradbury 2014-07-13 20:19:05 UTC
Created attachment 102722 [details]
output of SYSTEMD_LOG_LEVEL=debug /lib/systemd/systemd-networkd
Comment 4 Alex Bradbury 2014-07-13 20:20:17 UTC
Created attachment 102723 [details]
pcap of systemd-networkd dhcp

Taken with tcpdump -i eth0 -w dhcp_systemd-networkd.pcap 'port 67 or port 68'
Comment 5 Alex Bradbury 2014-07-13 20:20:58 UTC
Created attachment 102724 [details]
output of dhcpcd -d eth0
Comment 6 Alex Bradbury 2014-07-13 20:21:50 UTC
Created attachment 102725 [details]
pcap of dhcpcd dhcp

Taken with tcpdump -i eth0 -w dhcp_dhcpcd.pcap 'port 67 or port 68'
Comment 7 Alex Bradbury 2014-07-13 20:23:12 UTC
(In reply to comment #2)
> We have been discussion this in the systemd mailing list for a while.
> Basically, we would like to understand better why this is not working on
> some networks. If you could send us a dhcp dump
> (http://www.cyberciti.biz/faq/linux-unix-dhcpdump-monitor-dhcp-traffic/),
> that will be very useful for us. 
> 
> I also did some digging and it seems Linode is filtering ARP broadcasts, I
> wonder if that might be causing these problems.

Thanks for responding. I've attached pcaps for systemd-networkd failing to acquire an IP address and for dhcpcd succeeding. Let me know if you need anything else.
Comment 8 Alex Bradbury 2014-07-14 06:19:47 UTC
Comment on attachment 102725 [details]
pcap of dhcpcd dhcp

Fixing mimetype of dhcp_dhcpcd.pcap
Comment 9 gehirn 2014-07-14 11:06:02 UTC
Created attachment 102763 [details]
not working systemd-networkd try
Comment 10 gehirn 2014-07-14 11:06:50 UTC
Created attachment 102764 [details]
working dhcpcd try
Comment 11 gehirn 2014-07-14 11:07:13 UTC
Hello,

i am experiencing the very same issue with my VSP Hoster www.netcup.de. I am running arch-linux with systemd 215-4.

i´ve attached my tcpdumps for both, systemd-network (fails) and dhcpcd (works). maybe this helps.
Comment 12 Tom Gundersen 2014-07-15 17:02:32 UTC
Hi guys,

Thanks for the feedback, and sorry for taking so long to react. I have now finally given in to solving this automatically, and made the broadcast flag an opt-in. Hopefully, that means that things should "just work" for you guys with current git (and some other guys will have to set RequestBroadcast=yes to make things work again).

Please reopen if you still experience problems.

Cheers,

Tom
Comment 13 bsd 2014-08-15 04:11:44 UTC
Tom, would you be able to clarify which version is going to include this fix?
Comment 14 Tom Gundersen 2014-08-15 09:40:11 UTC
It will be in 216 (commit f5de5b00204f041aaec828d336c8afd9e860a5c3).


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.