Fortigate DHCP server VIA CLI and adding DHCP Options
November 27, 2013
Posted by on
Fortinet does a great job with almost every aspect of the Fortigate device. There are a few hidden , but very important options that you cannot configure in the GUI of Fortinet. One being DHCP options, for Voice, Wireless, Etc. Below are the setups to setup a DHCP scope in CLI, and add options. Another option is to configure the scope through GUI, and then just modify the scope through CLI to add the options.
Within the Gui in FortiOS5 the DCHP config is in the network interface. This is a great place to have it. In CLI the option to configure it is
config sys dhcp server
Below image shows all commands needed in CLI
Once you edit the dhcp scope (config sys dhcp server.. then edit the scope id. )
You can add the following commands:
So, lets add option 46. This could be used with Ruckus wireless to push AP broadcasts to the Zonedirector.
To set the option for example here to an IP address, it requires you to convert this to HEX.
I used this : http://www.kloth.net/services/iplocate.php
after setting this command, my APs hooked up to my ZD.
So to recap, with DHCP and FortiOS5 you can create the DHCP scope totally in CLI, or it works great in the GUI. You can configure this under network – interface. If you need to add options such as WINS, NTP, or other options it might be best to configure these through CLI.