[Babel-users] Babeld redistribution problem

Volodymyr Balaban vbalaban1979 at gmail.com
Mon Oct 29 10:25:49 GMT 2018


Dear Babe-users,

I have a problem with redistribution default route and any static routes in
Babel .
I have two boxes with OpenWrt and Babel each. I am using pure Babel, no
Frr. Box1 has connection to Internet via wan interface and 5Ghz Wi-Fi
Ad-Hoc  connection to Box2  Babel working on this Wi-Fi link. Wi-Fi link
has ip192.168.4.1 and 192.168.4.2, ping are ok. Box1 need to redistribute
default route and specified static routes to Box 2.  All routing and
redistribution configuration done according to instructions from
https://github.com/jech/babeld and
https://alioth-lists.debian.net/pipermail/babel-users/2008-March/000074.html
But redistribution still not working. If someone can help me to understand
what I am doing wrong and where is mistake I will be very thankful.
The configuration files,routing tables and  Babel logs for Box1 and Box2
below..

Box1
ip route show all
root at OpenWrt:/# ip route show all
default via 192.168.2.1 dev eth0.2 proto static
8.0.0.0/8 via 192.168.2.1 dev eth0.2 proto static
192.168.1.0/24 dev br-lan proto kernel scope link src 192.168.1.1
192.168.1.2 via 192.168.4.2 dev wlan0 proto babel onlink
192.168.2.0/24 dev eth0.2 proto kernel scope link src 192.168.2.2
192.168.4.0/24 dev wlan0 proto kernel scope link src 192.168.4.1
192.168.4.2 via 192.168.4.2 dev wlan0 proto babel onlink
root at OpenWrt:/#

Box1
root at OpenWrt:/# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface
default         192.168.2.1     0.0.0.0         UG    0      0        0
eth0.2
8.0.0.0         192.168.2.1     255.0.0.0       UG    0      0        0
eth0.2
192.168.1.0     *               255.255.255.0   U     0      0        0
br-lan
192.168.1.2     192.168.4.2     255.255.255.255 UGH   0      0        0
wlan0
192.168.2.0     *               255.255.255.0   U     0      0        0
eth0.2
192.168.4.0     *               255.255.255.0   U     0      0        0
wlan0
192.168.4.2     192.168.4.2     255.255.255.255 UGH   0      0        0
wlan0
root at OpenWrt:/#

Box1 Babel config
package babeld
# Babeld reads options from the following files (the last one takes
precedence
# if an option is defined in several places):
# - the file defined by the option conf_file (default: /etc/babeld.conf),
# - *.conf files in the directory defined by conf_dir (default:
/tmp/babel.d/),
# - this UCI configuration file.
# See "man babeld" for all available options ("Global options").
# Important: remember to use '_' instead of '-' in option names.
config general
        # 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'
         list 'import_table' '42'
         list 'import_table' '100'
        list 'import_table' '3'
         ## Alternative configuration file and directory.
        ## See comment at the top of this file for more details.
        # option 'conf_file' '/c/babeld.conf'
        # option 'conf_dir' '/tmp/babel.d/'
config interface
        ## Remove this line to enable babeld on this interface
        option 'ignore' 'true'
        ## 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 Wlan1
        ## Physical interface name
        option 'ifname' 'Wlan1'
        # 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 of a type ('in', 'out' or 'redistribute'), an action
# ('allow', 'deny' or 'metric xxx') and a set of selectors ('ip', 'eq',
# 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
        # Type
        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 'local' 'true'
        option 'action' 'metric 128'
        optin 'if' 'eth0.2'
        option 'action' 'allow'


config filter
        option 'type' 'redistribute'
        option 'ip' '8.0.0.0/8'
        option 'proto' '3'
        option 'action' 'metric 128'
        option 'if' 'eth0.2'
# Notice that the 'local' selector is a boolean.
config filter
        option 'ignore' 'true'
        option 'type'   'redistribute'
        option 'local'  'true'
        # No action means "allow"
- /etc/config/babeld 99/99 100%

Box1 logs:
Neighbour fe80::6f0:21ff:fe34:16c1 dev wlan0 reach ffff ureach 0000 rxcost
256 txcost 256 rtt 0.000 rttcost 0 chan 36.
192.168.1.1/32 metric 0 (exported)
192.168.2.2/32 metric 0 (exported)
192.168.4.1/32 metric 0 (exported)
fd78:117c:4808::1/128 metric 0 (exported)
fd48:a6f0:7e4::6f0:21ff:fe40:614/128 metric 0 (exported)
192.168.1.2/32 from 0.0.0.0/0 metric 256 (261) refmetric 0 id
06:f0:21:ff:fe:40:06:10 seqno 51257 age 6 via wlan0 neigh
fe80::6f0:21ff:fe34:16c1 nexthop 192.168.4.2 (installed)
192.168.4.2/32 from 0.0.0.0/0 metric 256 (261) refmetric 0 id
06:f0:21:ff:fe:40:06:10 seqno 51257 age 6 via wlan0 neigh
fe80::6f0:21ff:fe34:16c1 nexthop 192.168.4.2 (installed)
fd48:a6f0:7e4::1/128 metric 256 (261) refmetric 0 id
06:f0:21:ff:fe:40:06:10 seqno 51257 age 6 via wlan0 neigh
fe80::6f0:21ff:fe34:16c1 (installed)
root at OpenWrt:/#

Box2
ip route show all
root at OpenWrt:/# ip route show all
192.168.1.0/24 dev br-lan scope link  src 192.168.1.2
192.168.1.1 via 192.168.4.1 dev wlan0 onlink
192.168.2.2 via 192.168.4.1 dev wlan0 onlink
192.168.4.0/24 dev wlan0 scope link  src 192.168.4.2
192.168.4.1 via 192.168.4.1 dev wlan0 onlink
root at OpenWrt:/#

Box2
root at OpenWrt:/# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface
192.168.1.0     *               255.255.255.0   U     0      0        0
br-lan
192.168.1.1     192.168.4.1     255.255.255.255 UGH   0      0        0
wlan0
192.168.2.2     192.168.4.1     255.255.255.255 UGH   0      0        0
wlan0
192.168.4.0     *               255.255.255.0   U     0      0        0
wlan0
192.168.4.1     192.168.4.1     255.255.255.255 UGH   0      0        0
wlan0
root at OpenWrt:/#

Box2
Babel config
root at OpenWrt:/# cat /etc/config/babeld
package babeld
# Babeld reads options from the following files (the last one takes
precedence
# if an option is defined in several places):
# - the file defined by the option conf_file (default: /etc/babeld.conf),
# - *.conf files in the directory defined by conf_dir (default:
/tmp/babel.d/),
# - this UCI configuration file.
# See "man babeld" for all available options ("Global options").
# Important: remember to use '_' instead of '-' in option names.
config general
        # 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'
         list 'import_table' '42'
         list 'import_table' '100'
        ## Alternative configuration file and directory.
        ## See comment at the top of this file for more details.
        # option 'conf_file' '/etc/babeld.conf'
        # option 'conf_dir' '/tmp/babel.d/'
config interface Wlan1
        ## Remove this line to enable babeld on this interface
        ## 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' 'Wlan1'
        ## You can set options, see babeld man page ("Interface
configuration")
        # option 'rxcost' '256'
        # option 'hello_interval' '1'
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 of a type ('in', 'out' or 'redistribute'), an action
# ('allow', 'deny' or 'metric xxx') and a set of selectors ('ip', 'eq',
# 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.
# Notice that the 'local' selector is a boolean.
config filter
        option 'ignore' 'true'
        option 'type'   'redistribute'
        option 'local'  'true'
        # No action means "allow"
root at OpenWrt:/#

Box2
Neighbour fe80::6f0:21ff:fe3f:f632 dev wlan0 reach ffff ureach 0000 rxcost
256 txcost 256 rtt 0.000 rttcost 0 chan 36.
192.168.1.2/32 metric 0 (exported)
192.168.4.2/32 metric 0 (exported)
fd48:a6f0:7e4::1/128 metric 0 (exported)
192.168.1.1/32 from 0.0.0.0/0 metric 256 (256) refmetric 0 id
06:f0:21:ff:fe:40:06:14 seqno 30976 age 3 via wlan0 neigh
fe80::6f0:21ff:fe3f:f632 nexthop 192.168.4.1 (installed)
192.168.2.2/32 from 0.0.0.0/0 metric 256 (256) refmetric 0 id
06:f0:21:ff:fe:40:06:14 seqno 30976 age 3 via wlan0 neigh
fe80::6f0:21ff:fe3f:f632 nexthop 192.168.4.1 (installed)
192.168.4.1/32 from 0.0.0.0/0 metric 256 (256) refmetric 0 id
06:f0:21:ff:fe:40:06:14 seqno 30976 age 3 via wlan0 neigh
fe80::6f0:21ff:fe3f:f632 nexthop 192.168.4.1 (installed)
fd48:a6f0:7e4::6f0:21ff:fe40:614/128 metric 256 (256) refmetric 0 id
06:f0:21:ff:fe:40:06:14 seqno 30976 age 3 via wlan0 neigh
fe80::6f0:21ff:fe3f:f632 (installed)
fd78:117c:4808::1/128 metric 256 (256) refmetric 0 id
06:f0:21:ff:fe:40:06:14 seqno 30976 age 3 via wlan0 neigh
fe80::6f0:21ff:fe3f:f632 (installed)
root at OpenWrt:/#

Thank you.

Best regards,
Volodymyr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/babel-users/attachments/20181029/0a2ca4bd/attachment-0001.html>


More information about the Babel-users mailing list