.. _example_service_dhcp-server_class: ##### Class ##### These scenarios show how to configure different class options in DHCP. These options are useful to provide different addresses, depending on who the clients are. ************************* Test DHCP-Server Class-ID ************************* Description =========== This scenario shows 2 class options. You can configure the server so that classes are inside or outside the corresponding subnet. If you define the class outside of the subnet, it will work for every subnet that is part of the shared network. Otherwise, it will only work for the corresponding subnet. The server has two classes: the first one is inside of the subnet and has testing1 as an hexadecimal value, and the second one is outside the subnet and uses ascii value testing2. You can use the ascii option if you are an OSDx client and choose the vendor-class-identifier option to send info. This scenario will check that the IP addresses received are from the right class. Scenario ======== .. include:: class/testdhcp-serverclass-id .. raw:: html
***************************** Test DHCP-Server Class-ID VRF ***************************** Description =========== This scenario checks that everything works properly if you use VRF instead of regular interfaces. This scenario configures 2 classes (one inside the shared network and another inside the subnet) and checks that the leases received correspond to each class. Scenario ======== .. include:: class/testdhcp-serverclass-idvrf .. raw:: html
***************************** Test DHCP-Server Class RegExp ***************************** Description =========== This scenario tests different classes with regular expresions. In this case, the first class will match identifiers that contain the term "valid" followed by a digit. As a result, the client identified as "valid" will not match this class. The other class will match identifiers that contain the word "test" followed by any characters. Scenario ======== .. include:: class/testdhcp-serverclassregexp .. raw:: html
********************************* Test DHCP-Server Invalid Class-ID ********************************* Description =========== This scenario sets a valid configuration, but will not work properly because the client has set an identifier using the testing1 value and the server has set a different identifier. As a result, the client will not get a lease. Scenario ======== .. include:: class/testdhcp-serverinvalidclass-id .. raw:: html
************************************** Test DHCP-Server Invalid Configuration ************************************** Description =========== This scenario sets an invalid configuration because there is no match between the classes configured. Scenario ======== .. include:: class/testdhcp-serverinvalidconfiguration .. raw:: html
************************* Test DHCP-Server Base-Mac ************************* Description =========== This scenario configures a class that matches the value of the base-mac sent by the client and checks that the client receives the corresponding lease. Scenario ======== .. include:: class/testdhcp-serverbase-mac .. raw:: html