Date: Tue, 3 Mar 1998 11:02:00 -0600 (CST) From: Mark Tinguely <tinguely@plains.NoDak.edu> To: shappy@MIT.EDU, Studded@san.rr.com Cc: freebsd-questions@FreeBSD.ORG Subject: Re: DHCP Support in FreeBSD? Message-ID: <199803031702.LAA26205@plains.NoDak.edu>
next in thread | raw e-mail | index | archive | help
> You may find it most convenient to put the command to start the dhcp
> client as the first line in /etc/rc.network. Alternatively, you can put
> it in /etc/rc.local and start services that don't work properly till
> after the interface is configured (like xntpd and sendmail) in rc.local
> after xntpd instead of using the configuration in /etc/rc.conf for those
> items.
I installed the wide-dhcp client and made the changes to /etc/rc.conf
and /etc/rc.network:
in /etc/rc.conf:
network_interfaces="de0 lo0" # List of network interfaces (lo0 is loopback).
ifconfig_de0="DYNAMIC"
defaultrouter="DYNAMIC"
in /etc/rc.network:
# Do the primary ifconfig if specified
eval ifconfig_args=\$ifconfig_${ifn}
+ if [ "${ifconfig_args}" = "DYNAMIC" ] ; then
+# rm /var/db/dhcp_cache # uncomment to get different IP number
+ /usr/local/sbin/dhcpc ${ifn}
+ else
if [ -n "${ifconfig_args}" ] ; then
ifconfig ${ifn} ${ifconfig_args}
fi
+ fi
...
# Configure routing
- if [ "x$defaultrouter" != "xNO" ] ; then
+ if [ "x$defaultrouter" != "xNO" -a "x$defaultrouter" != "xDYNAMIC" ] ; then
static_routes="default ${static_routes}"
route_default="default ${defaultrouter}"
fi
--mark.
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199803031702.LAA26205>
