Skip site navigation (1)Skip section navigation (2)
Date:      13 Jun 2003 19:25:20 -0400
From:      Lowell Gilbert <freebsd-questions-local@be-well.no-ip.com>
To:        John DeStefano <deesto@yahoo.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: network settings auto-config
Message-ID:  <44ptlhmufz.fsf@be-well.ilk.org>
In-Reply-To: <20030612132606.39698.qmail@web40601.mail.yahoo.com>
References:  <20030612132606.39698.qmail@web40601.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
John DeStefano <deesto@yahoo.com> writes:

> 1.  (*) text/plain          ( ) text/html           
> 
> Thanks Lowell; but a solution be to change something in /etc/rc.conf instead?

No, for the problem you described, *configuring* the DHCP client
through its configuration file is the way to go.

> Pete pointed me toward /etc/rc.conf, which contains the following line:
> ifconfig_dc0="DHCP"
> Seeing this made me remember something: someone once told me that commenting this line out would keep DHCP from running.  While that is somewhat true, it also killed my whole NIC interface!  So the solution must be not to comment it out, but to change the variable value "DHCP" to something else.  I've been searching for proper values but haven't seen them anywhere yet, but I did see the following in "man rc.conf":
>  pccard_ifconfig
>                  (str) List of arguments to be passed to ifconfig(8) at boot
>                  time or on insertion of the card (e.g. ``inet 192.168.1.1
>                  netmask 255.255.255.0'' for a fixed address or ``DHCP'' for a
>                  DHCP client).
> ...
>              It is possible to bring up an interface with DHCP by setting
>                  the ifconfig_<interface> variable to ``DHCP''.  For instance,
>                  to initialize the ed0 device via DHCP, it is possible to use
>                  something like:
>                  ifconfig_ed0="DHCP"
> 
> So the line in my config file matches the man page, but the man page doesn't say what other variables are available that won't break the interface.

You can statically configure the interface if you know the IP
parameters, and they won't change.  However, I don't think that is
advisable in your case.  Just keep your own DNS server by configuring
DHCP to prefer it to the DHCP-provided ones, and you're all set.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44ptlhmufz.fsf>