Multicasting - PowerPoint PPT Presentation

About This Presentation
Title:

Multicasting

Description:

'Mastering Computer Networks: An Internet Lab Manual' ... Multicast is an operation that sends a single message from one process to each ... Streaming continuous media ... – PowerPoint PPT presentation

Number of Views:34
Avg rating:3.0/5.0
Slides: 22
Provided by: steve1808
Category:

less

Transcript and Presenter's Notes

Title: Multicasting


1
Multicasting
2
References
  • Note Some slides come from the slides associated
    with this book
  • Mastering Computer Networks An Internet Lab
    Manual, J. Liebeherr, M. El Zarki,
    Addison-Wesley, 2003.
  • The Kurose Ross textbook on computer networking

3
Multicasting
  • Multicast is an operation that sends a single
    message from one process to each of the members
    of a group of processes.
  • Ideally this is done in such a way that the
    membership of the group is transparent to the
    sender.

4
Multicasting
  • Multicast communications refers to one-to-many or
    many-to-many communications.

Unicast
Broadcast
Multicast
5
Applications Using Multicasting
  • For replication
  • Streaming continuous media
  • Example The transfer of the audio, video and
    text of a live lecture to a set of distributed
    lecture participants
  • One sender, multiple receivers
  • Shared data applications
  • Example whiteboard, teleconferencing
  • Multiple senders, multiple receivers
  • Web cache updates
  • Email distribution lists
  • Content distribution
  • Software distribution
  • Interactive gaming

6
Approaches to Multicasting
  • One-to-all unicast
  • Sender uses a separate unicast transport (e.g.,
    TCP or UDP) connection to each of the receivers.
  • If using TCP, a connection is made between the
    sender and a receiver. The data is sent and the
    connection is then terminated. This is done for
    the sender and each of the receivers.

routers forward unicast datagrams
multicast receiver (red)
not a multicast receiver (red)
7
Approaches to Multicasting
  • Application-level multicasting
  • This also uses unicast transmission.
  • The sender transmits a copy to a small number
    of receivers, which then make copies themselves
    and forward these copies to other receivers which
    may then duplicate and forward copies to yet
    additional receivers.

8
Approaches to Multicasting
  • Explicit multicast
  • Provide explicit multicast support at the network
    layer.
  • A single datagram is transmitted from the sending
    host.
  • This datagram (or copy) is then replicated at a
    network router whenever it must be forwarded on
    multiple outgoing links in order to reach the
    receivers.
  • The data is forwarded in a tree-like fashion.
    The discovery of the tree is dynamic. Lots of
    routing algorithms.
  • There is an Internet protocol called IP multicast
    for this.
  • An IP address represents a group of processes

9
Approaches to Multicast
10
IP Multicast Communication
  • IP multicast is built on top of IP.
  • IP multicast allows the sender to transmit a
    single IP packet to a set of computers that form
    a multicast group.
  • Being a member of a multicast group allows a
    computer to receive IP packets sent to the group.
  • IP multicast is available only via UDP
  • There is no multicast TCP

11
IP Multicast Communication
  • IP multicast works as follows
  • Multicast groups are identified by IP addresses
    in the range 224.0.0.0 - 239.255.255.255 (class D
    address)
  • Every host can join and leave a multicast group
    dynamically
  • Server does not have to know all the receivers
  • Anyone can send to the group
  • Routers forward multicast datagrams to hosts that
    have joined the multicast group.
  • Anyone can join a group

12
IP Multicast Communication
  • define MULTICASTADDR "229.8.2.4"
  • define PORTNUMBER 5824
  • if ((socketDesc socket(AF_INET, SOCK_DGRAM, 0))
    lt 0) perror("open error on socket")
  • exit(1)
  • myAddr.sin_family AF_INET
  • myAddr.sin_addr.s_addr htonl(INADDR_ANY)
  • myAddr.sin_port htons(0) / The zero says bind
    to any port /
  • if (bind(socketDesc, (struct sockaddr ) myAddr,
    sizeof(myAddr)) lt 0) perror("bind error")
    exit(1)

13
IP Multicast Communication
  • / And build MULTICAST address /
  • destinationAddr.sin_family AF_INET
  • destinationAddr.sin_addr.s_addr
    htonl(inet_addr(MULTICASTADDR))
  • destinationAddr.sin_port htons(PORTNUMBER)
  • / Set the socket to permit multicasts on the
    local LAN /
  • if (setsockopt(socketDesc, IPPROTO_IP,
    IP_MULTICAST_TTL, limitLanFlag,
    sizeof(limitLanFlag)) ! 0)
  • perror("setsockopt error") exit(1)

14
IP Multicast Communication
  • / Broadcast message /
  • strcpy(outMessageBuf, "Hello world")
  • if (sendto(socketDesc, outMessageBuf,
    strlen(outMessageBuf)1, 0, (struct sockaddr
    )destinationAddr, sizeof(destinationAddr)) lt 0)
    perror("socket send error") exit(1)

15
IP Multicast Communication
  • / And wait for up to 5 seconds for replies to
    come back /
  • / Set timeOut value for receive to 5 seconds /
  • timeOut.tv_sec 5L
  • timeOut.tv_usec 0L
  • / Read responses from hosts accepting the
    multicast until a read finally times-out. /
  • FD_ZERO(readReadySet)
  • FD_SET(socketDesc,readReadySet)
  • msgCount 0
  • while (select(socketDesc1,readReadySet, NULL,
    NULL, timeOut) gt 0) .

Question What is the networking support needed?
16
IP Multicast Communication
  • IGMP signaling protocol to establish,
    maintain, remove groups on a subnet.
  • Two new operations
  • Join-IP-Multicast-Group(group-address, interface)
  • Leave-IP-Multicast-Group(group-address,
    interface)

17
Joining a Multicast Group
  • Host informs local multicast(mcast) router of
    desire to join group
  • Local router interacts with other routers to
    receive mcast datagram flow
  • many protocols (e.g., DVMRP, MOSPF, PIM)

IGMP
IGMP
wide-area multicast routing
IGMP
18
IGMP Internet Group Management Protocol
  • The host sends IGMP report when application joins
    mcast group
  • The host need not explicitly unjoin group when
    leaving
  • The router sends IGMP query at regular intervals
  • host belonging to a mcast group must reply to
    query

report
query
19
Building Mcast Trees
  • Problem Statement Find a tree (or trees)
    connecting routers having local mcast group
    members
  • Approaches
  • Source-based tree
  • One tree per source
  • Shortest path trees
  • Reverse path forwarding
  • Group-shared tree
  • Group uses one tree
  • Minimal spanning (Steiner) NP Complete Problem
  • center-based trees

20
Problems with IP Multicast Communication
  • Security and privacy issues
  • If the reason to use IP multicast is replication
    then you want to make sure that the multicast is
    reliable.
  • Not all multicast applications need strong
    reliability of the type provided by TCP. Some can
    tolerate reordering, delay, etc
  • Reliability needs application support. This
    suggests that applications may need to send their
    acknowledgemens.
  • Ack-implosion if all destinations ack at once
  • We will discuss reliability later
  • Routers need to maintain state
  • A bad link affects a subgroup
  • IP multicast is probably sufficient for
    enterprise computing but not Internet computing
  • We will discuss more on reliable multicast later
    which does not necessarily depend on using IP
    Multicast communication.

21
Summary
  • This section briefly summarizes issues in
    multicasting.
Write a Comment
User Comments (0)
About PowerShow.com