Host name

In my home’s intranet, I need to connect to my linux server from my XP laptop. To directly use the linux computer’s name instead of the IP adress, I need to make sure that XP can correctly map the host name to the IP address. I have tried two options. The first is to modify the hosts file in windows, and the second is to directly modify the IP-hostname pair in the router’s DNS setup. And I prefer the second method.

The first method:
use Notepad to open the file “c:windows\system32\drivers\hosts”, or “c:windows\system32\drivers\etc\hosts”
at NT, it’s c:winnt\system32\drivers\etc\hosts, and add the following line

192.168.1.4 beast

which mapped the IP address 192.168.1.4 to my linux machine “beast”. The following link is very useful to me, http://practice.chatserve.com/hosts.html

In order to set up the hostname on the linux box, I made a change on the /etc/hosts file, which looks like this:
127.0.0.1 beast.localdomain localhost beast
192.168.1.4 beast.localdomain localhost beast