OLSR - di Ubuntu
Sumber: http://wmunguiam.blogspot.com/2009/01/olsr-over-ubuntu-804.html
Pada dasarnya ada dua (2) cara utk mengaktifkan OLSR di Ubuntu
- Install dari repository
- Compile dari source code
Instalasi OLSRD dari repository
OLSR dapat di instalasi langsung menggunakan perintah
sudo apt-get install olsrd olsrd-plugins
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
4.-Edit /etc/olsrd/olsrd.conf as below as example (Modify if you need) wmunguiam@server:~$ sudo cp /etc/olsrd/olsrd.conf /etc/olsrd/olsrd.conf.original wmunguiam@server:~$ sudo vim /etc/olsrd/olsrd.conf
DebugLevel 1 Interface "wlan1" { # 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
} LinkQualityFishEye 1 LinkQualityDijkstraLimit 3 3.0 IpVersion 4 ClearScreen yes Hna4 { # Internet gateway: # Agregado WALTER # 10.10.10.0 255.255.255.0 # 0.0.0.0 0.0.0.0 # more entries can be added: # 192.168.1.0 255.255.255.0 } Hna6 { # Internet gateway: # :: 0 # more entries can be added: # fec0:2200:106:: 48 } AllowNoInt no #TosValue 16 Willingness 7 IpcConnect { MaxConnections 1 Host 127.0.0.1 Host 10.10.10.11 Net 10.10.10.0 255.255.255.0 } UseHysteresis no #HystScaling 0.50 #HystThrHigh 0.80 #HystThrLow 0.30 LinkQualityLevel 2 LinkQualityWinSize 100 Pollrate 0.1 TcRedundancy 2 MprCoverage 5 #LoadPlugin "olsrd_httpinfo.so.0.1" #{ # # defaults to 1978 # PlParam "Port" "8080" # #PlParam "Host" "80.23.53.22" # #PlParam "Net" "10.0.0.0 255.0.0.0" # #PlParam "Net" "0.0.0.0 0.0.0.0" #} #LoadPlugin "olsrd_dyn_gw.so.0.4" #{ # PlParam "Interval" "40" # PlParam "Ping" "141.1.1.1" # PlParam "Ping" "194.25.2.129" #} #LoadPlugin "olsrd_nameservice.so.0.2" #{ #PlParam "name" "xxx" #PlParam "a.b.c.d" "xxx-eth" #PlParam "a.b.c.e" "xxx-bbb" #PlParam "a.b.c.f" "xxx-olsr" #PlParam "suffix" ".olsr" #}
#LoadPlugin "olsrd_dot_draw.so.0.3" #{ #PlParam "accept" "192.168.0.5" #PlParam "port" "2004" #}
Edit Interface
Edit
vi /etc/network/interfaces
Isi kira-kira sebagi berikut
auto lo iface lo inet loopback
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
6.-Restart services: networking and OLSR wmunguiam@server:~$ sudo /etc/init.d/network restart wmunguiam@server:~$ sudo /etc/init.d/olsrd start
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.
7.-Verify services
wmunguiam@server:~$ ifconfig wlan1
wlan1 Link encap:Ethernet direcciónHW 00:e0:4c:00:39:1d
inet dirección:10.10.10.11 Difusión:10.10.10.255 Máscara:255.255.255.0
dirección inet6: fe80::2e0:4cff:fe00:391d/64 Alcance:Vínculo
ARRIBA DIFUSIÓN CORRIENDO MULTICAST MTU:1500 Métrica:1
RX packets:0 errors:17 dropped:0 overruns:0 frame:0
TX packets:181 errors:0 dropped:0 overruns:0 carrier:0
colisiones:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:10918 (10.6 KB)
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)