How not allow setting ip changes interface down status?

sthaug at nethelp.no sthaug at nethelp.no
Sat Jun 22 08:51:53 UTC 2013


> What I've intended to do, as jason is mentioned too, is assigning IP
> address to the interface but not let it works until a proper time. As I
> understand there is not any way just set the interface down besides adding
> IP! Still, any other solution?

Tested on 8.4-STABLE:

ifconfig em0 10.2.3.4/24
ifconfig em0 down

or, in rc.conf 

ifconfig_em1="inet 10.2.3.4/24"
ifconfig_em1_alias0="down"

I find this use of alias clumsy, and it *should not* be necessary. In
both cases there is probably a small window where the interface is up
and answering for the specified IP address.

(I also tried

ifconfig em0 10.2.3.4/24 down

which didn't work - the interface is left in the UP state.)

Steinar Haug, Nethelp consulting, sthaug at nethelp.no


More information about the freebsd-net mailing list