0% found this document useful (0 votes)
355 views22 pages

Distributed Systems Distributed Systems: Multicast Communication Multicast Communication

This document discusses multicast communication in distributed systems. It defines unicast, broadcast, and multicast as the three methods for transporting data over a network. Multicast involves transmitting data from one source to multiple destinations. The document discusses how multicast enables fault tolerance, better performance through data replication, and event notification. It also describes IP multicast and how it works at the programming and IP levels. Finally, it discusses multicast address allocation, the IGMP protocol, and Java's MulticastSocket class for joining multicast groups and sending/receiving multicast datagrams.

Uploaded by

Arjuna Krish
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
355 views22 pages

Distributed Systems Distributed Systems: Multicast Communication Multicast Communication

This document discusses multicast communication in distributed systems. It defines unicast, broadcast, and multicast as the three methods for transporting data over a network. Multicast involves transmitting data from one source to multiple destinations. The document discusses how multicast enables fault tolerance, better performance through data replication, and event notification. It also describes IP multicast and how it works at the programming and IP levels. Finally, it discusses multicast address allocation, the IGMP protocol, and Java's MulticastSocket class for joining multicast groups and sending/receiving multicast datagrams.

Uploaded by

Arjuna Krish
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

Distributed Systems

Multicast Communication
Unicast,Multicast,Broadcast

Data is transported over a network by three simple methods


i.e. Unicast, Broadcast, and Multicast.
• Unicast:: from one source to one destination i.e. One-to-One
• Broadcast:: from one source to all possible destinations i.e.
One-to-All
• Multicast:: from one source to multiple destinations stating an
interest in receiving the traffic i.e. One-to-Many

v 1.0
Why Multicast?

• When sending same data to multiple users.


• Better bandwidth utilization.
• Lesser router processing.
• Receivers’ addresses unknown.

v 1.0
What Can Multicast Be Useful for?
Multicast messages provides a useful infrastructure for constructing
distributed systems with the following characteristics:
Fault tolerance based on replicated services:
• A replicated service consists of a group of members.
• Client requests are multicast to all the members of the group,
each of which performs an identical operation.
• Even when some of the members fail, clients can still be served.

v 1.0
What Can Multicast Be Useful for?

Better performance through replicated data:


• Data are replicated to increase the performance of a
service - in some cases replicas of the data are placed in
users’ computers.
• Each time the data changes, the new value is multicast to
the processes managing the replicas
• Multicast messages provides a useful infrastructure for
constructing distributed systems with the following
characteristics

v 1.0
What Can Multicast Be Useful for?

Propagation of event notifications


• Multicast to a group may be used to notify processes when
something happens.
• For example, a news system might notify interested users when a
new message has been posted on a particular newsgroup.

v 1.0
IP Multicast
• IP multicast is built on top of the Internet Protocol, IP.
• Note that IP packets are addressed to computers - ports
belong to the TCP and UDP levels.
• IP multicast allows the sender to transmit a single IP packet to
a set of computers that form a multicast group.
• The sender is unaware of the identities of the individual
recipients and of the size of the group.

v 1.0
IP Multicast
• Being a member of a multicast group allows a computer to receive
IP packets sent to the group.
• The membership of multicast groups is dynamic, allowing
computers to join or leave at any time and to join an arbitrary
number of groups.
• It is possible to send datagrams to a multicast group without being
a member.

v 1.0
IP Multicast - Programming Level
• At the application programming level, IP multicast is available
only via UDP.
• An application program performs multicasts by sending UDP
datagrams with multicast addresses and ordinary port numbers.
• An application program can join a multicast group by making its
socket join the group, enabling it to receive messages to the
group.

v 1.0
IP Multicast - IP Level
At the IP level:
• A computer belongs to a multicast group when one or more of its
processes has sockets that belong to that group.
• When a multicast message arrives at a computer:
copies are forwarded to all of the local sockets that
have joined the specified multicast address and are bound to the
specified port number.

v 1.0
Multicast Address Allocation
• Multicast addresses are dynamically assigned.
• An IP datagram sent to a multicast address is forwarded to
everyone who has joined the multicast group
• If an application is terminated, the multicast address is
(implicitly) released.
• A multicast group is specified by an Internet address whose first
4 bits are 1110 (in IPv4).

v 1.0
IGMP
• Dynamically registers individual hosts in a multicast group on a
particular LAN.
• Hosts identify group memberships by sending IGMP messages
to their local multicast router.

Multicast routers (mrouters)


• A router program that distinguishes between unicast and multicast
packets and determines how they should be distributed along the
Multicast Internet.
• Using an appropriate algorithm, mrouter tells a switching device what to
do with the multicast packet.
• Execute multicast routing protocol to define delivery paths that enable the
forwarding of multicast datagrams across an internetwork.
v 1.0
Multicast Address Allocation

The range of addresses between 224.0.0.0 and 224.0.0.255, inclusive, is


reserved for the use of routing protocols and other low-level
low topology
discovery or maintenance protocols
Multicast routers should not forward any multicast datagram with destination
addresses in this range.
Examples of special and reserved Class D addresses,
224.0.0.1 - All systems on this subnet
224.0.0.2 - All routers on this subnet
224.0.1.1 - NTP (Network Time Protocol)
224.0.0.9 - RIP-22 (a routing protocol)

v 1.0
JAVA API for IP Multicast
The Class MulticastSocket
The Java API provides a datagram interface to IP multicast through the
class MulticastSocket.
A subclass of DatagramSocket with the additional capability of being
able to join multicast groups.
It provides two alternative constructors, allowing sockets to be created
to use either a specified local port or any free local port.

v 1.0
Joining a Group
• A process can join a group with a given multicast address by invoking
the joinGroup method of its multicast socket.
• In this way, the socket joins a multicast group at a given port and it will
receive datagrams sent by processes on other computers to that
group at that port.
• A process can leave a specified group by invoking the leaveGroup
method of its multicast socket.

v 1.0
Leaving a Group

• A process can leave a specified group by invoking the leaveGroup method


of its multicast socket.

v 1.0
EXAMPLE
Multicast Peer Joins a Group and Sends and
Receives Datagrams
• When several instances of this program are run simultaneously
on different computers, all of them join the same group and
each of them should receive its own message and the
messages from that joined after it.

v 1.0
v 1.0
THANK YOU!

You might also like