Hostname resolution from one linux host to another linux hos

Taking care of your Linux box.

Hostname resolution from one linux host to another linux hos

Postby mashkoor.qadir » Tue Oct 27, 2015 1:09 pm

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.
mashkoor.qadir
Lance Naik
 
Posts: 32
Joined: Mon Dec 20, 2010 10:27 pm
Yahoo Messenger: mashkoor.qadir@yahoo.com
Location: Karachi

Re: Hostname resolution from one linux host to another linux

Postby lambda » Tue Nov 10, 2015 7:36 pm

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"?
lambda
Major General
 
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Website: http://www.hungry.com/~fn/
Location: Lahore

Re: Hostname resolution from one linux host to another linux

Postby mashkoor.qadir » Fri Nov 27, 2015 4:24 pm

Thanks Lambda,

Adding search option in /etc/resolv.conf file fixed my issue.
mashkoor.qadir
Lance Naik
 
Posts: 32
Joined: Mon Dec 20, 2010 10:27 pm
Yahoo Messenger: mashkoor.qadir@yahoo.com
Location: Karachi


Return to “%s” Administration

Who is online

Users browsing this forum: No registered users and 3 guests

cron