Difference between revisions of "OLSR - di OpenWRT"

From OnnoWiki
Jump to navigation Jump to search
Line 5: Line 5:
 
Optimized Link State Routing Protocol and http://www.olsr.org/
 
Optimized Link State Routing Protocol and http://www.olsr.org/
  
Jaringan Mesh akan mengatur dan mengkonfigurasi diri sendiri secara automatis berbasis pada perubahan topologi jaringan. Sebagai contoh,  
+
Jaringan Mesh akan mengatur dan mengkonfigurasi diri sendiri secara automatis berbasis pada perubahan topologi jaringan. Sebuah jaringan mesh OLSR yang terkonfigurasi dengan baik akan secara automatis mengatur diri sendiri, misalnya ada node yang mati, atau route baru bermunculan, atau route untuk traffic rendah muncul atau hilang. Konsep mesh itu sendiri tidak baru, Internet adalah sebuah mesh network yang sangat besar. Jadi apa yang baru? Yang baru adalah mesh network dengan teknologi wireless di OpenWRT simply rocks!! :))
  
Mesh networks self-arrange and auto-configure themselves on the basis of network topology changes. For example, the properly configured OLSR mesh will automatically arrange itself in cases where one node fails, or when a new route emerges, or when a low traffic route becomes available or disappears. The concept of a mesh network is not new; the Internet itself is a huge mesh network. So what's new? Well, mesh networks with wireless technology on OpenWrt simply rocks! ;)
+
OLSR adalah salah satu protokol routing yang tersedia untuk membuat Mobile Adhoc Network (MANET), atau dalam bahasa yang lebih umum adalah jaringan mesh wireless. Source Code OLSR di kembangan oleh Andreas Tønnesen sangat cocok sebagai package yang dibuat untuk OpenWRT.
  
OLSR is one of the routing protocols available to create a Mobile Adhoc Networks (MANET), or rather, in more general terms, a wireless mesh network. The OLSR code developed by Andreas Tønnesen is the best suited for our case as packages have been created for OpenWrt.
+
This wiki page contains information on how to create an OLSR mesh network by configuring OpenWrt and olsrd (the OLSR daemon process) yourself. If your objective is to get an OLSR network quickly running, you may want to have a look at firmware that has been specifically created for this purpose. An example of this sort of firmare is the Freifunk project. If you're determined to get OLSR running on OpenWrt without the assistance of pre-packaged firmare, keep reading!
  
This wiki page contains information on how to create an OLSR mesh network by configuring OpenWrt and olsrd (the OLSR daemon process) yourself. If your objective is to get an OLSR network quickly running, you may want to have a look at firmware that has been specifically created for this purpose. An example of this sort of firmare is the Freifunk project. If you're determined to get OLSR running on OpenWrt without the assistance of pre-packaged firmare, keep reading!
+
 
olsrd 0.6.1-3
+
==olsrd 0.6.1-3==
  
 
  Name Size Description
 
  Name Size Description

Revision as of 09:35, 30 July 2012

Sumber: http://wiki.openwrt.org/inbox/mesh.olsr

OLSR Mesh

Optimized Link State Routing Protocol and http://www.olsr.org/

Jaringan Mesh akan mengatur dan mengkonfigurasi diri sendiri secara automatis berbasis pada perubahan topologi jaringan. Sebuah jaringan mesh OLSR yang terkonfigurasi dengan baik akan secara automatis mengatur diri sendiri, misalnya ada node yang mati, atau route baru bermunculan, atau route untuk traffic rendah muncul atau hilang. Konsep mesh itu sendiri tidak baru, Internet adalah sebuah mesh network yang sangat besar. Jadi apa yang baru? Yang baru adalah mesh network dengan teknologi wireless di OpenWRT simply rocks!! :))

OLSR adalah salah satu protokol routing yang tersedia untuk membuat Mobile Adhoc Network (MANET), atau dalam bahasa yang lebih umum adalah jaringan mesh wireless. Source Code OLSR di kembangan oleh Andreas Tønnesen sangat cocok sebagai package yang dibuat untuk OpenWRT.

This wiki page contains information on how to create an OLSR mesh network by configuring OpenWrt and olsrd (the OLSR daemon process) yourself. If your objective is to get an OLSR network quickly running, you may want to have a look at firmware that has been specifically created for this purpose. An example of this sort of firmare is the Freifunk project. If you're determined to get OLSR running on OpenWrt without the assistance of pre-packaged firmare, keep reading!


olsrd 0.6.1-3

Name 	Size 	Description
olsrd 	108257 	OLSR (Optimized Link State Routing) daemon
olsrd-mod-dyn-gw-plain 	2902 	Dynamic internet gateway plain plugin
olsrd-mod-bmf 	12106 	Basic multicast forwarding plugin, dependece: kmod-tun
olsrd-mod-httpinfo 	23831 	Small informative web server plugin
olsrd-mod-quagga 	5848 	Quagga plugin
olsrd-mod-dyn-gw 	4348 	Dynamic internet gateway plugin
olsrd-mod-txtinfo 	6201 	Small informative web server plugin
olsrd-mod-nameservice 	11511 	Lightweight hostname resolver plugin
olsrd-mod-dot-draw 	4233 	Dot topology information plugin
olsrd-mod-mdns 	5648 	Multicast DNS plugin
olsrd-mod-watchdog 	2316 	Watchdog plugin
olsrd-mod-arprefresh 	2703 	Kernel ARP cache refresh plugin
olsrd-mod-p2pd 	8066 	Peer to Peer Discovery plugin
olsrd-mod-secure 	9710 	Message signing plugin to secure routing domain

The Network

There are an infinite number of ways that a mesh network can be configured; below is a simple example that allows routing over a set of subnets in the 10.0.0.0/255.0.0.0 range through the OLSR mesh.

     WAN                                                 WAN
      |                                                   |

OpenWrt + OLSR Node 1 ---- wireless link ---- OpenWrt + OLSR Node 2

      |                                                   |
     LAN                                                 LAN
      |                                                   |
 Workstation A                                      Workstation B


Both nodes (in this case the wrt54gl was used) need to have OLSR installed. In general, OLSR will have to be installed on any node that participates in establishing routing between the OLSR-aware subnets that you configure. OLSR needs to be configured to listen on all WIFI interfaces on these routers. Running it on wired interfaces is usually not necessary, and according to some sources may interfere with other services on these interfaces such as DHCP.

If the "wired" interfaces on your router are on a different subnet from the wireless interfaces you can configure OLSR to distribute host and network association (HNA) messages to other routers. Depending on if if you are running IPv4 or IPv6 you will either have Hna4 or Hna6 directives in your /?/olsrd.conf configuration file.

Outdated Information! This article contains information that is outdated or no longer valid. You can edit this page to update it.

HOW TO

   separate the wireless and lan interface in /etc/config/network again, by default they are bridged
   configure the WNICs to work in adhoc-mode. Your file /etc/config/wireless might look as follows:
config wifi-device 'radio0'
        option type 'mac80211'
        option channel '11'
        option macaddr '4c:e6:76:22:78:ec'
        option hwmode '11ng'
        option htmode 'HT20'
        list ht_capab 'LDPC'
        list ht_capab 'SHORT-GI-20'
        list ht_capab 'SHORT-GI-40'
        list ht_capab 'TX-STBC'
        list ht_capab 'RX-STBC1'
        list ht_capab 'DSSS_CCK-40'
        option txpower '20'
        option country 'ID'
        option distance '1000'

config wifi-iface
        option device 'radio0'
        option encryption 'none'
        option ssid 'MESH'
        option mode 'adhoc'
        option bssid '02:CA:FF:EE:BA:BE'
        option network 'WLAN'


install olsrd

     opkg update
     opkg install olsrd

Edit olsrd.conf

Edit

vi /etc/olsrd.conf

Isi dengan

Hna4
{
  0.0.0.0 0.0.0.0
}
Hna6
{
}
Interface "wl0"
{
  AutoDetectChanges            yes
}
LoadPlugin "olsrd_txtinfo.so.0.1"
{
}
LoadPlugin "olsrd_httpinfo.so.0.1"
{
  PlParam		"port"	"1979"
  PlParam		"Net"	"0.0.0.0 0.0.0.0"
}



   firewall, allow the router to forward packets between the interfaces, example:
   #!/bin/sh
   # Copyright (C) 2006 OpenWrt.org
   iptables -F input_rule
   iptables -F output_rule
   iptables -F forwarding_rule
   iptables -t nat -F prerouting_rule
   iptables -t nat -F postrouting_rule
   # The following chains are for traffic directed at the IP of the
   # WAN interface
   iptables -F input_wan
   iptables -F forwarding_wan
   iptables -t nat -F prerouting_wan
   # Does anyone have a command to get the name of the WIFI interface on Kamikaze so
   # that it doesn't have to be hard-coded here?  This is a bit sloppy it seems.
   WIFI=wl0
   iptables        -A input_wan      -p tcp --dport 22 -j ACCEPT
   # Allow connections to olsr info port.
   iptables        -A input_wan      -p tcp --dport 1979 -j ACCEPT
   # OLSR needs port 698 to transmit state messages.
   iptables -A input_rule -p udp --dport 698 -j ACCEPT


   # Debugging... do we have WIFI, LAN and WAN appropriately defined?
   # These values are passed to us from /etc/init.d/firewall, which
   # calls this script.
   # echo WIFI == $WIFI
   # echo LAN == $LAN
   # echo WAN == $WAN
   iptables -A forwarding_rule -i $WAN -o $WIFI -j ACCEPT
   iptables -A forwarding_rule -i $WIFI -o $WAN -j ACCEPT
   # For forwarding LAN & WIFI in nodes
   iptables -A forwarding_rule -i $LAN -o $WIFI -j ACCEPT
   # For WIFI clients to connect to nodes.
   iptables -A forwarding_rule -i $WIFI -o $WIFI -j ACCEPT
   # For connecting a wired lan client of node 1 to wired lan client of node 2
   iptables -A forwarding_rule -i $LAN -o $LAN -j ACCEPT
   # WIFI needs to go to LAN ports, too!
   iptables -A forwarding_rule -i $WIFI -o $LAN -j ACCEPT
   start olsrd
   /etc/init.d/olsrd start
   /etc/init.d/olsrd enable

Reboot your router and test everything by pinging interfaces on the different devices. Go and have a beverage of choice to celebrate! After basic configuration

You may want to check out some of the plugins that are easy to configure and show you the basic status of your mesh. On my network I run olsrd-mod-httpinfo, which provides a basic http server that shows you the status of the mesh. References

   Master's thesis of primary developer of olsrd - should be read before attempting to install OLSR if you aren't clear on the fundamentals of how it works
   Manual for Kamikaze by one of the developers - great reference on networking interface configuration and other parts of the OpenWrt system



Referensi

Pranala Menarik