Riaan's SysAdmin Blog

My tips, howtos, gotchas, snippets and stuff. Use at your own risk!


Unify gateway DHCP domain name for DNS settings

Quick notes on how I manually added a domain name to my Unify gateway DHCP server.

$ cat 20170304-unify_GW_DHCP_set_domain
$ ssh admin@
Welcome to EdgeOS

By logging in, accessing, or using the Ubiquiti product, you
acknowledge that you have read and understood the Ubiquiti
License Agreement (available in the Web UI at, by default, and agree to be bound by its terms.

admin@'s password: 
Linux myGW 3.10.20-UBNT #1 SMP Tue Nov 1 17:17:25 PDT 2016 mips64
Welcome to EdgeOS
admin@myGW:~$ info

Model:       UniFi-Gateway-3
MAC Address: xx:xx:xx:xx:xx:xx
IP Address:  x.x.x.x
Hostname:    myGW
Uptime:      5881438 seconds

Status:      Connected (http://mynetcontroller.mydomain.com:8080/inform)

admin@myGW:~$ configure 
admin@myGW# show service dhcp-server 
 disabled false
 hostfile-update enable
 shared-network-name LAN_192.168.1.0-24 {
     authoritative enable
     description vlan1
     subnet {
         lease 86400
         start {
admin@myGW# edit service dhcp-server shared-network-name LAN_192.168.1.0-24
[edit service dhcp-server shared-network-name LAN_192.168.1.0-24]
admin@myGW# edit subnet
[edit service dhcp-server shared-network-name LAN_192.168.1.0-24 subnet]
admin@myGW# set domain-name localdomain
[edit service dhcp-server shared-network-name LAN_192.168.1.0-24 subnet]
admin@myGW# top
admin@myGW# commit
[ service dhcp-server ]
Stopping DHCP server daemon...
Starting DHCP server daemon...


Bio Info for Riaan