All of lore.kernel.org
 help / color / mirror / Atom feed
* Batman-adv packet retranslation
@ 2020-05-21 17:13 Alexey Ermakov
  2020-05-22  6:25 ` Sven Eckelmann
  2020-05-22 11:41 ` Marek Lindner
  0 siblings, 2 replies; 17+ messages in thread
From: Alexey Ermakov @ 2020-05-21 17:13 UTC (permalink / raw)
  To: b.a.t.m.a.n

Hi, All.

There is a problem with retranslating packets in B.A.T.M.A.N. V mode.
I have 3 stations, st1, st2 and st3 with one active network interface.
This interface is configured so that st1 and st3 can see only st2.
I expect that if I join these stations in a bat0 network, then station
2 will act as a repeater and all three stations will be visible in the
bat0 network.
This works fine if I selecting B.A.T.M.A.N. IV algorithm, but doesn't
work in B.A.T.M.A.N.V.

--
Ermakov Alexey.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Batman-adv packet retranslation
  2020-05-21 17:13 Batman-adv packet retranslation Alexey Ermakov
@ 2020-05-22  6:25 ` Sven Eckelmann
  2020-05-24 14:43   ` Alexey Ermakov
  2020-05-22 11:41 ` Marek Lindner
  1 sibling, 1 reply; 17+ messages in thread
From: Sven Eckelmann @ 2020-05-22  6:25 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Alexey Ermakov

[-- Attachment #1: Type: text/plain, Size: 8228 bytes --]

On Thursday, 21 May 2020 19:13:18 CEST Alexey Ermakov wrote:
[...]
> I have 3 stations, st1, st2 and st3 with one active network interface.
> This interface is configured so that st1 and st3 can see only st2.
[...]
> This works fine if I selecting B.A.T.M.A.N. IV algorithm, but doesn't
> work in B.A.T.M.A.N.V.

That's not a lot to work with. I am rather sure that the B.A.T.M.A.N. V 
developers will not be able to figure out what is going on with this 
information.

I have just tried it out in my documented setup [1,2] and following 
test-init.sh::

    #! /bin/sh
    
    set -e
    export PATH="/host/batctl/:$PATH"
    
    insmod /host/batman-adv/net/batman-adv/batman-adv.ko
    batctl routing_algo BATMAN_V
    /host/batctl/batctl if add enp0s1
    ip link set up dev enp0s1
    ip link set up dev bat0
    
    MAC_PART="$(ip link show enp0s1 | awk "/ether/ {print \$2}"| sed -e "s/.*://" -e "s/[\\n\\ ].*//"|awk "{print (\"0x\"\$1)*1 }")"
    IP_PART="$(echo $MAC_PART|awk "{ print \$1 }")"
    ip addr replace 192.168.55.${IP_PART}/24 dev bat0

The used kernel version is next-20200521 and batman-adv 2020.1.

These are the neighbor and originator tables of the devices + ping test
results:

* node1

  - neighbor::

      [B.A.T.M.A.N. adv 2020.1, MainIF/MAC: enp0s1/02:ba:de:af:fe:01 (bat0/12:99:c8:a5:1e:27 BATMAN_V)]
      IF             Neighbor              last-seen
      02:ba:de:af:fe:02    0.528s (        1.0) [    enp0s1]

  - originator::

      [B.A.T.M.A.N. adv 2020.1, MainIF/MAC: enp0s1/02:ba:de:af:fe:01 (bat0/12:99:c8:a5:1e:27 BATMAN_V)]
         Originator        last-seen ( throughput)  Nexthop           [outgoingIF]
       * 02:ba:de:af:fe:03    0.704s (        0.8)  02:ba:de:af:fe:02 [    enp0s1]
       * 02:ba:de:af:fe:02    0.704s (        1.0)  02:ba:de:af:fe:02 [    enp0s1]

  - bat0 ping::

      $ for i in $(seq 1 3); do ping -q -c 3 192.168.55.$i; done
      PING 192.168.55.1 (192.168.55.1) 56(84) bytes of data.
      
      --- 192.168.55.1 ping statistics ---
      3 packets transmitted, 3 received, 0% packet loss, time 28ms
      rtt min/avg/max/mdev = 0.482/0.539/0.613/0.060 ms
      PING 192.168.55.2 (192.168.55.2) 56(84) bytes of data.
      
      --- 192.168.55.2 ping statistics ---
      3 packets transmitted, 3 received, 0% packet loss, time 8ms
      rtt min/avg/max/mdev = 1.797/1.940/2.060/0.114 ms
      PING 192.168.55.3 (192.168.55.3) 56(84) bytes of data.
      
      --- 192.168.55.3 ping statistics ---
      3 packets transmitted, 3 received, 0% packet loss, time 10ms
      rtt min/avg/max/mdev = 2.105/3.021/3.962/0.760 ms

  - enp1s0 ping::

      $ for i in $(seq 1 3); do ping -q -c 3 192.168.251.5$i; done
      PING 192.168.251.51 (192.168.251.51) 56(84) bytes of data.
      
      --- 192.168.251.51 ping statistics ---
      3 packets transmitted, 3 received, 0% packet loss, time 36ms
      rtt min/avg/max/mdev = 0.170/0.396/0.510/0.160 ms
      PING 192.168.251.52 (192.168.251.52) 56(84) bytes of data.
      
      --- 192.168.251.52 ping statistics ---
      3 packets transmitted, 3 received, 0% packet loss, time 8ms
      rtt min/avg/max/mdev = 1.572/2.353/3.192/0.664 ms
      PING 192.168.251.53 (192.168.251.53) 56(84) bytes of data.
      
      --- 192.168.251.53 ping statistics ---
      3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 41ms

* node2

  - neighbor::

      [B.A.T.M.A.N. adv 2020.1, MainIF/MAC: enp0s1/02:ba:de:af:fe:02 (bat0/32:a0:63:19:b4:44 BATMAN_V)]
      IF             Neighbor              last-seen
      02:ba:de:af:fe:03    0.208s (        1.0) [    enp0s1]
      02:ba:de:af:fe:01    0.344s (        1.0) [    enp0s1]

  - originator::

      [B.A.T.M.A.N. adv 2020.1, MainIF/MAC: enp0s1/02:ba:de:af:fe:02 (bat0/32:a0:63:19:b4:44 BATMAN_V)]
         Originator        last-seen ( throughput)  Nexthop           [outgoingIF]
       * 02:ba:de:af:fe:03    0.188s (        1.0)  02:ba:de:af:fe:03 [    enp0s1]
       * 02:ba:de:af:fe:01    0.016s (        1.0)  02:ba:de:af:fe:01 [    enp0s1]

  - bat0 ping::

      $ for i in $(seq 1 3); do ping -q -c 3 192.168.55.$i; done
      PING 192.168.55.1 (192.168.55.1) 56(84) bytes of data.
      
      --- 192.168.55.1 ping statistics ---
      3 packets transmitted, 3 received, 0% packet loss, time 7ms
      rtt min/avg/max/mdev = 1.961/2.510/3.484/0.691 ms
      PING 192.168.55.2 (192.168.55.2) 56(84) bytes of data.
      
      --- 192.168.55.2 ping statistics ---
      3 packets transmitted, 3 received, 0% packet loss, time 38ms
      rtt min/avg/max/mdev = 0.287/0.481/0.606/0.140 ms
      PING 192.168.55.3 (192.168.55.3) 56(84) bytes of data.
      
      --- 192.168.55.3 ping statistics ---
      3 packets transmitted, 3 received, 0% packet loss, time 9ms
      rtt min/avg/max/mdev = 1.215/1.737/2.038/0.370 ms

  - enp1s0 ping::

      $ for i in $(seq 1 3); do ping -q -c 3 192.168.251.5$i; done
      PING 192.168.251.51 (192.168.251.51) 56(84) bytes of data.
      
      --- 192.168.251.51 ping statistics ---
      3 packets transmitted, 3 received, 0% packet loss, time 10ms
      rtt min/avg/max/mdev = 1.114/1.698/2.107/0.425 ms
      PING 192.168.251.52 (192.168.251.52) 56(84) bytes of data.
      
      --- 192.168.251.52 ping statistics ---
      3 packets transmitted, 3 received, 0% packet loss, time 14ms
      rtt min/avg/max/mdev = 0.360/0.747/1.270/0.384 ms
      PING 192.168.251.53 (192.168.251.53) 56(84) bytes of data.
      
      --- 192.168.251.53 ping statistics ---
      3 packets transmitted, 3 received, 0% packet loss, time 7ms
      rtt min/avg/max/mdev = 1.909/2.427/2.692/0.371 ms

* node3

  - neighbor::

      [B.A.T.M.A.N. adv 2020.1, MainIF/MAC: enp0s1/02:ba:de:af:fe:03 (bat0/7a:f4:94:ef:b6:6d BATMAN_V)]
      IF             Neighbor              last-seen
      02:ba:de:af:fe:02    0.072s (        1.0) [    enp0s1]

  - originator::

      [B.A.T.M.A.N. adv 2020.1, MainIF/MAC: enp0s1/02:ba:de:af:fe:03 (bat0/7a:f4:94:ef:b6:6d BATMAN_V)]
         Originator        last-seen ( throughput)  Nexthop           [outgoingIF]
       * 02:ba:de:af:fe:01    0.764s (        0.8)  02:ba:de:af:fe:02 [    enp0s1]
       * 02:ba:de:af:fe:02    0.148s (        1.0)  02:ba:de:af:fe:02 [    enp0s1]

  - bat0 ping::

      $ for i in $(seq 1 3); do ping -q -c 3 192.168.55.$i; done
      PING 192.168.55.1 (192.168.55.1) 56(84) bytes of data.
      
      --- 192.168.55.1 ping statistics ---
      3 packets transmitted, 3 received, 0% packet loss, time 10ms
      rtt min/avg/max/mdev = 1.736/2.948/3.925/0.910 ms
      PING 192.168.55.2 (192.168.55.2) 56(84) bytes of data.
      
      --- 192.168.55.2 ping statistics ---
      3 packets transmitted, 3 received, 0% packet loss, time 11ms
      rtt min/avg/max/mdev = 2.081/2.175/2.361/0.136 ms
      PING 192.168.55.3 (192.168.55.3) 56(84) bytes of data.
      
      --- 192.168.55.3 ping statistics ---
      3 packets transmitted, 3 received, 0% packet loss, time 27ms
      rtt min/avg/max/mdev = 0.278/0.489/0.649/0.156 ms

  - enp1s0 ping::

      $ for i in $(seq 1 3); do ping -q -c 3 192.168.251.5$i; done
      PING 192.168.251.51 (192.168.251.51) 56(84) bytes of data.
      
      --- 192.168.251.51 ping statistics ---
      3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 43ms
      pipe 3
      PING 192.168.251.52 (192.168.251.52) 56(84) bytes of data.
      
      --- 192.168.251.52 ping statistics ---
      3 packets transmitted, 3 received, 0% packet loss, time 10ms
      rtt min/avg/max/mdev = 1.025/1.569/1.997/0.405 ms
      PING 192.168.251.53 (192.168.251.53) 56(84) bytes of data.
      
      --- 192.168.251.53 ping statistics ---
      3 packets transmitted, 3 received, 0% packet loss, time 61ms
      rtt min/avg/max/mdev = 0.214/0.376/0.480/0.117 ms


And it seems I can communicate with all nodes perfectly fine. And the 
communication between node1 and node3 seems to be blocked as expected on 
enp1s0 (the slave device of bat0).

Kind regards,
	Sven

[1] https://www.open-mesh.org/projects/open-mesh/wiki/Kernel_hacking_Debian_image
[2] https://www.open-mesh.org/projects/open-mesh/wiki/Advanced_Bridge_virtual_network#Allow-communication-between-specific-nodes

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Batman-adv packet retranslation
  2020-05-21 17:13 Batman-adv packet retranslation Alexey Ermakov
  2020-05-22  6:25 ` Sven Eckelmann
@ 2020-05-22 11:41 ` Marek Lindner
  1 sibling, 0 replies; 17+ messages in thread
From: Marek Lindner @ 2020-05-22 11:41 UTC (permalink / raw)
  To: b.a.t.m.a.n

[-- Attachment #1: Type: text/plain, Size: 664 bytes --]

Hi Alexey,

> There is a problem with retranslating packets in B.A.T.M.A.N. V mode.
> I have 3 stations, st1, st2 and st3 with one active network interface.
> This interface is configured so that st1 and st3 can see only st2.
> I expect that if I join these stations in a bat0 network, then station
> 2 will act as a repeater and all three stations will be visible in the
> bat0 network.
> This works fine if I selecting B.A.T.M.A.N. IV algorithm, but doesn't
> work in B.A.T.M.A.N.V.

can you please provide more information as to what does not work exactly ?
The neighbors don't find each other ? Payload traffic does not flow ? ...

Kind regards,
Marek Lindner

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Batman-adv packet retranslation
  2020-05-22  6:25 ` Sven Eckelmann
@ 2020-05-24 14:43   ` Alexey Ermakov
  2020-05-24 15:29     ` Marek Lindner
  2020-05-24 16:28     ` Sven Eckelmann
  0 siblings, 2 replies; 17+ messages in thread
From: Alexey Ermakov @ 2020-05-24 14:43 UTC (permalink / raw)
  To: b.a.t.m.a.n

Sorry, I didn't provided full information about experiment conditions.
I could reproduce issue on virtual machines.
I started 3 nodes with virtual interfaces eth0 which linked to host
bridge interface br0.
Network traffic between node 1 and node 3 drops by nft as described
Sven Eckelmann above.
At start moment br0 is down.
After virtual machines had booted I configured them by following steps:
1) insmod /usr/batman-adv.ko
2) ifconfig eth0 up
3) batctl ra BATMAN_V
4 batctl if add eth0
5) ifconfig bat0 192.168.1.<n> up      NOTE: 'n' is node numer: 1, 2 or 3
6) batctl hardif eth0 to 100                NOTE: If sklip this step,
all works fine!

After this I started host bridge interface br0. NOTE: if bridge had
started before batman configured all works fine

After these steps I have following results:
---
NODE 1:
(none)# ip -o link show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
master bat0 state UP mode DEFAULT group default qlen 1000\
link/ether 00:04:23:dc:3b:01 brd ff:ff:ff:ff
:ff:ff
(none)# ip -o link show dev bat0
17: bat0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue
state UNKNOWN mode DEFAULT group default qlen 1000\    link/ether
62:7f:0f:87:43:78 brd ff:ff:ff:ff:ff:ff
(none)# batctl o
[B.A.T.M.A.N. adv 2020.1, MainIF/MAC: eth0/00:04:23:dc:3b:01
(bat0/62:7f:0f:87:43:78 BATMAN_V)]
  Originator        last-seen ( throughput)  Nexthop           [outgoingIF]
* 00:04:23:dc:3b:10    0.580s (        0.1)  00:04:23:dc:3b:10 [      eth0]

---
NODE 2:
(none)# ip -o link show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
master bat0 state UP mode DEFAULT group default qlen 1000\
link/ether 00:04:23:dc:3b:10 brd ff:ff:ff:ff
:ff:ff
(none)# ip -o link show dev bat0
17: bat0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue
state UNKNOWN mode DEFAULT group default qlen 1000\    link/ether
22:86:ba:4e:9c:5c brd ff:ff:ff:ff:ff:ff
(none)# batctl o
[B.A.T.M.A.N. adv 2020.1, MainIF/MAC: eth0/00:04:23:dc:3b:10
(bat0/22:86:ba:4e:9c:5c BATMAN_V)]
  Originator        last-seen ( throughput)  Nexthop           [outgoingIF]
* 00:04:23:dc:3b:01    0.960s (        0.1)  00:04:23:dc:3b:01 [      eth0]
* 00:04:23:dc:3b:1f    0.450s (        0.1)  00:04:23:dc:3b:1f [      eth0]

---
NODE 3:
(none)# ip -o link show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
master bat0 state UP mode DEFAULT group default qlen 1000\
link/ether 00:04:23:dc:3b:1f brd ff:ff:ff:ff
:ff:ff
(none)# ip -o link show dev bat0
17: bat0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue
state UNKNOWN mode DEFAULT group default qlen 1000\    link/ether
42:d8:87:c3:7e:6e brd ff:ff:ff:ff:ff:ff
(none)# batctl o
[B.A.T.M.A.N. adv 2020.1, MainIF/MAC: eth0/00:04:23:dc:3b:1f
(bat0/42:d8:87:c3:7e:6e BATMAN_V)]
  Originator        last-seen ( throughput)  Nexthop           [outgoingIF]
* 00:04:23:dc:3b:10    0.330s (        0.1)  00:04:23:dc:3b:10 [      eth0]

---
I didn't provided ping result because it's oblivious.
In my case eth0 not actualy ethernet connection between nodes, it is
connection to radio modem which configured as bridge and it can be
configured for a long time. Therefore, there is no guarantee that the
channel will be available at the batman setup time (but eth0 link is
UP).

пт, 22 мая 2020 г. в 09:25, Sven Eckelmann <sven@narfation.org>:
>
> On Thursday, 21 May 2020 19:13:18 CEST Alexey Ermakov wrote:
> [...]
> > I have 3 stations, st1, st2 and st3 with one active network interface.
> > This interface is configured so that st1 and st3 can see only st2.
> [...]
> > This works fine if I selecting B.A.T.M.A.N. IV algorithm, but doesn't
> > work in B.A.T.M.A.N.V.
>
> That's not a lot to work with. I am rather sure that the B.A.T.M.A.N. V
> developers will not be able to figure out what is going on with this
> information.
>
> I have just tried it out in my documented setup [1,2] and following
> test-init.sh::
>
>     #! /bin/sh
>
>     set -e
>     export PATH="/host/batctl/:$PATH"
>
>     insmod /host/batman-adv/net/batman-adv/batman-adv.ko
>     batctl routing_algo BATMAN_V
>     /host/batctl/batctl if add enp0s1
>     ip link set up dev enp0s1
>     ip link set up dev bat0
>
>     MAC_PART="$(ip link show enp0s1 | awk "/ether/ {print \$2}"| sed -e "s/.*://" -e "s/[\\n\\ ].*//"|awk "{print (\"0x\"\$1)*1 }")"
>     IP_PART="$(echo $MAC_PART|awk "{ print \$1 }")"
>     ip addr replace 192.168.55.${IP_PART}/24 dev bat0
>
> The used kernel version is next-20200521 and batman-adv 2020.1.
>
> These are the neighbor and originator tables of the devices + ping test
> results:
>
> * node1
>
>   - neighbor::
>
>       [B.A.T.M.A.N. adv 2020.1, MainIF/MAC: enp0s1/02:ba:de:af:fe:01 (bat0/12:99:c8:a5:1e:27 BATMAN_V)]
>       IF             Neighbor              last-seen
>       02:ba:de:af:fe:02    0.528s (        1.0) [    enp0s1]
>
>   - originator::
>
>       [B.A.T.M.A.N. adv 2020.1, MainIF/MAC: enp0s1/02:ba:de:af:fe:01 (bat0/12:99:c8:a5:1e:27 BATMAN_V)]
>          Originator        last-seen ( throughput)  Nexthop           [outgoingIF]
>        * 02:ba:de:af:fe:03    0.704s (        0.8)  02:ba:de:af:fe:02 [    enp0s1]
>        * 02:ba:de:af:fe:02    0.704s (        1.0)  02:ba:de:af:fe:02 [    enp0s1]
>
>   - bat0 ping::
>
>       $ for i in $(seq 1 3); do ping -q -c 3 192.168.55.$i; done
>       PING 192.168.55.1 (192.168.55.1) 56(84) bytes of data.
>
>       --- 192.168.55.1 ping statistics ---
>       3 packets transmitted, 3 received, 0% packet loss, time 28ms
>       rtt min/avg/max/mdev = 0.482/0.539/0.613/0.060 ms
>       PING 192.168.55.2 (192.168.55.2) 56(84) bytes of data.
>
>       --- 192.168.55.2 ping statistics ---
>       3 packets transmitted, 3 received, 0% packet loss, time 8ms
>       rtt min/avg/max/mdev = 1.797/1.940/2.060/0.114 ms
>       PING 192.168.55.3 (192.168.55.3) 56(84) bytes of data.
>
>       --- 192.168.55.3 ping statistics ---
>       3 packets transmitted, 3 received, 0% packet loss, time 10ms
>       rtt min/avg/max/mdev = 2.105/3.021/3.962/0.760 ms
>
>   - enp1s0 ping::
>
>       $ for i in $(seq 1 3); do ping -q -c 3 192.168.251.5$i; done
>       PING 192.168.251.51 (192.168.251.51) 56(84) bytes of data.
>
>       --- 192.168.251.51 ping statistics ---
>       3 packets transmitted, 3 received, 0% packet loss, time 36ms
>       rtt min/avg/max/mdev = 0.170/0.396/0.510/0.160 ms
>       PING 192.168.251.52 (192.168.251.52) 56(84) bytes of data.
>
>       --- 192.168.251.52 ping statistics ---
>       3 packets transmitted, 3 received, 0% packet loss, time 8ms
>       rtt min/avg/max/mdev = 1.572/2.353/3.192/0.664 ms
>       PING 192.168.251.53 (192.168.251.53) 56(84) bytes of data.
>
>       --- 192.168.251.53 ping statistics ---
>       3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 41ms
>
> * node2
>
>   - neighbor::
>
>       [B.A.T.M.A.N. adv 2020.1, MainIF/MAC: enp0s1/02:ba:de:af:fe:02 (bat0/32:a0:63:19:b4:44 BATMAN_V)]
>       IF             Neighbor              last-seen
>       02:ba:de:af:fe:03    0.208s (        1.0) [    enp0s1]
>       02:ba:de:af:fe:01    0.344s (        1.0) [    enp0s1]
>
>   - originator::
>
>       [B.A.T.M.A.N. adv 2020.1, MainIF/MAC: enp0s1/02:ba:de:af:fe:02 (bat0/32:a0:63:19:b4:44 BATMAN_V)]
>          Originator        last-seen ( throughput)  Nexthop           [outgoingIF]
>        * 02:ba:de:af:fe:03    0.188s (        1.0)  02:ba:de:af:fe:03 [    enp0s1]
>        * 02:ba:de:af:fe:01    0.016s (        1.0)  02:ba:de:af:fe:01 [    enp0s1]
>
>   - bat0 ping::
>
>       $ for i in $(seq 1 3); do ping -q -c 3 192.168.55.$i; done
>       PING 192.168.55.1 (192.168.55.1) 56(84) bytes of data.
>
>       --- 192.168.55.1 ping statistics ---
>       3 packets transmitted, 3 received, 0% packet loss, time 7ms
>       rtt min/avg/max/mdev = 1.961/2.510/3.484/0.691 ms
>       PING 192.168.55.2 (192.168.55.2) 56(84) bytes of data.
>
>       --- 192.168.55.2 ping statistics ---
>       3 packets transmitted, 3 received, 0% packet loss, time 38ms
>       rtt min/avg/max/mdev = 0.287/0.481/0.606/0.140 ms
>       PING 192.168.55.3 (192.168.55.3) 56(84) bytes of data.
>
>       --- 192.168.55.3 ping statistics ---
>       3 packets transmitted, 3 received, 0% packet loss, time 9ms
>       rtt min/avg/max/mdev = 1.215/1.737/2.038/0.370 ms
>
>   - enp1s0 ping::
>
>       $ for i in $(seq 1 3); do ping -q -c 3 192.168.251.5$i; done
>       PING 192.168.251.51 (192.168.251.51) 56(84) bytes of data.
>
>       --- 192.168.251.51 ping statistics ---
>       3 packets transmitted, 3 received, 0% packet loss, time 10ms
>       rtt min/avg/max/mdev = 1.114/1.698/2.107/0.425 ms
>       PING 192.168.251.52 (192.168.251.52) 56(84) bytes of data.
>
>       --- 192.168.251.52 ping statistics ---
>       3 packets transmitted, 3 received, 0% packet loss, time 14ms
>       rtt min/avg/max/mdev = 0.360/0.747/1.270/0.384 ms
>       PING 192.168.251.53 (192.168.251.53) 56(84) bytes of data.
>
>       --- 192.168.251.53 ping statistics ---
>       3 packets transmitted, 3 received, 0% packet loss, time 7ms
>       rtt min/avg/max/mdev = 1.909/2.427/2.692/0.371 ms
>
> * node3
>
>   - neighbor::
>
>       [B.A.T.M.A.N. adv 2020.1, MainIF/MAC: enp0s1/02:ba:de:af:fe:03 (bat0/7a:f4:94:ef:b6:6d BATMAN_V)]
>       IF             Neighbor              last-seen
>       02:ba:de:af:fe:02    0.072s (        1.0) [    enp0s1]
>
>   - originator::
>
>       [B.A.T.M.A.N. adv 2020.1, MainIF/MAC: enp0s1/02:ba:de:af:fe:03 (bat0/7a:f4:94:ef:b6:6d BATMAN_V)]
>          Originator        last-seen ( throughput)  Nexthop           [outgoingIF]
>        * 02:ba:de:af:fe:01    0.764s (        0.8)  02:ba:de:af:fe:02 [    enp0s1]
>        * 02:ba:de:af:fe:02    0.148s (        1.0)  02:ba:de:af:fe:02 [    enp0s1]
>
>   - bat0 ping::
>
>       $ for i in $(seq 1 3); do ping -q -c 3 192.168.55.$i; done
>       PING 192.168.55.1 (192.168.55.1) 56(84) bytes of data.
>
>       --- 192.168.55.1 ping statistics ---
>       3 packets transmitted, 3 received, 0% packet loss, time 10ms
>       rtt min/avg/max/mdev = 1.736/2.948/3.925/0.910 ms
>       PING 192.168.55.2 (192.168.55.2) 56(84) bytes of data.
>
>       --- 192.168.55.2 ping statistics ---
>       3 packets transmitted, 3 received, 0% packet loss, time 11ms
>       rtt min/avg/max/mdev = 2.081/2.175/2.361/0.136 ms
>       PING 192.168.55.3 (192.168.55.3) 56(84) bytes of data.
>
>       --- 192.168.55.3 ping statistics ---
>       3 packets transmitted, 3 received, 0% packet loss, time 27ms
>       rtt min/avg/max/mdev = 0.278/0.489/0.649/0.156 ms
>
>   - enp1s0 ping::
>
>       $ for i in $(seq 1 3); do ping -q -c 3 192.168.251.5$i; done
>       PING 192.168.251.51 (192.168.251.51) 56(84) bytes of data.
>
>       --- 192.168.251.51 ping statistics ---
>       3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 43ms
>       pipe 3
>       PING 192.168.251.52 (192.168.251.52) 56(84) bytes of data.
>
>       --- 192.168.251.52 ping statistics ---
>       3 packets transmitted, 3 received, 0% packet loss, time 10ms
>       rtt min/avg/max/mdev = 1.025/1.569/1.997/0.405 ms
>       PING 192.168.251.53 (192.168.251.53) 56(84) bytes of data.
>
>       --- 192.168.251.53 ping statistics ---
>       3 packets transmitted, 3 received, 0% packet loss, time 61ms
>       rtt min/avg/max/mdev = 0.214/0.376/0.480/0.117 ms
>
>
> And it seems I can communicate with all nodes perfectly fine. And the
> communication between node1 and node3 seems to be blocked as expected on
> enp1s0 (the slave device of bat0).
>
> Kind regards,
>         Sven
>
> [1] https://www.open-mesh.org/projects/open-mesh/wiki/Kernel_hacking_Debian_image
> [2] https://www.open-mesh.org/projects/open-mesh/wiki/Advanced_Bridge_virtual_network#Allow-communication-between-specific-nodes



-- 
Ермаков Алексей Евгеньевич.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Batman-adv packet retranslation
  2020-05-24 14:43   ` Alexey Ermakov
@ 2020-05-24 15:29     ` Marek Lindner
  2020-05-24 15:49       ` Alexey Ermakov
  2020-05-24 16:28     ` Sven Eckelmann
  1 sibling, 1 reply; 17+ messages in thread
From: Marek Lindner @ 2020-05-24 15:29 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

[-- Attachment #1: Type: text/plain, Size: 762 bytes --]

On Sunday, 24 May 2020 16:43:55 CEST Alexey Ermakov wrote:
> [B.A.T.M.A.N. adv 2020.1, MainIF/MAC: eth0/00:04:23:dc:3b:01
> (bat0/62:7f:0f:87:43:78 BATMAN_V)]
>   Originator        last-seen ( throughput)  Nexthop           [outgoingIF]
> * 00:04:23:dc:3b:10    0.580s (        0.1)  00:04:23:dc:3b:10 [      eth0]

BATMAN V chooses routes based on link throughput. If the throughput drops 
below a certain value the route is dropped. As you can imagine, a throughput 
of 0.1 is pretty close to non-usable.

BATMAN V attempts to auto-detect the throughput using various methods which 
does not work in a virtualized environment. I suggest you go with the per-
interace /sys/class/net/<iface>/batman-adv/throughput_override setting.

Kind regards,
Marek Lindner


[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Batman-adv packet retranslation
  2020-05-24 15:29     ` Marek Lindner
@ 2020-05-24 15:49       ` Alexey Ermakov
  2020-05-24 15:55         ` Marek Lindner
  0 siblings, 1 reply; 17+ messages in thread
From: Alexey Ermakov @ 2020-05-24 15:49 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

Yes, in real world I set throughput overriode for each interface, but
in my example only one interface configured in batman network and if
it works as you said there are several questions:
- Why direct connections work properly (I mean connections Node1-Node2
and Node2-Node3 ) even with this throughput?
- Why this scheme works then all nodes had seen originators before
throughput overrided?
- If I override throughput to 10000, for example, will it work properly?

вс, 24 мая 2020 г., 18:29 Marek Lindner <mareklindner@neomailbox.ch>:
>
> On Sunday, 24 May 2020 16:43:55 CEST Alexey Ermakov wrote:
> > [B.A.T.M.A.N. adv 2020.1, MainIF/MAC: eth0/00:04:23:dc:3b:01
> > (bat0/62:7f:0f:87:43:78 BATMAN_V)]
> >   Originator        last-seen ( throughput)  Nexthop           [outgoingIF]
> > * 00:04:23:dc:3b:10    0.580s (        0.1)  00:04:23:dc:3b:10 [      eth0]
>
> BATMAN V chooses routes based on link throughput. If the throughput drops
> below a certain value the route is dropped. As you can imagine, a throughput
> of 0.1 is pretty close to non-usable.
>
> BATMAN V attempts to auto-detect the throughput using various methods which
> does not work in a virtualized environment. I suggest you go with the per-
> interace /sys/class/net/<iface>/batman-adv/throughput_override setting.
>
> Kind regards,
> Marek Lindner
>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Batman-adv packet retranslation
  2020-05-24 15:49       ` Alexey Ermakov
@ 2020-05-24 15:55         ` Marek Lindner
  0 siblings, 0 replies; 17+ messages in thread
From: Marek Lindner @ 2020-05-24 15:55 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

[-- Attachment #1: Type: text/plain, Size: 700 bytes --]

On Sunday, 24 May 2020 17:49:23 CEST Alexey Ermakov wrote:
> - Why direct connections work properly (I mean connections Node1-Node2
> and Node2-Node3 ) even with this throughput?

Batman originator messages are not forwarded when the throughput value is too 
low. Furthermore, the batman algorithm applies a hop penalty on each hop which 
reduces the metric with each hop.
That is why one hop is still works.


> - Why this scheme works then all nodes had seen originators before
> throughput overrided?

I don't quite understand the question, sorry.


> - If I override throughput to 10000, for example, will it work properly?

It should. Why not simply give it a try ?

Kind regards,
Marek Lindner

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Batman-adv packet retranslation
  2020-05-24 14:43   ` Alexey Ermakov
  2020-05-24 15:29     ` Marek Lindner
@ 2020-05-24 16:28     ` Sven Eckelmann
  2020-05-24 21:53       ` Alexey Ermakov
  1 sibling, 1 reply; 17+ messages in thread
From: Sven Eckelmann @ 2020-05-24 16:28 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Alexey Ermakov

[-- Attachment #1: Type: text/plain, Size: 1199 bytes --]

On Sunday, 24 May 2020 16:43:55 CEST Alexey Ermakov wrote:
> Sorry, I didn't provided full information about experiment conditions.
[...]
> 6) batctl hardif eth0 to 100                NOTE: If sklip this step,
> all works fine!
> 
> After this I started host bridge interface br0. NOTE: if bridge had
> started before batman configured all works fine

As Marek pointed  out, you told batman-adv that the  eth0 interfaces have for 
some reason a link speed of 0.1 [Mbit/s] (or 1 [100Kbit/s] - what the actual 
unit is for B.A.T.M.A.N. V). And unfortunately, 88% (for the hop penalty) of 1 
[100 Kbit/s] is in integer arithmetic 0 [100 Kbit/s]. And 0 whatever/s is just 
discarded by B.A.T.M.A.N. V [1] and not considered for routing traffic - hey, 
this path ends up as being 0 and therefore useless.

The reason why you want to set the link to 1 [100 Kbit/s] has to be figured 
out by yourself. But for a (during forwarding) strictly monotonic decreasing, 
integer value, it is a bad starting point to set it to 1 [whatever-unit] for a 
multi-hop setup.

Kind regards,
	Sven

[1] https://git.open-mesh.org/batman-adv.git/blob/e946e0beec5764ed5182943bf764f8793f1364bf:/net/batman-adv/bat_v_ogm.c#l880

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Batman-adv packet retranslation
  2020-05-24 16:28     ` Sven Eckelmann
@ 2020-05-24 21:53       ` Alexey Ermakov
  2020-05-25  8:57         ` Marek Lindner
  2020-05-25 13:34         ` Marek Lindner
  0 siblings, 2 replies; 17+ messages in thread
From: Alexey Ermakov @ 2020-05-24 21:53 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

> As Marek pointed  out, you told batman-adv that the  eth0 interfaces have for
> some reason a link speed of 0.1 [Mbit/s] (or 1 [100Kbit/s] - what the actual
> unit is for B.A.T.M.A.N. V). And unfortunately, 88% (for the hop penalty) of 1
> [100 Kbit/s] is in integer arithmetic 0 [100 Kbit/s]. And 0 whatever/s is just
> discarded by B.A.T.M.A.N. V [1] and not considered for routing traffic - hey,
> this path ends up as being 0 and therefore useless.
> The reason why you want to set the link to 1 [100 Kbit/s] has to be figured
> out by yourself. But for a (during forwarding) strictly monotonic decreasing,
> integer value, it is a bad starting point to set it to 1 [whatever-unit] for a
> multi-hop setup.

I have three interfaces on each node:
eth0 - radio modem, speed 145 kbit/s (see desiription below)
eth1 - ethernet, speed 100mbit/s
eth2 - radio modem 10kbit/s (hasn't been tested yet)

I have to say few words about radio modems. Radio modem is not builtin
device with special driver, it is separate machine with linux which
set up as bridge and connected to node by ethernet. This means node
can send data to modem with 100mbit/s, and think that all is ok but
data will dropped on modem side, it will not call netif_stop_queue, or
something on node side.

All tests I have been making were with eth0 and eth1 because eth2
doesn't ready yet.

---
FIRST test conditions:
 - All 3 nodes see each other
 - Both interfaces added to batman network
 - no throuthput override

FIRST test steps:
 - Turn on all nodes and setup batman - All nodes see each other.
Route goes via eth1
 - Switch off eth1 (plug off ethernet cable) - Route switches to eth0,
all nodes see each other
 - Switch eth1 on - Unstable behavior: sometimes route switch back to
eth1, but sometimes - not
---
SECOND test conditions:
 - All 3 nodes see each other
 - Both interfaces added to batman network
 - eth0 throuthput override set to 100, eth1 throuthput override set to 100000

SECOND test steps:
 - Turn on all nodes and setup batman - All nodes see each other.
Route goes via eth1
 - Switch off eth1 (plug off ethernet cable) - Route switches to eth0,
all nodes see each other
 - Switch eth1 on - Route switch back to eth1, works as expected
---
THIRD test conditions:
 - Node 1 And Node3 see only node 2, but not each other on eth0. All 3
nodes see each other on eth1
 - Both interfaces added to batman network
 -  no throuthput override

THIRD test steps:
 - Turn on all nodes and setup batman - All nodes see each other.
Route goes via eth1
 - Switch off eth1 (plug off ethernet cable) - Route switches to eth0,
ALL NODES SEE EACH OTHER (this means speed 145 kbit/s enough to route
through Node 2)
 - Switch eth1 on - Unstable behavior sometimes route switch back to
eth1, but sometimes - not
---
FOURTH test conditions:
 - Node 1 And Node3 see only node 2, but not each other on eth0. All 3
nodes see each other on eth1
 - Both interfaces added to batman network
 - eth0 throuthput override set to 100, eth1 throuthput override set to 100000

FOURTH test steps:
 - Turn on all nodes and setup batman - All nodes see each other.
Route goes via eth1
 - Switch off eth1 (plug off ethernet cable) - Route switches to eth0,
But Node 1 and Node 2 see only Node 3 for the reasons you described
above.
 - Switch eth1 on - Route switch back to eth1, works as expected
---
Summary: If I don't set override throughput, batman doesn't switch
back to ster eth0, but if I set it, retranslation doesn't work
properly.
I believe, I should tweak batman and I whould be happy if you say how.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Batman-adv packet retranslation
  2020-05-24 21:53       ` Alexey Ermakov
@ 2020-05-25  8:57         ` Marek Lindner
  2020-05-25  9:23           ` Alexey Ermakov
  2020-05-25 13:34         ` Marek Lindner
  1 sibling, 1 reply; 17+ messages in thread
From: Marek Lindner @ 2020-05-25  8:57 UTC (permalink / raw)
  To: b.a.t.m.a.n

[-- Attachment #1: Type: text/plain, Size: 1157 bytes --]

On Sunday, 24 May 2020 23:53:05 CEST Alexey Ermakov wrote:
> > As Marek pointed  out, you told batman-adv that the  eth0 interfaces have
> > for some reason a link speed of 0.1 [Mbit/s] (or 1 [100Kbit/s] - what the
> > actual unit is for B.A.T.M.A.N. V). And unfortunately, 88% (for the hop
> > penalty) of 1 [100 Kbit/s] is in integer arithmetic 0 [100 Kbit/s]. And 0
> > whatever/s is just discarded by B.A.T.M.A.N. V [1] and not considered for
> > routing traffic - hey, this path ends up as being 0 and therefore
> > useless.
> > The reason why you want to set the link to 1 [100 Kbit/s] has to be
> > figured
> > out by yourself. But for a (during forwarding) strictly monotonic
> > decreasing, integer value, it is a bad starting point to set it to 1
> > [whatever-unit] for a multi-hop setup.
> 
> I have three interfaces on each node:
> eth0 - radio modem, speed 145 kbit/s (see desiription below)
> eth1 - ethernet, speed 100mbit/s
> eth2 - radio modem 10kbit/s (hasn't been tested yet)

Before we go to the next setup, can you confirm that your virtual setup works 
as expected once the throughput is not set to 0.1 MBit/s ?

Kind regards,
Marek


[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Batman-adv packet retranslation
  2020-05-25  8:57         ` Marek Lindner
@ 2020-05-25  9:23           ` Alexey Ermakov
  0 siblings, 0 replies; 17+ messages in thread
From: Alexey Ermakov @ 2020-05-25  9:23 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

> Before we go to the next setup, can you confirm that your virtual setup works
> as expected once the throughput is not set to 0.1 MBit/s ?

If I don't set throughput manually virtual model works as expected as
well as real nodes with real channels and speed.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Batman-adv packet retranslation
  2020-05-24 21:53       ` Alexey Ermakov
  2020-05-25  8:57         ` Marek Lindner
@ 2020-05-25 13:34         ` Marek Lindner
  2020-05-25 14:59           ` Alexey Ermakov
  1 sibling, 1 reply; 17+ messages in thread
From: Marek Lindner @ 2020-05-25 13:34 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

[-- Attachment #1: Type: text/plain, Size: 656 bytes --]

On Sunday, 24 May 2020 23:53:05 CEST Alexey Ermakov wrote:
> Summary: If I don't set override throughput, batman doesn't switch
> back to ster eth0, but if I set it, retranslation doesn't work
> properly.
> I believe, I should tweak batman and I whould be happy if you say how.

To give advice on what to change, please provide the batman-adv routing tables 
which allow us to understand how batman-adv sees your network. Please refer to 
Sven's email with various examples.

For starters, we can focus on a single setup with originator & neighbors 
tables. then you can explain what isn't working the way you think it should.

Kind regards,
Marek Lindner

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Batman-adv packet retranslation
  2020-05-25 13:34         ` Marek Lindner
@ 2020-05-25 14:59           ` Alexey Ermakov
  2020-05-25 15:57             ` Marek Lindner
  0 siblings, 1 reply; 17+ messages in thread
From: Alexey Ermakov @ 2020-05-25 14:59 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

> To give advice on what to change, please provide the batman-adv routing tables
> which allow us to understand how batman-adv sees your network. Please refer to
> Sven's email with various examples.

Below I provide ethernet MAC addresses, tables with throughput overrid
to 100kbit/s and tables without output override.
Note that in case without override batman detects throughput about
100mbit/s. This is not quiet correct, because as I say before, nodes
connects to modems and throughput from node to modem is 100mbit/s, but
actual speed of modem is 145 kbit/sб therefore I should set throughput
override



eth0 interface MAC adresses:

Node 1:

node1# ip -o link show dev eth0
31: eth0@eth2: <BROADCAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master
bat0 state UP mode DEFAULT group default qlen 1000\    link/ether
fe:00:00:c3:5b:13 brd ff:ff:ff:ff:ff:ff


Node 2:

node2# ip -o link show dev eth0
31: eth0@eth2: <BROADCAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master
bat0 state UP mode DEFAULT group default qlen 1000\    link/ether
fe:00:00:3b:9b:13 brd ff:ff:ff:ff:ff:ff

---

Node 3:

node3# ip -o link show dev eth0
31: eth0@eth2: <BROADCAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master
bat0 state UP mode DEFAULT group default qlen 1000\    link/ether
fe:00:00:31:ed:13 brd ff:ff:ff:ff:ff:ff

Tables with throughput overrid to 100kbit/s:

 -- Node 1 tables --

node1# batctl o
[B.A.T.M.A.N. adv 2020.1, MainIF/MAC: eth0/fe:00:00:c3:5b:13
(bat0/fe:ee:f9:fe:00:68 BATMAN_V)]
   Originator        last-seen ( throughput)  Nexthop           [outgoingIF]
 * fe:00:00:3b:9b:13    0.750s (        0.1)  fe:00:00:3b:9b:13 [    eth0]
node1# batctl n
[B.A.T.M.A.N. adv 2020.1, MainIF/MAC: eth0/fe:00:00:c3:5b:13
(bat0/fe:ee:f9:fe:00:68 BATMAN_V)]
IF             Neighbor              last-seen
fe:00:00:3b:9b:13    0.410s (        0.1) [    eth0]

 -- Node 2 tables --

node2# batctl o
[B.A.T.M.A.N. adv 2020.1, MainIF/MAC: eth0/fe:00:00:3b:9b:13
(bat0/6a:53:d2:c1:6f:2e BATMAN_V)]
   Originator        last-seen ( throughput)  Nexthop           [outgoingIF]
 * fe:00:00:31:ed:13    0.190s (        0.1)  fe:00:00:31:ed:13 [    eth0]
 * fe:00:00:c3:5b:13    0.210s (        0.1)  fe:00:00:c3:5b:13 [    eth0]
node2# batctl n
[B.A.T.M.A.N. adv 2020.1, MainIF/MAC: eth0/fe:00:00:3b:9b:13
(bat0/6a:53:d2:c1:6f:2e BATMAN_V)]
IF             Neighbor              last-seen
fe:00:00:31:ed:13    0.320s (        0.1) [    eth0]
fe:00:00:c3:5b:13    0.120s (        0.1) [    eth0]

 -- Node 3 tables --

node3# batctl o
[B.A.T.M.A.N. adv 2020.1, MainIF/MAC: eth0/fe:00:00:31:ed:13
(bat0/fa:be:fa:e6:5b:7a BATMAN_V)]
   Originator        last-seen ( throughput)  Nexthop           [outgoingIF]
 * fe:00:00:3b:9b:13    0.650s (        0.1)  fe:00:00:3b:9b:13 [    eth0]
node3# batctl n
[B.A.T.M.A.N. adv 2020.1, MainIF/MAC: eth0/fe:00:00:31:ed:13
(bat0/fa:be:fa:e6:5b:7a BATMAN_V)]
IF             Neighbor              last-seen
fe:00:00:3b:9b:13    0.500s (        0.1) [    eth0]

-----------------------------------------

Tables without throughput override:

-- Node 1 tables --

node1# batctl o
[B.A.T.M.A.N. adv 2020.1, MainIF/MAC: eth0/fe:00:00:c3:5b:13
(bat0/26:f5:9a:68:f5:2d BATMAN_V)]
   Originator        last-seen ( throughput)  Nexthop           [outgoingIF]
 * fe:00:00:3b:9b:13    0.090s (      100.0)  fe:00:00:3b:9b:13 [    eth0]
 * fe:00:00:31:ed:13    0.350s (       88.2)  fe:00:00:3b:9b:13 [    eth0]
 * fe:00:00:c3:5b:13    1.330s (       88.2)  fe:00:00:3b:9b:13 [    eth0]
node1# batctl n
[B.A.T.M.A.N. adv 2020.1, MainIF/MAC: eth0/fe:00:00:c3:5b:13
(bat0/26:f5:9a:68:f5:2d BATMAN_V)]
IF             Neighbor              last-seen
fe:00:00:3b:9b:13    0.010s (      100.0) [    eth0]

-- Node 2 tables --

node2# batctl o
[B.A.T.M.A.N. adv 2020.1, MainIF/MAC: eth0/fe:00:00:3b:9b:13
(bat0/6a:5d:4e:09:dc:f4 BATMAN_V)]
   Originator        last-seen ( throughput)  Nexthop           [outgoingIF]
 * fe:00:00:31:ed:13    0.150s (      100.0)  fe:00:00:31:ed:13 [    eth0]
 * fe:00:00:c3:5b:13    0.080s (      100.0)  fe:00:00:c3:5b:13 [    eth0]
node2# batctl n
[B.A.T.M.A.N. adv 2020.1, MainIF/MAC: eth0/fe:00:00:3b:9b:13
(bat0/6a:5d:4e:09:dc:f4 BATMAN_V)]
IF             Neighbor              last-seen
fe:00:00:31:ed:13    0.440s (      100.0) [    eth0]
fe:00:00:c3:5b:13    0.060s (      100.0) [    eth0]

-- Node 3 tables --

node3# batctl o
[B.A.T.M.A.N. adv 2020.1, MainIF/MAC: eth0/fe:00:00:31:ed:13
(bat0/12:a7:e0:9e:f3:b6 BATMAN_V)]
   Originator        last-seen ( throughput)  Nexthop           [outgoingIF]
 * fe:00:00:3b:9b:13    0.100s (      100.0)  fe:00:00:3b:9b:13 [    eth0]
 * fe:00:00:c3:5b:13    0.200s (       88.2)  fe:00:00:3b:9b:13 [    eth0]
node3# batctl n
[B.A.T.M.A.N. adv 2020.1, MainIF/MAC: eth0/fe:00:00:31:ed:13
(bat0/12:a7:e0:9e:f3:b6 BATMAN_V)]
IF             Neighbor              last-seen
fe:00:00:3b:9b:13    0.300s (      100.0) [    eth0]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Batman-adv packet retranslation
  2020-05-25 14:59           ` Alexey Ermakov
@ 2020-05-25 15:57             ` Marek Lindner
  2020-05-25 17:21               ` Alexey Ermakov
  0 siblings, 1 reply; 17+ messages in thread
From: Marek Lindner @ 2020-05-25 15:57 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

[-- Attachment #1: Type: text/plain, Size: 1043 bytes --]

On Monday, 25 May 2020 16:59:23 CEST Alexey Ermakov wrote:
> Below I provide ethernet MAC addresses, tables with throughput overrid
> to 100kbit/s and tables without output override.
> Note that in case without override batman detects throughput about
> 100mbit/s. This is not quiet correct, because as I say before, nodes
> connects to modems and throughput from node to modem is 100mbit/s, but
> actual speed of modem is 145 kbit/sб therefore I should set throughput
> override

I am surprised you still are configuring a throughput override of 100kbit/s. 
What's the idea behind this configuration ?
As explained before, by configuring this low throughput value you are 
preventing any multi-hop route detection. Is that intended ?


> Tables without throughput override:

Since the throughput is auto-detected in your setup why are you configuring a 
manual throughput override ?

Now that we see the tables where do we see what issue ? What is not working as 
per your expectation ?

Kind regards,
Marek Lindner

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Batman-adv packet retranslation
  2020-05-25 15:57             ` Marek Lindner
@ 2020-05-25 17:21               ` Alexey Ermakov
  2020-05-25 17:27                 ` Marek Lindner
  0 siblings, 1 reply; 17+ messages in thread
From: Alexey Ermakov @ 2020-05-25 17:21 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

> I am surprised you still are configuring a throughput override of 100kbit/s.
> What's the idea behind this configuration ?

I have two channels between nodes (actually more, but this doesn't matter now)
1) Radio modem, connects as follows:
   NODE1(eth0)<-->modem(radio)<-->(radio)modem<-->(eth0)NODE2
eth0 interface have 100mbit/s speed and batman detects it as 100mbit/s.
radio has 145kbit/s, and actual speed of this channel is 145kbit/s

2) eth1 Ethernet channel. Speed of this channel is 100mbit/s
   NODE1(eth1)<---->(eth1)NODE2

Now make a test:
1) Set up eth0 modem channel
2) Disconnect eth1 channel
3) Turn on nodes - batman saw eth0 channel between nodes and detected
speed 100mbit/s (because speed between node and modem is 100mbit/s, as
I understand)
4) plug eth1 cable in - At this moment I expect batman switch to eth1
channel because it has real 100mbit/s speed. But batman doesn't
switch, because it detects eth0 as 100mbit/s too.
Therefore I override throughput of eth0, actually batman detects
incorrect speed on eth0.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Batman-adv packet retranslation
  2020-05-25 17:21               ` Alexey Ermakov
@ 2020-05-25 17:27                 ` Marek Lindner
  2020-05-25 17:33                   ` Alexey Ermakov
  0 siblings, 1 reply; 17+ messages in thread
From: Marek Lindner @ 2020-05-25 17:27 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

[-- Attachment #1: Type: text/plain, Size: 1459 bytes --]

On Monday, 25 May 2020 19:21:50 CEST Alexey Ermakov wrote:
> > I am surprised you still are configuring a throughput override of
> > 100kbit/s. What's the idea behind this configuration ?
> 
> I have two channels between nodes (actually more, but this doesn't matter
> now) 1) Radio modem, connects as follows:
>    NODE1(eth0)<-->modem(radio)<-->(radio)modem<-->(eth0)NODE2
> eth0 interface have 100mbit/s speed and batman detects it as 100mbit/s.
> radio has 145kbit/s, and actual speed of this channel is 145kbit/s
> 
> 2) eth1 Ethernet channel. Speed of this channel is 100mbit/s
>    NODE1(eth1)<---->(eth1)NODE2
> 
> Now make a test:
> 1) Set up eth0 modem channel
> 2) Disconnect eth1 channel
> 3) Turn on nodes - batman saw eth0 channel between nodes and detected
> speed 100mbit/s (because speed between node and modem is 100mbit/s, as
> I understand)
> 4) plug eth1 cable in - At this moment I expect batman switch to eth1
> channel because it has real 100mbit/s speed. But batman doesn't
> switch, because it detects eth0 as 100mbit/s too.
> Therefore I override throughput of eth0, actually batman detects
> incorrect speed on eth0.

If you have to configure the throughput manually why not configure the link with 
something like 5mbit/s instead of 100kbit/s ? Batman-adv does not care that 
this throughput is not exact. All that matters is provide input to the 
algorithm to allow batman-adv to make smart choices.

Kind regards,
Marek Lindner

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Batman-adv packet retranslation
  2020-05-25 17:27                 ` Marek Lindner
@ 2020-05-25 17:33                   ` Alexey Ermakov
  0 siblings, 0 replies; 17+ messages in thread
From: Alexey Ermakov @ 2020-05-25 17:33 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

> If you have to configure the throughput manually why not configure the link with
> something like 5mbit/s instead of 100kbit/s ? Batman-adv does not care that
> this throughput is not exact. All that matters is provide input to the
> algorithm to allow batman-adv to make smart choices.

Yes, today I have changed throughput to 1mbit/s and it works as expected.
I just wanted to make sure it was the right way.
Thnks to all

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2020-05-25 17:33 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-21 17:13 Batman-adv packet retranslation Alexey Ermakov
2020-05-22  6:25 ` Sven Eckelmann
2020-05-24 14:43   ` Alexey Ermakov
2020-05-24 15:29     ` Marek Lindner
2020-05-24 15:49       ` Alexey Ermakov
2020-05-24 15:55         ` Marek Lindner
2020-05-24 16:28     ` Sven Eckelmann
2020-05-24 21:53       ` Alexey Ermakov
2020-05-25  8:57         ` Marek Lindner
2020-05-25  9:23           ` Alexey Ermakov
2020-05-25 13:34         ` Marek Lindner
2020-05-25 14:59           ` Alexey Ermakov
2020-05-25 15:57             ` Marek Lindner
2020-05-25 17:21               ` Alexey Ermakov
2020-05-25 17:27                 ` Marek Lindner
2020-05-25 17:33                   ` Alexey Ermakov
2020-05-22 11:41 ` Marek Lindner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.