[SOLVED] IGMP Snooping on Switch Ports

I am using a Dir-860l in my home setup. If I add the option igmp_snooping '1' to my bridge interface in /etc/config/network I can see that the multicast traffic (my IPTV) is no longer hitting my WiFi network, which is good. However, IGMP snooping does not seem to be working on my individual ports on the switch. I am still seeing a large amount of multicast traffic on all devices that are connected to the ethernet switch that is associated to that software bridge in Lede. I had hoped the multicast traffic would only flow to the port on which the TV is connected.

Does anyone happen to know how I can make sure that IGMP snooping is also working on an individual per-port basis? I have tried installing the kmod-bridge package as per the OpenWRT documentation, but that did not fix the issue either. The following command also looks fine as far as I can tell:

root@LEDE:~# cat /sys/devices/virtual/net/br-lan/bridge/multicast_snooping 
1

Try

jeff@office:~$ swconfig list
Found: switch0 - ag71xx-mdio.0
jeff@office:~$ swconfig dev switch0 show
Global attributes:
	enable_vlan: 1
	enable_mirror_rx: 0
	enable_mirror_tx: 0
[...]

(Yes, that's an OpenWRT box with a non-priveleged user)

Thank you very much for trying to help me :slight_smile: This is the output of the requested commands:

root@LEDE:~# swconfig list
Found: switch0 - mt7530
root@LEDE:~# swconfig dev switch0 show
Global attributes:
	enable_vlan: 1
	mib: Switch MIB counters
PPE_AC_BCNT0: 0
PPE_AC_PCNT0: 0
PPE_AC_BCNT63: 0
PPE_AC_PCNT63: 0
PPE_MTR_CNT0: 0
PPE_MTR_CNT63: 0
GDM1_TX_GBCNT: 0
GDM1_TX_GPCNT: 0
GDM1_TX_SKIPCNT: 0
GDM1_TX_COLCNT: 0
GDM1_RX_GBCNT1: 0
GDM1_RX_GPCNT1: 0
GDM1_RX_OERCNT: 0
GDM1_RX_FERCNT: 0
GDM1_RX_SERCNT: 0
GDM1_RX_LERCNT: 0
GDM1_RX_CERCNT: 0
GDM1_RX_FCCNT: 0
GDM2_TX_GBCNT: 0
GDM2_TX_GPCNT: 0
GDM2_TX_SKIPCNT: 0
GDM2_TX_COLCNT: 0
GDM2_RX_GBCNT: 0
GDM2_RX_GPCNT: 0
GDM2_RX_OERCNT: 0
GDM2_RX_FERCNT: 0
GDM2_RX_SERCNT: 0
GDM2_RX_LERCNT: 0
GDM2_RX_CERCNT: 0
GDM2_RX_FCCNT: 0

Port 0:
	mib: Port 0 MIB counters
TxDrop     : 0
TxCRC      : 0
TxUni      : 295121519
TxMulti    : 33123
TxBroad    : 27
TxCollision: 0
TxSingleCol: 0
TxMultiCol : 0
TxDefer    : 0
TxLateCol  : 0
TxExcCol   : 0
TxPause    : 0
Tx64Byte   : 3358668
Tx65Byte   : 226927009
Tx128Byte  : 44007030
Tx256Byte  : 3930774
Tx512Byte  : 2177519
Tx1024Byte : 14753669
TxByte     : 50169262405
RxDrop     : 153524
RxFiltered : 0
RxUni      : 600430773
RxMulti    : 105103292
RxBroad    : 0
RxAlignErr : 0
RxCRC      : 391
RxUnderSize: 0
RxFragment : 25
RxOverSize : 0
RxJabber   : 0
RxPause    : 0
Rx64Byte   : 3292137
Rx65Byte   : 61082303
Rx128Byte  : 55546064
Rx256Byte  : 21088913
Rx512Byte  : 5772813
Rx1024Byte : 558752226
RxByte     : 848985694718
RxCtrlDrop : 0
RxIngDrop  : 153524
RxARLDrop  : 0

	pvid: 0
	link: port:0 link:up speed:1000baseT full-duplex 
Port 1:
	mib: Port 1 MIB counters
TxDrop     : 0
TxCRC      : 0
TxUni      : 8889287
TxMulti    : 105642169
TxBroad    : 157920
TxCollision: 0
TxSingleCol: 0
TxMultiCol : 0
TxDefer    : 0
TxLateCol  : 0
TxExcCol   : 0
TxPause    : 102
Tx64Byte   : 197122
Tx65Byte   : 467658
Tx128Byte  : 427242
Tx256Byte  : 13038401
Tx512Byte  : 728433
Tx1024Byte : 99830622
TxByte     : 143254205589
RxDrop     : 0
RxFiltered : 0
RxUni      : 1388380
RxMulti    : 3842945
RxBroad    : 1235
RxAlignErr : 0
RxCRC      : 0
RxUnderSize: 0
RxFragment : 0
RxOverSize : 0
RxJabber   : 0
RxPause    : 0
Rx64Byte   : 161121
Rx65Byte   : 1099762
Rx128Byte  : 36714
Rx256Byte  : 3878107
Rx512Byte  : 12994
Rx1024Byte : 43862
RxByte     : 1998447489
RxCtrlDrop : 0
RxIngDrop  : 0
RxARLDrop  : 0

	pvid: 1
	link: port:1 link:up speed:100baseT full-duplex 
Port 2:
	mib: Port 2 MIB counters
TxDrop     : 0
TxCRC      : 0
TxUni      : 339481164
TxMulti    : 44241243
TxBroad    : 63565
TxCollision: 0
TxSingleCol: 0
TxMultiCol : 0
TxDefer    : 0
TxLateCol  : 0
TxExcCol   : 0
TxPause    : 10363
Tx64Byte   : 3031034
Tx65Byte   : 5271608
Tx128Byte  : 3300933
Tx256Byte  : 5204594
Tx512Byte  : 2205423
Tx1024Byte : 364782743
TxByte     : 543124949762
RxDrop     : 0
RxFiltered : 0
RxUni      : 271608362
RxMulti    : 78152
RxBroad    : 43652
RxAlignErr : 0
RxCRC      : 0
RxUnderSize: 0
RxFragment : 0
RxOverSize : 0
RxJabber   : 0
RxPause    : 1238
Rx64Byte   : 61264570
Rx65Byte   : 56111552
Rx128Byte  : 8490935
Rx256Byte  : 1412812
Rx512Byte  : 1738764
Rx1024Byte : 142712771
RxByte     : 227401386857
RxCtrlDrop : 0
RxIngDrop  : 0
RxARLDrop  : 0

	pvid: 1
	link: port:2 link:down
Port 3:
	mib: Port 3 MIB counters
TxDrop     : 0
TxCRC      : 0
TxUni      : 44378757
TxMulti    : 110220271
TxBroad    : 194200
TxCollision: 0
TxSingleCol: 0
TxMultiCol : 0
TxDefer    : 0
TxLateCol  : 0
TxExcCol   : 0
TxPause    : 28
Tx64Byte   : 319272
Tx65Byte   : 20776140
Tx128Byte  : 21379298
Tx256Byte  : 18098248
Tx512Byte  : 1272799
Tx1024Byte : 92947499
TxByte     : 140609032077
RxDrop     : 0
RxFiltered : 24
RxUni      : 45589018
RxMulti    : 114702
RxBroad    : 347
RxAlignErr : 0
RxCRC      : 0
RxUnderSize: 0
RxFragment : 0
RxOverSize : 0
RxJabber   : 0
RxPause    : 2
Rx64Byte   : 96497
Rx65Byte   : 24239907
Rx128Byte  : 18914822
Rx256Byte  : 1091075
Rx512Byte  : 421318
Rx1024Byte : 940450
RxByte     : 6434632284
RxCtrlDrop : 0
RxIngDrop  : 0
RxARLDrop  : 0

	pvid: 1
	link: port:3 link:up speed:100baseT full-duplex 
Port 4:
	mib: Port 4 MIB counters
TxDrop     : 0
TxCRC      : 0
TxUni      : 45205330
TxMulti    : 110220476
TxBroad    : 194199
TxCollision: 0
TxSingleCol: 0
TxMultiCol : 0
TxDefer    : 0
TxLateCol  : 0
TxExcCol   : 0
TxPause    : 80
Tx64Byte   : 317278
Tx65Byte   : 21464214
Tx128Byte  : 21603915
Tx256Byte  : 18119201
Tx512Byte  : 1266806
Tx1024Byte : 92848671
TxByte     : 140528041584
RxDrop     : 0
RxFiltered : 23
RxUni      : 46494342
RxMulti    : 114460
RxBroad    : 347
RxAlignErr : 0
RxCRC      : 0
RxUnderSize: 0
RxFragment : 0
RxOverSize : 0
RxJabber   : 0
RxPause    : 6
Rx64Byte   : 97105
Rx65Byte   : 24510637
Rx128Byte  : 19570758
Rx256Byte  : 1017944
Rx512Byte  : 435304
Rx1024Byte : 977407
RxByte     : 6552428341
RxCtrlDrop : 0
RxIngDrop  : 0
RxARLDrop  : 0

	pvid: 1
	link: port:4 link:up speed:100baseT full-duplex 
Port 5:
	mib: Port 5 MIB counters
TxDrop     : 0
TxCRC      : 0
TxUni      : 0
TxMulti    : 0
TxBroad    : 0
TxCollision: 0
TxSingleCol: 0
TxMultiCol : 0
TxDefer    : 0
TxLateCol  : 0
TxExcCol   : 0
TxPause    : 0
Tx64Byte   : 0
Tx65Byte   : 0
Tx128Byte  : 0
Tx256Byte  : 0
Tx512Byte  : 0
Tx1024Byte : 0
TxByte     : 0
RxDrop     : 0
RxFiltered : 0
RxUni      : 0
RxMulti    : 0
RxBroad    : 0
RxAlignErr : 0
RxCRC      : 0
RxUnderSize: 0
RxFragment : 0
RxOverSize : 0
RxJabber   : 0
RxPause    : 0
Rx64Byte   : 0
Rx65Byte   : 0
Rx128Byte  : 0
Rx256Byte  : 0
Rx512Byte  : 0
Rx1024Byte : 0
RxByte     : 0
RxCtrlDrop : 0
RxIngDrop  : 0
RxARLDrop  : 0

	pvid: 0
	link: port:5 link:down
Port 6:
	mib: Port 6 MIB counters
TxDrop     : 0
TxCRC      : 0
TxUni      : 965346571
TxMulti    : 109241938
TxBroad    : 45566
TxCollision: 0
TxSingleCol: 0
TxMultiCol : 0
TxDefer    : 0
TxLateCol  : 0
TxExcCol   : 0
TxPause    : 75493
Tx64Byte   : 3367631
Tx65Byte   : 228510459
Tx128Byte  : 102380572
Tx256Byte  : 28710371
Tx512Byte  : 8390263
Tx1024Byte : 703350272
TxByte     : 1092706586481
RxDrop     : 0
RxFiltered : 4507
RxUni      : 733052180
RxMulti    : 106230075
RxBroad    : 167773
RxAlignErr : 0
RxCRC      : 0
RxUnderSize: 0
RxFragment : 0
RxOverSize : 0
RxJabber   : 0
RxPause    : 77270
Rx64Byte   : 6869698
Rx65Byte   : 274070260
Rx128Byte  : 90046419
Rx256Byte  : 20832991
Rx512Byte  : 6085821
Rx1024Byte : 441622110
RxByte     : 696048571646
RxCtrlDrop : 0
RxIngDrop  : 0
RxARLDrop  : 0

	pvid: 0
	link: port:6 link:up speed:1000baseT full-duplex 
Port 7:
	mib: Port 7 MIB counters
TxDrop     : 0
TxCRC      : 0
TxUni      : 0
TxMulti    : 0
TxBroad    : 0
TxCollision: 0
TxSingleCol: 0
TxMultiCol : 0
TxDefer    : 0
TxLateCol  : 0
TxExcCol   : 0
TxPause    : 0
Tx64Byte   : 0
Tx65Byte   : 0
Tx128Byte  : 0
Tx256Byte  : 0
Tx512Byte  : 0
Tx1024Byte : 0
TxByte     : 0
RxDrop     : 0
RxFiltered : 0
RxUni      : 0
RxMulti    : 0
RxBroad    : 0
RxAlignErr : 0
RxCRC      : 0
RxUnderSize: 0
RxFragment : 0
RxOverSize : 0
RxJabber   : 0
RxPause    : 0
Rx64Byte   : 0
Rx65Byte   : 0
Rx128Byte  : 0
Rx256Byte  : 0
Rx512Byte  : 0
Rx1024Byte : 0
RxByte     : 0
RxCtrlDrop : 0
RxIngDrop  : 0
RxARLDrop  : 0

	pvid: 0
	link: port:7 link:down
VLAN 1:
	vid: 0
	ports: 1 2 3 4 6t 
VLAN 2:
	vid: 0
	ports: 6t 
VLAN 4:
	vid: 0
	ports: 0t 6t 
VLAN 6:
	vid: 0
	ports: 0t 6t

For what it's worth, I am running Lede 17.04, which is missing this switch related commit. That commit fixes VLAN functionality for this particular switch. Not sure whether that is related to igmp snooping at all, for completeness sake I am just mentioning this :slight_smile: : https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=623cdc4ffeef8e95ba7ab02288c044b2186d121a

I had met this before.
The solution is to assign different vlans to each physical lan port ( then bridge ports you need into br-lan to make sure lan connection).It is said that Home Routers don’t have a complete switch module for each physical port, not like professional switch.So IGMP SNOOPING only works on vlan level.

This would simply bridge the different ports together in software. Yes, igmp snooping should work fine in that case, since it can be done in software. However, packets that need to be forwarded via the switch would then hit the router's CPU even though that shouldn't be necessary at all, and hence this would be quite an inefficient solution. As far as I know, the mt7530 switch should be able to support hardware based igmp snooping just fine. @jeff, is this something that could be seen in the output from the requested commands by any chance?

https://www.spinics.net/lists/netdev/msg453942.html

Makes me think that these switches don't do IGMP snooping at hardware level, and some don't even support the required controls to enable the appropriate behavior... But I could be misreading that thread, not an expert here.

1 Like

At < $40 tp links managed switch does do IGMP snooping and DSCP based QoS. From a practical perspective if you plan on doing IPTV it's probably a good investment. Upgrade the firmware first thing out of the box, it has some relevant improvements.

Sorry, just waking up here. What I don't see is IGMP snooping in there.

In contrast, (from an Archer C7)

jeff@office:~$ swconfig dev switch0 show
Global attributes:
	enable_vlan: 1
	enable_mirror_rx: 0
	enable_mirror_tx: 0
	mirror_monitor_port: 0
	mirror_source_port: 0
	arl_age_time: 300
	arl_table: address resolution table
    [...]

	igmp_snooping: 0
	igmp_v3: 0

and, for one of the ports

Port 1:
	mib: MIB counters
[...]

	enable_eee: 0
	igmp_snooping: 0
	vlan_prio: 0
	pvid: 0
	link: port:1 link:up speed:1000baseT full-duplex eee100 eee1000 auto

The reference commit appears to be around the mapping of VLAN "table ID" to VLAN tag, not IGMP, so that probably wouldn't change things.

swconfig dev switch0 help should show what can be set/queried. At least on the switch module and driver on my Archer C7, it reveals igmp_snooping at the switch and port level, and igmp_v3 at the switch level.

No relevent igmp snooping information there either as far as I can see:

root@LEDE:~# swconfig dev switch0 help
switch0: mt7530(mt7530), ports: 8 (cpu @ 6), vlans: 4095
     --switch
	Attribute 1 (int): enable_vlan (VLAN mode (1:enabled))
	Attribute 2 (string): mib (Get MIB counters for switch)
	Attribute 3 (none): apply (Activate changes in the hardware)
	Attribute 4 (none): reset (Reset the switch)
     --vlan
	Attribute 1 (int): vid (VLAN ID (0-4094))
	Attribute 2 (ports): ports (VLAN port mapping)
     --port
	Attribute 1 (string): mib (Get MIB counters for port)
	Attribute 2 (int): pvid (Primary VLAN ID)
	Attribute 3 (unknown): link (Get port link information)

Is this a hardware limitation of mt7530 switch, or is this something that simply hasn't been implemented yet?

A quick Google search led me to the same spinics.net link that @dlakelan posted.

I did some more digging as well, for the super popular "Ubiquiti Networks EdgeRouter X" router, which is using very similar hardware. And unfortunately, it seems like the switch simply doesn't support igmp snooping. See for example:



However, since there is only 1 IPTV device using IPTV I will simply create a separate interface for that device on a single port. Should work as well to prevent multicast traffic from hitting my other devices. Marking this as solved :slight_smile:

For completeness sake: I have just created a separate VLAN for the port on which the IPTV is connected and added that VLAN to my bridge interface. IPTV still works as it should, and no more IPTV multicast traffic arriving on my PC or server. Since the IPTV device doesn't really communicate with other devices within my LAN network, the downside of slower forwarding performance shouldn't matter at all. :slight_smile:

Sadly I can confirm that the mt7530 switch chip does not support igmp snooping. In my case the MI Router 3G is affected.
When using the device as switch that forwards igmp v3 multicast-traffic for IPTV from one lan-port to another on BR-LAN, the device gets sluggish and mutlicast-packets get lost. While top doesn't show any process that is consuming cpu, one can see that the system load increased to almost 1.0, the webinterface gets slow, packet forwarding sometimes hangs a little.

See my previous post for a solution. Running IPTV just fine on my device with a software bridge doing the igmp snooping.

1 Like