Difference between revisions of "OLSR - di OpenWRT"

From OnnoWiki
Jump to navigation Jump to search
(New page: Sumber: http://wiki.openwrt.org/inbox/mesh.olsr OLSR Mesh Optimized Link State Routing Protocol and http://www.olsr.org/ Mesh networks self-arrange and auto-configure themselves on the ...)
 
 
(15 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
Optimized Link State Routing Protocol and http://www.olsr.org/
 
Optimized Link State Routing Protocol and http://www.olsr.org/
  
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! ;)
+
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 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.
+
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
 
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.
+
 
 +
==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
 
       WAN                                                WAN
Line 39: 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.
  
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.
+
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
  
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
+
==Konfigurasi Jaringan==
    configure the WNICs to work in adhoc-mode. Your file /etc/config/wireless might look as follows:
 
  
    config wifi-device  wl0
+
Pisahkan jaringan LAN & Wireless, default adalah bridge.
            option type    broadcom
+
Edit file /etc/config/network dan konfigurasi Wireless menggunakan mode adhoc.
            option channel  11
+
Konfigurasi wireless dapat sebagai berikut,
            # disable radio to prevent an open ap after reflashing:
 
            option disabled 0
 
  
    config wifi-iface
+
config wifi-device 'radio0'
            option device   wl0
+
        option type 'mac80211'
            # option network        lan
+
        option channel '11'
            option mode     adhoc
+
        option macaddr '4c:e6:76:22:78:ec'
            option ssid    OLSR
+
        option hwmode '11ng'
            option hidden  0
+
        option htmode 'HT20'
            option encryption none
+
        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
+
==install olsrd==
      opkg install olsrd
 
  
    Edit the /etc/olsrd.conf and replace "Interface "XXX" with the wireless interface on your router. Example
+
Melalui shell kita dapat  menginstalasi olsrd
  
    # olsr.org OLSR daemon config file
+
opkg update
    # /etc/olsrd.conf
+
  opkg install olsrd
    #
 
    # Modified for sample OLSR network by Justin S. Leiteb
 
    # http://justin.phq.org/ Fri Jun 8 10:34:27 EDT 2007
 
    # Many comments and commented line from conf file distributed
 
    # with olsrd omitted for brevity in wiki.
 
  
    DebugLevel 0
+
==Edit olsrd.conf==
    IpVersion 4
 
    ClearScreen    yes
 
  
    # On the second OLSR node (olsrd.conf not supplied for this node, since only one line is different),
+
Edit
    # which has a LAN interface on the 10.100.2.0/255.255.255.0 network, the Hna4 entry is:
 
    # 10.100.2.0 255.255.255.0.  These Hna4 entries are what propagates information about how to route
 
    # to these subnets through the mesh.
 
    Hna4
 
    {
 
    # My home LAN
 
    10.100.1.0  255.255.255.0
 
    }
 
  
    AllowNoInt yes
+
vi /etc/olsrd.conf
    UseHysteresis yes
 
  
    # Hysteresis parameters
+
Isi dengan
    HystScaling 0.50
 
    HystThrHigh 0.80
 
    HystThrLow 0.30
 
  
 +
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"
 +
}
  
    LinkQualityLevel 0
+
==Konfigurasi Firewall==
    Pollrate 0.05
 
    NicChgsPollInt  3.0
 
  
    Interface "wl0"
 
    {
 
        AutoDetectChanges            yes
 
    }
 
  
    # Run http server with mesh information.  Won't work unless you've already installed
+
firewall, allow the router to forward packets between the interfaces, example:
    # the olsrd_httpinfo plugin through ipkg.
 
    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
 
     #!/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.
 
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
+
==Setelah Konfigurasi Dasar==
    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