babeld: tweak configuration for source-specific features
[feed/routing.git] / babeld / files / babeld.config
index 88fdf2de7963a72d04f4dbb5ad00c14dd580e5b6..fa22fd63cf1d2227d36bd08303534043905b5e2f 100644 (file)
@@ -1,78 +1,73 @@
 package babeld
 
+# Configuration set in this file ends up in /var/etc/babeld.conf.
+# Babeld is told to use both /etc/babeld.conf and /var/etc/babeld.conf, so
+# you can use one or the other, or even both at the same time.  If an
+# option is defined in both files, the version in /var/etc/babeld.conf
+# takes precedence.
+
+# See "man babeld" for all available options ("Global options").
+# Important: remember to use '_' instead of '-' in option names.
 config general
-       # option 'multicast_address' 'ff02:0:0:0:0:0:1:6'
-       # option 'port' '6696'
-       # option 'state_file' '/var/lib/babel-state'
-       # option 'hello_interval' '4'
-       # option 'wired_hello_interval' '20'
-       # option 'diversity' '0,128'
-       # option 'smoothing_half_time' '4'
-       # option 'kernel_priority' '0'
-       # Do not use this option unless you know what you are doing, as it can
-       # cause persistent route flapping.
-       ## option 'duplication_priority' '0'
-       # option 'carrier_sense' 'false'
-       # option 'assume_wireless' 'false'
-       # option 'no_split_horizon' 'false'
-       # option 'debug' '0'
-       # Listen for connections from a front-end, e.g. on port 33123.
-       ## option 'local_server' '33123'
-       # option 'random_router_id' 'false'
-       # Keep unfeasible routes
-       ## option 'keep_unfeasible' 'false'
-       # Use the given kernel routing table for routes inserted by babeld.
-       ## option 'export_table' '0'
-       # Export routes from the given kernel routing tables.
-       ## list 'import_table' '0'
-       ## list 'import_table' '42'
-       # The configuration file is not necessary since you can do everything
-       # from this file.
-       # option 'conf_file' '/etc/babeld.conf'
+       # option 'random_id' 'true'
+       # option 'debug' '1'
+       # option 'local_port' '33123'
        # option 'log_file' '/var/log/babeld.log'
+       ## Enable ipv6-subtrees by default since OpenWrt should ship with a
+       ## recent enough kernel for it to work.
+       option 'ipv6_subtrees' 'true'
+       ## This seems somewhat buggy on BB.  If you need only one
+       ## import-table statement, "option import_table 42" should work.
+       # list 'import_table' '42'
+       # list 'import_table' '100'
 
-# You can use aliases (like lan, wlan) or real names (like eth0.0).
-# If you use an alias, it must be already defined when babeld starts.
-# Otherwise, the name is taken literally and the interface can be
-# brought up later (useful for tunnels for instance).
-config interface wlan
-       # Remove this line to enable babeld on this interface
+config interface
+       ## Remove this line to enable babeld on this interface
        option 'ignore' 'true'
-       # option 'wired' 'auto'
-       # option 'link_quality' 'auto'
-       # option 'split_horizon' 'auto'
-       # The default is 96 for wired interfaces, and 256 for wireless ones
-       ## option 'rxcost' '256'
-       # The default is specified with the -h and -H command-line flags.
-       ## option 'hello_interval' '4'
-       # This can be set to a fairly large  value,  unless significant
-       # packet loss is expected.  The default is four times the hello
-       # interval.
-       ## option 'update_interval' '16'
-       # Options to enable and configure RTT-based metric
-       ## option 'enable_timestamps' 'false'
-       ## option 'max_rtt_penalty' '0'
-       ## option 'rtt_decay' '42'
-       ## option 'rtt_min' '10'
-       ## option 'rtt_max' '120'
+       ## You can use aliases (like lan, wlan) or real names (like eth0.0).
+       ## If you use an alias, it must be already defined when babeld starts.
+       ## Otherwise, the name is taken literally and the interface can be
+       ## brought up later (useful for tunnels for instance).
+       option 'ifname' 'wlan'
+       ## You can set options, see babeld man page ("Interface configuration")
+       # option 'rxcost' '256'
+       # option 'hello_interval' '1'
 
-config interface lan
+config interface
        option 'ignore' 'true'
+       ## Physical interface name
+       option 'ifname' 'tun-example'
+       # option 'max_rtt_penalty' '90'
+
+# A config interface without "option ifname" will set default options
+# for all interfaces.  Interface-specific configuration always overrides
+# default configuration.
+config interface
+       # option 'enable_timestamps' 'true'
+       # option 'update_interval' '30'
+
 
-# A filter consists in a type ('in', 'out' or 'redistribute'), an action
+# A filter consists of a type ('in', 'out' or 'redistribute'), an action
 # ('allow', 'deny' or 'metric xxx') and a set of selectors ('ip', 'eq',
-# etc.).  See /etc/babeld.conf for more details.
+# etc.).  See babeld man page ("Filtering rules") for more details.
 # Here is a sample filter wich redistributes the default route if its
 # protocol number is "boot", e.g. when it installed by dhcp.  It is
 # disabled by default.
 config filter
-       option 'ignore' 'true'
+       option 'ignore' 'true'
        # Type
-       option 'type' 'redistribute'
-       # Selectors: ip, eq, le, ge, neigh, id, proto, local, if
-       option 'ip' '0.0.0.0/0' 
-       option 'le' '0'
-       option 'proto' '3'
-       # Action 
-       option 'action' 'metric 128'
+       option 'type'   'redistribute'
+       # Selectors: ip, eq, le, ge, src_ip, src_eq, src_le, src_ge, neigh, id,
+       # proto, local, if.
+       option 'ip'     '0.0.0.0/0'
+       option 'eq'     '0'
+       option 'proto'  '3'
+       # Action (one of: allow, deny, metric XXX, src-prefix XXX).
+       option 'action' 'metric 128'
 
+# Notice that the 'local' selector is a boolean.
+config filter
+       option 'ignore' 'true'
+       option 'type'   'redistribute'
+       option 'local'  'true'
+       # No action means "allow"