You are not logged in.
I'm in a cafe, my archlinux laptop is having trouble connecting to the unencrypted wifi provided by the cafe.
My phone has no trouble. It gets an ip address starting 192.168.1...
My laptop on the other hand gets an address starting 192.168.2..., but for some reason on that ip address I can ping 192.168.2.1, but I can't connect to the internet at large.
Here's the output from dhcpcd...
dave@archX1C ~ % sudo dhcpcd wlp3s0
dhcpcd[8735]: version 6.3.2 starting
dhcpcd[8735]: DUID 00:01:00:01:19:a7:aa:85:84:3a:4b:45:88:f8
dhcpcd[8735]: wlp3s0: IAID 4b:45:88:f8
dhcpcd[8735]: wlp3s0: soliciting an IPv6 router
dhcpcd[8735]: wlp3s0: soliciting a DHCP lease
dhcpcd[8735]: wlp3s0: offered 192.168.1.239 from 192.168.1.254
dhcpcd[8735]: wlp3s0: ignoring offer of 192.168.2.108 from 192.168.2.1
dhcpcd[8735]: wlp3s0: NAK: wrong server-ID from 192.168.2.1
dhcpcd[8735]: wlp3s0: message: wrong server-ID
dhcpcd[8735]: wlp3s0: soliciting a DHCP lease
dhcpcd[8735]: wlp3s0: offered 192.168.1.239 from 192.168.1.254
dhcpcd[8735]: wlp3s0: ignoring offer of 192.168.2.108 from 192.168.2.1
dhcpcd[8735]: wlp3s0: NAK: wrong server-ID from 192.168.2.1
dhcpcd[8735]: wlp3s0: message: wrong server-ID
dhcpcd[8735]: wlp3s0: soliciting a DHCP lease
dhcpcd[8735]: wlp3s0: offered 192.168.2.108 from 192.168.2.1
dhcpcd[8735]: wlp3s0: ignoring offer of 192.168.1.239 from 192.168.1.254
dhcpcd[8735]: wlp3s0: leased 192.168.2.108 for 86400 seconds
dhcpcd[8735]: wlp3s0: adding route to 192.168.2.0/24
dhcpcd[8735]: wlp3s0: adding default route via 192.168.2.1
dhcpcd[8735]: forked to background, child pid 8897
For some reason, it's ignoring the offer of an address starting 192.168.1..., then accepting an offer starting 192.168.2.... As I said, the address leaves me with no routes to the internet. While my phone has no trouble, it accepts an address starting 192.168.1...
Last edited by Dave Cohen (2014-07-07 20:17:59)
Offline
did you try deactivating
require dhcp_server_identifier
in
/etc/dhcpcd.conf
and restarting dhcp service?
Offline
Hadn't tried that, because I had no idea such a thing existed. It looks like that solves the problem!
I do wonder, is there any security risk in disabling that?
[I was wrong, did not solve problem, see later comments.]
Last edited by Dave Cohen (2014-07-07 19:38:25)
Offline
Update... after a few minutes of being connected, my ip address switched to the other subnet, and I lost the connection. Did my dhcpcd try to refresh it's settings?
It seems like with this setting disabled, it's random which address dhcpcd decides to use.
I'm not sure why the server would be assigning these non-working up addresses. Could someone in the cafe be trying to hack into people's computers?
Offline
Earlier I said the change to dhcpcd.conf solved the problem. I was wrong. It appears to be pretty random whether it comes up with an address on one subnet or the other. One of the subnets works, but the other doesn't.
I commented out "require dhcp_server_identifier", but I don't think that changes the behavior in any way. I still get something like this:
dave@archX1C ~ % sudo dhcpcd wlp3s0
dhcpcd[1852]: version 6.3.2 starting
dhcpcd[1852]: DUID 00:01:00:01:19:a7:aa:85:84:3a:4b:45:88:f8
dhcpcd[1852]: wlp3s0: IAID 4b:45:88:f8
dhcpcd[1852]: wlp3s0: soliciting an IPv6 router
dhcpcd[1852]: wlp3s0: soliciting a DHCP lease
dhcpcd[1852]: wlp3s0: offered 192.168.1.239 from 192.168.1.254
dhcpcd[1852]: wlp3s0: ignoring offer of 192.168.2.108 from 192.168.2.1
dhcpcd[1852]: wlp3s0: NAK: wrong server-ID from 192.168.2.1
dhcpcd[1852]: wlp3s0: message: wrong server-ID
dhcpcd[1852]: wlp3s0: soliciting a DHCP lease
dhcpcd[1852]: wlp3s0: offered 192.168.2.108 from 192.168.2.1
dhcpcd[1852]: wlp3s0: ignoring offer of 192.168.1.239 from 192.168.1.254
dhcpcd[1852]: wlp3s0: leased 192.168.2.108 for 86400 seconds
dhcpcd[1852]: wlp3s0: adding route to 192.168.2.0/24
dhcpcd[1852]: wlp3s0: adding default route via 192.168.2.1
dhcpcd[1852]: forked to background, child pid 1987
Offline
It seems that dhcpcd might chocke when it receives multiple offers at the same time. It should simply choose one and not restart the whole process I guess.
You might want to try the blacklist option for the rouge server. This server might be a guest who is trying to infiltrate your network, it might be a guest who forgot to turn of his dhcp server he needs for something else or it might be a server that sits on some crappy piece of hardware like your internet modem where you don't need it. Try to find and disable it if possible.
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
The blacklist option appears to be working. A little bit of a hassle, but I guess I'll solve this. Using the following workaround:
dave@archX1C ~ % sudo dhcpcd -k wlp3s0 && sudo dhcpcd -4 wlp3s0 -d --blacklist 192.168.2.1
dhcpcd[6319]: sending signal ARLM to pid 6223
dhcpcd[6319]: waiting for pid 6223 to exit
dhcpcd[6354]: version 6.3.2 starting
dhcpcd[6354]: wlp3s0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks' PREINIT
dhcpcd[6354]: wlp3s0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks' CARRIER
dhcpcd[6354]: DUID 00:01:00:01:19:a7:aa:85:84:3a:4b:45:88:f8
dhcpcd[6354]: wlp3s0: IAID 4b:45:88:f8
dhcpcd[6354]: wlp3s0: soliciting a DHCP lease
dhcpcd[6354]: wlp3s0: sending DISCOVER (xid 0xda779ec2), next in 3.3 seconds
dhcpcd[6354]: wlp3s0: xid 0xb8bd247f is not for hwaddr c8:bc:c8:df:74:b4:00:00:00:00:00:00:00:00:00:00
dhcpcd[6354]: wlp3s0: offered 192.168.1.239 from 192.168.1.254
dhcpcd[6354]: wlp3s0: sending REQUEST (xid 0xda779ec2), next in 3.8 seconds
dhcpcd[6354]: wlp3s0: acknowledged 192.168.1.239 from 192.168.1.254
dhcpcd[6354]: wlp3s0: checking for 192.168.1.239
dhcpcd[6354]: wlp3s0: sending ARP probe (1 of 3), next in 1.1 seconds
dhcpcd[6354]: wlp3s0: sending ARP probe (2 of 3), next in 1.2 seconds
dhcpcd[6354]: wlp3s0: blacklisted DHCP packet from 192.168.2.1
dhcpcd[6354]: wlp3s0: blacklisted DHCP packet from 192.168.2.1
dhcpcd[6354]: wlp3s0: blacklisted DHCP packet from 192.168.2.1
dhcpcd[6354]: wlp3s0: sending ARP probe (3 of 3), next in 2.0 seconds
dhcpcd[6354]: wlp3s0: leased 192.168.1.239 for 86400 seconds
dhcpcd[6354]: wlp3s0: renew in 43200 seconds, rebind in 75600 seconds
dhcpcd[6354]: wlp3s0: adding IP address 192.168.1.239/24
dhcpcd[6354]: wlp3s0: adding route to 192.168.1.0/24
dhcpcd[6354]: wlp3s0: adding default route via 192.168.1.254
dhcpcd[6354]: wlp3s0: writing lease `/var/lib/dhcpcd/dhcpcd-wlp3s0.lease'
dhcpcd[6354]: wlp3s0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks' BOUND
dhcpcd[6354]: forking to background
dhcpcd[6354]: forked to background, child pid 6466
Offline
You can write the blacklist the configuration file, then you only have to remember it in case you want to use a server with this address.
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline