Archive for November, 2006

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 “192.168.1.1” (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 192.168.10.1/24 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 192.168.10.0 255.255.255.0 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 192.168.1.123) of r1 (r1’s wifi = 192.168.0.1) to wired client (ip 192.168.2.123) of r2 (r2’s wifi = 192.168.0.2). 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.

Advertisements

November 7, 2006 at 11:37 am 13 comments


November 2006
M T W T F S S
« Sep   Apr »
 12345
6789101112
13141516171819
20212223242526
27282930  

Recent Posts

Blog Stats

  • 34,948 hits