LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 08-11-2011, 10:33 PM   #1
Bitvapor
LQ Newbie
 
Registered: Aug 2011
Posts: 4

Rep: Reputation: Disabled
Name resolution via router (and Fedora et al.)


Hello, all,

I am having a problem with Red Hat-based machines (Fedora, CentOS) performing DNS duties when connected to my router.

I can connect virtually any other network-able device (Windows PC, Ubuntu/Debian PC, PS3, Panasonic TV, Western Digital Live, etc.) to my network and they have no difficulty resolving hostnames via my home router. However, any Red Hat based machine (Fedora, CentOS, etc) cannot perform name resolution via DHCP with the following exceptions:

1) nslookup always works
2) manually editing /etc/resolv.conf to point to my ISPs DNS works

My DHCP-enabled Debian-based systems always work out-of-the-box with the same home network.

What am I missing here?

Many thanks.

Last edited by Bitvapor; 08-11-2011 at 10:59 PM.
 
Old 08-12-2011, 03:36 PM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Quote:
2) manually editing /etc/resolv.conf to point to my ISPs DNS works
From this, I presume that the DHCP client on Redhat fails to properly configure resolv.conf. Is that correct? If so, it would indicate some problem with a dhclient-script. On my CentOS 5 host, the relevent bits are in /sbin/dhclient-script. In there, there is a function 'make_resolv_conf()', which seems to be the place that puts the respective info in place. In contrast, Debian 6 uses a script '/etc/dhcp3/dhclient-enter-hooks.d/resolvconf'. If you have both of these host types at your disposal, you should be able to suss out the differences, and modify the recalcitrant script appropriately. FWIW, I find virtual machines ideal for this kind of work.

--- rod.
 
Old 08-13-2011, 05:18 PM   #3
Bitvapor
LQ Newbie
 
Registered: Aug 2011
Posts: 4

Original Poster
Rep: Reputation: Disabled
Hello theNbomr,

Quote:
Originally Posted by theNbomr View Post
From this, I presume that the DHCP client on Redhat fails to properly configure resolv.conf. Is that correct?
Not exactly. resolv.conf is being correctly populated with the IP address of my router which acts as a DNS cache/relay. nslookup and dig will work without issue but other network applications fail with "cannot resolve hostname" errors on the CentOS box. My Ubuntu box (as well as every other device on my network) is also configured to use the router's DNS relay and works perfectly.

When I have found this question asked elsewhere on the Internet, the generally accepted response is to hack the network scripts to bypass the router's DNS relay and simply use the IP address of the ISP's DNS. There must be a proper way to solve this problem. This problem is not unique to my home network as I've experienced it when connecting my Fedora laptops to other networks (like those in hotels while traveling).

Thank you for your response.
 
Old 08-13-2011, 06:40 PM   #4
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Interesting, and hard to understand how some things would work and other things not. Is the router a Linux box, or a shrink-wrapped, dedicated appliance? If it is Linux, there would seem to be a fighting chance of seeing what DNS-related traffic propagates to it and through it from the various types of hosts.
So, the resolv.conf created on other kinds of hosts is the same or equivalent to that created on the Redhat hosts? But the name lookup behavior is different?

--- rod.

Last edited by theNbomr; 08-16-2011 at 08:52 AM.
 
Old 08-15-2011, 09:19 PM   #5
Bitvapor
LQ Newbie
 
Registered: Aug 2011
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by theNbomr View Post
Is the router a Linux box, or a shrink-wrapped, dedicated appliance?
The latter, unfortunately.

Quote:
So, the resolv.conf created on other kinds of hosts is the same of equivalent to that created on the Redhat hosts? But the name lookup behavior is different?
Correct. Also, I've examined DNS traffic with Wireshark and compared that of querying the router vs. querying the ISP's DNS directly. The only difference I can detect is that, in the response packets, the "don't fragment" bit is set when querying the ISP but not the router. This was performed with the Ubuntu box, though.

This is driving me crazy. I'll perform more packet inspection tomorrow with a Fedora VM as per your suggestion in your first response. Thanks for sticking with this!
 
Old 08-16-2011, 08:58 AM   #6
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Do the hosts files on Redhat & other/working host have any obvious differences?
--- rod.
 
1 members found this post helpful.
Old 08-16-2011, 09:21 PM   #7
Bitvapor
LQ Newbie
 
Registered: Aug 2011
Posts: 4

Original Poster
Rep: Reputation: Disabled
Okay, I figured it out. This is related to behavior introduced in Fedora 10 regarding how applications resolve addresses via glibc. Debian's glibc implementation differs in this respect and tools like nslookup, dig, host, etc. provide their own name resolution routines.

In a nutshell: my router (as well as that of many a hotel I've stayed at) stinks and its behavior is considered "non-compliant" when an IPv6 DNS request is made of it. (Even if IPv6 is completely disabled, Fedora will query for both IPv4 and IPv6 addresses). The behavior of my ISP's DNS, on the other hand, is compliant, hence the successes when resolv.conf is configured for it.

There are two other quick workarounds: configure dnsmasq (which provides its own name resolution routines) or use an undocumented option in resolve.conf. The latter didn't work at all for me and, well, I was eventually going to install dnsmasq on this box so I went with that option.

Mystery solved. Thanks once again for your responses!

Last edited by Bitvapor; 08-16-2011 at 09:23 PM.
 
  


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
slow dns resolution with a netcomm router zoran119 Slackware 10 07-30-2010 08:44 AM
Broadband router/name resolution melliff Linux - Networking 3 02-03-2007 10:09 AM
New To Linux, Screen Resolution and Router Questions bob_howes Fedora 3 11-08-2006 10:34 AM
Resolution in Fedora gummimann Linux - Hardware 7 07-14-2004 05:25 AM

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

All times are GMT -5. The time now is 06:25 AM.

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