Sredzki40Blog

Ein blog für Sredzki40.de - Wireless LAN, OLSR, Meshrouting, Berlin und Freie Netze

Donnerstag, Juni 08, 2006

Freifunk Firmware - Howtow assing fixed IPs with dhcp

You can assign certain hosts always the same IP address via dhcp. The FreifunkFirmware (FF) uses dnsmasq as an DNS and DHCP Server. First add a IP, Hostname entry to /etc/local.hosts. Secondly you have to bind the ethernet address of your machine to the name just added to local.hosts. Third and last Step is to restart dnsmasq.

Use ssh to login to your Freifunk Device.

Add IP and Hostname to local.hosts

root@gw3-wrt54g:~# rm /etc/local.hosts
root@gw3-wrt54g:~# cp /rom/etc/local.hosts /etc/
root@gw3-wrt54g:~# vi /etc/local.hosts


Add Ethernet adress and Hostname to ethers

root@gw3-wrt54g:~# rm /etc/ethers
root@gw3-wrt54g:~# cp /rom/etc/ethers /etc/
root@gw3-wrt54g:~# vi /etc/ethers


Restart dnsmasq

root@gw3-wrt54g:~# /etc/init.d/S50dnsmasq stop
root@gw3-wrt54g:~# /etc/init.d/S50dnsmasq start


Everytime the machine with the Ethernet address entered in ethers is requesting an IP address, the IP assingned to the requesting hostname in local.hosts is awnsered.