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.
Custom Options
Description
Verify custom DHCP options and vendor-encapsulated-options via extended-detail.
Scenario
Example 1
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.5Show 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: Mon Mar 23 21:20:03 2026 Reason: BOUND
Example 2
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.5Show 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: Mon Mar 23 21:20:09 2026 Reason: BOUND
Example 3
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.5Show 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: Mon Mar 23 21:20:15 2026 Reason: BOUND
Example 4
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.5Show 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: Mon Mar 23 21:20:21 2026 Reason: BOUND Vendor options: a:14:1e:28
Example 5
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.5Show 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: Mon Mar 23 21:20:27 2026 Reason: BOUND Vendor options: cisco-phone