From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 7 09:58:06 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0CA7C16A4CE for ; Sat, 7 Aug 2004 09:58:06 +0000 (GMT) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2851E43D4C for ; Sat, 7 Aug 2004 09:58:05 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.12.9p2/8.12.9) with ESMTP id i779w16E042490; Sat, 7 Aug 2004 13:58:01 +0400 (MSD) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.12.9p2/8.12.9/Submit) id i779w1Qf042489; Sat, 7 Aug 2004 13:58:01 +0400 (MSD) (envelope-from yar) Date: Sat, 7 Aug 2004 13:58:01 +0400 From: Yar Tikhiy To: cokane@cokane.org Message-ID: <20040807095801.GC39835@comp.chem.msu.su> References: <346a8022040806145018a5e18@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <346a8022040806145018a5e18@mail.gmail.com> User-Agent: Mutt/1.5.6i cc: hackers@freebsd.org Subject: Re: Network interface RUNNING and UP flags X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Aug 2004 09:58:06 -0000 On Fri, Aug 06, 2004 at 05:50:04PM -0400, Coleman Kane wrote: > Hi, I have been having some trouble working with getting tapN network > interfaces into the 'RUNNING' state. I have been trying to figure out > how to set the RUNNING flag on an interface, which is needed before > the kernel will actually begin sending packets from said network > interface. So far, the only way I have been able to figure out how to > do this is to assign an IPv4 address to the interface, I am guessing > that an un-addressed network interface is supposed to remain not > RUNNING even if it is UP by design. The problem is that only an IPv4 > address assignment will bring it up and running. If I attempt to > assign an IPv6 address to the interface, it will go UP, but not > RUNNING. I have determined that I can assign an IPv4 address (such as > 10.0.0.1) to it, and then subsequently remove it (via -alias) and this > will leave the interface in the running state. > > My questions are: > > 1) Why doesn't assigning an IPv6 address produce the same side effects > and > 2) Is there a way to set this interface flag without assigning an IPv4 > address (or any address for that matter) first? > > Mainly for number two, I would like to be able to run interfaces > bridged together without having to also give all of them addresses. As a matter of fact, the IFF_RUNNING flag, visible as ``RUNNING'' in the output from ifconfig(8), is intended for interface's internal use and should not influence the interaction of the interface with other modules, except for affecting careful user's experience :-) On the contrary, IFF_UP, a.k.a. ``UP'', is an administrative flag to be toggled from outside an interface driver. A user can flip it to shutdown the interface, or a network stack module may touch it if it needs to (e.g., IP will bring an interface up to send a gratuitous ARP upon configuring an IP address on it.) -- Yar