ip multicast lecture 2: pim-sm carl harris communications network services virginia tech

35
IP Multicast Lecture 2: PIM-SM Carl Harris Communications Network Services Virginia Tech

Upload: jacquelyn-rosett

Post on 15-Dec-2015

224 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: IP Multicast Lecture 2: PIM-SM Carl Harris Communications Network Services Virginia Tech

IP MulticastLecture 2: PIM-SM

Carl Harris

Communications Network Services

Virginia Tech

Page 2: IP Multicast Lecture 2: PIM-SM Carl Harris Communications Network Services Virginia Tech

Game Plan

• Part I: IP Multicast Fundamentals

• Part II: Protocol Independent Multicast, Sparse Mode (PIM-SM).

• Part III: Interdomain Multicast, Multicast-Only Topologies.

• Part IV: Layer 2 Optimizations and Oddities. PIM-DM, DVMRP Overview.

Page 3: IP Multicast Lecture 2: PIM-SM Carl Harris Communications Network Services Virginia Tech

Part II Agenda

• PIM-SM Motivation and architecture.

• Distribution tree construction and packet forwarding.

• Distribution tree maintenance.

• PIM-SM over multi-access networks.

• PIM Neighbor discovery.

• RP discovery and failover.

• Parallel routers at a source: Assertion.

Page 4: IP Multicast Lecture 2: PIM-SM Carl Harris Communications Network Services Virginia Tech

Exercise 1

• What additional forwarding rule(s) is (are) needed if a router has both a source and a receiver connected to the same interface?

Page 5: IP Multicast Lecture 2: PIM-SM Carl Harris Communications Network Services Virginia Tech

Forwarding ReviewSource S sends a packet to group

R1

2

H1

H2

H3(*,G) iif=NULL oif=1,2

3

S

4. R decrements the TTL of thepacket (now TTL=1). Assuming that neither interface 1 nor 2 has a TTL threshold set, R forwards the packet according to thecreated (S,G) state.

2. R receives the packet, and verifies that the packet passes the RPF test. 1. S sends a packet

addressed to G, with TTL=2.

3. The packet matches only (*,G).R creates (S,G) iif=3 oif=1,2.

Page 6: IP Multicast Lecture 2: PIM-SM Carl Harris Communications Network Services Virginia Tech

Multicast Packet Forwarding

• When a packet is received by a router from a directly connected source S addressed to a group G:– If neither (S,G) nor (*,G) state exists, the packet

is dropped. We make an exception when PIM-SM is the multicast routing protocol.

– If (S,G) state exists, its entry timer is refreshed and the packet will be forwarded using the oif list for the (S,G) state.

Page 7: IP Multicast Lecture 2: PIM-SM Carl Harris Communications Network Services Virginia Tech

Multicast Packet Forwarding

– If no (S,G) state exists and the packet matches (*,G) state, the (S,G) state is created.

• iif is set to the interface on which the packet was received

• oif is copied from the (*,G) state, excluding the interface on which the packet was received. Note that by this rule, iif cannot be in the oif list, since the iif leads back to S.

Page 8: IP Multicast Lecture 2: PIM-SM Carl Harris Communications Network Services Virginia Tech

Forwarding ExerciseSource and receiver on the same interface

R1

2

H1H4

H3(*,G) iif=NULL oif=1,2,3

3

S

4. R decrements the TTL of thepacket (now TTL=1). Assuming that neither interface 1 nor 2 has a TTL threshold set, R forwards the packet according to thecreated (S,G) state.

1. S sends a packetaddressed to G, with TTL=2.

3. The packet matches only (*,G).R creates (S,G) iif=3 oif=1,2

H2

2. H4 and R both receive the packet, R verifies that the packet passes the RPF test.

Page 9: IP Multicast Lecture 2: PIM-SM Carl Harris Communications Network Services Virginia Tech

Exercise 2

• IGMP could be used as a primitive multicast routing protocol. Consider the case of two routers interconnected on a backbone, each with some local subnets that have active receivers for a group G. Place a source on a subnet connected to one of the routers. What additional IGMP actions will need to take place between the routers to forward the source to all receivers?

– Need a “Hello” mechanism so that neighboring IGMP routers can meet each other.

– When a (*,G) state is created, send a membership report on every interface that leads to neighboring IGMP routers.

Page 10: IP Multicast Lecture 2: PIM-SM Carl Harris Communications Network Services Virginia Tech

IGMP Exercise

R12

R23 3

2

1 1

3. R1 sends membershipreport for G on interface 3.

7. R2 sends a membershipreport for G on interface 3

4. R2 creates(*,G) iif=NULL oif=3

H3

5. H3 joins G.

2. R1 creates(*,G) iif=NULL oif=1

8. R1 updates(*,G) iif=NULL oif=1,3

9. R1 updates(*,G) iif=NULL oif=1,2,3

H1

1. H1 joins G.

6. R2 updates(*,G) iif=NULL oif=1,3

H2

8. H2 joins G.

Page 11: IP Multicast Lecture 2: PIM-SM Carl Harris Communications Network Services Virginia Tech

IGMP Exercise

R12

H1

H2

R23 3

2

H3

1 1

S1

S2

(*,G) iif=NULL oif=1,2,3

(*,G) iif=NULL oif=1,3

1. S1 sendsa packet togroup G.

2. R2 checks RPF then creates (S1,G) iif=2 oif=1,3and forwards the packet.

3. R1 checks RPF then creates(S1,G) iif=3 oif=1,2and forwards the packet.

Why did R1 set oif=1,2 ?

This S is different than othersfor which we’ve seen an RPFcheck. What’s different?

Page 12: IP Multicast Lecture 2: PIM-SM Carl Harris Communications Network Services Virginia Tech

IGMP Exercise

R12

H1

H2

R23 3

2

H3

1 1

S1

S2

(*,G) iif=NULL oif=1,2,3(S1,G) iif=3 oif=1,2

(*,G) iif=NULL oif=1,3(S1,G) iif=2 oif=1,3

3. R2 checks RPF then creates (S2,G) iif=3 oif=1and forwards the packet.

2. R1 checks RPF then creates(S2,G) iif=1 oif=2,3and forwards the packet.

1. S2 sendsa packet to group G.

Page 13: IP Multicast Lecture 2: PIM-SM Carl Harris Communications Network Services Virginia Tech

IGMP ExerciseObservations

• When a router creates (*,G) state, this triggers unsolicited membership reports to be sent to neighboring IGMP routers.

• The result is a spanning tree that connects to all receivers of group G.

• When a source S is discovered, the creation of (S,G) state propagates along the spanning tree, starting at the first-hop router that connects to S.

Page 14: IP Multicast Lecture 2: PIM-SM Carl Harris Communications Network Services Virginia Tech

IGMP ExerciseAdditional exercises

• What happens if the network topology contains a cycle (more than one non-parallel path that leads to the same receiver)?

• If there are n sources, how many (S,G) state entries must be maintained on every router along the spanning tree for a group G?

Page 15: IP Multicast Lecture 2: PIM-SM Carl Harris Communications Network Services Virginia Tech

PIM-SM Motivating Observations

• Compared to the scale of the global Internet, receivers and senders of nearly any multicast content are sparsely populated over a very wide area.– 100,000 or more 2 and 3 member groups.

• An internet often contains many possible paths between a source S and any multicast receiver for a group G.

Page 16: IP Multicast Lecture 2: PIM-SM Carl Harris Communications Network Services Virginia Tech

PIM-SM Motivating Observations

• Flood and prune protocols discover receivers by sending packets everywhere, and pruning back when there are no receivers.– Examples: DVMRP, PIM-DM, MOSPF– The Internet has link speeds that vary from

dial-up 56k to OC48c and beyond.– Even in the LAN environment, high bit-rate

multicast flooding is impractical.

Page 17: IP Multicast Lecture 2: PIM-SM Carl Harris Communications Network Services Virginia Tech

Founding Principles

• Protocol Independent Multicast, Sparse-Mode (PIM-SM) was designed around three fundamental principles:– Avoid unnecessary flooding of multicast

packets to network segments with no receivers.– Support good-quality distribution trees for

heterogeneous applications.– Minimize bandwidth consumed by protocol

overhead.

Page 18: IP Multicast Lecture 2: PIM-SM Carl Harris Communications Network Services Virginia Tech

PIM-SM Architecture

• The PIM-SM architecture is characterized by these features:– Shared and Shortest-Path distribution trees.

• All participants for a group G can use a shared distribution tree. Permits very large scale.

• Last hop routers can initiate a switch to shortest-path trees for certain sources when needed (e.g. as data rates or delay requirements warrant, and scale permits).

Page 19: IP Multicast Lecture 2: PIM-SM Carl Harris Communications Network Services Virginia Tech

PIM-SM Architecture

– Explicit join/prune tree management. Routers with local or downstream receivers join (or leave) a distribution tree by sending explicit join (or prune) messages toward sources. We say that PIM-SM is thus receiver driven.

• Compare this to protocols that discover where receivers aren’t located by flooding packets everywhere and listening for complaints.

Page 20: IP Multicast Lecture 2: PIM-SM Carl Harris Communications Network Services Virginia Tech

PIM-SM Architecture

– Routing protocol independence. Makes use of existing unicast routing functionality to adapt to topology changes, but in a manner that is independent of the particular protocol used.

Page 21: IP Multicast Lecture 2: PIM-SM Carl Harris Communications Network Services Virginia Tech

Rendezvous Point

• In PIM-SM, for every multicast group G there exists a router known as the rendezvous point (RP).– The RP is the root of the shared tree for group

G. We also call this tree the RP tree (RPT).– Sources for group G are discovered when their

(S,G) packets are forwarded down the RPT.– Every router in a PIM domain must know the

RP for every group G. In many cases, the same router is used as the RP for every group.

Page 22: IP Multicast Lecture 2: PIM-SM Carl Harris Communications Network Services Virginia Tech

Rendezvous Point

– In a PIM domain, there is only one RP for any group G at any particular time.

– We will use the notation RP(G) to denote the RP mapping for a group G.

Example: RP(G) = A means that router A is the RP for group G. Note that RP(G) is a unicast IP address.

– Later we’ll talk about bootstrap:• allows routers to learn RP mappings• eliminates the RP as a single point of failure• leads to a definition of the term PIM domain

Page 23: IP Multicast Lecture 2: PIM-SM Carl Harris Communications Network Services Virginia Tech

Shortest Path Trees

• The shortest path tree (SPT) for a source S sending to a group G is a tree rooted at the first-hop router for S such that for every receiving host R, the path between R and S consists of the smallest number of inter-router links among all possible paths between R and S.– Need to modify this definition for routing

protocols that allow the assignment of arbitrary link costs.

Page 24: IP Multicast Lecture 2: PIM-SM Carl Harris Communications Network Services Virginia Tech

PIM Control Messages

• PIM control messages are encapsulated in IP packets, with a unique protocol identifier.– Most PIM control messages are sent as

multicast packets with address 224.0.0.13 (all PIM routers). Note that this address has link scope.

– Certain PIM control messages sent between a router with a directly connected source and the RP are sent as unicast packets.

Page 25: IP Multicast Lecture 2: PIM-SM Carl Harris Communications Network Services Virginia Tech

Distribution Tree MaintenanceJoin/Prune Messages

• The PIM Join/Prune message is used to construct and dismantle group distribution trees.

• Join/Prune messages are multicast by a router to the all PIM routers group address (224.0.0.13) so that all directly connected routers can “hear” the message and update state accordingly.

Page 26: IP Multicast Lecture 2: PIM-SM Carl Harris Communications Network Services Virginia Tech

Distribution Tree MaintenanceJoin/Prune Messages

• Each Join/Prune message contains– Address of a group G whose distribution tree

will be modified.– List of sources to forward on a particular link in

the distribution tree for G. (join list)– List of sources to drop on a particular link of

the distribution tree for G. (prune list)– Upstream (RPF) neighbor address, needed in

multi-access network operation.

Page 27: IP Multicast Lecture 2: PIM-SM Carl Harris Communications Network Services Virginia Tech

Shared Tree Construction

• The shared tree (RPT) for a group G is constructed as receivers join the group.– IGMP detects the presence of directly

connected group receivers and creates or updates (*,G) state.

– When (*,G) state is created, the iif is set to the RPF interface for RP(G). Why?

– The creation of (*,G) state triggers a Join/Prune message to be sent towards the RP for group G.

Page 28: IP Multicast Lecture 2: PIM-SM Carl Harris Communications Network Services Virginia Tech

PIM Example Constructing the shared tree for G

2. Create (*,G) iif=2 oif=3

4. Create (*,G) iif=NULL oif=2

6. Create (*,G) iif=2 oif=4

8. Update (*,G) iif=NULL oif=1,2

B

A

C1

2

3

1 2

1

2

3

4

RP(G) = A

R1

1. Host R1 sends an IGMPmembership report for group G

3. C sends Join/Prune towards RP for G (i.e. router A) Group=G Join=A, WC, RPTPrune=NULL

R2

5. Host R2 sends an IGMPmembership report for group G

7. B sends Join/Prune Group=G Join=A, WC, RPTPrune=NULL

Page 29: IP Multicast Lecture 2: PIM-SM Carl Harris Communications Network Services Virginia Tech

B

A

C1

2

3

1 2

1

2

3

4

RP(G) = A

PIM Example RPT for G connecting hosts R1 and R2

R2

R1

(*,G) iif=NULL oif=1,2

(*,G) iif=2 oif=3

(*,G) iif=2 oif=4

Page 30: IP Multicast Lecture 2: PIM-SM Carl Harris Communications Network Services Virginia Tech

Joining the RPT for G

• When a PIM router wants to join the RPT for a group G, the Join/Prune message contains:– Group address to join.– RP address is in the join list.– Prune list is NULL.– Wildcard (WC) and RP tree (RPT) flags are set

in the join list entry for the RP• this is the indication for an RPT join for group G.

• there are other uses for these flags.

Page 31: IP Multicast Lecture 2: PIM-SM Carl Harris Communications Network Services Virginia Tech

Propagating Join/Prune

• Join/Prune messages always flow from the leaves of a distribution tree toward the root – whether it’s an RPT or an SPT

• Join/Prune messages are not acknowledged by upstream routers– PIM uses periodic retransmission, instead

Page 32: IP Multicast Lecture 2: PIM-SM Carl Harris Communications Network Services Virginia Tech

Propagating Join/Prune

• Join/Prune messages are sent only in response to a trigger event.

• The fundamental trigger events are:– Changes in group membership.

• As discovered by IGMP or triggered by an expired entry timer or outgoing interface timer.

– Discovery of new sources for a group. • We’ll see how this works, shortly.

Page 33: IP Multicast Lecture 2: PIM-SM Carl Harris Communications Network Services Virginia Tech

Propagating Join/Prune

• PIM routers never forward Join/Prune messages.– When a Join/Prune message is received by a

router, its contents are used to modify forwarding states.

• Changes the shape of group distribution trees.

– State changes that occur as the result of a Join/Prune message may trigger Join/Prune messages to be sent towards upstream routers.

Page 34: IP Multicast Lecture 2: PIM-SM Carl Harris Communications Network Services Virginia Tech

PIM ExampleConstructing the shared tree for G

A2

B3 3

2

1 1

3. A sends Join/Prune towards B (the RP for G). Group=G Join=B, RPT, WCPrune=NULL

4. B creates(*,G) iif=NULL oif=3

R3

5. R3 joins G.

2. A creates(*,G) iif=3 oif=1

8. A updates(*,G) iif=3 oif=1,2

6. B updates(*,G) iif=NULL oif=1,3

R2

7. R2 joins G.

RP(G) = B

R1

1. R1 joins G.

Page 35: IP Multicast Lecture 2: PIM-SM Carl Harris Communications Network Services Virginia Tech

PIM ExampleThe RPT for G

A2

H1

H2

B3 3

2

H3

1 1

(*,G) iif=3 oif=1,2

(*,G) iif=NULL oif=1,3

RP(G) = B