<?xml version="1.0" encoding="utf-8"?><!DOCTYPE article  PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN'  'http://www.docbook.org/xml/4.4/docbookx.dtd'><article><articleinfo><title>olsrmacosx</title><revhistory><revision><revnumber>1</revnumber><date>2010-12-14 02:15:32</date><authorinitials>stefanopilla</authorinitials></revision></revhistory></articleinfo><section><title>OLSR daemon for MacOsX</title><para>Requirements: xCode (Lastest Version). You can download it from <ulink url="http://developer.apple.com/technologies/xcode.html">here</ulink> </para><section><title>Download &amp; Installation</title><para>Donwload source code from olsr.org (<ulink url="http://www.olsr.org/?q=download">click here</ulink>) </para><para>You can also download it from a shell with: </para><para>wget <ulink url="http://www.olsr.org/releases/0.6/olsrd-0.6.0.tar.gz"/> </para><para>Extract it with </para><screen><![CDATA[tar -xzvf olsrd-0.6.0.tar.gz]]></screen><screen><![CDATA[cd olsrd-0.6.0]]></screen><para>To build: </para><screen><![CDATA[make]]></screen><para>To install(as root): </para><screen><![CDATA[make install]]></screen><para>To make plugins (needed) </para><screen><![CDATA[make libs]]></screen><para>To install plugins </para><screen><![CDATA[make install_libs]]></screen><para>To delete object files run: </para><screen><![CDATA[make clean]]></screen><para>Optionally, to clean all generated files: </para><screen><![CDATA[make uberclean]]></screen><para>you can see the message: </para><para>[..cut..] </para><screen><![CDATA[========= C O N F I G U R A T I O N - F I L E ============
olsrd uses the configfile /etc/olsrd.conf]]></screen><para>[..cut..] </para><para>This means that you have to modify this file to run Olsrd Daemon. </para><screen><![CDATA[vi /etc/olsrd.conf]]></screen><para>This is the default config file of OLSR : </para><para>Put your olsr interfaces here in the config file: </para><screen><![CDATA[Interface "<OLSRd-Interface1>" "<OLSRd-Interface2>"]]></screen><screen><![CDATA[#
# OLSR.org routing daemon config file
]]><![CDATA[
# This file contains the usual options for an ETX based
# stationary network without fisheye
# (for other options see olsrd.conf.default.full)
#
# Lines starting with a # are discarded
#### ATTENTION for IPv6 users ####
# Because of limitations in the parser IPv6 addresses must NOT
# begin with a ":", so please add a "0" as a prefix.
]]><![CDATA[
###########################
### Basic configuration ###
###########################
# keep this settings at the beginning of your first configuration file
]]><![CDATA[
# Debug level (0-9)
]]><![CDATA[
# If set to 0 the daemon runs in the background, unless "NoFork" is set to true
]]><![CDATA[
# (Default is 1)
# DebugLevel  1
]]><![CDATA[
# IP version to use (4 or 6)
# (Default is 4)
]]><![CDATA[
# IpVersion 4
#################################
### OLSRd agent configuration ###
#################################
# this parameters control the settings of the routing agent which are not
# related to the OLSR protocol and it's extensions
# FIBMetric controls the metric value of the host-routes OLSRd sets.
# - "flat" means that the metric value is always 2. This is the preferred value
#   because it helps the linux kernel routing to clean up older routes
# - "correct" use the hopcount as the metric value.
# - "approx" use the hopcount as the metric value too, but does only update the
#   hopcount if the nexthop changes too
# (Default is "flat")
# FIBMetric "flat"
#######################################
### Linux specific OLSRd extensions ###
#######################################
# these parameters are only working on linux at the moment, but might become
# useful on BSD in the future
# SrcIpRoutes tells OLSRd to set the Src flag of host routes to the originator-ip
# of the node. In addition to this an additional localhost device is created
# to make sure the returning traffic can be received.
# (Default is "no")
# SrcIpRoutes no
# Specify the proto tag to be used for routes olsr inserts into kernel
# currently only implemented for linux
# valid values under linux are 1 .. 254
# 1 gets remapped by olsrd to 0 UNSPECIFIED (1 is reserved for ICMP redirects)
# 2 KERNEL routes (not very wise to use)
# 3 BOOT (should in fact not be used by routing daemons)
# 4 STATIC
# 8 .. 15 various routing daemons (gated, zebra, bird, & co)
# (defaults to 0 which gets replaced by an OS-specific default value
# under linux 3 (BOOT) (for backward compatibility)
# RtProto 0
# Activates (in IPv6 mode) the automatic use of NIIT
# (see README-Olsr-Extensions)
# (default is "yes")
]]><![CDATA[
# UseNiit yes
]]><![CDATA[
# Activates the smartgateway ipip tunnel feature.
# See README-Olsr-Extensions for a description of smartgateways.
# (default is "yes")
]]><![CDATA[
# SmartGateway yes
]]><![CDATA[
# Allows the selection of a smartgateway with NAT (only for IPv4)
# (default is "yes")
]]><![CDATA[
# SmartGatewayAllowNAT yes
]]><![CDATA[
# Defines what kind of Uplink this node will publish as a
# smartgateway. The existence of the uplink is detected by
# a route to 0.0.0.0/0, ::ffff:0:0/96 and/or 2000::/3.
# possible values are "none", "ipv4", "ipv6", "both"
# (default is "both")
]]><![CDATA[
# SmartGatewayUplink "both"
]]><![CDATA[
# Specifies if the local ipv4 uplink use NAT
# (default is "yes")
]]><![CDATA[
# SmartGatewayUplinkNAT yes
]]><![CDATA[
# Specifies the speed of the uplink in kilobit/s.
# First parameter is upstream, second parameter is downstream
# (default is 128/1024)
]]><![CDATA[
# SmartGatewaySpeed 128 1024
]]><![CDATA[
# Specifies the EXTERNAL ipv6 prefix of the uplink. A prefix
# length of more than 64 is not allowed.
# (default is 0::/0
]]><![CDATA[
# SmartGatewayPrefix 0::/0
]]><![CDATA[
##############################
### OLSR protocol settings ###
##############################
# HNA (Host network association) allows the OLSR to announce
# additional IPs or IP subnets to the net that are reachable
# through this node.
# Syntax for HNA4 is "network-address    network-mask"
# Syntax for HNA6 is "network-address    prefix-length"
# (default is no HNA)
]]><![CDATA[
Hna4
{
# Internet gateway
# 0.0.0.0   0.0.0.0
# specific small networks reachable through this node
# 15.15.0.0 255.255.255.0
}
]]><![CDATA[
Hna6
{
# Internet gateway
#   0::                     0
# specific small networks reachable through this node
#   fec0:2200:106:0:0:0:0:0 48
}
]]><![CDATA[
################################
### OLSR protocol extensions ###
################################
# Link quality algorithm (only for lq level 2)
# (see README-Olsr-Extensions)
# - "etx_float", a floating point  ETX with exponential aging
# - "etx_fpm", same as ext_float, but with integer arithmetic
# - "etx_ff" (ETX freifunk), an etx variant which use all OLSR
#   traffic (instead of only hellos) for ETX calculation
# - "etx_ffeth", an incompatible variant of etx_ff that allows
]]><![CDATA[
#   ethernet links with ETX 0.1.
# (defaults to "etx_ff")
]]><![CDATA[
# LinkQualityAlgorithm    "etx_ff"
]]><![CDATA[
# Fisheye mechanism for TCs (0 meansoff, 1 means on)
# (default is 1)
]]><![CDATA[
LinkQualityFishEye  0
]]><![CDATA[
#####################################
### Example plugin configurations ###
#####################################
# Olsrd plugins to load
# This must be the absolute path to the file
# or the loader will use the following scheme:
# - Try the paths in the LD_LIBRARY_PATH
#   environment variable.
# - The list of libraries cached in /etc/ld.so.cache
# - /lib, followed by /usr/lib
#
# the examples in this list are for linux, so check if the plugin is
# available if you use windows/BSD.
# each plugin should have a README file in it's lib subfolder
# LoadPlugin "olsrd_txtinfo.dll"
]]><![CDATA[
LoadPlugin "olsrd_txtinfo.so.0.1"
]]><![CDATA[
{
 . # port number the txtinfo plugin will be listening, default 2006
#   PlParam     "port"   "81"
 . # ip address that can access the plugin, use "0.0.0.0" # to allow everyone
 PlParam     "Accept"   "127.0.0.1"
}
]]><![CDATA[
#############################################
### OLSRD default interface configuration ###
#############################################
# the default interface section can have the same values as the following
# interface configuration. It will allow you so set common options for all
# interfaces.
]]><![CDATA[
InterfaceDefaults {
 . # Ip4Broadcast      255.255.255.255
}
]]><![CDATA[
######################################
### OLSRd Interfaces configuration ###
######################################
# multiple interfaces can be specified for a single configuration block
# multiple configuration blocks can be specified
# WARNING, don't forget to insert your interface names here !
Interface "<OLSRd-Interface1>" "<OLSRd-Interface2>"
]]><![CDATA[
{
]]><![CDATA[
 . # Interface Mode is used to prevent unnecessary # packet forwarding on switched ethernet interfaces # valid Modes are "mesh" and "ether" # (default is "mesh") # Mode "mesh"
]]><![CDATA[
}]]></screen><para>Save the file with  </para><para><code>ESC + : + wq</code> </para><para>Try to run olsr with </para><para><code>sudo olsrd -f /etc/olsrd.conf</code> </para></section></section></article>