Skip to main content
New Member
March 17, 2021
Solved

Add Multiple DHCP reservation on Fortigate 60D

  • March 17, 2021
  • 1 reply
  • 10254 views

Hey guys, 

How you doing?

 

Well, I will migrate from DHCP on Windows Server to DHCP on fortigate. I have lot of resevations on the server, is there a way i can make this reservations on Fortigate without doing it one by one. 

Like a scrip or something? 

 

For example on Windows server i can do it through PowerShell, with something like this: 

 

Add-DhcpServerv4Reservation -ScopeId 192.168.0.0 -IPAddress 192.168.0.XX -ClientId "XXXXXXXXXXXX" -Description "Reservation for XXX"

 

And I just replicate for every reservation I want. 

 

Appreciate your help, 

 

Thank you

 

 

    Best answer by lobstercreed

    I'm not sure why you would want to do this as Windows DHCP is far better IMO, but here is a thread from a few months back addressing exactly this: https://forum.fortinet.com/tm.aspx?m=190549  Hope that helps.

    1 reply

    lobstercreed
    New Member
    March 18, 2021

    I'm not sure why you would want to do this as Windows DHCP is far better IMO, but here is a thread from a few months back addressing exactly this: https://forum.fortinet.com/tm.aspx?m=190549  Hope that helps.

    sw2090
    SuperUser
    SuperUser
    March 19, 2021

    yeah I remember that thread. Just the programs mentioned in there might wer written for unix dnsmasq reserfations afair. I am not sure wether windows dhcop can export its reservations (and in which format)

    , so you might have to code your own or change the existing if possible.

     

    Update:

    I've had a look. Seems not to be possible to export reservations in a usable way in gui. 

    However there is powershell cmdlets that can do it:

     

    Get-DHcpServer4REservation -ComputerName "yourdhcpserver" -ScopId yourscopesubnet | Export-Csv -NoTypeInformation  -Path <pathandnameofcsvfile>

     

    this will create a .csv that contains all needed information.

     

    DonaireAuthor
    New Member
    March 19, 2021

    Well, Windows dhcp can export to csv file.  It is as you said the programs mentinoed in the past thread are quite different but anyways they gave me some insight. Perhaps I have to try to code it myself.