beer9
asked on
Can we set hostname using the DHCP ?
Suppose I have modified my /etc/hosts and /etc/nodename as 'foo'
and at DHCP server my IP address bound to my MAC address and associated hostname is 'bar'
so when I request from DHCP for auto host configuration, will my hostname would be changed from 'foo' to 'bar' ??
and at DHCP server my IP address bound to my MAC address and associated hostname is 'bar'
so when I request from DHCP for auto host configuration, will my hostname would be changed from 'foo' to 'bar' ??
No, dhclient (The DHCP Client daemon) does not set your hostname to what it receives in a lease (by default).
If you want custom host names bound to specific IP's use an internal DNS server...
- add that server into the DHCP lease
- add the hosts into the DNS records
- add that server into the DHCP lease
- add the hosts into the DNS records
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
please see the file /etc/default/dhcpagent which contains some info in this regard and a parameter
ASKER
Thanks blu!