LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

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

Rep: Reputation: 0
Exclamation 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.
 
Old 01-25-2006, 10:45 AM   #2
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,393
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 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,
 
Old 01-25-2006, 10:55 AM   #3
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 876

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 192.168.1.1 which I know is my DSL router.
 
Old 01-25-2006, 10:56 AM   #4
Samhein
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!
 
  


Reply


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


All times are GMT -5. The time now is 02:12 PM.

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