[Olsr-dev] Problems with SmartGateway
Teco Boot
(spam-protected)
Thu Sep 29 21:26:54 CEST 2011
Op 29 sep 2011, om 14:17 heeft Markus Kittenberger het volgende geschreven:
>
> On Thu, Sep 29, 2011 at 2:00 PM, Teco Boot <(spam-protected)> wrote:
> Back to older kernel is no option for me, I need 3.0.0 for my gear.
> it was meant for testing, and finding the smart gateway problem ,..
>
> I see a /proc/sys/net/ipv4/conf/all/rp_filter with default value 1.
> might be a problem,.
> what the value of
> /proc/sys/net/ipv4/conf/tun0/rp_filter
(spam-protected):~# cat /proc/sys/net/ipv4/conf/tun0/rp_filter
1
But this is my OpenVPN tunnel !!
Here is what is of interest:
(spam-protected):~# cat /proc/sys/net/ipv4/conf/tunl0/rp_filter
0
> and how does 3.0 kernel combine this values ? (-;
I don't think it differs from older kernels.
I think the ../all/rp_filter enforce validation on all ifs.
In src/linux/net.c, is_at_least_linuxkernel_2_6_31:
173 if (strncmp(uts.release, "2.6.",4) != 0) {
174 return false;
175 }
I put something in front:
if (strncmp(uts.release, "2", 1) >= 0) {
return true;
}
if (strncmp(uts.release, "2.6.", 4) != 0) {
return false;
}
I pushed into stable (with user name "right now"). Next time with correct name, I hope.
There are some unexpected netlink error messages in syslog:
On gateway server:
Sep 29 19:00:11 AHR-175-173 olsrd[17142]: Writing '1' (was 1) to /proc/sys/net/ipv4/ip_forward
Sep 29 19:00:11 AHR-175-173 olsrd[17142]: Writing '0' (was 1) to /proc/sys/net/ipv4/conf/tunl0/rp_filter
Sep 29 19:00:11 AHR-175-173 olsrd[17142]: Writing '0' (was 1) to /proc/sys/net/ipv4/conf/all/send_redirects
Sep 29 19:00:11 AHR-175-173 olsrd[17142]: Writing '0' (was 0) to /proc/sys/net/ipv4/conf/all/rp_filter
Sep 29 19:00:11 AHR-175-173 olsrd[17142]: Writing '0' (was 1) to /proc/sys/net/ipv4/conf/wlan0/send_redirects
Sep 29 19:00:11 AHR-175-173 olsrd[17142]: Writing '0' (was 1) to /proc/sys/net/ipv4/conf/wlan0/rp_filter
Sep 29 19:00:11 AHR-175-173 olsrd[17142]: Adding interface wlan0
Sep 29 19:00:11 AHR-175-173 olsrd[17142]: Writing '0' (was 1) to /proc/sys/net/ipv4/conf/eth1.2580/send_redirects
Sep 29 19:00:11 AHR-175-173 olsrd[17142]: Writing '0' (was 1) to /proc/sys/net/ipv4/conf/eth1.2580/rp_filter
Sep 29 19:00:11 AHR-175-173 olsrd[17142]: Adding interface eth1.2580
Sep 29 19:00:11 AHR-175-173 olsrd[17144]: Writing "0" to /proc/sys/net/ipv4/conf/bmf0/rp_filter
Sep 29 19:00:11 AHR-175-173 olsrd[17144]: olsr.org - pre-0.6.2-git_-hash_c88f1d019c2e53ce1cb8270a8b9ef9de - successfully started
Sep 29 19:01:31 AHR-175-173 olsrd[17144]: Received netlink error code File exists (-17)
Sep 29 19:23:59 AHR-175-173 olsrd[17144]: Received netlink error code File exists (-17)
Not sure it has to do with SmartGateway
Teco
>
> We better turn this off.
> It is automatically turned off if kernel >= 2.6.31.
> Update code for >= 3.0.0 also?
> maybe we need another code, as 3.0 should be evaluate as bigger than 2.6.31 *G
>
> Now I have smart gateway running. Great!!
> fine!
>
> I'll test a bit more.
>
> Teco
>
>
> Op 25 sep 2011, om 17:00 heeft Markus Kittenberger het volgende geschreven:
>
>> try to use "older" kernel versions (or best an openwrt router with an old openwrt release, and without any firewall)) on the gateway side,
>>
>> cause while on client side we defenitely broke smartgateway with using the onlink flag for routes, some months ago, but on server side, i really doubt that we anyhow managed to break it recently (and it worked on the systems we tested it #1
>>
>> Markus
>>
>> #1 but i can`t recall completely which ones this where, but it included for sure openwrt whiterussian and kamikaze
>>
>> On Sun, Sep 25, 2011 at 1:52 PM, Teco Boot <(spam-protected)> wrote:
>> Thanks.
>>
>> I didn't see the error messages anymore and route is added. Packets flow into tunnel, but receiving gateway node doesn't forward. I'll try to find out why.
>> I am couple of weeks offline, so keep patience.
>>
>> Teco
>>
>>
>> Op 20 sep 2011, om 23:03 heeft Markus Kittenberger het volgende geschreven:
>>
>>> i just pushed a patch to stable that should fix this bug,..
>>>
>>> Markus
>>>
>>> On Fri, Aug 26, 2011 at 4:12 PM, Teco Boot <(spam-protected)> wrote:
>>> I have problems with SmartGateway. Add route to tunnel is rejected.
>>>
>>> I use dyn_gw also. But this node has no default route. So I think it is not dyn_gw.
>>>
>>> If selected GW is a 1-hop away destination, is traffic sent through tunnel?
>>> Or directly via if wan0? Looks smart. Or is this routing entry unexpected?
>>>
>>>
>>> Syslog:
>>> =======
>>> Aug 26 13:15:25 AHR-175-169 olsrd[2199]: Received netlink error code Invalid argument (-22)
>>> Aug 26 13:15:26 AHR-175-169 olsrd[2199]: . error: add route to 0.0.0.0/0.0.0.0 via 0.0.0.0 dev void onlink (Resource temporarily unavailable 11)
>>> Aug 26 13:15:26 AHR-175-169 olsrd[2199]: . error while setting inetgw tunnel route to 0.0.0.0/0.0.0.0 for if 19
>>> Aug 26 13:15:26 AHR-175-169 olsrd[2199]: Received netlink error code Invalid argument (-22)
>>> Aug 26 13:15:26 AHR-175-169 olsrd[2199]: . error: add route to 0.0.0.0/0.0.0.0 via 0.0.0.0 dev void onlink (Resource temporarily unavailable 11)
>>> Aug 26 13:15:26 AHR-175-169 olsrd[2199]: . error while setting inetgw tunnel route to 0.0.0.0/0.0.0.0 for if 19
>>> Aug 26 13:15:26 AHR-175-169 olsrd[2199]: Received netlink error code File exists (-17)
>>>
>>> GW info:
>>> ========
>>> Table: Gateways
>>> Status Gateway IP ETX Hopcnt Uplink Downlnk IPv4 IPv6 Prefix
>>> s- 172.31.175.166 1.000 1 120 1000 ipv4(n) - -
>>> u- 172.31.175.173 1.000 1 120 1000 ipv4(n) - -
>>>
>>> Tunnel:
>>> =======
>>> tnl_a6af1fac Link encap:IPIP Tunnel HWaddr
>>> inet addr:172.31.175.169 P-t-P:172.31.175.169 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 route:
>>> ==============
>>> default via 172.31.175.166 dev wlan0 table 223 metric 4 onlink
>>>
>>> Config:
>>> =======
>>> SmartGateway yes
>>> LoadPlugin "olsrd_dyn_gw.so.0.5"
>>> {
>>> PlParam "HNA" "0.0.0.0 0.0.0.0"
>>> PlParam "HNA" "0.0.0.0 128.0.0.0"
>>> PlParam "HNA" "128.0.0.0 128.0.0.0"
>>> PlParam "HNA" "0.0.0.0 192.0.0.0"
>>> PlParam "HNA" "64.0.0.0 192.0.0.0"
>>> PlParam "HNA" "128.0.0.0 192.0.0.0"
>>> PlParam "HNA" "192.0.0.0 192.0.0.0"
>>> }
>>>
>>>
>>> Result when SmartGateway should use tunnel.
>>> I moved router #169 from #166 towards #173.
>>> Routing switched to #173, including traffic
>>> to Internet.
>>> ===========================================
>>> Every 2.0s: olsr -l ; olsr -g ; echo ; ip route show table all | grep "default via" ; echo ; traceroute -n 8.8.8.8 Fri Aug 26 13:35:44 2011
>>>
>>> Table: Links
>>> Local IP Remote IP Hyst. LQ NLQ Cost
>>> 172.31.175.169 172.31.175.166 0.00 1.000 0.607 1.645
>>> 172.31.175.169 172.31.175.173 0.00 1.000 1.000 1.000
>>>
>>> Table: Gateways
>>> Status Gateway IP ETX Hopcnt Uplink Downlnk IPv4 IPv6 Prefix
>>> s- 172.31.175.166 1.645 1 120 1000 ipv4(n) - -
>>> u- 172.31.175.173 1.000 1 120 1000 ipv4(n) - -
>>>
>>> default via 172.31.175.173 dev wlan0 table 223 metric 4 onlink
>>>
>>> traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 60 byte packets
>>> 1 172.31.175.173 0.618 ms 0.492 ms 0.671 ms
>>> 2 * * *
>>> 3 213.51.132.193 26.720 ms 27.714 ms 44.023 ms
>>> 4 213.51.157.42 45.014 ms 67.329 ms 68.274 ms
>>> 5 213.51.158.146 69.222 ms 91.281 ms 92.216 ms
>>> 6 72.14.219.220 117.372 ms 117.239 ms 118.354 ms
>>> 7 209.85.254.95 119.239 ms 209.85.254.90 96.420 ms 96.729 ms
>>> 8 209.85.255.60 81.467 ms 81.439 ms 60.172 ms
>>> 9 216.239.49.38 76.460 ms 75.945 ms 63.348 ms
>>> 10 209.85.255.126 63.488 ms 43.024 ms 209.85.255.130 62.719 ms
>>> 11 8.8.8.8 46.431 ms 59.123 ms 60.449 ms
>>>
>>>
>>> Teco
>>>
>>>
>>>
>>> --
>>> Olsr-dev mailing list
>>> (spam-protected)
>>> https://lists.olsr.org/mailman/listinfo/olsr-dev
>>>
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.olsr.org/pipermail/olsr-dev/attachments/20110929/8fc90a66/attachment.html>
More information about the Olsr-dev
mailing list