.. _dhcp:

Configuring DHCP Server
=======================

The Dynamic Host Configuration Protocol (DHCP) is a standardized network
protocol used on IP networks. The DHCP is controlled by the Policy
Server/Sensor that dynamically distributes network configuration parameters,
such as IP addresses. You will be able to configure and manage the Built-In
DHCP Options and configure Policy Server/Sensor to utilize the three DHCP
Services. (Local, Remote, and Local & Remote)

If you need to make custom configuration changes to a Network Sensor that is
already in operation then you would use the  **System > Sensor > Sensor
Settings** option.

Depending on your requirements you have three options for DHCP. (**Local**,
**Remote**, and **Local & Remote**)

.. image:: /images/Genian-NAC-DHCP-Options-1.png
   :width: 700px

Configuring DHCP Services
-----------------------------

- :ref:`dhcp-networks-sensor`

Assign fixed IPs to devices
--------------------------------

Genian NAC supports fixed DHCP IP allocation to analyze many environments to support situations in which some devices in the DHCP environment need to have static IP allocation.

#. Go to **Management** in the top panel
#. Check the left side check box of the terminal to assign a static IP.
#. Click Select **Task** > IP/MAC Policie > Enable Conflict/Change Prevention

 - When you set conflict protection and change prevention, the IP is assigned only to the setup device.

Managing DHCP Leases
--------------------

It is a function to inquire and delete the DHCP IP assigned to the device by
the DHCP server. This feature is only available through the CLI(Command Line
Interface).

**Show DHCP Lease status**

.. code:: bash

   genian# show dhcp lease all
   IP Address      MAC               Expire              Interface
   --------------- ----------------- ------------------- -----------
   172.29.30.152   00:24:21:3D:65:C4 2018-08-06 20:10:13 eth0
   172.29.30.154   00:90:FB:26:7D:24 2018-08-06 19:10:24 eth0
   172.29.30.155   AC:3C:0B:3C:01:70 2018-08-06 20:10:21 eth0

**Clear DHCP Lease status**

.. code:: bash

   geinian# clear dhcp lease ip 172.29.30.152
   genian# show dhcp lease all
   IP Address      MAC               Expire              Interface
   --------------- ----------------- ------------------- -----------
   172.29.30.154   00:90:FB:26:7D:24 2018-08-06 19:10:24 eth0
   172.29.30.155   AC:3C:0B:3C:01:70 2018-08-06 20:10:21 eth0