FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

12016 questions

14300 answers

22543 comments

35969 members

0 votes
151 views 0 comments
by
Hello

Is it possible somehow to upload a text file with mac adresses to set up static ip leases in the lan interface?

It is a lot of work to type all these mac adresses in.

Thank you

2 Answers

0 votes
by

Hello,

The simplest would be to download /etc/config/dhcp from the router, add your entries like:

config host
	option name 'somename'
	option mac 'xx:xx:xx:xx:xx:xx'
	option ip 'x.y.z.t'

and push it back. Then restart dnsmasq with /etc/init.d/dnsmasq restart

Regards,

 

0 votes
by

Hello,

You can edit the file using the command "vi /etc/config/dhcp". Press ‘i’, to enter INSERT mode, and start editing file. There you can input the MAC address and IP you want to configure in the format shown bellow. Press Esc to exit INSERT mode. Press ‘:x’ and 'Enter'. Changes will be saved.