Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "A look at IP-multicasting We propose a programming project to acquaint ourselves with TCP/IP ‘multicast’ capabilities."— 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 Class A address 0 Class B address Class C address MULTICAST address Reserved bits Address Range 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 – (the all-hosts group) – (the all-routers group) – (address-purpose is unassigned) – x (for local administration purpose)

4 Our multicast group Multicast applications should not use any multicast-addresses in the ‘special’ range (i.e., – ) 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: (easily remembered?)

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

6 Routers Router X Host A Host B Host C Host D Host E Host F Host G Host H Router Y Host I Host J Host K Host L Host M Host N Host O Host P Modern routers do not ‘forward’ broadcast datagrams, but they can be configured to ‘forward’ any multicast datagrams (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 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 socket() ‘multisend.cpp’ ‘multirecv.cpp’ sleep( 1 ) sendto() socket() setsockopt( REUSEADDR ) bind() setsockopt( ADDMEMBERSHIP ) 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 xxx ‘xxx’ equals 100 plus your number on the Instructor’s class-list (you can find it handwritten on your Midterm Exam)


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

Similar presentations


Ads by Google