#
# OLSR.org routing daemon config file
# This file contains the necessary config options
# for an RFC compatible mesh
# (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.

###########################
### Basic configuration ###
###########################
# keep this settings at the beginning of your first configuration file

# Debug level (0-9)
# If set to 0 the daemon runs in the background, unless "NoFork" is set to true
# (Default is 1)

DebugLevel  0

# IP version to use (4 or 6)
# (Default is 4)

# 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

# Activates (in IPv6 mode) the automatic use of NIIT
# (see README-Olsr-Extensions)
# (default is "yes")

UseNiit no

# Activates the smartgateway ipip tunnel feature.
# See README-Olsr-Extensions for a description of smartgateways.
# (default is "yes")

SmartGateway no

##############################
### OLSR protocol settings ###
##############################

# For testing purposes it may be nice to use another port for olsrd
# for using another port than the IANA assigned one 
# for a production network, there should be a good reason!!
# valid values are integers >1, please be careful with using reserved
# port numbers
# (default is 698, the IANA assigned olsr-port)

# OlsrPort 698

# The fixed willingness to use (0-7)
# If not set willingness will be calculated
# dynamically based on battery/power status
# (default is 3)

# Willingness     3

# 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)
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
}
Hna6
{
# Internet gateway
#   0::                     0
# specific small networks reachable through this node
#   fec0:2200:106:0:0:0:0:0 48
}

# Hysteresis for link sensing (only for hopcount metric)
# Hysteresis adds more robustness to the link sensing
# but delays neighbor registration.
# (defaults to yes)

# UseHysteresis yes

# Hysteresis parameters (only for hopcount metric)
# Do not alter these unless you know what you are doing!
# Set to auto by default. Allowed values are floating point
# values in the interval 0,1
# THR_LOW must always be lower than THR_HIGH!!
# (default is 0.5/0.8/0.3)

# HystScaling  0.50
# HystThrHigh  0.80
# HystThrLow 0.30

# TC redundancy
# Specifies how much neighbor info should be sent in
# TC messages. Because of a design problem in the 0.5.x
# dijkstra implementation this value must be set to 2.
# 2 - send all neighbors
# (default is 2)

# TcRedundancy  2

# MPR coverage specifies how many MPRs a node should
# try select to reach every 2 hop neighbor. Because of
# a design problem in the 0.5.x dijkstra algorithm this
# value should be set to 7.
# (default is 7)

# MprCoverage 7

################################
### OLSR protocol extensions ###
################################

# Link quality level switch between hopcount and 
# cost-based (mostly ETX) routing. Because of
# a design problem in the 0.5.x dijkstra algorithm this
# value should not be set to 1.
# 0 = do not use link quality
# 2 = use link quality for MPR selection and routing
# (default is 2)

LinkQualityLevel 2

LinkQualityAlgorithm    "etx_ff"

# Fisheye mechanism for TCs (0 meansoff, 1 means on)
# (default is 1)

LinkQualityFishEye  0

#####################################
### 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"
#LoadPlugin "olsrd_txtinfo.so.0.1"
#{
    # the default port is 2006 but you can change it like this:
    #PlParam     "port"   "8080"

    # You can set a "accept" single address to allow to connect to
    # txtinfo. If no address is specified, then localhost (127.0.0.1)
    # is allowed by default.  txtinfo will only use the first "accept"
    # parameter specified and will ignore the rest.

    # to allow a specific host:
    #PlParam      "accept" "172.29.44.23"
    # if you set it to 0.0.0.0, it will accept all connections
    #PlParam      "accept" "0.0.0.0"
#}

######################################
### 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 "ath0"
{
    # Emission intervals in seconds.
    # If not defined, Freifunk network defaults are used
    # (default is 2.0/20.0 for Hello and 5.0/300.0 for Tc/Mid/Hna)

    # HelloInterval       2.0
    # HelloValidityTime   6.0
    # TcInterval          5.0
    # TcValidityTime     30.0
    # MidInterval         5.0
    # MidValidityTime    30.0
    # HnaInterval         5.0
    # HnaValidityTime    30.0
}
