.. _example_service_dhcp-server_class: ##### Class ##### These scenarios show how to configure different options for classes in DHCP. These options are useful to give different addresses depending on who the clients are. ************************* Test DHCP-Server Class-ID ************************* Description =========== This scenario shows 2 options for these classes. You can configure the server with classes inside of the corresponding subnet or you can define it outside. If you define the class outside of the subnet, it will work for every subnet corresponding to the shared network. In any other case, it will works only for the corresponding subnet. The server has two classes, the first one is inside of the subnet and has the value testing1 in hexadecimal and the second one is outside and has the value in ascii testing2 (You can use ascii options in case you use an OSDx client and you chose the option vendor-class-identifier to send info). So, 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 tests 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 the leases received are from the corresponding class. Scenario ======== .. include:: class/testdhcp-serverclass-idvrf .. raw:: html
***************************** Test DHCP-Server Class RegExp ***************************** Description =========== This scenario tests different classes with regular expresions. For this case, the first class will match with identifiers that contain "valid" and has a digit after. So, the client identified with the value "valid" will not match with this class. The other class, will match with identifiers that contain "test" and after this, the identifier could have any characters. Scenario ======== .. include:: class/testdhcp-serverclassregexp .. raw:: html
********************************* Test DHCP-Server Invalid Class-ID ********************************* Description =========== This scenario set a valid configuration, but it will not work properly, because the client set an identifier with the value testing1, and the server set a different identifier, so the client will not get a lease. Scenario ======== .. include:: class/testdhcp-serverinvalidclass-id .. raw:: html
************************************** Test DHCP-Server Invalid Configuration ************************************** Description =========== This scenario set 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 corresponding with 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