LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Failing to assign DNS servers to lan in DHCP (http://www.linuxquestions.org/questions/linux-networking-3/failing-to-assign-dns-servers-to-lan-in-dhcp-407802/)

Samhein 01-25-2006 09:00 AM

Failing to assign DNS servers to lan in DHCP
 
Greetings,

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 10.0.0.1
First NIC in gateway is 10.0.0.250
Second NIC is 10.10.0.1
DHCP range is 10.10.0.2-10.0.0.254
DNS servers for both NICs are the ISP's DNS servers (194.65.100.117 and 194.65.5.2)
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 10.10.0.1 (2nd NIC ip).
I've set all gateways (default, dhcp and nic) to 10.0.0.1 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 192.168.155.0 netmask 255.255.255.0 {

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

option nis-domain "kgb.com.br";
option domain-name "kgb.com.br";
option domain-name-servers 192.168.155.205, 192.168.155.254;

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 192.168.1.1 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 10:26 AM.