- Configure hostname:
echo "deby01" > /etc/hostname
- Ensure hosts file properly resolves localhost:
127.0.0.1 localhost # In some circumstance it is not recommended to # resolve machine name to local ip address #127.0.1.1 deby01.dev.local deby01
- Here is content of /etc/network/interfaces
# The primary network interface allow-hotplug eth0 iface eth0 inet dhcp # If you experience issues with obtaining # default gateway consider uncomment lines below. # up route add default gw 192.168.10.1 # down route del default gw 192.168.10.1
- Let your dhcp client publish our name (so it can be resolved by name). Ensure the following in file /etc/dhcp/dhcpclient.conf:
send host-name "deby01";
- If you experience issues with DNS you can set them manually (file /etc/dhcp/dhcpclient.conf)
prepend domain-name-servers 126.96.36.199, 188.8.131.52;
- Reboot in order to changes take effect or issue the following commands:
ifdown eth0 && ifup eth0
- Check your dynamically obtained ip address:
deby01:~# ifconfig eth0 | grep inet inet addr:192.168.10.41 ...
Thursday, November 25, 2010
The Dynamic Host Configuration Protocol (DHCP) is an auto configuration protocol used on IP networks. Before we proceed let assume the hostname we are going to setup is deby01.dev.local.