Unformatted text preview:

Data Communication and Networks*cast DefinitionsWhy Multicast, why not Unicast?Why Multicast, why not Broadcast?Multicast ApplicationsIP Multicast - ConceptsIP Multicast BenefitsMulticast addressesLink-Layer Multicast AddressesNIC, IP Stack, Apps Cooperate!IP Multicast - SendingIP Multicast - ReceivingMulticast ScopeIGMPIP Multicast in JavaSlide 16Slide 17Let’s See Multicast in ActionReliable MulticastSlide 20Slide 21Pragmatic General MulticastOverview of PGMPGM Packet TypesPGM Transmit WindowSource FunctionsSource Functions (continued)Receiver FunctionsReceiver Functions (continued)Network Element FunctionsNetwork Element Functions (cont’d)Operation - No ErrorsReceiver Operation: Packet LossNetwork Element Operation: Packet LossSource Operation: Packet LossPragmatic General MulticastRMPRMP: Quality of ServiceAbout Total Ordering:RMP - ConceptsRMP: Token PassingRMP: Ack,NakRMP: Avoiding Nak ImplosionRMP: Protocol ModelPacket Reception vs. DeliveryPacket StabilityRMP: ObservationsData Communication and NetworksLecture 12IP MulticastDecember 8, 2005Joseph ConronComputer Science DepartmentNew York [email protected]*cast Definitions•Unicast - send to one destination (198.122.15.20)•General Broadcast - send to EVERY local node (255.255.255.255)•Directed Broadcast - send to subset of nodes on lan (198.122.15.255)•Multicast - send to every member of a Group of “interested” nodes (Class D address).•RFC 1112 (an easy read!)Why Multicast, why not Unicast?•Unicast:–Many applications require same message sent to many nodes (10, 100, 1000, n)–Same message transits network n times.–n messages requires n*(CPU time) as 1 message–Need to deliver “timely” information.•Message arrives at node n >> node 1Why Multicast, why not Broadcast?•Broadcast: –Send a copy to every machine on the net–Simple, but inefficient–All nodes “must” process the packet even if they don’t care–Wastes more CPU cycles of slower machines (“broadcast radiation”)–General broadcast cannot be routed–Directed broadcast is limited in scope (to machines on same sub-net or same domain)Multicast Applications•News/sports/stock/weather updates•Software distribution•Video-conferencing, shared whiteboards•Distributed interactive gaming or simulations•Email distribution lists•Database replicationIP Multicast - Concepts•Message sent to multicast “group” of receivers–Senders need not be group members–Each group has a “group address”–Groups can have any size;–End-stations (receivers) can join/leave at will–Data Packets are UDP (uh oh!)IP Multicast Benefits•Distribution tree for delivery/distribution of packets (i.e., scope extends beyond Lan)–Tree is built by multicast routing protocols. Current multicast tree over the internet is called MBONE•No more than one copy of packet appears on any sub-net. •Packets delivered only to “interested” receivers => multicast delivery tree changes dynamically•Non-member nodes even on a single sub-net do not receive packets (unlike sub-net-specific broadcast)Multicast addresses•Class D addresses: 224.0.0.0 - 239.255.255.255•Each multicast address represents a group of arbitrary size, called a “host group”•Addresses 224.0.0.x and 224.0.1.x are reserved. See assigned numbers RFC 1700–Eg: 224.0.0.2 = all routers on this sub-net•Addresses 239.0.0.0 thru 239.255.255.255 are reserved for private network (or intranet) useLink-Layer Multicast Addresses0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 1 1 1 1 0 01 1 1 0 28 bits23 bitsIP multicast addressGroup bitEthernet and other LANs using 802 addresses:LAN multicast addressLower 23 bits of Class D address are inserted into the lower 23 bits of MAC address (see RFC 1112)0x01005eNIC, IP Stack, Apps Cooperate!•Idea - NIC does not accept packets unless some app on this node wants it (avoid non-productive work).•How does it know which packets to accept?–App “joins” group with Class D address–IP stack gives class D info to NIC–NIC builds “filter” to match MAC addresses–Latch on to:•Own address, MAC broadcast, or “Group” addressIP Multicast - Sending•Use normal IP-Send operation, with multicast address specified as destination•Must provide sending application a way to:–Specify outgoing network interface, if >1 available–Specify IP time-to-live (TTL) on outgoing packet–Enable/disable loop-back if the sending host is/isn’t a member of the destination group on the outgoing interfaceIP Multicast - Receiving•Two new operations–Join-IP-Multicast-Group(group-address, interface)–Leave-IP-Multicast-Group(group-address, interface)•Receive multicast packets for joined groups via normal IP-Receive operationMulticast Scope•Scope: How far do transmissions propagate?•Implicit scope: –Reserved Mcast addresses => don’t leave subnet.•TTL-based scope:–Each multicast router has a configured TTL threshold–It does not forward multicast datagram if TTL <= TTL-threshold–Useful at edges of a large intranet as a blanket parameterIGMP•Router sends Host Membership Query to 224.0.0.1 (all multicast hosts on sub-net)•Host responds with Host Membership report for each group to which it belongs, sent to group address (224.0.0.2)•Router periodically broadcasts query to detect if groups have gone away•Hosts send reports when join or leave groupIP Multicast in Java•Java has a Multicast Socket Class•Use it to “join” a multicast group.MulticastSocket s = null;InetAddress group = null; try { group = InetAddress.getByName(“227.1.2.3”); s = new MulticastSocket(5555); s.joinGroup(group);} catch (UnknownHostException e) { } catch (IOException e) { }IP Multicast in Java•Receive DatagramPackets on a MulticastSocketDatagramPacket recv = new DatagramPacket(buf, buf.length);try { s.receive(recv);} catch (IOException e) { System.out.println("mcastReceive: " + e.toString()); return;}// get messageString msg = new String(recv.getData(), recv.getOffset(), recv.getLength());IP Multicast in Java•To send, just send a DatagramPacket to the multicast address, port (no need to use a MulticastSocket, although you could)group = InetAddress.getByName(“227.1.2.3”);s = new DatagramSocket();DatagramPacket snd = new DatagramPacket(buf, buf.length, group, 5555);try { s.send(snd);} catch (IOException e) { System.out.println("mcastSend: " + e.toString()); return;}Let’s See Multicast in ActionReliable


View Full Document

NYU CSCI-GA 2262 - IP Multicast

Download IP Multicast
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view IP Multicast and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view IP Multicast 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?