LinuxQuestions.org
Review your favorite Linux distribution.
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 02-21-2011, 01:42 AM   #1
noony123
Member
 
Registered: Oct 2010
Posts: 167

Rep: Reputation: 0
FQDN issue !


Hi all.

I have centos on my VM machine. I setup basic bind, and now my windows XP is successfully browsing internet. Now when i set the FQDN of the centos machine using /etc/hosts file (shown below)

127.0.0.1 WAN-Admin localhost.localdomain localhost
10.1.2.4 WAN-Admin.lab.pc

Now i restarted the services and also the system. Now from xp machine when i ping wan-admin.lab.pc, its gives me error that name couldnt be found. Why is this so ? i am able to resolve any internet site through the same centos machine but am not able to resolve its FQDN ?
Kindly guide me

Edit: Do i need to make an entry of lab.pc in the named.conf file ?

Last edited by noony123; 02-21-2011 at 01:52 AM.
 
Old 02-21-2011, 02:10 AM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Quote:
Originally Posted by noony123 View Post
Edit: Do i need to make an entry of lab.pc in the named.conf file ?
Doesn't hurt to try
 
Old 02-21-2011, 02:17 AM   #3
noony123
Member
 
Registered: Oct 2010
Posts: 167

Original Poster
Rep: Reputation: 0
i am sure it will work. But can someone kindly explain me that without adding, why my DNS is not able to resolve wan-admin.lac.pc when this entry is present in /etc/hosts file ?

Pls guide me
 
Old 02-21-2011, 03:15 AM   #4
noony123
Member
 
Registered: Oct 2010
Posts: 167

Original Poster
Rep: Reputation: 0
Dear Sir,

this is my nsswitch file

#
# /etc/nsswitch.conf
#
#passwd: db files nisplus nis
#shadow: db files nisplus nis
#group: db files nisplus nis

passwd: files
shadow: files
group: files

#hosts: db files nisplus nis dns
hosts: files dns

# Example - obey only what nisplus tells us...
#services: nisplus [NOTFOUND=return] files
#networks: nisplus [NOTFOUND=return] files
#protocols: nisplus [NOTFOUND=return] files
#rpc: nisplus [NOTFOUND=return] files
#ethers: nisplus [NOTFOUND=return] files
#netmasks: nisplus [NOTFOUND=return] files

bootparams: nisplus [NOTFOUND=return] files

ethers: files
netmasks: files
networks: files
protocols: files
rpc: files
services: files

netgroup: nisplus

publickey: nisplus

automount: files nisplus
aliases: files nisplus

As you can see, hosts will be checked in files first and then using dns. Why in my case, its not looking in /etc/hosts file ?
 
Old 02-21-2011, 03:29 AM   #5
noony123
Member
 
Registered: Oct 2010
Posts: 167

Original Poster
Rep: Reputation: 0
Ok pls confirm my findings

1) /etc/hosts is not used by BIND. We need h2n perl tool to translate host file to corresponding zone data file
2) In my case, i must add "lab.pc" zone to my named.conf

Pls guide me
 
Old 02-21-2011, 03:56 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,167
Blog Entries: 1

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
Hi,

1. You're right. Bind uses dns queries to resolve hosts/domains. The hosts file is used locally by some utilities (like ping in your case).
2. If you want the host to be resolvable from other computers, then yes. You need to create the zone lab.pc in your name server and add an A record for the host in question.
 
1 members found this post helpful.
Old 02-21-2011, 04:31 AM   #7
noony123
Member
 
Registered: Oct 2010
Posts: 167

Original Poster
Rep: Reputation: 0
THANKS ALOT SIR,

i dont have words to show my gratitude.

Thanks again
 
  


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
nn and fqdn andrew.46 Slackware 0 01-02-2009 10:53 PM
ip as my fqdn? sortia Linux - Networking 6 04-27-2005 09:46 AM
Fqdn ziox Linux - Networking 0 10-06-2004 05:46 PM
FQDN - not darb Linux - General 1 10-04-2004 03:57 PM
not able to start up apache correctly due to fqdn issue Robin01 Linux - Newbie 4 11-23-2003 03:43 PM

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

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