Hello, I've recently got a ral-based card and I have a problem in IBSS mode. It seems that ral fails to send any kind of packets larger than 200 bytes (192 bytes + 8 bytes icmp header).
I want to use my ral-based card to connect to the "freifunk" network in Berlin, Germany. ("Freifunk" can be roughly translated as "free radio" or "free wifi", both free as in speech ;-) The network spreads across large parts of the city, runs in IBSS mode, and each node on the network runs olsrd to maintain its routing table. See www.olsrexperiment.de for more information about the network itself. I'm running OpenBSD-current as of March 16th 2007 on an IBM Thinkpad X21 (see dmesg below). I originally found the problem on OpenBSD 4.0-stable, but the problem persists in -current. The ral card I have identifies as: ral0 at cardbus0 dev 0 function 0 "Ralink Technology, Inc., RT2500, 802.11 CardBus Reference Card": irq 11, address 00:0e:2e:5c:55:4f ral0: MAC/BBP RT2560 (rev 0x04), RF RT2525 It is in fact an Edimax EW-7128g, which is listed in the ral man page. I also have an Orinoco card (Hermes, not prism2), which I have been using with Freifunk successfully, in spite of occasional lock-ups which are fairly hard to reproduce (some people here may remember me failing to reproduce that bug at 23c3...) Anyway, this card identifies as: wi0 at pcmcia0 function 0 "Lucent Technologies, WaveLAN/IEEE, Version 01.01" port 0xa000/64 wi0: Firmware 8.72 variant 1, address 00:02:2d:9d:b9:3a This is what I do to configure the ral0 interface: # ifconfig ral0 mediaopt ibss nwid olsr.freifunk.net chan 10 \ 104.203.0.3 netmask 255.0.0.0 # ifconfig ral0 ral0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 lladdr 00:0e:2e:5c:55:4f groups: wlan media: IEEE802.11 autoselect ibss (autoselect mode 11g ibss) status: active ieee80211: nwid olsr.freifunk.net chan 10 bssid 02:ca:ff:ee:ba:be 100dBm inet 104.203.0.3 netmask 0xff000000 broadcast 104.255.255.255 inet6 fe80::20e:2eff:fe5c:554f%ral0 prefixlen 64 scopeid 0x7 Configuration of wi0 for completeness: # ifconfig wi0 mediaopt ibss nwid olsr.freifunk.net chan 10 \ 104.203.0.3 netmask 255.0.0.0 # ifconfig wi0 wi0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 lladdr 00:02:2d:9d:b9:3a media: IEEE802.11 autoselect ibss (DS11) status: active ieee80211: nwid olsr.freifunk.net chan 10 bssid 02:ca:ff:ee:ba:be -12dBm (auto) inet 104.203.0.3 netmask 0xff000000 broadcast 104.255.255.255 inet6 fe80::202:2dff:fe9d:b93a%wi0 prefixlen 64 scopeid 0x8 At this stage I run olsrd as root. The configuration of olsrd is outside the scope of this bug. It works well when I use my wi card. With the ral card it is able to build up the routing table correctly, but sending traffic over the link does not really work. This is what happens with ral: I can ping the internet up to -s 192: [EMAIL PROTECTED] ~ $ ping -c 3 130.133.110.70 PING 130.133.110.70 (130.133.110.70): 56 data bytes 64 bytes from 130.133.110.70: icmp_seq=0 ttl=47 time=324.002 ms 64 bytes from 130.133.110.70: icmp_seq=1 ttl=47 time=213.902 ms 64 bytes from 130.133.110.70: icmp_seq=2 ttl=47 time=318.198 ms --- 130.133.110.70 ping statistics --- 3 packets transmitted, 3 packets received, 0.0% packet loss round-trip min/avg/max/std-dev = 213.902/285.367/324.002/50.591 ms [EMAIL PROTECTED] ~ $ ping -c 3 -s 192 130.133.110.70 PING 130.133.110.70 (130.133.110.70): 192 data bytes 200 bytes from 130.133.110.70: icmp_seq=0 ttl=47 time=305.489 ms 200 bytes from 130.133.110.70: icmp_seq=1 ttl=47 time=215.243 ms 200 bytes from 130.133.110.70: icmp_seq=2 ttl=47 time=286.799 ms --- 130.133.110.70 ping statistics --- 3 packets transmitted, 3 packets received, 0.0% packet loss round-trip min/avg/max/std-dev = 215.243/269.177/305.489/38.892 ms Partial output of tcpdump -i ral0: 11:13:26.656527 104.203.0.3 > 130.133.110.70: icmp: echo request 11:13:26.658554 104.203.0.3 > 130.133.110.70: icmp: echo request 11:13:26.961810 130.133.110.70 > 104.203.0.3: icmp: echo reply 11:13:27.660186 104.203.0.3 > 130.133.110.70: icmp: echo request 11:13:27.662065 104.203.0.3 > 130.133.110.70: icmp: echo request 11:13:27.875321 130.133.110.70 > 104.203.0.3: icmp: echo reply 11:13:28.670163 104.203.0.3 > 130.133.110.70: icmp: echo request 11:13:28.672040 104.203.0.3 > 130.133.110.70: icmp: echo request 11:13:28.956871 130.133.110.70 > 104.203.0.3: icmp: echo reply At -s 193 I get 100% packet loss, and tcpdump reports 1 missing byte per packet: [EMAIL PROTECTED] ~ $ ping -c 3 -s 193 130.133.110.70 PING 130.133.110.70 (130.133.110.70): 193 data bytes --- 130.133.110.70 ping statistics --- 3 packets transmitted, 0 packets received, 100.0% packet loss Partial output of tcpdump -i ral0: 11:09:35.885291 truncated-ip - 1 bytes missing!104.203.0.3 > 130.133.110.70: icmp: echo request 11:09:35.926441 truncated-ip - 1 bytes missing!104.203.0.3 > 130.133.110.70: icmp: echo request 11:09:36.291134 truncated-ip - 1 bytes missing!130.133.110.70 > 104.203.0.3: icmp: echo reply 11:09:36.872721 104.203.0.3 > 130.133.110.70: icmp: echo request 11:09:36.874615 truncated-ip - 1 bytes missing!104.203.0.3 > 130.133.110.70: icmp: echo request 11:09:37.281383 truncated-ip - 1 bytes missing!130.133.110.70 > 104.203.0.3: icmp: echo reply 11:09:37.882778 104.203.0.3 > 130.133.110.70: icmp: echo request 11:09:38.105818 truncated-ip - 1 bytes missing!130.133.110.70 > 104.203.0.3: icmp: echo reply DNS lookups don't really work either: [EMAIL PROTECTED] ~ $ lynx www.de.openbsd.org Lynx hangs at looking up the hostname. Partial output of tcpdump -i ral0: 11:11:13.778907 truncated-ip - 50 bytes missing!130.133.110.70.53 > 104.203.0.3.13804: 41614 2/4/0 CNAME[|domain] (DF) 11:11:13.779017 0:14:bf:1c:43:1 sap 0a > 0:e:2e:5c:55:4f sap 31 I (s=52,r=55,C) len=46 11:11:13.779751 truncated-ip - 50 bytes missing!130.133.110.70.53 > 104.203.0.3.45430: 41614 2/4/0 CNAME[|domain] (DF) 11:11:13.779953 0:14:bf:1c:43:1 sap 0a > 0:e:2e:5c:55:4f sap 31 I (s=52,r=55,C) len=46 11:11:23.232631 104.203.0.3.40919 > 130.133.110.70.53: 41614+ AAAA? www.de.openbsd.org. (36) 11:11:23.233869 104.203.0.3.40919 > 130.133.110.70.53: 41614+ AAAA? www.de.openbsd.org. (36) 11:11:23.440952 truncated-ip - 50 bytes missing!130.133.110.70.53 > 104.203.0.3.40919: 41614 2/4/0 CNAME[|domain] (DF) 11:11:23.441055 0:14:bf:1c:43:1 sap 66 > 0:e:2e:5c:55:4f sap 72 I (s=96,r=40,F) len=46 11:11:43.242300 104.203.0.3.7429 > 130.133.110.70.53: 41614+ AAAA? www.de.openbsd.org. (36) 11:11:43.243411 104.203.0.3.7429 > 130.133.110.70.53: 41614+ AAAA? www.de.openbsd.org. (36) 11:11:43.582319 truncated-ip - 50 bytes missing!130.133.110.70.53 > 104.203.0.3.7429: 41614 2/4/0 CNAME[|domain] ( HTTP has no chance at all, both links and firefox simply time out at some point. [EMAIL PROTECTED] ~ $ lynx 131.188.40.91 Partial output of tcpdump -i ral0: 11:14:55.527729 104.203.0.3.38086 > 131.188.40.91.80: S 2318808020:2318808020(0) win 16384 <mss 1460,nop,nop,sackOK,nop,wscale 0,nop,nop,timestamp 416381723 6 0> (DF) 11:14:55.528914 104.203.0.3.38086 > 131.188.40.91.80: S 2318808020:2318808020(0) win 16384 <mss 1460,nop,nop,sackOK,nop,wscale 0,nop,nop,timestamp 416381723 6 0> (DF) 11:14:55.828601 131.188.40.91.80 > 104.203.0.3.38086: S 3767429056:3767429056(0) ack 2318808021 win 16384 <mss 1402,nop,nop,sackOK,nop,wscale 0,nop,nop,time stamp 284951356 4163817236> (DF) 11:14:55.828666 104.203.0.3.38086 > 131.188.40.91.80: . ack 1 win 16384 <nop,nop,timestamp 4163817236 284951356> (DF) 11:14:55.829554 104.203.0.3.38086 > 131.188.40.91.80: . ack 1 win 16384 <nop,nop,timestamp 4163817236 284951356> (DF) 11:14:55.836798 104.203.0.3.38086 > 131.188.40.91.80: P 1:345(344) ack 1 win 16384 <nop,nop,timestamp 4163817236 284951356> (DF) 11:14:55.842672 truncated-ip - 176 bytes missing!104.203.0.3.38086 > 131.188.40.91.80: P 1:169(168) ack 1 win 16384 <nop,nop,timestamp 4163817236 284951356> (DF) 11:14:55.843224 0:14:bf:1c:43:1 sap 68 > 0:f:66:c8:79:86 sap 20 03 (r=48,R) len=172 11:14:56.286906 truncated-ip - 1222 bytes missing!131.188.40.91.80 > 104.203.0.3.38086: . 1:169(168) ack 345 win 16680 <nop,nop,timestamp 284951357 0> (DF) 11:14:56.287024 0:14:bf:1c:43:1 sap 62 > 0:e:2e:5c:55:4f sap 35 I (s=48,r=50,R) len=224 11:14:56.287160 0:14:bf:1c:43:1 sap 2e > 0:e:2e:5c:55:4f sap 3c rej (r=52,R) len=224 11:14:56.287298 0:14:bf:1c:43:1 sap 64 > 0:e:2e:5c:55:4f sap 74 I (s=55,r=58,F) len=224 11:14:56.287435 0:14:bf:1c:43:1 sap 62 > 0:e:2e:5c:55:4f sap 3c sabme/C len=225 11:14:56.287572 0:14:bf:1c:43:1 sap 3e > 0:e:2e:5c:55:4f sap 64 I (s=16,r=16,C) len=224 11:14:56.287687 0:14:bf:1c:43:1 sap 2e > 0:e:2e:5c:55:4f sap 78 I (s=52,r=58,P) len=78 11:14:56.288030 truncated-ip - 1222 bytes missing!131.188.40.91.80 > 104.203.0.3.38086: . 1391:1559(168) ack 345 win 16680 <nop,nop,timestamp 284951357 0> (DF) 11:14:56.288165 0:14:bf:1c:43:1 sap 6e > 0:e:2e:5c:55:4f sap 72 rnr (r=50,R) len=224 11:14:56.288302 0:14:bf:1c:43:1 sap 3c > 0:e:2e:5c:55:4f sap 3b I (s=48,r=16,C) len=224 11:14:56.288439 0:14:bf:1c:43:1 sap 6e > 0:e:2e:5c:55:4f sap 70 I (s=57,r=58,F) len=224 11:14:56.288587 0:14:bf:1c:43:1 sap 68 > 0:e:2e:5c:55:4f sap 6c 03 (r=51,R) len=224 11:14:56.288713 0:14:bf:1c:43:1 sap 2c > 0:e:2e:5c:55:4f sap 69 rr (r=52,R) len=224 11:14:56.288828 0:14:bf:1c:43:1 sap 6e > 0:e:2e:5c:55:4f sap 26 rr (r=57,P) len=78 11:14:56.292938 truncated-ip - 1222 bytes missing!131.188.40.91.80 > 104.203.0.3.38086: . 2781:2949(168) ack 345 win 16680 <nop,nop,timestamp 284951357 0> (DF) I have verified that the problem does not occur in infrastructure mode, the AP being another OpenBSD host with a ral-based PCI card. Configuration on the client: # ifconfig ral0 nwid raltest 10.0.0.2 netmask 255.255.255.0 # ifconfig ral0 lladdr 00:0e:2e:5c:55:4f groups: wlan egress media: IEEE802.11 autoselect (DS1 mode 11g) status: active ieee80211: nwid raltest chan 6 bssid 00:0e:2e:96:3b:b5 100dB 100dBm inet 10.0.0.2 netmask 0xffffff00 broadcast 10.0.0.255 inet6 fe80::20e:2eff:fe5c:554f%ral0 prefixlen 64 scopeid 0xb # route add default 10.0.0.1 ping -s 193 works (albeit the signal to the AP sucks): [EMAIL PROTECTED] ~ $ ping -c 3 -s 193 130.133.110.70 PING 130.133.110.70 (130.133.110.70): 193 data bytes 201 bytes from 130.133.110.70: icmp_seq=0 ttl=46 time=242.424 ms 201 bytes from 130.133.110.70: icmp_seq=1 ttl=46 time=146.995 ms 201 bytes from 130.133.110.70: icmp_seq=2 ttl=46 time=134.086 ms --- 130.133.110.70 ping statistics --- 3 packets transmitted, 3 packets received, 0.0% packet loss round-trip min/avg/max/std-dev = 134.086/174.501/242.424/48.319 ms And I can also browse www.de.openbsd.org just fine in infrastructure mode. dmesg: OpenBSD 4.1-current (GENERIC) #0: Fri Mar 16 02:32:22 CET 2007 [EMAIL PROTECTED]:/home/stsp/GENERIC cpu0: Intel Pentium III ("GenuineIntel" 686-class) 698 MHz cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE real mem = 267939840 (261660K) avail mem = 236797952 (231248K) using 3301 buffers containing 13520896 bytes (13204K) of memory mainbus0 (root) bios0 at mainbus0: AT/286+ BIOS, date 10/19/01, BIOS32 rev. 0 @ 0xfd820, SMBIOS rev. 2.3 @ 0xdc010 (47 entries) bios0: IBM 266261G apm0 at bios0: Power Management spec V1.2 apm0: AC on, battery charge unknown apm0: flags 30102 dobusy 0 doidle 1 pcibios0 at bios0: rev 2.1 @ 0xfd7b0/0x850 pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfdee0/208 (11 entries) pcibios0: PCI Interrupt Router at 000:07:0 ("Intel 82371FB ISA" rev 0x00) pcibios0: PCI bus #5 is the last bus bios0: ROM list: 0xc0000/0xd000! 0xcd000/0x1800 0xd8000/0x4000! 0xdc000/0x1000! acpi at mainbus0 not configured cpu0 at mainbus0 pci0 at mainbus0 bus 0: configuration mode 1 (no bios) pchb0 at pci0 dev 0 function 0 "Intel 82443BX AGP" rev 0x03 ppb0 at pci0 dev 1 function 0 "Intel 82443BX AGP" rev 0x03 pci1 at ppb0 bus 1 vga1 at pci1 dev 0 function 0 "ATI Mobility 1" rev 0x64 wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation) wsdisplay0: screen 1-5 added (80x25, vt100 emulation) pcib0 at pci0 dev 7 function 0 "Intel 82371AB PIIX4 ISA" rev 0x02 pciide0 at pci0 dev 7 function 1 "Intel 82371AB IDE" rev 0x01: DMA, channel 0 wired to compatibility, channel 1 wired to compatibility wd0 at pciide0 channel 0 drive 0: <IBM-DJSA-220> wd0: 16-sector PIO, LBA, 19077MB, 39070080 sectors wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2 pciide0: channel 1 disabled (no drives) uhci0 at pci0 dev 7 function 2 "Intel 82371AB USB" rev 0x01: irq 11 usb0 at uhci0: USB revision 1.0 uhub0 at usb0 uhub0: Intel UHCI root hub, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered piixpm0 at pci0 dev 7 function 3 "Intel 82371AB Power" rev 0x03: SMI iic0 at piixpm0 cbb0 at pci0 dev 8 function 0 "Ricoh 5C476 CardBus" rev 0x80: irq 11 cbb1 at pci0 dev 8 function 1 "Ricoh 5C476 CardBus" rev 0x80: irq 11 fxp0 at pci0 dev 10 function 0 "Intel 8255x" rev 0x0c, i82550: irq 11, address 00:03:47:81:88:f6 inphy0 at fxp0 phy 1: i82555 10/100 PHY, rev. 4 "AT&T/Lucent LTMODEM" rev 0x01 at pci0 dev 10 function 1 not configured clct0 at pci0 dev 11 function 0 "Cirrus Logic CS4281 CrystalClear" rev 0x01 irq 11 ac97: codec id 0x43525914 (Cirrus Logic CS4297A rev 4) ac97: codec features headphone, 20 bit DAC, 18 bit ADC, Crystal Semi 3D audio0 at clct0 isa0 at pcib0 isadma0 at isa0 pckbc0 at isa0 port 0x60/5 pckbd0 at pckbc0 (kbd slot) pckbc0: using irq 1 for kbd slot wskbd0 at pckbd0: console keyboard, using wsdisplay0 pms0 at pckbc0 (aux slot) pckbc0: using irq 12 for aux slot wsmouse0 at pms0 mux 0 pcppi0 at isa0 port 0x61 midi0 at pcppi0: <PC speaker> spkr0 at pcppi0 lpt2 at isa0 port 0x3bc/4: polled npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16 pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo fdc0 at isa0 port 0x3f0/6 irq 6 drq 2 cardslot0 at cbb0 slot 0 flags 0 cardbus0 at cardslot0: bus 2 device 0 cacheline 0x0, lattimer 0xb0 pcmcia0 at cardslot0 cardslot1 at cbb1 slot 1 flags 0 cardbus1 at cardslot1: bus 5 device 0 cacheline 0x0, lattimer 0xb0 pcmcia1 at cardslot1 biomask efed netmask efed ttymask ffef pctr: 686-class user-level performance counters enabled mtrr: Pentium Pro MTRR support ral0 at cardbus0 dev 0 function 0 "Ralink Technology, Inc., RT2500, 802.11 CardBus Reference Card": irq 11, address 00:0e:2e:5c:55:4f ral0: MAC/BBP RT2560 (rev 0x04), RF RT2525 dkcsum: wd0 matches BIOS drive 0x80 root on wd0a rootdev=0x0 rrootdev=0x300 rawdev=0x302 ral0 detached wi0 at pcmcia0 function 0 "Lucent Technologies, WaveLAN/IEEE, Version 01.01" port 0xa000/64 wi0: Firmware 8.72 variant 1, address 00:02:2d:9d:b9:3a -- stefan http://stsp.in-berlin.de PGP Key: 0xF59D25F0