Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Dec 2007 18:32:41 +0100
From:      Marko Zec <zec@icir.org>
To:        freebsd-net@freebsd.org
Subject:   Re: using netgraph to create a pair of pseudo ethernet interface
Message-ID:  <200712171832.41370.zec@icir.org>
In-Reply-To: <20071217211545.3a28981a.zhouzhouyi@FreeBSD.org>
References:  <20071217211545.3a28981a.zhouzhouyi@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 17 December 2007 14:15:45 zhouyi zhou wrote:
> Dear All,
>     Any one know how to us netgraph to create a pair of pseudo
> ethernet interface. The packet go out from one and in another.

tpx32# ngctl mkpeer eiface ether ether
tpx32# ngctl mkpeer eiface ether ether
tpx32# ngctl l
There are 3 total nodes:
  Name: ngctl1446   Type: socket          ID: 00000006   Num hooks: 0
  Name: ngeth1      Type: eiface          ID: 00000005   Num hooks: 0
  Name: ngeth0      Type: eiface          ID: 00000003   Num hooks: 0
tpx32# ngctl connect ngeth0: ngeth1: ether ether
tpx32# ngctl l
There are 3 total nodes:
  Name: ngctl1448   Type: socket          ID: 00000008   Num hooks: 0
  Name: ngeth1      Type: eiface          ID: 00000005   Num hooks: 1
  Name: ngeth0      Type: eiface          ID: 00000003   Num hooks: 1
tpx32# 



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