Static DHCP with fritzbox

2011-07-23 at 19:22:07 | categories: tips

Problem

For my DSL Internet connection I'm using FRITZ!Box Fon WLAN 7170. It works great but unfortunately I could not force it to give particular IP addresses, using DHCP to particular client based on their MACs.

It was possible to configure DHCP to offer a range, let say, 192.168.10.10-20, then first unknown device would get .10, next one .11, and so on. Then via web interface it is possible to make those assignments permanent. But I could not find a way to tell the system that for this MAC I want this IP (and not the one the system already assigned to it).

Searching

After some googling the solution was found here.

However it did not work as described: modifying multid.leases did not change anything. After restarting multid the file was generated again.

Then solution came from this comment.

Solution in steps

Here is a combined solution, taken from the both pages mentioned above, which works for me:

After performing the steps below on the web interface there is some warning: "Changes not supported by the manufacturer". Apart from that everything seems to look the same and it works just fine.

  • Enable telnet on the unit, dialling #96*7* on the phone connected to the box. To switch it off later use #96*8*
  • Telnet to the unit as root
  • Stop the multid: multid -s
  • Edit the configuration: nvi /var/flash/ar7.cfg
    Search for 'dhcpserver' and modify it adding some more statics (look at the comment I mentioned above for some example).
  • Start the multid: multid
  • Try it out! On a device use DHCP - and check if it got the IP you set up.