# dhcp server and dns

## line72

I got my dhcp server set up and i can route ip addresses out to the internet.  My problem is when a computer on my lan get's their ip address, their /etc/resolv.conf just contains:

```

search insightbb.com

nameserver 192.168.0.1

```

if I change the other computers on the lans' resolv.conf to the same as my host computer, then dns works.  So how I get the computers on my lan to have the correct resolv.conf on boot from the dhcp server ? (here's my dhcpd.conf)

```

ddns-update-style none;

subnet 192.168.0.0 netmask 255.255.255.0 {

        # default gateway

        option routers 192.168.0.1;

        option subnet-mask 255.255.255.0;

        option domain-name "insightbb.com";

        option domain-name-servers 192.168.0.1;

        range dynamic-bootp 192.168.0.16 192.168.0.253;

        default-lease-time 21600;

        max-lease-time 43200;

}

```

Thanks for all your help, I know my networking skills suck : )

----------

## Nitro

The problem is with your nameserver, not your dhcp server.  Could you share with use your nameserver's config ( /etc/bind/named.conf )?

Also, you can do some test using the tools included with bind-tools.  First, to use your default nameservers from /etc/reslov.conf, but to specify a specific server use the @ option. 

```
dig gentoo.org

dig @192.168.0.1 gentoo.org

dig @<othernamserver> gentoo.org
```

Hopefully that should help you get headed in the right direction.

----------

## mrchuckles

DHCP will not copy the resolv.conf file from the DHCP server to the clients.  The clients take settings they receive from the DHCP server and put them in their resolv.conf file (usually overwriting anything else in there).  It would help to see the resolv.conf from the DHCP server.

The lines in your dhcpd.conf file show exactly why you're clients are getting the resolv.conf settings they are.

```
option domain-name "insightbb.com"; 

option domain-name-servers 192.168.0.1; 
```

These two lines are what the DHCP clients are pulling to determine their name server information.  Change these lines to match the settings from your DHCP servers resolv.conf, and you should be good to go.

----------

