Thursday, June 28, 2012

How to Enable a DHCPv4 Client to Request a Specific Host Name




  1. On the client system, edit the /etc/default/dhcpagent file as superuser.
  2. Find the REQUEST_HOSTNAME keyword in the /etc/default/dhcpagent file and modify the keyword as follows:
    REQUEST_HOSTNAME=yes
    If a comment sign (#) is in front of REQUEST_HOSTNAME, remove the #. If the REQUEST_HOSTNAME keyword is not present, insert the keyword.
  3. Edit the /etc/hostname.interface file on the client system to add the following line:inet hostnamehostname is the name that you want the client to use.
  4. Type the following commands to have the client perform a full DHCP negotiation upon rebooting:
    # ifconfig interface dhcp release
    # reboot
    The DHCP data that is cached on the client is removed. The client restarts the protocol to request new configuration information, including a new host name. The DHCP server first makes sure that the host name is not in use by another system on the network. The server then assigns the host name to the client. If configured to do so, the DHCP server can update name services with the client's host name.

No comments:

Post a Comment