0

I'm using the latest Raspbian. The network management has changed a lot and perhaps I'm not aware of all the new caveats.

On startup it hangs waiting for the job of dhcpcd. I found several threads where people suggest to disable the dhcpcd5.service. Well this avoids the timeout, but also prevents the interface to be enabled!

First question: why does it take so much time to get an ip? It's not my router. Any other device in my LAN gets the address in a while.

Then I tried a static address. As far as I understand this is not achieved anymore editing the /etc/network/interfaces file, but instead the /etc/dhcpcd.conf one:

interface enxb827eb33e91e
static ip_address=192.168.178.200/24
static routers=192.168.178.1
static domain_name_servers=192.168.178.1 8.8.8.8

Second question: even with the static address enabled (it works, by the way) the startup timeout is still there! Why?

Third question: Debian now use the new interface name scheme. I will use this image for different types of Raspberry Pi: B+, 2 and 3. Does the old eth0 is translated to the same address (as above) for all types?

If not, how one should write scripts or configuration files without knowing the actual interface name? It doesn't seem portable to me.

Mark
  • 479
  • 11
  • 22
  • It is unclear exactly what you are asking. Why do you think there is a delay (evidence needed)? In a normal, default installation Stretch works similarly to Jessie. Why do you want to set a static address (or think this will solve whatever problem you may have)? What scripts do you want to write that need to know the interface names? All the changes are noted in [How do I set up networking/WiFi/Static IP](http://raspberrypi.stackexchange.com/a/37921/8697) – Milliways Aug 22 '17 at 09:54
  • If you want I post a video with the evidence of about 1 minute of waiting for the end of dhcpcd job. I want to set a static address because in some installation I need that, and to narrow down the dhcp issue (with static ip, dhcp is not needed). About iface names: think about dhcpcd.conf. It requires the iface name, but if it changes among different platform it's not portable. – Mark Aug 22 '17 at 10:06
  • No I am not interested in looking at any videos. `systemd-analyze` on my system shows Startup finished in 1.680s (kernel) + 8.032s (userspace) = 9.713s https://www.tecmint.com/manage-services-using-systemd-and-systemctl-in-linux/ shows various methods of analysis – Milliways Aug 22 '17 at 10:52
  • `Startup finished in 11.483s (kernel) + 1min 31.190s (userspace) = 1min 42.674s`. The `blame` parameter reveals that (after some tweaking) `17.441s dhcpcd.service` – Mark Aug 22 '17 at 12:18

0 Answers0