User guide
DHCP client Dynamic Host Configuration Protocol
5-7
iMG/RG Software Reference Manual (System Administration)
If you choose this mode, you must tell DHCP client how large an IP address lease pool you would like the new
server to have, and which IP interface you want the new DHCP server to bind to.
If you do not supply any interface information, the DHCP client will try to place the DHCP server on the first
LAN interface it finds (the DHCP client will regard an IP interface as being a LAN interface)
The new DHCP server’s address pool will start one IP address after the IP address of the interface upon which
the DHCP server has been set up. That is, if the DHCP client is configured to set up the DHCP server on an IP
interface named uplink, with address 192.168.219.2, the address range will commence from address
192.168.219.3.
At present, the new DHCP server will give out any DNS server addresses received by the DHCP client. It will
then advertise its own host IP address as being the default gateway.
To set this up via the CLI, the following command sequence can be used:
dhcpclient add interfaceconfig client1 ip0
dhcpclient interfaceconfig 1 add requested option domain-name-servers
dhcpclient set interfaceconfig client dhcpserverpoolsize 30
dhcpclient set interfaceconfig client1 dhcpserverinterface uplink
5.1.3.6 Example
This paragraph provides a guide to setting up a DHCP client using commands available in the CLI.
Let's assume that the system has been configured with an interface named eth0. The first step is to enable the
DHCP flag on this interface:
ip set interface eth0 dhcp enabled
DHCP client configuration is optional. You do not need to perform these steps unless you have special require-
ments, such as specifying whether the use of AutoIP is allowed, specific requirements for which options are to
be negotiated from a DHCP server, or specific requirements about what to do with option values when they are
received.
dhcpclient add interfaceconfig mycfg ip0
dhcpclient set interfaceconfig mycfg requestedleasetime 3600
dhcpclient set interfaceconfig mycfg clientid 00:20:2b:01:02:03
dhcpclient set interfaceconfig mycfg autoip enabled
dhcpclient set interfaceconfig mycfg givednstorelay enabled
dhcpclient interfaceconfig mycfg add requested option domain-name-
servers
dhcpclient interfaceconfig mycfg add required option routers
dhcpclient interfaceconfig mycfg add sent option host-name ’"galapa-
gos"’
These commands create a new DHCP client interface configuration related to the IP interface you defined ear-
lier. Let us consider, line by line, what the above configuration does: