Community discussions

MikroTik App
 
Malvineous
just joined
Topic Author
Posts: 12
Joined: Wed Jul 14, 2021 6:21 pm

Multicast packets arrive twice, what did I do wrong?

Sat Jul 31, 2021 9:12 am

Does anyone know why multicast packets would arrive twice over a bonded interface with two connections?

I have bonded together two ports on a CRS-309 via 802.3ad and enabled IGMP snooping on the bridge interface. There is no routing involved as although the CRS-309 is a 10G router, it can't route at even 1G so I'm just using it as a hardware switch. Unicast TCP and UDP traffic work fine - according to Wireshark on the client machine, each packet only arrives once as expected.

However once I try sending IPv4 multicast traffic, each packet arrives on the machine twice, corrupting video streams and causing iperf to complain:
client1$ iperf -c 224.1.1.1 -u -T 32 -t 3 -i 1
------------------------------------------------------------
Client connecting to 224.1.1.1, UDP port 5001
Sending 1470 byte datagrams, IPG target: 11215.21 us (kalman adjust)
Setting multicast TTL to 32
UDP buffer size:  208 KByte (default)
------------------------------------------------------------
[  3] local 198.18.0.100 port 56520 connected with 224.1.1.1 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0- 1.0 sec   131 KBytes  1.07 Mbits/sec
[  3]  1.0- 2.0 sec   128 KBytes  1.05 Mbits/sec
[  3]  0.0- 3.0 sec   385 KBytes  1.05 Mbits/sec
[  3] Sent 268 datagrams
Other machine:
client2$ iperf -s -u -B 224.1.1.1 -i 1
------------------------------------------------------------
Server listening on UDP port 5001
Binding to local address 224.1.1.1
Joining multicast group  224.1.1.1
Receiving 1470 byte datagrams
UDP buffer size:  208 KByte (default)
------------------------------------------------------------
[  3] local 224.1.1.1 port 5001 connected with 1.2.3.4 port 56520
[ ID] Interval       Transfer     Bandwidth        Jitter   Lost/Total Datagrams
[  3]  0.0- 1.0 sec   258 KBytes  2.12 Mbits/sec   0.030 ms    0/   90 (0%)
[  3] 0.0000-1.0000 sec  90 datagrams received out-of-order
[  3]  1.0- 2.0 sec   256 KBytes  2.09 Mbits/sec   0.025 ms    0/   89 (0%)
[  3] 1.0000-2.0000 sec  89 datagrams received out-of-order
[  3]  2.0- 3.0 sec   256 KBytes  2.09 Mbits/sec   0.021 ms    0/   89 (0%)
[  3] 2.0000-3.0000 sec  89 datagrams received out-of-order
[  3]  0.0- 3.0 sec   769 KBytes  2.10 Mbits/sec   0.021 ms    0/  268 (0%)
[  3] 0.0000-3.0046 sec  268 datagrams received out-of-order
[  4] local 224.1.1.1 port 5001 connected with 1.2.3.4 port 56520
[  4]  0.0- 0.0 sec  1.44 KBytes  -nan bits/sec   0.000 ms  267/  268 (1e+02%)
Wireshark reports the exact same packet arriving exactly twice each for every UDP multicast packet, but not for unicast UDP or TCP packets, those only arrive once each as expected.

I started off with SwOS for a while and there was no problem with bonding or multicast traffic, but now I am trying RouterOS, except that I can't figure out how to tell it not to duplicate multicast traffic over all interfaces in a bonded link.

I've tried a bonded and non-bonded link as the source for the multicast packets but it makes no difference, so it's not the client machine sending the packets out of both interfaces because I still see the problem when the packets originate from a machine with only one NIC.

Have I just configured my bonding links improperly? I tried a few different things and the only thing that changes anything is switching it to balance-rr mode which kills the bandwidth. Everything else still delivers multicast packets twice.
/interface bonding print 
Flags: X - disabled, R - running 
 0  R name="bonding12" mtu=1500 mac-address=2C:C8:1B:A6:AB:CE arp=enabled arp-timeout=auto slaves=sfp-sfpplus1,sfp-sfpplus2 mode=802.3ad primary=none link-monitoring=mii arp-interval=100ms arp-ip-targets="" mii-interval=100ms down-delay=0ms up-delay=0ms lacp-rate=1sec 
      transmit-hash-policy=layer-2-and-3 min-links=0 
 1  R name="bonding34" mtu=1500 mac-address=2C:C8:1B:A6:AB:D0 arp=enabled arp-timeout=auto slaves=sfp-sfpplus3,sfp-sfpplus4 mode=802.3ad primary=none link-monitoring=mii arp-interval=100ms arp-ip-targets="" mii-interval=100ms down-delay=0ms up-delay=0ms lacp-rate=1sec 
      transmit-hash-policy=layer-2-and-3 min-links=0 
 2  R name="bonding56" mtu=1500 mac-address=2C:C8:1B:A6:AB:D2 arp=enabled arp-timeout=auto slaves=sfp-sfpplus5,sfp-sfpplus6 mode=802.3ad primary=none link-monitoring=mii arp-interval=100ms arp-ip-targets="" mii-interval=100ms down-delay=0ms up-delay=0ms lacp-rate=1sec 
      transmit-hash-policy=layer-2-and-3 min-links=0 
 
Zacharias
Forum Guru
Forum Guru
Posts: 3459
Joined: Tue Dec 12, 2017 12:58 am
Location: Greece

Re: Multicast packets arrive twice, what did I do wrong?

Sat Jul 31, 2021 11:14 am

except that I can't figure out how to tell it not to duplicate multicast traffic over all interfaces in a bonded link.
In 802.3ad connections belonging to a unique session are placed on the same link ... The ordering of Frames will not change, nor they will be split across the Links or be duplicated...
So how are you really sure that they are duplicated on both Interfaces of the Bonded link ?

Am not sure if something changes in the case of Multicast Traffic ... Although i do use Bonding Interfaces (802.3ad) with IGMP Snooping enabled on many CRS328's in a Network with IPtv, i ve not seen any problems so far... Traffic is being flowing smoothly on the Bond Interface, Mutlicast works fine, the traffic is being shared only to the TVs that they request for a Specific Channel ...

What is the Multicast traffic used for ? IPtv or something ? If yes, try enabling fast-leave on every port that an IPtv exists...
Also, you should specify who is the Multicast Router on your Network, if you only have one CRS328 am not sure if you have to do that ...
 
Malvineous
just joined
Topic Author
Posts: 12
Joined: Wed Jul 14, 2021 6:21 pm

Re: Multicast packets arrive twice, what did I do wrong?

Wed Aug 04, 2021 2:54 pm

Thanks for your reply! I agree 802.3ad is not supposed to duplicate packets which is why I am confused. I used Wireshark on the host and when I listen to each interface on its own I get packets coming in on both interfaces (even though I should only see them on one interface) and when I listen to the bonded interface then I get twice as many packets and the sequence numbers appear duplicated. This only happens for multicast traffic, unicast traffic only appears on one NIC (depending on the source) and each packet arrives once through the bonded interface as expected.

If I reboot into SwOS then the problem goes away, but there I have a problem where the multicast packets just randomly stop arriving after some time. I have to either restart the process listening for the packets, or start another process that sends an IGMP join message in order for the packets to start arriving again. It is like the Mikrotik switch just forgets after a day or so and stops delivering packets. Annoyingly in the IGMP tab in the SwOS UI it still lists the multicast groups and has the correct interfaces listed, but it just stops delivering the (multicast) packets until it's prodded by another IGMP join message.

I am not using the device as a router as it is too slow (it only routes at around 100 Mbps) I am just using it as a 10 Gbps switch.

It looks to me like the RouterOS firmware is not correctly programming the switch hardware to pass the multicast packets properly when it's operating in bridge/switch mode.

Yes I am using it for IPTV of sorts. I have some security cameras that send their traffic via IPv4 multicast and I receive this in a few locations - some machines set up to show the streams live, and another to record the data.

Everything was working fine when it was all plugged into a 1 Gbps Cisco switch (and those receivers still plugged into the Cisco still work fine), the only changes to the machines that can't properly receive multicast traffic are that they are now connected to the Mikrotik 10G switch instead, and that I am now bonding two interfaces whereas before I only had the one NIC connected to the switch.

I will try to enable fast-leave and see if it fixes the RouterOS duplicate-packet issue.
 
Zacharias
Forum Guru
Forum Guru
Posts: 3459
Joined: Tue Dec 12, 2017 12:58 am
Location: Greece

Re: Multicast packets arrive twice, what did I do wrong?

Wed Aug 04, 2021 8:52 pm

Is your ROS version updated to 6.48.3 ?

Who is online

Users browsing this forum: No registered users and 46 guests