PDA

Bekijk de volledige versie : static hosts



fabiosantos
19-02-2005, 16:08
Hey folks,
I've been looking for a way to have some static ip hosts on dnsmasq, but it seems that this method changed since 1.7.x.x.


In order to use static leases/hosts you will need to perform this steps:
1. Connect to router using telnet;
2. Write the static hosts count & entries to the flash (use /etc/hosts format)
nvram set etc_hosts=3
nvram set etc_hosts0="192.168.1.1 wl500g"
nvram set etc_hosts1="192.168.1.2 laptop"
nvram set etc_hosts2="192.168.1.3 foo"
I'm not planning to use dhcp just some entries on /etc/hosts !!!
Someone know how to do this?
Fábio.
Ps: I'm using 1.9.2.7-3c

fabiosantos
19-02-2005, 16:36
Yeah I know, I havent searched hard enought... :mad:
Just found the solution from Oleg's Page, http://wl500g.dyndns.org

/usr/local/etc/hosts is now copied by rc.dnsmasq script to the bottom of the /etc/hosts file (obsoletes nvram etc_hosts)
So the deal is:
create/modify /usr/local/etc/hosts
flashfs save
flashfs commit
flashfs enable

So easy when you know... Can some one move this to Q&A ?
Thanks all you guys and many many thanks to Oleg and his great work!
Fábio. :D