Quote Originally Posted by user unknown
I'm used to static IPs.
My example is: I have a /etc/host:
192.168.4.2 desktop
192.168.4.3 laptop
One update: rereading your post and seeing that you are manually putting the addresses in the host file to do your name resolution, I do see why you would question this. I don't know if Linux has better ways to deal with resolving these names for you; it's not part of DHCP. Many home routers will let you dedicate an IP address to a MAC adderss, so they can be sure to assign the same IP to a computer whenever the system is rebooted. The Dlink brand of routers that I have seen do this, and I like them for several other reasons too. Unfortunately, some other routers do not assure you that the same IP addresses will be given out to the same MAC addresses each time, particularly on a network where the computers come and go (the SMC router I have, for example, is particularly poor at this, even though it has a feature to make the DHCP lease "forever". Apparently forever starts over after a restart).

So if you do use a router and still want to resolve names with your host file, make sure these addresses don't change (either by using a router that gives out the same IP address by DHCP each time (when you configure it to do so) like the Dlink, or by setting these systems up as you have now with static addresses. Additional computers could still join the network and be assigned an address by DHCP, but they wouldn't have a name in your host file unless you added one. I'm hoping someone else will join in and teach us both if there is a better more automatic way in Linux to do name resolution than editing the host file on every system.

BY the way, there is a good reason to use DHCP to hand out a "permanent" address rather than setting it statically. Consider your laptop. If you configure it with DHCP, when you carry it to work, to an friend's network, to a lan party or to an Internet cafe, you can just plug in and DHCP will configure your IP address for you. When you come back to your home network, DHCP puts things back where they should be. With a static IP set in the laptop, you have to reconfigure things every time you move to a new network (except in the rare case where you have two networks and made sure the same static address will work on each network).