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 ? |
Quote:
|
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 |
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 ? |
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 |
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. |
THANKS ALOT SIR,
i dont have words to show my gratitude. Thanks again |
All times are GMT -5. The time now is 02:49 AM. |