Presentation is loading. Please wait.

Presentation is loading. Please wait.

Multicasting. References r Note: Some slides come from the slides associated with this book: “Mastering Computer Networks: An Internet Lab Manual”, J.

Similar presentations


Presentation on theme: "Multicasting. References r Note: Some slides come from the slides associated with this book: “Mastering Computer Networks: An Internet Lab Manual”, J."— Presentation transcript:

1 Multicasting

2 References r 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. r The Kurose & Ross textbook on computer networking

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

4 Multicasting r Multicast communications refers to one-to- many or many-to-many communications. UnicastBroadcastMulticast

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

6 Approaches to Multicasting r One-to-all unicast m Sender uses a separate unicast transport (e.g., TCP or UDP) connection to each of the receivers. m 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. multicast receiver (red) not a multicast receiver (red) routers forward unicast datagrams

7 Approaches to Multicasting r Application-level multicasting m This also uses unicast transmission. m 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 r Explicit multicast m Provide explicit multicast support at the network layer. m A single datagram is transmitted from the sending host. m 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. m The data is forwarded in a tree-like fashion. The discovery of the tree is dynamic. Lots of routing algorithms. m There is an Internet protocol called IP multicast for this. An IP address represents a group of processes

9 Approaches to Multicast Multicast routers (red) duplicate and forward multicast datagrams Explicit Multicast

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

11 IP Multicast Communication r IP multicast works as follows: m Multicast groups are identified by IP addresses in the range 224.0.0.0 - 239.255.255.255 (class D address) m 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 m 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)) < 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)) < 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)) < 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(socketDesc+1,&readReadySet, NULL, NULL, &timeOut) > 0) { …….} Question: What is the networking support needed?

16 IP Multicast Communication r IGMP: “signaling” protocol to establish, maintain, remove groups on a subnet. r Two new operations m Join-IP-Multicast-Group(group-address, interface) m Leave-IP-Multicast-Group(group-address, interface)

17 Joining a Multicast Group r Host informs local multicast(mcast) router of desire to join group: r Local router interacts with other routers to receive mcast datagram flow m many protocols (e.g., DVMRP, MOSPF, PIM) IGMP wide-area multicast routing

18 IGMP: Internet Group Management Protocol r The host sends IGMP report when application joins mcast group m The host need not explicitly “unjoin” group when leaving r The router sends IGMP query at regular intervals m host belonging to a mcast group must reply to query query report

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

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

21 Summary r This section briefly summarizes issues in multicasting.


Download ppt "Multicasting. References r Note: Some slides come from the slides associated with this book: “Mastering Computer Networks: An Internet Lab Manual”, J."

Similar presentations


Ads by Google