[Olsr-users] SmartGateway for multi-hop routing w/ olsrd v0.9.0.1 under OpenWRT v46069
Ben West
(spam-protected)
Sun Jun 28 23:38:35 CEST 2015
I'm putting together minimal functional configuration for a mesh using the
SmartGateway function, using olsrd v0.9.0.1 under OpenWRT v46069. All
repeater nodes appear to be successfully building a tunnel back to the
gateway node, and repeaters with 1 hop are working fine. However, repeater
nodes with more than 1 hop are not getting any traffic outside beyond the
gateway. They can ping the gateway node's wan interface, but no further
(NAT not working).
Might anyone have working SmartGateway setup under recent versions of
OpenWRT which they are using to route over >1 hops? I've unsuccessfully
tried out Freifunk's recommendations for SmartGateway
<https://wiki.freifunk.net/OLSR/SmartGateway>, but they they make no
difference and also appear to be outdated. In particular, olsrd bundled
with OpenWRT now includes the function olsrd_setup_smartgw_rules() in its
init script, to add such firewall rules:
https://github.com/openwrt-routing/packages/blob/master/olsrd/files/olsrd.init
I'm quoting below the setup I have, which works fine for repeater nodes of
1 hop, but not greater. Note that repeater nodes have declarations for a
non-existent "wan" interface.
My guess is that the rules being inserted by olsrd_setup_smartgw_rules()
aren't adequate for routing across multiple hops.
*Gateway node ...*
*/etc/config/network:*config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config interface 'wan'
option ifname 'eth0'
option proto 'dhcp'
config interface 'tunl0'
option ifname 'tunl0'
option proto 'none'
config 'interface' 'mesh'
option ifname 'wlan0'
option 'proto' 'static'
option 'ipaddr' '10.12.1.1'
option 'netmask' '255.255.255.0'
*/etc/config/olsrd:*config olsrd
option IpVersion '4'
option FIBMetric 'flat'
option AllowNoInt 'yes'
option TcRedundancy '2'
option NatThreshold '0.75'
option LinkQualityAlgorithm 'etx_ffeth'
option SmartGateway 'yes'
option SmartGatewayThreshold '50'
option Pollrate '0.1'
option SmartGatewayUplink 'ipv4'
config 'LoadPlugin'
option 'library' 'olsrd_arprefresh.so.0.1'
config 'LoadPlugin'
option 'library' 'olsrd_dyn_gw.so.0.5'
option 'HNA' '0.0.0.0 0.0.0.0'
option Ping '8.8.8.8'
option PingInterval '30'
option PingCmd 'ping -c 1 -q %s'
config 'LoadPlugin'
option 'library' 'olsrd_nameservice.so.0.3'
option 'sighup_pid_file' '/var/run/dnsmasq.pid'
option 'suffix' '.mesh'
config 'LoadPlugin'
option 'library' 'olsrd_txtinfo.so.0.1'
option 'port' '2006'
option 'Accept' '127.0.0.1'
config InterfaceDefaults
option MidValidityTime '500.0'
option TcInterval '2.0'
option HnaValidityTime '125.0'
option HelloValidityTime '125.0'
option TcValidityTime '500.0'
option Ip4Broadcast '255.255.255.255'
option MidInterval '25.0'
option HelloInterval '3.0'
option HnaInterval '10.0'
config 'Interface'
list 'interface' 'wan'
option 'Mode' 'ether'
config 'Interface'
list 'interface' 'mesh'
*/etc/config/firewall:*config defaults
option syn_flood 1
option input ACCEPT
option output ACCEPT
option forward REJECT
option disable_ipv6 1
config 'zone'
option 'name' 'mesh'
option 'network' 'mesh'
option 'input' 'ACCEPT'
option 'output' 'ACCEPT'
option 'masq' '1'
option 'forward' 'REJECT'
config zone
option name wan
option network 'wan'
option input ACCEPT
option output ACCEPT
option forward REJECT
option masq 1
option mtu_fix 1
config 'forwarding'
option 'src' 'mesh'
option 'dest' 'wan'
config 'forwarding'
option 'src' 'mesh'
option 'dest' 'mesh'
*Repeater nodes ...*
*/etc/config/network:*config interface loopback
option ifname lo
option proto static
option ipaddr 127.0.0.1
option netmask 255.0.0.0
config interface wan
option proto dhcp
option type bridge
config interface 'tunl0'
option ifname 'tunl0'
option proto 'none'
config 'interface' 'mesh'
option ifname 'wlan0'
option 'proto' 'static'
option 'ipaddr' '10.12.1.X'
option 'netmask' '255.255.255.0'
config interface lan
option ifname eth0
option type bridge
option proto static
option 'dns' '208.67.222.222 208.67.220.220'
option ipaddr 192.168.X.1
option netmask 255.255.255.0
*/etc/config/olsrd: same as gateway node*
/etc/config/firewall:
config defaults
option syn_flood 1
option input ACCEPT
option output ACCEPT
option forward REJECT
option disable_ipv6 1
config 'zone'
option 'name' 'mesh'
option 'network' 'mesh'
option 'input' 'ACCEPT'
option 'output' 'ACCEPT'
option 'masq' '1'
option 'forward' 'REJECT'
config zone
option name lan
option network 'lan'
option input ACCEPT
option output ACCEPT
option forward REJECT
option masq 1
config zone
option name wan
option network 'wan'
option input ACCEPT
option output ACCEPT
option forward REJECT
option masq 1
config 'forwarding'
option 'src' 'wan'
option 'dest' 'mesh'
config 'forwarding'
option 'src' 'mesh'
option 'dest' 'mesh'
config 'forwarding'
option 'src' 'lan'
option 'dest' 'mesh'
config 'forwarding'
option 'src' 'mesh'
option 'dest' 'lan'
config 'forwarding'
option 'src' 'lan'
option 'dest' 'lan'
--
Ben West
http://gowasabi.net
(spam-protected)
314-246-9434
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.olsr.org/pipermail/olsr-users/attachments/20150628/cc722f3a/attachment.html>
More information about the Olsr-users
mailing list