Difference between revisions of "OLSR - di OpenWRT"

From OnnoWiki
Jump to navigation Jump to search
 
(10 intermediate revisions by the same user not shown)
Line 9: Line 9:
 
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 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!
+
Disini akan di jelaskan bagaimana untuk membuat jaringan mesh OLSR dengan menggunakan OpenWRT dan olsrd (server OLSR). Jika tujuan anda adalah untuk membuat jaringan OLSR yang dapat dengan cepat di bangun, sebaiknya mencari firmware yang khusus di buat untuk itu. Salah satu firmware yang siap untuk OLSR adalah Freifunk project yang dikembangkan oleh teman2 di Jerman.
  
  
 
==olsrd 0.6.1-3==
 
==olsrd 0.6.1-3==
  
  Name Size Description
+
OLSR dan mod yang mungkin akan dibutuhkan.
  olsrd 108257 OLSR (Optimized Link State Routing) daemon
+
 
  olsrd-mod-dyn-gw-plain 2902 Dynamic internet gateway plain plugin
+
  Name                 Size Description
  olsrd-mod-bmf 12106 Basic multicast forwarding plugin, dependece: kmod-tun
+
  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-httpinfo 23831 Small informative web server plugin
 
  olsrd-mod-quagga 5848 Quagga plugin
 
  olsrd-mod-quagga 5848 Quagga plugin
Line 30: Line 32:
 
  olsrd-mod-secure 9710 Message signing plugin to secure routing domain
 
  olsrd-mod-secure 9710 Message signing plugin to secure routing domain
  
The Network
+
==Jaringan Menggunakan OLSR==
  
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.
+
Ada banyak cara untuk membangun dan mengkonfigurasi jaringan mesh. Di bawah ini adalah salah satu contoh sederhana yang memungkinkan routing beberapa subnet di bawah 10.0.0.0/255.0.0.0 melalui OLSR mesh.
  
 
       WAN                                                WAN
 
       WAN                                                WAN
Line 43: Line 45:
  
  
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.
+
Kedua node (dalam hal ini WRT54GL) harus di install OLSR. Secara umu, OLSR dapat di instalasi di node manapun yang ingin berpartisipasi dalam subnet yang mengerti OLSR. OLSR perlu di konfigurasi agar mendengarkan semua interface WIFI di router ini. Menjalankan di interface LAN biasanya tidak di perlukan, beberapa sumber menyebutkan bahwa OLSR di kabel LAN mungkin akan menginterferensi seperti DHCP.
 +
 
 +
Jika interface LAN di router di subnet yang berbeda dari interface wireless, kita dapat mengkonfigurasi OLSR untuk mendistribusi message host & network association (HNA) ke router lain. Tergantung pada jika kita menggunakan IPv4 atau IPv6 kita dapat menggunakan Hna4 atau Hna6 di file konfigurasi /?/olsrd.conf
  
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
+
==Konfigurasi Jaringan==
  
    separate the wireless and lan interface in /etc/config/network again, by default they are bridged
+
Pisahkan jaringan LAN & Wireless, default adalah bridge.
    configure the WNICs to work in adhoc-mode. Your file /etc/config/wireless might look as follows:
+
Edit file /etc/config/network dan konfigurasi Wireless menggunakan mode adhoc.
 +
Konfigurasi wireless dapat sebagai berikut,
  
 
  config wifi-device 'radio0'
 
  config wifi-device 'radio0'
Line 82: Line 84:
 
==install olsrd==
 
==install olsrd==
  
      opkg update
+
Melalui shell kita dapat  menginstalasi olsrd
      opkg install olsrd
+
 
 +
opkg update
 +
opkg install olsrd
  
 
==Edit olsrd.conf==
 
==Edit olsrd.conf==
Line 95: Line 99:
 
  Hna4
 
  Hna4
 
  {
 
  {
  0.0.0.0 0.0.0.0
+
    # 0.0.0.0 0.0.0.0
 
  }
 
  }
 
+
 
  Hna6
 
  Hna6
 
  {
 
  {
 
  }
 
  }
 
+
  Interface "wl0"
+
  Interface "wlan0"
 
  {
 
  {
 
   AutoDetectChanges            yes
 
   AutoDetectChanges            yes
 
  }
 
  }
 
+
 
  LoadPlugin "olsrd_txtinfo.so.0.1"
 
  LoadPlugin "olsrd_txtinfo.so.0.1"
 
  {
 
  {
 
  }
 
  }
 
+
 
  LoadPlugin "olsrd_httpinfo.so.0.1"
 
  LoadPlugin "olsrd_httpinfo.so.0.1"
 
  {
 
  {
Line 117: Line 121:
 
  }
 
  }
  
 +
==Konfigurasi Firewall==
  
  
 
+
firewall, allow the router to forward packets between the interfaces, example:
    firewall, allow the router to forward packets between the interfaces, example:
 
  
 
     #!/bin/sh
 
     #!/bin/sh
Line 176: Line 180:
 
     iptables -A forwarding_rule -i $WIFI -o $LAN -j ACCEPT
 
     iptables -A forwarding_rule -i $WIFI -o $LAN -j ACCEPT
  
    start olsrd
+
==start olsrd==
  
 
     /etc/init.d/olsrd start
 
     /etc/init.d/olsrd start
Line 182: Line 186:
  
 
Reboot your router and test everything by pinging interfaces on the different devices. Go and have a beverage of choice to celebrate!
 
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.
+
==Setelah Konfigurasi Dasar==
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
 
  
  
  
 +
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.
  
 
==Referensi==
 
==Referensi==
  
 
* http://wiki.openwrt.org/inbox/mesh.olsr
 
* http://wiki.openwrt.org/inbox/mesh.olsr
 +
* https://justingoetz.net/docs/docs_openwrt/olsr/adhoc-wpa.html
  
 
==Pranala Menarik==
 
==Pranala Menarik==
Line 211: Line 212:
 
* [[OLSR]]
 
* [[OLSR]]
 
* [[OLSR - di OpenWRT]]
 
* [[OLSR - di OpenWRT]]
 +
* [[OLSR - di OpenWRT 2]]
 
* [[OLSR - di UBNT]]
 
* [[OLSR - di UBNT]]
 
* [[OLSR - di Ubuntu]]
 
* [[OLSR - di Ubuntu]]

Latest revision as of 05:02, 15 November 2018

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.

Disini akan di jelaskan bagaimana untuk membuat jaringan mesh OLSR dengan menggunakan OpenWRT dan olsrd (server OLSR). Jika tujuan anda adalah untuk membuat jaringan OLSR yang dapat dengan cepat di bangun, sebaiknya mencari firmware yang khusus di buat untuk itu. Salah satu firmware yang siap untuk OLSR adalah Freifunk project yang dikembangkan oleh teman2 di Jerman.


olsrd 0.6.1-3

OLSR dan mod yang mungkin akan dibutuhkan.

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

Jaringan Menggunakan OLSR

Ada banyak cara untuk membangun dan mengkonfigurasi jaringan mesh. Di bawah ini adalah salah satu contoh sederhana yang memungkinkan routing beberapa subnet di bawah 10.0.0.0/255.0.0.0 melalui OLSR mesh.

     WAN                                                 WAN
      |                                                   |

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

      |                                                   |
     LAN                                                 LAN
      |                                                   |
 Workstation A                                      Workstation B


Kedua node (dalam hal ini WRT54GL) harus di install OLSR. Secara umu, OLSR dapat di instalasi di node manapun yang ingin berpartisipasi dalam subnet yang mengerti OLSR. OLSR perlu di konfigurasi agar mendengarkan semua interface WIFI di router ini. Menjalankan di interface LAN biasanya tidak di perlukan, beberapa sumber menyebutkan bahwa OLSR di kabel LAN mungkin akan menginterferensi seperti DHCP.

Jika interface LAN di router di subnet yang berbeda dari interface wireless, kita dapat mengkonfigurasi OLSR untuk mendistribusi message host & network association (HNA) ke router lain. Tergantung pada jika kita menggunakan IPv4 atau IPv6 kita dapat menggunakan Hna4 atau Hna6 di file konfigurasi /?/olsrd.conf


Konfigurasi Jaringan

Pisahkan jaringan LAN & Wireless, default adalah bridge. Edit file /etc/config/network dan konfigurasi Wireless menggunakan mode adhoc. Konfigurasi wireless dapat sebagai berikut,

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

Melalui shell kita dapat menginstalasi 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 "wlan0"
{
  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"
}

Konfigurasi Firewall

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!

Setelah Konfigurasi Dasar

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.

Referensi

Pranala Menarik