LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-17-2008, 07:25 AM   #1
watcher69b
Member
 
Registered: Nov 2007
Location: /home/watcher69b
Distribution: RH, Fedora & CentOS
Posts: 552

Rep: Reputation: 41
etc/resolv.conf Problem


I have 3 DNS servers
1 external and 2 internal.
Needless to say i want to query the internal before the external.

I specified them in the order that I wanted them in networkmanager
but for some reason when i try to resolve something it goes in sequential order (10.x.x.1 , 10.x.x.2 , 10.x.x.3)
starting with the external DNS.

i looked in /etc/resolv.conf and discovered that is how they were listed. So i changed the order to how i wanted it and all was right with the world.

however after reboot they are back in sequential order. How can i fix that?
 
Old 07-17-2008, 07:34 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Don't use that network manager that uses system-config-network, it sucks and is buggy.

You probably need to update manually and then remove the other files that the system-config-network creates and uses in /etc/sysconfig/networking/profiles/default/

I've actually submitted a bug for the system-config-network to Red Hat, they haven't moved on it in 2 months. Perhaps I should submit it to the Fedora guys.
 
Old 07-17-2008, 01:08 PM   #3
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
The question that comes to mind is why are the internal and external DNS Servers on the same subnet?

I guess you must have some reason for this, but this unexpected setup is probably confusing whatever heuristics are employed in determining which are internal and which external and that that in turn leads to all three being fed into the sort process with the consequence that the lowest numbered one comes out on top.

c.f. host.conf (5)
Quote:
reorder
Valid values are on and off. If set to on, resolv+ will attempt to reorder host addresses so that local addresses (i.e., on the same subnet) are listed first when a gethostbyname(3) is performed. Reordering is done for all lookup methods. The default value is off.
and resolv.conf (5)
Quote:
On a normally configured system this file should not be necessary...
sortlist
Sortlist allows addresses returned by gethostbyname(3) to be sorted. A sortlist is specified by IP address netmask pairs. The net‐
mask is optional and defaults to the natural netmask of the net. The IP address and optional network pairs are separated by
slashes. Up to 10 pairs may be specified. E.g., sortlist 130.155.160.0/255.255.240.0 130.155.0.0
I was looking for the system call that does the stacking and the unstacking of the resolv.confs, but it doesn't seem to be installed on this (ubuntu) box and so there is no man page entry for it. But I recall its behaviour being initially very confusing when playing with PPP.
 
  


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
/etc/resolv.conf PROBLEM Richtown Linux - Networking 10 04-23-2007 04:03 PM
DNS Hosts.conf or resolv.conf problem mac_casey SUSE / openSUSE 0 03-26-2006 09:21 AM
problem with resolv.conf roddyguk Linux - Software 8 01-18-2006 12:57 PM
Problem with resolv.conf divdude Linux - Networking 6 08-01-2005 09:43 PM
Resolv.conf problem saurya_s Linux - Software 3 01-11-2004 12:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:09 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