How can I enable DHCP options for a single host? For example, I need to assign a different gateway to a specific host.
Hi 52000cc,
Please refer to the below document for more information:
https://community.fortinet.com/t5/FortiGate/Technical-Tip-DHCP-Options/ta-p/197451
https://community.fortinet.com/t5/FortiGate/Technical-Tip-Configure-DHCP-option-60-66-and-67-FortiGa...
Regards,
Aman
I did some lab tests because I was also curios and it seems that the Router/gateway option can't not be overwritten in the DHCP offer like the other options:
cconfig system dhcp server
..
config ip-range
edit 2
set start-ip 10.100.100.101
set end-ip 10.100.100.109
set vci-match enable
set vci-string "udhcp 1.37.0"
next
end
config options
edit 1
set code 3
set type ip
set vci-match enable
set vci-string "udhcp 1.37.0"
set ip "10.100.100.254"
next
edit 2
set code 150
set type ip
set vci-match enable
set vci-string "udhcp 1.37.0"
set ip "10.100.100.250"
next
end
set vci-match enable
set vci-string "udhcp 1.37.0"
Update: If the default-gateway is removed from DHCP server configuration, FGT will send the new gateway as a custom option:
config system dhcp server
edit 27
unset default-gateway
This change will also affect the hosts that are not matching this VCI, if the other hosts can match with a VCI, the default gateway can be sent the same way.
How can I configure the system to assign a different gateway to a host with a specific MAC address?
since it's only one host, why not assign static IP address on that device instead of obtaining IP address from DHCP?
If I set the IP address manually, it becomes very inconvenient to change it every time the machine is moved. There are several machines that need to use different gateways. I use to use Cisco setup as below..
ip dhcp pool HOSTXXX
host 192.168.1.68 255.255.255.0
client-identifier 01xx.xxxx.xxxx.xx
...
That's NOT assigning a gateway, but an IP reservation for a single host. Unlike Cisco, FGT can specify the host only by MAC address, not client-identifier.
https://community.fortinet.com/t5/FortiGate/Technical-Tip-How-to-set-DHCP-IP-reservation-on-FortiGat...
Toshi
Because I forgot the exact command for this, the command I wrote only reserves the IP address. Either way, does the Fortigate not support assigning IP, gateway, DNS, etc., based on the MAC address?
Created on 12-27-2024 04:32 PM Edited on 12-27-2024 04:36 PM
Same as Cisco. Gateway, DNS, IP ranges are assigned in the main pool. Then if you need to assign a specific IP to a single host, you need to reserve the IP base on the MAC/hardware-address INSIDE the pool.
Just show us what you have configured in Cisco.
Toshi
Select Forum Responses to become Knowledge Articles!
Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.
User | Count |
---|---|
1742 | |
1113 | |
759 | |
447 | |
241 |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.