Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Jun 2013 10:45:09 +0200 (CEST)
From:      sthaug@nethelp.no
To:        s.khanchi@gmail.com
Cc:        freebsd-net@freebsd.org
Subject:   Re: How not allow setting ip changes interface down status?
Message-ID:  <20130622.104509.74740460.sthaug@nethelp.no>
In-Reply-To: <CAARSjE0iHOtFMFqvpMRU=0rtj=Lxau%2B-cttr=C5T4sVo28E4_w@mail.gmail.com>
References:  <CC186284-703C-412F-B867-C3F4DE7812EA@dataix.net> <51BFA24D.70705@rewt.org.uk> <CAARSjE0iHOtFMFqvpMRU=0rtj=Lxau%2B-cttr=C5T4sVo28E4_w@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> 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@nethelp.no



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