diff --git a/LDP/howto/docbook/OLSR-IPv6-HOWTO/OLSR-IPv6-HOWTO.xml b/LDP/howto/docbook/OLSR-IPv6-HOWTO/OLSR-IPv6-HOWTO.xml new file mode 100644 index 00000000..9ac1c72e --- /dev/null +++ b/LDP/howto/docbook/OLSR-IPv6-HOWTO/OLSR-IPv6-HOWTO.xml @@ -0,0 +1,1101 @@ + + + + + +
+ + + + Linux Optimized Link State Routing Protocol (OLSR) IPv6 + HOWTO + OLSR-IPv6 + + + Lars + Strand + + +
lars (at) unik no
+
+
+ LKS + + + 2004-03-08 + + + + + 0.5 + 2004-03-08 + LKS + An almost complete rewrite. Adding OLSRd (old + uOLSR), updated to RFC3626. Removed NROLSR and + CRCOLSR. Converted to XML Docbook. Changed the license from + GFDL + to OPL due + to some GFDL + problems. + + + 0.3 + 2003-08-05 + LKS + Initial release. + + + + + + + This document describes the software and procedures to set up + and use Optimized + Link State Routing Protocol (OLSR) with IPv6 for + Linux. OLSR is used as a routing protocol for + Mobile Ad-Hoc Networks (MANET) (also + called spontaneous network). + + + +
+ + + + + Introduction + + + This document describes the software and procedures to set up + and use Optimized Link State Routing Protocol (OLSR) with IPv6 + for Linux. + + + + + + Why Ad-Hoc network? + + + An English translation of ad-hoc is For a + particular purpose (improvised, made up in an instant) + (source: Wikipedia). + Ad-hoc network, or spontaneous network, is + especially useful when dealing with wireless devices in which some + of the devices are part of the network only for the duration of a + communications session and the need for a dynamic network topology + is eminent. A Mobile Ad hoc Network is usually + called a MANET. + + + + + + + What is a MANET? + + A MANET consists of mobile platforms (e.g., a router with multiple + hosts and wireless communications devices)--herein simply referred to + as nodes--which are free to move about + arbitrarily. The nodes may be located in or on airplanes, ships, + trucks, cars, perhaps even on people or very small devices, and + there may be multiple hosts per router. A MANET is an autonomous + system of mobile nodes. The system may operate in isolation, or + may have gateways to and interface with a fixed network. + --- RFC2501: + Mobile Ad hoc Networking (MANET), section 3 (page 3). + + + + + + + What is Optimized Link State Routing (OLSR)? + + OLSR is a proactive routing protocol for mobile ad hoc + networks. The protocol inherits the stability of a link state + algorithm and has the advantage of having routes immediately + available when needed due to its proactive nature. OLSR is an + optimization over the classical link state protocol, tailored for + mobile ad hoc networks. + + + + OLSR is designed to work in a completely distributed manner + and does not depend on any central entity. The protocol does NOT + REQUIRE reliable transmission of control messages: each node sends + control messages periodically, and can therefore sustain a + reasonable loss of some such messages. Such losses occur + frequently in radio networks due to collisions or other + transmission problems. --- RFC3626: OLSR, section + 1.3 (page 8) + + + + + + + How does OLSR work? + + The Optimized Link State Routing Protocol (OLSR) is + developed for mobile ad hoc networks. It operates as a table + driven, proactive protocol, i.e., exchanges topology information + with other nodes of the network regularly. Each node selects a + set of its neighbor nodes as multipoint relays + (MPR). In OLSR, only nodes, selected as such MPRs, are + responsible for forwarding control traffic, intended for diffusion + into the entire network. MPRs provide an efficient mechanism for + flooding control traffic by reducing the number of transmissions + required. --- RFC3626: OLSR, section + 1 (page 4) + + + + + + + + What about IBSS (IEEE ad-hoc mode)? + + The IEEE 802.11 standard defines two modes: + + + + + + + 801.11 + + + IEEE 802.11 standard + + + + + + Infrastructure mode: The + wireless network consist of at least one access point (AP) + connected to the wired network and a set of wireless + nodes (WN). This configuration is called a Basic Service Set + (BSS). Extended Service Set (ESS) is a set of two or + more BSSs (multiple cells). + + + + Ad hoc mode: Also called + IEEE ad-hoc mode or peer-to-peer + mode. This configuration is called + Independent Basic Service Set + (IBSS) and is useful for establishing a + network where wireless infrastructure does not exist or where + services are not required. + + + + + So why use OLSR when we can use IEEE ad-hoc + mode? IEEE ad-hoc mode does NOT support + multihop. See figure + below + + + + + + + + + Multihop + + + IEEE 8102.11 Ad hoc mode has + no support for multihop, something OLSR + have. + + + + + + + + + +IPv6 + +IP version 6 (IPv6) is a new version of the Internet Protocol, +designed as the successor to IP version 4 (IPv4) [RFC-791]. The +changes from IPv4 to IPv6 fall primarily into the following +categories: + + + + + Expanded addressing capabilities + + + Header format simplification + + + Improved support for extensions and options + + + Flow labeling capability + + + Authentication and privacy capabilities + + + +For more information on IPv6 in general, visit the IETF's IPv6 +Working Group. + + + + + + + + OLSR for Linux + + + 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 Linux IPv6 + HOWTO. + + + + There is one OLSR implementation that is becoming the + standard and most widely used. It goes by the + descriptive name OLSRd (old Unik-OLSR). + + + + 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 has a very rapid + development, and if you report in a bug, it is usually fixed in a + matter of hours. + + + + OLSRd fully comply + to the OLSR RFC, and it has an optional GUI interface (to see what's + going on). The implementation also has a informative + up-to-date web-page with mailing lists and papers. + + + + + Installing OLSRd + There are up-to multiple new releases of OLSRd each month, so + check the OLSRd web-site + for the newest release. + + + + + + The latest release as of this writing is 0.4.0, but by the + time you read this there is almost certain a new release. Fetch the + latest release from + http://www.olsr.org/index.cgi?action=download. + + + + Unpack, compile and install the source code: + + # tar jxvf uolsrd-x.y.z + # cd unik-olsrd-x.y.z + # make + # make install + + + + + The olsrd gets installed to + /usr/bin/ and a default config file, + olsrd.conf can be found under + /etc + + + + + + Check out the /etc/olsrd.conf config + file, and change values to fit your system. All values in this file + can be overridden with command line options to + olsrd. The main options to change are: + + + + # 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 + + + + + Later on, when you know OLSRd is configured correctly, you may set + DEBUG to 0 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 + 1 (setting this higher will produce a lot + more info messages on APM, forwarding, parsing of the config file + etc.) + + + + + + + Using OLSRd + + + + On one host + + When OLSRd is installed and configured, it can be started + as root with: + + + # olsrd + + + All the settings in /etc/olsrd.conf + can be overridden by command line options: + + + # olsrd -i eth1 -ipv6 -d 1 + + + Would start olsrd listening on + interface eth1 using IPv6 and with debug + messages. + + We start olsrd: + + + # olsrd -i eth1 -d 1 -ipv6 + + *** UniK olsrd-0.4.0 *** + + hello interval = 2.00 hello int nonwireless: = 4.00 + 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: + Address: fec0:106:2700::10 + Multicast: ff05::15 + Interface eth1 set up for use with index 0 + + + Main address: fec0:106:2700::10 + + NEIGHBORS: l=linkstate, m=MPR, w=willingness + + Thread created - polling every 0.10 seconds + 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 + + + + + + This shows all the settings OLSRd are using. You may + override these by either specify it in the config file + (/etc/olsrd.conf) or specify it at the + command line. Read the OLSR RFC for a + description on what all these settings means. + + + + OLSRd found our interface. If you are using OLSRd with + multiple interfaces, Multiple Interface + Declaration (MID) messages will be generated. + + + + If you are using OLSRd with multiple interfaces, it will + pick one as the main address (the first + interface specified). + + + + Since no other hosts are running OLSRd, this list is + empty. + + + + + Another thing worth noticing, is that an entry is added to + our routing table: + + + # route -A inet6 + Destination: Next Hop Flags Metric Ref Use Iface + ... + ff05::15/128 ff05::15 UAC 0 1 1 eth1 + ... + + + This is the IPv6 multicast address OLSR is using to talk to + other nodes running OLSR. + + + + + Adding other hosts + + There is no point in using OLSRd on only one node, so we add + some nodes. You will then see the neighbor list gets + updated: + + + neighbor list: 12:55:14.733586 + neighbor list: 12:55:18.803585 + Willingness for fec0:106:2700::11 changed from 0 to 3 - UPDATING + neighbor list: 12:55:22.763585 + fec0:106:2700::11:l=0:m=0:w=3[2hlist:] + 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 + 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:] + fec0:106:2700::11:l=1:m=0:w=3[2hlist:fec0:106:2700::12:] + 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:] + + + + + + + Another node detected (node B). This specifies the willingness of a node + to carry and forward traffic for other nodes. Here the new node + fec0:106:2700::11 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. + + + + + + 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 ([2hlist:]) is empty. A 2-hop + neighbor is a node heard by a neighbor. + + + + + + Here is a third node (node C) running OLSRd. + + + + + + After a short time, when all nodes has been updated and routes + calculated, we may also reach any of the other nodes via the + other. The 2-hop neighbor list + ([2hlist:]) is populated: We can reach node + B via C. + + + + + + Here we can reach node C via + B. + + + + + + You will also see the routing table is updated with the new + hosts: + + + # route -A inet6 + 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 + ... + + + + 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. + + + + + + + Movement + + + When every node can reach every other node, it's no fun. Lets + start moving the nodes, so that node A and + B is out of (radio) range of each other. So when + we move node A far enough away so that + it can't hear node C, all traffic must go through + node B: + + + + + + + Movement + + + We move our three nodes so that node + A and C must + speak through node B to reach each + other. + + + + + + + + Tip: Instead of physically moving the nodes around, you can use + ip6tables. You can drop all packet using the + MAC-address. You just need to block on one node: + + + + # ip6tables -A INPUT -m mac --mac-source XX:XX:XX:XX:XX:XX -j DROP + + + + The output from OLSRd on host A is then: + + + + neighbor list: 13:22:35.693587 + fec0:106:2700::11:l=1:m=1:w=3[2hlist:fec0:106:2700::12:] + 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:] + + + + + + We can reach node B directly, and via node + B we can reach node C. + + + + + + + The routing table also gets updated. For node + A to reach node C it + must go through node B: + + + # route -A inet6 + 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 + ... + + + + + + + + What about HNA messages? + + + 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. + + + + 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. --- RFC3626: OLSR, section + 12 (page 51). + + + + + + + + HNA + + + OLSR with a gateway (GW), that sends out HNA messages. All + the other nodes may then be accessing the + Internet + + + + + To have one node, act as a gateway and send out HNA messages, you + must change the HNA6 in + /etc/olsrd.conf: + + + + # HNA IPv6 routes + # syntax: netaddr prefix + # Example Internet gateway + HNA6 :: 0 + + + + When you start OLSRd, you will see the node + is sending out HNA messages periodically: + + + ... + Sending HNA (48 bytes)... + ... + + + + When the other nodes receives a HNA message, they update their + routing table: + + + + # route -A inet6 + Destination: Next Hop Flags Metric Ref Use Iface + ... + ::/0 fec0:106:2700::1 UG 1 0 0 eth1 + ... + + + + 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. + + + + + + + Optional GUI + + 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 unik-olsrd-x.y.z + directory do: + + + + + # cd front-end + # make + # make install + + + + Note! Remember to start OLSRd with the + -ipc switch or set + IPC-CONNECT yes in + /etc/olsrd.conf to enable the GUI to chat + with OLSRd. + + + + To see some examples of the use of GUI, check out + http://www.olsr.org/index.cgi?action=gui + + + + + + + Other OLSR implementations + There is also other OLSR implementations, none have gain so + much popularity as OLSRd, and none of them (expect QOLSR?) are fully RFC + compliant. + + + + INRIA + INRIA was one of the first(?) implementation of OLSR http://hipercom.inria.fr/olsr/#code. + Their web-site has not been updated for quite a while, and the + OLSR code you can download only comply to + draft-ietf-manet-olsr-03.txt (it's now a RFC). There is suppose to + be another more up-to-date version of INRIA olsr, but I have not + found it. INRIA OLSR has not support for IPv6. + + + + + + NROLSR + The US Naval Research Laboratory (NRL) also + has an OLSR implementation. It is written in C++, and has IPv6 + support. + http://pf.itd.nrl.navy.mil/projects/olsr/ + + + + + + + CRCOLSR + CRCOLSR is a implementation based on the French INRIA + code. It is is supposed to be maintained by Communication + Research Center (CRC) i Canada. But as of this writing, + it has been no new releases since April 3, 2003. + http://pf.itd.nrl.navy.mil/projects/olsr/ + + + + + QOLSR + QOLSR is aiming to provide Quality of + Service 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++. + + + + + + + + + + FAQ + + Some of these question/answers are from the OLSRd site. + + + + Q: If OLSRd fully RFC3626 + compliant? + + A: Yes. It even has implemented some of the extra + functionality mentioned in the RFC. See the + RFC Compliance section for complete list. + + + + + Q: Can i mix site-local and global IPv6 + addresses? + + A: Yes. But keep in mind that they intentionally was not + designed to be used concurrently. The network topology can be + quite messy if you start using these two. + + + + + Q: The GUI front-end failed to + compile... why? + + A: You probably don't have GTK2.0 development libraries + installed. + + + + Q: If there is multiply gateways present, how does + the mobile node conclude to use the nearest one? + + A: When a new gateway is detected, the Mobile Node check the + distance (number of hops) to this newly discovered gateway + compared to the current gateway. If there is a shorter distance, + this new gateway becomes the current (default) gateway. See + section 12.6.2 in the OLSR RFC (RFC3626) + + + + Q: I get OLSRd up and running - but the nodes + don't seem to hear each other! + + A: Most of the time this is a configuration error: Check + the following: + + + + + If using WLAN interfaces make sure the ESSID/key match. + . + + + Make sure the cards are set in ad-hoc mode + and not managed. + + + + Make sure you are not blocking UDP/698. If using + netfilter run ip6tables -L as root + to see what rules are set. ip6tables + -F flushes all rules. + + + + + + + + + + + + + + Useful Resources + + + + + + OLSRd (old uOLSR) + http://www.olsr.org + + + + + Optimized Link State Routing Protocol (OLSR) RFC3626 + http://www.ietf.org/rfc/rfc3626.txt + + + + + Mobile Ad hoc Networking (MANET) RFC2501 + http://www.ietf.org/rfc/rfc3626.txt + + + + + Mobile Ad-hoc Networks (manet) Working Group (IETF) + http://www.ietf.org/html.charters/manet-charter.html + + + + + Open Shortest Path First IGP (ospf) + http://www.ietf.org/html.charters/ospf-charter.html + + + + + Protean Forge - OLSR software (CRC and NRL) + http://pf.itd.nrl.navy.mil/projects/olsr/ + + + + INRIA OLSR + http://hipercom.inria.fr/olsr/ + + + + QOLSR + http://qolsr.lri.fr/ + + + + IPv6 Working Group (IETF) + http://www.ietf.org/html.charters/ipv6-charter.html + + + + RFC2460 Internet Protocol, Version 6 (IPv6) Specification + + http://www.ietf.org/rfc/rfc2460.txt + + + + Peter Bieringer's Linux IPv6 HOWTO (en) + http://ldp.linux.no/HOWTO/Linux+IPv6-HOWTO/ + + + + Current Status of IPv6 Support for Networking Applications + + http://www.deepspace6.net/docs/ipv6_status_page_apps.html + + + + + + + + + + Copyright, acknowledgments and miscellaneous + + + + + Copyright and License + + Copyright (c) 2003,2004 by Lars Strand. This material may + be distributed only subject to the terms and conditions set forth + in the Open Publication License, v1.0 or later (the latest version + is presently available at + http://www.opencontent.org/openpub/ ). + + + + Linux is a registered trademark of Linus Torvalds. + + + + + + + Disclaimer + + + No liability for the contents of this document can be accepted. + Use the concepts, examples and information at your own risk. + There may be errors and inaccuracies, that could be damaging to + your system. Proceed with caution, and although this is highly + unlikely, the author(s) do not take any responsibility. + + + + All copyrights are held by their by their respective owners, + unless specifically noted otherwise. Use of a term in this + document should not be regarded as affecting the validity of any + trademark or service mark. Naming of particular products or + brands should not be seen as endorsements. + + + + + + + How this document was produced + This document was originally written in LaTeX using + Emacs. HTML version created with latex2html. Later it was + converted to DocBook XML. + + An up-to-date version of this document can be found at: + + HTML: + http://www.tldp.org/HOWTO/OLSR-IPv6-HOWTO/index.html + + + + + + Feedback + Suggestions, corrections, additions wanted. Contributors + wanted and acknowledged. Flames not wanted. + + I can always be reached at lars at unik + no + + Homepage: + http://www.gnist.org/~lars/ + + + + + + Acknowledgments + This document was produced as a part of Interoperable + Networks for Secure Communications (INSC task 6) + + Thanks to Andreas Hafslund (andreha [at] unik no) for + initial support. Also thanks to UniK (University Graduate Center) + http://www.unik.no and FFI + (Norwegian Defence Research Establishment) http://www.ffi.mil.no for + hardware support. + + Also thanks to Andreas Tønnesen (andreto [at] unik no) for + technical help updating this howto + + Thanks also to the other HOWTO authors whose works I have + referenced: + + Linux IPv6 HOWTO (en) by Peter + Bieringer + + + + +
diff --git a/LDP/howto/docbook/OLSR-IPv6-HOWTO/images/802-11.png b/LDP/howto/docbook/OLSR-IPv6-HOWTO/images/802-11.png new file mode 100644 index 00000000..2eb98022 Binary files /dev/null and b/LDP/howto/docbook/OLSR-IPv6-HOWTO/images/802-11.png differ diff --git a/LDP/howto/docbook/OLSR-IPv6-HOWTO/images/HNA.png b/LDP/howto/docbook/OLSR-IPv6-HOWTO/images/HNA.png new file mode 100644 index 00000000..672ebd30 Binary files /dev/null and b/LDP/howto/docbook/OLSR-IPv6-HOWTO/images/HNA.png differ diff --git a/LDP/howto/docbook/OLSR-IPv6-HOWTO/images/lanvisits.png b/LDP/howto/docbook/OLSR-IPv6-HOWTO/images/lanvisits.png new file mode 100644 index 00000000..ba997987 Binary files /dev/null and b/LDP/howto/docbook/OLSR-IPv6-HOWTO/images/lanvisits.png differ diff --git a/LDP/howto/docbook/OLSR-IPv6-HOWTO/images/movement.png b/LDP/howto/docbook/OLSR-IPv6-HOWTO/images/movement.png new file mode 100644 index 00000000..4b5a3346 Binary files /dev/null and b/LDP/howto/docbook/OLSR-IPv6-HOWTO/images/movement.png differ