Date: Thu, 24 Aug 2000 14:40:11 -0700 (PDT) From: Archie Cobbs <archie@whistle.com> To: freebsd-net@freebsd.org Subject: "poor man's bridging" Message-ID: <200008242140.OAA02091@bubba.whistle.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200008242140.OAA02091>
