.. _example_service_dhcp-server_options_dns-options:
###########
Dns-Options
###########
These scenarios check DHCP server DNS and name resolution options.
This includes: dns-server, domain-name, and domain-search.
**********************
Test DNS-Server Single
**********************
Description
===========
This scenario checks the ``dns-server`` option with a single DNS server.
The DHCP server configures one DNS server, and the client receives it in the lease.
The client's /etc/resolv.conf should be updated with this nameserver.
Scenario
========
.. include:: dns-options/testdns-serversingle
.. raw:: html
************************
Test DNS-Server Multiple
************************
Description
===========
This scenario checks the ``dns-server`` option with multiple DNS servers.
The DHCP server configures three DNS servers, and the client receives all of them.
The servers should appear in the client's /etc/resolv.conf in the configured order.
Scenario
========
.. include:: dns-options/testdns-servermultiple
.. raw:: html
*******************
Test DNS-Server VRF
*******************
Description
===========
This scenario checks the ``dns-server`` option when the DHCP server is configured with VRF.
Multiple DNS servers are configured in a VRF environment, and the client receives them correctly.
Scenario
========
.. include:: dns-options/testdns-servervrf
.. raw:: html
****************
Test Domain-Name
****************
Description
===========
This scenario checks the ``domain-name`` option.
The DHCP server configures a domain name, and the client receives it in the lease.
The domain name should appear in the client's /etc/resolv.conf.
Scenario
========
.. include:: dns-options/testdomain-name
.. raw:: html
********************
Test Domain-Name VRF
********************
Description
===========
This scenario checks the ``domain-name`` option when the DHCP server is configured with VRF.
The domain name is configured in a VRF environment, and the client receives it correctly.
Scenario
========
.. include:: dns-options/testdomain-namevrf
.. raw:: html
**********************
Test Change DNS-Server
**********************
Description
===========
This scenario checks that DNS servers can be changed dynamically.
Configure initial DNS servers, then change them and verify the client receives the new values.
Scenario
========
.. include:: dns-options/testchangedns-server
.. raw:: html
***********************
Test Change Domain-Name
***********************
Description
===========
This scenario checks that the domain name can be changed dynamically.
Configure an initial domain name, then change it and verify the client receives the new value.
Scenario
========
.. include:: dns-options/testchangedomain-name
.. raw:: html
**********************
Test Remove DNS-Server
**********************
Description
===========
This scenario checks that DNS servers can be removed.
Configure DNS servers, then remove them and verify they are no longer sent to the client.
Scenario
========
.. include:: dns-options/testremovedns-server
.. raw:: html