From owner-freebsd-net Thu Aug 24 14:40:22 2000 Delivered-To: freebsd-net@freebsd.org Received: from whistle.com (s205m131.whistle.com [207.76.205.131]) by hub.freebsd.org (Postfix) with ESMTP id 0780237B422 for ; Thu, 24 Aug 2000 14:40:21 -0700 (PDT) Received: (from smap@localhost) by whistle.com (8.10.0/8.10.0) id e7OLeK101200 for ; Thu, 24 Aug 2000 14:40:20 -0700 (PDT) Received: from bubba.whistle.com( 207.76.205.7) by whistle.com via smap (V2.0) id xma001197; Thu, 24 Aug 2000 14:40:11 -0700 Received: (from archie@localhost) by bubba.whistle.com (8.9.3/8.9.3) id OAA02091 for freebsd-net@freebsd.org; Thu, 24 Aug 2000 14:40:11 -0700 (PDT) (envelope-from archie) From: Archie Cobbs Message-Id: <200008242140.OAA02091@bubba.whistle.com> Subject: "poor man's bridging" To: freebsd-net@freebsd.org Date: Thu, 24 Aug 2000 14:40:11 -0700 (PDT) X-Mailer: ELM [version 2.4ME+ PL82 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On the topic of bridging.. Today I realized today that you can do "poor man's bridging" between two interfaces very easily, without even having "options BRIDGE" in your kernel config! Just use something like this script.. #!/bin/sh # Replace with your interface names IF1="de0" IF2="de1" kldstat -v | grep -wq ng_ether || kldload ng_ether ngctl connect ${IF1}: ${IF2}: lower lower ngctl msg ${IF1}: setautosrc 0 ngctl msg ${IF2}: setautosrc 0 ngctl msg ${IF1}: setpromisc 1 ngctl msg ${IF2}: setpromisc 1 ifconfig ${IF1} up ifconfig ${IF2} up Just make sure you don't physically connect the two ports, or you'll get one heck of a packet storm (that's why this is "poor man's bridging" -- no loop detection or intelligent bridging). By inserting a ng_tee(4) node, you could have it so the local machine is able to talk as well (exercise left to the reader :-) -Archie ___________________________________________________________________________ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message