You are not logged in.

#1 2013-10-23 08:18:48

pepperdas
Member
Registered: 2013-06-14
Posts: 12

dhcpcd not configuring ipv4 correctly after upgrade

after upgrading dhcpcd, when I run it on my wireless interface, it claims to be configuring an ipv4 address

dhcpcd[25102]: version 6.1.0 starting
dhcpcd[25105]: wlp2s0: starting wpa_supplicant
dhcpcd[25102]: wlp2s0: waiting for carrier
dhcpcd[25102]: wlp2s0: carrier acquired
dhcpcd[25102]: wlp2s0: soliciting an IPv6 router
dhcpcd[25102]: wlp2s0: rebinding lease of 192.168.1.124
dhcpcd[25102]: wlp2s0: Router Advertisement from fe80::ba16:19ff:fe4a:e80
dhcpcd[25102]: dhcp6_start: wlp2s0: Protocol not available
dhcpcd[25102]: wlp2s0: leased 192.168.1.124 for 86400 seconds
dhcpcd[25102]: wlp2s0: adding host route to 192.168.1.124 via 127.0.0.1
dhcpcd[25102]: wlp2s0: adding route to 192.168.1.0/24
dhcpcd[25102]: wlp2s0: adding default route via 192.168.1.254
dhcpcd[25102]: forked to background, child pid 25377

yet when it finally forks to the background, and I call ifconfig, I ONLY SEE IPV6 ADDRESSES. also I am NOT connected to the network.

is this a bug in dhcpcd?

Offline

#2 2013-10-23 17:20:18

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 999

Re: dhcpcd not configuring ipv4 correctly after upgrade

I'm not seeing the dhcp server IP. Is this the output from "dhcpcd -d" (verbose/debug)?


Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd

Offline

#3 2013-10-23 23:34:16

pepperdas
Member
Registered: 2013-06-14
Posts: 12

Re: dhcpcd not configuring ipv4 correctly after upgrade

$> dhcpcd -d wlp2s0

dhcpcd[22917]: version 6.0.5 starting
dhcpcd[22917]: wlp2s0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks' PREINIT
dhcpcd[22921]: wlp2s0: starting wpa_supplicant
dhcpcd[22917]: wlp2s0: waiting for carrier
dhcpcd[22917]: wlp2s0: carrier acquired
dhcpcd[22917]: wlp2s0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks' CARRIER
dhcpcd[22917]: wlp2s0: soliciting an IPv6 router
dhcpcd[22917]: wlp2s0: sending Router Solicitation
dhcpcd[22917]: wlp2s0: using ClientID ff:00:00:00:02:00:01:00:01:19:fa:23:4a:00:22:5f:f6:11:35
dhcpcd[22917]: wlp2s0: reading lease `/var/lib/dhcpcd/dhcpcd-wlp2s0.lease'
dhcpcd[22917]: wlp2s0: rebinding lease of 192.168.1.127
dhcpcd[22917]: wlp2s0: sending REQUEST (xid 0xc91865a7), next in 3.16 seconds
dhcpcd[22917]: wlp2s0: acknowledged 192.168.1.127 from 192.168.1.254
dhcpcd[22917]: wlp2s0: checking for 192.168.1.127
dhcpcd[22917]: wlp2s0: sending ARP probe (1 of 3), next in 1.52 seconds
dhcpcd[22917]: wlp2s0: sending ARP probe (2 of 3), next in 1.77 seconds
dhcpcd[22917]: wlp2s0: Router Advertisement from fe80::ba16:19ff:fe4a:e80
dhcpcd[22917]: wlp2s0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks' ROUTERADVERT
dhcpcd[22917]: wlp2s0: soliciting a DHCPv6 lease
dhcpcd[22917]: wlp2s0: delaying SOLICIT6 (xid 0x4b3866), next in 0.70 seconds
dhcpcd[22917]: wlp2s0: broadcasting SOLICIT6 (xid 0x4b3866), next in 1.04 seconds
dhcpcd[22917]: wlp2s0: no IA in REPLY from fe80::ba16:19ff:fe4a:e80
dhcpcd[22917]: wlp2s0: sending ARP probe (3 of 3), next in 2.00 seconds
dhcpcd[22917]: wlp2s0: broadcasting SOLICIT6 (xid 0x4b3866), next in 2.08 seconds
dhcpcd[22917]: wlp2s0: no IA in REPLY from fe80::ba16:19ff:fe4a:e80
dhcpcd[22917]: wlp2s0: leased 192.168.1.127 for 86400 seconds
dhcpcd[22917]: wlp2s0: renew in 43200 seconds, rebind in 75600 seconds
dhcpcd[22917]: wlp2s0: adding IP address 192.168.1.127/24
dhcpcd[22917]: wlp2s0: adding host route to 192.168.1.127 via 127.0.0.1
dhcpcd[22917]: wlp2s0: adding route to 192.168.1.0/24
dhcpcd[22917]: wlp2s0: adding default route via 192.168.1.254
dhcpcd[22917]: wlp2s0: writing lease `/var/lib/dhcpcd/dhcpcd-wlp2s0.lease'
dhcpcd[22917]: wlp2s0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks' BOUND
dhcpcd[22917]: forking to background
dhcpcd[22917]: forked to background, child pid 23212



result of ifconfig
wlp2s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet6 fe80::e6ce:8fff:fe67:c25f  prefixlen 64  scopeid 0x20<link>
        inet6 2602:30a:c0ef:a680:e6ce:8fff:fe67:c25f  prefixlen 64  scopeid 0x0<global>
        ether e4:ce:8f:67:c2:5f  txqueuelen 1000  (Ethernet)
        RX packets 1059  bytes 65823 (64.2 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 98  bytes 18815 (18.3 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Offline

#4 2013-10-24 04:29:13

pepperdas
Member
Registered: 2013-06-14
Posts: 12

Re: dhcpcd not configuring ipv4 correctly after upgrade

OKAY...I've done some investigating and I think I've figured out something related to the problem I'm having.


the way that I was starting my network was
1. calling wpa_supplicant -i[myinterfacename] -c[myconfig]
and waiting for a wireless connection
2. calling dhcpcd [myinterfacename]
to configure the routing table

NOTE: I was NOT using systemd


for whatever reason, the dhcpcd service was calling its own instance of wpa_supplicant, and also deleting the routing table every time it called /usr/lib/dhcpcd/dhcpcd-run-hooks  ROUTERADVERT
I don't know why it was starting it's own instance of wpa_supplicant but my suspicion is that this error has something to do with the /usr/lib/dhcpcd/dhcpcd-run-hooks script

Last edited by pepperdas (2013-10-24 04:29:40)

Offline

#5 2013-10-24 14:32:25

pepperdas
Member
Registered: 2013-06-14
Posts: 12

Re: dhcpcd not configuring ipv4 correctly after upgrade

basically with dhcpcd in its current state, it seems that it DOES NOT WORK if wpa_supplicant is already running or has been started by another process. This is because there are hooks from dhcpcd that are used to start wpa_supplicant on all wireless interfaces autonomously. I'm going to file a bug report because this doesn't work with my system and wasn't given any warning about this. This doesn't seem right...for instance, what if your wpa_supplicant.conf file is not stored in the location that's hardcoded into the script? seems weird to me

Offline

#6 2013-10-25 17:42:08

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 999

Re: dhcpcd not configuring ipv4 correctly after upgrade

Well, I use dhcpcd with netctl (which starts wpa_supplicant _before_ dhcpcd)
and see no problems... I haven't looked at the dhcpcd source to see whether
dhcpcd actually checks if wpa_supplicant is active and sets $ifwireless to 0,
but I _think_ that wpa_supplicant just errs out if another instance of itself
is running on the interface, so 10-wpa_supplicant hook shouldn't matter.

I'd try 2 things:
1. Run dhcpcd with "-C 10-wpa_supplicant" (with wpa_supplicant already running)
to see if the ipv4 IP is obtained.
2. Reboot with "ipv6.disable=1" in the kernel cmdline. This will disable ipv6
entirely...


Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd

Offline

#7 2013-10-26 06:57:47

pepperdas
Member
Registered: 2013-06-14
Posts: 12

Re: dhcpcd not configuring ipv4 correctly after upgrade

Hey thanks for the response/suggestions
It works fine when I allow dhcpcd to start wpa_supplicant for me. No, dhcpcd does not check to see if wpa_supplicant is already running (I think that it should).  The instance of wpa_supplicant that it is started by dhcpcd looks for the config file at /etc/wpa_supplicant.conf (which is a hardcoded location), I don't usually keep my config there, but I guess that's a separate issue.
The main issue is that if there are two instances of wpa_supplicant running, with dhcpcd, they interfere with each other, and dhcpcd deletes the ip it gets from the router right after it obtains it.
dhcpcd deletes the routing table right after it forks, that's why evidence of it deleting everything wasn't showing up in teh logs above.


This thread should be closed though. How do I close it?

Offline

Board footer

Powered by FluxBB