.. _example_service_dhcp-server_options:
#######
Options
#######
These scenarios check the functionality of different DHCP server options.
*************************
Test One Lease Per Client
*************************
Description
===========
This scenario checks the ``one-lease-per-client`` option. In this scenario, you need
two active leases at the same time. First, check those leases are active and then activate
this option and check that no two leases belonging to the same client (same MAC address) are active at the same time.
Scenario
========
.. include:: options/testoneleaseperclient
.. raw:: html
*****************************
Test One Lease Per Client VRF
*****************************
Description
===========
This scenario checks the ``one-lease-per-client`` option for DHCP-server, but it is configured with VRF instead of regular interfaces.
It first checks whether there are 2 simultaneous leases for the same client. When the option is enabled, it checks there are no
two active leases for the same client at the same time.
Scenario
========
.. include:: options/testoneleaseperclientvrf
.. raw:: html
******************
Test Authoritative
******************
Description
===========
This scenario checks the ``authoritative`` option. First, you need to configure a DHCP server without enabling the option and give a lease to the client.
Then, change the configuration of the server for another subnet. The client will refresh his lease and see a problem: the new server is not in the same subnet and is not authorized to give a lease.
Finally, if you enable the option and refresh the interface, you will see the server is authorized and can provide the lease to the client.
Scenario
========
.. include:: options/testauthoritative
.. raw:: html
**********************
Test Authoritative VRF
**********************
Description
===========
This scenario checks the ``authoritative`` option when the server is configured with VRF instead of regular interfaces. First, configure the server and give a lease to the client.
Then, change the configuration of the server and put it on a different subnet. Refresh the interfaces and you will see the server cannot do it. Change the configuration again and add the ``authoritative`` option.
With this change, the server will be able to give a lease to the client.
Scenario
========
.. include:: options/testauthoritativevrf
.. raw:: html