How do you bulk insert reserved IPs (static leases)? Here's the answer! (Slate AX)

Not a technical support request, but there are no other forums to post this in. I am hoping this could help someone who Google’s a similar request in the future.

After much playing around in Luci (advanced settings) and Googling, trying to find out how I can import my large list of reserved IPs, I have found my answer. Here’s what I did:

  1. Login to the router, advanced settings, login with the same password you used to login to the main interface, system, software. Search for openssh-sftp-server and install it. This is what allows someone like me who doesn’t get on with a command line, to use a file browser.

  2. Download an SSH client if you don’t have one already. I use Bitvise. Put in the local IP of your router (192.168.8.1 most likely), username root, and the password you used to login to the router interface. Connect.

  3. Open an SFTP window and navigate to /etc/config. Open the dhcp file.

  4. Scroll to the bottom of the file, where you will find any reserved IPs that you already have. You can amend or delete the existing ones, or add new ones. The format is:

config host
	option mac '00:00:00:00:00:00'
	option ip '192.168.8.2'
	option name 'Device'
  1. Save and check that it worked by refreshing the LAN page on the routers interface. If you’re using Bitvise, as soon as you save the file, it is uploaded to the server. If you use something like Filezilla then after you save the file, Filezilla will ask you if you would like upload and overwrite.

You can skip the ‘option name’ one if you don’t want to name it. If you want to ensure you have the right format, you can always add a reserved IP on the interface, and then copy it directly from the file as many times as you need and edit the copies.

Be careful to keep the quotes, general formatting, and that all device names do NOT have spaces in (I use dashes), such as Mobile-Phone-Samsung-S23, otherwise while nothing bad will happen, the routers admin page will load no reserved IP entries. Just come back and edit it. I missed a quote on one of my devices but all was fine.

I personally just copied and pasted my MACs and IPs from a separate document I have which lists all of my network devices, but you may be able to make some kind of macro or script that can fill in these details from a spreadsheet or something.

You can also move them about if you’re like me and want all of the IPs in order, something you can’t do in any of the graphical interfaces.

You can refresh the router admin panel LAN page, or the static leases Luci page, and the changes will be reflected immediately. Of course devices will need to reconnect for the reservations to take affect, and I like to do a reboot for good measure but it is not needed.

This has certainly made making large changes to the reserved IPs much, much easier, but it is a shame neither graphical interface has some kind of bulk facility, or the ability to export an excel template which I could then fill and import.

I hope this helps someone!

1 Like

Thanks for that but this has been mentioned here on several occasions previously.

Yeah, but this kind of stuff gets buried eventually, it seems. I rather wish there was a way to apply expanded tags to threads to help ‘drill down’ into this form, a-la a more proper knowledgebase instead of just dumping it all into ’ Technical Support for Routers’.

1 Like

Totally agree with you.