am trying to add bulk IP-DHCP reservation, created a script. it keeps failing.
this is the script, there 100 entries, even if i restrict it to just two entries i fails. Any idea why the script fails
config system dhcp server edit 3 config reserved-address edit 4 set ip 192.168.10.53 set mac 5C:87:9C:D7:67:16 set description "mylap3" next edit 5 set ip 192.168.10.54 set mac B0:FC:36:B0:90:8B set description "mylap4" next end
end
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.
Have you tried running it directly in CLI to see why it is failing?
Obviously this is incomplete; should I assume you already have IP ranges configured for server 3? If not, that's probably the error.
I ran that in to the CLI and its working. I have IP ranges configured too.
looks a bit fussy to me :)
Better do this way:
config system dhcp server
edit 3
config reserved address
edit 0
set ip <ip>
set mac <mac>
set description <description>
next
end
end
end
You could then repeat the edit stanze in config reserved address as often as you want and fill it with new ip/mac pair.
edit 0 is like auto increment in fortios :) If you use it you don't need to care about the number. FortiOS does this for you then.
Just lafter the last edit standza in config reserved address you have to have an "end" to end config reserved address stanza itself :)
Then complete it with an end to end the edit 3 stanza and annother end to end config system dhcp server stanza.
And yes try to run it on cli to see where it fails or read the error logs after executing the script.
hth
Sebastian
--
"It is a mistake to think you can solve any major problems just with potatoes." - Douglas Adams
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 |
---|---|
1721 | |
1098 | |
752 | |
447 | |
234 |
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.