#
# OLSR.org routing daemon config file
#
# Lines starting with a # are discarded
#

# Debug level(0-9)
# If set to 0 the daemon runs in the background

DebugLevel	0

# IP version to use (4 or 6)

IpVersion	4

# FIBMetric ("flat", "correct", or "approx")
# Just use "flat", the others don't work very well

FIBMetric "flat"

# Clear the screen each time the internal state changes

ClearScreen     yes

# HNA IPv4 routes
# syntax: netaddr netmask
# Example Internet gateway:
# 0.0.0.0 0.0.0.0

Hna4
{
	xxx.205.12.96	255.255.255.240
	172.16.2.32	255.255.255.224
}

# Specify the routing Table olsr uses
# currently only implemented in linux versions, (bsd planned)
# useful for policyrouting, to ensure that olsr can use 
# the table a policy rule with priority 65536 is auto-installed
# by olsrd if an value < 253 ist specified!
# value defaults to 253 (main table)
# valid values are 1 .. 254
# (freifunkfirmware uses 111 for its policy routing)

RtTable 100

#you may specify another table for the default route only
#if used no policy route will get auto-installed for this table, 
#but the default route gets also inserted into table 254 
#(the last table used in default linux policy routing)
#valid tables are the same as for RtTable

RtTableDefault 253

# Specify the proto tag to be used for routes olsr inserts into kernel
# currently only implemented for linux, defaults to 0 which gets replaced
# by an OS-specific default value under linux 3 (BOOT) gets used as default
# (for backward compatibility)
# 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)

# RtProto 111

# 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!!
# defaults to 698 (IANA assigned olsr-port)
# valid values are 698 or > 1000

OlsrPort 698

# Should olsrd keep on running even if there are
# no interfaces available? This is a good idea
# for a PCMCIA/USB hotswap environment.
# "yes" OR "no"

AllowNoInt	yes

# TOS(type of service) value for
# the IP header of control traffic.
# If not set it will default to 16

#TosValue	16

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

#Willingness    	4

# Allow processes like the GUI front-end
# to connect to the daemon.

# Link quality level
# 0 = do not use link quality
# 1 = use link quality for MPR selection
# 2 = use link quality for MPR selection and routing
# Defaults to 2

LinkQualityLevel	0

# Link quality algorithm (only for lq level 1 or 2)
# Defaults to "etx_fpm" for fixpoint based etx algorithm

# LinkQualityAlgorithm    "etx_fpm"

# Link quality aging factor
# Defaults to 0.05, smaller values mean larger LQ window size
# Link quality aging does only apply to lq level 1 and 2

# LinkQualityAging 0.1 

# Fisheye mechanism for TC messages 0=off, 1=on
# default is 0

# LinkQualityFishEye	0

# Wether to use hysteresis or not
# Hysteresis adds more robustness to the
# link sensing but delays neighbor registration.
# Used by default. 'yes' or 'no'

UseHysteresis	no

# Hysteresis parameters
# 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!!

#HystScaling	0.50
#HystThrHigh	0.80
#HystThrLow	0.30


# Polling rate in seconds(float). 
# Default value 0.05 sec

Pollrate	0.05

# Interval to poll network interfaces for configuration 
# changes. Defaults to 2.5 seconds

NicChgsPollInt  3.0


# TC redundancy
# Specifies how much neighbor info should
# be sent in TC messages
# Possible values are:
# 0 - only send MPR selectors
# 1 - send MPR selectors and MPRs
# 2 - send all neighbors
#
# defaults to 0

TcRedundancy	2

#
# NatThreshold 
#
# (currently this is only in the freifunk firmware)
# If the NAT-Endpoint (the preferred 0/0 HNA 
# emitting node) is to be changed, the ETX value of the current 0/0 is 
# compared to the new one. If the ETX difference is too small, the default 
# route isn't changed. defaults to 1.0
# The configured route gets multiplied by the treshhold, 
# before comparing which route is better

# NatThreshold  0.9

#
# MPR coverage
# Specifies how many MPRs a node should
# try select to reach every 2 hop neighbor
#
# Can be set to any integer >0
#
# defaults to 1

MprCoverage	2


# Interfaces and their rules
# Omitted options will be set to the
# default values.
# multiple interfaces can be speicified
Interface "vlan1"
{
	Ip4Broadcast	xxx.205.12.111
}

Interface "vlan3"
{
        Ip4Broadcast    xxx.205.12.23
}

Interface "wan"
{
	Ip4Broadcast	xxx.205.12.19
}

Interface "wan" "vlan1" "vlan3"
{
	HelloInterval   2.0
	HelloValidityTime   6.0

	TcInterval  5.0
	TcValidityTime  15.0

	MidInterval 5.0
	MidValidityTime 15.0

	HnaInterval 5.0
	HnaValidityTime 15.0
}
