-   Linux - Networking (
-   -   Failing to assign DNS servers to lan in DHCP (

Samhein 01-25-2006 09:00 AM

Failing to assign DNS servers to lan in DHCP

We have an adsl router here at work, and I'm setting up a linux pc (SUSE 10) to act as gateway. I have set up the 2 NICs and the DHCP server, and everything seems ok, but somehow, all the pcs in the lan end up with the wrong DNS server.

Router is
First NIC in gateway is
Second NIC is
DHCP range is
DNS servers for both NICs are the ISP's DNS servers ( and
DHCP servers are also specified as the ISP's DNS servers.

I just don't know what else to do. No matter what I try, the DNS assigned by DHCP is always (2nd NIC ip).
I've set all gateways (default, dhcp and nic) to by the way.

If anyone could help me, it would be great, because I really don't know what else to try.

marozsas 01-25-2006 09:45 AM

I don't known how do you set up your /etc/dhcpd.conf file, but here is a partial list of mine. Pay attention to domain-name-servers directive.

subnet netmask {

# --- default gateway
option routers;
option subnet-mask;

option nis-domain "";
option domain-name "";
option domain-name-servers,;

I hope this helps,

baldy3105 01-25-2006 09:55 AM

Often DSL routers will give out their own address as DNS server within DHCP on the basis that the router will just proxy any requests to the real DNS server addresses. I suspect this is so that if the ISP updates the DNS servers the DHCP info doesn't need to change. In fact I'm operating at the moment with a DNS server of which I know is my DSL router.

Samhein 01-25-2006 09:56 AM

Thanks a lot for your quick reply. It worked now. Apparently the file had the domain-name-servers right for the external NIC but not for the internal one. It's working now. Once again, thanks! ;)

All times are GMT -5. The time now is 03:27 PM.