public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] Questions arised while iplementing NetJSON
@ 2015-10-05 16:39 Germano Massullo
  0 siblings, 0 replies; 3+ messages in thread
From: Germano Massullo @ 2015-10-05 16:39 UTC (permalink / raw)
  To: b.a.t.m.a.n

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

I have some questions about JSONDoc created by command <<batadv-vis
--format=jsondoc>>
In jsondoc_commented file there are a few addresses that are not shown
in ip_addr file. I commented them using

    # non existing in file ip_addr

What are exactly the addresses in "clients"? What do they represent?
The procedure I followed to create the interfaces is available at [1]

Thank you for your time

[1]
https://lists.open-mesh.org/pipermail/b.a.t.m.a.n/2015-September/013700.html


[-- Attachment #2: ip_addr --]
[-- Type: text/plain, Size: 3367 bytes --]

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1532 qdisc fq_codel master bat0 state UP group default qlen 1000
    link/ether 08:00:27:83:e5:59 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.119/24 brd 192.168.1.255 scope global dynamic enp0s3
       valid_lft 42000sec preferred_lft 42000sec
    inet6 fdd7:4778:df22::d99/128 scope global dynamic 
       valid_lft 85202sec preferred_lft 85202sec
    inet6 fdd7:4778:df22:0:a00:27ff:fe83:e559/64 scope global noprefixroute dynamic 
       valid_lft 7108sec preferred_lft 1708sec
    inet6 fe80::a00:27ff:fe83:e559/64 scope link 
       valid_lft forever preferred_lft forever
3: bat0@NONE: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default 
    link/ether 2a:d7:37:c6:84:fa brd ff:ff:ff:ff:ff:ff



1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1532 qdisc fq_codel master bat0 state UP group default qlen 1000
    link/ether 08:00:27:8f:b1:c2 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.237/24 brd 192.168.1.255 scope global dynamic enp0s3
       valid_lft 41678sec preferred_lft 41678sec
    inet6 fdd7:4778:df22::a3d/128 scope global dynamic 
       valid_lft 84879sec preferred_lft 84879sec
    inet6 fdd7:4778:df22:0:a00:27ff:fe8f:b1c2/64 scope global noprefixroute dynamic 
       valid_lft 6966sec preferred_lft 1566sec
    inet6 fe80::a00:27ff:fe8f:b1c2/64 scope link 
       valid_lft forever preferred_lft forever
3: bat0@NONE: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default 
    link/ether c6:84:ae:77:3e:f1 brd ff:ff:ff:ff:ff:ff



1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1532 qdisc fq_codel master bat0 state UP group default qlen 1000
    link/ether 08:00:27:a9:8d:af brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.182/24 brd 192.168.1.255 scope global dynamic enp0s3
       valid_lft 39217sec preferred_lft 39217sec
    inet6 fdd7:4778:df22::1dd/128 scope global dynamic 
       valid_lft 86019sec preferred_lft 86019sec
    inet6 fdd7:4778:df22:0:a00:27ff:fea9:8daf/64 scope global noprefixroute dynamic 
       valid_lft 6883sec preferred_lft 1483sec
    inet6 fe80::a00:27ff:fea9:8daf/64 scope link 
       valid_lft forever preferred_lft forever
3: bat0@NONE: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default 
    link/ether a2:7f:aa:75:15:f2 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::a07f:aaff:fe75:15f2/64 scope link 
       valid_lft forever preferred_lft forever

[-- Attachment #3: jsondoc_commented --]
[-- Type: text/plain, Size: 2211 bytes --]

{
  "source_version" : "2015.1-2-g4384c2b-dirty",
  "algorithm" : 4,
  "vis" : [
    { "primary" : "08:00:27:8f:b1:c2",        # enp0s3 2nd virtual machine
      "neighbors" : [
         { "router" : "08:00:27:8f:b1:c2",    # enp0s3 2nd virtual machine
           "neighbor" : "08:00:27:a9:8d:af",  # enp0s3 3rd virtual machine
           "metric" : "1.000" },
         { "router" : "08:00:27:8f:b1:c2",    # enp0s3 2nd virtual machine
           "neighbor" : "08:00:27:83:e5:59",  # enp0s3 1st virtual machine
           "metric" : "1.000" }
      ],
      "clients" : [
        "33:33:00:00:00:01",                  # non existing in file ip_addr
        "c6:84:ae:77:3e:f1"                   # bat0 2nd virtual machine
      ]
    },
    { "primary" : "08:00:27:83:e5:59",        # enp0s3 1st virtual machine
      "neighbors" : [
         { "router" : "08:00:27:83:e5:59",    # enp0s3 1st virtual machine
           "neighbor" : "08:00:27:a9:8d:af",  # enp0s3 3rd virtual machine
           "metric" : "1.000" },
         { "router" : "08:00:27:83:e5:59",    # enp0s3 1st virtual machine
           "neighbor" : "08:00:27:8f:b1:c2",  # enp0s3 2nd virtual machine
           "metric" : "1.000" }
      ],
      "clients" : [
        "33:33:00:00:00:01",
        "2nd:d7:37:c6:84:fa"                   # bat0 1st virtual machine
      ]
    },
    { "primary" : "08:00:27:a9:8d:af",        # enp0s3 3rd virtual machine
      "neighbors" : [
         { "router" : "08:00:27:a9:8d:af",    # enp0s3 3rd virtual machine
           "neighbor" : "08:00:27:8f:b1:c2",  # enp0s3 2nd virtual machine
           "metric" : "1.000" },
         { "router" : "08:00:27:a9:8d:af",    # enp0s3 3rd virtual machine
           "neighbor" : "08:00:27:83:e5:59",  # enp0s3 1st virtual machine
           "metric" : "1.016" }
      ],
      "clients" : [
        "33:33:ff:75:15:f2",                  # non existing in file ip_addr
        "33:33:00:00:00:01",                  # non existing in file ip_addr
        "a2:7f:aa:75:15:f2",                  # bat0 3rd virtual machine
        "01:00:5e:00:00:01"                   # non existing in file ip_addr
      ]
    }
  ]
}

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

* [B.A.T.M.A.N.] Questions arised while iplementing NetJSON
@ 2015-10-08  7:25 Germano Massullo
  2015-10-08  9:07 ` Sven Eckelmann
  0 siblings, 1 reply; 3+ messages in thread
From: Germano Massullo @ 2015-10-08  7:25 UTC (permalink / raw)
  To: b.a.t.m.a.n

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

I have some questions about JSONDoc created by command <<batadv-vis
--format=jsondoc>>
In jsondoc_commented file there are a few addresses that are not shown
in ip_addr file. I commented them using

    # non existing in file ip_addr

What are exactly the addresses in "clients"? What do they represent?
The procedure I followed to create the interfaces is available at [1]

Thank you for your time

[1]
https://lists.open-mesh.org/pipermail/b.a.t.m.a.n/2015-September/013700.html



[-- Attachment #2: ip_addr --]
[-- Type: text/plain, Size: 3306 bytes --]

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1532 qdisc fq_codel master bat0 state UP group default qlen 1000
    link/ether 08:00:27:83:e5:59 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.119/24 brd 192.168.1.255 scope global dynamic enp0s3
       valid_lft 42000sec preferred_lft 42000sec
    inet6 fdd7:4778:df22::d99/128 scope global dynamic 
       valid_lft 85202sec preferred_lft 85202sec
    inet6 fdd7:4778:df22:0:a00:27ff:fe83:e559/64 scope global noprefixroute dynamic 
       valid_lft 7108sec preferred_lft 1708sec
    inet6 fe80::a00:27ff:fe83:e559/64 scope link 
       valid_lft forever preferred_lft forever
3: bat0@NONE: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default 
    link/ether 2a:d7:37:c6:84:fa brd ff:ff:ff:ff:ff:ff



1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1532 qdisc fq_codel master bat0 state UP group default qlen 1000
    link/ether 08:00:27:8f:b1:c2 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.237/24 brd 192.168.1.255 scope global dynamic enp0s3
       valid_lft 41678sec preferred_lft 41678sec
    inet6 fdd7:4778:df22::a3d/128 scope global dynamic 
       valid_lft 84879sec preferred_lft 84879sec
    inet6 fdd7:4778:df22:0:a00:27ff:fe8f:b1c2/64 scope global noprefixroute dynamic 
       valid_lft 6966sec preferred_lft 1566sec
    inet6 fe80::a00:27ff:fe8f:b1c2/64 scope link 
       valid_lft forever preferred_lft forever
3: bat0@NONE: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default 
    link/ether c6:84:ae:77:3e:f1 brd ff:ff:ff:ff:ff:ff



1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1532 qdisc fq_codel master bat0 state UP group default qlen 1000
    link/ether 08:00:27:a9:8d:af brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.182/24 brd 192.168.1.255 scope global dynamic enp0s3
       valid_lft 39217sec preferred_lft 39217sec
    inet6 fdd7:4778:df22::1dd/128 scope global dynamic 
       valid_lft 86019sec preferred_lft 86019sec
    inet6 fdd7:4778:df22:0:a00:27ff:fea9:8daf/64 scope global noprefixroute dynamic 
       valid_lft 6883sec preferred_lft 1483sec
    inet6 fe80::a00:27ff:fea9:8daf/64 scope link 
       valid_lft forever preferred_lft forever
3: bat0@NONE: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default 
    link/ether a2:7f:aa:75:15:f2 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::a07f:aaff:fe75:15f2/64 scope link 
       valid_lft forever preferred_lft forever


[-- Attachment #3: jsondoc_commented --]
[-- Type: text/plain, Size: 2162 bytes --]

{
  "source_version" : "2015.1-2-g4384c2b-dirty",
  "algorithm" : 4,
  "vis" : [
    { "primary" : "08:00:27:8f:b1:c2",        # enp0s3 2nd virtual machine
      "neighbors" : [
         { "router" : "08:00:27:8f:b1:c2",    # enp0s3 2nd virtual machine
           "neighbor" : "08:00:27:a9:8d:af",  # enp0s3 3rd virtual machine
           "metric" : "1.000" },
         { "router" : "08:00:27:8f:b1:c2",    # enp0s3 2nd virtual machine
           "neighbor" : "08:00:27:83:e5:59",  # enp0s3 1st virtual machine
           "metric" : "1.000" }
      ],
      "clients" : [
        "33:33:00:00:00:01",                  # non existing in file ip_addr
        "c6:84:ae:77:3e:f1"                   # bat0 2nd virtual machine
      ]
    },
    { "primary" : "08:00:27:83:e5:59",        # enp0s3 1st virtual machine
      "neighbors" : [
         { "router" : "08:00:27:83:e5:59",    # enp0s3 1st virtual machine
           "neighbor" : "08:00:27:a9:8d:af",  # enp0s3 3rd virtual machine
           "metric" : "1.000" },
         { "router" : "08:00:27:83:e5:59",    # enp0s3 1st virtual machine
           "neighbor" : "08:00:27:8f:b1:c2",  # enp0s3 2nd virtual machine
           "metric" : "1.000" }
      ],
      "clients" : [
        "33:33:00:00:00:01",
        "2nd:d7:37:c6:84:fa"                   # bat0 1st virtual machine
      ]
    },
    { "primary" : "08:00:27:a9:8d:af",        # enp0s3 3rd virtual machine
      "neighbors" : [
         { "router" : "08:00:27:a9:8d:af",    # enp0s3 3rd virtual machine
           "neighbor" : "08:00:27:8f:b1:c2",  # enp0s3 2nd virtual machine
           "metric" : "1.000" },
         { "router" : "08:00:27:a9:8d:af",    # enp0s3 3rd virtual machine
           "neighbor" : "08:00:27:83:e5:59",  # enp0s3 1st virtual machine
           "metric" : "1.016" }
      ],
      "clients" : [
        "33:33:ff:75:15:f2",                  # non existing in file ip_addr
        "33:33:00:00:00:01",                  # non existing in file ip_addr
        "a2:7f:aa:75:15:f2",                  # bat0 3rd virtual machine
        "01:00:5e:00:00:01"                   # non existing in file ip_addr
      ]
    }
  ]
}


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

* Re: [B.A.T.M.A.N.] Questions arised while iplementing NetJSON
  2015-10-08  7:25 [B.A.T.M.A.N.] Questions arised while iplementing NetJSON Germano Massullo
@ 2015-10-08  9:07 ` Sven Eckelmann
  0 siblings, 0 replies; 3+ messages in thread
From: Sven Eckelmann @ 2015-10-08  9:07 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: antonio

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

On Thursday 08 October 2015 09:25:55 Germano Massullo wrote:
> I have some questions about JSONDoc created by command <<batadv-vis
> --format=jsondoc>>
> In jsondoc_commented file there are a few addresses that are not shown
> in ip_addr file. I commented them using
> 
>     # non existing in file ip_addr
> 
> What are exactly the addresses in "clients"? What do they represent?
> The procedure I followed to create the interfaces is available at [1]

These are "clients" from the local translation table. It is like a switch
lookup table but in this case for "client" which are "above" the bat0
device.


---------------------------------------
|   bridge (mac 00:11:22:33:44:55)    |           
|                                     |
| bat0                        eth0    |
|   |                          |      |
----|--------------------------|-------
    |                          |
----|------                    |
| adhoc0  |                    |
----|------                   /|\
    |                        / | \
 ~~~~~~~~~~                 /  |  \
(mesh cloud)               /   |   \
 ~~~~~~~~~~           -----    |    -----------
                     /         |               \
 --------------------    --------------------   --------------------
 | device 1         |    | device 2         |   | device 3         |
 | mac:             |    | mac:             |   | mac:             |
 | 02:ba:de:af:fe:01|    | 02:ba:de:af:fe:02|   | 02:ba:de:af:fe:03|
 --------------------    --------------------   --------------------

So the device below bat0 is adhoc0. The devices "above" bat0 (from which it
gets non-batman-adv traffic) are the bridge and device1, device2, device3.

So the clients should contain:

 * 00:11:22:33:44:55
 * 02:ba:de:af:fe:01
 * 02:ba:de:af:fe:02
 * 02:ba:de:af:fe:03

You can check this also with the command: batctl tl

There is also a global translation table which you can get via: batctl tg.

But now you may say: "hey, I don't use a bridge on top of bat0 - there are no 
other devices above bat0". That may be correct but batman-adv can only find 
these devices by looking at packets coming from "above" and just has to accept 
everything which is coming from there (even forged stuff). But don't forget 
the other source of addresses in there is the multicast table (otherwise the 
multicast optimization from Linus doesn't work). So I would guess that this is 
the result of the other entries.

I think Antonio and Linus can help you to understand it better when you give 
them the output of `batctl tl` + `batctl tg` + `ip maddr show dev bat0`. But 
here is my interpretation:

33:33:00:00:00:01 - (mcast) IPv6 neighbor discovery protocol
33:33:ff:xx:xx:xx - (mcast) some other IPv6 multicast
01:00:5e:00:00:01 - (mcast) IP multicast

Kind regards,
	Sven

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

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

end of thread, other threads:[~2015-10-08  9:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-08  7:25 [B.A.T.M.A.N.] Questions arised while iplementing NetJSON Germano Massullo
2015-10-08  9:07 ` Sven Eckelmann
  -- strict thread matches above, loose matches on Subject: below --
2015-10-05 16:39 Germano Massullo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox