CS4254 Computer Network Architecture and Programming: Dr. Ayman A. Abdel-Hamid
CS4254 Computer Network Architecture and Programming: Dr. Ayman A. Abdel-Hamid
Multicasting
Multicasting
Outline
Multicasting (Chapter 21)
Multipoint Communications
IP Multicast
IPv4 Multicast addresses
Sending and Receiving Messages
Multicasting on a LAN
Multicasting on a WAN
Multicast Issues
Multicasting
Multipoint Communications
Multipoint communications support communications between
more than two hosts
One-to-many
Many-to-many
Unlike broadcast, allows a proper subset of hosts to participate
Example standards
IP Multicast (RFC 1112, standard)
Multicasting
Multipoint Servers
Passive Multipoint Server
a relay or reflector service
Provides no processing of the
data
Minimum requirement is for
transport-level semantics, so
can operate at the transport or
application level
Multicasting
Multicast Communication
Multicast abstraction is peer-to-peer
Application-level multicast
Network-level multicast
Requires router support (multicast-enabled routers)
Multicast provided at network protocol level IP multicast
Multicasting
Multicast Communication
Transport mechanism and network layer must support multicast
Internet multicast limited to UDP (not TCP)
Unreliable: No acknowledgements or other error recovery
schemes (perhaps at application level)
Connectionless: No connection setup (although there is
routing information provided to multicast-enabled routers)
Datagram: Message-based multicast
Multicasting
10
IP Multicast
IP supports multicasting
Uses only UDP, not TCP
Special IP addresses (Class D) identify multicast groups
Internet Group Management Protocol (IGMP) to provide
group routing information
Multicast-enabled routers selectively forward multicast
datagrams
IP TTL field limits extent of multicast
Requires underlying network and adapter to support broadcast or,
preferably, multicast
Ethernet (IEEE 802.3) supports multicast
Multicasting
11
Multicasting
12
13
14
15
Multicasting
16
Multicasting
17
Shared Tree
Multicasting
Source Trees
18
Multicasting
19
Multicasting
20
1/3
Multicasting
21
2/3
Multicasting
22
3/3
Multicasting
23
24
Multicast on a LAN
1/3
Multicasting
25
Multicast on a LAN
2/3
Packet passed to IP layer (IP layer compares group address against all
multicast addresses that applications on this host have joined perfect
filtering)
Packet passed to UDP layer, which passes it to socket bound to port 123
Multicasting
26
Multicast on a LAN
3/3
27
Multicast on a WAN
A program started on five hosts belonging to different LANs
Multicast routers communicate with neighbor routers using a multicast routing
protocol (MRP)
When a process on a host joins a multicast group, that host sends an IGMP
message to any attached multicast routers, which in turn exchange this
information using MRP with neighbor routers
When a sender sends a multicast message, mutlicast routing information is
used to direct the message
H1
MR1
MR2
MR5
MR3
MR4
H4
H2
H5
H3
Multicasting
28
Socket Options
Various attributes that are used to determine the behavior of
sockets (see chapter 7)
#include <sys/socket.h>
int getsockopt (int sockfd, int level, int optname, void * optval,
socklen_t *optlen);
int setsockopt (int sockfd, int level, int optname, const void * optval,
socklen_t optlen);
Both return 0 if OK, -1 on error
sockfd: an open socket descriptor
level: code in the system that interprets the option (general socket
code, or protocol-specific code) (SOL_SOCKET, IPPROTO_IP,
IPPROTO_IPv6, IPPROTO_TCP are examples)
optname: see page 193
Multicasting
30
Socket Options
Some socket options examples (see table on page 193 and 194)
For multicast socket options see section 21.6 on page 559
Socket Level
SO_SNDBUF, SO_RCVBUF, SO_KEEPALIVE,
SO_BROADCAST, SO_REUSEADDR,
SO_RESUEPORT
IP Level
IP_TTL, IPMULTICAST_IF, IPMUTLICAST_TTL,
IP_MULTICAST_LOOP, IP_ADD_MEMBERSHIP,
IP_DROP_MEMBERSHIP
TCP Level
TCP_KEEPALIVE, TCP_MAXSEG, TCP_NODELAY
Multicasting
31
Multicasting
32