Wednesday, July 2, 2014

FortiGate DHCP Advanced Options - Lease time configuration

To enable a DHCP server, go to System > Network > Interface. Edit the interface, and select Enable for the DHCP Server row. In here we can assign the address range, sub net mask, default gateway and dns server.

Now check the IP confugration settings. As shown in below figure, lease period is set to 7 days and we can only assign one DNS Server in above settings.

To change lease time and add more dns servers we have to do modify the configuration through CLI Console.
First enter below command line.
config system dhcp server
Type get to list all DHCP Servers. As shown in below figure I have 4 DHCP Servers.

Type edit <server entry number> and hit enter. And see the current DHCP Server configuration.

DHCP Server default lease-time is 604800 = 1 Week = 7 Days

So I am going to change the DHCP Lease-time to 1 Day = 86400 Seconds

Type below command set the lease-time
set lease-time 86400

To add another DNS Server (Alternative) type below command.
set dns-server2 <IP Address>

Type end to end the current session and see the DHCP configuration on the interface.

Do ipconfig /release and ipconfig /renew in computer's command prompt and verify the new IP Configuration.




Clear up all DHCP Addresses lease

Do follow the steps:
For advanced user, you may console into Fortigate Firewall, else;
Go to System -> Dashboard -> Status -> CLI Console,

Look for CLI Console on dashboard.

By using below this command to clear up all DHCP address lease in Fortigate.


Enter execute dhcp lease-clear in CLI console, then all dhcp leased addresses will clear up.




Related Posts Plugin for WordPress, Blogger...