# DHCP problems

## Harold

I fail to let my gentoo box use dhcp instead of the static address and I can't figure out why?  :Sad: 

right now my box is assigned a static IP of 192.168.0.11

I'd like them to get an IP within the range of .10 - .30 dynamically

on my progeny debian router I've setup dhcpd on eth1 with the following in dhcpd.conf

```

subnet 192.168.0.0 netmask 255.255.255.0

{

  range dynamic-bootp 192.168.0.10 192.168.0.50;

  default-lease-time 21600;

  max-lease-time 43200;

        # DSL Gateway

        option routers 192.168.0.1;

        option broadcast-address 192.168.0.255;

        option subnet-mask 255.255.255.0;

        # Domain settings

        option domain-name "valhalla.lan";

        option domain-name-servers 195.238.2.21 195.238.2.22

        # NTP servers

        option ntp-servers ntp1.belbone.be ntp2.belbone.be

}

```

current routes are

```

Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

10.0.0.0        *               255.255.255.0   U     0      0        0 eth0

192.168.0.0     *               255.255.255.0   U     0      0        0 eth1

default         10.0.0.138      0.0.0.0         UG    0      0        0 eth0

```

dhcpd is activated on eth1 on the router box.

When I use dhcpcd on the gentoo box I just get a time-out  :Neutral: 

Does anybody have an idea of what I'm doing wrong?

Thx a lot.

Harold

----------

## pjp

Do you have /etc/conf.d/net setup? (on the client)

----------

## stary

Hard to tell... how's your gentoo box configured? especially the routes on that box... and what is the exact output you get from dhcpcd? Try running it with the -d flag, which should get you a bunch of entries in your syslog about what it tried to do.

Also, look in whichever log your debian box puts DHCP requests in (syslog, messages, dhcp.log, dunno...), and see if you can see the request there, and if there are any error messages. Does the dhcp service work for any other box (now or previously)?

Can't see any obvious config error on the side of the dhcpd though.

Regards,

/Stary

----------

## Harold

aargh   :Razz: 

stupid me

at last I see it. Thx for pointing me to the logs  :Smile: 

I figured out that I forgot 2 ;  and ,

nameservers + ntpservers

God I feel stupid now

thx a lot

----------

