# Can't receive DHCP response [SOLVED]

## krigstask

Good daytime

I've got a problem with DHCP in my network, while using Gentoo.

At first, when I started to install using Minimal Installation CD, all went good, network was detected at startup as it should be (sometimes I had to run net-setup script). After I have installed system, something went wrong.

While booting, system tells that dhcpcd couldn't get any proper respond from DHCP-server.

I tried other DHCP-clients (udhcpc and dhclient), but with no success. All of them I tried to run via commandline with various keys I could imagine to be useful. The result is the same  server doesn't respond.

After that, I tried to boot from the very same CD I have installed system from (guess I hardly could change something there), thinking of some kernel misconfiguration etc. But even its dhcpcd couldn't establish connection with server! Neither while startup, nor via net-setup, nor manually (# dhcpcd eth0).

If I try to feed net-setup with info I got in WinXP from DHCP-server (IP, subnet mask, DNS etc), it worked. But the same in installed system gives no result, even if I copy /etc/conf.d/net and /etc/resolv.conf configured by net-setup to HD.

I've decided to try another CD and got a Kubuntu one. And its DHCP-client (dhclient) works! I brought eth0 down (tried to ping local servers  no pings), then run dhclient (without any arguments, keys or options) from Konsole  and it reached server (pings start coursing)

I'm almost sure the problem isn't in my kernel  because it was there and I hope I fixed it (dmfe module for Davicom cards now is compiled in solidly).

Here's some info

ifconfig eth0:

```
eth0      Link encap:Ethernet  HWaddr 00:08:A1:9D:5E:3B  

          BROADCAST NOTRAILERS MULTICAST  MTU:1500  Metric:1

          RX packets:7632 errors:0 dropped:0 overruns:0 frame:0

          TX packets:10 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:509361 (497.4 Kb)  TX bytes:2828 (2.7 Kb)

          Interrupt:16 Base address:0xd800 
```

/etc/conf.d/net  blank

/etc/resolv.conf  blank

I'd greatly appreciate any help (-:E

Sorry if the solution already lays somewhere  on forums, I've searched for it honestly, but couldn't find anything suitable \-:ELast edited by krigstask on Fri May 18, 2007 12:01 pm; edited 1 time in total

----------

## impulze

check for CONFIG_PACKET in your kernel configuration

if you compiled access through /proc/config.gz into your kernel you could check with

```

zcat /proc/config.gz | grep CONFIG_PACKET

```

or when you have your kernel sources laying around which you used for the booted kernel

```

grep CONFIG_PACKET /path/to/kernel/.config

```

----------

## krigstask

Thanks for reply, impulze

```
# Networking options

#

# CONFIG_NETDEBUG is not set

CONFIG_PACKET=y

```

It seems to be compiled in (-:E

----------

## impulze

For now i don't know what's causing it. Is it possible to get the exact error you're getting when trying to receive a dhcpoffer?

----------

## krigstask

Here're error messages I get:

dhcpcd -d eth0:

```
Info, MAC address=00:08:a1:9d:5e:3b

Debug, broadcasting DHCP_DICOVER

Error, timed out waiting for a valid DHCP server response
```

dhclient

```
Listening on LPF/eth0/00:08:a1:9d:5e:3b

Sending on LPF/eth0/00:08:a1:9d:5e:3b

Sending on Socket/fallback

DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7

DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7

No DHCPOFFERS received

No working leases in persistent database — sleeping
```

----------

## krigstask

I've just tried Gentoo 2006.1 LiveCD and its dhcpcd works with my DHCP server all right \-:E

Still, Minimal CD and installed Gentoo can't establish connection )-:E

:summoning_kind_gurus:

(-:E

----------

## krigstask

A little bit more logic: LiveCD's dhcpcd refuses to work now too \-8E

As nobody can help me, I'd wait for 2007.0 release, probably those CDs will be able to deal with my dhcp-server properly...

----------

## antipod

I hope you've got it to work now but anyway, I have a similar problem. For me my network works when using dhcpcd version 2.0.5-r1 (I guess it works with all 2.* versions) but if updating to version 3.* it will time out similar to your problem.

I know I can just mask those newer versions but still, I want it to work. Anyway, this might be your problem as well, so try to 

```
emerge =dhcpcd-2.0.5-r1
```

 and see if it works.

----------

## UberLord

Does dhcpcd-3 work if you specify a leasetime?

I have one report of linksys wireless AP's not working with dhcpcd-3 over WPA unless a leasetime is requested. The odd thing is it works on the same AP if WPA is not used (ie WEP, nothing works fine).

----------

## krigstask

Ooops... Swedish people... My nick'd been understood #-:E

antipod

I used (ehm... tried to use) exactly dhcpcd 2.0.5-r1 \-:E

----------

## krigstask

2007.0 seems to solve this weird problem

----------

## Su8l1me

I gave dhcpcd a timeout of 60 seconds when this started happening to me - seemed to solve the issue.

----------

## krigstask

Su8l1me

It seems to be clue! (-:E

But could you tell, how timeout should be set for net.eth0?

----------

## UberLord

If using dhcpcd then you can do this

dhcpcd_eth0="-t 60"

----------

## krigstask

Thanks, UberLord!

I'll try it, if it won't work, I'll re-rename this thread again

:marking_thread_as_SOLVED:

----------

