I have a program that sends out UDP traffic via the usual way:

The Server:

private IPEndPoint iepSend = null;
private IPEndPoint iepSend2 = null;
private Socket sendSocket = null;
...
sendSocket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
iepSend = new IPEndPoint(IPAddress.Any, 4203);
iepSend2 = new IPEndPoint(IPAddress.Parse("227.40.23.1"), 4203);
sendSocket.Bind(iepSend);
sendSocket.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.AddMembership, new MulticastOption(IPAddress.Parse("227.40.23.1")));
sendSocket.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.MulticastTimeToLive, 50);
...
byte[] bytes = UnicodeEncoding.ASCII.GetBytes("hello world");
sendSocket.SendTo(bytes, iepSend2);

The Client

UdpClient clientListener = new UdpClient(4203);            
clientListener.JoinMulticastGroup(IPAddress.Parse("227.40.23.1"));
IPEndPoint iep = new IPEndPoint(IPAddress.Any, 0);
byte[] bytes = clientListener.Receive(ref iep);
string s = UnicodeEncoding.ASCII.GetString(bytes);

Now this code works in the local LAN. We even got it working to other VLANs through ip pim sparse-dense-mode on our Cisco 6504 switch. The problem is that we want this to run to a remote location outside of our LAN. We have a T1 connection to another site. We can ping and do file transfers with the remote machines. But the remote machines do not "hear" the multicast messages. What settings need to be set so that the remote site can get this multicast traffic? Many thanks in advance.

John

By default routers don't forward multicast traffic I believe unless they are told to subscribe via IGMP. What type of edge routers are you running on both sides of the connection? You should consider running Wireshark on the side of the connection listening for data to see if you receive anything. Why are you trying to send multicast data to a remote network anyway? You should also take a look at the wikipedia article for ip multicast to get you pointed in the right direction.

One time in my life I was going to be adventurous and set up a unicast/multicast network that traversed a router but I quickly gave up and redesigned the comms. It was a PITA.

Protocols and applications
Since multicast is a different transmission mode from unicast, only protocols designed for multicast can be sensibly used with multicast.

Most of the existing application protocols that use multicast run on top of the User Datagram Protocol, UDP. In many applications, the Real-time Transport Protocol, RTP, is used for framing of multimedia content over multicast; the RSVP protocol may be used for bandwidth reservation in a multicast distribution.

On the local network, multicast delivery is controlled by IGMP (on IPv4 network) and MLD (on IPv6 network); inside a routing domain, PIM or MOSPF are used; between routing domains, one uses inter-domain multicast routing protocols, such as MBGP.

A number of errors can happen if packets intended for unicast are accidentally sent to a multicast address; in particular, sending ICMP packets to a multicast address has been used in the context of DoS attacks as a way of achieving packet amplification.

I am a little rusty with OSPF but that article is indicating MOSPF is an extension of OSPF but I fail to see how they relate. It is wikipedia so read it with a grain of salt,

Good luck!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.