Sunday, November 27, 2005

Freifunk roundup.

The Freifunk software has run for a good while now, without problems. Usually there was a PC wired to the LAN port of the "remote" WRT54G and a laptop regularly accessed wirelessly. My query about the DHCP server was resolved when I noticed one of the WRT's (the downstairs one with the WAN connection) was set to "802.11g only" mode and I had at one point been using an 11b card.

Ran some tests to see if the rumours that 802.11g reverts to 802.11b in ad-hoc or peer-to-peer mode. Allegedly the 802.11g standard says nothing about ad-hoc beyond that defined for 802.11b.

With a Belkin "54g" card in the laptop talking direct to the Belkin router the speed registered by the netIQ Qcheck utility was 12.1 Mbits/s for TCP/IP traffic and 6.3 to 7.5 Mbits/s for UDP packets.

Running the same endpoints over the Freifunk system the speed fell to 9.1-9.3 Mbits/s for TCP/IP and about half that (4.4-4.5 Mbits/s) for UDP. Setting everything to "802.11g only" mode made no difference.

In this configuration the routing is :-

laptop-wireless-wrt54g-wireless-wrt54g-wired-router-wired-PC with both wireless links in ad-hoc mode. The 9 Mbps speed debunks the idea that ad-hoc is only at 802.11b speeds.

Setting the "Frame Burst" parameter to "enable" gave a speed uplift over the previous result - 11.2-11.5 Mbits/s for TCP/IP and 4.5-4.8 Mbps for UDP. The frame burst mode is supposed to increase throughput for a small number of wireless devices, but can be detrimental with lots of wireless clients. In my case it added about 20% to the TCP/IP throughput.

Setting the laptop to talk to the "gateway" WRT54g eliminated one of the ad-hoc wireless hops and gave 12 Mbits/s on TCP/IP with about 6.8 Mbits/s for UDP. The inefficiency of having extra devices en-route seems to affect UDP most.

Changing to an 802.11b card on the laptop gave a UDP rate of 1.2 Mbits/s fairly consistently. TCP/IP on the other hand was all over the place, from as little as 250 kbits/s up to around 700 kbits/s. Something fell apart when 802.11b was added to the mix. Perhaps I should look at this again sometime.

Meanwhile, its time to move on to another firmware !

Next stop is DD-WRT as Tom of SWBB has been having some success with its WDS mode.

Monday, November 14, 2005

Freifunk success.

To address the DHCP question I hunted around and eventually found this site which describes making a small mesh of WRT54Gs with Freifunk firmware. The Marseille-Wireless site was very helpful with its screen shots and an IP subnetting tool was invaluable.

What I learned was that the OLSR DHCP facility gives out IP addresses to anything requesting them and that you configure a range of addresses to be available from each WRT that doesn't clash with others. The first IP address in the subnet identifies the network, the next one is used for the wireless side of the WRT (set manually as a fixed IP) and subsequent ones are given out up to the last one which is used as a broadcast address.

So, as an example, 192.168.3.16/29;255.255.255.248 is entered into the OLSR/DHCP field of the setup page. This range covers addresses 192.168.3.16 to 192.168.3.23 of which .17 is used for the WRT, .23 is the broadcast address and .18 through .22 are available for DHCP clients such as passing laptops.

My first attempt was to use these ranges but with the wireless side of the WRT set to my previous addresses, which then fell outside the OLSR DHCP range.

With the WRT set to the correct addresses the laptop was able to collect an IP address by DHCP, for some reason it picked up the address from the downstairs WRT even though it was sat next to the upstairs one. It is not clear if this was chance (both would have been in range) or if the OLSR/DHCP address is only given out by WRTs that have an active WAN port connection to the internet ie only gateways do DHCP and point the client to themselves as default gateway.

With that issue resolved the Freifunk setup appeared to be working as it should, with internet access provided seemlessly by the ad-hoc wireless network and OLSR routing looking after the how and why.

My final activity with this firmware will be to test performance and see if I can deduce the rules about which WRT hands out the OLSR/DHCP addresses.

The network IP addressing as finalised is shown below.


Thursday, November 10, 2005

Totally wireless

Set the laptop up to join the ad-hoc wireless network between the two WRT54g units. There was a small hitch in that an IP address wasn't allocated to the laptop, so I set a manual default fallback one.

An ADSLguide speed test from the laptop gave :-

Direction Actual Speed True Speed (estimated)
Downstream 1854 Kbps (231.8 KB/sec) 2002 Kbps (inc. overheads)
Upstream 125 Kbps (15.6 KB/sec) 135 Kbps (inc. overheads)

a tracert shows :-

C:\Documents and Settings\Phil>tracert 10.0.0.2

Tracing route to BelkinModem.yarwell.demon.co.uk [10.0.0.2]
over a maximum of 30 hops:

1 1 ms 1 ms 1 ms 192.168.3.10
2 2 ms 2 ms 3 ms 192.168.3.1
3 3 ms 3 ms 3 ms BelkinModem.yarwell.demon.co.uk [10.0.0.2]

Trace complete.

So we can see that the upstairs WRT is routing the packets to the downstairs and hence on the wired LAN to the Belkin ADSL modem / router. The upstairs unit 192.168.3.10 is set as the default gateway on the laptop, and 10.0.0.2 is the DNS server :-

Ethernet adapter Wireless Network Connection 5:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Belkin 802.11g Network Adapter
Physical Address. . . . . . . . . : 00-30-BD-92-67-13
Dhcp Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Autoconfiguration IP Address. . . : 192.168.3.5
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.3.10
DNS Servers . . . . . . . . . . . : 10.0.0.2

I guess the DHCP is the only thing to fix. The ad-hoc networking is a bit invisible to the user, apart from setting the default gateway there isn't any sense of connecting to a particular ad-hoc peer.

Communication !

After setting up the two WRT's with the Freifunk firmware and putting them in ad-hoc mode on Channel 1 I wasn't getting anywhere. Decided it was the IP addressing scheme and set about figuring out a way to make it work. Suffice to say that the default Freifunk config doesn't work "out of the box".

Allocated 192.168.3.1 to the WLAN side of the downstairs WRT, and 192.168.5.1 to the upstairs. Both with SSID at default of linksys and with LAN side at 192.168.1.1. This maintained firewall between wireless and LAN, if the IP is in the same subnet range the two are bridged and the firewall disabled. DHCP is on for the LAN clients.

As configured there was no OLSR routing info visible. Examining the IP data showed that the broadcast address on one WRT was 192.168.3.255 and the other 192.168.5.255 and I figure you can't communicate the routing stuff unless you're on the same broadcast IP. So I changed the upstairs WRT to 192.168.3.10 on its wireless side which results in both broadcasting on 192.168.3.255 - after doing this the OLSR sprung to life and communications were established.

With a laptop plugged into the LAN side of the WRT upstairs I could access the internet via the WRT downstairs which is plugged into an ADSL router. The downstairs WRT also has a Locustworld mesh box and a VoIP ATA plugged into it, and these also route onto the internet happily. See diagram below.

So, an initial success with Freifunk software giving me a remote connection via wireless. The next step is to get the laptop to talk wirelessly to the upstairs WRT so that the link is laptop - wireless - WRT - wireless - WRT - wire - Belkin - ADSL

Wednesday, November 09, 2005

Then there were two.

Took a second WRT54g and added the Freifunk software, this one was a v3 but it was happy to be re-flashed. Installed one of them with a feed from my ADSL router, and plugged a Linksys VoIP adaptor into the LAN port of the WRT54g - VoIP calls still worked, so far so good. 192.168.1.x on the LAN / WLAN side, 10.0.0.x on my router's LAN which is the WRT's WAN.

Set both WRTs to Channel 1, but need to think about that some more, parked one upstairs to work wirelessly from the one downstairs.

Found the config guide at http://www.freifunk.net/wiki/KonfigurationFreifunkFirmware which is naturally in German. Translated via Opera this tells me I need to set the wireless mode to ad-hoc etc etc. Off to play.

Hmmm.

I can access t'internet for a short period after resetting the Freifunk WRT, then it blocks me out. I can see log entries like "Deactivated HNA4 for 192.168.0.1" and "Could not read APM info - setting default willingness(3)" - so I guess my total lack of configuration is catching up with me :-)

Will try running two of these together in the intended mode tonight, including actually following the instructions and putting in some settings. The plan is to plug one into an ADSL router and have another at the other end of the house. The ADSL is actually wireless, which may get in the way, but I don't expect the WRT54's to repeat the Belkin wireless router wirelessly.

Will move onto Sveasoft Alchemy soon, on the basis that SWBB have some external high gain antenna access points that incorporate WRT54g with Alchemy firmware. Makes sense to focus on one version after gaining an appreciation of the Freifunk concept.

for some reason this appears empty when posted, so let's try again...

Friday, November 04, 2005

Step by step.

Did a limited amount of testing on the Freifunk. Switching it from Manager (AP) to Client mode and back seemed to mess up the LAN settings. My wife found a stock of v3.1 WRT54G units in Comet at Cambridge and bought them up.

Discovered a web site about creating a Freifunk / WRT54G mesh network. Worth reading.

Also found a Mesh links Wiki

Thursday, November 03, 2005

First success

Today I dug out the WRT54G I had in storage and found it to be a v2.2. Installed the Freifunk firmware easily and had a short browse around it in the office, looks good. You can preview the Freifunk interface live on the web.

Identifying the version of firmware to download took a few seconds, the FTP site is arranged by type of device, so for example the firmare for WRT54G sits in http://212.91.225.42/sven-ola/ipkg/g/ but for the larger memory go-faster WRT54GS version it is in http://212.91.225.42/sven-ola/ipkg/gs/

Went shopping for pre-v5 WRT54Gs, found one in Comet in Peterborough, their entire stock. Linksys seem to be disappearing from retail land, with comments like "AOL don't support them" and Staples and Comet are the likely UK retail outlets to have some boxes. Probably best in a cable area too, as they aren't much cop with ADSL.

Good news is that there appears to be a version 5 WRT-54GL in the pipeline, where L stands for LINUX ! Maybe they aren't ignoring us. Google for WRT54GL, there are sites in Belgium , Italy, USA listing it as "coming soon" with word on the net suggesting November release.

Wednesday, November 02, 2005

Hardware

Hmm, more to this than meets the eye.

I found a hardware / alternative firmware compatibility chart and a similar OpenWRT list and can now be found staring at the bottom of Linksys packages in stores looking for serial numbers. :-)

The WRT54G gets it own Wiki page too. If you're not squeamish someone has cut open most versions to display their innards !


Maybe the WRT54GS is a better bet, it seems to have double the memory and a hell of a lot less versions in the wild !