|
NAMEbittwistb -- pcap based ethernet bridgeSYNOPSISbittwistb [ -dvh ] [ -i interfaces ]DESCRIPTIONThis document describes the bittwistb program, the pcap(3) based Ethernet bridge. Bittwistb is designed to allow a single host to do bridging on independent sets of Ethernet-type interfaces under Ethernet II (IEEE 802.3) network with a MTU of up to 1500 bytes. Since bittwistb uses functions provided by pcap(3) library, e.g. pcap_open_live() and pcap_inject(), to capture and write packets, it may require that you have special privileges, e.g. read access to /dev/bpf* on BSD or root access on Linux, to do the bridging or to enumerate network devices with, for example, the -d flag.Bittwistb works by polling, poll(2), for packets on all of the interfaces supplied to the -i flag and forward them from one interface to another according to the bridging rules below:
Bittwistb terminates when it receives an interrupt signal, SIGINT, which is typically generated by typing Control-C. OPTIONS
EXAMPLESBittwistb will, if run with the -v flag, print forwarding information as shown in the example below:
Line numbers are not visible in the actual output. MAC addresses and ports associated with the interfaces supplied to the -i flag are printed at line 2 and 3. At line 4, a new MAC address is stored in the bridging hash table at index 57451. This MAC address belongs to a host which resides on port 1, i.e. the first LAN segment. At line 5, a broadcast packet is forwarded out through all ports except port 1 of which the source MAC address resides on, hence the outport=2. At line 6, a new MAC address which belongs to a host in the first LAN segment is stored at index 56851. At line 7, a multicast packet is forwarded out through all ports except port 1 of which the source MAC address resides on, hence the outport=2. At line 8 and 9, entry 56851 and 57451 are removed from the hash table after approximately 5 minutes. Under normal use, we do not recommend running bittwistb with the -v flag set as this may result in a poor bridging performance due to the standard I/O operation. SEE ALSObittwist(1), bittwiste(1), pcap(3), tcpdump(1)BUGSFile your bug report and send to:
Make sure you are using the latest stable version before submitting your bug report. If a known host relocates to another LAN segment, bittwistb will continue to forward packets destined to the host through its old LAN segment. The presence of this host in a new LAN segment is known only after at most 5 minutes. COPYRIGHTCopyright (C) 2006 - 2011 Addy Yeow Chin Heng <ayeowch@gmail.com>This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. AUTHORSOriginal author and current maintainer:
The current version is available from http://bittwist.sourceforge.net
Visit the GSP FreeBSD Man Page Interface. |