methods and needs for multicast applications siavash samadian barzoki university of tehran
TRANSCRIPT
Methods and Needs Methods and Needs for for MulticastMulticast ApplicationsApplications
Methods and Needs Methods and Needs for for MulticastMulticast ApplicationsApplications
Siavash Samadian BarzokiSiavash Samadian BarzokiUniversity of TehranUniversity of Tehran
2
Multicast Addressing• multicast address a set of Internet hosts comprising a
multicast group.• Senders : Dest. Address = multicast address• IP multicast group Class D address• Class D address : 1110 + 28 bit multicast group ID
224.0.0.0 to 239.255.255.255 0 1 2 3 ----------- 28 bits ---------- 1 1 1 0 Multicast Group ID• 224.0.0.0 is reserved.• 224.0.0.1 to 224.0.0.225 reserved for permanent
assignments to various uses, including routing protocols and other protocols that require a well-known permanent address.
3
Multicast Addressing• Some of the well-known groups include :
“all systems on this subnet” 224.0.0.1“all routers on this subnet” 224.0.0.2“all DVMRP routers” 224.0.0.4“all OSPF routers” 224.0.0.5“all OSPF designated routers” 224.0.0.6“all RIP2 routers” 224.0.0.9“all PIM routers” 224.0.0.13“all CBT routers” 224.0.0.15
• The remaining groups are either permanently assigned to various multicast applications or are available for dynamic assignment (239.0.0.0 to 239.255.255.255 for “Administratively scoped” applications)
4
Mapping a Class D Address to an IEEE-802 MAC Address
• The block begin with 01-00-5E (hex) of the IEEE-802 MAC-layer multicast address space is used for IP multicast groups.
• The low order 23 bits of class D address is replaced by the low order 23 bits of MAC-layer multicast address block.
234.138.8.5 (EA-8A-08-05) : 1110 1010 1000 1010 0000 1000 0000 0101224.10.8.5 (E0-0A-08-05) : 1110 0000 0000 1010 0000 1000 0000 0101225.138.8.5 (E1-8A-08-05) : 1110 0001 1000 1010 0000 1000 0000 0101
IEEE-802 MAC-layer multicast address : 0000 0001 0000 0000 0101 1110 0 000 1010 0000 1000 0000 0101Hex: 0 1 0 0 5 E 0 A 0 8 0 5
5
IP Multicast MAC Address Mapping
(FDDI & Ethernet)
224.1.1.1224.129.1.1225.1.1.1225.129.1.1 . . .238.1.1.1238.129.1.1239.1.1.1239.129.1.1
0x0100.5E01.0101
1 - Multicast MAC Address(FDDI and Ethernet)
32 - IP Multicast Addresses
Be Aware of the 32:1 Address OverlapBe Aware of the 32:1 Address Overlap
6
Internet Group Management Protocol (IGMP)
Host-to-Router Protocols (IGMP)
Hosts
RoutersMulticast Routing Protocols (PIM)
7
Internet Group Management Protocol (IGMP)
• How hosts tell routers about group membership• RFC 1112 and RFC 2236 specify IGMPv1 and IGMPv2• IGMPv3 work-in-progress• More than 1 router on a LAN a router is elected as a querier• The querier is responsible for periodically querying the LAN
for the presence of any group members• Group Specific Query Message, TTL=1 is sent• The members if any set a random timer• On timer expiration the host sends a Report message and
the other members suppress their same Reports
8
Internet Group Management Protocol (IGMP)
• A host first joins a group sends an IGMP Report rather than waiting for a router’s IGMP Query to reduce Join Latency
• Join Latency : the interval from a host’s first IGMP Report sent until the first packet for that group arrives on that host’s subnetwork.
• A host leaves a group sends an Leave Group message• Inclusion Group-Source Report message to select the specific
sources and Exclusion Group-Source Report message to block some sources’ traffic
9
Internet Group Management Protocol (IGMP)
H3
• Host sends IGMP Report to join group
H3224.1.1.1
Report
H1 H2
Joining a Group
10
Internet Group Management Protocol (IGMP)
Source = 1.1.1.1Group = 224.1.1.1
H1 - Member of 224.1.1.1
R1
R3
R2
Source = 2.2.2.2Group = 224.1.1.1
• H1 wants to receive from S = 1.1.1.1 but not from S = 2.2.2.2
• With IGMP, specific sources can be pruned back - S = 2.2.2.2 in this case
IGMPv3:Join 1.1.1.1, 224.1.1.1Leave 2.2.2.2, 224.1.1.1
11
Multicast Routing in Extended LANs
• Broadcast based :1. Single-Spanning Tree Multicast Routing
2. RPF (Reverse Path Flooding)
3. RPB (Reverse Path Broadcasting)
• Multicast based :1. TRPB (Truncated Reverse Path Broadcasting)
2. RPM (Reverse Path Multicasting)
12
Single-Spanning Tree Multicast Routing
• Compute a spanning tree among the bridges using a distributed algorithm
• A packet can be sent on the spanning tree• There can be a membership learning algorithm
A member of group G sends a membership-report to all-bridges group B periodically (Src. Adr.= G, Dest. Adr. = B)
The bridge adds G to a table entry (address, (outgoing-branch, age), (outgoing-branch, age), …) where address is set to G and outgoing-branch to the interface it received the report message
When a packet received by the bridge with Dest. Adr. = G, it will send it on the outgoing-branches which are in the table
13
Single-Spanning Tree Multicast Routing
GG
G GG
a b c
d
14
Single-Spanning Tree Multicast Routing
• Advantages : Relatively easy to implement a great deal of experience with spanning tree protocols in Internet community
• Disadvantages : Centralize traffic on a small number of links
Computationally difficult to compute a spanning tree in large, complex topologies
15
Reverse Path Flooding (RPF)
• A router forwards a broadcast packet originating at source S if and only if it arrives via the shortest path from the router back to S (i.e., the “reverse path”). Otherwise the packet will be discarded
• The router forwards the packet out all incident links except the one on which the packet arrived.
• Disadvantage :
Any single broadcast packet may be transmitted more than once across any link, up to the number of routers that share the link.
16
Reverse Path Flooding (RPF)
•What is RPF?What is RPF?–A router forwards a multicast datagram if received on the interface used to send unicast datagrams to the source
B C
A F
SourceReceiver
Unicast
Multicast
D E
17
Reverse Path Flooding (RPF)
• The RPF CheckThe RPF Check1. The routing table used for multicasting is checked
against the “source” IP address in the packet.
2. If the datagram arrived on the interface specified in therouting table for the source address; then the RPF checksucceeds.
3. Otherwise, the RPF Check fails.
18
Reverse Path Flooding (RPF)
RPF Check Fails!
Unicast Route TableUnicast Route Table
NetworkNetwork Interface Interface
151.10.0.0/16151.10.0.0/16 S1S1
198.14.32.0/24198.14.32.0/24 S0S0
204.1.16.0/24204.1.16.0/24 E0E0
A closer look: RPF Check FailsRPF Check Fails
Packet Arrived on Wrong Interface!
E0
S1
S0
S2
S1S1
Multicast Packet fromSource 151.10.3.21
XDiscard Packet!
19
Reverse Path Flooding (RPF)
A closer look: RPF Check SucceedsRPF Check Succeeds
RPF Check Succeeds!
Unicast Route TableUnicast Route Table
NetworkNetwork Interface Interface
151.10.0.0/16151.10.0.0/16 S1S1
198.14.32.0/24198.14.32.0/24 S0S0
204.1.16.0/24204.1.16.0/24 E0E0
E0
S1
S0
S2
Multicast Packet fromSource 151.10.3.21
Packet Arrived on Correct Interface!S1S1
Forward out all outgoing interfaces.(i. e. down the distribution tree)
20
Reverse Path Broadcasting (RPB)
• Eliminates the duplicate broadcast packets generated by Reverse Path Forwarding
• It is necessary for each router to identify which of its links are “child” links in the shortest reverse path tree rooted at any given source S.
• When a broadcast packet originating at S arrives via the shortest path back to S, the router can forward it out only the child links for S.
21
Reverse Path Broadcasting (RPB)
Z
b
X Y
a
S
5 6
D=5 D=6
D=6
Child link
22
Reverse Path Broadcasting (RPB)
• Advantages :1. Easy to implement
2. Saving of link bandwidth and of host and router processing time achieved by eliminating duplicate broadcast packets.
• Disadvantages :1. Extra storage consumed by the children bit-map in each
routing table entry
2. It does not take into account multicast group membership extraneous datagrams may be forwarded onto subnetworks that have no group members
23
Truncated Reverse Path Broadcasting
(TRPB)• The previous algorithms used broadcasting and so were
wasting the bandwidth on the links that had no group members.
• In TRPB only non-member leaf networks are deleted from each broadcast tree.
• Leaf networks are the networks which have no downstream router.
• So the leaf networks must be found out and it must be determined if there is any member on the leaf network or not then.
24
Reverse Path Multicasting (RPM)
• Provides on-demand pruning of shortest-path multicast trees.• When a source first sends a multicast packet to a group, it uses TRPB
algorithm.• When the packet reaches a router for whom all of the child links are
leaves and none of them have members of the destination group, a non-membership report (NMR) for that (source, group) pair is generated and sent back to the router that is one hop towards the source.
• If the one-hop-back router receives NMRs from all of its child routers, and if its child links also have no members, it in turn sends an NMR back to its predecessor.
• Subsequent multicast packets from the same source to the same group are blocked from traveling down the unnecessary branches by the NMRs sitting in intermediate routers.
• A non-membership report includes an age field that is used to cancel the NMR effect after some time.
25
Reverse Path Multicasting (RPM)
S
R
R R
R RR
G
G
G G
1. Send based on TRPB2. Send Prune message3. Prune the branches
26
Intra-Domain Multicast vs. Inter-Domain Multicast
• 1992 to 1997 standardization and deployment focused on a single flat topology
• Beginning in 1997 the need for a hierarchical multicast infrastructure and inter-domain routing
• The existing protocols then categorized as intra-domain protocol
27
Multicast protocols – Distribution Trees
Shortest Path or Source Distribution Tree
Receiver 1
E
BA D F
Source 1Notation: (S, G) S = Source G = Group
C
Receiver 2
Source 2
28
Multicast protocols – Distribution Trees
Shared Distribution Tree
Receiver 1
E
BA D (Shared Root) F
Source 1Notation: (*, G) * = All Sources G = Group
C
Receiver 2
Source 2
29
Multicast Protocols - Characteristics
•Distribution trees– Source tree
–Uses more memory O(S x G) but you get optimal paths from source to all receivers, minimizes delay
– Shared tree–Uses less memory O(G) but you may get suboptimal paths from source to all receivers, may introduce extra delay
•Protocols–PIM, DVMRP, MOSPF, CBT
30
Multicast Protocols - Characteristics
• Types of multicast protocols– Dense-mode : The receivers are densely
populated• Broadcast and prune (flood & prune) behavior• Similar to radio broadcast
– Sparse-mode : The receivers are sparsely populated
• Explicit join behavior• Similar to pay-per-view
31
Multicast Protocols - DVMRP
• Stands for Distance Vector Multicast Routing Protocol• First protocol implemented on MBone• Broadcast and prune• Source Distribution Trees• Dense Mode Protocol• Uses own routing table (Distance Vector similar to
RIP)• Many implementations• Disadvantages :
1. Slow Convergence — RIP-like behavior2. Significant amount of multicast routing state information
stored in routers — (S,G) everywhere3. Protocol Dependent
32
Multicast Protocols - MOSPF
• Stands for Multicast Extensions to OSPF (Open Shortest Path First)
• Information about group receivers are included in the attached Link State (LS)
• Flood the area with LS same view of group membership in the area
• Source Tree Each router uses Dijkstra algorithm to compute shortest-path tree for each source and group
• Dense Mode or Sparse Mode ?! Membership information is broadcasted so dense mode , but data is sent to those receivers that specifically request it so sparse mode
33
MOSPF - Membership LSA’s
Membership LSA’sMembership LSA’s Membership LSA’sMembership LSA’s
Area 1 Area 2MABR1 MABR2
Area 0
MB
MB MAMAMA
34
MOSPF - Intra-Area Traffic
Area 1 Area 2MABR1
Area 0
(S1 , B) (S2 , A)
MABR2
MB
MBMA MA MA
Not receiving (SNot receiving (S2 2 , A) traffic, A) traffic
35
MOSPF - Inter-Area Traffic
Area 1 Area 2MABR1
Area 0
MB
MBMA MA MA
MABR2
Wildcard Receiver Flag(*, *)
Wildcard Receiver Flag(*, *)
(S1 , B) (S2 , A)
Wildcard Receivers “pull” traffic from all sources in the area.
Membership LSA’sMembership LSA’s Membership LSA’sMembership LSA’s
(GA , GB) (GA )SummarizedMembership LSA
SummarizedMembership LSA
MABR routers inject Summary Membership LSAs into Area 0.
36
MOSPF - Inter-Area Traffic
Area 1 Area 2MABR1
Area 0
(S1 , B) (S2 , A)
MABR2
Wildcard Receiver Flag(*, *)
Wildcard Receiver Flag(*, *)
Unnecessary Unnecessary traffic still flowing traffic still flowing to the MABR to the MABR Routers!!Routers!!
37
MOSPF - Inter-Area Traffic
Membership LSA’sMembership LSA’s Membership LSA’sMembership LSA’s
(GA , GB) (GA )
Area 1 Area 2MABR1 MABR2
Area 0
MA MAMA
MB
MB
SummarizedMembership LSA
SummarizedMembership LSA
External ASMASBR
(S1 , A)(S2 , B)
38
MOSPF - Inter-Area Traffic
External AS
Area 1 Area 2MABR1
Area 0
(S1 , B) (S2 , A)
MABR2
MASBR
Wildcard Receiver Flag(*, *)
Wildcard Receiver Flag(*, *)
Unnecessary traffic Unnecessary traffic may flow all the way may flow all the way to the MASBR to the MASBR Router!!Router!!
39
MOSPF - Disadvantages• Protocol dependent - works only in OSPF-
based networks• Significant scaling problems
– Dijkstra algorithm run for EVERY multicast (SNet, G) pair!
– Dijkstra algorithm rerun when:• Group Membership changes
• Line-flaps
40
PIM-DM• Stands for Protocol Independent Multicast – Dense Mode• Broadcast and prune • Source Distribution Trees • Fewer implementations than DVMRP• Branches that don't care for data are pruned• Grafts to join existing source tree• Uses asserts to determine forwarder for multi-access LAN• PIM-DM vs. DVMRP : DVMRP tries to avoid sending
unnecessary packets to neighbors who will then generate prune messages based on a failed RPF check. PIM-DM avoids this complexity, but the tradeoff is that packets are forwarded on all outgoing interfaces. Unnecessary packets are often forwarded to routers which must then generate prune messages because of the resulting RPF failure.
41
Asserts
PIM-DM
Source
Receiver 2Receiver 1
DD FF
II
BB
CC
AA
EE
GG
HH
Link
Data
Control
Initial Flood of Dataand Creation of State
Prune
Prune to Non-RPF NeighborC and D Assert to DetermineForwarder for the LAN, C Wins
I Gets PrunedE’s Prune is IgnoredG’s Prune is Overridden
Prune
Join Override
Prune
Graft
Receiver 3
New Receiver, I Sends Graft
42
PIM-SM (Overview)• Explicit join model
– Receivers join to the Rendezvous Point (RP)– Senders register with the RP– Data flows down the shared tree and goes only to
places that need the data from the sources– Last hop routers can join source tree if the data rate
warrants by sending joins to the source
• RPF check depends on tree type– For shared trees, uses RP address– For source trees, uses Source address
43
PIM-SM (Overview)• Only one RP is chosen for a particular group• RP statically configured or dynamically
learned (Auto-RP, PIM v2 candidate RP advertisements)
• Data forwarded based on the source state (S, G) if it exists, otherwise use the shared state (*, G)
• RFC 2326 - “PIM Sparse Mode Protocol Spec”
44
PIM-SM (Shared Tree Join)
Receiver
RP
(*, G) Join
Shared Tree
(*, G) State created onlyalong the Shared Tree.
45
PIM-SM (Sender Registration)
Receiver
RPSource
Shared Tree
(S, G) Join
(S, G) Register (unicast)
Source Tree
(S, G) State created onlyalong the Source Tree.Traffic Flow
46
PIM-SM (Sender Registration)
Receiver
RPSource
RP sends a Register-Stop back to the first-hop router to stop the Register process.
Shared Tree
Traffic Flow
Source Tree
(S,G) Register-Stop (unicast)
(S, G) Register (unicast)
(S, G) traffic begins arriving at the RP via the Source tree.
47
PIM-SM (Sender Registration)
Receiver
RPSource
Source Tree
Shared Tree
Traffic Flow
Source traffic flows nativelyalong SPT to RP.
From RP, traffic flows downthe Shared Tree to Receivers.
48
PIM-SM (SPT Switchover)
Receiver
RPSource
(S, G) JoinSource Tree
Last-hop router joins the Source Tree.
Additional (S, G) State is created along new part of the Source Tree.
Shared Tree
Traffic Flow
49
PIM-SM (SPT Switchover)
Receiver
RPSource
Source Tree
(S, G)RP-bit Prune
Traffic begins flowing down the new branch of the Source Tree.
Additional (S, G) State is created along the Shared Tree to prune off (S, G) traffic.
Shared Tree
Traffic Flow
50
PIM-SM (SPT Switchover)
Receiver
RPSource
Source Tree
Shared Tree
(S, G) Traffic flow is now pruned off of the Shared Tree and is flowing to the Receiver via the Source Tree.
Traffic Flow
51
PIM-SM (SPT Switchover)
Receiver
RPSource
Source Tree
Shared Tree
(S, G) traffic flow is no longer needed by the RP so it Prunes the flow of (S, G) traffic.
Traffic Flow
(S, G) Prune
52
PIM-SM (SPT Switchover)
Receiver
RPSource
Source Tree
Shared Tree
(S, G) Traffic flow is now only flowing to the Receiver via a single branch of the Source Tree.
Traffic Flow
53
PIM-SM • Advantages:
– Traffic only sent down “joined” branches
– Can switch to optimal source-trees for high traffic sources dynamically
– Unicast routing protocol-independent– Basis for inter-domain multicast
routing
54
IP Multicast Protocol Characteristics
DVMRPDVMRP
MOSPFMOSPF
PIM-DMPIM-DM
DenseDenseDistributionDistribution
SparseSparseDistributionDistribution
Extensible Extensible to IDMRto IDMR
Protocol-Protocol-IndependentIndependent
EfficientEfficient StandardsStandardsStatusStatus
IndustryIndustryUsageUsage
PIM-SMPIM-SM
XXXX
XX
XX
XX
XX
XX
XX
XX
XX
XX
XX
XX
XXXX
XX
CBTCBT XX XX XX XX
XX
XX
XX
XX
55
Any Questions ?