Date: Thu, 25 Jan 2007 10:14:50 -0600 From: "Scot Hetzel" <swhetzel@gmail.com> To: "Pete French" <petefrench@ticketswitch.com> Cc: freebsd-stable@freebsd.org Subject: Re: Netgraph at startup - rc.conf ? Message-ID: <790a9fff0701250814q3ad4ded4tf3e740075c2f61d1@mail.gmail.com> In-Reply-To: <E1HA6eP-000Fbi-E9@dilbert.ticketswitch.com> References: <E1HA6eP-000Fbi-E9@dilbert.ticketswitch.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 1/25/07, Pete French <petefrench@ticketswitch.com> 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?790a9fff0701250814q3ad4ded4tf3e740075c2f61d1>
