From owner-freebsd-stable@FreeBSD.ORG Thu Jan 25 16:14:52 2007 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 131CF16A4AC for ; Thu, 25 Jan 2007 16:14:52 +0000 (UTC) (envelope-from swhetzel@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.173]) by mx1.freebsd.org (Postfix) with ESMTP id 9B66113C441 for ; Thu, 25 Jan 2007 16:14:51 +0000 (UTC) (envelope-from swhetzel@gmail.com) Received: by ug-out-1314.google.com with SMTP id o2so457220uge for ; Thu, 25 Jan 2007 08:14:50 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Nj4+aeXoplV7QXbvAdZyHXCCAeLlXp/HmLIAwBeUjXwFUD64pI16ImOEn+mnLfrnad5OMvDLLoBGIgZFhsswAAwiWWnS+X77tZOJsolJnVJrrOuTIWHHEExWQfL4Ti3ms3x68nTaG+sAuASD8IOqMYsRFUo+dF9ZuxDS2bOYJGE= Received: by 10.82.120.15 with SMTP id s15mr1218905buc.1169741690127; Thu, 25 Jan 2007 08:14:50 -0800 (PST) Received: by 10.82.186.2 with HTTP; Thu, 25 Jan 2007 08:14:50 -0800 (PST) Message-ID: <790a9fff0701250814q3ad4ded4tf3e740075c2f61d1@mail.gmail.com> Date: Thu, 25 Jan 2007 10:14:50 -0600 From: "Scot Hetzel" To: "Pete French" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Cc: freebsd-stable@freebsd.org Subject: Re: Netgraph at startup - rc.conf ? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jan 2007 16:14:52 -0000 On 1/25/07, Pete French wrote: > I have a machine with two interfaces in it - bge0 and beg1. I now > find I need to usse ng_fec to make these into one interface due to > the way out networking contractors are installign a new site. > > Seems like no problem from the command line, but what I can't > find anywhere in the documentation is how to make this happen > at boot time using rc.conf. I am assuming my line which > looks like: > > ifconfig_em0="inet 172.16.1.6 netmask 255.255.0.0" > > becomes > > ifconfig_fec0="inet 172.16.1.6 netmask 255.255.0.0" > > but obviously I need to do something to create fec0 before > that happens. Preseumably something like cloned_interfaces="fce0", > but where does it get the parameters from to create the interface ? > To run commands before a interface started, you need to create a /etc/start_if.fec0, #!/bin/sh /usr/sbin/ngctl -f- <<-SEQ mkpeer fec dummy fec msg fec0: add_iface "bge0" msg fec0: add_iface "bge1" msg fec0: set_mode_inet SEQ Then add fec0 to the network_interfaces variable in your /etc/rc.conf. Scot -- DISCLAIMER: No electrons were mamed while sending this message. Only slightly bruised.