You are not logged in.

#1 2023-01-10 15:27:11

Cbhihe
Member
Registered: 2017-04-09
Posts: 219

[SOLVED] dhcpcd times out on lease request for netctl-ifplugd

On a fresh console-only install, the only enabled networking facility available to connect over the wire or wirelessly is netctl and its two helpers: netctl-ifplugd@net0 and netctl-auto@wifi0.

Here's the output of systemctl status netctl-ifplugd@net0.service and the contents of the barebone /etc/netctl/ethernet-dhcp profile withe the netctl-auto@wifi0 service stopped and having ensured that no process involving either dhcpcd or dhclient are in sight.

I tried securing a lease using dhcpcd as standalone (# dhcpcd 4 -d net0), with a simillar "timed out" result.

I have also populated /etc/netctl/interfaces/ with following 2 files:
net0::

#!/bin/sh
ExecUpPost="systemctl stop netctl-auto@wifi0"
ExecDownPost="systemctl start netctl-auto@wifi0"

wifi0::

#!/bin/sh
ExecUpPost=":"
ExecDownPost=":"

At this point I am a little short on ideas as to why client dhcpcd times out. I use the same setup on various other systems (which i don't currently have at hand) and normally connectivity relies primarily on net0 (wired connectivity) and fails over on to wifi when net0 is down, which is the desired behavior.

Last edited by Cbhihe (2023-01-12 15:50:45)


I like strawberries, therefore I'm not a bot.

Offline

#2 2023-01-10 15:44:13

seth
Member
Registered: 2012-09-03
Posts: 51,312

Re: [SOLVED] dhcpcd times out on lease request for netctl-ifplugd

ip a # can you bring the interface up?
lspci # what *is* the interface
sudo nmap --script broadcast-dhcp-discover # can we find one or more dhcp servers on the subnet

Do you get a lease w/ dhclient?
/etc/dhcpcd.conf => try to switch to clientid

Offline

#3 2023-01-10 19:32:36

Cbhihe
Member
Registered: 2017-04-09
Posts: 219

Re: [SOLVED] dhcpcd times out on lease request for netctl-ifplugd

net0 is up. I can bring it down and back up with 'ip link set dev net0 down' or 'up' with no issue. That's also what I find surprising. Oh, and btw i tried with different cables used on a daily basis by others. No prob with cables.

Wi-Fi controller:
It's actually a Dell ethernet dongle packaging an Intel Wi-Fi 6 AC201 (rev 20). Here's theoutput of 'lspci'.

Nmap discovery:
Complicated in my environment and for a nbr of reasons, I cannot post the output here, but I can represent a very qualitative summary:
Nmap picks up a bunch of Netbios-ssn on 139/TCP for name registration I suppose,  machines with 7070/TCP open port listening to incoming traffic, micro$oft-ds for netbios (again) and samba traffic and nothing else really, perhaps because i picked the wrong subnet. Nothing that would be obviously related to a dhcp server.

No lease with 'dhclient' no matter if i used the default "duid" or "clientid". To specify dhclient instead of the default dhcpcd, I just uncomment the 'DHCPClient=dhclient' line in /etc/netctl/ethernet-dhcp profile, before restarting the service... several times to cover all possible combis.

(Trying clientid in /etc/dhcpcd.conf was a really good idea btw. I was looking at hardware id, after doing some social engineering on the sec types, but did not know where to look.)


I like strawberries, therefore I'm not a bot.

Offline

#4 2023-01-10 20:05:48

seth
Member
Registered: 2012-09-03
Posts: 51,312

Re: [SOLVED] dhcpcd times out on lease request for netctl-ifplugd

Complicated in my environment and for a nbr of reasons, I cannot post the output here, but I can represent a very qualitative summary:

What?
The script searches for dhcp servers, open ports on other hosts are neither reported nor relevant in this context.
And you're certainly not supposed to do anything like

perhaps because i picked the wrong subnet

picking a subnet.
The dhcp server tells you what the subnet is.

Nothing that would be obviously related to a dhcp server.

If there's no dhcp server on the subnet you're not getting a lease via dhcp.
However, for that to work, you'd first need a carrier.
You're getting a wifi carrier via wpa_supplicant or iwd (so try to achieve this manually first), but

Wi-Fi controller:
It's actually a Dell ethernet dongle packaging an Intel Wi-Fi 6 AC201 (rev 20). Here's theoutput of 'lspci'.

There's also only the wireless controller in lspci.

So

I tried securing a lease using dhcpcd as standalone (# dhcpcd 4 -d net0), with a simillar "timed out" result.

then what is "net0"??

Please post the literal outputs of "ip a" and "sudo nmap --script broadcast-dhcp-discover"
In doubt redirect them into a file and usb-walk that to a system w/ network access, if that's "a nbr of reasons"

Offline

#5 2023-01-11 19:37:56

Cbhihe
Member
Registered: 2017-04-09
Posts: 219

Re: [SOLVED] dhcpcd times out on lease request for netctl-ifplugd

Here is the output of 'ip a s'. The subnet I said I "picked" yesterday was the one read off that output for the wireless conexion:192.168.20.124/23.

The wireless service netctl-auto@wifi0 works fine based on wpa_supplicant.

Finally the literal output of "the nmap discovery is:

$ sudo nmap --script broadcast-dhcp-discover
WARNING: No targets were specified, so 0 hosts scanned.
Nmap done: 0 IP addresses (0 hosts up) scanned in 10.2s

nmap discovers no dhcp server.

Last edited by Cbhihe (2023-01-12 10:02:01)


I like strawberries, therefore I'm not a bot.

Offline

#6 2023-01-11 19:41:11

seth
Member
Registered: 2012-09-03
Posts: 51,312

Re: [SOLVED] dhcpcd times out on lease request for netctl-ifplugd

Paste is 404...

Offline

#7 2023-01-12 10:03:40

Cbhihe
Member
Registered: 2017-04-09
Posts: 219

Re: [SOLVED] dhcpcd times out on lease request for netctl-ifplugd

Url corrected in #5. (https://bpa.st/C4YSC)

Last edited by Cbhihe (2023-01-12 11:15:30)


I like strawberries, therefore I'm not a bot.

Offline

#8 2023-01-12 11:59:42

seth
Member
Registered: 2012-09-03
Posts: 51,312

Re: [SOLVED] dhcpcd times out on lease request for netctl-ifplugd

altname enp0s13f0u1c2

So this is some USB dongle, please post the output of "lsusb".
It does seem to have a carrier (cable plugged in) and the device is up, but is no dhcp server is discoverable, there's no dhcp server in the segment it's wired to and you'll have to setup a static configuration (unless of course you'd expect there to be a dhcp server, in which case you'd want to check the switch it's wired to)

Offline

#9 2023-01-12 13:33:52

Cbhihe
Member
Registered: 2017-04-09
Posts: 219

Re: [SOLVED] dhcpcd times out on lease request for netctl-ifplugd

Yes, and in addition to the bluetooth device of before it shows as 0bda:8513 in the `# lsusb` output.

Last edited by Cbhihe (2023-01-12 13:34:31)


I like strawberries, therefore I'm not a bot.

Offline

#10 2023-01-12 13:44:46

seth
Member
Registered: 2012-09-03
Posts: 51,312

Re: [SOLVED] dhcpcd times out on lease request for netctl-ifplugd

So you're using https://aur.archlinux.org/packages/r8152-dkms ?

However:

seth wrote:

no dhcp server is discoverable, there's no dhcp server in the segment it's wired to and you'll have to setup a static configuration (unless of course you'd expect there to be a dhcp server, in which case you'd want to check the switch it's wired to)

sudo nmap -e net0 --script broadcast-dhcp-discover

is gonna take a brief moment and then supposed to print sth. along

Pre-scan script results:
| broadcast-dhcp-discover: 
|   Response 1 of 1: 
|     Interface: net0
|     IP Offered: 192.168.1.2
|     DHCP Message Type: DHCPOFFER
|     Server Identifier: 192.168.1.1
|     IP Address Lease Time: 30d00h00m00s
|     Renewal Time Value: 15d00h00m00s
|     Rebinding Time Value: 26d06h00m00s
|     Subnet Mask: 255.255.255.0
|     Broadcast Address: 192.168.1.255
|     Domain Name Server: 192.168.1.1
|_    Router: 192.168.1.1

If that doesn't happen, there simply is no dhcp server (responding) and dhcpcd times out because of that.

Offline

#11 2023-01-12 15:50:08

Cbhihe
Member
Registered: 2017-04-09
Posts: 219

Re: [SOLVED] dhcpcd times out on lease request for netctl-ifplugd

Yes, installed, but your question sent me to AUR and comparing my package version with the up-to-date one online, i realized my package was old(*). So for good measure i removed 'r8152-dkms', re-cloned the AUR package url and did `makepkg -sric` in the host' local build directory.

I then realized ('ls /sys/class/net', 'cat /sys/class/net/enp0s13f0u1/address') that the dongle's displayed mac address was completely different from what I had previously obtained with same two cmds. (The wifi NIC's one remained unaffected.)

So i updated my udev renaming rules with the ethernet's NIC "new" MAC address, reloaded the rule, re-triggered, disconnected and reconnected the dongle and the wired connection now works. I get the desired fail over to wifi when i disconnect the dongle and verified that upon reconnexion the PreExecUp rule in /etc/netctl/interfaces/net0 works fine.

Tk you very much for your help, @seth.

SOLVED

------------------
(*)  It turns out it was my mistake (i installed that particular build off-line from a back-up where i keep all builds installed for every corresponding system for reference, and not on-line from AUR as i should have).
------------------

Last edited by Cbhihe (2023-01-13 17:24:32)


I like strawberries, therefore I'm not a bot.

Offline

Board footer

Powered by FluxBB