1 / 12

A look at IP-multicasting

A look at IP-multicasting. We propose a programming project to acquaint ourselves with TCP/IP ‘multicast’ capabilities. Multicast IP addresses. 32-bits. Address Range. Class A address. 0. 0.0.0.0 - 127.255.255.255. Class B address. 1. 0. 128.0.0.0 - 191.255.255.255. Class C address.

perryr
Download Presentation

A look at IP-multicasting

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A look at IP-multicasting We propose a programming project to acquaint ourselves with TCP/IP ‘multicast’ capabilities

  2. Multicast IP addresses 32-bits Address Range Class A address 0 0.0.0.0 - 127.255.255.255 Class B address 1 0 128.0.0.0 - 191.255.255.255 Class C address 1 1 0 192.0.0.0 - 223.255.255.255 1 MULTICAST address 1 1 0 224.0.0.0 - 239.255.255.255 1 Reserved 1 1 1 0 240.0.0.0 - 247.255.255.255 The range of IPv4 Network-Layer Addresses is subdivided into “classes” based on the high-order bits in these 32-bit addresses, with those which begin with “1110” (the Class D addresses) being allocated to multicasting

  3. Multicast Groups • The remaining 28-bits of an IP multicast address are used to identify the “group” that a datagram should be delivered to • There are some special multicast groups whose addresses you should avoid using • 224.0.0.1 (the all-hosts group) • 224.0.0.2 (the all-routers group) • 224.0.0.3 (address-purpose is unassigned) • 224.0.0.x (for local administration purpose)

  4. Our multicast group • Multicast applications should not use any multicast-addresses in the ‘special’ range (i.e., 224.0.0.0 – 224.0.0.255) designated for use by utilities devoted to maintenance and administration of the local network • So our example-programs define a ‘group’ whose IP-address lies outside this range, namely: 224.3.3.6 (easily remembered?)

  5. The ‘multicast’ concept Host A Host B Host C Host D Host E Local Area Network With IP-broadcasting, a datagram whose destination-address is equal to 255.255.255.255 will be received by every host on the local network Host A Host B Host C Host D Host E Local Area Network With IP-multicasting, a datagram whose destination-address is equal to 224.3.3.6 would be received only by those hosts on the local network that have chosen to become ‘members’ of this specific multicast-group

  6. Routers Host A Host I Modern routers do not ‘forward’ broadcast datagrams, but they can be configured to ‘forward’ any multicast datagrams Host B Host J Host C Host K Host D Host L Router X Router Y Host E Host M Host F Host N Host G Host O Host H Host P (Older routers can use ‘tunneling’)

  7. The socket API • Programming languages that support the ‘sockets’ interface can allow you to write client-and-server ‘multicast’ applications server client client client client But obviously the TCP ‘connection-based’ protocol is NOT used in multicasting!

  8. A Python example • We put up a very simple client-and-server multicast application on our class website, written in Python (for brevity) • ‘multisend.py’ (the ‘server’ program) • ‘multirecv.py’ (the ‘client’ program) • The server just sends a ‘Hello’ message to current group-members once each second • The client can be run on multiple hosts

  9. Project #2 • Write a multicast server-program (named ‘deadline.cpp’) that periodically sends out reminder-messages about upcoming due-dates for course-assignments or exams • Write the multicast client-program (named ‘timeleft.cpp’) that a student who desires to receive reminders can use to ‘join’ the server’s multicast-group

  10. The C++ versions • Your programs are required to be written in the C++ language, so we have put the rewritten versions of our ‘multisend’ and ‘multirecv’ application-programs on the class website as demonstration examples

  11. Organization ‘multirecv.cpp’ socket() setsockopt( REUSEADDR ) ‘multisend.cpp’ socket() bind() setsockopt( ADDMEMBERSHIP ) sleep( 1 ) sendto() recv() puts()

  12. ‘Unique’ group-address • For developing your own application, you will be sharing our local USF networks as the hardware ‘testbed’ for your C++ code • You’ll be annoyed if everyone’s messages arrive and get displayed on your screen! • So we need a different IP-multicast group address for each classmember 224.3.36.xxx ‘xxx’ equals 100 plus your number on the Instructor’s class-list (you can find it handwritten on your Midterm Exam)

More Related