LinuxQuestions.org
Help answer threads with 0 replies.
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 03-01-2009, 01:27 PM   #1
pbd
LQ Newbie
 
Registered: Mar 2009
Posts: 2

Rep: Reputation: 0
Automatic lookpup of domain.cz.org if domain.cz not found?


Linux cht0n 2.6.28-gentoo-r1-cht0n

When I try to lookup ip adress of somedomainthatdoesnotexist.cz every program that uses gethostbyname tries to look for somedomainthatdoesnotexist.cz.org. I cannot find out why.

For example:

# wget http://www.fi.muni.cz/~kas/p077/gethostbyname.c
# gcc gethostbyname.c
# ./a.out linuxquestions.org
Cannonical hostname: linuxquestions.org
Address type: 2
Address length: 4
Address: 75.126.162.205
# ./a.out somedomainthatdoesnotexist.cz
Cannonical hostname: somedomainthatdoesnotexist.cz.org
Address type: 2
Address length: 4
Address: 195.141.38.210


(because this is the answer for *.cz.org)

Except of 'dig' command every program does this - it can be seen in tcpdump.

Got someone any idea why is this happening?

Thanks.
 
Old 03-01-2009, 03:38 PM   #2
mazhar_theone
LQ Newbie
 
Registered: Mar 2008
Posts: 14

Rep: Reputation: 0
I am not sure but it could be resolver or cache issue.
try to change resolver or restart nscd service.

[root@server ~]# dig A somedomainthatdoesnotexist.cz.org +short
195.141.38.210


I think dig query the parent name server for the requested record.

for e.g. if you dig for any specific record.

dig MX linuxquestions.org

dig A linuxquestions.org +short

dig NS linuxquestions.org +short

dig SOA linuxquestions.org +short

And as dig do not get any parent name servers or your resolvers are not able to get name servers for "somedomainthatdoesnotexist.cz.org" to that domain.

Last edited by mazhar_theone; 03-01-2009 at 03:46 PM.
 
Old 03-01-2009, 11:53 PM   #3
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 69
You probably have "search .org" in your /etc/resolv.conf . It's either that, your the name servers you're using are automatically trying other queries if the first one fails with NXDOMAIN. Post the content of your /etc/resolv.conf file here and we can double-check.
 
Old 03-02-2009, 06:46 AM   #4
pbd
LQ Newbie
 
Registered: Mar 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by chort View Post
You probably have "search .org" in your /etc/resolv.conf . It's either that, your the name servers you're using are automatically trying other queries if the first one fails with NXDOMAIN. Post the content of your /etc/resolv.conf file here and we can double-check.
That's it.

# grep org /etc/resolv.conf
search org


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
Stop one profile from roaming in domain with samba domain controller aiurm Linux - Server 4 10-16-2008 07:12 AM
Want new domain to act as alias for current domain: email, dns, etc. cotton213 Linux - Server 3 07-01-2008 04:11 PM
Joining a linux machine to a windows domain having a wndows 2003 as domain contoller sukalyan_g Suse/Novell 1 03-28-2008 02:31 AM
Restrict users of a domain to send/receive mail from one particular domain tanveer Linux - Server 0 09-02-2007 03:01 AM
automatic adding machines to domain in samba brasuca Linux - Networking 1 05-14-2004 08:09 AM


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