static internal IP address as default networking config; ONLY if that fails, try to get an IP address via dhcp?

Lowell Gilbert freebsd-questions-local at
Tue Feb 19 17:55:49 UTC 2019

toogley <toogley at> writes:

> Hey,
> i know how i can configure my FreeBSD machine to use a static internal
> ip addresss or how to get one via dhcp. As i sometimes change the
> netmask of my internal network, the networking via static ip addresses
> doesn't work anymore.
> ==> Is it possible to have a static network configuration as "default
> networking method" and ONLY if that fails, try to get one via dhcp?

There's no obvious definition of a static address "failing." You would
need to define that yourself, and implement a startup script that checks
for whatever you come up with, then starts dhcpc if it doesn't see what
it wants. You could use something like connectivity to a particular
host, for example.

Personally, I'd just let the FreeBSD machine use DHCP all the time if I
possibly could.

Be well.

More information about the freebsd-questions mailing list