In order for a ping, or any other tcp/ip communication to work, IP address have to be resolved, somewhere. If you have a DNS server, then teh DNS server can resolve addresses.
There are some work arounds. On some routers, using DHCP, you can set the router up to issue an IP based on MAC address. Every card has a MAC ( media access control ) address. Enter the MAC to IP addresses you want, and you always know the IP for a particular machine.
You can then enter the IP addresses in your /etc/hosts file, and then 'ping hostname' will work.
Of course, the other way is to set up static IP addresses, and edit your /etc/hosts file.
On my home network I use both. I set up a small range of addresses for DHCP, teh rest of the addresses of the 254 on my sub-net I sue static addresses. Fir the boxes that are fixed, they get a static IP. The laptops use DHCP.
Hope this helps.
|