Multicast not working at Windows 10 PC. How to Enable multicast at Local LAN at Windows 10

Shah Jafar Ulla Hamidi picture Shah Jafar Ulla Hamidi · Nov 4, 2019 · Viewed 7.5k times · Source

I can multicast at 224.0.0.1 and my all others local LAN PCs can listen the stream. But when I multicast at other multicast IP like: 224.0.0.130, no LAN PCs can listen that. Though I can get at wireshark in source PC.

Answer

Shah Jafar Ulla Hamidi picture Shah Jafar Ulla Hamidi · Nov 5, 2019

There are several reasons not to work multicast in windows 10. I have solved it by following 2 steps:

  1. Interface Metric: From network settings, go to advance option and uncheck Automatic metric and set Interface matric a number. Lower the prior.

IP Settings

  1. Change C# code: By default, multicast send data to loopback interface. Hence need to specify which interface you want to use, means which ip you want use to send the multicast stream (ie. At which network you want to send multicast).

Here’s a sample C# code:

                  m_Socket.SetSocketOption(
                 SocketOptionLevel.IP,
                 SocketOptionName.MulticastInterface,
                 IPAddress.Parse("192.168.0.104").GetAddressBytes()
                );

M_Socket is the socket to send the stream and “192.168.0.104” is the interface ip at which network I want to send the stream.

By following above, Now I can send multicast successfully.