User guide
Dynamic Host Configuration Protocol DHCP server
iMG/RG Software Reference Manual (System Administration)
5-2
The devices also support DHCP relay functionality. In this case the intelligent Multiservice Gateway picks up
DHCP requests sent by hosts connected to the internal interfaces, and forwards their requests to an external
DHCP server and then routes back to the hosts the replies that are received from the server.
5.1.2 DHCP server
The DHCP protocol allows a host that is unknown to the network administrator to be automatically assigned a
new IP address out of a pool of IP addresses for its network. In order for this to work, the network administra-
tor allocates address pools for each available subnet and enters them into the dhcpd.conf file.
On start-up, the DHCP server software reads the dhcpd.conf file and stores a list of available addresses on
each subnet. When a client requests an address using the DHCP protocol, the server allocates an address for
it.
Each client is assigned a lease, which expires after an amount of time chosen by the administrator (by default,
12 hours). Some time before the leases expire, the clients to which leases are assigned are expected to renew
them in order to continue to use the addresses. Once a lease has expired, the client to which that lease was
assigned is no longer permitted to use the leased IP address and must resort back to the DHCPDISCOVER
mechanism (see RFC 2131) to request a new lease.
In order to keep track of leases across system reboots and server restarts, the server keeps a list of leases it
has assigned in the dhcpd.leases file (stored in ISFS).
Before a lease is granted to a host, it records the lease in this file. Upon start-up, after reading the dhcpd.conf
file, the DHCP server reads the dhcpd.leases file to gain information about which leases had been assigned
before reboot.
New leases are appended to the end of the lease file.
In order to prevent the file from becoming arbitrarily large, the server periodically creates a new dhcp.leases
file from its lease database in memory.
If the system crashes in the middle of this process, only the lease file present in flash memory can be restored.
This gives a window of vulnerability whereby leases may be lost.
This server also provides BOOTP support. Unlike DHCP, the BOOTP protocol does not provide a protocol
for recovering dynamically assigned addresses once they are no longer needed. It is still possible to dynamically
assign addresses to BOOTP clients, but some administrative process for reclaiming addresses is required. By
default, leases are granted to BOOTP clients in perpetuity, although the network administrator may set an ear-
lier cut-off date or a shorter lease length for BOOTP leases if that makes sense.
5.1.2.1 Example
This paragraph provides a guide to configuring the DHCP server using commands available on the CLI.
Let's assuming that in the system there has been defined an internal interface (where the DHCP Server module
will run) with the following IP address and netmask:
192.168.219.1 255.255.255.