Multicast Communications Tarik Čičić, 4. March. 06
Overview One-to-many communication, why and how Algorithmic approach: Steiner trees Practical algorithms Multicast tree types Basic concepts in multicast routing and protocols Next week: Multicast protocols Network-level Application-level
Casts Unicast: one-to-one Broadcast: one-to-all Multicast: one-to-group The group is a subset of all Most general notion Anycast: one-to-one-from-a-group
One-to-Many Communication Sender needs to send the same information to all three receivers Receiver Sender Router Receiver transmissions over the same link! Receiver 4
One-to-Many Communication Sender needs to send the same information to all three receivers Receiver Sender Router Receiver Only one transmission Receiver 5
IP Multicast Challenges Internet is designed for one-to-one communication IP packet header contains one source and one destination address How to Identify a group of users wishing to receive same data How the host tells the network it wishes to join a group Route packets efficiently Route between the networks 6
End-to-End Support. API Multicast uses Class D addresses 4.0.0.0 9.55.55.55 Sessions are associated to these addresses or groups. Host-network interface Internet Group Management Protocol (IGMP). Network (routing) 7 Application Application OS Main focus of this lecture OS Router Router Application Router OS
Graph-Algorithmic Background Network topology mapped to a graph G=(V, E) Problem: Given a node set S V, Create a spanning tree that interconnects S 8
Steiner Trees Each link in the tree has an associated cost The minimal spanning tree we call Steiner tree Constructing this tree is a well-known NP-complete problem 4 4 9
Approximate Algorithms 7 6 0 7 7 6 4 7 4 5 5 0
Approximate Algorithms () 6 7 4 5 4 Cost: 7 Optimal cost: 4
Approximate Algorithms () 4 4 4 4 Optimal tree (cost 4) Heuristic tree (cost 7)
Spanning Trees in Practice Creating a minimal spanning tree is an NP-complete problem More than one metric adds to the complexity (cost/delay optimization) Research shows that best effort trees are often quite good (0% costlier on average)
Spanning Trees in Practice () Practical algorithm: Use communication delay or # hops as metric Find the (unicast) shortest path between a special node and all other nodes in the group G This special node can be: An administratively assigned node: Core Based Tree (CBT) Data source: Shortest Path Tree (SPT) 4
Core Based and Shortest Path Trees 5 4 4 4 4 CBT SPT (Only two showed) Core
Building Multicast Trees Traffic flooding ( Flood-and-prune ) Include receivers by extending the tree until all reached Explicit messaging Receivers join the tree by sending control messages 6
Flood-and-Prune Senders start transmitting packets on all adjacent links Receivers Sender 7
Flood-and-Prune Senders start transmitting packets on all adjacent links Receivers Sender Candidate branch 8
Flood-and-Prune Routers forward data on all links except where the data arrived Receivers Sender Candidate branch 9
Flood-and-Prune Routing loops must be avoided! Receivers Sender Candidate branch 0
Flood-and-Prune Prune control messages are sent downstream on inactive links Receivers Sender Candidate branch
Flood-and-Prune Prunes are also sent downstream if prunes are received on all upstream interfaces Receivers Sender Candidate branch
Flood-and-Prune Receivers Sender Candidate branch Tree branch
Flood-and-Prune Receivers Sender Candidate branch Tree branch 4
Flood-and-Prune What if a new receiver wants to join? - Flooding is periodically repeated! Receivers Sender Candidate branch Tree branch 5
Flood-and-Prune Problem Can we flood the Internet in order to reach 5 receivers? NO! Flood-and-prune was used in the first Internet-wide multicast overlay (Mbone) This was the main reason why Mbone did not scale, collapsed under its own weight, and was abandoned 6
Reverse Path Forwarding Basis for explicit messaging protocols Utilizes the unicast routing tables Send control messages toward the known source (core) Reject data packets coming from directions other than source R OK, add (S, G): 4 Join (S, G) Discard multicast data from S at any interface except Multicast data is forwarded only in opposite direction of unicast data Prevents looping R (S, G): {4} {, 4} S 7
Explicit Messaging Receivers send a Join message to the group core (or source in SPT) Receivers Sender Core 8
Explicit Messaging Senders use unicast to reach the core in CBT Receivers (*, G): {, } Sender Core Tree branch pp stream 9
Taxonomy of Multicast Solutions Different categorizations: Tree type (CBT / SPT) Service model Unidirectional vs. bidirectional forwarding Intra- and inter-domain Protocol stack position 0
CBT vs. SPT Core Based Tree Multiple sources use the same tree, but single point of failure Fewer routers involved More complex operation, less optimal paths Shortest Path Tree Only one source Optimal path Scalability challenge due to increased amount of state information
Uni- or Bidirectional Forwarding Should the data flow along the multicast tree in one or both directions? 4 Unidirectional: for each branch in the multicast tree, data is flowing in one direction only Simple Most used (PIM-SM)
Bidirectional Forwarding Only, and 4 in the tree, do not send on and the incoming In multicast protocols with bidirectional forwarding, data flowing in both directions 4 More complex, seldom used in IP multicast
Service Models Single source (one-to-many) simple, one-tree approach (SPT) sufficient for most applications E.g.: IPTV streaming Multiple sources (many-to-many) general, powerful, but... problematic in many ways, security in particular E.g.: Conferencing 4
Multicast Addressing Class D address range in IPv4 4.0.0.0 9.55.55.55 Last 8 bits is the group ID 4.0.0.0 4.0.0.55 reserved Never forwarded by routers E.g. 4.0.0. all hosts ( try to ping, UNINETT is multicast friendly) 4.0.0. all routers 6
Global IPv4 Address Assignment Is problematic if no global rules GLOP: allocates 56 addresses to each AS 8 bits 8 bits 6 bits 0-55 AS number (GLOP was suggested before 4-byte AS numbers) PIM SSM introduces channel concept that prevents address collisions Requires knowledge of sender address Uses.0.0.0 -.55.55.55 7
Inter-Network Issues Multicast between network domains particularly challenging: scalability policing payments CBT core placement and communication heterogeneous multicast protocols Router Router Router? Router Router Router 8
General IP Multicast Issues Support only for unreliable, best-effort service Open service model Anyone can join, address collisions, DoS easy Service billing Scalability Most approaches target only one application class Patchy deployment 9
Protocol Stack Position Multicast can be implemented from physical to application level Network Layer (L) Multicast Very efficient Difficult to deploy Application Layer (L5-L7) Multicast Easy to deploy, no changes on lower layers Network system support not required, controlled by endsystems 40
Summary: What Have We Learned? Algorithms: Optimal multicast is an NP complete problem Good behavior in practice using simple means SPT and CBT Tree construction: Flood-and-Prune Explicit messaging Reverse Path Forwarding Uni- and bidirectional forwarding Many challenges, some could be solved on application level (more on that next week) 45