Mask's web site
作品集 | 大學回憶 | 我的家庭
我的最愛 > FreeBSD > DHCP
   
  1. Get a DHCP package, ISC-DHCP package is papular one. You can download from here.
  2. # pkg_add -v ISC-DHCP.TGZ
  3. Enable BPF in your kernel:
  4. # config yourkernel(assume your kernel named yourkernel)
  5. # cd /usr/src/sys/compile/yourkernel/
  6. # make depend all install
  7. Build your custom /etc/dhcpd.conf:


    Specify the subnet 192.168.0.* use DHCP, netmask is 255.255.255.0, and during {} is the configuration of 192.168.0.*

    Specify the range from 192.168.0.1 to 192.168.0.50 for DHCP.

    Specify a day for default lease time.

    Specify a week for the max lease time.

    Setup the submask of 192.168.0.1 - 192.168.0.50 using DHCP.

    Specify the broadcast address of 192.168.0.1 - 192.168.0.50
    necessary
    Specify the router of 192.168.0.1 - 192.168.0.50

    Specify dns of 192.168.0.1 - 192.168.0.50
  8. Add below to /etc/rc.local:

    DHCP is done.
  9. # reboot

Illustration

 

© by Mask from 2001/7.
All rights reserved.