How to give out a static lease using DHCP server

If you need some help, this should be the first place to look.

Postby dingetje » Mon Oct 28, 2002 9:58 am

<font color='#000080'>Q: how do I configure the DHCP server to give out a static IP address based on the client's MAC address?

  • make sure freesco is up and running (duh...)
  • boot the client that you want to give a static lease
  • login as root on freesco and type cat /etc/dhcpd.leases
  • look for the client name in the generated list, in the example below I'm looking for a client called 'dingetje'
    lease {
        starts 0 2002/10/27 16:45:26;
        ends 0 2002/11/03 16:45:26;
        hardware ethernet <span style='color:red'>00:00:c5:0d:7a:8</span>;
        uid 01:00:00:c5:0d:7a:8e;
        client-hostname <span style='color:blue'>"dingetje"</span>;

  • make a note of the hardware ethernet address (TIP: if you're using PuTTY or another terminal client, you can usually copy this text into the paste buffer).

  • now edit /mnt/router/etc/dhcpd.conf and add the following lines:
    host <span style='color:blue'>dingetje</span> {
    fixed-address <span style='color:green'></span>;
    hardware ethernet <span style='color:red'>00:00:c5:0d:7a:8e</span>;

    The fixed address must be outside the DHCP dynamic range (in this example the DHCP range is to, so a free fixed address is

  • save the changes and type rc_dhcpd restart
  • reboot the client, or use start->run->winipcfg->OK, click 'renew all' for win9x client or type 'ipconfig / renew' in a DOS box for WinNT/Win2K/WinXP clients.
    The client should get the static lease.</li>

Return to FAQ - Frequently Asked Questions

Who is online

Users browsing this forum: No registered users and 2 guests