<div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 26, 2023, 15:32 Mark Rogers <<a href="mailto:mark@more-solutions.co.uk">mark@more-solutions.co.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 26 Sept 2023 at 13:08, Mantas Mikulėnas <<a href="mailto:grawity@gmail.com" target="_blank" rel="noreferrer">grawity@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div>Depends on what exactly runs dhcpcd and wpa_supplicant. Is that done by networking.service (ifupdown)? NetworkManager? Are they standalone services?</div></div></blockquote><div><br></div><div>How do I tell?</div></div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Run `systemctl status <pid>` or browse `systemd-cgls` to map a process to its .service unit.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div><br></div><div>(System is a Pi running an elderly Raspbian. The issue I am having is that the device is not getting an IP address - if i wait until booted I have to issue "ip link set eth0 down" and "ip link set eth0 up" to get it to retry the DHCP request</div></div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div>("up" alone isn't sufficient, despite "ip addr" showing the interface as DOWN.</div></div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">I think you're confusing two different states, which have similar indications – "administrative" up/down that you control (the "<UP>" flag, with nothing shown when down) and "operational" up/down that represents the actual interface status (the "<RUNNING>" vs "<NO_CARRIER>" flags and/or the "state XXX" field).</div><div dir="auto"><br></div><div dir="auto">"state DOWN" is *not* directly controlled by `ip link set up` – it's the result of the interface being operative for any other reason even though it is administratively <UP> (i.e. turned on).</div><div dir="auto"><br></div><div dir="auto">I'm still not entirely sure of the situation but right now it sounds like the configuration is okay but the Ethernet interface is failing to establish a physical link on the first try. Does it also show "<UP,NO_CARRIER>" within the interface flags?</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div>I am assuming that this is because the config file isn't in place when dhcpcd starts but I may be mistaken.)<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div dir="auto">I would generally expect Before/Wants=network-pre.target to work, but that relies on your network services themselves being set up correctly – they too need to order themselves After that target.<br></div></div></blockquote><div><br></div><div>In that case I should probably return to Before/Wants=network-pre.target and work out what is breaking it, but same question as above: how do I figure that out?<br></div></div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">`systemctl cat` for direct configuration and `systemctl list-dependencies --after` (if I remember it right) should be a good start.</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div></div><div> </div></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div><div style="font-size:12.8px"><span style="font-size:12.8px">Mark Rogers</span></div></div><br></div></div></div></div></div></div>
</blockquote></div></div></div>