Hello Reader......
I've been attempting to make a wireless bridge for the past wee while... I started with Freesco and made great progress until I found out vTun wouldn't work on a 2.0.# kernel, so I started again this time opting for a 850 MB HDD and redhat 6.2.
I'm pretty much there... Wireless works and I can ping either side of the wireless network and ping out from eth0 to the other two networks (providing I set an IP!). So I'm happy things are going and connecting under the correct circumstances.
My issue is with brcfg (perhaps).. I can creat a Virutal tunnel to either side but am unable to bridge, this may be due to my setup or the fact that eth1 (wireless) has an IP in order to create the tunnel.
I know this config (or a variation of it) works, as I am basing it on a disk I downloaded a couple of years ago, that transparently bridged using ne2k and wavelan2_cs drivers with vtun and brcfg. Please find my configuration below and I'd love any advice you can offer.
In relation to the previously working bridge which died due to floppy, I unfortunately lost my backup of the 2nd floppy disk due to a HDD crash just a month before the bridge actually went down, I have an .img of the first disk should anyone like that for reference.... anyways, my current setup and output.
Eth0 ne2k-pci
Eth1 wavelan2_cs
Network 1 <---->Eth0,Bridge1,Eth1<---->Eth1,Bridge2,Eth0<---->Network2
Network 1 192.168.1.1 - 192.168.1.100
Network 2 192.168.1.101 - 192.168.1.254
Bridge 1 Eth 0 - Promisc Mode
Bridge 1 Eth 1 - 195.113.141.253
Bridge 2 Eth 1 - 195.113.141.254
Bridge 2 Eth 0 - Promisc Mode
I created a script to start the Bridge for testing rather than running from inittab.
/etc/rc.d/rc.bridge (both client and server configs)
-------------------------
#!/bin/sh
# Client Config
sleep 4
ifconfig eth1 195.113.141.254 netmask 255.255.255.252 broadcast 255.255.255.255 up
route add default gw 195.113.141.253 eth1
vtund -n -f /etc/vtund.conf ivk-br 195.113.141.253
-------------------------
#!/bin/sh
# Server Config
sleep 4
ifconfig eth1 195.113.141.253 netmask 255.255.255.252 broadcast 255.255.255.255 up
route add default gw 195.113.141.254 eth1
vtund -n -f -s /etc/vtund.conf ivk-br 195.113.141.254
-------------------------
Vtund.conf
#vtun.conf
#
#
options {
port 6060; # Listen on this port.
# Path to various programs
ifconfig /sbin/ifconfig;
route /sbin/route;
persist yes;
}
ivk-br {
passwd password;
compress no;
speed 0;
encrypt yes;
proto udp;
type ether;
keepalive yes;
up {
ifconfig "%% up";
ifconfig "eth0 promisc up";
program /sbin/brcfg "start" wait;
};
down {
program /sbin/brcfg "stop" wait;
ifconfig "eth0 -promisc down";
ifconfig "%% down";
};
}
-------------------------
#/etc/PCMCIA
#config.opts
Include Memory + IRQ STuff.....
module "wavelan2_cs" opts "port_type=3 station_name=bridge1" (bridge2 for bridge 2 :-)
-------------------------
/etc/pcmcia/network contains exit 0 only.
-------------------------
On boot not network interfaces are up.
-------------------------
After running rc.bridge
vtund[470]: VTun client ver 03/23/2003 started
vtund[470]: Connecting to 195.113.141.253
vtund[470]: Session ivk-br[195.113.141.253] opened
vtund[470]: UDP connection initialized
vtund[470]: BlowFish encryption initialized
-------------------------
TCPDUMP
00:06:24.211409 eth1 > bridge2.1025 > bridge1.6060: udp 2
00:06:24.213347 eth1 < bridge1.6060 > bridge2.1025: udp 2
00:06:29.211260 eth1 > arp who-has bridge1 tell bridge2 (0:60:1d:f7:a:3b)
00:06:29.213023 eth1 < arp reply bridge1 is-at 0:60:1d:22:e6:f1 (0:60:1d:f7:a:3b)
00:06:41.644174 eth1 < bridge1 > bridge2: icmp: echo request
00:06:41.644319 eth1 > bridge2 > bridge1: icmp: echo reply
00:06:42.637740 eth1 < bridge1 > bridge2: icmp: echo request
00:06:42.637834 eth1 > bridge2 > bridge1: icmp: echo reply
00:06:46.637626 eth1 < arp who-has bridge2 tell bridge1
00:06:46.637687 eth1 > arp reply bridge2 (0:60:1d:f7:a:3b) is-at 0:60:1d:f7:a:3b (0:60:1d:22:e6:f1)
-------------------------
ifconfig
eth0 Link encap:Ethernet HWaddr 00:4F:49:00:71:9C
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
Interrupt:11 Base address:0x6000
eth1 Link encap:Ethernet HWaddr 00:60:1D:F7:0A:3B
inet addr:195.113.141.254 Bcast:255.255.255.255 Mask:255.255.255.252
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:30 errors:0 dropped:0 overruns:0 frame:0
TX packets:33 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
Interrupt:3 Base address:0x100
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:3924 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
tap0 Link encap:Ethernet HWaddr 00:FF:01:75:27:01
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
-------------------------
lsmod
Module Size Used by
nls_iso8859-1 2240 1 (autoclean)
nls_cp437 3748 1 (autoclean)
vfat 9500 1 (autoclean)
fat 31168 1 (autoclean) [vfat]
tun 2668 1
wavelan2_cs 30264 1
ds 6376 2 [wavelan2_cs]
i82365 21964 2
pcmcia_core 45280 0 [wavelan2_cs ds i82365]
ne2k-pci 4716 1 (autoclean)
8390 6136 0 (autoclean) [ne2k-pci]
--------------------------
brcfg
bridging is ENABLED STP is ENABLED
debugging is DISABLED prot-stats are DISABLED
bridge id 0x0080 00:60:1d:f7:0a:3b
designated root 0x0080 00:60:1d:f7:0a:3b
bridge max age 20 max age 20
bridge hello time 2 hello time 2
bridge forward delay 15 forward delay 15
root path cost 0 root port 0
flags NONE
--- port stats ---
Policy Accept all protocols
exempt protocols 0
--------------------------
last but not lest dmesg
Linux version 2.2.14-5.0 (root@bridge1) (gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)) #1 Tue May 6 18:13:42 NZST 2003
Detected 100229095 Hz processor.
Console: colour VGA+ 80x25
Calibrating delay loop... 39.94 BogoMIPS
Memory: 30560k/32768k available (1096k kernel code, 408k reserved, 640k data, 64k init, 0k bigmem)
Dentry hash table entries: 262144 (order 9, 2048k)
Buffer cache hash table entries: 32768 (order 5, 128k)
Page cache hash table entries: 8192 (order 3, 32k)
VFS: Diskquotas version dquot_6.4.0 initialized
CPU: Intel Pentium 75 - 200 stepping 06
Checking 386/387 coupling... OK, FPU using exception 16 error reporting.
Checking 'hlt' instruction... OK.
Intel Pentium with F0 0F bug - workaround enabled.
POSIX conformance testing by UNIFIX
PCI: PCI BIOS revision 2.10 entry at 0xfb360
PCI: Using configuration type 1
PCI: Probing PCI hardware
Linux NET4.0 for Linux 2.2
Based upon Swansea University Computer Society NET3.039
NET4: Unix domain sockets 1.0 for Linux NET4.0.
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
TCP: Hash tables configured (ehash 32768 bhash 32768)
Initializing RT netlink socket
Starting kswapd v 1.5
Detected PS/2 Mouse Port.
Serial driver version 4.27 with MANY_PORTS MULTIPORT SHARE_IRQ enabled
ttyS00 at 0x03f8 (irq = 4) is a 16550A
ttyS01 at 0x02f8 (irq = 3) is a 16550A
pty: 256 Unix98 ptys configured
apm: BIOS version 1.2 Flags 0x07 (Driver version 1.9)
Real Time Clock Driver v1.09
RAM disk driver initialized: 16 RAM disks of 4096K size
PIIX3: IDE controller on PCI bus 00 dev 39
PIIX3: not 100% native mode: will probe irqs later
ide0: BM-DMA at 0xf000-0xf007, BIOS settings: hda

io, hdb

io
ide1: BM-DMA at 0xf008-0xf00f, BIOS settings: hdc

io, hdd

io
hda: QUANTUM TRB850A, ATA DISK drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
hda: QUANTUM TRB850A, 810MB w/96kB Cache, CHS=823/32/63
Floppy drive(s): fd0 is 1.44M
FDC 0 is a post-1991 82077
md driver 0.90.0 MAX_MD_DEVS=256, MAX_REAL=12
raid5: measuring checksumming speed
8regs : 106.680 MB/sec
32regs : 78.105 MB/sec
using fastest function: 8regs (106.680 MB/sec)
scsi : 0 hosts.
scsi : detected total.
NET4: Ethernet Bridge 007 for NET4.0
early initialization of device brg0 is deferred
brg0: network interface for Ethernet Bridge 007/NET4.0
brg0: generated MAC address FE:FD:0A:27:44:11
brg0: attached to bridge instance 0
md.c: sizeof(mdp_super_t) = 4096
Partition check:
hda: hda1 hda2 < hda5 >
autodetecting RAID arrays
autorun ...
... autorun DONE.
VFS: Mounted root (ext2 filesystem) readonly.
Freeing unused kernel memory: 64k freed
Adding Swap: 66488k swap-space (priority -1)
ne2k-pci.c:vpre-1.00e 5/27/99 D. Becker/P. Gortmaker
http://cesdis.gsfc.nasa.gov/linux/drivers/ne2k-pci.html
ne2k-pci.c: PCI NE2000 clone 'RealTek RTL-8029' at I/O 0x6000, IRQ 11.
eth0: RealTek RTL-8029 found at 0x6000, IRQ 11, 00:4F:49:00:71:9C.
Linux PCMCIA Card Services 3.1.25
kernel build: 2.2.14-5.0 #1 Tue Mar 7 20:53:41 EST 2000
options: [pci] [cardbus] [apm]
Intel PCIC probe:
Vadem VG-469 rev 00 ISA-to-PCMCIA at port 0x3e2 ofs 0x00
host opts [0]: none
host opts [1]: none
ISA irqs (scanned) = 3,4,5,7,9,12,15 status change on irq 15
cs: memory probe 0x0d0000-0x0dffff: clean.
Linux ORiNOCO driver, Variant 1, Version 6.16
cs: IO port probe 0x0100-0x04ff: excluding 0x170-0x177 0x370-0x37f 0x3b8-0x3e7 0x4d0-0x4d7
cs: IO port probe 0x0178-0x036f: clean.
cs: IO port probe 0x0380-0x03b7: clean.
cs: IO port probe 0x03e8-0x04cf: clean.
cs: IO port probe 0x04d8-0x04ff: clean.
cs: IO port probe 0x0a00-0x0aff: excluding 0xaf8-0xaff
cs: IO port probe 0x1000-0x17ff: excluding 0x12f8-0x12ff 0x1378-0x137f 0x13f0-0x13ff 0x16f8-0x16ff 0x1778-0x177f 0x17f0-0x17ff
cs: IO port probe 0x1300-0x1377: clean.
cs: IO port probe 0x1380-0x13ef: clean.
cs: IO port probe 0x1400-0x16f7: clean.
cs: IO port probe 0x1700-0x1777: clean.
cs: IO port probe 0x1780-0x17ef: clean.
eth1: ORiNOCO, Station Functions firmware, Variant 1, Version 6.04
eth1: ORiNOCO, io_addr 0x100, irq 3, mac_address 00:60:1D:F7:0A:3B
Universal TUN/TAP device driver 1.1 05/06/2003 (c) Maxim Krasnyansky
VFS: Disk change detected on device fd(2,0)
device eth0 entered promiscuous mode
br: enabling bridging function
VFS: Disk change detected on device fd(2,0)
---------------------------
Well hope someone can help me! :-))
Now I realise that bridging is at a layer not requring IP and am thinking strongly that this is part of the reason that the brcfg can't pass packets through, but I'm unable to work out as to why this previous disk could do the job, perhaps I set the TAP0 interface into promisc? Looking forward to your assistance. Please CC me at
spike@no.spam.please.efiftyfive.com
Thanks in advance
chimaster