Difference between revisions of "OLSR - di Ubuntu"

From OnnoWiki
Jump to navigation Jump to search
 
(50 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
Sumber: http://wmunguiam.blogspot.com/2009/01/olsr-over-ubuntu-804.html
 
Sumber: http://wmunguiam.blogspot.com/2009/01/olsr-over-ubuntu-804.html
  
 +
Pada dasarnya ada dua (2) cara utk mengaktifkan [[OLSR]] di [[Ubuntu]], yaitu
  
1.- Get information
+
* Install dari repository
http://www.olsr.org/?q=download
+
* Compile dari [[source code]]
  
2.- Get OLSR package
+
==Instalasi OLSRD dari repository==
Visit: http://packages.ubuntu.com/search?keywords=olsrd
 
  
3.- Install OLSR daemon (and dependecies: libc6 bison flex)
+
[[OLSR]] dapat di instalasi langsung dari [[repository]] menggunakan perintah
wmunguiam@server:~$ sudo apt-get install olsrd olsrd-plugins
 
  
If you download lastest olsr package, install it by going to olsrd dowloaded directory, uncompress it and:
+
sudo apt-get install olsrd olsrd-plugins
wmunguiam@server:~$ make
 
wmunguiam@server:~$ sudo make install
 
  
4.-Edit /etc/olsrd/olsrd.conf as below as example (Modify if you need)
+
hanya saja ini biasanya bukan versi bleeding edge :)
wmunguiam@server:~$ sudo cp /etc/olsrd/olsrd.conf /etc/olsrd/olsrd.conf.original
+
tapi lumayan stabil lah untuk ngoprek.
wmunguiam@server:~$ sudo vim /etc/olsrd/olsrd.conf
 
  
    DebugLevel 1
+
Masalah dengan olsrd hasil apt-get adalah
    Interface "wlan1"
+
 
    {
+
* olsrd dengan /etc/init.d/olsrd mencari /etc/olsrd.conf bukan /etc/olsrd/olsrd.conf. Akibatnya akan abort karena tidak menemukan file konfigurasi.
 +
* olsrd akan melaporan error, buang LinkQualityDijkstraLimit dan LinkQualityWinSize di olsrd.conf. Caranya edit
 +
 
 +
vi /etc/olsrd.conf
 +
 
 +
Remark line 124
 +
 
 +
# LinkQualityDijkstraLimit 3 3.0
 +
 
 +
Remark line 240
 +
 
 +
# LinkQualityWinSize    100
 +
 
 +
==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/mediawiki/index.php/Releases
 +
 
 +
Copy, Extract dan Compile
 +
 
 +
wget http://www.olsr.org/releases/0.9/olsrd-0.9.0.2.tar.bz2
 +
cp olsrd-0.9.0.2.tar.bz2 /usr/local/src/
 +
cd /usr/local/src
 +
tar jxvf olsrd-0.9.0.2.tar.bz2
 +
cd /usr/local/src/olsrd-0.9.0.2
 +
make all
 +
make install
 +
make libs
 +
make install_libs
 +
mkdir -p /etc
 +
cp -i files/olsrd.conf.default.lq /etc/olsrd.conf
 +
 
 +
Sedikit 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
 +
==========================================================
 +
mkdir -p /etc
 +
cp -i files/olsrd.conf.default.lq /etc/olsrd.conf
 +
-------------------------------------------
 +
Edit /etc/olsrd.conf before running olsrd!!
 +
-
 +
 
 +
==Edit OLSRD.CONF==
 +
 
 +
Edit olsrd.conf
 +
 
 +
sudo cp /etc/olsrd.conf /etc/olsrd.conf.original
 +
sudo vi /etc/olsrd.conf
 +
 
 +
Pastikan ada interface yang aktif menggunakan OLSR, misalnya eth1, wlan0 dll.
 +
Contoh konfigurasi sederhana
 +
 
 +
InterfaceDefaults {
 +
    Ip4Broadcast      255.255.255.255
 +
}
 +
Interface "eth1" {
 
     # Ip4Broadcast 255.255.255.255
 
     # Ip4Broadcast 255.255.255.255
 
     # Ip6AddrType site-local
 
     # Ip6AddrType site-local
 
     # Ip6MulticastSite ff05::11
 
     # Ip6MulticastSite ff05::11
 
     # Ip6MulticastGlobal ff0e::1
 
     # Ip6MulticastGlobal ff0e::1
 
+
 
     HelloInterval 6.0
 
     HelloInterval 6.0
 
     HelloValidityTime 600.0
 
     HelloValidityTime 600.0
Line 37: Line 101:
 
     # Weight 0
 
     # Weight 0
 
     # LinkQualityMult 192.168.0.1 0.5
 
     # LinkQualityMult 192.168.0.1 0.5
 +
    }
 +
 +
 +
Tambahkan untuk Plugin txtinfo
  
    }
+
LoadPlugin "olsrd_txtinfo.so.0.1"
    LinkQualityFishEye 1
 
    LinkQualityDijkstraLimit 3 3.0
 
    IpVersion 4
 
    ClearScreen yes
 
    Hna4
 
 
     {
 
     {
     # Internet gateway:
+
     PlParam "port" "8080"
    # Agregado WALTER
+
     PlParam "Host" "127.0.0.1"
     # 10.10.10.0 255.255.255.0
+
     # PlParam "Net" "0.0.0.0 0.0.0.0"
     # 0.0.0.0 0.0.0.0
+
     # PlParam "Host" "80.23.53.22"
     # more entries can be added:
+
     # # PlParam "Net" "192.168.0.0 255.255.0.0
     # 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"
 
    #}
 
  
5.-Edit linux network interface(s) to work as Ad-hoc node
+
Kadang kala pada saat kita jalankan olsrd akan melaporan error, buang LinkQualityDijkstraLimit dan LinkQualityWinSize di olsrd.conf. Caranya edit
wmunguiam@server:~$ sudo vim /etc/network/interfaces
+
 
 +
vi /etc/olsrd.conf
 +
 
 +
Remark line 124
 +
 
 +
# LinkQualityDijkstraLimit 3 3.0
 +
 
 +
Remark line 240
 +
 
 +
# LinkQualityWinSize    100
 +
 
 +
==Cek konfigurasi==
 +
 
 +
Sebaiknya cek konfigurasi menggunakan perintah
 +
 
 +
sudo olsrd -d 2
 +
 
 +
atau bagi yang menginstall menggunakan apt-get bisa
 +
 
 +
sudo olsrd -d 2 -f /etc/olsrd/olsrd.conf
 +
 
 +
Kayanya menggunakan apt-get ada beberapa error, di beri # aja di line yang error. Biasanya setelah di # error yang ada maka olsrd akan jalan.
 +
 
 +
===IPv6===
 +
 
 +
Menjalankan OLSR Untuk IPv6
 +
 
 +
sudo olsrd -d 2 -ipv6
 +
 
 +
==Edit Interface==
 +
 
 +
Kita dapat melakukannya menggunakan
 +
 
 +
* iwconfig di console
 +
* edit /etc/network/interface
 +
 
 +
Dengan asumsi eth1 adalah interface [[wireless]].
 +
Edit di console
 +
 
 +
iwconfig wlan0 mode ad-hoc
 +
iwconfig wlan0 essid MESH
 +
iwconfig wlan0 ap 02:ca:ff:ee:ba:be
 +
iwconfig wlan0 channel 1
 +
ifconfig wlan0 10.1.1.1
 +
ifconfig wlan0 netmask 255.0.0.0
 +
 
 +
atau
 +
 
 +
iwconfig wlan0 mode ad-hoc essid MESH ap 02:ca:ff:ee:ba:be channel 1
 +
ifconfig wlan0 10.1.1.1 netmask 255.0.0.0
 +
 
 +
 
 +
Edit
 +
 
 +
vi /etc/network/interfaces
 +
 
 +
Isi kira-kira sebagi berikut
  
 
     auto lo
 
     auto lo
 
     iface lo inet loopback
 
     iface lo inet loopback
 
+
 +
    auto wlan0
 +
    allow-hot plug wlan0
 +
    iface wlan0 inet static
 +
    address 10.1.1.1
 +
    broadcast 10.255.255.255
 +
    netmask 255.0.0.0
 +
    wireless-mode ad-hoc
 +
    wireless-channel 1
 +
    wireless-essid MESH
 +
    wireless-bssid 02:ca:ff:ee:ba:be
 +
 
     auto wlan0
 
     auto wlan0
 
     allow-hot plug wlan0
 
     allow-hot plug wlan0
Line 118: Line 194:
 
     address 10.10.10.11
 
     address 10.10.10.11
 
     netmask 255.255.255.0
 
     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
 +
   
 +
    # Konfigurasi IPv6
 +
    iface wlan0 inet6 static
 +
    address 2001:123:127::127
 +
    netmask 128
 
     wireless-mode ad-hoc
 
     wireless-mode ad-hoc
 
     wireless-channel 1
 
     wireless-channel 1
    wireless-key s:12345
 
 
     wireless-essid MESH
 
     wireless-essid MESH
 +
    wireless-bssid 02:ca:ff:ee:ba:be
 +
 +
==Restart Networking==
 +
 +
networking and OLSR
 +
 +
sudo /etc/init.d/networking restart
 +
sudo /etc/init.d/olsrd start
 +
 +
 +
Jika pada saat melakukan
 +
 +
sudo /etc/init.d/network restart
 +
 +
Keluar error berikut
 +
 +
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.
  
    #auto eth0
+
Kemungkinan wireless interface / hardware yang anda gunakan tidak mendukung mode ad-hoc. Kita perlu menggunakan USB wireless card lain.
    #iface eth0 inet dhcp
 
  
6.-Restart services: networking and OLSR
+
==Verifikasi Jaringan==
wmunguiam@server:~$ sudo /etc/init.d/network restart
 
wmunguiam@server:~$ sudo /etc/init.d/olsrd start
 
  
OBS: If you get this:
+
Asumsinya eth1 adalah interface [[WLAN]].
wmunguiam@server:~$ sudo /etc/init.d/network restart
 
  
    Error for wireless request "Set Mode" (8B06) :
+
ifconfig eth1
    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.
+
eth1      Link encap:Ethernet  HWaddr 00:21:00:50:a3:90 
 +
          inet addr:172.16.1.2  Bcast:172.16.255.255  Mask:255.255.0.0
 +
          inet6 addr: fe80::221:ff:fe50:a390/64 Scope:Link
 +
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
 +
          RX packets:52 errors:0 dropped:0 overruns:0 frame:188
 +
          TX packets:88 errors:11 dropped:0 overruns:0 carrier:0
 +
          collisions:0 txqueuelen:1000
 +
          RX bytes:3356 (3.3 KB) TX bytes:14387 (14.3 KB)
 +
          Interrupt:17
  
 +
Cek wireless
  
7.-Verify services
+
iwconfig eth1
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
+
eth1      IEEE 802.11bg  ESSID:"MESH"
wlan1 802.11b/g linked ESSID:"MESH"
+
          Mode:Ad-Hoc Frequency:2.412 GHz  Cell: 02:CA:FF:EE:BA:BE 
Mode:Ad-Hoc Channel=1 Cell: B2:EF:82:A6:57:82
+
          Bit Rate=54 Mb/s   Tx-Power:24 dBm 
Bit Rate=54 Mb/s
+
          Retry min limit:7  RTS thr:off  Fragment thr:off
Retry:on Fragment thr:off
+
          Power Management:off
Link Quality=0/100 Signal level=0 dBm Noise level=0 dBm
+
          Link Quality=5/Signal level=-21 dBm Noise level=-57 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
+
          Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
+
          Tx excessive retries:0 Invalid misc:0   Missed beacon:0  
  
wmunguiam@server:~$ route
+
Cek Routing
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)
+
netstat -nr
  
 +
Kernel IP routing table
 +
Destination    Gateway        Genmask        Flags  MSS Window  irtt Iface
 +
0.0.0.0        172.16.1.1      0.0.0.0        UG        0 0          0 eth1
 +
172.16.0.0      0.0.0.0        255.255.0.0    U        0 0          0 eth1
 +
172.16.1.1      172.16.1.1      255.255.255.255 UGH      0 0          0 eth1
 +
172.16.1.2      172.16.1.2      255.255.255.255 UGH      0 0          0 eth1
  
 +
Perhatikan host dengan netmask 255.255.255.255, ini merupakan host yang di tambahkan secara automatis oleh [[OLSR]].
  
 
==Referensi==
 
==Referensi==
Line 179: Line 280:
 
==Pranala Menarik==
 
==Pranala Menarik==
  
 +
* [[WiFi: HotSpot - Linksys WRT54GL]]
 +
* [[WiFi: HotSpot - Linksys WRT54GL Konfigurasi Orginal]]
 +
* [[WiFi: HotSpot - Linksys WRT54GL Upgrade dd-wrt]]
 +
* [[WiFi: HotSpot - Linksys WRT54GL Upgrade dd-wrt OLSR]]
 +
* [[WiFi: HotSpot - DD-WRT WRT54GL Mengaktifkan OLSR]]
 +
* [[WiFi: HotSpot - Linksys WRT54GL Upgrade FreiFunk Firmware]]
 +
* [[WiFi: HotSpot - Linksys WRT54GL Konfigurasi FreiFunk]]
 +
* [[WiFi: HotSpot - Linksys WRT54GL FreiFunk Setelah Upgrade Software]]
 +
* [[WiFi: HotSpot - Linksys WRT54GL FreiFunk Peta Mesh Network]]
 +
* [[De-Bricking WRT54GL v.1.1]]
 
* [[OLSR]]
 
* [[OLSR]]
 +
* [[OLSR - di Ubuntu]]
 
* [[WNDW: Jaringan Mesh dengan OLSR]]
 
* [[WNDW: Jaringan Mesh dengan OLSR]]
* [[OLSR - di Ubuntu]]
+
* [[WiFi: HotSpot]]
 +
* [[Wireless Internet Berbasis WiFi]]
 +
 
 +
[[Category: WiFi]]
 +
[[Category: HotSpot]]

Latest revision as of 10:34, 9 August 2015

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 :) tapi lumayan stabil lah untuk ngoprek.

Masalah dengan olsrd hasil apt-get adalah

  • olsrd dengan /etc/init.d/olsrd mencari /etc/olsrd.conf bukan /etc/olsrd/olsrd.conf. Akibatnya akan abort karena tidak menemukan file konfigurasi.
  • olsrd akan melaporan error, buang LinkQualityDijkstraLimit dan LinkQualityWinSize di olsrd.conf. Caranya edit
vi /etc/olsrd.conf

Remark line 124

# LinkQualityDijkstraLimit 3 3.0

Remark line 240

# LinkQualityWinSize    100

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/mediawiki/index.php/Releases

Copy, Extract dan Compile

wget http://www.olsr.org/releases/0.9/olsrd-0.9.0.2.tar.bz2
cp olsrd-0.9.0.2.tar.bz2 /usr/local/src/
cd /usr/local/src
tar jxvf olsrd-0.9.0.2.tar.bz2 
cd /usr/local/src/olsrd-0.9.0.2
make all
make install
make libs
make install_libs
mkdir -p /etc
cp -i files/olsrd.conf.default.lq /etc/olsrd.conf

Sedikit 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
==========================================================
mkdir -p /etc
cp -i files/olsrd.conf.default.lq /etc/olsrd.conf
-------------------------------------------
Edit /etc/olsrd.conf before running olsrd!!
-

Edit OLSRD.CONF

Edit olsrd.conf

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

Pastikan ada interface yang aktif menggunakan OLSR, misalnya eth1, wlan0 dll. 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
   }


Tambahkan untuk Plugin txtinfo

LoadPlugin "olsrd_txtinfo.so.0.1"
   {
   PlParam "port" "8080"
   PlParam "Host" "127.0.0.1"
   # PlParam "Net" "0.0.0.0 0.0.0.0"
   # PlParam "Host" "80.23.53.22"
   # # PlParam "Net" "192.168.0.0 255.255.0.0"  
   }


Kadang kala pada saat kita jalankan olsrd akan melaporan error, buang LinkQualityDijkstraLimit dan LinkQualityWinSize di olsrd.conf. Caranya edit

vi /etc/olsrd.conf

Remark line 124

# LinkQualityDijkstraLimit 3 3.0

Remark line 240

# LinkQualityWinSize    100

Cek konfigurasi

Sebaiknya cek konfigurasi menggunakan perintah

sudo olsrd -d 2

atau bagi yang menginstall menggunakan apt-get bisa

sudo olsrd -d 2 -f /etc/olsrd/olsrd.conf

Kayanya menggunakan apt-get ada beberapa error, di beri # aja di line yang error. Biasanya setelah di # error yang ada maka olsrd akan jalan.

IPv6

Menjalankan OLSR Untuk IPv6

sudo olsrd -d 2 -ipv6

Edit Interface

Kita dapat melakukannya menggunakan

  • iwconfig di console
  • edit /etc/network/interface

Dengan asumsi eth1 adalah interface wireless. Edit di console

iwconfig wlan0 mode ad-hoc
iwconfig wlan0 essid MESH
iwconfig wlan0 ap 02:ca:ff:ee:ba:be
iwconfig wlan0 channel 1
ifconfig wlan0 10.1.1.1
ifconfig wlan0 netmask 255.0.0.0 

atau

iwconfig wlan0 mode ad-hoc essid MESH ap 02:ca:ff:ee:ba:be channel 1
ifconfig wlan0 10.1.1.1 netmask 255.0.0.0


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.1.1.1
   broadcast 10.255.255.255
   netmask 255.0.0.0
   wireless-mode ad-hoc
   wireless-channel 1
   wireless-essid MESH
   wireless-bssid 02:ca:ff:ee:ba:be

   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
   
   # Konfigurasi IPv6
   iface wlan0 inet6 static
   address 2001:123:127::127
   netmask 128
   wireless-mode ad-hoc
   wireless-channel 1
   wireless-essid MESH
   wireless-bssid 02:ca:ff:ee:ba:be

Restart Networking

networking and OLSR

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


Jika pada saat melakukan

sudo /etc/init.d/network restart

Keluar error berikut

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.

Kemungkinan wireless interface / hardware yang anda gunakan tidak mendukung mode ad-hoc. Kita perlu menggunakan USB wireless card lain.

Verifikasi Jaringan

Asumsinya eth1 adalah interface WLAN.

ifconfig eth1
eth1      Link encap:Ethernet  HWaddr 00:21:00:50:a3:90  
          inet addr:172.16.1.2  Bcast:172.16.255.255  Mask:255.255.0.0
          inet6 addr: fe80::221:ff:fe50:a390/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:52 errors:0 dropped:0 overruns:0 frame:188
          TX packets:88 errors:11 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:3356 (3.3 KB)  TX bytes:14387 (14.3 KB)
          Interrupt:17 

Cek wireless

iwconfig eth1
eth1      IEEE 802.11bg  ESSID:"MESH"  
          Mode:Ad-Hoc  Frequency:2.412 GHz  Cell: 02:CA:FF:EE:BA:BE   
          Bit Rate=54 Mb/s   Tx-Power:24 dBm   
          Retry min limit:7   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=5/5  Signal level=-21 dBm  Noise level=-57 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0 

Cek Routing

netstat -nr
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         172.16.1.1      0.0.0.0         UG        0 0          0 eth1
172.16.0.0      0.0.0.0         255.255.0.0     U         0 0          0 eth1
172.16.1.1      172.16.1.1      255.255.255.255 UGH       0 0          0 eth1
172.16.1.2      172.16.1.2      255.255.255.255 UGH       0 0          0 eth1

Perhatikan host dengan netmask 255.255.255.255, ini merupakan host yang di tambahkan secara automatis oleh OLSR.

Referensi

Pranala Menarik