OLSR - di Ubuntu

From OnnoWiki
Jump to navigation Jump to search

Sumber: http://wmunguiam.blogspot.com/2009/01/olsr-over-ubuntu-804.html

Pada dasarnya ada dua (2) cara utk mengaktifkan OLSR di Ubuntu, yaitu

Instalasi OLSRD dari repository

OLSR dapat di instalasi langsung dari repository menggunakan perintah

sudo apt-get install olsrd olsrd-plugins

hanya saja ini biasanya bukan versi bleeding edge :)

Compile dari Source Code

Siapkan aplikasi pendukung

sudo apt-get install kernel-package libncurses5-dev fakeroot wget \
bzip2 g++ libssl-dev libxml2-dev doxygen bison flex libc6

Download source code dari

http://www.olsr.org/?q=download

Copy, Extract dan Compile

cp olsrd-0.6.2.tar.bz2 /usr/local/src/
cd /usr/local/src
tar jxvf olsrd-0.6.2.tar.bz2 
cd /usr/local/src/olsrd-0.6.2
make all
make install

Sedikir catatan tentang olsrd

========= C O N F I G U R A T I O N - F I L E ============
olsrd uses the configfile /etc/olsrd.conf
a default configfile. A sample RFC-compliance aimed
configfile can be found in olsrd.conf.default.rfc.
However none of the larger OLSRD using networks use that
so install a configfile with activated link quality exstensions
per default.
can be found at files/olsrd.conf.default.lq
==========================================================

Edit OLSRD.CONF

Edit olsrd.conf

sudo cp /etc/olsrd.conf /etc/olsrd.conf.original
sudo vi /etc/olsrd.conf

Contoh konfigurasi sederhana

InterfaceDefaults {
    Ip4Broadcast      255.255.255.255
}
Interface "eth1" {
   # Ip4Broadcast 255.255.255.255
   # Ip6AddrType site-local
   # Ip6MulticastSite ff05::11
   # Ip6MulticastGlobal ff0e::1
   HelloInterval 6.0
   HelloValidityTime 600.0
   TcInterval 0.5
   TcValidityTime 300.0
   MidInterval 10.0
   MidValidityTime 300.0
   HnaInterval 10.0
   HnaValidityTime 300.0
   # Weight 0
   # LinkQualityMult 192.168.0.1 0.5
   }


Edit Interface

Edit

vi /etc/network/interfaces

Isi kira-kira sebagi berikut

   auto lo
   iface lo inet loopback
   auto eth1
   allow-hot plug eth1
   iface eth1 inet static
   address 10.1.1.11
   broadcast 10.1.1.255
   netmask 255.255.255.0
   wireless-mode ad-hoc
   wireless-channel 11
   wireless-essid mesh
   auto wlan0
   allow-hot plug wlan0
   iface wlan0 inet static
   address 10.10.10.11
   netmask 255.255.255.0
   wireless-mode ad-hoc
   wireless-channel 11
   wireless-key s:12345
   wireless-essid mesh
   #auto eth0
   #iface eth0 inet dhcp

Restart Networking

networking and OLSR

sudo /etc/init.d/networking restart
sudo /etc/init.d/olsrd start

Jika kita mengcompile OLSR lakukan

sudo olsrd -d 2



OBS: If you get this: wmunguiam@server:~$ sudo /etc/init.d/network restart

   Error for wireless request "Set Mode" (8B06) :
   SET failed on device wlan0 ; Invalid argument.
   Error for wireless request "Set Mode" (8B06) :
   SET failed on device wlan0 ; Device or resource busy.

Means your wireless Interface (Hardware) does not support working on Ad-hoc mode. You have to use (recommended) an USB Wireless Card.

Verifikasi Jaringan

Asumsinya eth1 adalah interface WLAN

ifconfig eth1
eth1      Link encap:Ethernet  HWaddr 00:21:00:50:a3:6c  
          inet addr:10.1.1.11  Bcast:0.0.0.0  Mask:255.255.255.0
          inet6 addr: fe80::221:ff:fe50:a36c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:17

wmunguiam@server:~$ iwconfig

wlan1 802.11b/g linked ESSID:"MESH"
Mode:Ad-Hoc Channel=1 Cell: B2:EF:82:A6:57:82
Bit Rate=54 Mb/s
Retry:on Fragment thr:off
Link Quality=0/100 Signal level=0 dBm Noise level=0 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

wmunguiam@server:~$ route

Tabla de rutas IP del núcleo  
Destino Pasarela Genmask Indic Métric Ref Uso Interfaz
192.168.1.0 * 255.255.255.0 U 0 0 0 wlan0
10.10.10.0 * 255.255.255.0 U 0 0 0 wlan1
link-local * 255.255.0.0 U 1000 0 0 wlan1
default 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0

OBS: WLAN0 interface to connect to internet (GW)

Referensi

Pranala Menarik