FreeBSD DHCP Set Hostname ( Empty Hostname After Reboot )

ht‮www//:spt‬.lautturi.com
FreeBSD DHCP Set Hostname ( Empty Hostname After Reboot )

If you are using the DHCP (Dynamic Host Configuration Protocol) service on a FreeBSD system and you are having trouble setting the hostname permanently, there are a few things you can try:

  1. Check the DHCP configuration: Make sure that the DHCP server is configured to set the hostname for the client. The DHCP server should send the hostname in the host-name option of the DHCP offer message.

  2. Check the client configuration: Make sure that the FreeBSD client is configured to use the hostname provided by the DHCP server. You can check the client configuration by looking at the file /etc/rc.conf. The hostname variable should be set to dhcp:

hostname="dhcp"
  1. Check the hostname script: The hostname of the FreeBSD system is set by the hostname script in the /etc/rc.d directory. Make sure that the script is executable and that it is being run at boot time. You can check the script by running the following command:
cat /etc/rc.d/hostname
  1. Check the DNS configuration: If the hostname is being set correctly but is not being resolved correctly after a reboot, there may be an issue with the DNS configuration. Make sure that the /etc/resolv.conf file is correct and that the nameservers listed in the file are reachable.
Created Time:2017-10-28 20:40:33  Author:lautturi