Alex-2221 avatar image
0 Votes"
Alex-2221 asked TimonYang-MSFT commented

UdpClient JoinMulticastGroup TTL > 1?

Hi all,

I have a couple questions about the TTL parameter for JoinMulticastGroup. The documentation says the TTL parameter is measured in router hops. I set the parameter to 10, but when I examine the IGMPv2 join packet in Wireshark, I see the "Time to live" = 1, and from my research, I believe the TTL for IGMP join packet can only be 1 as designed.

The response in this archived post also confirms TTL can only be 1:

If my belief is true that the TTL of the join packet is always 1, then what is the TTL parameter of the JoinMulticastGroup really for?

Here is my code so far

  UdpClient udpClient = new UdpClient();
         // Creates an IPAddress to use to join and drop the multicast group.
         IPAddress multicastIpAddress = IPAddress.Parse("");
         udpClient.Client.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.IpTimeToLive, 10);
         udpClient.Client.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.MulticastTimeToLive, 10);
         udpClient.Ttl = 10;
         // The packet dies after 10 router hops.
         udpClient.JoinMulticastGroup(multicastIpAddress, 10);


image.png (39.3 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I noticed that you have posted the same question on Stackoverflow and accepted an answer.
Has the problem been solved?

0 Votes 0 ·

0 Answers