LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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, 09: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, 09:45 AM   #2
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,499
Blog Entries: 2

Rep: Reputation: 68
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, 09:55 AM   #3
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 891

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, 09: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



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 03:33 PM
DHCP can't dynamically assign IP adress xuyxs Linux - Networking 3 12-22-2004 03:00 AM
dhcp does not assign IP to nic WurM Linux - Networking 5 02-25-2004 01:36 PM
How do you make the ip masquerade server/dhcp server broadcast dns to lan cmisip Linux - Networking 6 01-25-2003 10:43 PM
How can I assign an IP instead of DHCP? pilot1 Linux - Networking 2 12-06-2002 03:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration