560 likes | 661 Views
IP Multicast -- Internet Design Case Study. What is multicast? Why multicast? Understand the “spirit”, not necessarily the detail Some design/implementation principles we’ll use: indirection soft state randomization … Evolution of IP Multicast and Lessons learned. Motivation.
E N D
IP Multicast-- Internet Design Case Study • What is multicast? Why multicast? • Understand the “spirit”, not necessarily the detail • Some design/implementation principles we’ll use: • indirection • soft state • randomization • … • Evolution of IP Multicast and Lessons learned CSci5221: IP Multicast
Motivation • Often want to send data to many machines at once • Video distribution (TV broadcast) • Teleconferences, etc. • News updates • Using unicast to reach each individual is hard and wasteful • Sender state: ~O(n) and highly dynamic • Total load: ~O(nd) where d is net diameter • Hotspot load: load ~O(n) on host and first link • Multicast: • Sender state: O(1), total load O(d log n), hotspot load O(1) CSci5221: IP Multicast
Multicast: act of sending datagram to multiple receivers with single “transmit” operation Question: how to achieve multicast Multicast routers (red) duplicate and forward multicast datagrams Multicast: one sender to many receivers • Network multicast • router actively participate in multicast, making copies of packets as needed and forwarding towards multicast receivers CSci5221: IP Multicast
Indirection Indirection: rather than reference an entity directly, reference it (“indirectly) via another entity, which in turn can or will access the original entity "Every problem in computer science can be solved by adding another level of indirection" -- Butler Lampson x A B CSci5221: IP Multicast
128.59.16.12 128.119.40.186 multicast group 226.17.30.197 128.34.108.63 128.34.108.60 Multicast via Indirection multicast group concept: represented by a “logical” (multicast) address -- use of indirection • sender sends IP datagrams to the “logical” multicast address • routers forward multicast datagrams to hosts that have “joined” that multicast group CSci5221: IP Multicast
Issues and Challenges • How does a host (user) join in a multicast group? • How to do to leave the group? • Who manages group membership dynamics? • Membership is dynamic, but should it be open, i.e., anyone can join a multicast group? • Who can send to the multicast group? • What state does a router need to maintain? • When a router receives an IP datagram destined to a multicast group, where should it forward to? • Scalability: • With number of members in a group; also with number of groups • Other issues: • address allocation, mapping applications to multicast groups CSci5221: IP Multicast
Design Alternatives • Telephone/ATM Model: • source/root-based: “one-to-many” multicast • mcast group associated and controlled by source/root • receiver joins a group by sending request to source/root • routing state installed during the “signaling” process • routing entry: [mcast address, {interface1,…, interfacek}] • IP Multicast Model • “many-to-many” multicast • open membership: anyone can join and leave at will • also anyone (not necessarily part of mcast) can send! • best-effort delivery CSci5221: IP Multicast
IP Multicast Service Model (rfc1112) • Each group identified by a single IP address • Groups may be of any size • Members of groups may be located anywhere in the Internet • Members of groups can join and leave at will • Senders need not be members • Group membership not known explicitly • Analogy: • Each multicast address is like a radio frequency, on which anyone can transmit, and to which anyone can tune-in. CSci5221: IP Multicast
1 1 1 0 Group ID IP Multicast Addresses • Class D IP addresses • 224.0.0.0 – 239.255.255.255 • How to allocate these addresses? • Well-known multicast addresses, assigned by IANA • Transient multicast addresses, assigned and reclaimed dynamically, e.g., by “sdr” program CSci5221: IP Multicast
IP Multicast Service Model (cont’d) Division of Responsibilities: • Host’s responsibility to register interest with networks • IGMP (Internet Group Management Protocol) • Network’s responsibility to deliver packets to host • Multicast Routing Protocols • Left unspecified: • Address assignment (random, MASC, etc.) • Application-to-group mapping (session directory, etc.) Performance Goal: • roughly equivalent to unicast best-effort service in terms of drops/delays • efficient tree • no complicated forwarding machinery, etc. • low join/leave latency CSci5221: IP Multicast
IP Multicast Architecture Service model Hosts Host-to-router protocol(IGMP) Routers Multicast routing protocols(various) CSci5221: IP Multicast
IP Multicast API and Multicast Routers • Sending – same as before • Receiving – two new operations • Join-IP-Multicast-Group(group-address, interface) • Leave-IP-Multicast-Group(group-address, interface) • Receive multicast packets for joined groups via normal IP-Receive operation • Implemented using socket options • Multicast Routers: • Learn of existence of multicast groups (through advertisement) • Identify links with group members • Establish state to route packets • replicate packets on appropriate interfaces • routing entry: mcast address src, incoming interface List of outgoing interfaces CSci5221: IP Multicast
Internet Group Management Protocol • End system to router protocol is IGMP • Each host keeps track of which mcast groups are subscribed to • Socket API informs IGMP process of all joins • Objective is to keep router up-to-date with group membership of entire LAN • Routers need not know who all the members are, only that members exist CSci5221: IP Multicast
How IGMP Works Routers: Q • On each link, one router is elected the “querier” • Querier periodically sends a Membership Query message to the all-systems group (224.0.0.1), with TTL = 1 • On receipt, hosts start random timers (between 0 and 10 seconds) for each multicast group to which they belong Hosts: CSci5221: IP Multicast
How IGMP Works (cont.) Routers: Q • When a host’s timer for group G expires, it sends a Membership Report to group G, with TTL = 1 • Other members of G hear the report and stop their timers • Routers hear all reports, and time out non-responding groups Hosts: G G G G CSci5221: IP Multicast
How IGMP Works (cont.) • Note that, in normal case, only one report message per group present is sent in response to a query • Power of randomization + suppression • Query interval is typically 60-90 seconds • When a host first joins a group, it sends one or two immediate reports, instead of waiting for a query CSci5221: IP Multicast
Multicast Scope Control – Small TTLs • TTL expanding-ring search to reach or find a nearby subset of a group s 1 2 3 CSci5221: IP Multicast
Multicast Scope Control – Large TTLs • Administrative TTL Boundaries to keep multicast traffic within an administrative domain, e.g., for privacy or resource reasons The rest of the Internet TTL threshold set oninterfaces to these links,greater than the diameterof the admin. domain An administrative domain CSci5221: IP Multicast
Routing Techniques • Basic objective – build distribution tree for multicast packets Three Basic Techniques • Source-based trees: flood and prune • Separate shortest path tree for each sender • Begin by flooding traffic to entire network • Prune branches with no receivers • Examples: DVMRP, PIM-DM • Unwanted state where there are no receivers CSci5221: IP Multicast
Routing Techniques (cont’d) • Core or share-tree based protocols • Specify “meeting place” aka core • Sources send initial packets to core • Receivers join group at core • Requires mapping between multicast group address and “meeting place” • Examples: CBT, PIM-SM • Link-state multicast protocols • Routers advertise groups for which they have receivers to entire network • Compute trees on demand • Example: MOSPF • Unwanted state where there are no senders CSci5221: IP Multicast
Source-based Trees Router Source S Receiver R R R R S S R CSci5221: IP Multicast
Shared Tree Router Source S Receiver R R R RP R S S R CSci5221: IP Multicast
Shared vs. Source-Based Trees • Source-based trees • Shortest path trees – low delay, better load distribution • More state at routers (per-source state) • Efficient for in dense-area multicast • Shared trees • Higher delay (bounded by factor of 2), traffic concentration • Choice of core affects efficiency • Per-group state at routers • Efficient for sparse-area multicast • Which is better? CSci5221: IP Multicast
Distance-Vector Multicast Routing:Basics • DVMRP consists of two major components: • A conventional distance-vector routing protocol (like RIP) • A protocol for determining how to forward multicast packets, based on the routing table • DVMRP router forwards a packet if • The packet arrived from the link used to reach the source of the packet (reverse path forwarding check – RPF) • If downstream links have not pruned the tree CSci5221: IP Multicast
DVMRP (cont’d) • Developed as a sequence of protocols: • Reverse Path Flooding (RPF) • Reverse Path Broadcast (RPB) • Truncated Reverse Path Broadcasting (TRPB) • Reverse Path Multicast (RPM) • General Philosophy: multicast = pruned broadcast • Don’t construct new tree, merely prune old one • Observation: • Unicast routing state tells router shortest path to S • Reversing direction sends packets from S without forming loops CSci5221: IP Multicast
Basic Forwarding Rule • Routing state: • To reach S, send along link L • Flooding Rule: • If a packet from S is received along link L, forward on all other links (reverse path forwarding check) • This works fine for symmetric links • Ignore asymmetry today • This works fine for point-to-point links • Can result in multiple packets sent on LANs CSci5221: IP Multicast
Example • Flooding can cause a given packet to be sent multiple times over the same link S x y a duplicate packet z b CSci5221: IP Multicast
Broadcasting Extension • For each link, and each source S, define parent and child • Parent: shortest path to S (ties broken arbitrarily) • All other routers on link are children • Broadcasting rule: only parent forwards packet to L • Problem fixed • But this is still broadcast, not multicast! CSci5221: IP Multicast
Multicast = Pruned Broadcast • Start with full broadcast (RPB) • If leaf has no members, prune state • Send non-membership report (NMR) • If all children of a router R prune, then router R sends NMR to parent • New joins send graft to undo pruning CSci5221: IP Multicast
Example Topology G G S G CSci5221: IP Multicast
Broadcast with Truncation G G S G CSci5221: IP Multicast
Prune G G Prune (s,g) Prune (s,g) S G CSci5221: IP Multicast
Graft G G G Report (g) Graft (s,g) Graft (s,g) S G CSci5221: IP Multicast
Steady State G G G S G CSci5221: IP Multicast
Problems with Approach • Starting with broadcast means that all first packets go everywhere • If group has members on most networks, this is ok • But if group is sparse, this is lots of wasted traffic • What about a different approach: • Source-specific tree vs shared tree • Pruned broadcast vs explicitly constructed tree CSci5221: IP Multicast
Core Based Trees (CBT) • Ballardie, Francis, and Crowcroft, • “Core Based Trees (CBT): An Architecture for Scalable Inter-Domain Multicast Routing”, SIGCOMM 93 • Similar to Deering’s Single-Spanning Tree • Unicast packet to core, but forwarded to multicast group • Tree construction by receiver-based “grafts” • One tree per group, only nodes on tree involved • Reduce routing table state from O(S x G) to O(G) CSci5221: IP Multicast
Example • Group members: M1, M2, M3 • M1 sends data root M1 M2 M3 control (join) messages data CSci5221: IP Multicast
Disadvantages • Sub-optimal delay • Small, local groups with non-local core • Need good core selection • Optimal choice (computing topological center) is NP complete CSci5221: IP Multicast
Multicast OSPF (MOSPF) • Add-on to OSPF (Open Shortest-Path First,a link-state, intra-domain routing protocol) • Multicast-capable routers flag link state routing advertisements • Link-state packets include multicast group addresses to which local members have joined • Routing algorithm augmented to compute shortest-path distribution tree from a source to any set of destinations CSci5221: IP Multicast
Example Source 1 Z W Q T Receiver 1 Receiver 2 CSci5221: IP Multicast
Link Failure/Topology Change Source 1 Z W Q T Receiver 1 Receiver 2 CSci5221: IP Multicast
Membership Change Source 1 Z Receiver 3 W Q T Receiver 1 Receiver 2 CSci5221: IP Multicast
Impact on Route Computation • Can’t pre-compute multicast trees for all possible sources • Compute on demand when first packet from a source S to a group G arrives • New link-state advertisement • May lead to addition or deletion of outgoing interfaces if it contains different group addresses • May lead to re-computation of entire tree if links are changed CSci5221: IP Multicast
Why Isn’t Multicast Pervasive? • (Reasonably) Sound technology • But fairly complex, with several versions of protocols • Implemented in most routers • Used by some enterprises • But not deployed/used on public Internet CSci5221: IP Multicast
Possible Explanations • Lack of demand (up until now?) • Lack of membership/sender control • Many services need it: who can join, who cannot • Also needed for billing, etc. • Hard to implement sender control: • Can be subject to (and used to amplify) DoS attack • Multicast address scarcity • global allocation required • Inter-domain issues: • Violates current ISP settlement model • No incentive for ISPs to enable multicast • …. CSci5221: IP Multicast
Design Alternative: Single-Source Multicast • Multicast Channel Concept: • Each multicast group associated with a source • Defined by [source, multicast address] • Implications: • Each group has only one source, address allocation non-issue! • each source can allocate 16 millions “channels” • Sender control easy! • Forwarding using source and dest. (multicast) IP addresses • Use Reverse Path Multicast algorithm • Add a counting mechanism for estimating group size • Use a recursive CountQuery message • Use app-level relays to for multiple sources CSci5221: IP Multicast
Other Issues w/ Multicast For example: How to make multicast reliable?(a la TCP to IP unicast) • FEC can help, but isn’t perfect • Must have retransmissions • But sender can’t keep state about each receiver • Has to be told when someone needs a packet CSci5221: IP Multicast
SRM Design Approach • Let receivers detect lost packets • By holes in sequence numbers • They send NACK when loss is detected • Any node can respond to NACK • NACK/Response implosion averted through suppression • Send NACKs at random times • If hear NACK for same data, reset NACK timer • If node has data, it resends it, using similar randomized algorithm CSci5221: IP Multicast
Repair Request Timer Randomization • Chosen from the uniform distribution on • A: node that lost the packet • S: source • C1,C2 : algorithm parameters • dS,A: latency between S and A • i: iteration of repair request tries seen • Algorithm • Detect loss set timer • Receive request for same data cancel timer, set new timer • Timer expires send repair request CSci5221: IP Multicast
Adaptive Timers • C and D parameters depends on topology and congestion choose adaptively • After sending a request: • Decrease start of request timer interval • Before each new request timer is set: • If requests sent in previous rounds, and any dup requests were from further away: • Decrease request timer interval • Else if average dup requests high: • Increase request timer interval • Else if average dup requests low and average request delay too high: • Decrease request timer interval CSci5221: IP Multicast