Fortinet white logo
Fortinet white logo

CLI Reference

config reserved-addresses

config reserved-addresses

Description: Configure options for the DHCP server to assign IP settings to specific MAC addresses.

Config reserved-addresses

edit <name>

set *ip {ipv4-address}

set *mac {mac-address}

set *action [block | reserved]

unset

next

show

abort

end

delete <name>

purge

show

end

next

show

end

delete <name>

purge

show

end

Sample command:
FX201E5919000057 (dhcpserver) # show
config system dhcpserver
    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 port4
        set start-ip 192.168.200.110
        set end-ip 192.168.200.210
        set mtu 1500
        set reserved-address disable
    next
end
Parameter Description Type Size Default
status Status of the DHCP configuration. option - enable
Option Decripton
enable Enable the DHCP server.
disable Disable the DHCP server.
lease-time Lease time in seconds. 0 means unlimited. integer 300 - 8640000 86400
dns-service Options for assigning DNS servers to DHCP clients. Option - default
Option Description
default Use the default DNS server.
specify Specify the DNS server to be used.
wan-dns Use the WAN port DNS server.
dns-server1 DNS server 1. IPv4 address - none
dns-server2 DNS server 2. IPv4 address - none
dns-server3 DNS server 3. IPv4 address - none

ntp-service

Options for assigning Network Time Protocol (NTP) servers to DHCP clients.

option

-

specify

ntp-server1

NTP server 1.

string

-

none

ntp-server2

NTP server 2.

string

-

none

ntp-server3

NTP server 3.

string

-

none

default-gateway

Default gateway IP address assigned by the DHCP server.

IPv4 address

-

none

netmask

Network mask assigned by the DHCP server.

string

-

none

interface

DHCP server can assign IP configurations to clients connected to this interface.

option

-

none

Option Description
lan LAN as the DHCP server interface.
lo Loopback as the DHCP server interface.
wan WAN as the DHCP server interface.
port4 Port 4 as the DHCP server interface.

start-ip

The first IP address in the IP range.

IPv4 address

-

none

end-ip

The last IP address in the IP range.

IPv4 address

-

none

mtu

Client's MTU.

integer

512 - 9000

1500

reserved-address

Status of reserved address and MAC mapping.

Option

-

disable

Option Description
enable Enable reserved-address.
disable Disable reserved-address.

ip

IP address to be reserved for the MAC address.

IPv4 address

-

none

mac

MAC address of the client that will get the reserved IP address.

string

-

none

action

Options for the DHCP server to configure the client with the reserved MAC address.

option

-

reserved

Option Description
block Block the address.
reserved Reserve the address.

config reserved-addresses

config reserved-addresses

Description: Configure options for the DHCP server to assign IP settings to specific MAC addresses.

Config reserved-addresses

edit <name>

set *ip {ipv4-address}

set *mac {mac-address}

set *action [block | reserved]

unset

next

show

abort

end

delete <name>

purge

show

end

next

show

end

delete <name>

purge

show

end

Sample command:
FX201E5919000057 (dhcpserver) # show
config system dhcpserver
    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 port4
        set start-ip 192.168.200.110
        set end-ip 192.168.200.210
        set mtu 1500
        set reserved-address disable
    next
end
Parameter Description Type Size Default
status Status of the DHCP configuration. option - enable
Option Decripton
enable Enable the DHCP server.
disable Disable the DHCP server.
lease-time Lease time in seconds. 0 means unlimited. integer 300 - 8640000 86400
dns-service Options for assigning DNS servers to DHCP clients. Option - default
Option Description
default Use the default DNS server.
specify Specify the DNS server to be used.
wan-dns Use the WAN port DNS server.
dns-server1 DNS server 1. IPv4 address - none
dns-server2 DNS server 2. IPv4 address - none
dns-server3 DNS server 3. IPv4 address - none

ntp-service

Options for assigning Network Time Protocol (NTP) servers to DHCP clients.

option

-

specify

ntp-server1

NTP server 1.

string

-

none

ntp-server2

NTP server 2.

string

-

none

ntp-server3

NTP server 3.

string

-

none

default-gateway

Default gateway IP address assigned by the DHCP server.

IPv4 address

-

none

netmask

Network mask assigned by the DHCP server.

string

-

none

interface

DHCP server can assign IP configurations to clients connected to this interface.

option

-

none

Option Description
lan LAN as the DHCP server interface.
lo Loopback as the DHCP server interface.
wan WAN as the DHCP server interface.
port4 Port 4 as the DHCP server interface.

start-ip

The first IP address in the IP range.

IPv4 address

-

none

end-ip

The last IP address in the IP range.

IPv4 address

-

none

mtu

Client's MTU.

integer

512 - 9000

1500

reserved-address

Status of reserved address and MAC mapping.

Option

-

disable

Option Description
enable Enable reserved-address.
disable Disable reserved-address.

ip

IP address to be reserved for the MAC address.

IPv4 address

-

none

mac

MAC address of the client that will get the reserved IP address.

string

-

none

action

Options for the DHCP server to configure the client with the reserved MAC address.

option

-

reserved

Option Description
block Block the address.
reserved Reserve the address.