Custom-Options

These scenarios test custom DHCP options and vendor-encapsulated-options. Custom options allow administrators to define non-standard DHCP options for vendor-specific configurations or custom network requirements.

Custom options can use: - Hex data: Raw hexadecimal values - ASCII data: Text strings - IP addresses: IPv4 address lists

Vendor-encapsulated-options (Option 43) allow vendor-specific data to be sent to clients, commonly used for IP phones, wireless controllers, and other specialized network equipment. Verification is done via the client extended-detail command to confirm the options are received and stored in monitoring-db.

Test Custom Option Hex Data

Description

This scenario tests custom DHCP options with hexadecimal data. Custom options use option codes 224-254 (private use range). Hexadecimal data is specified as colon-separated octets (e.g., 0a:0b:0c:0d). This is commonly used for vendor-specific binary configuration data. Verification is done via extended-detail to confirm the client receives and stores the option.

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 address 10.0.0.1/24
set service dhcp-server shared-network custom-hex subnet 10.0.0.0/24 options code 224 data hex '0a:0b:0c:0d'
set service dhcp-server shared-network custom-hex subnet 10.0.0.0/24 start 10.0.0.5 stop 10.0.0.5
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 address dhcp
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Run command interfaces ethernet eth0 show at DUT1 and check if output contains the following tokens:

10.0.0.5
Show output
-----------------------------------------------------------------
Name           IP Address           Admin  Oper  Vrf  Description
-----------------------------------------------------------------
eth0  10.0.0.5/24                   up     up
      fe80::dcad:beff:feef:6c10/64

Step 4: Run command service dhcp-client show leases extended-detail interface eth0 at DUT1 and expect this output:

Show output
Interface:         eth0
IP address:        10.0.0.5
Subnet mask:       255.255.255.0
Routers:
Name-servers:
Domain-name:
Domain-search:
NTP servers:
Time servers:
Time offset:
SMTP servers:
POP3 servers:
WINS servers:
TFTP server:
TFTP server addr:
Next server:
Bootfile name:
NIS domain:
NIS servers:
NIS+ domain:
NIS+ servers:
RFC3442 routes:
WPAD url:
Code 224:          a:b:c:d
DHCP server:       10.0.0.1
Lease time:        43200
Expiry date:       Fri Mar 06 08:16:03 2026
Reason:            BOUND

Test Custom Option ASCII Data

Description

This scenario tests custom DHCP options with ASCII string data. ASCII data is sent as text strings, automatically converted to hex by the DHCP server. This is useful for sending human-readable configuration strings like model numbers, firmware versions, or vendor-specific text parameters. Verification is done via extended-detail to confirm the client receives and stores the option.

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 address 10.0.0.1/24
set service dhcp-server shared-network custom-ascii subnet 10.0.0.0/24 options code 225 data ascii test-string
set service dhcp-server shared-network custom-ascii subnet 10.0.0.0/24 start 10.0.0.5 stop 10.0.0.5
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 address dhcp
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Run command interfaces ethernet eth0 show at DUT1 and check if output contains the following tokens:

10.0.0.5
Show output
-----------------------------------------------------------------
Name           IP Address           Admin  Oper  Vrf  Description
-----------------------------------------------------------------
eth0  10.0.0.5/24                   up     up
      fe80::dcad:beff:feef:6c10/64

Step 4: Run command service dhcp-client show leases extended-detail interface eth0 at DUT1 and expect this output:

Show output
Interface:         eth0
IP address:        10.0.0.5
Subnet mask:       255.255.255.0
Routers:
Name-servers:
Domain-name:
Domain-search:
NTP servers:
Time servers:
Time offset:
SMTP servers:
POP3 servers:
WINS servers:
TFTP server:
TFTP server addr:
Next server:
Bootfile name:
NIS domain:
NIS servers:
NIS+ domain:
NIS+ servers:
RFC3442 routes:
WPAD url:
Code 225:          test-string
DHCP server:       10.0.0.1
Lease time:        43200
Expiry date:       Fri Mar 06 08:16:12 2026
Reason:            BOUND

Test Custom Option IP Address

Description

This scenario tests custom DHCP options with IP address data. IP address options allow sending lists of IPv4 addresses for custom services or endpoints. Common uses include proprietary management servers, backup servers, or vendor-specific service IPs. Multiple IP addresses can be configured for redundancy. Verification is done via extended-detail to confirm the client receives and stores the option.

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 address 10.0.0.1/24
set service dhcp-server shared-network custom-ip subnet 10.0.0.0/24 options code 226 data ip-address 192.168.1.10
set service dhcp-server shared-network custom-ip subnet 10.0.0.0/24 options code 226 data ip-address 192.168.1.20
set service dhcp-server shared-network custom-ip subnet 10.0.0.0/24 start 10.0.0.5 stop 10.0.0.5
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 address dhcp
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Run command interfaces ethernet eth0 show at DUT1 and check if output contains the following tokens:

10.0.0.5
Show output
-----------------------------------------------------------------
Name           IP Address           Admin  Oper  Vrf  Description
-----------------------------------------------------------------
eth0  10.0.0.5/24                   up     up
      fe80::dcad:beff:feef:6c10/64

Step 4: Run command service dhcp-client show leases extended-detail interface eth0 at DUT1 and expect this output:

Show output
Interface:         eth0
IP address:        10.0.0.5
Subnet mask:       255.255.255.0
Routers:
Name-servers:
Domain-name:
Domain-search:
NTP servers:
Time servers:
Time offset:
SMTP servers:
POP3 servers:
WINS servers:
TFTP server:
TFTP server addr:
Next server:
Bootfile name:
NIS domain:
NIS servers:
NIS+ domain:
NIS+ servers:
RFC3442 routes:
WPAD url:
Code 226:          c0:a8:1:a:c0:a8:1:14
DHCP server:       10.0.0.1
Lease time:        43200
Expiry date:       Fri Mar 06 08:16:21 2026
Reason:            BOUND

Test Vendor Encapsulated Options Hex

Description

This scenario tests vendor-encapsulated-options (DHCP Option 43) with hex data. Option 43 is reserved for vendor-specific information and is commonly used by: - Cisco IP phones for TFTP server discovery - Aruba wireless controllers for AP provisioning - Microsoft WSUS servers for client configuration Hex data format allows sending binary vendor-specific payloads. Verification is done via extended-detail to confirm the client receives and stores the option.

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 address 10.0.0.1/24
set service dhcp-server shared-network vendor-hex subnet 10.0.0.0/24 options vendor-options data hex '0a:14:1e:28'
set service dhcp-server shared-network vendor-hex subnet 10.0.0.0/24 start 10.0.0.5 stop 10.0.0.5
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 address dhcp
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Run command interfaces ethernet eth0 show at DUT1 and check if output contains the following tokens:

10.0.0.5
Show output
-----------------------------------------------------------------
Name           IP Address           Admin  Oper  Vrf  Description
-----------------------------------------------------------------
eth0  10.0.0.5/24                   up     up
      fe80::dcad:beff:feef:6c10/64

Step 4: Run command service dhcp-client show leases extended-detail interface eth0 at DUT1 and expect this output:

Show output
Interface:         eth0
IP address:        10.0.0.5
Subnet mask:       255.255.255.0
Routers:
Name-servers:
Domain-name:
Domain-search:
NTP servers:
Time servers:
Time offset:
SMTP servers:
POP3 servers:
WINS servers:
TFTP server:
TFTP server addr:
Next server:
Bootfile name:
NIS domain:
NIS servers:
NIS+ domain:
NIS+ servers:
RFC3442 routes:
WPAD url:
DHCP server:       10.0.0.1
Lease time:        43200
Expiry date:       Fri Mar 06 08:16:30 2026
Reason:            BOUND
Vendor options:    a:14:1e:28

Test Vendor Encapsulated Options ASCII

Description

This scenario tests vendor-encapsulated-options with ASCII data. ASCII format is convenient when the vendor option contains text data like device identifiers, model names, or configuration strings. The DHCP server automatically converts ASCII to the hex format required by Option 43. Verification is done via extended-detail to confirm the client receives and stores the option.

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 address 10.0.0.1/24
set service dhcp-server shared-network vendor-ascii subnet 10.0.0.0/24 options vendor-options data ascii cisco-phone
set service dhcp-server shared-network vendor-ascii subnet 10.0.0.0/24 start 10.0.0.5 stop 10.0.0.5
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 address dhcp
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Run command interfaces ethernet eth0 show at DUT1 and check if output contains the following tokens:

10.0.0.5
Show output
-----------------------------------------------------------------
Name           IP Address           Admin  Oper  Vrf  Description
-----------------------------------------------------------------
eth0  10.0.0.5/24                   up     up
      fe80::dcad:beff:feef:6c10/64

Step 4: Run command service dhcp-client show leases extended-detail interface eth0 at DUT1 and expect this output:

Show output
Interface:         eth0
IP address:        10.0.0.5
Subnet mask:       255.255.255.0
Routers:
Name-servers:
Domain-name:
Domain-search:
NTP servers:
Time servers:
Time offset:
SMTP servers:
POP3 servers:
WINS servers:
TFTP server:
TFTP server addr:
Next server:
Bootfile name:
NIS domain:
NIS servers:
NIS+ domain:
NIS+ servers:
RFC3442 routes:
WPAD url:
DHCP server:       10.0.0.1
Lease time:        43200
Expiry date:       Fri Mar 06 08:16:39 2026
Reason:            BOUND
Vendor options:    cisco-phone