Hello all,
I have developed a Multicast based Data Distribution protocol and would
like to compare it with Batman's Multicast feature. I know how to enable
the multicast on the the mesh interface but is there any tool or utility
I can use to send data over the Mesh network ? scp of sftp won't work
since there is no multicast or broadcasting present in them.
I would like to compare how quick can data be disseminated in a Batman
enabled Mesh network versus the protocol that I have developed over an
adhoc network consisting of multiple Raspberry Pis.
Any hints would be suggested.
Thanks,
Shan
--
Shantanoo Desai
MSc. Communication & Information Tech.
Bremen, Germany
I came across a thread previously on this same issue with respect to openwrt.
I tried to change the routing algo following tweaking section of batman wiki as soon as loading the batman_adv module.
I am able to see BATMAN_V under availabile algorithms but available for next instance of batx. I understand it has to be done before this bat0 interface is created, but I am doing this before bringing up bat0 using ifconfig
batctl 2016.4
batman-adv 2016.4
--
Sent from my phone
On Wed, Feb 15, 2017 at 10:41:34PM +0000, Ben Hutchings wrote:
> 3.2.85-rc1 review patch. If anyone has any objections, please let me know.
>
> ------------------
>
> From: Linus Lüssing <linus.luessing(a)c0d3.blue>
>
> commit 9799c50372b23ed774791bdb87d700f1286ee8a9 upstream.
Hi Ben,
This commit was reverted in
27915aa61060fd8954a68a86657784705955088a
('batman-adv: Revert "fix splat on disabling an interface"').
Greg dropped this patch from his stable queue back then, too [0].
Regards, Linus
[0]: https://marc.info/?l=linux-kernel&m=147938417410032
From: Andreas Pape <APape(a)phoenixcontact.com>
If dat is enabled it must be made sure that only the backbone gw which has
claimed the remote destination for the ARP request answers the ARP request
directly if the MAC address is known due to the local dat table. This
prevents multiple ARP replies in a common backbone if more than one
gateway already knows the remote mac searched for in the ARP request.
Signed-off-by: Andreas Pape <apape(a)phoenixcontact.com>
Acked-by: Simon Wunderlich <sw(a)simonwunderlich.de>
[sven(a)narfation.org: fix conflicts with current version]
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
---
net/batman-adv/bridge_loop_avoidance.c | 49 ++++++++++++++++++++++++++++++++++
net/batman-adv/bridge_loop_avoidance.h | 11 ++++++++
net/batman-adv/distributed-arp-table.c | 15 +++++++++++
3 files changed, 75 insertions(+)
diff --git a/net/batman-adv/bridge_loop_avoidance.c b/net/batman-adv/bridge_loop_avoidance.c
index e7f690b..41ab4a6 100644
--- a/net/batman-adv/bridge_loop_avoidance.c
+++ b/net/batman-adv/bridge_loop_avoidance.c
@@ -2450,3 +2450,52 @@ out:
return ret;
}
+
+#ifdef CONFIG_BATMAN_ADV_DAT
+/**
+ * batadv_bla_check_claim - check if address is claimed
+ *
+ * @bat_priv: the bat priv with all the soft interface information
+ * @addr: mac address of which the claim status is checked
+ * @vid: the VLAN ID
+ *
+ * addr is checked if this address is claimed by the local device itself.
+ *
+ * Return: true if bla is disabled or the mac is claimed by the device,
+ * false if the device addr is already claimed by another gateway
+ */
+bool batadv_bla_check_claim(struct batadv_priv *bat_priv,
+ u8 *addr, unsigned short vid)
+{
+ struct batadv_bla_claim search_claim;
+ struct batadv_bla_claim *claim = NULL;
+ struct batadv_hard_iface *primary_if = NULL;
+ bool ret = true;
+
+ if (!atomic_read(&bat_priv->bridge_loop_avoidance))
+ return ret;
+
+ primary_if = batadv_primary_if_get_selected(bat_priv);
+ if (!primary_if)
+ return ret;
+
+ /* First look if the mac address is claimed */
+ ether_addr_copy(search_claim.addr, addr);
+ search_claim.vid = vid;
+
+ claim = batadv_claim_hash_find(bat_priv, &search_claim);
+
+ /* If there is a claim and we are not owner of the claim,
+ * return false.
+ */
+ if (claim) {
+ if (!batadv_compare_eth(claim->backbone_gw->orig,
+ primary_if->net_dev->dev_addr))
+ ret = false;
+ batadv_claim_put(claim);
+ }
+
+ batadv_hardif_put(primary_if);
+ return ret;
+}
+#endif
diff --git a/net/batman-adv/bridge_loop_avoidance.h b/net/batman-adv/bridge_loop_avoidance.h
index 1ae93e4..86b8740 100644
--- a/net/batman-adv/bridge_loop_avoidance.h
+++ b/net/batman-adv/bridge_loop_avoidance.h
@@ -51,6 +51,10 @@ void batadv_bla_status_update(struct net_device *net_dev);
int batadv_bla_init(struct batadv_priv *bat_priv);
void batadv_bla_free(struct batadv_priv *bat_priv);
int batadv_bla_claim_dump(struct sk_buff *msg, struct netlink_callback *cb);
+#ifdef CONFIG_BATMAN_ADV_DAT
+bool batadv_bla_check_claim(struct batadv_priv *bat_priv, u8 *addr,
+ unsigned short vid);
+#endif
#define BATADV_BLA_CRC_INIT 0
#else /* ifdef CONFIG_BATMAN_ADV_BLA */
@@ -127,6 +131,13 @@ static inline int batadv_bla_backbone_dump(struct sk_buff *msg,
return -EOPNOTSUPP;
}
+static inline
+bool batadv_bla_check_claim(struct batadv_priv *bat_priv, u8 *addr,
+ unsigned short vid)
+{
+ return true;
+}
+
#endif /* ifdef CONFIG_BATMAN_ADV_BLA */
#endif /* ifndef _NET_BATMAN_ADV_BLA_H_ */
diff --git a/net/batman-adv/distributed-arp-table.c b/net/batman-adv/distributed-arp-table.c
index e257efd..cf53404 100644
--- a/net/batman-adv/distributed-arp-table.c
+++ b/net/batman-adv/distributed-arp-table.c
@@ -43,6 +43,7 @@
#include <linux/workqueue.h>
#include <net/arp.h>
+#include "bridge_loop_avoidance.h"
#include "hard-interface.h"
#include "hash.h"
#include "log.h"
@@ -1007,6 +1008,20 @@ bool batadv_dat_snoop_outgoing_arp_request(struct batadv_priv *bat_priv,
goto out;
}
+ /* If BLA is enabled, only send ARP replies if we have claimed
+ * the destination for the ARP request or if no one else of
+ * the backbone gws belonging to our backbone has claimed the
+ * destination.
+ */
+ if (!batadv_bla_check_claim(bat_priv,
+ dat_entry->mac_addr, vid)) {
+ batadv_dbg(BATADV_DBG_DAT, bat_priv,
+ "Device %pM claimed by another backbone gw. Don't send ARP reply!",
+ dat_entry->mac_addr);
+ ret = true;
+ goto out;
+ }
+
skb_new = arp_create(ARPOP_REPLY, ETH_P_ARP, ip_src,
bat_priv->soft_iface, ip_dst, hw_src,
dat_entry->mac_addr, hw_src);
--
2.9.3
Anyone know what the throughput capacity of batman-adv is? To be more
specific, if I have gigabit ethernet interfaces in bat0 on a number of
nodes, will batman-adv cause a significant drop in throughput when
relaying traffic or cause a significant increase in latency?
What about 10G?
I'm trying to figure out the best way to handle this:
(bat0-eth1) <===> PTP Radio1 ~~~~~~~ PTP Radio2 <===> (eth1-bat0)
(eth1 is in bat0)
These radios only have 1 interface (ie, no management interface) so I
have to handle their configuration by assigning an IP to the same
interface I want to connect into batman-adv.
I considered:
bat0-bridge-eth1 <===> PTP Radio1 ~~~~~~~ PTP Radio2 <===> eth1-bridge-bat0
but this means the link isn't in the mesh
I don't know if this would work:
bat0-bridge-eth1 <===> PTP Radio1 ~~~~~~~ PTP Radio2 <===> eth1-bridge-bat0
(bat0-eth1.10)~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(bat0-eth1.10)
because I don't know if the eth1.10 vlan will be touched by the
bridge, or if it will work with bat0 this way.
The purpose here is to use higher end radios like a ubiquiti airfiber
5x to reduce hop-counts and increase capacity.
Any thoughts?
Hi,
Here is a first patchset to reintroduce aggregation support for BATMAN V, too -
as well as any other packet type with a broadcast destination.
Branch:
* https://git.open-mesh.org/batman-adv.git/shortlog/refs/heads/linus/aggregat…
Regards, Linus
PS: Requires: "batman-adv: Introduce packet type independent TVLV handler API"
(40e5c9e798ec, available on patchwork or linus/aggregation branch)
---
RFC->v1:
* removed tvlv (un)pack ctx wrappers
* fixed a crash when deaggregating ARP packets
* now compile tested down to 3.2, too (no issues found)
* now stress tested with multicast traffic of a larger, public mesh setup
Assuming MTU is great enough (1528 right? 1500+24 batman-adv+4 VLAN),
can the bat0 interface act as trunk for VLANs?
2 Nodes:
bat0:
eth1
bridge0:
eth0|bat0
device connected to node1-eth0 tags vlan20, does that traverse the
bat0 mesh and come out node2-eth0 with tag in-tact? Does it traverse
node1-eth0 at all?
I have another post on how to manage PtP radios in-line a batman-adv
link, wondering if I can configure them to a management VLAN
bat0-eth0 native vlan
bat1-eth0.10 <- radio interface vlan10 ...
and if so, how does that effect the possibility of trunking VLANs across bat0.
in theory, bat0 fully encapsulates packets entering node1-eth0 so the
VLAN is invisible 'outside' batman-adv encapsulation so bat-eth0.10
should work, but I just don't know how batman-adv handles VLANs...
thanks