old-www/HOWTO/OLSR-IPv6-HOWTO/olsrlinux.html

1539 lines
25 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML
><HEAD
><TITLE
>OLSR for Linux</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="Linux Optimized Link State Routing Protocol (OLSR) IPv6
HOWTO"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="IPv6"
HREF="ipv6.html"><LINK
REL="NEXT"
TITLE="FAQ"
HREF="faq.html"></HEAD
><BODY
CLASS="sect1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Linux Optimized Link State Routing Protocol (OLSR) IPv6
HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="ipv6.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="faq.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="sect1"
><H1
CLASS="sect1"
><A
NAME="OLSRLinux"
></A
>3. OLSR for Linux</H1
><P
>&#13; There are several OLSR implementation for Linux, but not all of them
support IPv6. You should know how to enable and use IPv6
on Linux. Peter Bieringer has written an excellent <A
HREF="http://ldp.linux.no/HOWTO/Linux+IPv6-HOWTO/"
TARGET="_top"
>Linux IPv6
HOWTO</A
>.
</P
><P
>&#13; There is one OLSR implementation that is becoming the
<SPAN
CLASS="QUOTE"
>"standard"</SPAN
> and most widely used. It goes by the
descriptive name <SPAN
CLASS="QUOTE"
>"OLSRd"</SPAN
> (old Unik-OLSR).
</P
><P
>&#13; OLSRd is an implementation based on the INRA C code, but has been
almost completely rewritten, so there is not much left of the original
INRA code (that mean it almost GPL). OLSRd also is under very rapid
development, and if you report in a bug, it is usually fixed in a
matter of hours.
</P
><P
>&#13; OLSRd <A
HREF="http://www.olsr.org/index.cgi?action=comp"
TARGET="_top"
>fully comply</A
>
to the OLSR RFC, support for plugins, and it has an optional GUI
interface (to see what's going on). The implementation also has a
informative <SPAN
CLASS="QUOTE"
>"up-to-date"</SPAN
> <A
HREF="http://www.olsr.org"
TARGET="_top"
>web-page</A
> with links to mailing
lists and papers.
</P
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="installing"
></A
>3.1. Installing OLSRd</H2
><P
>There are up-to multiple new releases of OLSRd each month, so
check the OLSRd <A
HREF="http://www.olsr.org"
TARGET="_top"
>web-site</A
>
for the newest release.</P
><P
>&#13; <P
></P
><OL
TYPE="1"
><LI
><P
> The latest release as of this writing is 0.4.3, but by the
time you read this there is almost certain a new release. Fetch the
latest release from <A
HREF="http://www.olsr.org/index.cgi?action=download"
TARGET="_top"
>&#13; http://www.olsr.org/index.cgi?action=download</A
>.</P
></LI
><LI
><P
>Unpack, compile and install the source code:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13; <TT
CLASS="prompt"
># </TT
><TT
CLASS="userinput"
><B
><B
CLASS="command"
>tar</B
> jxvf uolsrd-x.y.z</B
></TT
>
<TT
CLASS="prompt"
># </TT
><TT
CLASS="userinput"
><B
><B
CLASS="command"
>cd</B
> unik-olsrd-x.y.z</B
></TT
>
<TT
CLASS="prompt"
># </TT
><TT
CLASS="userinput"
><B
><B
CLASS="command"
>make</B
></B
></TT
>
<TT
CLASS="prompt"
># </TT
><TT
CLASS="userinput"
><B
><B
CLASS="command"
>make install</B
></B
></TT
>
</PRE
></FONT
></TD
></TR
></TABLE
></LI
><LI
><P
>The <TT
CLASS="userinput"
><B
>olsrd</B
></TT
> gets installed to
<TT
CLASS="filename"
>/usr/bin/</TT
> and a default config file,
<TT
CLASS="filename"
>olsrd.conf</TT
> can be found under
<TT
CLASS="filename"
>/etc</TT
></P
></LI
></OL
>
</P
><P
>Check out the <TT
CLASS="filename"
>/etc/olsrd.conf</TT
> config
file, and change values to fit your system. All values in this file
can be overridden with command line options to
<TT
CLASS="userinput"
><B
>olsrd</B
></TT
>. The main options to change are:</P
><P
>&#13; <TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="screen"
>&#13; # Debug level(0-9)
# If set to 0 the daemon runs in the background
DEBUG 1
# IP version to use (4 or 6)
IPVERSION 6
# A list of whitespace separated interface names
INTERFACES eth1
</PRE
></FONT
></TD
></TR
></TABLE
>
</P
><P
>&#13; Later on, when you know OLSRd is configured correctly, you may set
<SPAN
CLASS="QUOTE"
>"DEBUG"</SPAN
> to <TT
CLASS="userinput"
><B
>0</B
></TT
> to make it run in
the background. You may then also add it to your init scripts. But
to test that everything first, set this to at least
<TT
CLASS="userinput"
><B
>1</B
></TT
> (setting this higher will produce a lot
more info messages on APM, forwarding, parsing of the config file
etc.)
</P
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="using"
></A
>3.2. Using OLSRd</H2
><DIV
CLASS="sect3"
><H3
CLASS="sect3"
><A
NAME="onehost"
></A
>3.2.1. On one host</H3
><P
>When OLSRd is installed and configured, it can be started
as root with:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13; <TT
CLASS="prompt"
># </TT
><TT
CLASS="userinput"
><B
><B
CLASS="command"
>olsrd</B
></B
></TT
>
</PRE
></FONT
></TD
></TR
></TABLE
><P
>All the settings in <TT
CLASS="filename"
>/etc/olsrd.conf</TT
>
can be overridden by command line options:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13; <TT
CLASS="prompt"
># </TT
><TT
CLASS="userinput"
><B
><B
CLASS="command"
>olsrd</B
> -i eth1 -ipv6 -d 1</B
></TT
>
</PRE
></FONT
></TD
></TR
></TABLE
><P
>Would start <TT
CLASS="userinput"
><B
>olsrd</B
></TT
> listening on
interface <TT
CLASS="userinput"
><B
>eth1</B
></TT
> using IPv6 and with debug
messages.</P
><P
>We start olsrd:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="screen"
>&#13; <TT
CLASS="prompt"
># </TT
><TT
CLASS="userinput"
><B
><B
CLASS="command"
>olsrd</B
> -i eth1 -d 1 -ipv6</B
></TT
>
*** UniK olsrd-0.4.3 ***
hello interval = 2.00 hello int nonwireless: = 4.00 <A
NAME="tuning"
><IMG
SRC="../images/callouts/1.gif"
HSPACE="0"
VSPACE="0"
BORDER="0"
ALT="(1)"></A
>
tc interval = 5.00 polling interval = 0.10
neighbor_hold_time = 6.00 neighbor_hold_time_nw = 12.00
topology_hold_time = 15.00 tos setting = 16
hna_interval = 15.00 mid_interval = 5.00
Willingness set to 3 - next update in 20.000000 secs
Using IP version 6
Using multicast address ff05::15
---- Interface configuration ----
eth1: <A
NAME="interface"
><IMG
SRC="../images/callouts/2.gif"
HSPACE="0"
VSPACE="0"
BORDER="0"
ALT="(2)"></A
>
Address: fec0:106:2700::10
Multicast: ff05::15
Interface eth1 set up for use with index 0
Main address: fec0:106:2700::10 <A
NAME="adr"
><IMG
SRC="../images/callouts/3.gif"
HSPACE="0"
VSPACE="0"
BORDER="0"
ALT="(3)"></A
>
NEIGHBORS: l=linkstate, m=MPR, w=willingness
Thread created - polling every 0.10 seconds <A
NAME="list"
><IMG
SRC="../images/callouts/4.gif"
HSPACE="0"
VSPACE="0"
BORDER="0"
ALT="(4)"></A
>
neighbor list: 11:43:17.214807
neighbor list: 11:43:19.194967
neighbor list: 11:43:21.395046
neighbor list: 11:43:23.604800
neighbor list: 11:43:25.694875
</PRE
></FONT
></TD
></TR
></TABLE
><DIV
CLASS="calloutlist"
><DL
COMPACT="COMPACT"
><DT
><A
HREF="olsrlinux.html#tuning"
><IMG
SRC="../images/callouts/1.gif"
HSPACE="0"
VSPACE="0"
BORDER="0"
ALT="(1)"></A
></DT
><DD
>This shows all the settings OLSRd is using. You may
override these by either specifying it in the config file
(<TT
CLASS="filename"
>/etc/olsrd.conf</TT
>) or specify it at the
command line. Read the <A
HREF="http://www.ietf.org/rfc/rfc3626.txt"
TARGET="_top"
>OLSR RFC</A
> for a
description on what all these settings means.</DD
><DT
><A
HREF="olsrlinux.html#interface"
><IMG
SRC="../images/callouts/2.gif"
HSPACE="0"
VSPACE="0"
BORDER="0"
ALT="(2)"></A
></DT
><DD
>OLSRd found our interface. If you are using OLSRd with
multiple interfaces, <SPAN
CLASS="QUOTE"
>"Multiple Interface
Declaration"</SPAN
> (MID) messages will be generated.</DD
><DT
><A
HREF="olsrlinux.html#adr"
><IMG
SRC="../images/callouts/3.gif"
HSPACE="0"
VSPACE="0"
BORDER="0"
ALT="(3)"></A
></DT
><DD
>If you are using OLSRd with multiple interfaces, it will
pick the first interface specified as the <SPAN
CLASS="QUOTE"
>"main"</SPAN
>
address.</DD
><DT
><A
HREF="olsrlinux.html#list"
><IMG
SRC="../images/callouts/4.gif"
HSPACE="0"
VSPACE="0"
BORDER="0"
ALT="(4)"></A
></DT
><DD
>Since no other hosts are running OLSRd, this list is
empty.</DD
></DL
></DIV
><P
>Another thing worth noticing, is that an entry is added to
our routing table:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="screen"
>&#13; <TT
CLASS="prompt"
>#</TT
> <TT
CLASS="userinput"
><B
><B
CLASS="command"
>route</B
> -A inet6</B
></TT
>
Destination: Next Hop Flags Metric Ref Use Iface
...
ff05::15/128 ff05::15 UAC 0 1 1 eth1
...
</PRE
></FONT
></TD
></TR
></TABLE
><P
>This is the IPv6 multicast address OLSR is using to talk to
other nodes running OLSR.</P
></DIV
><DIV
CLASS="sect3"
><H3
CLASS="sect3"
><A
NAME="addhosts"
></A
>3.2.2. Adding other hosts</H3
><P
>There is no point in using OLSRd on only one node, so we add
some nodes. You will then see the <SPAN
CLASS="QUOTE"
>"neighbor list"</SPAN
> gets
updated:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="screen"
>&#13; neighbor list: 12:55:14.733586
neighbor list: 12:55:18.803585
Willingness for fec0:106:2700::11 changed from 0 to 3 - UPDATING <A
NAME="will"
><IMG
SRC="../images/callouts/1.gif"
HSPACE="0"
VSPACE="0"
BORDER="0"
ALT="(1)"></A
>
neighbor list: 12:55:22.763585
fec0:106:2700::11:l=0:m=0:w=3[2hlist:] <A
NAME="newhost"
><IMG
SRC="../images/callouts/2.gif"
HSPACE="0"
VSPACE="0"
BORDER="0"
ALT="(2)"></A
>
neighbor list: 12:55:26.833589
fec0:106:2700::11:l=1:m=0:w=3[2hlist:]
Willingness for fec0:106:2700::12 changed from 0 to 2 - UPDATING <A
NAME="thirdhost"
><IMG
SRC="../images/callouts/3.gif"
HSPACE="0"
VSPACE="0"
BORDER="0"
ALT="(3)"></A
>
neighbor list: 12:55:30.903585
fec0:106:2700::12:l=0:m=0:w=2[2hlist:]
fec0:106:2700::11:l=1:m=0:w=3[2hlist:]
neighbor list: 12:55:34.863585
fec0:106:2700::12:l=0:m=0:w=2[2hlist:]
fec0:106:2700::11:l=1:m=0:w=3[2hlist:]
neighbor list: 12:55:39.153586
fec0:106:2700::12:l=1:m=0:w=2[2hlist:fec0:106:2700::11:] <A
NAME="triangle"
><IMG
SRC="../images/callouts/4.gif"
HSPACE="0"
VSPACE="0"
BORDER="0"
ALT="(4)"></A
>
fec0:106:2700::11:l=1:m=0:w=3[2hlist:fec0:106:2700::12:] <A
NAME="triangle2"
><IMG
SRC="../images/callouts/5.gif"
HSPACE="0"
VSPACE="0"
BORDER="0"
ALT="(5)"></A
>
neighbor list: 12:55:43.443605
fec0:106:2700::12:l=1:m=0:w=2[2hlist:fec0:106:2700::11:]
fec0:106:2700::11:l=1:m=0:w=3[2hlist:fec0:106:2700::12:]
</PRE
></FONT
></TD
></TR
></TABLE
><DIV
CLASS="calloutlist"
><DL
COMPACT="COMPACT"
><DT
><A
HREF="olsrlinux.html#will"
><IMG
SRC="../images/callouts/1.gif"
HSPACE="0"
VSPACE="0"
BORDER="0"
ALT="(1)"></A
></DT
><DD
>&#13; Another node detected (node B). This specifies the willingness of a node
to carry and forward traffic for other nodes. Here the new node
<TT
CLASS="userinput"
><B
>fec0:106:2700::11</B
></TT
> is willing to forward
traffic. A host with low battery may not be willing to forward
large amount of traffic, - so it will proclaim a lower
willingness value (routing based on powerstatus is available as a
plugin).
</DD
><DT
><A
HREF="olsrlinux.html#newhost"
><IMG
SRC="../images/callouts/2.gif"
HSPACE="0"
VSPACE="0"
BORDER="0"
ALT="(2)"></A
></DT
><DD
>&#13; The node has been added to our routing table. We can not (yet)
reach any other node by way of this node, since the 2-hop neighbor
list (<TT
CLASS="userinput"
><B
>[2hlist:]</B
></TT
>) is empty. A 2-hop
neighbor is a node heard by a neighbor.
</DD
><DT
><A
HREF="olsrlinux.html#thirdhost"
><IMG
SRC="../images/callouts/3.gif"
HSPACE="0"
VSPACE="0"
BORDER="0"
ALT="(3)"></A
></DT
><DD
>&#13; Here is a third node (node C) running OLSRd.
</DD
><DT
><A
HREF="olsrlinux.html#triangle"
><IMG
SRC="../images/callouts/4.gif"
HSPACE="0"
VSPACE="0"
BORDER="0"
ALT="(4)"></A
></DT
><DD
>&#13; After a short time, when all nodes have been updated and routes
calculated, we may also reach any of the other nodes via the
other. The 2-hop neighbor list
(<TT
CLASS="userinput"
><B
>[2hlist:]</B
></TT
>) is populated: We can reach node
<TT
CLASS="userinput"
><B
> B</B
></TT
> via <TT
CLASS="userinput"
><B
>C</B
></TT
>.
</DD
><DT
><A
HREF="olsrlinux.html#triangle2"
><IMG
SRC="../images/callouts/5.gif"
HSPACE="0"
VSPACE="0"
BORDER="0"
ALT="(5)"></A
></DT
><DD
>&#13; Here we can reach node <TT
CLASS="userinput"
><B
>C</B
></TT
> via
<TT
CLASS="userinput"
><B
>B</B
></TT
>.
</DD
></DL
></DIV
><P
>You will also see the routing table is updated with the new
hosts:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="screen"
>&#13; <TT
CLASS="prompt"
>#</TT
> <TT
CLASS="userinput"
><B
><B
CLASS="command"
>route</B
> -A inet6</B
></TT
>
Destination: Next Hop Flags Metric Ref Use Iface
...
fec0:106:2700::11/128 :: UH 1 0 0 eth1
fec0:106:2700::12/128 :: UH 1 0 0 eth1
...
</PRE
></FONT
></TD
></TR
></TABLE
><P
>&#13; The real beauty of OLSR is when you add a bunch of nodes and move
them around. You can still reach each one of them either directly
(if they are close), or through other nodes.
</P
></DIV
><DIV
CLASS="sect3"
><H3
CLASS="sect3"
><A
NAME="movement"
></A
>3.2.3. Movement</H3
><P
>&#13; When every node can reach every other node, it's no fun. Let's
start moving the nodes, so that node <SPAN
CLASS="QUOTE"
>"A"</SPAN
> and
<SPAN
CLASS="QUOTE"
>"B"</SPAN
> are out of (radio) range of each other. So when
we move node <SPAN
CLASS="QUOTE"
>"A"</SPAN
> far enough away so that
it can't hear node <SPAN
CLASS="QUOTE"
>"C"</SPAN
>, all traffic must go through
node <SPAN
CLASS="QUOTE"
>"B"</SPAN
>: </P
><DIV
CLASS="mediaobject"
><P
><IMG
SRC="images/movement.png"
ALIGN="center"
WIDTH="450"><DIV
CLASS="caption"
><P
>We move our three nodes so that node
<TT
CLASS="userinput"
><B
>A</B
></TT
> and <TT
CLASS="userinput"
><B
>C</B
></TT
> must
speak through node <TT
CLASS="userinput"
><B
>B</B
></TT
> to reach each
other.
</P
></DIV
></P
></DIV
><P
>&#13; Tip: Instead of physically moving the nodes around, you can use
<TT
CLASS="userinput"
><B
>ip6tables</B
></TT
>. You can drop all packet using the
MAC-address. You just need to block on one node:
</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="screen"
>&#13; <TT
CLASS="prompt"
># </TT
><TT
CLASS="userinput"
><B
><B
CLASS="command"
>ip6tables</B
> -A INPUT -m mac --mac-source XX:XX:XX:XX:XX:XX -j DROP</B
></TT
>
</PRE
></FONT
></TD
></TR
></TABLE
><P
>&#13; The output from OLSRd on host A is then:
</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="screen"
>&#13; neighbor list: 13:22:35.693587
fec0:106:2700::11:l=1:m=1:w=3[2hlist:fec0:106:2700::12:] <A
NAME="onlyone"
><IMG
SRC="../images/callouts/1.gif"
HSPACE="0"
VSPACE="0"
BORDER="0"
ALT="(1)"></A
>
neighbor list: 13:22:40.093588
fec0:106:2700::11:l=1:m=1:w=3[2hlist:fec0:106:2700::12:]
neighbor list: 13:22:44.053594
fec0:106:2700::11:l=1:m=1:w=3[2hlist:fec0:106:2700::12:]
neighbor list: 13:22:48.233594
fec0:106:2700::11:l=1:m=1:w=3[2hlist:fec0:106:2700::12:]
neighbor list: 13:22:52.193605
fec0:106:2700::11:l=1:m=1:w=3[2hlist:fec0:106:2700::12:]
</PRE
></FONT
></TD
></TR
></TABLE
><DIV
CLASS="calloutlist"
><DL
COMPACT="COMPACT"
><DT
><A
HREF="olsrlinux.html#onlyone"
><IMG
SRC="../images/callouts/1.gif"
HSPACE="0"
VSPACE="0"
BORDER="0"
ALT="(1)"></A
></DT
><DD
>&#13; We can reach node <TT
CLASS="userinput"
><B
>B</B
></TT
> directly, and via node
<TT
CLASS="userinput"
><B
>B</B
></TT
> we can reach node <TT
CLASS="userinput"
><B
>C</B
></TT
>.
</DD
></DL
></DIV
><P
>&#13; The routing table also gets updated. For node
<TT
CLASS="userinput"
><B
>A</B
></TT
> to reach node <TT
CLASS="userinput"
><B
>C</B
></TT
> it
must go through node <TT
CLASS="userinput"
><B
>B</B
></TT
>:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="screen"
>&#13; <TT
CLASS="prompt"
>#</TT
> <TT
CLASS="userinput"
><B
><B
CLASS="command"
>route</B
> -A inet6</B
></TT
>
Destination: Next Hop Flags Metric Ref Use Iface
...
fec0:106:2700::11/128 :: UH 1 1 0 eth1
fec0:106:2700::12/128 fec0:106:2700::11 UGH 2 0 0 eth1
...
</PRE
></FONT
></TD
></TR
></TABLE
></DIV
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="hna"
></A
>3.3. What about HNA messages?</H2
><P
><SPAN
CLASS="QUOTE"
>"
In order to provide this capability of injecting external routing
information into an OLSR MANET, a node with such non-MANET interfaces
periodically issues a Host and Network Association (HNA) message,
containing sufficient information for the recipients to construct an
appropriate routing table."</SPAN
>
</P
><P
><SPAN
CLASS="QUOTE"
>"
An example of such a situation could be where a node is equipped with
a fixed network (e.g., an Ethernet) connecting to a larger network as
well as a wireless network interface running OLSR."</SPAN
> --- <A
HREF="http://www.ietf.org/rfc/rfc2501.txt"
TARGET="_top"
>RFC3626: OLSR, section
12 (page 51).</A
>
</P
><DIV
CLASS="mediaobject"
><P
><IMG
SRC="images/HNA.png"
ALIGN="center"
WIDTH="550"><DIV
CLASS="caption"
><P
>OLSR with a gateway (GW), that sends out HNA messages. All
the other nodes may then be accessing the
<SPAN
CLASS="QUOTE"
>"Internet"</SPAN
></P
></DIV
></P
></DIV
><P
>&#13; To have one node, act as a gateway and send out HNA messages, you
must change the <TT
CLASS="userinput"
><B
>HNA6</B
></TT
> in
<TT
CLASS="filename"
>/etc/olsrd.conf</TT
>:
</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="screen"
>&#13; # HNA IPv6 routes
# syntax: netaddr prefix
# Example Internet gateway
HNA6 :: 0
</PRE
></FONT
></TD
></TR
></TABLE
><P
>&#13; When you start <TT
CLASS="userinput"
><B
>OLSRd</B
></TT
>, you will see the node
is sending out HNA messages periodically:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="screen"
>&#13; ...
Sending HNA (48 bytes)...
...
</PRE
></FONT
></TD
></TR
></TABLE
><P
>&#13; When the other nodes receives a HNA message, they update their
routing table:
</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="screen"
>&#13; <TT
CLASS="prompt"
>#</TT
> <TT
CLASS="userinput"
><B
><B
CLASS="command"
>route</B
> -A inet6</B
></TT
>
Destination: Next Hop Flags Metric Ref Use Iface
...
::/0 fec0:106:2700::1 UG 1 0 0 eth1
...
</PRE
></FONT
></TD
></TR
></TABLE
><P
>&#13; You may also have multiple nodes in a MANET to act as gateways
(sending out HNA messages). Each mobile node then use the nearest
gateway.
</P
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="plugins"
></A
>3.4. Plugin support</H2
><P
>As of version 0.4.3 OLSRd also support plugins. Plugins may be
used to add extended functionality in a MANET. If only a subset of
the nodes knows how to interpret the messagetype, it will be
forwarded by all the nodes by the <SPAN
CLASS="QUOTE"
>"default forwarding
algorithm"</SPAN
>
(see section 3.4.1 in the <A
HREF="http://ietf.org/rfc/rfc3626.txt"
TARGET="_top"
>OLSR RFC</A
>). This way
certain nodes may add special functionlity into OLSR.</P
><P
>As of this writing, two example plugins is included in the
OLSRd release. One of these plugins add routing based on
powerstatus. If one node has low battery, it can set its willingness
lower and traffic may be routed through other nodes.</P
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="gui"
></A
>3.5. Optional GUI</H2
><P
>&#13; OLSRd also has an optional GUI, which can show a list of
available nodes and grab packets. To compile the GUI front end,
you must have GTK2. In <TT
CLASS="filename"
>unik-olsrd-x.y.z</TT
>
directory do:
</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="screen"
>&#13;
<TT
CLASS="prompt"
>#</TT
> <TT
CLASS="userinput"
><B
><B
CLASS="command"
>cd</B
> front-end</B
></TT
>
<TT
CLASS="prompt"
>#</TT
> <TT
CLASS="userinput"
><B
><B
CLASS="command"
>make</B
></B
></TT
>
<TT
CLASS="prompt"
>#</TT
> <TT
CLASS="userinput"
><B
><B
CLASS="command"
>make</B
> install</B
></TT
>
</PRE
></FONT
></TD
></TR
></TABLE
><DIV
CLASS="note"
><P
></P
><TABLE
CLASS="note"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/note.gif"
HSPACE="5"
ALT="Note"></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>&#13; Remember to start OLSRd with the
<TT
CLASS="userinput"
><B
>-ipc</B
></TT
> switch or set
<TT
CLASS="userinput"
><B
>IPC-CONNECT yes</B
></TT
> in
<TT
CLASS="userinput"
><B
>/etc/olsrd.conf</B
></TT
> to enable the GUI to chat
with OLSRd.
</P
></TD
></TR
></TABLE
></DIV
><P
>&#13; To see some examples of the use of GUI, check out <A
HREF="http://www.olsr.org/index.cgi?action=gui"
TARGET="_top"
>&#13; http://www.olsr.org/index.cgi?action=gui</A
>
</P
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="other"
></A
>3.6. Other OLSR implementations</H2
><P
>There is also other OLSR implementations, none have gained as
much popularity as OLSRd, and none of them (except <A
HREF="http://qolsr.lri.fr/"
TARGET="_top"
>QOLSR</A
>?) are fully RFC
compliant.</P
><DIV
CLASS="sect3"
><H3
CLASS="sect3"
><A
NAME="inria"
></A
>3.6.1. INRIA</H3
><P
>INRIA was one of the first(?) implementation of OLSR <A
HREF="http://hipercom.inria.fr/olsr/#code"
TARGET="_top"
>http://hipercom.inria.fr/olsr/#code</A
>.
Their web-site has not been updated for quite a while, and the
OLSR code you can download only complies to
draft-ietf-manet-olsr-03.txt (it's now an RFC). There is suppose to
be another more up-to-date version of INRIA olsr, but I have not
found it. INRIA OLSR does not support IPv6.</P
></DIV
><DIV
CLASS="sect3"
><H3
CLASS="sect3"
><A
NAME="nr"
></A
>3.6.2. NROLSR</H3
><P
>The <SPAN
CLASS="QUOTE"
>"US Naval Research Laboratory"</SPAN
> (NRL) also
has an OLSR implementation. It is written in C++, and has IPv6
support. <A
HREF="http://pf.itd.nrl.navy.mil/projects/olsr/"
TARGET="_top"
>&#13; http://pf.itd.nrl.navy.mil/projects/olsr/</A
>
</P
></DIV
><DIV
CLASS="sect3"
><H3
CLASS="sect3"
><A
NAME="crc"
></A
>3.6.3. CRCOLSR</H3
><P
>CRCOLSR is a implementation based on the French INRIA
code. It is is supposed to be maintained by <SPAN
CLASS="QUOTE"
>"Communication
Research Center"</SPAN
> (CRC) in Canada. But as of this writing,
there have been no new releases since April 3, 2003. <A
HREF="http://pf.itd.nrl.navy.mil/projects/olsr/"
TARGET="_top"
>&#13; http://pf.itd.nrl.navy.mil/projects/olsr/</A
></P
></DIV
><DIV
CLASS="sect3"
><H3
CLASS="sect3"
><A
NAME="qolsr"
></A
>3.6.4. QOLSR</H3
><P
>QOLSR is aiming to provide <SPAN
CLASS="QUOTE"
>"Quality of
Service"</SPAN
> routing in wireless mobile ad hoc
networks. There is no QoS support at the time of this writing,
and support for ipv4/ipv6 is triggered at compile time. Written
in C++.</P
></DIV
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="ipv6.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="faq.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>IPv6</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>FAQ</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>