Advisor
This scenario checks that the advisor DHCP functions operate correctly.
Test DHCP Server Advisor
Description
This scenario configures and checks that an advisor
for the DHCP-server works correctly.
First, you should configure at least one server (for this scenario, there are 2).
Then configure the alarm and the advisor linked to the alarm and the server.
Alarms are configured as false by default, meaning 'not al'
will be true.
The advisor will then become true and the process will start running.
Next, the value of the advisor is changed to 'al'
, so the process will not be running.
Finally, the advisor returns to its previous value, so the process will be running.
Scenario
Step 1: Set the following configuration in DUT0
:
set interfaces ethernet eth0 address 10.0.0.1/24 set interfaces ethernet eth0 vif 100 address 11.0.0.1/24 set service dhcp-server shared-network dhcp advisor adv set service dhcp-server shared-network dhcp subnet 10.0.0.0/24 start 10.0.0.5 stop 10.0.0.5 set service dhcp-server shared-network dhcp-2 advisor adv set service dhcp-server shared-network dhcp-2 subnet 11.0.0.0/24 start 11.0.0.5 stop 11.0.0.5 set system advisor adv test 'not al' set system alarm al set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: Run command system processes show | grep dhcpd
at DUT0
and check if output contains the following tokens:
/usr/sbin/dhcpdShow output
471961 ? Ss 0:00 /usr/sbin/dhcpd -f -q -pf /run/dhcpd_main.pid -cf /etc/dhcp/dhcpd_main.conf -lf /config/dhcpd_main.leases eth0.100 eth0 471986 ttyS0 S+ 0:00 sh -c set -- system processes show; declare -x -r LESSSECURE=1; (ps ax ) |& grep dhcpd 471988 ttyS0 S+ 0:00 grep dhcpd
Step 3: Modify the following configuration lines in DUT0
:
set system advisor adv test al
Step 4: Run command system processes show | grep dhcpd
at DUT0
and check if output does not contain the following tokens:
/usr/sbin/dhcpdShow output
472015 ttyS0 S+ 0:00 sh -c set -- system processes show; declare -x -r LESSSECURE=1; (ps ax ) |& grep dhcpd 472017 ttyS0 S+ 0:00 grep dhcpd
Step 5: Modify the following configuration lines in DUT0
:
set system advisor adv test 'not al'
Step 6: Run command system processes show | grep dhcpd
at DUT0
and check if output contains the following tokens:
/usr/sbin/dhcpdShow output
472044 ? Ss 0:00 /usr/sbin/dhcpd -f -q -pf /run/dhcpd_main.pid -cf /etc/dhcp/dhcpd_main.conf -lf /config/dhcpd_main.leases eth0.100 eth0 472047 ttyS0 S+ 0:00 sh -c set -- system processes show; declare -x -r LESSSECURE=1; (ps ax ) |& grep dhcpd 472049 ttyS0 S+ 0:00 grep dhcpd