In DHCP, the server assigns an IP address and other configuration parameters to a client for a limited period of time. This period of time is called the lease. The lease is valid for the period you configure on the vRouter or until the client explicitly relinquishes the address.
To use the DHCP service, you define a pool of IP addresses for each subnet assigned by the DHCP server. Each DHCP address pool is mapped to a subnet associated with the system. For each address pool, you can specify the length of time an address is valid (its lease duration). The default lease duration is 24 hours. You can also specify a number of different servers (for example DNS, WINS, SMTP, and others) that are available to clients on the subnet.
To create an IP address pool for clients on a subnet to which the router is not directly connected (that is, without having an interface into that network), you can use service dhcp-server listento interface <dp-interface>. See Configuring for networks indirectly connected to the system.
You can statically map an IP address to the MAC address of a device. The DHCP service listens on UDP port 67 for lease requests from DHCP clients. The request packet allows the system to determine the interface on which the client is located. It then assigns an IP address from the appropriate pool and binds it to the client.
In addition to providing a DHCP server, individual interfaces on the vRouter can be configured as DHCP clients. For details, see the vRouter documentation for the interface you are interested in configuring as a DHCP client.
The vRouter also supports DHCP relay.
A DHCP relay agent receives DHCP packets from DHCP clients and forwards them to a DHCP server. This allows you to place DHCP clients and DHCP servers on different networks; that is, across router interfaces.
The relay agent is configured with addresses of DHCP servers to which they should relay client DHCP message. The relay agent intercepts the broadcast, sets the gateway address (the giaddr field of the DHCP packet) and, if configured, inserts the Relay Agent Information option (option 82) in the packet and forwards it to the DHCP server.
The DHCP server echoes the option back verbatim to the relay agent in server-to-client replies, and the relay agent strips the option before forwarding the reply to the client.