2018年1月29日月曜日

Using Ubuntu 16.04 server with DHCP/Dynamic DNS system on FreeBSD 11

I run Ubuntu 16.04 server on FreeBSD bhyve. On this system, I found that default configuration of dhcp client of Ubuntu 16.04 did not resgister its hostname to DHCP/Dynamic DNS server on FreeBSD well.

When I searched this promblem with search engines, I found some configurations. I added following setting to my dhcpclient.conf, 
$ cat /etc/dhcp/dhclient.conf 

send dhcp-lease-time 600;


$
But this setting is not stable at first. After rebooting, and on next day, I can sea the hostname via dynamic dns.

I also refferd following blogs. But unfortunately, these settings were not effective for my configuration.
DHCPで立てた社内サーバにマシン名でアクセスできるようにする
http://cs.hatenablog.jp/entry/2014/01/31/104605


ドメインがexmaple.comでマシン名がmyhostだったら、dhclientの設定ファイルに次の設定を加えます。
send fqdn.fqdn "myhost.example.com";
send fqdn.server-update on;


dhcpでにホスト名を自動登録する
http://d.hatena.ne.jp/pekeq/20081201/p1


/etc/dhclient-eth0.conf を編集して以下を追記する。
send fqdn.fqdn "example.pekeq.com.";
send fqdn.encoded false;
send fqdn.server-update on;

追記
なんか動きが違うなぁ。ソース見ないとなんともわからんかも。