CL Command Reference - CHGDHCPA

CL Command List > CHGDHCPA Reference

Description:

(CHGDHCPA) Use this command to set or change the DHCP Server Attributes: AUTOSTART and MODE The changes take effect the next time the DHCP server is started.

Restriction: You must have *IOSYSCFG special authority to use this command.


Examples:

Example 1: Start the DHCP Server automatically

CHGDHCPA AUTOSTART(*YES)

This command indicates that the next time the STRTCP command is issued to start up TCP/IP and to automatically start the TCP/IP applications, the DHCP Server will be started automatically.



Example 2: Have DHCP Function as a BOOTP/DHCP Relay Agent

CHGDHCPA AUTOSTART(*SAME) MODE(*RELAY)

This command indicates that the next time the DHCP Server gets started, it should function as a BOOTP/DHCP Relay Agent. It will no longer attempt to process DHCP packets on the local system, but will instead relay them. If DHCP is currently running, this command has no affect on its current execution mode, since CHGDHCPA attributes do not take affect until the next time the server is started. The autostart attribute is not changed.



Example 3: Only allow DHCP Server to be Started Manually

CHGDHCPA AUTOSTART(*NO) MODE(*SERVER)

This command indicates that the DHCP Server should not be started automatically with the rest of TCP/IP when the STRTCP command is issued. It can only be started manually via the STRTCPSVR command. Via the MODE setting of *SERVER, this example is also causing the DHCP server to attempt to process all DHCP packets received on this system.