1 # OLSR.org routing daemon config file
2 # This file contains ALL available options and explanations about them
4 # Lines starting with a # are discarded
7 #### ATTENTION for IPv6 users ####
8 # Because of limitations in the parser IPv6 addresses must NOT
9 # begin with a ":", so please add a "0" as a prefix.
11 ###########################
12 ### Basic configuration ###
13 ###########################
14 # keep this settings at the beginning of your first configuration file
17 # If set to 0 the daemon runs in the background, unless "NoFork" is set to true
22 # IP version to use (4 or 6)
27 #################################
28 ### OLSRd agent configuration ###
29 #################################
30 # this parameters control the settings of the routing agent which are not
31 # related to the OLSR protocol and it's extensions
33 # Clear the screen each time the internal state changes
38 # Should olsrd keep on running even if there are
39 # no interfaces available? This is a good idea
40 # for a PCMCIA/USB hotswap environment.
46 # The lockfile is used to prevent multiple OLSR instances running at the same
48 # (Linux/BSD default is "/var/run/olsrd-ipv(4/6).lock")
49 # (Win32 default is "[configfile]-ipv(4/6).lock")
51 # LockFile "/var/run/olsrd-ipv4.lock"
53 # Polling rate for OLSR sockets in seconds (float).
58 # Interval to poll network interfaces for configuration changes (in seconds).
59 # Linux systems can detect interface statechange via netlink sockets.
64 # TOS(type of service) value for the IP header of control traffic.
69 # FIBMetric controls the metric value of the host-routes OLSRd sets.
70 # - "flat" means that the metric value is always 2 (or as configured
71 # with FIBMetricDefault). This is the preferred value because it helps
72 # the linux kernel routing to clean up older routes
73 # - "correct" use the hopcount as the metric value.
74 # - "approx" use the hopcount as the metric value too, but does only update the
75 # hopcount if the nexthop changes too
81 # The kernel FIB does not need to know the metric of a route.
82 # This saves us from enqueuing/dequeueing hopcount only changes.
87 #######################################
88 ### Linux specific OLSRd extensions ###
89 #######################################
90 # these parameters are only working on linux at the moment, but might become
91 # useful on BSD in the future
93 # SrcIpRoutes tells OLSRd to set the Src flag of host routes to the originator-ip
94 # of the node. In addition to this an additional localhost device is created
95 # to make sure the returning traffic can be received.
100 # Specify the proto tag to be used for routes olsr inserts into kernel
101 # currently only implemented for linux
102 # valid values under linux are 1 .. 254
103 # 1 gets remapped by olsrd to 0 UNSPECIFIED (1 is reserved for ICMP redirects)
104 # 2 KERNEL routes (not very wise to use)
105 # 3 BOOT (should in fact not be used by routing daemons)
107 # 8 .. 15 various routing daemons (gated, zebra, bird, & co)
108 # (default is 0 which gets replaced by an OS-specific default value;
109 # 3 (BOOT) under linux (for backward compatibility)
113 # Specifies the routing Table olsr uses
114 # RtTable is for host routes, RtTableDefault for the route to the default
115 # internet gateway (2 in case of IPv6+NIIT) and RtTableTunnel is for
116 # routes to the ipip tunnels, valid values are 1 to 254
117 # There is a special parameter "auto" (choose default below)
118 # (with smartgw: default is 254/223/224)
119 # (without smartgw: default is 254/254/254, linux main table)
122 # RtTableDefault auto
125 # Specifies the policy rule priorities for the three routing tables and
126 # a special rule for smartgateway routing (see README-Olsr-Extensions)
127 # Priorities can only be set if three different routing tables are set.
128 # if set the values must obey to condition
129 # RtTablePriority less than RtTableDefaultOlsrPriority
130 # less than RtTableTunnelPriority less than RtTableDefaultPriority
131 # There are two special parameters, "auto" (choose fitting to SmartGW
132 # mode) and "none" (do not set policy rule)
133 # (with smartgw: default is none/32776/32786/32796)
134 # (without smartgw: default is auto/auto /auto /auto )
136 # RtTablePriority auto
137 # RtTableDefaultOlsrPriority auto
138 # RtTableTunnelPriority auto
139 # RtTableDefaultPriority auto
141 # Activates (in IPv6 mode) the automatic use of NIIT
142 # (see README-Olsr-Extensions)
143 # (default is "no" in IPv4 mode, "yes" in IPv6 mode)
147 # Activates the smartgateway ipip tunnel feature.
148 # See README-Olsr-Extensions for a description of smartgateways.
153 # Signals that the server tunnel must always be removed on shutdown,
154 # irrespective of the interface up/down state during startup.
157 # SmartGatewayAlwaysRemoveServerTunnel no
159 # Determines the maximum number of gateways that can be in use at any given
160 # time. This setting is used to mitigate the effects of breaking connections
161 # (due to the selection of a new gateway) on a dynamic network.
164 # SmartGatewayUseCount 1
166 # Determines the take-down percentage for a non-current smart gateway tunnel.
167 # If the cost of the current smart gateway tunnel is less than this percentage
168 # of the cost of the non-current smart gateway tunnel, then the non-current smart
169 # gateway tunnel is taken down because it is then presumed to be 'too expensive'.
170 # This setting is only relevant when SmartGatewayUseCount is larger than 1;
171 # a value of 0 will result in the tunnels not being taken down proactively.
174 # SmartGatewayTakeDownPercentage 25
176 # Determines the policy routing script that is executed during startup and
177 # shutdown of olsrd. The script is only executed when SmartGatewayUseCount
178 # is set to a value larger than 1. The script must setup policy routing
179 # rules such that multi-gateway mode works. A sample script is included.
180 # (default is not set)
182 # SmartGatewayPolicyRoutingScript ""
184 # Determines the egress interfaces that are part of the multi-gateway setup and
185 # therefore only relevant when SmartGatewayUseCount is larger than 1 (in which
186 # case it must be explicitly set).
187 # (default is not set)
189 # SmartGatewayEgressInterfaces ""
191 # SmartGatewayEgressFile declares the file that contains the bandwidth
192 # parameters of the egress interfaces declared by SmartGatewayEgressInterfaces.
193 # Every line in the file declares bandwidth parameters of an egress interface,
195 # # this is a comment
196 # interface=upstream,downstream,pathcost,network/prefix,gateway
197 # Only the upstream and downstream fields are mandatory, the other fields are
198 # optional. An empty field signifies that its default should be used.
199 # The field defaults are:
200 # upstream = 0 (Kbps)
201 # downstream = 0 (Kbps)
202 # pathcost = 0 (dimensionless, 1024 is equivalent to 1 hop)
203 # network/prefix = no default / not set
204 # - network is an IP address
205 # - prefix is a number in the range [0, 24] for IPv4
206 # and in the range [0, 128] for IPv6
207 # gateway = no default / not set (IP address)
208 # (default is /var/run/olsrd-sgw-egress.conf)
210 # SmartGatewayEgressFile "/var/run/olsrd-sgw-egress.conf"
212 # Determines the period (in milliseconds) on which the SmartGatewayEgressFile
213 # is checked for changes and processed if changed.
216 # SmartGatewayEgressFilePeriod 5000
218 # Declares the file that is written by olsrd to contain the status of the smart
219 # gateways and is only relevant when SmartGatewayUseCount is larger than 1.
220 # (default is <not set>)
222 # SmartGatewayStatusFile <not set>
224 # Determines the routing tables offset for multi-gateway policy routing tables
225 # See the policy routing script for an explanation.
228 # SmartGatewayTablesOffset 90
230 # Determines the policy routing rules offset for multi-gateway policy routing
231 # rules. See the policy routing script for an explanation.
232 # (default is 0, which indicates that the rules and tables should be aligned and
233 # puts this value at SmartGatewayTablesOffset - # egress interfaces -
236 # SmartGatewayRulesOffset 0
238 # Allows the selection of a smartgateway with NAT (only for IPv4)
241 # SmartGatewayAllowNAT yes
243 # Determines the period (in milliseconds) on which a new smart gateway
244 # selection is performed.
245 # (default is 10000 milliseconds)
247 # SmartGatewayPeriod 10000
249 # Determines the number of times the link state database must be stable
250 # before a new smart gateway is selected.
253 # SmartGatewayStableCount 6
255 # When another gateway than the current one has a cost of less than the cost
256 # of the current gateway multiplied by SmartGatewayThreshold then the smart
257 # gateway is switched to the other gateway. The unit is percentage.
260 # SmartGatewayThreshold 0
262 # The weighing factor for the gateway uplink bandwidth (exit link, uplink).
263 # See README-Olsr-Extensions for a description of smart gateways.
266 # SmartGatewayWeightExitLinkUp 1
268 # The weighing factor for the gateway downlink bandwidth (exit link, downlink).
269 # See README-Olsr-Extensions for a description of smart gateways.
272 # SmartGatewayWeightExitLinkDown 1
274 # The weighing factor for the ETX costs.
275 # See README-Olsr-Extensions for a description of smart gateways.
278 # SmartGatewayWeightEtx 1
280 # The divider for the ETX costs.
281 # See README-Olsr-Extensions for a description of smart gateways.
284 # SmartGatewayDividerEtx 0
286 # Defines what kind of Uplink this node will publish as a
287 # smartgateway. The existence of the uplink is detected by
288 # a route to 0.0.0.0/0, ::ffff:0:0/96 and/or 2000::/3.
289 # possible values are "none", "ipv4", "ipv6", "both"
290 # (default is "both")
292 # SmartGatewayUplink "both"
294 # Specifies if the local ipv4 uplink use NAT
297 # SmartGatewayUplinkNAT yes
299 # Specifies the speed of the uplink in kilobit/s.
300 # First parameter is upstream, second parameter is downstream
301 # (default is 128/1024)
303 # SmartGatewaySpeed 128 1024
305 # Specifies the EXTERNAL ipv6 prefix of the uplink. A prefix
306 # length of more than 64 is not allowed.
307 # Only relevant when running in IPv6 mode.
310 # SmartGatewayPrefix ::/0
312 ##############################
313 ### OLSR protocol settings ###
314 ##############################
316 # For testing purposes it may be nice to use another port for olsrd
317 # for using another port than the IANA assigned one
318 # for a production network, there should be a good reason!!
319 # valid values are integers greater than 1, please be careful with
320 # using reserved port numbers
321 # (default is 698, the IANA assigned olsr-port)
325 # Sets the main IP (originator ip) of the router. This IP will NEVER
326 # change during the uptime of olsrd.
327 # (default is 0.0.0.0, which triggers usage of the IP of the first interface)
329 MainIp 192.168.181.102
331 # The fixed willingness to use (0-7)
332 # If not set willingness will be calculated
333 # dynamically based on battery/power status
338 # HNA (Host network association) allows the OLSR to announce
339 # additional IPs or IP subnets to the net that are reachable
341 # Syntax for HNA4 is "network-address network-mask"
342 # Syntax for HNA6 is "network-address prefix-length"
343 # (default is no HNA)
348 # specific small networks reachable through this node
349 # 15.15.0.0 255.255.255.0
355 # specific small networks reachable through this node
356 # fec0:2200:106:0:0:0:0:0 48
359 # Hysteresis for link sensing (only for hopcount metric)
360 # Hysteresis adds more robustness to the link sensing
361 # but delays neighbor registration.
366 # Hysteresis parameters (only for hopcount metric)
367 # Do not alter these unless you know what you are doing!
368 # Set to auto by default. Allowed values are floating point
369 # values in the interval 0,1
370 # THR_LOW must always be lower than THR_HIGH!!
371 # (default is 0.50/0.80/0.30)
378 # Specifies how much neighbor info should be sent in
379 # TC messages. Because of a design problem in the 0.5.x
380 # dijkstra implementation this value must be set to 2.
381 # 2 - send all neighbors
386 # MPR coverage specifies how many MPRs a node should
387 # try select to reach every 2 hop neighbor. Because of
388 # a design problem in the 0.5.x dijkstra algorithm this
389 # value should be set to 7.
394 ################################
395 ### OLSR protocol extensions ###
396 ################################
398 # Link quality level switch between hopcount and
399 # cost-based (mostly ETX) routing. Because of
400 # a design problem in the 0.5.x dijkstra algorithm this
401 # value should not be set to 1.
402 # 0 = do not use link quality
403 # 2 = use link quality for MPR selection and routing
408 # Link quality algorithm (only for lq level 2)
409 # (see README-Olsr-Extensions)
410 # - "etx_float", a floating point ETX with exponential aging
411 # - "etx_fpm", same as ext_float, but with integer arithmetic
412 # - "etx_ff" (ETX freifunk), an etx variant which use all OLSR
413 # traffic (instead of only hellos) for ETX calculation
414 # - "etx_ffeth", an incompatible variant of etx_ff that allows
415 # ethernet links with ETX 0.1.
416 # (default is "etx_ff")
418 # LinkQualityAlgorithm "etx_ff"
420 # Link quality aging factor (only for lq level 2)
421 # Tuning parameter for etx_float and etx_fpm, smaller values
422 # mean slower changes of ETX value. (allowed values are
423 # between 0.01 and 1.0)
426 # LinkQualityAging 0.05
428 # Fisheye mechanism for TCs (0 meansoff, 1 means on)
431 # LinkQualityFishEye 1
436 # (currently this is only in the freifunk firmware)
437 # If the NAT-Endpoint (the preferred 0/0 HNA emitting node)
438 # is to be changed, the ETX value of the current 0/0 is
439 # multiplied with the NatThreshold value before being
440 # compared to the new one.
441 # The parameter can be a value between 0.1 and 1.0, but
442 # should be close to 1.0 if changed.
443 # WARNING: This parameter should not be used together with
444 # the etx_ffeth metric !!
449 #############################################################
450 ### Configuration of the IPC to the windows GUI interface ###
451 #############################################################
455 # Determines how many simultaneously
456 # IPC connections that will be allowed
457 # Setting this to 0 disables IPC
461 # By default only 127.0.0.1 is allowed
462 # to connect. Here allowed hosts and networks can
467 # Net 192.168.1.0 255.255.255.0
470 #####################################
471 ### Example plugin configurations ###
472 #####################################
473 # Olsrd plugins to load
474 # This must be the absolute path to the file
475 # or the loader will use the following scheme:
476 # - Try the paths in the LD_LIBRARY_PATH
477 # environment variable.
478 # - The list of libraries cached in /etc/ld.so.cache
479 # - /lib, followed by /usr/lib
482 # Check whether a plugin is available for your operating system.
483 # Each plugin should have a README file in it's lib subfolder.
485 LoadPlugin "olsrd_jsoninfo.so.0.0" {
488 LoadPlugin "olsrd_httpinfo.so.0.1" {
491 #############################################
492 ### OLSRD default interface configuration ###
493 #############################################
494 # the default interface section can have the same values as the following
495 # interface configuration. It will allow you so set common options for all
502 ######################################
503 ### OLSRd Interfaces configuration ###
504 ######################################
505 # Multiple interfaces can be specified for a single configuration block, format:
506 # Interface "<OLSRd-Interface1>" "<OLSRd-Interface2>"
508 # Multiple configuration blocks can be specified.
512 # Interface Mode is used to prevent unnecessary
513 # packet forwarding on switched ethernet interfaces
514 # valid Modes are "mesh" and "ether"
515 # (default is "mesh")
519 # IPv4 broadcast address for outgoing OLSR packets.
520 # One useful example would be 255.255.255.255
521 # The second useful value would be to
522 # specify the peer address of an ptp-tunnel.
523 # another name of this parameter is "IPv4Multicast"
524 # (default is 0.0.0.0, which triggers the usage of the
525 # interface broadcast IP)
527 # Ip4Broadcast 0.0.0.0
529 # IPv6 multicast address
530 # (default is ff02::6d, the manet-router linklocal multicast)
532 # IPv6Multicast ff02::6d
534 # IPv4 src address for outgoing OLSR packages
535 # (default is 0.0.0.0, which triggers usage of the interface IP)
539 # IPv6 src prefix. OLSRd will choose one of the interface IPs
540 # which matches the prefix of this parameter.
541 # (default is 0::/0, which triggers the usage
542 # of a not-linklocal interface IP)
546 # Emission intervals in seconds.
547 # If not defined, Freifunk network defaults are used.
548 # (defaults: Hello = 2.0/20.0, TC = 5.0/300.0,
549 # MID = 5.0/300.0, HNA = 5.0/300.0)
552 # HelloValidityTime 20.0
554 # TcValidityTime 300.0
556 # MidValidityTime 300.0
558 # HnaValidityTime 300.0
560 # When multiple links exist between hosts
561 # the weight of interface is used to determine
562 # the link to use. Normally the weight is
563 # automatically calculated by olsrd based
564 # on the characteristics of the interface,
565 # but here you can specify a fixed value.
566 # Olsrd will choose links with the lowest value.
568 # Interface weight is used only when LinkQualityLevel is set to 0.
569 # For any other value of LinkQualityLevel, the interface ETX
570 # value is used instead.
573 # If a certain route should be preferred
574 # or ignored by the mesh, the Link Quality
575 # value of a node can be multiplied with a factor
576 # entered here. In the example the route
577 # using 192.168.0.1 would rather be ignored.
578 # A multiplier of 0.5 will result in a small
579 # (bad) LinkQuality value and a high (bad)
582 # Link quality multiplier is used only when
583 # LinkQualityLevel is greater than 0.
585 # example 1: reduce LQ to 192.168.0.1 by half
586 # LinkQualityMult 192.168.0.1 0.5
588 # example 2: reduce LQ to all nodes on this interface by 20%
589 # LinkQualityMult default 0.8
592 # END AUTOGENERATED CONFIG