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

November 7, 2006 at 11:37 am 13 comments

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

Entry filed under: Openwrt, Technology.

tHim’s first lucid dream. Hello World

13 Comments Add your own

  • 1. links for 2007-05-02 « mriror  |  May 2, 2007 at 8:15 pm

    […] Dummy’s Guide to Setting up OLSR on WRT54G and Openwrt « It’s all about … […]

    Reply
  • 2. gimmmo  |  September 30, 2008 at 5:21 am

    This is what I’m looking for… will try soon.

    Reply
  • 3. A Frost  |  February 27, 2009 at 6:29 pm

    I ahve done this change in the conf file.. with a clean fresh install conf i get a syntax error in line 10.. wtf?? why do i get this?

    Reply
  • 4. ghufran  |  April 3, 2009 at 9:43 pm

    i’am from aceh in indonesia. sory igf my english bad.

    i want to asked you, that is possibel if i use one wrt54gl with freifunk fimwere, set as adhoc network and connect with laptop as node. so i want to try like this:

    —linksys——laptop—–laptop–
    i tried tu set up, but i have problem. my laptop cannot to connect to the internet. DNS fill at system admin i’am not entry.

    thanks..

    Reply
  • 5. Dionis  |  April 13, 2009 at 3:46 am

    A Frost: Hmm, check for any additional brackets / punctuations that might have been added in.

    ghufran: Hmm have to make sure that the laptops are running the OLSR protocols and it probably needs to have a routing software within it.

    Am not too sure about this myself as I haven’t touched the programming in years heh.

    Reply
  • 6. jakim  |  June 30, 2009 at 10:34 pm

    what if there is no olsrd.conf file after installing olsrd? :S

    Reply
  • 7. thimerosa  |  August 29, 2009 at 12:11 am

    Jakim: the .conf file should be there. Perhaps the later versions of OLSRD no longer need the .conf file, can google along these lines.

    Reply
  • 8. niels  |  December 5, 2009 at 8:04 pm

    A dummys guid would be to explain on how to set up olsr on the web gui with open source firmware running on linksys wrt-routers. but this guid is for experts. newbees do not need to know that much about subnets and all the other tutorials you are mentioning.

    regards, niels

    Reply
  • 9. Juan Carlos  |  November 26, 2010 at 12:43 pm

    1) How do I implement WPA/WPA2 here?

    2) Is it possible to run OLSR in WDS mode?

    thanks!

    Reply
  • 10. Azmin  |  June 12, 2012 at 11:30 am

    Hi dionis,

    interesting about setting up olsr into wrt54g, it posibble load into linksys e1000 or e1200??

    Reply
  • 11. Dionis  |  June 12, 2012 at 3:48 pm

    Hi Azmin, I am not too sure about e1000 or e1200, never tried it before. Does it run on the same OS as wrt54g? Best to check the forums, you don’t want to brick your routers. :/

    Reply
  • 12. Azmin  |  June 14, 2012 at 11:34 am

    Dionis.. no info about olsrd for new release firmware, already try previous firmware also no luck, only WDS option i have. Anyway thanks for sharing Dionis. 🙂

    Reply
  • 13. Drive Heavy Traffic To YOur Site With Yahoo Answers  |  April 10, 2013 at 11:49 am

    Yahoo Answers are loved by Google and many of the Yahoo Answers are sitting on high ranking especially for some highly competitive keywords. You can’t even imagine what effect can Yahoo Answers provide to the traffic of your site. Don’t wait and learn more about this at http://yanswertraffic.com/

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


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

Recent Posts

Blog Stats

  • 34,920 hits

%d bloggers like this: