babeld: Update example configuration file
[feed/routing.git] / babeld / files / babeld.config
1 package babeld
2
3 # Detailed documentation: https://openwrt.org/docs/guide-user/services/babeld
4
5 # Babeld reads options from the following files (the last one takes precedence
6 # if an option is defined in several places):
7 # - the file defined by the option conf_file (default: /etc/babeld.conf),
8 # - *.conf files in the directory defined by conf_dir (default: /tmp/babel.d/),
9 # - this UCI configuration file.
10
11 # See "man babeld" for all available options ("Global options").
12 # Important: remember to use '_' instead of '-' in option names.
13 config general
14 # option 'random_id' 'true'
15 # option 'debug' '1'
16 # option 'local_port' '33123'
17 # option 'log_file' '/var/log/babeld.log'
18 ## Enable ipv6-subtrees by default since OpenWrt should ship with a
19 ## recent enough kernel for it to work.
20 option 'ipv6_subtrees' 'true'
21 # list 'import_table' '42'
22 # list 'import_table' '100'
23 ## Alternative configuration file and directory.
24 ## See comment at the top of this file for more details.
25 # option 'conf_file' '/etc/babeld.conf'
26 # option 'conf_dir' '/tmp/babel.d/'
27
28 config interface
29 ## Remove this line to enable babeld on this interface
30 option 'ignore' 'true'
31 ## You can use aliases (like lan, wlan) or real names (like eth0.0).
32 ## If you use an alias, it must be already defined when babeld starts.
33 ## Otherwise, the name is taken literally and the interface can be
34 ## brought up later (useful for tunnels for instance).
35 option 'ifname' 'wlan'
36 ## You can set options, see babeld man page ("Interface configuration")
37 # option 'rxcost' '256'
38 # option 'hello_interval' '1'
39
40 config interface
41 option 'ignore' 'true'
42 ## Physical interface name
43 option 'ifname' 'tun-example'
44 ## Specify the type of interface: tunnels use the RTT-based metric.
45 option 'type' 'tunnel'
46 ## Other options that can be overriden.
47 # option 'max_rtt_penalty' '96'
48
49 # A config interface without "option ifname" will set default options
50 # for all interfaces. Interface-specific configuration always overrides
51 # default configuration.
52 config interface
53 # option 'enable_timestamps' 'true'
54 # option 'update_interval' '30'
55
56
57 # A filter consists of a type ('in', 'out', 'redistribute' or 'install'),
58 # a set of selectors ('ip', 'eq', etc.) and a set of actions to perform
59 # ('allow', 'deny', 'metric xxx', 'src-prefix xxx', 'table xxx', 'pref-src xxx').
60 # See babeld man page ("Filtering rules") for more details.
61
62 # Below is a sample filter that redistributes the default route if its
63 # protocol number is "boot", e.g. when it is installed by dhcp (see
64 # /etc/iproute2/rt_protos). This filter is disabled thanks to the 'ignore'
65 # setting.
66 config filter
67 option 'ignore' 'true'
68 # Type of filter
69 option 'type' 'redistribute'
70 # Selectors: ip, eq, le, ge, src_ip, src_eq, src_le, src_ge, neigh, id,
71 # proto, local, if.
72 option 'ip' '0.0.0.0/0'
73 option 'eq' '0'
74 option 'proto' '3'
75 # Action, which can be any of: allow, deny, metric <NUMBER>, src-prefix <PREFIX>,
76 # table <ID>, pref-src <IP>.
77 # The action defaults to "allow" if not specified. Here, we specify a higher
78 # redistribution metric than the default (0).
79 option 'action' 'metric 128'
80
81 # Another example filter: don't redistribute local addresses in a certain IP prefix.
82 # By default, babeld redistributes *all* local addresses.
83 config filter
84 option 'ignore' 'true'
85 option 'type' 'redistribute'
86 # Only apply to routes/addresses within this prefix.
87 option 'ip' '198.51.100.0/24'
88 # Notice that the 'local' selector is a boolean.
89 option 'local' 'true'
90 # Don't redistribute.
91 option 'action' 'deny'
92
93 # Example install filter, to change or filter routes before they are inserted
94 # into the kernel.
95 config filter
96 option 'ignore' 'true'
97 option 'type' 'install'
98 # Optional: only apply to routes within 2001:db8:cafe::/48
99 option 'ip' '2001:db8:cafe::/48'
100 # We specify the kernel routing table and the preferred source address to use for these routes.
101 # "Allow" is implicit.
102 option 'action' 'table 200 pref-src 2001:db8:ba:be1::42'