From: Andrew Lunn <andrew@lunn.ch>
To: The list for a Better Approach To Mobile Ad-hoc Networking
<b.a.t.m.a.n@lists.open-mesh.org>
Cc: Mitar <mitar@tnode.com>
Subject: Re: [B.A.T.M.A.N.] Migration to Batman
Date: Fri, 13 Apr 2012 07:59:47 +0200 [thread overview]
Message-ID: <20120413055947.GH7664@lunn.ch> (raw)
In-Reply-To: <CAKLmikNtFyx9tDnOAzkMuEmSOOnhVHaLvKpf8q68Fd8qes2XYA@mail.gmail.com>
On Thu, Apr 12, 2012 at 11:08:48PM +0200, Mitar wrote:
> Hi!
>
> On Thu, Apr 12, 2012 at 5:37 PM, Jernej Kos <k@jst.sm> wrote:
> > Since from layer 3, the batman mesh looks just like a big LAN, any node
> > could simply add a route saying "prefix A via gateway B dev bat0" where
> > B is a mesh node known to batman via its L2 identifier, no?
>
> So I have almost convinced Kostko that we could switch to Batman, but
> he does not want to run multiple routing daemons on nodes. So could
> Batman support announcing also L3 prefixes?
A few points here:
1) You need, in your head, a clear separation between L3 and L2. Your
L3 gateways need routes. Your L2 only nodes don't need routes,
except the default route, to the gateway out of the current L2
mesh.
Just think about plain old Ethernet networking, and you won't go
too far wrong. In an Ethernet based network, you have maybe 2 nodes
which are gateways, and run L3 routing protocols. All the rest of
the devices are L2 only and have a default route pointing it one of
the two gateways out of the Ethernet to the rest of the world.
2) BATMAN is not a daemon. Its a kernel module. Hence it cannot play
around with routes, even if it wanted to. Also, adding/removing
routes is policy, and the Linux/Unix view of the world is that user
space is responsible for deciding policy.
> For example, that in the
> node configuration you could define that that node (let say it has IP
> 10.10.10.10) should announce also some L3 subnet. Like
> 192.168.42.0/24. And when that node would be reachable from other
> node, that other node would run:
>
> ip route add prefix 192.168.42.0/24 via gateway 10.10.10.10 dev bat0
>
> Doable? Because to run additional routing daemon just to rediscover
> which nodes are around and announce things ... when Batman already
> knows all this ...
Nope. BATMAN has no idea. That is a L3 address. BATMAN is L2, it only
knows L2 Addresses. All it knows is that MAC address 02:01:02:03:04:05
can be reached by sending packets towards the next hop
02:06:07:08:09:0A.
Here is a rather boring example of that BATMAN knows, from a real
device:
root@tmn4:~# batctl o
[B.A.T.M.A.N. adv 2012.0.0, MainIF/MAC: br0/00:80:48:6b:9d:36 (bat0)]
Originator last-seen (#/255) Nexthop [outgoingIF]: Potential nexthops ...
00:80:48:6b:9d:35 0.084s (255) 00:80:48:6b:9d:35 [ wlan0]: 00:80:48:6b:9d:3a (166) 00:80:48:6b:9d:35 (255)
00:80:48:6b:9d:3a 0.352s (216) 00:80:48:6b:9d:35 [ wlan0]: 00:80:48:6b:9d:35 (216) 00:80:48:6b:9d:3a (181)
So:
In order to reach 00:80:48:6b:9d:35, send packets to 00:80:48:6b:9d:35
In order to reach 00:80:48:6b:9d:3a, send packets to 00:80:48:6b:9d:35
This comes back to:
You need, in your head, a clear separation between L3 and L2.
Andrew
next prev parent reply other threads:[~2012-04-13 5:59 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-12 10:26 [B.A.T.M.A.N.] Migration to Batman Mitar
2012-04-12 10:36 ` Gioacchino Mazzurco
2012-04-12 12:00 ` Antonio Quartulli
2012-04-12 15:13 ` Mitar
2012-04-12 15:36 ` Andrew Lunn
2012-04-12 17:12 ` Mitar
2012-04-12 18:12 ` Andrew Lunn
2012-04-12 19:49 ` 3zl Trizonelabs
[not found] ` <CAOaDhSRTgejL5tzAnAx6wBso1sjWn_7bVuT6P1_C1qcVu25McQ@mail.gmail.com>
2012-04-12 15:37 ` Jernej Kos
2012-04-12 17:19 ` Mitar
2012-04-12 21:08 ` Mitar
2012-04-12 21:15 ` Gioacchino Mazzurco
2012-04-13 5:59 ` Andrew Lunn [this message]
2012-04-13 7:58 ` Mitar
2012-04-13 8:15 ` Andrew Lunn
2012-04-13 8:41 ` Mitar
2012-04-13 9:24 ` Andrew Lunn
2012-04-13 13:24 ` Mitar
2012-04-14 2:26 ` Nicolás Echániz
2012-04-14 9:06 ` Mitar
2012-04-16 10:25 ` Mitar
2012-04-16 10:37 ` Marek Lindner
2012-04-16 10:46 ` Mitar
2012-04-16 10:58 ` Marek Lindner
2012-04-16 12:32 ` Mitar
2012-04-16 12:40 ` Antonio Quartulli
2012-04-16 13:59 ` Mitar
2012-04-16 18:28 ` Marek Lindner
2012-04-16 18:30 ` Marek Lindner
2012-04-16 11:03 ` Antonio Quartulli
2012-04-16 12:37 ` Mitar
2012-04-12 17:10 ` Mitar
2012-04-12 22:13 ` Marek Lindner
2012-04-12 17:05 ` Mitar
2012-04-12 22:17 ` Marek Lindner
2012-04-13 6:22 ` Antonio Quartulli
2012-04-13 7:29 ` Mitar
2012-04-13 7:43 ` Andrew Lunn
2012-04-13 7:51 ` Mitar
2012-04-13 8:26 ` Andrew Lunn
2012-04-13 8:35 ` Mitar
2012-04-13 8:52 ` Christian Huldt
2012-04-13 13:32 ` Mitar
2012-04-13 13:50 ` Andrew Lunn
2012-04-13 13:53 ` Mitar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120413055947.GH7664@lunn.ch \
--to=andrew@lunn.ch \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=mitar@tnode.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox