unable to ping server ip from client system
i have centOS server 5.8 with ip address 192.168.1.105.
now task is if i do "ping test.xyz.com" from any other system in LAN then it should reply from 192.168.1.105. how to do it.? |
Things to consider
research "name resolution", bind, hosts file, and possibly arp for interesting and pertinent information.
Easy answer: put that host into your local DNS. Easier answer that does not scale well: if you do not run a DNS, put it into the hosts table (/etc/host) on every client machine. |
In general, you'd need to have a DNS server running, but a minimal approach that may work for you is to just add the hostname mapping to the /etc/hosts file. Another option (if you don't want the hassle of administering a DNS server), is to consider using Avahi. This is described well here:
https://wiki.archlinux.org/index.php/Avahi FWIW, my home DSL router happens to provide this service, making it a trivial exercise to reach machines by hostname. |
@ferrari and @wpeckahm will u please help me out with commands. Thanks
|
I would have expected you would have told us if you had a DNS running. So, assuming a small LAN with one server that you need to reach by hostname the easiest solution is to edit /etc/hosts on the client machine(s) with an entry similar to
Code:
192.168.1.105 test.xyz.com test Code:
man /etc/hosts |
All times are GMT -5. The time now is 02:46 AM. |