Hello,

Am 03.01.2013 um 02:57 schrieb Marek Lindner:

> On Thursday, January 03, 2013 07:28:02 Jan Lühr wrote:
>>>> The client should use 6a:4b:93:de:00:84 as a gatway, since it provides
>>>> much higher data rates - however, it is stuck at aa:31:0e:4a:0f:1d.
>>> 
>>> I have observed the same behavior.
>> 
>> That's quite frustrating. Can I debug, when and why batman-adv actually
>> chooses as specific gateway?
> 
> Yes, you can. Enable the batman-adv debug log at compile and runtime. While 
> retrieving the 'batman' log messages you should see something like:
> Adding route to gateway ..
> Changing route to gateway ..
> Found new gateway ..
> etc
> 
> Maybe you can post the result here ?
> 

Ok, Let's give it a try:

=== Command Log 
a) Situation on node at beginng - just one gateway, the right one.
Freifunk-b0487acb2d58:~# batctl gwl
      Gateway      (#/255)           Nexthop [outgoingIF]: gw_class ... 
[B.A.T.M.A.N. adv 2012.4.0, MainIF/MAC: wlan0-1/b2:48:7a:cb:2d:59 (bat0)]
=> 72:8b:06:40:61:2e (248) 72:8b:06:40:61:2e [  mesh-vpn]: 215 - 96MBit/96MBit

b) Enable gateway mode on the backup gateway
root@fastd3:~# /usr/local/sbin/batctl gw server 1Mbit/1Mbit

Gateway-List is:
Freifunk-b0487acb2d58:~# batctl gwl
      Gateway      (#/255)           Nexthop [outgoingIF]: gw_class ... 
[B.A.T.M.A.N. adv 2012.4.0, MainIF/MAC: wlan0-1/b2:48:7a:cb:2d:59 (bat0)]
=> 72:8b:06:40:61:2e (255) 72:8b:06:40:61:2e [  mesh-vpn]: 215 - 96MBit/96MBit
   aa:31:0e:4a:0f:1d (255) aa:31:0e:4a:0f:1d [  mesh-vpn]:  39 - 
1024KBit/1024KBit

c) Disable regular gateway, force node to switch to backup
kif:~# batctl gw_mode client

Gateway-List is:
reifunk-b0487acb2d58:~# batctl gwl
      Gateway      (#/255)           Nexthop [outgoingIF]: gw_class ... 
[B.A.T.M.A.N. adv 2012.4.0, MainIF/MAC: wlan0-1/b2:48:7a:cb:2d:59 (bat0)]
=> aa:31:0e:4a:0f:1d (255) aa:31:0e:4a:0f:1d [  mesh-vpn]:  39 - 
1024KBit/1024KBit

d) Re-enable regular gateway
root@kif:~# /usr/local/sbin/batctl gw server 100Mbit/100Mbit

Gateway-List is 
Freifunk-b0487acb2d58:~# batctl gwl
      Gateway      (#/255)           Nexthop [outgoingIF]: gw_class ... 
[B.A.T.M.A.N. adv 2012.4.0, MainIF/MAC: wlan0-1/b2:48:7a:cb:2d:59 (bat0)]
   72:8b:06:40:61:2e (254) 72:8b:06:40:61:2e [  mesh-vpn]: 215 - 96MBit/96MBit
=> aa:31:0e:4a:0f:1d (255) aa:31:0e:4a:0f:1d [  mesh-vpn]:  39 - 
1024KBit/1024KBit

e) Wait some time

f) Stop Logging

=== End of command Log

=== Node log of that hour
http://jluehr.de/batman-adv.log.gz

zgrep -i gateway batman-adv.log.gz
[   1022240] Gateway class of originator aa:31:0e:4a:0f:1d changed from 0 to 39
[   1035100] Gateway class of originator 72:8b:06:40:61:2e changed from 215 to 0
[   1035100] Gateway 72:8b:06:40:61:2e removed from gateway list
[   1035830] Changing route to gateway aa:31:0e:4a:0f:1d (gw_flags: 39, tq: 255)
[   1046020] Gateway class of originator 72:8b:06:40:61:2e changed from 0 to 215



Reply via email to