.. _example_service_dhcp-server_options:
#######
Options
#######
These scenarios check the functionality of different options in DHCP server.
*************************
Test One Lease Per Client
*************************
Description
===========
This scenario checks ``one-lease-per-client`` option. For this scenario you need
two active leases at the same time. First you check that these leases are active and then, activate
this option and check that there aren't two leases at the same time for the same client (same MAC address).
Scenario
========
.. include:: options/testoneleaseperclient
.. raw:: html
*****************************
Test One Lease Per Client VRF
*****************************
Description
===========
This scenario checks ``one-lease-per-client`` option for DHCP-server but it is configured with VRF instead of regular interfaces.
First this scenario checks there are 2 leases for the same client at the same time and then enable the option and check there are not
two leases active at the same time for the same client.
Scenario
========
.. include:: options/testoneleaseperclientvrf
.. raw:: html
******************
Test Authoritative
******************
Description
===========
This scenario checks ``authoritative`` option. First you need to configure a DHCP server without the option enabled and give a lease to the client.
Then change the configuration of the server for another subnet. The client will renew his lease and see a problem, the new server is not in the same subnet and it is not authorized to give a lease.
Finally, if you enable the option and renew the interface, you will see the server is authorized and it can give the lease to the client.
Scenario
========
.. include:: options/testauthoritative
.. raw:: html
**********************
Test Authoritative VRF
**********************
Description
===========
This scenario checks ``authoritative`` option but 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. In addition, renew the interfaces and you will see the server cannot. 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