Configure DHCP server
You can configure the DHCP server from FortiExtender 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 {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 {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. |
|
Specify the MTU size. The default value is 1500. |
|
Set the reserved address enable or disable:
|
Example DHCP server configuration:
FX201E5919000222 (1) <M> # show edit 1 set status enable set lease-time 86400 set dns-service default set ntp-service specify set ntp-server1 set ntp-server2 set ntp-server3 set default-gateway 192.168.200.99 set netmask 255.255.255.0 set interface lan set start-ip 192.168.200.100 set end-ip 192.168.200.150 set mtu 1500 set reserved-address enable config reserved-addresses edit 1 set ip 192.168.200.101 set mac 45:59:b1:5f:db:ca set action reserved next end next
FortiExtender 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 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
|