Dear all,
i want to set up dhcp server on dedicated vlan for my clients on fortigate.
Basically, i want to import list of mac address which will receive an ip from dhcp range (not reserved). On web UI, i did not see any menu which allows me to do that. How can i achieve it ?
Best regards.
Solved! Go to Solution.
Nominating a forum post submits a request to create a new Knowledge Article based on the forum post topic. Please ensure your nomination includes a solution within the reply.
Hello @vf ,
Yes, you are right. You can just use tcl scripts on FortiManager.
If you know Python or any scripting language you can create a cli template with them. If you don't know anything about Python, ChatGPT can help you :).
Hello @vf ,
Fortigate doesn't have the ability to import a mac address list into the DHCP. But you can import all mac addresses via CLI. I think, this is best efficient way for import mac address bulky.
You can review example cli commands below.
config system dhcp server
edit <DHCP_Scope_ID>
config reserved-address
edit 0
set type mac
set mac <MAC_ADDR>
set action assign
set description ''
next
edit 0
set type mac
set mac <MAC_ADDR>
set action assign
set description ''
next
end
next
end
If you want to reserve an IP address for a client, you can use these commands.
config system dhcp server
edit <DHCP_Scope_ID>
config reserved-address
edit 0
set type mac
set ip <IP_ADDR>
set mac <MAC_ADDR>
set action reserved
set description ''
next
edit 0
set type mac
set ip <IP_ADDR>
set mac <MAC_ADDR>
set action reserved
set description ''
next
end
next
end
Thanks for your answer.
I will try to set up a tcl script which will parse input file and will assign address for each mac parsed. It must be possible, musn't it ? It will be easier to do this on Tcl language instead of CLI script.
Hello @vf ,
Probably, tcl scripts will be better than cli. Because, with tcl scripts, you can read mac addresses from files and you can use these inputs on a loop. The loop will create all input for the configuration.
Thanks, i just realize i don't have fortimanager.
I just own fortigate. If i uderstand, tcl scripts can run and execute only on Fortimanager, not fortigate ?
Hello @vf ,
Yes, you are right. You can just use tcl scripts on FortiManager.
If you know Python or any scripting language you can create a cli template with them. If you don't know anything about Python, ChatGPT can help you :).
I will use bash.
Thanks.
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 |
---|---|
1669 | |
1082 | |
752 | |
446 | |
226 |
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 2024 Fortinet, Inc. All Rights Reserved.