Re: what is the RIGHT(TM) way to configure background DHCP?

From: Freddie Cash <fjwcash_at_gmail.com>
Date: Wed, 6 Jul 2011 13:58:07 -0700
On Wed, Jul 6, 2011 at 12:47 PM, deeptech71_at_gmail.com
<deeptech71_at_gmail.com>wrote:

> the boot process of my FreeBSD machines takes a relatively long time.
> it spends 30 seconds idling at some point, because my network
> interface (sk0) is supposed to have an IP address assigned via DHCP,
> and the DHCP server on my LAN takes an extremely long time (~40
> seconds) to reply to IP address requests. this is unacceptable for me;
> i want the FreeBSD boot process to finish 30 seconds earlier, even if
> i won't get the chance to use the network for ~40 seconds after the
> booting has finished.
>
The simplest method would be to put into /etc/rc.conf:
  ifconfig_sk0="up"

Then into /etc/rc.local:
  dhclient sk0 &

That would bring your interface "up" during the boot process, then manually
fire off dhclient once the normal boot process has ended (right before the
login prompt appears) as a background process.  By the time you login, the
IP should be assigned.

As for what's "the correct way" to do this via just rc.conf, I'll leave that
up to others more "in the know" about how RC works.


-- 
Freddie Cash
fjwcash_at_gmail.com
Received on Wed Jul 06 2011 - 19:20:35 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:15 UTC