You are not logged in.

#1 2010-01-17 11:31:15

JN
Member
Registered: 2010-01-17
Posts: 28

DHCPCD wont give NIC an IP address [SOLVED]

Hello all, I'm hoping someone can help me here.

I've gotten Archlinux running on a machine once before and didn't have much of a problem. This time, I'm stuck at trying to get ethernet connectivity up... sad

When my computer boots, everything looks fine until it gets to "Starting Network", then it just hangs on that for a few seconds before leaving it as "[BUSY]" and continuing with the rest of the bootup.

I'm running an X31, IBM Thinkpad.

For the NIC, "lspci -v" returns:

Ethernet controller: Intel Corporation 82540EP Gigabit Ethernet Controller  (Mobile) (rev 03)
...
Kernel driver in use: e1000
Kernel modules: e1000

And, dmesg does seem to show e1000 as loaded.

Here's contents of my /etc/rc.conf (comments removed for readability):

LOCALE="en_US.utf8"
HARDWARECLOCK="UTC"
USEDIRECTISA="no"
TIMEZONE="America/New_York"
KEYMAP="us"
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"

MOD_AUTOLOAD="yes"
MODULES=()

USELVM="no"

HOSTNAME="blnk0"

eth0="dhcp"
INTERFACES=(eth0)

gateway="default gw 192.168.0.1"
ROUTES=(!gateway)

DAEMONS=(syslog-ng network netfs crond)

The following to blockquotes are the outputs of my trying to restart network and renewing dhcpcd.

[root@blnk0 ~]# /etc/rc.d/network restart
:: Stopping Network                               [DONE]
:: Starting Network                                [BUSY]
dhcpcd: eth0: MTU set to 576                  [DONE]

[root@blnk0 ~]# dhcpcd -k eth0
dhcpcd: sending signal 1 to pid 26602
dhcpcd: waiting for pid 26606 to exit
[root@blnk0 ~]# dhcpcd -nd eth0
dhcpcd: version 5.0.6 starting
dhcpcd: eth0: executing '/usr/lib/dhcpcd/dhcpcd-run-hooks', reason PREINIT
dhcpcd: eth0: executing '/usr/lib/dhcpcd/dhcpcd-run-hooks', reason CARRIER
dhcpcd: eth0: rebinding lease of lease of 192.168.1.204
dhcpcd: eth0: sending DHCP_REQUEST (xid 0x580940b5), next in 3.12 seconds
dhcpcd: eth0: acknowledged 192.168.1.204 from 192.168.1.1
dhcpcd: eth0: checking for 192.168.1.204
dhcpcd: eth0: sending ARP probe (1 of 3), next in 1.10 seconds
dhcpcd: eth0: sending ARP probe (2 of 3), next in 1.59 seconds
dhcpcd: eth0: sending ARP probe (3 of 3), next in 2.00 seconds
dhcpcd: eth0: leased 192.168.1.204 for 86400 seconds
dhcpcd: eth0: adding IP address 192.168.1.204/24
dhcpcd: eth0: adding route to 192.168.1.0/24
dhcpcd: eth0: adding default route via 192.168.1.1
dhcpcd: eth0: executing '/usr/lib/dhcpcd/dhcpcd-run-hooks', reason BOUND
dhcpcd: eth0: MTU set to 576
dhcpcd: forking to background

After either of these two, checking ifconfig shows that eth0 has no inet address assigned... -_-

I don't know if I've just been staring at this for too long or what. Please, some help here would be greatly appreciated. smile

SOLUTION:

JN wrote:

I tested my system on another network. Dhcpcd acquired an IP address for eth0 just fine. I was fully connected. So, I obviously took the opportunity to "pacman -Syu" and install dhclient.

The interesting thing happened when I got back to my network, with the linksys router, and tried to connect to it with my updated dhcpcd. Instead of just hanging on "[BUSY]", it told me it failed do to a timeout during the DHCP server discovery. Just like several people have suggested --when I used dhclient on the same linksys network, it worked just fine (IP addresses, DNS, websites, and all).

LESSON:
  * dhcpcd, in its default setup, cannot connect [at least] to some Linksys routers.
  * dhclient has an easier time communicating with some servers that dhcpcd does.
  * Either dhclient is the solution to dhcpcd's inabilities or dhcpcd's normal configs are put together without consideration for something important to a number of people's setups.

The discussion on http://bbs.archlinux.org/viewtopic.php?id=88663 points to dhcpcd 5.1.4 being the problem. Downgrading to an earlier version, such as 5.1.3, makes the problem go away.

Dhcpcd is party broken. Either use an old version of dhcpcd or switch to dhclient untill the problem has been fixed.
Alternitively, you can keep dhcpcd and manually start dhclient when dhcpcd fails.

Last edited by JN (2010-01-27 04:16:10)

Offline

#2 2010-01-17 17:59:36

highfructose327
Member
Registered: 2009-10-06
Posts: 1

Re: DHCPCD wont give NIC an IP address [SOLVED]

I wonder if the line

gateway="default gw 192.168.0.1"

is causing a conflict because I believe you would only need that for setting a static IP. Maybe comment that out and see what happens. Below is a example from the wiki on networking setup for DHCP

eth0="dhcp"
INTERFACES=(eth0)
ROUTES=(!gateway)

and this is the example for the static ip:

eth0="eth0 192.168.100.2 netmask 255.255.255.0 broadcast 192.168.100.255"
INTERFACES=(eth0)
gateway="default gw 192.168.100.1"
ROUTES=(gateway)

just a thought .

Offline

#3 2010-01-17 18:26:57

JN
Member
Registered: 2010-01-17
Posts: 28

Re: DHCPCD wont give NIC an IP address [SOLVED]

Hm, I was pretty sure the wiki had it gateway defined for a DHCP setup, which I did think was odd. Still...

I tried it and I get the same results: starting network at boot, restarting network manually, and refreshing dhcpcd, all do the same as before and ifconfig still doesn't show an IP address asigned to eth0.

Offline

#4 2010-01-17 18:35:32

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: DHCPCD wont give NIC an IP address [SOLVED]

I think this thread is similar:

http://bbs.archlinux.org/viewtopic.php?id=86857

Offline

#5 2010-01-21 06:29:05

JN
Member
Registered: 2010-01-17
Posts: 28

Re: DHCPCD wont give NIC an IP address [SOLVED]

anonymous_user wrote:

Tried it. However, timingout and returning a "fail" isn't the problem. As I said above, dhcpcd claims to be getting the IP address 192.168.1.204 "acknowledged" from the router. =/


The result from executing "/etc/rc.d/network restart" is:

::Stopping Network                                                                [DONE]
::Starting Network                                                                 [BUSY]
dhcpcd: eth0: MTU set to 576                                                  [DONE]

And then when I check "ifconfig eth0", I get:

eth0      Link encap:Ethernet HWaddr ##:##:##:##:##:##
            UP BROADCAST RUNNING MULTICAST   MTU:1500   Metric:1
            RX packets:44 errors:0 dropped:0 overruns:0 frame:0
            TX packets:162 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:100
            RX bytes:24900 (24.3. Kb)    TX bytes:19404 (18.9 Kb)

....*note*, no inet address. sad


Additionally, my /etc/dhcpcd.conf is:

hostname

option domain_name_servers, domain_name, domain_search, host_name
option ntp_servers
option interface_mtu

require dhcp_server_identifier

nohook lookup-hostname
noipv4ll

...and my /etc/conf.d/dhcpcd is:

DHCPCD_ARGS="-C resolve.conf -q -t 60"

...and was:

DHCPCD_ARGS="-q"

...neither of which worked.

Last edited by JN (2010-01-21 06:32:05)

Offline

#6 2010-01-23 05:21:03

JN
Member
Registered: 2010-01-17
Posts: 28

Re: DHCPCD wont give NIC an IP address [SOLVED]

I'm trying to connect to a Linksys WRT54G2 V1.5. Does anyone know if this has any barring on my problem?

...it is quite odd. DHCPCD seems to say it's having a conversation with the router and at no point does it say it's failed, but the NIC doesn't get an IP (and the network of course being unreachable).

Offline

#7 2010-01-23 07:24:45

M177ER
Member
Registered: 2008-06-15
Posts: 148

Re: DHCPCD wont give NIC an IP address [SOLVED]

I had a similar probem and what I found that worked was to turn off the router ( I unplugged it ); turn it back on and then boot up. I was also having trouble getting an IP address.

Offline

#8 2010-01-23 09:39:35

zowki
Member
From: Trapped in The Matrix
Registered: 2008-11-27
Posts: 582
Website

Re: DHCPCD wont give NIC an IP address [SOLVED]

I'm having the same problem too! I tried rebooting the router and computer but it still doesnt work.


How's my programming? Call 1-800-DEV-NULL

Offline

#9 2010-01-23 12:11:45

b33
Member
Registered: 2009-05-17
Posts: 12

Re: DHCPCD wont give NIC an IP address [SOLVED]

dont know if it's related but i had some problems with dhcpd connecting to my home network (at least i think it was his fault)

dmesg with networkmanager said something like this:

wlan0: authenticate with AP XX:XX:XX:XX:XX:XX (try 1)
wlan0: authenticated
wlan0: associate with AP XX:XX:XX:XX:XX:XX (try 1)
wlan0: RX ReassocResp from XX:XX:XX:XX:XX:XX (capab=0x431 status=0 aid=1)
wlan0: associated
wlan0: deauthenticating from XX:XX:XX:XX:XX:XX by local choice (reason=3)
wlan0: deauthenticating from XX:XX:XX:XX:XX:XX by local choice (reason=3)
wlan0: deauthenticating from XX:XX:XX:XX:XX:XX by local choice (reason=3)

networkmanager stopped looking for ip, and disconnected

so then i installed dhclient/dhcp and wicd to try it out
i set dhclient to default dhcp client, and then i could connect

dont know if this is really a solution, but since i did this not long time ago, i thought i should share.

Offline

#10 2010-01-23 14:31:43

pyther
Member
Registered: 2008-01-21
Posts: 1,395
Website

Re: DHCPCD wont give NIC an IP address [SOLVED]

Why is your mtu so low? It should be 1500


Website - Blog - arch-home
Arch User since March 2005

Offline

#11 2010-01-23 14:39:49

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: DHCPCD wont give NIC an IP address [SOLVED]

Couple of things to add:

gateway="default gw 192.168.0.1"
ROUTES=(!gateway)

1.The gateway= line needn't be commented out, as the gateway variable is already nullified by the next line (!gateway).
2. Over the years, a handful of users have claimed that even though they use DHCP, they must still specify their gateway. In which case, you would also remove the bang (!) before the gateway variable. (It's also a safe bet that your gateway is 192.168.1.1)
3. Have you tried another dhcp client like dhclient?
4. Have you tried killing dhcp and using a static IP?

Offline

#12 2010-01-23 16:06:06

zowki
Member
From: Trapped in The Matrix
Registered: 2008-11-27
Posts: 582
Website

Re: DHCPCD wont give NIC an IP address [SOLVED]

For some reason dhcp started working for me again later in the day. I have no idea why. How strange.


How's my programming? Call 1-800-DEV-NULL

Offline

#13 2010-01-23 20:03:59

JN
Member
Registered: 2010-01-17
Posts: 28

Re: DHCPCD wont give NIC an IP address [SOLVED]

M177ER wrote:

I had a similar probem and what I found that worked was to turn off the router ( I unplugged it ); turn it back on and then boot up. I was also having trouble getting an IP address.

Tried it. Shut down my computer, cycled the router, and then started back up. Unfortunately, it didn't work; however, this time it did yelled a couple of times "dhcpcd: eth0: reject NAK", then moved on.

After seeing that the router may improperly NAKing, I tried commenting out the "require dhcp_server_identifier" line of /etc/dhcpcd.conf. This time it only said "dhcpcd: eth0: NAK" once, not sure what the heck that means. But still, nothing. sad

Last edited by JN (2010-01-23 21:04:36)

Offline

#14 2010-01-23 21:09:18

JN
Member
Registered: 2010-01-17
Posts: 28

Re: DHCPCD wont give NIC an IP address [SOLVED]

Misfit138 wrote:

2. Over the years, a handful of users have claimed that even though they use DHCP, they must still specify their gateway. In which case, you would also remove the bang (!) before the gateway variable. (It's also a safe bet that your gateway is 192.168.1.1)

I tried that (192.168.0.1 & 192.168.1.1) and it only seems to get worse. Instead of just stopping at "[BUSY]" it actually says it fails when I do that.

Misfit138 wrote:

3. Have you tried another dhcp client like dhclient?

TBD (Don't know yet, I'll try DLing it on another computer and moving it to my Arch).

Misfit138 wrote:

4. Have you tried killing dhcp and using a static IP?

Yea, doesn't seem to work.

Last edited by JN (2010-01-23 21:11:04)

Offline

#15 2010-01-23 22:08:50

JuseBox
Member
Registered: 2009-11-27
Posts: 260

Re: DHCPCD wont give NIC an IP address [SOLVED]

Hey there,

- When using the live cd does internet connectivity work?
  If it does work there then something must have changed when you installed the system.
- Have you tried the network install?
  Not saying that you did something but I have seen issues with both static and dhcp after install. ( Mainly assigning a static address, but I wouldn't throw this out either)

Try the install live cd and see what happens, Unless you have and I didn't catch that in your post.  ~Good Luck

EDIT:
I didn't think to ask... Did you check the cable as well?  Maybe restarting the routing and trouble shooting that way as well.  Maybe its not a arch issue...  Again just a thought and something to think about..

Last edited by JuseBox (2010-01-23 22:12:35)


Linux ArchLinux 3.2.8-1-ARCH
#1 SMP PREEMPT Mon Feb 27 21:51:46 CET 2012 x86_64 AMD FX(tm)-8120 Eight-Core Processor AuthenticAMD GNU/Linux
8192MB DDR3 1300MHz | Asus m5a97 | GeForce GTX 550 Ti | 120 GB SSD

Offline

#16 2010-01-23 22:23:55

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: DHCPCD wont give NIC an IP address [SOLVED]

JN wrote:
Misfit138 wrote:

4. Have you tried killing dhcp and using a static IP?

Yea, doesn't seem to work.

wait, a static ip doesn't work either? that makes it a different problem than dhcpcd not working.

# sudo ifconfig eth0 192.168.1.10 netmask 255.255.255.0
# sudo ifconfig eth0 up
# ping 192.168.1.1

what does that do? if you get a ping;

# sudo route add default gw 192.168.1.1 eth0
# ping archlinux.org

and that?


ᶘ ᵒᴥᵒᶅ

Offline

#17 2010-01-23 22:43:06

JN
Member
Registered: 2010-01-17
Posts: 28

Re: DHCPCD wont give NIC an IP address [SOLVED]

litemotiv wrote:

wait, a static ip doesn't work either? that makes it a different problem than dhcpcd not working.

I didn't think that was a problem since the router could just be configured for DHCP only.

litemotiv wrote:
# sudo ifconfig eth0 192.168.1.10 netmask 255.255.255.0
# sudo ifconfig eth0 up
# ping 192.168.1.1

what does that do? if you get a ping;

All I get is "Network is unreachable". I'm assuming this is because eth0 has no IP address.

Note: other computers have no trouble dynamically acquiring, wired and unwired, an address from the same router.


EDIT:

JuseBox wrote:

When using the live cd does internet connectivity work?

Thanks, that was a good idea I totally spazzed on. UNFORTUNATELY, when I pop in the live CD and tell it to setup eth0 it spits out:

-------Dhcp problem-------
DHCP request failed. dhcp
returned 0 but no ip
configured for eth0

Additionally, I tried using my two other wireless NICs, one: the built in card; the other: PCMCIA card. Both of them also failed to acquire an address. Stating "carrier lost" before timing out.

But I can't stress enough the fact that other computers have gotten on this router with any trouble. I.E.: A Windows laptop via Ethernet, a Debian Linux laptop via Ethernet, a Macbook via WiFi, and an Ubuntu Linux netbook.

Last edited by JN (2010-01-23 23:17:07)

Offline

#18 2010-01-24 02:50:43

JuseBox
Member
Registered: 2009-11-27
Posts: 260

Re: DHCPCD wont give NIC an IP address [SOLVED]

Thanks, that was a good idea I totally spazzed on. UNFORTUNATELY, when I pop in the live CD and tell it to setup eth0 it spits out:
-------Dhcp problem-------
DHCP request failed. dhcp
returned 0 but no ip
configured for eth0
Additionally, I tried using my two other wireless NICs, one: the built in card; the other: PCMCIA card. Both of them also failed to acquire an address. Stating "carrier lost" before timing out.

But I can't stress enough the fact that other computers have gotten on this router with any trouble. I.E.: A Windows laptop via Ethernet, a Debian Linux laptop via Ethernet, a Macbook via WiFi, and an Ubuntu Linux netbook.

How about using a different live cd like ubuntu or something and seeing if it works there to cross out the application layer? Getting it to work somewhere else would be nice to know that it is narrowed down to ubuntu.  Or if it doesn't work getting specific drivers to function would be next.


Linux ArchLinux 3.2.8-1-ARCH
#1 SMP PREEMPT Mon Feb 27 21:51:46 CET 2012 x86_64 AMD FX(tm)-8120 Eight-Core Processor AuthenticAMD GNU/Linux
8192MB DDR3 1300MHz | Asus m5a97 | GeForce GTX 550 Ti | 120 GB SSD

Offline

#19 2010-01-24 02:56:11

JN
Member
Registered: 2010-01-17
Posts: 28

Re: DHCPCD wont give NIC an IP address [SOLVED]

JuseBox wrote:

How about using a different live cd like ubuntu or something and seeing if it works there to cross out the application layer? Getting it to work somewhere else would be nice to know that it is narrowed down to ubuntu.  Or if it doesn't work getting specific drivers to function would be next.

Well, the same computer was able to connect to the same router over Ethernet while running Debian.

Last edited by JN (2010-01-24 02:57:33)

Offline

#20 2010-01-24 02:58:23

JuseBox
Member
Registered: 2009-11-27
Posts: 260

Re: DHCPCD wont give NIC an IP address [SOLVED]

JN wrote:
JuseBox wrote:

How about using a different live cd like ubuntu or something and seeing if it works there to cross out the application layer? Getting it to work somewhere else would be nice to know that it is narrowed down to ubuntu.  Or if it doesn't work getting specific drivers to function would be next.

Well, the same computer was able to connect to the same router over Ethernet while running Debian.

Can you try a live cd of something else with the current setup?


Linux ArchLinux 3.2.8-1-ARCH
#1 SMP PREEMPT Mon Feb 27 21:51:46 CET 2012 x86_64 AMD FX(tm)-8120 Eight-Core Processor AuthenticAMD GNU/Linux
8192MB DDR3 1300MHz | Asus m5a97 | GeForce GTX 550 Ti | 120 GB SSD

Offline

#21 2010-01-24 04:17:16

JN
Member
Registered: 2010-01-17
Posts: 28

Re: DHCPCD wont give NIC an IP address [SOLVED]

JuseBox wrote:
JN wrote:
JuseBox wrote:

How about using a different live cd like ubuntu or something and seeing if it works there to cross out the application layer? Getting it to work somewhere else would be nice to know that it is narrowed down to ubuntu.  Or if it doesn't work getting specific drivers to function would be next.

Well, the same computer was able to connect to the same router over Ethernet while running Debian.

Can you try a live cd of something else with the current setup?

Hmm, I'm downloading Ubuntu right now (to make a bootable USB stick).

But I don't see how that will let me test it on my current setup. Running a live cd/stick means I'm not using the problem OS setup. If you mean the hardware, I have little control over the 'setup'. As I said above, I'm running an IBM Thinkpad laptop.

Offline

#22 2010-01-24 04:26:03

JuseBox
Member
Registered: 2009-11-27
Posts: 260

Re: DHCPCD wont give NIC an IP address [SOLVED]

JN wrote:
JuseBox wrote:
JN wrote:

Well, the same computer was able to connect to the same router over Ethernet while running Debian.

Can you try a live cd of something else with the current setup?

Hmm, I'm downloading Ubuntu right now (to make a bootable USB stick).

But I don't see how that will let me test it on my current setup. Running a live cd/stick means I'm not using the problem OS setup. If you mean the hardware, I have little control over the 'setup'. As I said above, I'm running an IBM Thinkpad laptop.

I understand what you are saying.  But what if there is a chance that you throw that ubuntu live usb and boot and you still don't have internet...  then we could be troubleshooting something for no reason.  Weird things happen.  if your not getting out on the live cd something is def wrong.  I personally haven't seen anything not able get on the internet via ethernet. wireless is a different story. but EVERYTHING I have used i have never had an issue with so this is weird to me as well and thats why i am trying to help.  I just don't wanna troubleshoot something unless we narrow some things down abit.  Im a network/system admin for an ISP. I get picky! lol

Edit: Spelling error

Last edited by JuseBox (2010-01-24 04:26:41)


Linux ArchLinux 3.2.8-1-ARCH
#1 SMP PREEMPT Mon Feb 27 21:51:46 CET 2012 x86_64 AMD FX(tm)-8120 Eight-Core Processor AuthenticAMD GNU/Linux
8192MB DDR3 1300MHz | Asus m5a97 | GeForce GTX 550 Ti | 120 GB SSD

Offline

#23 2010-01-24 05:03:49

JN
Member
Registered: 2010-01-17
Posts: 28

Re: DHCPCD wont give NIC an IP address [SOLVED]

JuseBox wrote:

I personally haven't seen anything not able get on the internet via ethernet.

Me neither, which is why I'm so confused. -_-

I hope I didn't sound cranky or anything. I very much appreciate any help with this.

Update:
1). Attempting to prepare the Ubuntu now.
2). I got to test my machine on another router and network. It seemed to work. My machine seemed to acquire an IP like it's supposed to. However, I couldn't ping 192.168.1.1 or 192.168.01 even though I could ping 192.168.100.1 and at least one other IP on the cloud.

Offline

#24 2010-01-24 05:07:06

JuseBox
Member
Registered: 2009-11-27
Posts: 260

Re: DHCPCD wont give NIC an IP address [SOLVED]

JN wrote:
JuseBox wrote:

I personally haven't seen anything not able get on the internet via ethernet.

Me neither, which is why I'm so confused. -_-

I hope I didn't sound cranky or anything. I very much appreciate any help with this.

Update:
1). Attempting to prepare the Ubuntu now.
2). I got to test my machine on another router and network. It seemed to work. My machine seemed to acquire an IP like it's supposed to. However, I couldn't ping 192.168.1.1 or 192.168.01 even though I could ping 192.168.100.1 and at least one other IP on the cloud.

What about google.com?  or outside the network?


Linux ArchLinux 3.2.8-1-ARCH
#1 SMP PREEMPT Mon Feb 27 21:51:46 CET 2012 x86_64 AMD FX(tm)-8120 Eight-Core Processor AuthenticAMD GNU/Linux
8192MB DDR3 1300MHz | Asus m5a97 | GeForce GTX 550 Ti | 120 GB SSD

Offline

#25 2010-01-24 05:25:25

JN
Member
Registered: 2010-01-17
Posts: 28

Re: DHCPCD wont give NIC an IP address [SOLVED]

JuseBox wrote:

What about google.com?  or outside the network?

JN wrote:

...and at least one other IP on the cloud.

The router didn't assign any nameservers. Apparently, DNS was manually set up on that LAN (it was a home network). Didn't have any nameserver IPs to test, so I pinged a Broadview IP, it was the only IP anyone had off-hand.

It's a little shaky for me as far as troubleshooting goes, but that's the best I have as far as multi-network testing goes.

Last edited by JN (2010-01-24 05:26:27)

Offline

Board footer

Powered by FluxBB