From owner-freebsd-net@FreeBSD.ORG Sat Jun 22 08:51:53 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 138BABEF for ; Sat, 22 Jun 2013 08:51:53 +0000 (UTC) (envelope-from sthaug@nethelp.no) Received: from bizet.nethelp.no (bizet.nethelp.no [195.1.209.33]) by mx1.freebsd.org (Postfix) with SMTP id 5E350125B for ; Sat, 22 Jun 2013 08:51:51 +0000 (UTC) Received: (qmail 21547 invoked from network); 22 Jun 2013 08:45:09 -0000 Received: from bizet.nethelp.no (HELO localhost) (195.1.209.33) by bizet.nethelp.no with SMTP; 22 Jun 2013 08:45:09 -0000 Date: Sat, 22 Jun 2013 10:45:09 +0200 (CEST) Message-Id: <20130622.104509.74740460.sthaug@nethelp.no> To: s.khanchi@gmail.com Subject: Re: How not allow setting ip changes interface down status? From: sthaug@nethelp.no In-Reply-To: References: <51BFA24D.70705@rewt.org.uk> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Jun 2013 08:51:53 -0000 > 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