Chapter 1 What’s New for FortiOS 5.0 : Other new features : FortiGate Auto-config using DHCP
  
FortiGate Auto-config using DHCP
FortiOS 5.0 supports uploading a configuration file from a TFTP server to the FortiGate unit to automatically configure the FortiGate unit with one simple step. Similar to an auto-configuration feature used for VoIP phones, you can store the domain name or IP address of a TFTP server and a configuration file name in your DHCP server configuration.
DHCP option 66 is used for the TFTP server domain name (RFC 2132)
DHCP option 67 is used for the configuration file name (RFC 2132)
For example, to use auto-configuration to configure a FortiGate unit, add the TFTP server information and configuration file name to your DHCP server. Make sure the TFTP server is running and includes the configuration file. Then, from the CLI of the FortiGate unit to be auto-configured, enter the following command (assuming the FortiGate internal interface is connected to the same network as the TFTP server).
execute restore config dhcp internal
The FortiGate unit gets the information it needs from the DHCP server, downloads and installs the configuration file from the TFTP server and restarts running its new configuration.
If the TFTP server is only available on a VLAN network (for example, VLAN id 224), you can use the following command to access the TFTP server on the VLAN network:
execute restore config dhcp internal 224