Sunday, July 7, 2024

community – The right way to ship and obtain UDP multicast information on the identical machine?

I can’t appear to obtain multicast information I that ship with tcpreplay(-edit), on the identical Mac. This works advantageous on Linux utilizing the loopback machine.

On Mac, not even tcpdump sees the multicast information when utilizing the loopback machine. tcpdump does nevertheless see the multicast information when utilizing interface en6. Nonetheless, socat will not be capable of obtain it.

How can I get this to work? I do not care if information flows by way of loopback or an actual community interface.

Btw this works completely advantageous over en6 when sending from one other machine, i.e. over bodily cable, to interface en6.

I am on MacOS Sonoma (14.2.1), Apple M2, and the firewall is inactive. See under for details about check process and community setup.

> sudo socat UDP4-RECVFROM:51501,ip-add-membership=239.194.23.1:192.168.1.6,fork -


> sudo tcpdump -i en6 -nn 'udp and port 51501'
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on en6, link-type EN10MB (Ethernet), snapshot size 524288 bytes
11:06:33.275339 IP 10.17.95.53.51501 > 239.194.23.1.51501: UDP, size 79
11:06:33.315256 IP 10.17.95.53.51501 > 239.194.23.1.51501: UDP, size 176
11:06:33.349584 IP 10.17.95.53.51501 > 239.194.23.1.51501: UDP, size 273
11:06:33.388508 IP 10.17.95.53.51501 > 239.194.23.1.51501: UDP, size 370
11:06:33.427230 IP 10.17.95.53.51501 > 239.194.23.1.51501: UDP, size 79
...

> sudo tcpreplay-edit -CM 1 -ien6 za-dump.pcap
Precise: 3490 packets (525503 bytes) despatched in 4.20 seconds
Rated: 125026.1 Bps, 1.00 Mbps, 830.33 pps
Flows: 24 flows, 5.71 fps, 3490 distinctive stream packets, 0 distinctive non-flow packets
Statistics for community machine: en6
        Profitable packets:        3489
        Failed packets:            0
        Truncated packets:         0
        Retried packets (ENOBUFS): 0
        Retried packets (EAGAIN):  0


> netstat -ng
Hyperlink-layer Multicast Group Memberships
Group                   Hyperlink-layer Handle      Netif
1:0:5e:42:17:1          <none>                  en6
1:0:5e:0:0:fb           <none>                  en6
1:0:5e:0:0:1            <none>                  en6
...

IPv4 Multicast Group Memberships
Group                   Hyperlink-layer Handle      Netif
239.194.23.1            1:0:5e:42:17:1          en6
224.0.0.251             1:0:5e:0:0:fb           en6
224.0.0.1               1:0:5e:0:0:1            en6
...

> ifconfig en6
en6: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        choices=404<VLAN_MTU,CHANNEL_IO>
        ether 00:e0:4c:85:78:ab
        inet 192.168.1.6 netmask 0xffffff00 broadcast 192.168.1.255
        nd6 choices=201<PERFORMNUD,DAD>
        media: autoselect (2500Base-T <full-duplex>)
        standing: energetic

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles