[Olsr-dev] SmartGateway: 1: no tunnel being set up to SGW server / 2: stale SGW tunnel

Teco Boot (spam-protected)
Thu Oct 13 21:24:40 CEST 2011


I'm testing SmartGateway on couple of nodes.
Although all user traffic to Internet is OK, I see 2 strange
issues. I use tiny gw script to report status of GW HNAs, default
routes and tunnels.

1) No tunnel at client:
(spam-protected):/usr/local/sbin# gw
Table: Gateways
Status  Gateway IP      ETX     Hopcnt  Uplink  Downlnk IPv4    IPv6    Prefix
u-      172.31.51.41    1.100   2       120     1000    ipv4(n) -       -
u-      172.31.51.44    1.000   1       120     1000    ipv4(n) -       -
u-      172.31.175.170  1.000   1       120     1000    ipv4(n) -       -

SmartGateway client tunnel:

Default routes:
default via 172.31.51.44 dev wlan0  table 223  metric 4 onlink 

SmartGateway server tunnel:
tunl0     Link encap:IPIP Tunnel  HWaddr   
          inet addr:172.31.51.42  Mask:255.255.255.255
          UP RUNNING NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)


Another one:
(spam-protected):/var/log# gw
Table: Gateways
Status  Gateway IP      ETX     Hopcnt  Uplink  Downlnk IPv4    IPv6    Prefix
u-      172.31.51.41    1.100   2       120     1000    ipv4(n) -       -
u-      172.31.51.44    1.000   1       120     1000    ipv4(n) -       -
u-      172.31.175.170  1.000   1       120     1000    ipv4(n) -       -

SmartGateway client tunnel:

Default routes:
default via 172.31.51.44 dev wlan0  table 223  metric 4 onlink 

SmartGateway server tunnel:
tunl0     Link encap:IPIP Tunnel  HWaddr   
          inet addr:172.31.175.171  Mask:255.255.255.255
          UP RUNNING NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)


This is how it should be:
(spam-protected):~# gw
Table: Gateways
Status  Gateway IP      ETX     Hopcnt  Uplink  Downlnk IPv4    IPv6    Prefix
u-      172.31.51.41    1.058   1       120     1000    ipv4(n) -       -
s-      172.31.51.44    1.000   1       120     1000    ipv4(n) -       -
u-      172.31.175.170  1.000   1       120     1000    ipv4(n) -       -

SmartGateway client tunnel:
tnl_2c331fac Link encap:IPIP Tunnel  HWaddr   
          inet addr:172.31.175.172  P-t-P:172.31.175.172  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:35123 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:7079418 (6.7 MiB)


Default routes:
default dev tnl_2c331fac  table 224  metric 2 
default via 172.31.51.44 dev wlan0  table 223  metric 4 onlink 

SmartGateway server tunnel:
tunl0     Link encap:IPIP Tunnel  HWaddr   
          inet addr:172.31.175.172  Mask:255.255.255.255
          UP RUNNING NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)



There is no gateway selected. Other nodes do select a gateway out
of this list (after ~70 seconds after startup).

I have no special warnings on the nodes in error:
Oct 11 11:11:19 AHR-051-042 olsrd[1880]: Writing '1' (was 1) to /proc/sys/net/ipv4/ip_forward
Oct 11 11:11:19 AHR-051-042 olsrd[1880]: Writing '0' (was 1) to /proc/sys/net/ipv4/conf/tunl0/rp_filter
Oct 11 11:11:19 AHR-051-042 olsrd[1880]: Writing '0' (was 1) to /proc/sys/net/ipv4/conf/all/send_redirects
Oct 11 11:11:19 AHR-051-042 olsrd[1880]: Writing '0' (was 1) to /proc/sys/net/ipv4/conf/all/rp_filter
Oct 11 11:11:19 AHR-051-042 olsrd[1880]: Writing '0' (was 1) to /proc/sys/net/ipv4/conf/wlan0/send_redirects
Oct 11 11:11:19 AHR-051-042 olsrd[1880]: Writing '0' (was 1) to /proc/sys/net/ipv4/conf/wlan0/rp_filter
Oct 11 11:11:19 AHR-051-042 olsrd[1880]: Adding interface wlan0 
Oct 11 11:11:20 AHR-051-042 olsrd[1895]: olsr.org -  pre-0.6.3-git_1ffdb71-hash_3c75699de4a7bd0f90a9a15b61076ff2  - successfully started
Oct 11 11:12:30 AHR-051-042 olsrd[1895]: Received netlink error code File exists (-17)

Oct 11 18:53:00 AHR-175-171 olsrd[1974]: Writing '1' (was 1) to /proc/sys/net/ipv4/ip_forward
Oct 11 18:53:00 AHR-175-171 olsrd[1974]: Writing '0' (was 1) to /proc/sys/net/ipv4/conf/tunl0/rp_filter
Oct 11 18:53:00 AHR-175-171 olsrd[1974]: Writing '0' (was 1) to /proc/sys/net/ipv4/conf/all/send_redirects
Oct 11 18:53:00 AHR-175-171 olsrd[1974]: Writing '0' (was 1) to /proc/sys/net/ipv4/conf/all/rp_filter
Oct 11 18:53:00 AHR-175-171 olsrd[1974]: Writing '0' (was 1) to /proc/sys/net/ipv4/conf/wlan0/send_redirects
Oct 11 18:53:00 AHR-175-171 olsrd[1974]: Writing '0' (was 1) to /proc/sys/net/ipv4/conf/wlan0/rp_filter
Oct 11 18:53:00 AHR-175-171 olsrd[1974]: Adding interface wlan0 
Oct 11 18:53:00 AHR-175-171 olsrd[2000]: Writing "0" to /proc/sys/net/ipv4/conf/bmf0/rp_filter
Oct 11 18:53:00 AHR-175-171 olsrd[2000]: olsr.org -  pre-0.6.3-git_1ffdb71-hash_3c75699de4a7bd0f90a9a15b61076ff2  - successfully started

I have the netlink error message on almost all my nodes. Update the message so that it tells us which route is duplicate?


Node without the problem, but with the netlink error:
Oct 11 18:22:06 AHR-175-172 olsrd[1950]: Writing '1' (was 1) to /proc/sys/net/ipv4/ip_forward
Oct 11 18:22:06 AHR-175-172 olsrd[1950]: Writing '0' (was 1) to /proc/sys/net/ipv4/conf/tunl0/rp_filter
Oct 11 18:22:06 AHR-175-172 olsrd[1950]: Writing '0' (was 1) to /proc/sys/net/ipv4/conf/all/send_redirects
Oct 11 18:22:06 AHR-175-172 olsrd[1950]: Writing '0' (was 1) to /proc/sys/net/ipv4/conf/all/rp_filter
Oct 11 18:22:06 AHR-175-172 olsrd[1950]: Writing '0' (was 1) to /proc/sys/net/ipv4/conf/wlan0/send_redirects
Oct 11 18:22:06 AHR-175-172 olsrd[1950]: Writing '0' (was 1) to /proc/sys/net/ipv4/conf/wlan0/rp_filter
Oct 11 18:22:06 AHR-175-172 olsrd[1950]: Adding interface wlan0 
Oct 11 18:22:07 AHR-175-172 olsrd[1965]: Writing "0" to /proc/sys/net/ipv4/conf/bmf0/rp_filter
Oct 11 18:22:07 AHR-175-172 olsrd[1965]: olsr.org -  pre-0.6.3-git_1ffdb71-hash_3c75699de4a7bd0f90a9a15b61076ff2  - successfully started
Oct 11 18:23:48 AHR-175-172 olsrd[1965]: Received netlink error code File exists (-17)


Here the routing tables for node AHR-051-042:

(spam-protected):/var/log# olsr -r
HTTP/1.0 200 OK
Content-type: text/plain

Table: Routes
Destination     Gateway IP      Metric  ETX     Interface
0.0.0.0/0       172.31.51.44    1       1.000   wlan0
10.51.41.0/24   172.31.51.44    2       1.100   wlan0
10.51.43.0/24   172.31.51.44    3       2.100   wlan0
10.51.44.0/24   172.31.51.44    1       1.000   wlan0
10.51.45.0/24   172.31.51.45    1       1.000   wlan0
10.51.46.0/24   172.31.51.46    1       1.000   wlan0
10.175.170.0/24 172.31.175.170  1       1.000   wlan0
10.175.171.0/24 172.31.175.171  1       1.000   wlan0
10.175.172.0/24 172.31.175.172  1       1.000   wlan0
172.29.51.41/32 172.31.51.44    2       1.100   wlan0
172.29.51.44/32 172.31.51.44    1       1.000   wlan0
172.29.175.170/32       172.31.175.170  1       1.000   wlan0
172.31.51.41/32 172.31.51.44    2       1.100   wlan0
172.31.51.43/32 172.31.51.44    3       2.100   wlan0
172.31.51.44/32 172.31.51.44    1       1.000   wlan0
172.31.51.45/32 172.31.51.45    1       1.000   wlan0
172.31.51.46/32 172.31.51.46    1       1.000   wlan0
172.31.175.170/32       172.31.175.170  1       1.000   wlan0
172.31.175.171/32       172.31.175.171  1       1.000   wlan0
172.31.175.172/32       172.31.175.172  1       1.000   wlan0

(spam-protected):/var/log# ip -4 r s
10.0.0.0/8 via 172.30.0.1 dev tun0 
10.51.41.0/24 via 172.31.51.44 dev wlan0  metric 2 onlink 
10.51.42.0/25 dev eth0  proto kernel  scope link  src 10.51.42.1 
10.51.43.0/24 via 172.31.51.44 dev wlan0  metric 2 onlink 
10.51.44.0/24 via 172.31.51.44 dev wlan0  metric 2 onlink 
10.51.45.0/24 via 172.31.51.45 dev wlan0  metric 2 onlink 
10.51.46.0/24 via 172.31.51.46 dev wlan0  metric 2 onlink 
10.175.170.0/24 via 172.31.175.170 dev wlan0  metric 2 onlink 
10.175.171.0/24 via 172.31.175.171 dev wlan0  metric 2 onlink 
10.175.172.0/24 via 172.31.175.172 dev wlan0  metric 2 onlink 
172.16.0.0/12 via 172.30.0.1 dev tun0 
172.29.51.41 via 172.31.51.44 dev wlan0  metric 2 onlink 
172.29.51.44 via 172.31.51.44 dev wlan0  metric 2 onlink 
172.29.175.170 via 172.31.175.170 dev wlan0  metric 2 onlink 
172.30.0.0/16 dev tun0  proto kernel  scope link  src 172.30.0.39 
172.31.0.0/16 dev wlan0  proto kernel  scope link  src 172.31.51.42 
172.31.51.41 via 172.31.51.44 dev wlan0  metric 2 onlink 
172.31.51.43 via 172.31.51.44 dev wlan0  metric 2 onlink 
172.31.51.44 via 172.31.51.44 dev wlan0  metric 2 onlink 
172.31.51.45 via 172.31.51.45 dev wlan0  metric 2 onlink 
172.31.51.46 via 172.31.51.46 dev wlan0  metric 2 onlink 
172.31.175.170 via 172.31.175.170 dev wlan0  metric 2 onlink 
172.31.175.171 via 172.31.175.171 dev wlan0  metric 2 onlink 
172.31.175.172 via 172.31.175.172 dev wlan0  metric 2 onlink 
192.168.0.0/16 via 172.30.0.1 dev tun0 

(spam-protected):/var/log# ip -4 r s tab 223
default via 172.31.51.44 dev wlan0  metric 4 onlink 

(spam-protected):/var/log# ip -4 r s tab 224


====

2) Tunnel to another SGW server while router is SGW server itself:
(spam-protected):~# gw
Table: Gateways
Status  Gateway IP      ETX     Hopcnt  Uplink  Downlnk IPv4    IPv6    Prefix
u-      172.31.51.41    1.000   1       120     1000    ipv4(n) -       -
s-      172.31.51.44    1.000   1       120     1000    ipv4(n) -       -

SmartGateway client tunnel:
tnl_2c331fac Link encap:IPIP Tunnel  HWaddr   
          inet addr:172.31.175.170  P-t-P:172.31.175.170  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)


Default routes:
default dev tnl_2c331fac  table 224  metric 2 
default via 10.22.190.200 dev eth1 

SmartGateway server tunnel:
tunl0     Link encap:IPIP Tunnel  HWaddr   
          inet addr:172.31.175.170  Mask:255.255.255.255
          UP RUNNING NOARP  MTU:1480  Metric:1
          RX packets:1 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:137 (137.0 B)  TX bytes:0 (0.0 B)


I think it is better to clean up the stale tunnel. But it doesn't hurt.


Teco







More information about the Olsr-dev mailing list