Enabling DHCP


In order to configure FreeBSD as a client on a DHCP network, it needs to be able to put its network interface in "promiscuous mode," which means it can see and respond to packets that are not explicitly destined for its IP address. This functionality comes from the Berkeley Packet Filter device compiled into the kernel. This device is installed by default in the GENERIC kernel, so unless you built a custom kernel and removed it, you shouldn't have to do anything.

To verify that the Berkeley Packet Filter device is installed in the kernel, look for the following line in your kernel configuration file:

device    bpf


If this line is present, there is nothing you need to do here. If the line is not there, you will need to add it and then rebuild your kernel. Complete instructions on kernel building can be found in Chapter 18, "Kernel Configuration."

After you have made sure the kernel is equipped for promiscuous-mode communication, you can enable DHCP by editing the /etc/rc.conf file. If there is already an ifconfig line in the file specifying the configuration information for your network interface (for example, ifconfig_fxp0), change it as follows:

ifconfig_ed0="DHCP"


If such a line is not present, add it. Then either reboot the system or run the /etc/netstart script to activate the new configuration.




FreeBSD 6 Unleashed
FreeBSD 6 Unleashed
ISBN: 0672328755
EAN: 2147483647
Year: 2006
Pages: 355
Authors: Brian Tiemann

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net