Configure DHCP server
You can configure the DHCP server from FortiExtender (Standalone) Cloud or locally while the device is set in NAT mode.
To configure the DHCP server, change the IP address of the LAN interface to the correct subnet, and then create the DHCP server subnet using commands described in the table below.
CLI command |
Description |
---|---|
config system dhcpserver |
Enters DHCP server configuration mode. |
edit <name> |
Specify the name of the DHCP server. |
set status {enable | disable | backup} |
Set the DHCP server status:
|
set lease-time <lease_time> |
Specify the DHCP address lease time in seconds. The valid range is 300–8640000. 0 means unlimited. |
set dns-service {local | default | specify | wan-dns} |
Select one of the options for assigning a DNS server to DHCP clients:
|
set dns-server1 <dns_server1> |
Specify the IP address of DNS Server 1. |
set dns-server2 <dns_server2> |
Specify the IP address of DNS Server 2. |
set dns-server3 <dns_server3> |
Specify the IP address of DNS Server 3. |
set ntp-service {local | default | specify} |
Select an option for assigning a Network Time Protocol (NTP) server to DHCP clients:
|
set ntp-server1 <ntp_server1> |
Specify the IP address of NTP Server 1. |
set ntp-server2 <ntp_server2> |
Specify the IP address of NTP Server 2. |
set ntp-server3 <ntp_server3> |
Specify the IP address of NTP Server 3. |
set default-gateway <gateway> |
Specify the default gateway IP address assigned by the DHCP server. |
set netmask <netmask> |
Specify the netmask assigned by the DHCP server. |
set interface <interface> |
Specify the interface on which the DHCP server is expected to run. |
set start-ip <start_ip> |
Specify the start IP address of the DHCP IP address range. For example, 192.168.1.100. |
set end-ip <end_ip> |
Specify the end IP address of the DHCP IP address range. For example, 192.168.1.120. |
Example DHCP server configuration:
config system dhcpserver
edit dsl
set status enable
set lease-time 8640000
set dns-service specify
set dns-server1 8.8.8.8
set dns-server2 8.8.4.4
set dns server3
set ntp-service local
set default-gateway 192.168.2.1
set netmask 255.255.255.0
set interface LAN
set start-ip 192.168.2.2
set end-ip 192.168.2.254
set mtu 1500
set reserved-address enable
next
end
FortiExtender (Standalone) LAN interface(s) can be configured in static IP address mode locally or from FortiExtender Cloud. By default, the LAN interface has the IP address of 192.168.200.99/24 and runs a DHCP server serving addresses from 192.168.200.110. You can enable the management of LAN-side capabilities from FortiExtender (Standalone) Cloud.
FortiExtender supports DHCP server with reserved addresses. To take advantage of this feature, you must do the following:
- Enable the
set reserved-address
option, as shown above. - Configure the system DHCP-reserved-address using the following commands:
edit 1
set ip <preferred host IP>
set mac <mac address of host>
set action <reserved | blocked>
end
|