DHCP Hostname Entry in DNS

From SlackWiki
Jump to: navigation, search


I have a Windows server that runs both the DNS server and DHCP server for my network. When I added a Slackware box, I needed the Windows server to update DNS when the slack box obtained a DHCP lease. Windows was already setup to do this, but the default slack install didn't send the correct information for the Windows DHCP server to setup the DNS A record. Here is what I did to get slack to work:

First, slack uses dhcpcd for a dhcp client. Looking through the options and testing revealed that all I needed to do was send a:

-h [hostname]

with the dhcpcd command. In order to get slack to do this, I had to edit:

/etc/rc.d/rc.inet1.conf

and set:

DHCP_HOSTNAME[0]=[hostname]

then:

/etc/rc.d/rc.inet1 restart

and everything worked!