Posts filed under ‘Openwrt’

Dummy’s Guide to Setting up OLSR on WRT54G and Openwrt

This is a step-by-step guide for people who want to manually set up an OLSR Network but do not want to use available firmware such as Freifunk or what-a-mesh.

1) Prepare your router. As usual, you need some kinds of basic configuration for your routers. I followed: Krishna‘s AODV guide – Device Configuration:

nvram set lan_ifname=vlan0
nvram unset lan_ifnames
nvram set wifi_ifname=eth1
nvram commit

nvram set wifi_proto=static
nvram set wifi_ipaddr=<adhoc IP address>
nvram set wifi_netmask=<netmask>
nvram set wl0_mode=sta
nvram set wl0_infra=0
nvram set wl0_ssid=<adhoc essid>
nvram commit

The above commands will break the br0 (default bridge that connected the vlan0, vlan1 and eth1). If you don’t break it, you cannot run OLSR, or rather I tried running OLSR with the bridge on, but it doesn’t work.

Remember, your wifi_ipaddr AND your lan_ipaddr has to be on different subnets. (If you’re not sure about subnetting, I would recommend you to google and learn about it first before attempting this OLSR) How to change lan and wifi address the easy way? Open your webbrowser and type in “” (assuming that your lan IP address and wifi ipaddress have never been changed before, else just type in one of those addresses)

2) Load your OLSR module.

  • Connect your router to the internet
  • Go to the webinterface and look for installed software.
  • Look for OLSRD. You only need that.
  • Click install.

OLSR will automatically install on your router.

3) Configure your OLSR configuration files. The configuration was referenced from the Howto on the openwrt wiki.

  1. SSH (telnet or putty in) into the router. If you haven’t changed the user name and pass, they are: Username = root , passwd = admin.
  2. Type vi /etc/olsrd.conf to edit the configuration file. Vi is a text editor and quite tricky to use. I suggest that you do available vi tutorials online.
  3. Under the olsrd.conf file, look for “Interface”. You can look for this by typing “/Interface” and hit enter. (Assuming you’re using vi). Add in your wireless interface. IE, the interface on your router that refers to the wireless components. For me, it’s eth1. Check your router’s specifications if you’re not sure.
  4. Add forwarding rules to your /etc/firewall.user. Forwarding rules refer to rules that allow your router to forward packets from one place to another. You can follow the rules in the howto. I’ve verified that they work.
  5. If you have wired hosts connected to your routers, remember to add the network_ip and netmask in to the hna4 field within the olsrd.conf file. For example, my lan network is and all my connected clients will get an ipaddr of 192.168.10.x (where x is between 1 and 255, excluding the 1 and 255). Hence I will enter in my hna4 field.

Save the above settings. (In vi it’s the following key sequence to save: “ESC”, “shift+:”, “x” and then hit enter. Reboot your router (or restart olsrd) and your olsr node is set up!

You will be able to ping from a connected client on one router to another connected client on the other router. For eg, I can ping from wired client  (ip of r1 (r1’s wifi = to wired client (ip of r2 (r2’s wifi = If you can’t ping, make sure that your computers are not running any firewalls and you have set your router’s firewall rules to forward packets.

Tadah. You have your own OLSR mesh. Yummy.

November 7, 2006 at 11:37 am 13 comments

How to synchronize time between 2 WRT54G routers running on Openwrt?

This short tutorial documents the process that I took to synchronize time between 2 WRT54G routers.

I needed this function because I wanted to send log files out of the different nodes at the same time. Well, we all know that WRT54G routers don’t have on-board clocks so it’s hard to sync. But anyway, this actually works for me cause it makes it easier for me to time my experiments and run my cron jobs when they all start from 0. This is a complete trial and error thingy that yielded the results I wanted, so follow at your own risk.


August 16, 2006 at 9:32 pm 1 comment

How to get Openwrt boxes to scp to each other in a mesh topology?

Seems like this online documentation thing is catching on. My site is specially catered for people like me, who find it a huge challenge to pick up this Openwrt thingy. No dummies guide online, and it is really tough to search for solutions. 😦 I usually spend a damn long time trying to figure out some basic stuff that most experts know. Hence, this motivates my series of Dummy’s guide! We must always contribute back to the Opensource community yeah? 🙂 I am gonna be building a business on Opensource software soon.

But that’s not the point that I want to illustrate here. The topic is on: How do we automate scp on Linksys WRT54G (running on Openwrt) such that they can send each other files periodically without the troublesome need of entering the stupid passwords.

*I developed this solution because I needed to set up an experimental testbed that has 5 routers in a string topology and 4 routers are supposed to be sending a log file out every 10 minutes to router 1. I needed to automate this process so that I can leave the routers to their own antics and let them do what they need to do.


August 14, 2006 at 6:28 pm 3 comments

Memory stuff on WRT54G and Openwrt

This is yet another techie posting.

I was just wondering why do I have a /tmp partition on my wrt54g that is 7MB! I wanted to use this memory! Whatever’s written to /tmp will be erased on reboot. I wanted the information to survive a reboot! I wanted to increase the retainable memory on board the router!

I was googling around but I couldn’t find a solution. Then I found this… apparently 7MB is RAM (edited from Flash) memory and no matter what I do, I can’t keep the stuff on it. Oh well. 😦

August 13, 2006 at 10:04 pm 2 comments

How I set up AODV with Openwrt on a Linksys WRT54G router (Dummy’s guide) {Part I}

Note the keywords that I included in the title. This is an entirely TECHIE posting. 30 days worth of work condensed into one page.

This is really to help anyone, who’s looking for any sort of help to AODV on Openwrt on a WRT54G Version 4 /WRT54GL Linksys router. I am listing all my problems, or stuff encountered etc.
I have 2 methods. The first shows an inkling on how I did the cross-compilation from C code to Mips code. The second just shows how I did the ipkg thingy from the AODV-UU package that I found online. (For this second method, I am still trying to find a way to compile my own packages. Will put this in Part II when I figure out how. Or you guys can enlighten me)



August 11, 2006 at 1:37 am 13 comments

July 2020

Recent Posts

Blog Stats

  • 35,229 hits