# dhcp and eth0

## eflum

Hi,

I can boot up with the LiveCD and use dhcp no problem, but when I try and boot up with my own kernel, I can't negotiate an address.  I'm assuming I have the correct module installed.  I looked at the boot messages from the LiveCD and saw what driver was picked, then I compiled the module and stuck it in modules.autoload.  On bootup, it loads the module fine.  I've used Ethereal to see if packets are actually coming out and I do see DHCP discover and DHCP offer packets.  However, somehow Gentoo isn't picking this up.

Thanks,

eflum

----------

## bsolar

Have you configured "/etc/conf.d/net" to make dhcp set the ip on your NIC? And have you added net.eth0 to the default runlevel?

```
 # rc-update add net.eth0 default
```

----------

## eflum

Yep..  I've done that...

All I did was uncomment the line for dhcp for eth0.

Even when I manually try dhcpcd it does not work.  However booting from the livecd, dhcpcd works fine.  On Ethereal, I can see I send out an ACK.  From my own kernel, I don't see an ACK.

----------

## K0byB0y

Yeah I have the same problem.  I boot up from the LiveCD using the "nonet" option and even then my eth0 interface gets configured properly.  After I boot normally from my installed system the network module gets loaded no problem but when the eth0 interface is getting brought up it times out.  For some reason there is no response back from the DHCP server.  I've even tried doing a "dhcpcd eth0 -d" to see all the debug messages but to no avail.  All I get as output is:

dhcpcd: MAC address = <my MAC address>

   And then then after about a minute I get the command prompt back because it timed out.  When doing an ifconfig you can see that eth0 is not set up correctly.  I know that my DHCP server works fine because all my other machines get addresses assigned properly.  Am I missing something ?

-Koby

P.S.: Don't know if this will make a difference but I'm using a Linksys router as my DHCP server.

----------

## eflum

hmmmm...

I was originally using the gentoo-sources kernel.  I just tried the vanilla-sources kernel and it all worked fine...

----------

## K0byB0y

Wow !  You are absolutely right.  I downloaded the latest sources from kernel.org, burnt it on a CD, mounted the drive on my Gentoo box and copied the sources over.  After recompiling the kernel both DHCP and eth0 worked fine.  It must be something in the patches they added to the Gentoo sources for the kernel.  You know what I've noticed ?  When I tried to configure eth0 without DHCP using the gentoo kernel sources eth0 came up with severe rounting problems but I least eth0 had an IP addy now and both IPv4 and IPv6 protocols were supposed by eth0.  I wonder if that's the problem.  Anyhow my networking seems to be working now.  Thanks again for sharing your findig about the kernel sources.  I'm off to install KDE now...

-Koby

----------

## wim

ok i guess all 2.4.20 kernels except for the vanilla sources suffer from this dhcpcd problem.

i have the same problem with the gaming sources, booting with my previous solves the problem...

----------

## planet323

dhcpcd seems to work for me under gentoo-sources-2.4.20-r1

DELL  INSPIRON 5000 notebook

Lucent Orinoco gold card

----------

## tgoodaire

dhcpcd works fine for me with gentoo sources too. Maybe there's something screwy with the module for your network card in gentoo sources.

----------

