UDP Multicasting

UDP is one of the two main transport protocols (TCP being the second) utilized in IP networks, and is used by applications to transmit messages (also known as datagrams or packets) between networked hosts.

UDP has better transmission rates than TCP. This is because UDP is a “best effort” protocol and does not implement some of the features offered by TCP. However, UDP does not guarantee reliability or ordering of packets. Avoiding the overhead of confirming packet arrival makes UDP faster and more efficient.

Multicasting sends packets from one host in the network to many other hosts. It differs from UDP broadcasting. With broadcasting, packets are sent to every possible receiver, while multicast packets can be sent to selected receivers. In multicasting, one packet is sent from a source and is replicated in the network to reach as many end-hosts as necessary. Multicasting conserves bandwidth, which is generally the most expensive part of network operations. It replicates packets as needed within the network, and does not transmit unnecessary packets. Multicasting uses UDP as its underlying transport protocol. There is no acknowledgement of the success or failure of the transmission of any packet, and no retransmission, at the transport layer.

Every multicast requires a multicast group, which is an arbitrary group of receivers that expresses an interest in receiving a particular data stream containing messages. Processes that are interested in receiving data flowing to a particular group must join the multicast group. The sender transmits to the group, and only members of the group can receive the multicast data. Multicast addresses are used to define the multicast group. The Internet Assigned Numbers Authority (IANA) controls the assignment of IP multicast addresses. All IP multicast group addresses fall in the range of 224.0.0.0 to 239.255.255.255.

In RAP, publishers send messages over the network through data-stream channels using UDP multicasting. You can configure each datastream channel to have a multicast address, an IP address of a local network interface, and a local port. You can configure subscribers to receive messages from one or more publishers by listening for messages on all of the publishers’ datastream channels. To ensure maximum performance, set up publishers and subscribers on the same subnet. The multicast IP addresses reserved for ad hoc usage fall in the range of 224.0.2.0 to 224.0.255.0. Sybase recommends that you use this range for datastream multicast addresses. Message reliability has been built into RAP by adding subscriber mechanisms that detect transmission of lost messages over the network, and request lost messages to be resent the publisher over a TCP connection.