14. Multicasting, IGMP, and Section Table of Contents 14. MULTICASTING, IGMP, AND MBONE...... 1 IP multicasting provides the ability for one machine to transmit 14.1 MULTICASTING ...... 3 IP packets to many machines, without the source machine 14.2 APPLICATION LAYER USES OF MULTICASTING ...... 4 having to provide all the copies. In particular, this allows a 14.3 NETWORK LAYER USES OF MULTICASTING ...... 5 source in Ottawa to broadcast a message (often audio, video, 14.4 ADDRESSES ...... 6 some kind of meeting transcribed into text, or maybe a 14.4.1 IPv4 ...... 6 newspaper) to many stations, say, on the west coast. For 14.4.2 IPv6 ...... 7 efficiency, only one copy of each packet is sent from Ottawa to 14.5 IGMP...... 8 B.C. Once it enters B.C., routers start making multiple copies 14.6 MROUTED AND DVMRP...... 10 as appropriate and the copies fan out in a tree. The tree only 14.7 MULTICAST EXTENSIONS TO OSPF...... 12 goes to stations that are interested in this particular multicast. 14.8 MBONE ...... 13 If the final destination is an Ethernet, layer 2 broadcasting can 14.8.1 The Concept of Tunnelling ...... 14 be used to avoid the necessity for multiple copies to each leaf 14.8.2 Fan Out Problem...... 15 network. 14.8.3 MBONE Map...... 15 14.9 REFERENCES ...... 16 A large part of these notes are an adaptation of a lecture given 14.9.1 Online References...... 16 by Cmpt-471(97-3) student Kaye Mason. Readings: [Commer00] Chapter 17. Optional Reading: ‘‘Overview of IP Multicasting’’ including ‘‘Enterprise-Wide Multicast: Microsoft Netshow and the Microsoft Multicast Network’’ at: http://www.cisco.com/warp/public/cc/techno/tity/ipmu/tech/ipmc_ wp.htm

Copyright 1997 by Russ Tront Page 14-1 Copyright 1997 by Russ Tront Page 14-2 14.1 Multicasting 14.2 Application Layer Uses of Multicasting • Multicasting is a networking technology that allows a sender to • Probably the most celebrated use of multicast is for video transmit a single copy of a message to a group of recipients. This conferences. The IETF began multicasting its own meetings as can be contrasted with unicasting, where to send to multiple early as 1983. As time went on, more and more people interested destinations, multiple copies of the same packet must be its proceedings started to watch these meetings. The meetings individually transmitted. quickly became participatory events for the remote observers. Now, question and answer sessions for remote participants are an • Ethernet and similar broadcast-based MAC/physical layer systems important part of all IETF meetings. support multicast inherently. Standard layer 3 protocols, however, have traditionally been limited in their ability to handle multicast • Other organisations began to use multicast for their own video transmissions. As a result, traffic was primarily limited to conferences. This sort of use is the fastest growing part of the point to point transmissions. MBONE. It has reached to the point that Christian Huitema, in his book Routing in the Internet argues that video conference • Recently moves have been made to allow for the full utilisation of multicasting has now become an appreciable part of all network multicasting into the existing TCP/IP protocol stack, and ensure traffic. that future versions of protocols in the stack support multicasting. This has affected the design of IPv6 and OSPF among others. • File transfer is another important application of multicasting. Consider the case of a file that is mirrored at a number of remote sites. When that file is updated on the source, instead of sending updates to each remote site individually, it can multicast to a group which contains all of the hosts which are its mirrors. Note that host applications must allow their user to select the multicast(s) (i.e. (es)) they want to listen in on. The IP layer possibly must handle this for several applications on that CPU. IP must keep a reference count of how many applications are using each multicast, and when that count drops to zero, use Internet Group Management Protocol (IGMP) to tell the nearby multicast-capable that it no longer needs copies of that particular multicast address feed (‘channel’).

Copyright 1997 by Russ Tront Page 14-3 Copyright 1997 by Russ Tront Page 14-4 14.3 Network Layer Uses of Multicasting 14.4 Multicast Addresses • Routing protocols like OSPF often wish to broadcast packets to Both IPv4 and IPv6 allow for the creation of multicast channels. A “all other routers”. Multicast is extremely useful here, as it allows multicast channel is like a TV or radio ‘channel’. Each is identified by its this with minimal disturbance to any other connected hosts. If the multicast address. Client applications must decide which channel they router had to broadcast such a packet, all connected hosts would be want to tune in to. These are also called multicast ‘groups’. This required to consider it. Multicasting it to “all other routers” allows basically refers to the group of CPUs listening in to that channel. hosts that are not routers to reject such a packet out of hand. Multicast channels come in two forms: 1) permanent, globally-unique ones allocated by the IANA, and 2) transient ones used for, say, the • A diskless workstation wants to know as little as possible about its duration of a video conference or other event. environment when booting. Allowing it to multicast to a generic “all Dynamic Host Configuration Protocol (DHCP) servers” 14.4.1 IPv4 address is an excellent way of minimising the information that • IPv4 has class D addresses specifically for multicasting. Recall needstobehardcodedinit. that class D addresses are those IPv4 addresses which begin with the bits “1110”. Their range is therefore 224.0.0.0 to 239.255.255.255. The remaining bits are referred to as the multicast group id. • There are well known multicast groups in IPv4. They are specified in the latest Assigned Numbers RFC, which is currently RFC 1700. Two important reserved multicast addresses are: Address Meaning 224.0.0.1 All multicast-aware CPUs on this physical net 224.0.0.2 All routers on this physical subnet. 224.0.0.5 All OSPF routers on this physical subnet.

Note that there is a defined mapping for IP multicast to Ethernet multicast. 01:00:5E:xx:xx:xx where the low order 23 bits are the low order IP multicast address bits. But there are 28 unique bits in an IP multicast address. IP multicast software must filter wrong full addresses out (which is rare).

Copyright 1997 by Russ Tront Page 14-5 Copyright 1997 by Russ Tront Page 14-6 14.4.2 IPv6 14.5 IGMP • The IPv6 multicast addresses are more complicated than the IPv4 • Internet Group Management Protocol (IGMP) is not a multicast addresses. They are structured as follows: protocol, but a multicast route enabling and disabling protocol. It allows hosts to request a nearby multicast router to start copying a 8 bits 8 bits 112 bits particular channel toward the host. This is not to say that IGMP Prefix Flags Scope Multicast Group ID does not use multicasting. We’ll see later that it to the 11111111 000T XXXX XXXXXX...... XXXXXXX “all hosts” address. • The prefix identifies the address as a multicast address, just as the prefix “1110” identifies a multicast address in IPv4. • ‘Multicast’ routers are used to effectuate the copying and • distribution of multicasts to hosts. Not all routers have software Of the flag bits, only T is defined. When set to one, it denotes that for this new feature. IGMP is used to manage the solicitation of a the group is transient, i.e., not a unique multicast address branch feed, cause the multicast routers to make and fan out the permanently assigned by the IANA. copies of packets, and to prune the distribution tree as user • Since a transient address may not be unique in the world, it should machines decide to ‘tune out’. not get out into the whole internet. The Scope field in IPv6 deals • Like ICMP, IGMP packets are transmitted within an IP payload. with this problem. Scope denotes just how far out the sender Also like ICMP, it should not be considered an independent wishes the packet to propagate. The following values are currently protocol from IP, but an integral part of it. defined as meaningful: • When a host wishes to join a multicast group, it sends a message to Value Meaning the “all hosts” multicast address, declaring its desire to do so. 0 Reserved Local hosts and multicast routers receive this, and multicast 1 A single system routers propagate the information outward through the Internet 2 A single link (though not necessarily using IGMP request packets as the hosts 5 A single site use). 8 A single organisation E Global scope • If the message reaches a router that is already a member of the F Reserved desired multicast group, that router begins forwarding packets to As with IPv4 there are permanently assigned addresses in IPv6. These that group along the new path. The packet is propagated back include addresses which specify all systems, all routers, all OSPF routers, down the line, until it reaches the host requesting membership. and all DHCP servers. Because IPv6 is still new, the list of reserved • If no router responds within a certain time period, the local router addresses is only now in the process of being finalized, and will likely be gives up looking, and informs the host that it cannot join the expanding in the near future. desired group.

Copyright 1997 by Russ Tront Page 14-7 Copyright 1997 by Russ Tront Page 14-8 • Group membership is dynamic. Hosts may join or leave a group at 14.6 Mrouted and DVMRP any time. The responsibility of knowing whether or not processes • on a host require membership in a group is given to that host. The Mrouted is the protocol process daemon. It does not responsibility for knowing whether or not any hosts on a given replace routed, it is meant to run alongside it, and to deal with multicast local network are in a multicast group rests with the local multicast packets while routed deals with unicast packets. router. Hosts request membership in a group, and resign • Basically, routers advertise what groups they are members of for the memberships when no longer needed. But what if a host crashes benefit of neighboring multicast routers. while holding a membership? • Mrouted implements a routing protocol called Distance Vector Multicast Routing Protocol (DVMRP). DVMRP is specified in RFC • In order to handle this eventuality, a multicast router periodically 1075 and is based, not surprisingly, on Distance Vector Routing. Note multicast a second kind of IGMP message to the ‘all (multicast) that DVMRP is really just new frame types that have been added to hosts’ IP address. It solicits group membership information from IGMP. the multicast aware hosts on the network. Note this system is very • To briefly recap, in Distance Vector Routing, each router broadcasts its efficient as on Ethernet, it uses layer 2 multicasting (not estimated “distance” to each of its neighbors. The distance can be broadcasting) to distribute the IGMP. In addition, the replies are weighted based on bandwidth, hops, and reliability, but it is usually multicast. If there is more than one host on any particular channel, implemented as a simple hop count. Neighboring routers use this the second and subsequent ones, on hearing the first one respond, information to construct their own spanning trees. don’t bother to respond. • The multicast part is fairly simple. The only difference is that for each multicast group, a pruned copy of the spanning tree is kept. It is pruned in that routes which have not requested membership in that multicast group are pruned off the tree.

(a) (b)

(a) Spanning Tree (b) Pruned Spanning Tree

Copyright 1997 by Russ Tront Page 14-9 Copyright 1997 by Russ Tront Page 14-10 • Because it is based on the Distance Vector Protocol, DVMRP suffers 14.7 Multicast Extensions to OSPF from all the well-known problems associated with that protocol, like the • count to infinity problem. Unlike DVMRP, Multicast OSPF often actually runs on a router. The • There are very few routers that actually can run Mrouted. In the recent multicast extensions for OSPF are a fairly new package, and are still in past, it has mainly run only on multi-homed Unix hosts on or near the the experimental phase. They are defined in RFC 1584. • that were experimenting with multicasting. Newer It is hoped that multicast OSPF, sometimes called MOSPF will machines and in particular some routers are now running a multicast eventually remove the need for DVMRP throughout the Internet. extension to OSPF. • MOSPF is based on an adaptation of Dijkstra’s algorithm. Recall that Dijkstra’s algorithm involves each router computing a shortest path tree from itself to all other computers in the network. But for multicasting, the algorithm must be modified. Routers must compute the shortest path tree rooted at the source instead of itself. • Some current implementations of MOSPF can also deal with DVMRP and Mrouted. The IETF has requested that this backwards compatibility be maintained in all new implementations, to make the transition easier.

Copyright 1997 by Russ Tront Page 14-11 Copyright 1997 by Russ Tront Page 14-12 14.8 MBONE 14.8.1 The Concept of Tunnelling • MBONE stands for “multicast backbone”. It is a group of multicast • Tunnelling is the concept of encapsulating a lower level protocol into a capable routers that agree to talk to each other across the Internet, using higher level protocol to pass it across a network which does not tunnelling to pass packets through links lacking multicast support. understand that lower level protocol. • The MBONE, like the original ARPAnet, was an experiment, but it • Many parts of the Internet do not yet support IGMP and MOSPF. In quickly became an experiment that people have become dependent on. order for multicasts to traverse such barren parts of the Internet, It is growing exponentially, and is quickly moving beyond the grasp of tunnelling is used. its originators, the IETF. • As with any new , it would be impossible to get all • An IP multicast router is a computer configured as a gateway, which users to adopt multicast ability overnight, if at all. Not everyone has a runs a multicast routing protocol. When one of these computers needs use for multicasting, or the technical ability or equipment necessary to to forward a multicast packet through a link that does not support implement it. multicast, it prepends it with another IP header. It sets the source of that header to the multicast router at the other end of the link, and the protocol field to 4, which means the payload protocol of the IP packet is IP.

• The multicast routing daemon on the receiving router recognises that the packet is tunnelled IP, and it strips off the extra header. It then forwards the packet, if necessary tunnelling it through to another system. • The MBONE is coordinated by a hierarchical series of mailing lists. There are regional mailing lists under a series of continental mailing lists, which are themselves under a general mailing list. If an organization wishes to join the MBONE, they send a request to their regional mailing list. The group closest geographically to the new organization speaks up, and the two parties then move off the mailing list and set up any necessary tunnelling details.

Copyright 1997 by Russ Tront Page 14-13 Copyright 1997 by Russ Tront Page 14-14 14.8.2 Fan Out Problem 14.9 References One of the largest problems in the MBONE is fan out. [Comer00] Internetworking with TCP/IP: Volume 1: Principles, Protocols and Architecture, 4th Ed., by Douglas Comer, Prentice Hall, 2000. Router [Goncalves99] IP Multicasting: Concepts and Applications, Marcus Goncalves and Kitty Niles, McGraw-Hill, 1999.

Imagine a large multicast packet, or worse, a high speed stream of [Huitema95] Routing in the Internet by Christian Huitema, Prentice Hall, multicast packets, coming in to the Router along the single link. The 1995. router must break out into multiple packets to send out over multiple interfaces. As the number of outbound links increases, the router becomes [Tanenbaum96] Computer Networks, Third Edition by Andrew S. increasingly overloaded making and sending copies. To prevent this Tanenbaum, Prentice Hall, 1996. problem, the IETF attempts to manage the overall layout of the MBONE. As the MBONE, like the Internet, is growing exponentially, this is [Thomas96] IPng and the TCP/IP Protocols: Implementing the Next presently problematic, and will no doubt become impossible in the future. Generation Internet, by Steven Thomas, Wiley Computer Publishing, 1996. 14.8.3 MBONE Map Maps of the current MBONE are available by ftp from Xerox Palo Alto [Stevens94] TCP/IP Illustrated, Volume 1 by Richard Stevens, Addison- Research Center (PARC) at parcftp.xerox.com. They are available in Wesley, 1994. different levels of abstraction, from a high level map that fits on a single page, to detailed maps taking up many pages. 14.9.1 Online References The MBONE FAQ is available online at: http://www.cs.columbia.edu/~hgs/internet/mbone-faq.html ThereusedtobeanMBONEwebsiteatwww.mbone.com, but it seems to have been taken over by strange company. Perhaps the MBONE is so well deployed in the year 2001 that they have given up their DNS name. ‘‘Overview of IP Multicasting’’ including ‘‘Enterprise-Wide Multicast: Microsoft Netshow and the Microsoft Multicast Network’’ at: http://www.cisco.com/warp/public/cc/techno/tity/ipmu/tech/ipmc_ wp.htm Copyright 1997 by Russ Tront Page 14-15 Copyright 1997 by Russ Tront Page 14-16