Quagga: OLSR Konsep

From OnnoWiki
Jump to navigation Jump to search

Sumber: http://olsrdq.sourceforge.net/


[Close]

OLSRdq - OLSR daemon for Quagga

   1. Overview
   2. Download
   3. Installation
   4. Getting started
   5. Commands
       5.1 Show Olsr Information
       5.2 Olsr Router
       5.3 Olsr Interfaces
       5.4 Olsr Debugging
   6. Sample session
   7. Credits

1. Overview

The pro-active routing protocol Optimized Link State Routing (described in RFC 3626) is an optimization of the classical link state algorithm for wireless Mobile Ad-hoc Networks (MANETs). It provides an efficient mechanism for flooding control traffic by reducing the number of transmissions required. The protocol is particularly suitable for large and dense wireless networks as the OLSR optimization works well in this context. Quagga is a routing software suite in which each routing protocol is a Unix daemon. This project is about making an OLSR implementation for Quagga. 2. Download

Current project version is 0.1.18.

You can also check it out from the SVN repository with the following command:

$ svn co https://svn.sourceforge.net/svnroot/olsrdq olsrd

3. Installation

Before installing OLSRd one needs to download the Quagga sources from http://www.quagga.net/download.php. Current version of OLSRd has only been tested with Quagga 0.98.5 which is the current Quagga stable version but, because the Quagga core code changes relatively rare, it will probably work just fine with older or newer Quagga releases.

After downloading, uncompress the Quagga sources and copy the OLSRd tar ball inside the newly created directory.

    $ tar xzvf quagga-0.98.5.tar.gz 
    $ cd quagga-0.98.5 
    $ cp ../quagga_olsrd-0.1.18.tar.gz . 

Now uncompress the quagga-olsrd-0.1.18.tar.gz file here. This will create a new directory named olsrd. You will find a patch in that directory that you have to apply before doing anything else.

   $ tar xzvf quagga_olsrd-0.1.18.tar.gz
   $ cd olsrd/
   $ patch -p1 -d .. < quagga-0.98.5_olsrd-0.1.18.diff 

The next step is to run the ./configure script which will generate Makefiles for both Quagga and OLSRd. Please use ./configure --help and read the INSTALL file from the Quagga directory. One of the interesting Quagga features is that it can run as normal Unix user providing good security. Read the documentation about how to enable a normal user to run quagga or -- if you're in a hurry -- use the following:

   $ ./configure --enable-user=root --enable-group=root
   $ make
   $ sudo make install 

All remains to do now is compile OLSRd:

   $ cd olsrd/
   $ make
   $ sudo make install 

4. Getting started

To enable the OLSR routing one needs to start two daemons: zebra, which is the process responsible for communicating with the kernel and the olsrd daemon. To see the available starting options use man zebra and man olsrd or the --help options. But before starting the daemons, you have to create configuration files. For general Quagga configuration options see http://www.quagga.net/docs.php and for configuration options specific to OLSRd read the next section. For the moment, you can just use the samples provided.

   $ cp /usr/local/etc/zebra.conf.sample /usr/local/etc/zebra.conf
   $ cp /usr/local/etc/olsrd.conf.sample /usr/local/etc/olsrd.conf
   $ zebra -d
   $ olsrd
   2005/09/25 05:23:41 OLSR: OLSRd 0.1.18 starting: vty@2611

Quagga daemons can be configured either using the configurations files from /usr/local/etc/ (or other, at your option) either using VTY shells in an interactive manner. You can connect to the Zebra daemon on port 2601 and to the OLSR daemon on port 2611. If you haven't changed the password then it is `zebra'. For basic information about VTYs, please read http://www.quagga.net/docs/docs-multi/Virtual-Terminal-Interfaces.html

   $ telnet localhost 2611
   Trying 127.0.0.1...
   Connected to localhost.localdomain.
   Escape character is '^]'.
   Hello, this is Quagga (version 0.98.5).
   Copyright 1996-2005 Kunihiro Ishiguro, et al.


   User Access Verification
   Password:
   olrsd>

5. Commands The common commands for Quagga daemons work in OLSRd as well. You can use show running-config and write file to display current configuration and to write the configuration to disk. For more `basic Quagga commands' please visit http://www.quagga.net/docs/docs-multi/Basic-commands.html. In the next subsections you will find a summary of OLSRd specific commads. 5.1. Show OLSR Information

Command: show ip olsr

The command displays current OLSR status. Node willingness, neighbor hold time, the time to `remember' packets to avoid duplicate forwarding, the time to `remember' topology control messages if they are not refreshed and the delaying times for MPR and routing table refreshes.

   olrsd# show ip olsr
   OLSR Routing Process, Main Address: 172.16.56.1
   Willingness: default
   Neighbor hold time: 6.000 s
   Duplicate hold time: 30.000 s
   Topology hold time: 15.000 s
   MPR update time: 1.000 s
   Routing table update time: 2.000 s

Command: show ip olsr linkset

The command will print the connected links (symetric or asymmetric) of this node.

Command: show ip olsr neigh

The command will print the symetric neighbors of this node together with their status (MPR of this router or MPR Selector of this router).

   olrsd# show ip olsr neighbor
   MAIN ADDR               STATUS          WILLINGNGESS    MPR     MPRS
   172.16.56.132           sym             default         Yes     Nope
   172.16.56.128           not             low             Nope    Nope
   172.16.56.130           sym             default         Nope    Nope

Command: show ip olsr mid

The command will print the Multiple Information Association database. See RFC3626 for details.

Command: show ip olsr topset

The command will print the Topology informations that this router had gathered.

Command: show ip olsr routes

The command will print the routes discovered by OLSR.

   olrsd# show ip olsr routes
   Dest addr       Next hop        Dist    Iface
   172.16.56.1     172.16.56.128   3       172.16.56.1
   172.16.56.128   172.16.56.128   1       172.16.56.1
   172.16.56.132   172.16.56.132   1       172.16.56.1
   192.168.0.1     172.16.56.128   1       172.16.56.1
   192.168.0.2     172.16.56.132   1       172.16.56.1
   192.168.0.4     172.16.56.128   2       172.16.56.1
   192.168.0.5     172.16.56.128   2       172.16.56.1

5.2. OLSR router

Command: router olsr

Enable OLSR routing process. The command is available from the `configure' node. In the `router olsr' node, the following commands are available:

Command: olsr willingness (never|low|default|high|always) Command: olsr willingness <0-7> Command: no olsr willingness

These commands are used to set the node's willingness which is a number between 0 and 7. A node with willingness `never' will never be selected as MPR. A node with willingness `always' will always be selected as MPR. The `no olsr willingness' command sets the willingness to default.

Command: olsr neighb-hold-time msecs Command: no olsr neighb-hold-time Command: olsr dup-hold-time msecs Command: no olsr dup-hold-time Command: olsr top-hold-time msecs Command: no olsr top-hold-time

These commands set the holding times for various tuples (neighbors, packets for identifying duplicates and topology infos) from implementations as suggested in RFC. The commands starting with `no' reset the parameters to their default values.

Command: olsr mpr-update-time msecs Command: no olsr mpr-update-time Command: olsr rt-update-time msecs Command: no olsr rt-update-time

Because MPR and route calculations are rather complex computations and because one topology change is usually followed by others in a short period of time, you have the option to delay the computations with a specified time after the first change was discovered. Setting big values to these fields will reduce computations while setting small values (or zero) will improve reactivity. The routing table delay time should be greater than MPR delay time as routing calculations depend on the MPR set. 5.3. OLSR interfaces

There are some OLSR interface specific options. To access interface options use interface label in the `config' mode.

Command: ip olsr hello-interval msecs Command: no ip olsr hello-interval msecs Command: ip olsr mid-interval msecs Command: no ip olsr mid-interval msecs Command: ip olsr tc-interval msecs Command: no ip olsr tc-interval msecs

These commands set the generation times for the three types of messages currently supported: hello messages, topology control messages and multiple interface associations messages. The `no' versions restore the defaults. 5.3. OLSR Debugging

Command: debug olsr packet (hello|mid|tc|all) Command: no debug olsr packet (hello|mid|tc|all)

Enables/Disables logging for received packets of specified type.

Command: debug olsr event zebra Command: no debug olsr event zebra

Enables/Disables logging for received messages from the zebra daemon.

Command: debug olsr event route-table Command: no debug olsr event route-table

Enables/Disables logging for route table changes.

Command: debug olsr event neigh Command: no debug olsr event neigh

Enables/Disables logging for the 1-hop neighborhood changes.

Command: debug olsr event links Command: no debug olsr event links

Enables/Disables logging for adjacent links changes. 6. Sample session

Here is the start of a simple sample session with OLSRd:

   $ zebra -d
   $ olsrd -d
   $ telnet localhost 2611
   Trying 127.0.0.1...
   Connected to localhost.localdomain.
   Escape character is '^]'.
   Hello, this is Quagga (version 0.98.5).
   Copyright 1996-2005 Kunihiro Ishiguro, et al.


   User Access Verification
   Password:
   olrsd> show ip olsr neighbor
   MAIN ADDR               STATUS          WILLINGNGESS    MPR     MPRS
   172.16.56.135           sym             default         Nope    Nope
   olrsd> enable
   olrsd# configure terminal
   olrsd(config)# router olsr
   olrsd(config-router)# network
     A.B.C.D/M  OLSR network prefix
   olrsd(config-router)# network 192.168.54.1/24
   olrsd(config-router)# show ip olsr
    OLSR Routing Process, Main Address: 172.16.56.1
    Willingness: default
    Neighbor hold time: 40.000 s
    Duplicate hold time: 30.000 s
    Topology hold time: 15.000 s
    MPR update time: 1.000 s
    Routing table update time: 2.000 s
   olrsd(config-router)# 

7. Credits

At this point, Tudor Golubenco is the only developer of this project. If you are a programmer and want to contribuite or if you have questions regarding this project, please contact me at tudor a.t golubenco.org.

Valid XHTML 1.0 Strict SourceForge.net Logo



Referensi

Pranala Menarik