User guide

DHCP server Dynamic Host Configuration Protocol
5-3
iMG/RG Software Reference Manual (System Administration)
The following DHCP server configuration will create a range of 10 available IP addresses in the 19.168.219.0
subnet:
dhcpserver add subnet mysubnet 192.168.219.0 255.255.255.0
192.168.219.10 192.168.219.20
dhcpserver set subnet mysubnet defaultleasetime 1800
dhcpserver set subnet mysubnet maxleasetime 86000
dhcpserver subnet mysubnet add option domain-name-servers
192.168.220.30
dhcpserver subnet mysubnet add option routers 192.168.221.40
dhcpserver subnet mysubnet add option irc-server 10.5.7.20
dhcpserver subnet mysubnet add option auto-configure 1
Default lease time and maximum lease time are set to 1800 seconds and 86000 seconds, respectively.
Four DHCP options are configured, in addition to the usual IP address and subnet mask:
DNS server address of 192.168.220.30;
Default gateway address of 192.168.221.40;
IRC server address of 10.5.7.20;
And the auto-configure option, which will allow use of address auto-configuration by clients on the net-
work.
Instead of specifying the domain-name-servers and routers options manually, the following commands could
have been used which provide automatic values for these options:
dhcpserver set subnet mysubnet hostisdnsserver enabled
dhcpserver set subnet mysubnet hostisdefaultgateway enabled
This will result in the DHCP server taking the IP address of the IP interface it is running on, and supplying that
address to DHCP clients as the DNS server and default gateway, respectively. This is especially useful in a
deployment that utilizes the DNS relay on the residential gateway.
Note: Note that for DHCP clients using DHCPINFORM, the above declarations mean that the server would
supply the given configuration options to any client that is on the 192.168.219.x subnet. This even
includes clients that are not included in the available address ranges – this is sensible, since ideally the
DHCP server should not have addresses available to give out that may already belong to hosts on the
same subnet.
The CLI can also be used to define fixed host/IP address mappings. For example, the command:
dhcpserver add fixedhost myhost 192.168.219.5 00:20:2b:01:02:03
Will add a fixed mapping of the IP address 192.168.219.5 to a host whose ethernet MAC address is
00:20:2b:01:02:03.
Note: Note that fixed IP mappings cannot overlap with dynamic IP ranges on a subnet, and vice-versa (you will
receive an error message if you try to do this).