I’m always forgetting how to register my machine name with the DHCP server so I can ping my box without having to remember my IP address. Here’s how to do it on Fedora Core 9:
- Set the hostname: `# hostname <hostname>`
- Add ‘HOSTNAME=<hostname>’ to ‘/etc/sysconfig/network’ (makes the change permanent).
- Add ‘DHCP_HOSTNAME=<hostname>’ to ‘/etc/sysconfig/network-scripts/ifcfg-eth0′
- Restart the networking service: `# service network restart`
Volia! Now you can connect to your box via hostname.
References:


[...] Tom Distler » Setting the DHCP Hostname on Linux To err is human, but to really foul things up you need a computer. (tags: linux networking dhcp hostname dns) [...]
you never register your host to a DHCP server … never
you do register to a DNS server …
DHCP server provides a “new” ip to your computer
DNS resolves a hostname to an ip
so, you get an IP from DHCP server, then tell it to a DNS server,
so the rest of the world asks DNS server “what ip has you.network.com” and dns server provides the correponding ip
good luck
Reply