Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 01-25-2006, 10:00 AM   #1
LQ Newbie
Registered: Nov 2005
Posts: 13

Rep: Reputation: 0
Exclamation 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.
Old 01-25-2006, 10:45 AM   #2
Senior Member
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,402
Blog Entries: 1

Rep: Reputation: 64
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,
Old 01-25-2006, 10:55 AM   #3
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 878

Rep: Reputation: 184Reputation: 184
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.
Old 01-25-2006, 10:56 AM   #4
LQ Newbie
Registered: Nov 2005
Posts: 13

Original Poster
Rep: Reputation: 0
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!


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Some questions on DNS & DHCP on a LAN BrianK Linux - Networking 3 07-26-2005 04:33 PM
DHCP can't dynamically assign IP adress xuyxs Linux - Networking 3 12-22-2004 04:00 AM
dhcp does not assign IP to nic WurM Linux - Networking 5 02-25-2004 02:36 PM
How do you make the ip masquerade server/dhcp server broadcast dns to lan cmisip Linux - Networking 6 01-25-2003 11:43 PM
How can I assign an IP instead of DHCP? pilot1 Linux - Networking 2 12-06-2002 04:37 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:20 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration