Time-Options

These scenarios check DHCP server time synchronization options. This includes: ntp-server, time-server, and time-offset. Verification is done via the hidden extended-detail command to confirm the client correctly received the options.

Time Options

Description

Verify time synchronization 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 ntp-single subnet 10.0.0.0/24 options ntp-server 10.0.0.10
set service dhcp-server shared-network ntp-single 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 the command interfaces ethernet eth0 show on DUT1 and check whether the 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 the command service dhcp-client show leases extended-detail interface eth0 on DUT1 and expect the following 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:       10.0.0.10
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:       Thu Jun 04 04:44:54 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 ntp-multiple subnet 10.0.0.0/24 options ntp-server 10.0.0.10
set service dhcp-server shared-network ntp-multiple subnet 10.0.0.0/24 options ntp-server 10.0.0.11
set service dhcp-server shared-network ntp-multiple subnet 10.0.0.0/24 options ntp-server 10.0.0.12
set service dhcp-server shared-network ntp-multiple 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 the command interfaces ethernet eth0 show on DUT1 and check whether the 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 the command service dhcp-client show leases extended-detail interface eth0 on DUT1 and expect the following 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:       10.0.0.10
                   10.0.0.11
                   10.0.0.12
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:       Thu Jun 04 04:45:02 2026
Reason:            BOUND

Step 5: Run the command service dhcp-client show leases extended-detail interface eth0 on DUT1 and expect the following 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:       10.0.0.10
                   10.0.0.11
                   10.0.0.12
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:       Thu Jun 04 04:45:02 2026
Reason:            BOUND

Step 6: Run the command service dhcp-client show leases extended-detail interface eth0 on DUT1 and expect the following 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:       10.0.0.10
                   10.0.0.11
                   10.0.0.12
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:       Thu Jun 04 04:45:02 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 time-single subnet 10.0.0.0/24 options time-server 10.0.0.20
set service dhcp-server shared-network time-single 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 the command interfaces ethernet eth0 show on DUT1 and check whether the 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 the command service dhcp-client show leases extended-detail interface eth0 on DUT1 and expect the following 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:       10.0.0.20
Time servers:      10.0.0.20
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:       Thu Jun 04 04:45:09 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 time-multiple subnet 10.0.0.0/24 options time-server 10.0.0.20
set service dhcp-server shared-network time-multiple subnet 10.0.0.0/24 options time-server 10.0.0.21
set service dhcp-server shared-network time-multiple 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 the command interfaces ethernet eth0 show on DUT1 and check whether the 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 the command service dhcp-client show leases extended-detail interface eth0 on DUT1 and expect the following 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:       10.0.0.20
                   10.0.0.21
Time servers:      10.0.0.20
                   10.0.0.21
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:       Thu Jun 04 04:45:16 2026
Reason:            BOUND

Step 5: Run the command service dhcp-client show leases extended-detail interface eth0 on DUT1 and expect the following 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:       10.0.0.20
                   10.0.0.21
Time servers:      10.0.0.20
                   10.0.0.21
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:       Thu Jun 04 04:45:16 2026
Reason:            BOUND

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 time-offset subnet 10.0.0.0/24 options time-offset 3600
set service dhcp-server shared-network time-offset 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 the command interfaces ethernet eth0 show on DUT1 and check whether the 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 the command service dhcp-client show leases extended-detail interface eth0 on DUT1 and expect the following 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:       3600
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:       Thu Jun 04 04:45:23 2026
Reason:            BOUND

Example 6

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 address 10.0.0.1/24
set service dhcp-server shared-network time-combined subnet 10.0.0.0/24 options ntp-server 10.0.0.10
set service dhcp-server shared-network time-combined subnet 10.0.0.0/24 options ntp-server 10.0.0.11
set service dhcp-server shared-network time-combined subnet 10.0.0.0/24 options time-offset 3600
set service dhcp-server shared-network time-combined subnet 10.0.0.0/24 options time-server 10.0.0.20
set service dhcp-server shared-network time-combined 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 the command interfaces ethernet eth0 show on DUT1 and check whether the 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 the command service dhcp-client show leases extended-detail interface eth0 on DUT1 and expect the following 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:       10.0.0.10
                   10.0.0.11
Time servers:      10.0.0.20
Time offset:       3600
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:       Thu Jun 04 04:45:31 2026
Reason:            BOUND

Step 5: Run the command service dhcp-client show leases extended-detail interface eth0 on DUT1 and expect the following 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:       10.0.0.10
                   10.0.0.11
Time servers:      10.0.0.20
Time offset:       3600
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:       Thu Jun 04 04:45:31 2026
Reason:            BOUND

Step 6: Run the command service dhcp-client show leases extended-detail interface eth0 on DUT1 and expect the following 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:       10.0.0.10
                   10.0.0.11
Time servers:      10.0.0.20
Time offset:       3600
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:       Thu Jun 04 04:45:31 2026
Reason:            BOUND

Step 7: Run the command service dhcp-client show leases extended-detail interface eth0 on DUT1 and expect the following 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:       10.0.0.10
                   10.0.0.11
Time servers:      10.0.0.20
Time offset:       3600
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:       Thu Jun 04 04:45:31 2026
Reason:            BOUND

Time VRF Options

Description

Verify time options with VRF configuration.

Scenario

Example 1

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 address 10.0.0.1/24
set interfaces ethernet eth0 vrf VRF0
set service dhcp-server shared-network ntp-vrf local-vrf VRF0
set service dhcp-server shared-network ntp-vrf subnet 10.0.0.0/24 options ntp-server 10.0.0.10
set service dhcp-server shared-network ntp-vrf subnet 10.0.0.0/24 options ntp-server 10.0.0.11
set service dhcp-server shared-network ntp-vrf 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'
set system vrf VRF0

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 the command interfaces ethernet eth0 show on DUT1 and check whether the 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 the command service dhcp-client show leases extended-detail interface eth0 on DUT1 and expect the following 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:       10.0.0.10
                   10.0.0.11
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:       Thu Jun 04 04:45:45 2026
Reason:            BOUND

Step 5: Run the command service dhcp-client show leases extended-detail interface eth0 on DUT1 and expect the following 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:       10.0.0.10
                   10.0.0.11
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:       Thu Jun 04 04:45:45 2026
Reason:            BOUND

Example 2

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 address 10.0.0.1/24
set interfaces ethernet eth0 vrf VRF0
set service dhcp-server shared-network time-vrf local-vrf VRF0
set service dhcp-server shared-network time-vrf subnet 10.0.0.0/24 options time-server 10.0.0.20
set service dhcp-server shared-network time-vrf 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'
set system vrf VRF0

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 the command interfaces ethernet eth0 show on DUT1 and check whether the 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 the command service dhcp-client show leases extended-detail interface eth0 on DUT1 and expect the following 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:       10.0.0.20
Time servers:      10.0.0.20
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:       Thu Jun 04 04:45:53 2026
Reason:            BOUND

Example 3

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 address 10.0.0.1/24
set interfaces ethernet eth0 vrf VRF0
set service dhcp-server shared-network time-offset-vrf local-vrf VRF0
set service dhcp-server shared-network time-offset-vrf subnet 10.0.0.0/24 options time-offset 3600
set service dhcp-server shared-network time-offset-vrf 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'
set system vrf VRF0

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 the command interfaces ethernet eth0 show on DUT1 and check whether the 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 the command service dhcp-client show leases extended-detail interface eth0 on DUT1 and expect the following 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:       3600
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:       Thu Jun 04 04:46:00 2026
Reason:            BOUND

Time Change Options

Description

Verify time options can be changed dynamically.

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 ntp-single subnet 10.0.0.0/24 options ntp-server 10.0.0.10
set service dhcp-server shared-network ntp-single 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 the command interfaces ethernet eth0 show on DUT1 and check whether the 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 the command service dhcp-client show leases extended-detail interface eth0 on DUT1 and expect the following 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:       10.0.0.10
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:       Thu Jun 04 04:46:13 2026
Reason:            BOUND

Step 5: Modify the following configuration lines in DUT0 :

set service dhcp-server shared-network ntp-single subnet 10.0.0.0/24 options ntp-server 10.0.0.11

Step 6: Run the command service dhcp-client renew interface eth0 on DUT1 and expect the following output:

Show output
Renewing DHCP lease on interface eth0...

Step 7: Run the command service dhcp-client show leases extended-detail interface eth0 on DUT1 and expect the following 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:       10.0.0.10
                   10.0.0.11
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:        43197
Expiry date:       Thu Jun 04 04:46:12 2026
Reason:            REBOOT

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 time-offset subnet 10.0.0.0/24 options time-offset 3600
set service dhcp-server shared-network time-offset 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 the command interfaces ethernet eth0 show on DUT1 and check whether the 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 the command service dhcp-client show leases extended-detail interface eth0 on DUT1 and expect the following 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:       3600
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:       Thu Jun 04 04:46:21 2026
Reason:            BOUND

Step 5: Modify the following configuration lines in DUT0 :

set service dhcp-server shared-network time-offset subnet 10.0.0.0/24 options time-offset 7200

Step 6: Run the command service dhcp-client renew interface eth0 on DUT1 and expect the following output:

Show output
Renewing DHCP lease on interface eth0...

Step 7: Run the command service dhcp-client show leases extended-detail interface eth0 on DUT1 and expect the following 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:       7200
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:        43197
Expiry date:       Thu Jun 04 04:46:21 2026
Reason:            REBOOT

Time Remove Options

Description

Verify time options can be removed.

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 ntp-multiple subnet 10.0.0.0/24 options ntp-server 10.0.0.10
set service dhcp-server shared-network ntp-multiple subnet 10.0.0.0/24 options ntp-server 10.0.0.11
set service dhcp-server shared-network ntp-multiple subnet 10.0.0.0/24 options ntp-server 10.0.0.12
set service dhcp-server shared-network ntp-multiple 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 the command interfaces ethernet eth0 show on DUT1 and check whether the 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 the command service dhcp-client show leases extended-detail interface eth0 on DUT1 and expect the following 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:       10.0.0.10
                   10.0.0.11
                   10.0.0.12
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:       Thu Jun 04 04:46:34 2026
Reason:            BOUND

Step 5: Modify the following configuration lines in DUT0 :

delete service dhcp-server shared-network ntp-multiple subnet 10.0.0.0/24 options

Step 6: Run the command service dhcp-client renew interface eth0 on DUT1 and expect the following output:

Show output
Renewing DHCP lease on interface eth0...

Step 7: Run the command service dhcp-client show leases extended-detail interface eth0 on DUT1 and expect the following 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:        43197
Expiry date:       Thu Jun 04 04:46:34 2026
Reason:            REBOOT