network settings auto-config

Lowell Gilbert freebsd-questions-local at
Fri Jun 13 16:25:23 PDT 2003

John DeStefano <deesto at> 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
>                  netmask'' 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.

More information about the freebsd-questions mailing list