From owner-freebsd-security@FreeBSD.ORG Thu Jan 22 01:13:08 2004 Return-Path: Delivered-To: freebsd-security@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A042C16A4CE for ; Thu, 22 Jan 2004 01:13:08 -0800 (PST) Received: from phantom.cris.net (phantom.cris.net [212.110.130.74]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5175E43D39 for ; Thu, 22 Jan 2004 01:13:05 -0800 (PST) (envelope-from ru@FreeBSD.org.ua) Received: from phantom.cris.net (ru@localhost [127.0.0.1]) by phantom.cris.net (8.12.10/8.12.10) with ESMTP id i0M9Doem023102; Thu, 22 Jan 2004 11:13:50 +0200 (EET) (envelope-from ru@FreeBSD.org.ua) Received: (from ru@localhost) by phantom.cris.net (8.12.10/8.12.10/Submit) id i0M9DoYu023097; Thu, 22 Jan 2004 11:13:50 +0200 (EET) (envelope-from ru) Date: Thu, 22 Jan 2004 11:13:49 +0200 From: Ruslan Ermilov To: Richard Bejtlich Message-ID: <20040122091349.GF21710@FreeBSD.org.ua> References: <20040121213833.57935.qmail@web60809.mail.yahoo.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lHGcFxmlz1yfXmOs" Content-Disposition: inline In-Reply-To: <20040121213833.57935.qmail@web60809.mail.yahoo.com> User-Agent: Mutt/1.5.5.1i cc: freebsd-security@freebsd.org Subject: Re: interface bonding X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Security issues [members-only posting] List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2004 09:13:08 -0000 --lHGcFxmlz1yfXmOs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 21, 2004 at 01:38:33PM -0800, Richard Bejtlich wrote: > Hello, >=20 > On 9 Jan 04 I posted a method for bonding interfaces > using netgraph for purposes of sniffing tap outputs as > a single virtual interface. Unfortunately, the method > I posted creates two copies of every packet. >=20 > I have used the following to successfully collect only > one copy of packets sent from the two TX streams of a > network tap: >=20 > #!/bin/sh > # sf2 and sf3 are real interfaces which receive tap=20 > # outputs; ngeth0 is created by ngctl >=20 > # ng_ether must be loaded so netgraph can "see" the=20 > # real interfaces sf2 and sf3 > kldload ng_ether >=20 > # bring up the real interfaces > ifconfig sf2 promisc -arp up > ifconfig sf3 promisc -arp up >=20 > # create ngeth0 and bind sf2 and sf3 to it > ngctl mkpeer . eiface hook ether > ngctl mkpeer ngeth0: one2many lower one > ngctl connect sf2: ngeth0:lower lower many0 > ngctl connect sf3: ngeth0:lower lower many1 >=20 > # bring up ngeth0 for sniffing duties > ifconfig ngeth0 -arp up >=20 > -- >=20 > Sorry for the confusion earlier. I appreciate any > comments on how to improve this method. Please check > my 9 Jan post to see the setup which created the dual > packets. >=20 This seems to work, too. I believe that duplication you observe with the old method where you've attached ng_eiface node instead of ng_ether node may have to do with a bug I've fixed month ago in src/sys/netgraph/ng_eiface.c,v 1.4.2.6, in RELENG_4. Can you check if using this revision and the old method solves the duplication? Cheers, --=20 Ruslan Ermilov FreeBSD committer ru@FreeBSD.org --lHGcFxmlz1yfXmOs Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAD5RNUkv4P6juNwoRAkaKAKCByeC6VL9LF0KhhkLSpC4Hh1tCSgCffshy vVqP15URBFwSUmkQTp8MPTY= =UWyw -----END PGP SIGNATURE----- --lHGcFxmlz1yfXmOs--