b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
* Re: [B.A.T.M.A.N.] [OpenWrt-Devel] [PATCH netifd] bridge: allow enabling or disabling the multicast querier independently of IGMP snooping
       [not found] <b4fac27152a34dd39d59ca0b83de0157a8f7805f.1422326992.git.mschiffer@universe-factory.net>
@ 2015-01-27 10:48 ` Gioacchino Mazzurco
  2015-01-27 11:43   ` Matthias Schiffer
  2015-01-30  8:14   ` Linus Lüssing
  0 siblings, 2 replies; 4+ messages in thread
From: Gioacchino Mazzurco @ 2015-01-27 10:48 UTC (permalink / raw)
  To: 'b.a.t.m.a.n@lists.open-mesh.org'

Reading this mail seems that who installa batman-adv nodes should do this 
setting manually, doesn't batman-adv know/(can estimate) who is the goode node 
were to put the querier?

What happen if we have the querier on every node?

Thanks!

On Tuesday, January 27, 2015 03:49:52 AM Matthias Schiffer wrote:
> In larger networks, especially big batman-adv meshes, it may be desirable to
> enable IGMP snooping on every bridge without enabling the multicast querier
> to specifically put the querier on a well-connected node.
> 
> This patch adds a new UCI option 'multicast_querier' for bridges which
> allows this. The default is still the value of the 'igmp_snooping' option
> to maintain backwards compatiblity.
> 
> Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
> ---
>  bridge.c       | 8 +++++++-
>  system-linux.c | 2 +-
>  system.h       | 1 +
>  3 files changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/bridge.c b/bridge.c
> index f8478ad..f7dbf61 100644
> --- a/bridge.c
> +++ b/bridge.c
> @@ -32,6 +32,7 @@ enum {
>  	BRIDGE_ATTR_HELLO_TIME,
>  	BRIDGE_ATTR_MAX_AGE,
>  	BRIDGE_ATTR_BRIDGE_EMPTY,
> +	BRIDGE_ATTR_MULTICAST_QUERIER,
>  	__BRIDGE_ATTR_MAX
>  };
> 
> @@ -45,6 +46,7 @@ static const struct blobmsg_policy
> bridge_attrs[__BRIDGE_ATTR_MAX] = { [BRIDGE_ATTR_MAX_AGE] = { "max_age",
> BLOBMSG_TYPE_INT32 },
>  	[BRIDGE_ATTR_IGMP_SNOOP] = { "igmp_snooping", BLOBMSG_TYPE_BOOL },
>  	[BRIDGE_ATTR_BRIDGE_EMPTY] = { "bridge_empty", BLOBMSG_TYPE_BOOL },
> +	[BRIDGE_ATTR_MULTICAST_QUERIER] = { "multicast_querier", BLOBMSG_TYPE_BOOL
> }, };
> 
>  static const struct uci_blob_param_info bridge_attr_info[__BRIDGE_ATTR_MAX]
> = { @@ -547,6 +549,7 @@ bridge_apply_settings(struct bridge_state *bst,
> struct blob_attr **tb) cfg->stp = false;
>  	cfg->forward_delay = 2;
>  	cfg->igmp_snoop = true;
> +	cfg->multicast_querier = true;
>  	cfg->bridge_empty = false;
>  	cfg->priority = 0x7FFF;
> 
> @@ -560,7 +563,10 @@ bridge_apply_settings(struct bridge_state *bst, struct
> blob_attr **tb) cfg->priority = blobmsg_get_u32(cur);
> 
>  	if ((cur = tb[BRIDGE_ATTR_IGMP_SNOOP]))
> -		cfg->igmp_snoop = blobmsg_get_bool(cur);
> +		cfg->multicast_querier = cfg->igmp_snoop = blobmsg_get_bool(cur);
> +
> +	if ((cur = tb[BRIDGE_ATTR_MULTICAST_QUERIER]))
> +		cfg->multicast_querier = blobmsg_get_bool(cur);
> 
>  	if ((cur = tb[BRIDGE_ATTR_AGEING_TIME])) {
>  		cfg->ageing_time = blobmsg_get_u32(cur);
> diff --git a/system-linux.c b/system-linux.c
> index 4737fa6..ef90880 100644
> --- a/system-linux.c
> +++ b/system-linux.c
> @@ -772,7 +772,7 @@ int system_bridge_addbr(struct device *bridge, struct
> bridge_config *cfg) bridge->ifname, cfg->igmp_snoop ? "1" : "0");
> 
>  	
system_set_dev_sysctl("/sys/devices/virtual/net/%s/bridge/multicast_querie
> r", -		bridge->ifname, cfg->igmp_snoop ? "1" : "0");
> +		bridge->ifname, cfg->multicast_querier ? "1" : "0");
> 
>  	args[0] = BRCTL_SET_BRIDGE_PRIORITY;
>  	args[1] = cfg->priority;
> diff --git a/system.h b/system.h
> index 9a2326b..94e0dd9 100644
> --- a/system.h
> +++ b/system.h
> @@ -50,6 +50,7 @@ struct bridge_config {
>  	enum bridge_opt flags;
>  	bool stp;
>  	bool igmp_snoop;
> +	bool multicast_querier;
>  	unsigned short priority;
>  	int forward_delay;
>  	bool bridge_empty;


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

* Re: [B.A.T.M.A.N.] [OpenWrt-Devel] [PATCH netifd] bridge: allow enabling or disabling the multicast querier independently of IGMP snooping
  2015-01-27 10:48 ` [B.A.T.M.A.N.] [OpenWrt-Devel] [PATCH netifd] bridge: allow enabling or disabling the multicast querier independently of IGMP snooping Gioacchino Mazzurco
@ 2015-01-27 11:43   ` Matthias Schiffer
  2015-01-30  8:14   ` Linus Lüssing
  1 sibling, 0 replies; 4+ messages in thread
From: Matthias Schiffer @ 2015-01-27 11:43 UTC (permalink / raw)
  To: Gioacchino Mazzurco; +Cc: 'b.a.t.m.a.n@lists.open-mesh.org'

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

Regarding IGMP/MLD, batman-adv will just provide an overlay ethernet
layer, on which the normal rules of RFC2710 / RFC3376 will be used to
elect the querier: the router with the lowest IP address that has the
querier feature enabled becomes the querier.

Linus Lüssing, who developled the multicast optimization feature for
batman-adv, suggested to only enable IGMP/MLD snooping, but not the
querier, on normal mesh nodes, which is why I wrote this patch.


On 01/27/2015 11:48 AM, Gioacchino Mazzurco wrote:
> Reading this mail seems that who installa batman-adv nodes should do this 
> setting manually, doesn't batman-adv know/(can estimate) who is the goode node 
> were to put the querier?
> 
> What happen if we have the querier on every node?
> 
> Thanks!
> 
> On Tuesday, January 27, 2015 03:49:52 AM Matthias Schiffer wrote:
>> In larger networks, especially big batman-adv meshes, it may be desirable to
>> enable IGMP snooping on every bridge without enabling the multicast querier
>> to specifically put the querier on a well-connected node.
>>
>> This patch adds a new UCI option 'multicast_querier' for bridges which
>> allows this. The default is still the value of the 'igmp_snooping' option
>> to maintain backwards compatiblity.
>>
>> Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
>> ---
>>  bridge.c       | 8 +++++++-
>>  system-linux.c | 2 +-
>>  system.h       | 1 +
>>  3 files changed, 9 insertions(+), 2 deletions(-)
>>
>> diff --git a/bridge.c b/bridge.c
>> index f8478ad..f7dbf61 100644
>> --- a/bridge.c
>> +++ b/bridge.c
>> @@ -32,6 +32,7 @@ enum {
>>  	BRIDGE_ATTR_HELLO_TIME,
>>  	BRIDGE_ATTR_MAX_AGE,
>>  	BRIDGE_ATTR_BRIDGE_EMPTY,
>> +	BRIDGE_ATTR_MULTICAST_QUERIER,
>>  	__BRIDGE_ATTR_MAX
>>  };
>>
>> @@ -45,6 +46,7 @@ static const struct blobmsg_policy
>> bridge_attrs[__BRIDGE_ATTR_MAX] = { [BRIDGE_ATTR_MAX_AGE] = { "max_age",
>> BLOBMSG_TYPE_INT32 },
>>  	[BRIDGE_ATTR_IGMP_SNOOP] = { "igmp_snooping", BLOBMSG_TYPE_BOOL },
>>  	[BRIDGE_ATTR_BRIDGE_EMPTY] = { "bridge_empty", BLOBMSG_TYPE_BOOL },
>> +	[BRIDGE_ATTR_MULTICAST_QUERIER] = { "multicast_querier", BLOBMSG_TYPE_BOOL
>> }, };
>>
>>  static const struct uci_blob_param_info bridge_attr_info[__BRIDGE_ATTR_MAX]
>> = { @@ -547,6 +549,7 @@ bridge_apply_settings(struct bridge_state *bst,
>> struct blob_attr **tb) cfg->stp = false;
>>  	cfg->forward_delay = 2;
>>  	cfg->igmp_snoop = true;
>> +	cfg->multicast_querier = true;
>>  	cfg->bridge_empty = false;
>>  	cfg->priority = 0x7FFF;
>>
>> @@ -560,7 +563,10 @@ bridge_apply_settings(struct bridge_state *bst, struct
>> blob_attr **tb) cfg->priority = blobmsg_get_u32(cur);
>>
>>  	if ((cur = tb[BRIDGE_ATTR_IGMP_SNOOP]))
>> -		cfg->igmp_snoop = blobmsg_get_bool(cur);
>> +		cfg->multicast_querier = cfg->igmp_snoop = blobmsg_get_bool(cur);
>> +
>> +	if ((cur = tb[BRIDGE_ATTR_MULTICAST_QUERIER]))
>> +		cfg->multicast_querier = blobmsg_get_bool(cur);
>>
>>  	if ((cur = tb[BRIDGE_ATTR_AGEING_TIME])) {
>>  		cfg->ageing_time = blobmsg_get_u32(cur);
>> diff --git a/system-linux.c b/system-linux.c
>> index 4737fa6..ef90880 100644
>> --- a/system-linux.c
>> +++ b/system-linux.c
>> @@ -772,7 +772,7 @@ int system_bridge_addbr(struct device *bridge, struct
>> bridge_config *cfg) bridge->ifname, cfg->igmp_snoop ? "1" : "0");
>>
>>  	
> system_set_dev_sysctl("/sys/devices/virtual/net/%s/bridge/multicast_querie
>> r", -		bridge->ifname, cfg->igmp_snoop ? "1" : "0");
>> +		bridge->ifname, cfg->multicast_querier ? "1" : "0");
>>
>>  	args[0] = BRCTL_SET_BRIDGE_PRIORITY;
>>  	args[1] = cfg->priority;
>> diff --git a/system.h b/system.h
>> index 9a2326b..94e0dd9 100644
>> --- a/system.h
>> +++ b/system.h
>> @@ -50,6 +50,7 @@ struct bridge_config {
>>  	enum bridge_opt flags;
>>  	bool stp;
>>  	bool igmp_snoop;
>> +	bool multicast_querier;
>>  	unsigned short priority;
>>  	int forward_delay;
>>  	bool bridge_empty;
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [B.A.T.M.A.N.] [OpenWrt-Devel] [PATCH netifd] bridge: allow enabling or disabling the multicast querier independently of IGMP snooping
  2015-01-27 10:48 ` [B.A.T.M.A.N.] [OpenWrt-Devel] [PATCH netifd] bridge: allow enabling or disabling the multicast querier independently of IGMP snooping Gioacchino Mazzurco
  2015-01-27 11:43   ` Matthias Schiffer
@ 2015-01-30  8:14   ` Linus Lüssing
  2015-01-30  9:30     ` Gioacchino Mazzurco
  1 sibling, 1 reply; 4+ messages in thread
From: Linus Lüssing @ 2015-01-30  8:14 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

On Tue, Jan 27, 2015 at 11:48:09AM +0100, Gioacchino Mazzurco wrote:
> Reading this mail seems that who installa batman-adv nodes should do this 
> setting manually, doesn't batman-adv know/(can estimate) who is the goode node 
> were to put the querier?
> 

Like Matthias said, the selection process is an "upper layer
thing" (from the batman-adv point of view). The querier with
the lowest IP address will become the selected querier as
specified by the IGMP/MLD RFCs.

> What happen if we have the querier on every node?

To be honest, I'm not 100% sure. For what is implemented so far,
it might actually work out with no downsides. If the node/querier
with the lowest IP happens to be behind a bad, lossy wifi link and
two consecutive IGMP/MLD query messages from this selected querier
get lost then one of the other potential queriers should take over
within a five seconds window.

This should work out well if you have a planned, structured mesh
network with a few dozen nodes where you made sure that each node
is well connected to the rest of the mesh.

If you're having a mesh network with some hundreds of nodes
with potentially many behind bad wifi links, I'd get a little
nervous... it'd be like running your IPv6 network (IPv6 relies on
multicast) on a large, wobbly jelly.


My general suggestion at the moment is, to only have queriers
enabled on a few well- and redundantly connected nodes close to
the center of the mesh if you want to use the bridge multicast
snooping feature in your mesh network).

Cheers, Linus


PS: batman-adv has no multicast optimizations for bridges or
traffic other than link-local yet, btw. Still, queriers behind
unreliable wifi links could be an issue even with multicast
optimzations disabled in batman-adv and multicast snooping enabled
in the bridge.

PPS: Have spent some time thinking about implementing an IGMP/MLD
proxy in the bridge and/or batman-adv lately. It's just that so
many complicated workarounds have piled up thanks to the old
(and in my opinion broken...) MLDv1/IGMPv1/IGMPv2 (MLDv2+IGMPv3
are cool though) which we didn't all notice before implementing
and testing things. Now I'd happily trade that for some "layer
violations". And enterprise switches are doing just that, too,
afaik (aggregating IGMP/MLD reports and stuff like that for
instance).

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

* Re: [B.A.T.M.A.N.] [OpenWrt-Devel] [PATCH netifd] bridge: allow enabling or disabling the multicast querier independently of IGMP snooping
  2015-01-30  8:14   ` Linus Lüssing
@ 2015-01-30  9:30     ` Gioacchino Mazzurco
  0 siblings, 0 replies; 4+ messages in thread
From: Gioacchino Mazzurco @ 2015-01-30  9:30 UTC (permalink / raw)
  To: b.a.t.m.a.n

Thanks for the info :)

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

end of thread, other threads:[~2015-01-30  9:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <b4fac27152a34dd39d59ca0b83de0157a8f7805f.1422326992.git.mschiffer@universe-factory.net>
2015-01-27 10:48 ` [B.A.T.M.A.N.] [OpenWrt-Devel] [PATCH netifd] bridge: allow enabling or disabling the multicast querier independently of IGMP snooping Gioacchino Mazzurco
2015-01-27 11:43   ` Matthias Schiffer
2015-01-30  8:14   ` Linus Lüssing
2015-01-30  9:30     ` Gioacchino Mazzurco

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).