{"id":1377,"date":"2013-01-05T05:31:50","date_gmt":"2013-01-05T03:31:50","guid":{"rendered":"http:\/\/raftaman.net\/?p=1377"},"modified":"2021-05-15T11:46:38","modified_gmt":"2021-05-15T09:46:38","slug":"how-to-send-a-clients-hostname-to-the-dhcp-server","status":"publish","type":"post","link":"https:\/\/possiblelossofprecision.net\/?p=1377","title":{"rendered":"How to send a client&#8217;s hostname to the DHCP server"},"content":{"rendered":"<p>In contrast to Ubuntu (or even Microsoft Windows) default installations of Fedora do not send the client&#8217;s hostname to the DHCP server.<\/p>\n<p>To change this behaviour, add a <strong><code>DHCP_HOSTNAME<\/code><\/strong> variable to your <strong><code>\/etc\/sysconfig\/network-scripts\/ifcfg-eth0<\/code><\/strong> file (<code>eth0<\/code> being your NIC&#8217;s interface name):<\/p>\n<pre class=\"brush: plain; highlight: [5]; title: ; notranslate\" title=\"\">\r\nUUID=&quot;616426f3-ac0b-4a4a-9221-62a0055bfb07&quot;\r\nNM_CONTROLLED=&quot;yes&quot;\r\nNETBOOT=&quot;yes&quot;\r\nBOOTPROTO=&quot;dhcp&quot;\r\nDHCP_HOSTNAME=&quot;MyFedoraBox&quot;\r\nDEVICE=&quot;eth0&quot;\r\nTYPE=&quot;Ethernet&quot;\r\nONBOOT=yes\r\nNAME=&quot;DHCP&quot;\r\nHWADDR=00:25:22:4A:3F:F2\r\nDEFROUTE=yes\r\nPEERDNS=yes\r\nPEERROUTES=yes\r\nIPV4_FAILURE_FATAL=yes\r\nIPV6INIT=no\r\nUSERS=user\r\n<\/pre>\n<p>Of course, this only works if you actually get your IP address via DHCP (since the DHCP server hands off the hostname to the DNS server). If you use a static IP configuration, <code>nsupdate<\/code> can be used to dynamically update the DNS server records. Examples and instructions on how to use <code>nsupdate<\/code> can be found at <a href=\"http:\/\/linux.yyz.us\/nsupdate\/\">http:\/\/linux.yyz.us\/nsupdate\/<\/a> or <a href=\"http:\/\/dijks.wordpress.com\/2012\/07\/17\/register-a-hostnames-static-ip-with-your-corporate-dns-server\/\">http:\/\/dijks.wordpress.com\/2012\/07\/17\/register-a-hostnames-static-ip-with-your-corporate-dns-server\/<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In contrast to Ubuntu (or even Microsoft Windows) default installations of Fedora do not send the client&#8217;s hostname to the DHCP server. To change this behaviour, add a DHCP_HOSTNAME variable to your \/etc\/sysconfig\/network-scripts\/ifcfg-eth0 file (eth0 being your NIC&#8217;s interface name): UUID=&quot;616426f3-ac0b-4a4a-9221-62a0055bfb07&quot; NM_CONTROLLED=&quot;yes&quot; NETBOOT=&quot;yes&quot; BOOTPROTO=&quot;dhcp&quot; DHCP_HOSTNAME=&quot;MyFedoraBox&quot; DEVICE=&quot;eth0&quot; TYPE=&quot;Ethernet&quot; ONBOOT=yes NAME=&quot;DHCP&quot; HWADDR=00:25:22:4A:3F:F2 DEFROUTE=yes PEERDNS=yes PEERROUTES=yes IPV4_FAILURE_FATAL=yes IPV6INIT=no USERS=user Of course, this only&#8230; <a href=\"https:\/\/possiblelossofprecision.net\/?p=1377\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[53,63,7],"class_list":["post-1377","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-dhcp","tag-dns","tag-fedora"],"_links":{"self":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts\/1377","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1377"}],"version-history":[{"count":12,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts\/1377\/revisions"}],"predecessor-version":[{"id":1661,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts\/1377\/revisions\/1661"}],"wp:attachment":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1377"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1377"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1377"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}