Hostname resolution from one linux host to another linux hos

Taking care of your Linux box.
Post Reply
mashkoor.qadir
Lance Naik
Posts: 32
Joined: Mon Dec 20, 2010 10:27 pm
Location: Karachi
Contact:

Hostname resolution from one linux host to another linux hos

Post by mashkoor.qadir »

Dear all,

I am using windows DNS server in my environment.

All windows clients can ping all linux and windows machines. but I can't ping from one Linux host to another Linux. Ping response is unknown host. However it is working fine with FQDN(eg: host1.linux.example.com).

I need to resolve only with hostname (eg host1.linux).

How to get it resolve.
Kind Regards,
Mashkoor Qadir,
mashkoor.qadir@yahoo.com
http://www.redmath.com
lambda
Major General
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Location: Lahore
Contact:

Re: Hostname resolution from one linux host to another linux

Post by lambda »

add the search or domain field to your /etc/resolv.conf files. for example

Code: Select all

nameserver 192.168.1.1
domain mycompany.com
or

Code: Select all

nameserver 192.168.1.1
search mysubdomain.mycompany.com mycompany.com
Watch out for the Manners Taliban!
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
mashkoor.qadir
Lance Naik
Posts: 32
Joined: Mon Dec 20, 2010 10:27 pm
Location: Karachi
Contact:

Re: Hostname resolution from one linux host to another linux

Post by mashkoor.qadir »

Thanks Lambda,

Adding search option in /etc/resolv.conf file fixed my issue.
Kind Regards,
Mashkoor Qadir,
mashkoor.qadir@yahoo.com
http://www.redmath.com
Post Reply