Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 07 May 2001 11:04:10 -0700
From:      Julian Elischer <julian@elischer.org>
To:        "Vladimir B. Grebenschikov" <vova@express.ru>
Cc:        freebsd-net@freebsd.org
Subject:   Re: netgraph interface names
Message-ID:  <3AF6E39A.A7447268@elischer.org>
References:  <15092.6166.422647.927779@vbook.express.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
I was thinking of doing this..

but slightly differnt....
renaming the node would change the interface name too.
but what you have would work as well.


"Vladimir B. Grebenschikov" wrote:
> 
> Tring to use netgraph system for some pruposes
> (frame-relay/tunneling/sync) I found that it is too complicated to
> follow naming schemes for different clients, and build firewall
> tables And not very clean witch ngX for what.
> 
> There two patches:
> 
> first allow name netgraph network interface.
> 
> # ngctl msg ng0: setifname \"sync0\"
> 
> will name interace ng0 as sync0
> 
> second patch allows rename already named netgraph node (I don't understand why
> netgraph designers don't allow this)
> 
> # ngctl name ng0: sync0
> 
> so small script will easy create interface:
> 
> mkif() {
>   name="$1"
>   ngname=`( echo "mkpeer iface dummy inet";  echo "msg .:dummy getifname" ) \
>          | ngctl -f - | perl -n -e '/Args:\s+\"(ng\d+)\"/ && print "$1\n";'`
>   if [ "$name" != "" ]; then
>      ngctl msg $ngname: setifname \"$name\"
>      ngctl name $ngname: $name
>      ngname=$name
>   fi
> }
> 
> # SYNC interfaces
> mkif sync0
> # some other netgraph stuff
> 
> mkif sync1
> ...
> mkif sync2
> ...
> 
> # framerelay
> mkif frm0
> ...
> mkif frm1
> ...
> 
>   --------------------------------------------------------------------------------
>                           Name: iface-setname.patch
>    iface-setname.patch    Type: unspecified type (application/octet-stream)
>                       Encoding: base64
> 
>                         Name: node-rename.patch
>    node-rename.patch    Type: unspecified type (application/octet-stream)
>                     Encoding: base64
> 
>   --------------------------------------------------------------------------------
> 
> --
> TSB Russian Express, Moscow
> Vladimir B. Grebenschikov, vova@express.ru

-- 
      __--_|\  Julian Elischer
     /       \ julian@elischer.org
    (   OZ    ) World tour 2000-2001
---> X_.---._/  
            v

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




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