NUS.SOC.CS5248 Ooi Wei Tsang
IP Multicast
CS5248
NUS.SOC.CS5248OOI Wei Tsang
You are Here
Network
Encoder
Sender
Middlebox
Receiver
Decoder
NUS.SOC.CS5248OOI Wei Tsang
Communication Models
Traditional Applications:One-to-One
receiversender
NUS.SOC.CS5248OOI Wei Tsang
Communication Models
Media Applications:One-to-Many
sender
receivers
NUS.SOC.CS5248OOI Wei Tsang
Communication Models
Media Applications:Many-to-Many
NUS.SOC.CS5248OOI Wei Tsang
Naïve SolutionCreate M unicast connection for M
clients
NOT Scalable!
NUS.SOC.CS5248OOI Wei Tsang
Famous Example
Victoria’s Secret Spring Fashion Show Live Broadcast in 1999 Video bit-rate: 28 Kbps Number of viewers: 1.5 Millions
NUS.SOC.CS5248 Ooi Wei Tsang
IP Multicast
NUS.SOC.CS5248OOI Wei Tsang
New Model: IP Multicast
sender
receivers
NUS.SOC.CS5248OOI Wei Tsang
Group and Members
NUS.SOC.CS5248OOI Wei Tsang
Sending to a Group
NUS.SOC.CS5248OOI Wei Tsang
Joining and Leaving
NUS.SOC.CS5248OOI Wei Tsang
Anyone can Send
NUS.SOC.CS5248OOI Wei Tsang
Multicast AddressGroup ID or “Multicast address”
224.0.0.0 – 239.255.255.255
NUS.SOC.CS5248OOI Wei Tsang
Unicast
RouterRouter
Router
Router
A
B
C
SABC
NUS.SOC.CS5248OOI Wei Tsang
Multicast
RouterRouter
Router
Router
A
B
C
SG
NUS.SOC.CS5248OOI Wei Tsang
Multicast
RouterRouter
Router
Router
A
B
C
S
G
G
NUS.SOC.CS5248OOI Wei Tsang
Multicast
RouterRouter
Router
Router
A
B
C
S G
G
NUS.SOC.CS5248OOI Wei Tsang
Question 1
Router
G?
should I forward this packet to my
subnet?
NUS.SOC.CS5248OOI Wei Tsang
Question 2
RouterRouter
Router
Router
which neighbors should I
forward this packet?
NUS.SOC.CS5248 Ooi Wei Tsang
Group Management
NUS.SOC.CS5248OOI Wei Tsang
Group ManagementRouters maintain “local host group
membership table”
“which group has a member in my subnet ?”
NUS.SOC.CS5248OOI Wei Tsang
IGMP v1.0
JOIN messageA : “I want to join group G.”
QUERY messageR : “Which group have you joined ?”
NUS.SOC.CS5248OOI Wei Tsang
IGMP v1.0
MEMBERSHIP Report
A : “I am a member of group G”A : “I am a member of group H”B : “I am a member of group G”
NUS.SOC.CS5248OOI Wei Tsang
Avoiding Implosion
Select random delay tAfter time t, if nobody belongs to
the same group, send membership report.
Resend the report after some delay just to be safe.
NUS.SOC.CS5248OOI Wei Tsang
Leave If no one in group G after a few
query messages, remove G from local host membership table.
Problem: Long leave latency (minutes)
NUS.SOC.CS5248OOI Wei Tsang
IGMP v2.0LEAVE message
“I want to leave group G”
Group-Specific Query“Anybody else belongs to group G ?”
NUS.SOC.CS5248OOI Wei Tsang
IGMP v3.0Group-Source Inclusion
“I want to listen to S from group G”
Group-Source Exclusion“I do not want to listen to S from group G”
NUS.SOC.CS5248OOI Wei Tsang
Question 2
RouterRouter
Router
Router
which neighbors should I
forward this packet?
NUS.SOC.CS5248 Ooi Wei Tsang
Routing Protocols
NUS.SOC.CS5248OOI Wei Tsang
Routing ProtocolsGeneric Methods :
Form a tree to all routers with members
Deliver the packets along the tree
NUS.SOC.CS5248OOI Wei Tsang
Shortest Path TreeOne tree for each source for each
group
NUS.SOC.CS5248OOI Wei Tsang
Shared TreeOne tree for each group
NUS.SOC.CS5248OOI Wei Tsang
Routing ProtocolsDVMRP CBTPIM
NUS.SOC.CS5248 Ooi Wei Tsang
DVMRP
Distance Vector Multicast Routing Protocol
NUS.SOC.CS5248OOI Wei Tsang
From S to G
R P
Q
T
NUS.SOC.CS5248OOI Wei Tsang
R P
Q
T
Is R on the shortest path to S ?
NUS.SOC.CS5248OOI Wei Tsang
R P
Q
T
If no.. ignore the packet
NUS.SOC.CS5248OOI Wei Tsang
R P
Q
T
If yes.. continueWhere
should I forward it
to ?
NUS.SOC.CS5248OOI Wei Tsang
R P
Q
T
Forward to subnet?
NUS.SOC.CS5248OOI Wei Tsang
TruncationRouter checks local host
membership table.Duplicate the packets only if there
is a member in the subnet.
NUS.SOC.CS5248OOI Wei Tsang
R P
Q
T
Truncation
NUS.SOC.CS5248OOI Wei Tsang
R P
Q
T
?
?
Forward to Neighbors?
NUS.SOC.CS5248OOI Wei Tsang
Observation If neighbor is going to ignore my
packets, don’t need to send the packets to it.
NUS.SOC.CS5248OOI Wei Tsang
R P
Q
T
Exchanging Routing Tables
Dest Next Hop Cost
S P 4
A T 3
B P 2
NUS.SOC.CS5248OOI Wei Tsang
FloodingDefault : Always send to
neighboring routers, unless told otherwise.
NUS.SOC.CS5248OOI Wei Tsang
PruningRouters who received a “useless”
packet send a prune message back.
“Don’t send me packets addressed to G anymore !”
NUS.SOC.CS5248OOI Wei Tsang
R P
Q
T
NUS.SOC.CS5248OOI Wei Tsang
R P
Q
TPRUNE
NUS.SOC.CS5248OOI Wei Tsang
R P
Q
T
NUS.SOC.CS5248OOI Wei Tsang
R P
Q
TGRAFT
NUS.SOC.CS5248OOI Wei Tsang
R P
Q
T
NUS.SOC.CS5248OOI Wei Tsang
R P
Q
T
PRUNE
NUS.SOC.CS5248OOI Wei Tsang
A router needs to remember.. If it has any member for group G in
its subnet
Where to forward packets from source S to group G Which neighbors will not throw my
packets away Which sub-trees are pruned
NUS.SOC.CS5248OOI Wei Tsang
Periodically Rebuild TreeDVMRP periodically forget about
everything it learned
Why? To clean-up “left-over” states for
groups that are no longer active.
NUS.SOC.CS5248OOI Wei Tsang
Problems of DVMRPNot Scalable
O(|S||G|)
Not Efficient Flooding initially Periodically exchange routing
tables
NUS.SOC.CS5248 Ooi Wei Tsang
CBT
Core-based Tree
NUS.SOC.CS5248OOI Wei Tsang
Core Based TreeOne tree per group
Pick a router as core Identity of core can be pre-
configured or computing using some multicast address to core address mapping.
NUS.SOC.CS5248OOI Wei Tsang
A Shared Tree
core PQ
RU
V
W
NUS.SOC.CS5248OOI Wei Tsang
V Joins G
core PQ
RU
V
JOIN
W
NUS.SOC.CS5248OOI Wei Tsang
V Joins G
core PQ
RU
V
JOIN
W
NUS.SOC.CS5248OOI Wei Tsang
V Joins G
core PQ
RU
V
ACK
W
NUS.SOC.CS5248OOI Wei Tsang
V Joins G
core PQ
RU
V
ACK
W
NUS.SOC.CS5248OOI Wei Tsang
V Joins G
core PQ
RU
V
W
NUS.SOC.CS5248OOI Wei Tsang
U Joins G
core PQ
RU
VJOIN
W
NUS.SOC.CS5248OOI Wei Tsang
U Joins G
core PQ
RU
VACK
W
intercept!
NUS.SOC.CS5248OOI Wei Tsang
Echo
core PQ
RU
V
W
NUS.SOC.CS5248OOI Wei Tsang
Flush!
core PQ
RU
VX
W
NUS.SOC.CS5248OOI Wei Tsang
Send (on Tree)
core PQ
RU
V
W
NUS.SOC.CS5248OOI Wei Tsang
Send (Not on Tree)
core PQ
RU
V
W
NUS.SOC.CS5248OOI Wei Tsang
CBT StrengthsScalable
O(|G|) states
No floodingNo exchange of states
NUS.SOC.CS5248OOI Wei Tsang
CBT WeaknessesCore placement mattersSingle point of failureCore can become bottleneck
NUS.SOC.CS5248 Ooi Wei Tsang
SPT vs. ST
NUS.SOC.CS5248OOI Wei Tsang
Experiment 1 “Shared tree has worst delay than
shortest path tree. How much worst?”
Generate 500 random networks, 50 nodes each, 10-member groups
NUS.SOC.CS5248OOI Wei Tsang
Experimental Results
Node Degree
Delay Ratio (CBT/SPT)
1
~1.4
NUS.SOC.CS5248OOI Wei Tsang
Experiment 2 “CBT causes traffic to concentrate
on a set of links. How bad is this concentration?”
Generate 500 random networks, 50 nodes, 300 groups, 40 members, 32 senders
NUS.SOC.CS5248OOI Wei Tsang
Experimental Results
Node Degree
Max Number of Flows/Link
6K
9K
CBT
SPT
NUS.SOC.CS5248 Ooi Wei Tsang
PIM
Protocol Independent Multicast
NUS.SOC.CS5248OOI Wei Tsang
PIMGet the best of both world :
dense mode : shortest path sparse mode : shared tree
NUS.SOC.CS5248OOI Wei Tsang
PIM-DMSimilar to DVMRP, except
send to neighbors even if they will ignore my packets
NUS.SOC.CS5248OOI Wei Tsang
PIM-SMSimilar to CBT except
links are uni-directional
core PQ
RU
V
W
NUS.SOC.CS5248OOI Wei Tsang
Join
P coreQ
R
join
NUS.SOC.CS5248OOI Wei Tsang
Send (SM)
P coreQ
R
S
NUS.SOC.CS5248OOI Wei Tsang
Switch (Join S)
P coreQ
R
S
switch
NUS.SOC.CS5248OOI Wei Tsang
Switch
P coreQ
R
S
switch
NUS.SOC.CS5248OOI Wei Tsang
Prune
P coreQ
R
S
prune
NUS.SOC.CS5248OOI Wei Tsang
SummaryWhat is IP Multicast?How to route packets
IGMP DVMRP/CBT/PIM
NUS.SOC.CS5248OOI Wei Tsang
So, why can’t we multicast?Who assign multicast address?Who pay for multicast traffic?How to inter-operate between
protocols?How can we prevent DoS?
NUS.SOC.CS5248 Ooi Wei Tsang
System Design Considerations
or “What I learned from Multicast Routing Protocols”
NUS.SOC.CS5248OOI Wei Tsang
Practical IssuesMoney mattersSecurity matters
NUS.SOC.CS5248OOI Wei Tsang
ScalabilityMinimize states
Avoid implosion random timer
Avoid hot spot
NUS.SOC.CS5248OOI Wei Tsang
RobustnessPeriodically forget (soft-states)
Echo messages (alive messages)
NUS.SOC.CS5248OOI Wei Tsang
Minimize Interface /Coupling
do not assume unicast routing protocol
NUS.SOC.CS5248OOI Wei Tsang
Middle Ground If you have two schemes with
different pros/cons, think
“middle ground”
NUS.SOC.CS5248 Ooi Wei Tsang
Possible Survey and Project Topics
NUS.SOC.CS5248OOI Wei Tsang
Application-Level Multicast
NUS.SOC.CS5248OOI Wei Tsang
Single Source MulticastMost media applications do not
require many-to-many communication.
Single Source Multicast protocols have been proposed
NUS.SOC.CS5248 Ooi Wei Tsang
Transport Layer
NUS.SOC.CS5248OOI Wei Tsang
TCP vs UDPTCP offers
packet ordering reliability flow control
UDP just send!
NUS.SOC.CS5248OOI Wei Tsang
TCP vs UDPContinuous media uses UDP
Retransmission may not be useful Flow control makes throughput
unpredictable Multicast + TCP has problems
NUS.SOC.CS5248OOI Wei Tsang
UDP Header
struct UDPHeader{short src_port;short dst_port;short length;short checksum;
}
NUS.SOC.CS5248OOI Wei Tsang
Is UDP Enough?Who sent this packet?How do I interpret this packet?When was this packet generated?Which packets come first?
NUS.SOC.CS5248OOI Wei Tsang
RTP “Real-Time Transport Protocol” (not really a transport protocol)
Provides source identification sequence number time stamping payload identification