multicast routing (chapter 4.8) - rutgers universitybadri/352dir/spring04/notes/...multicast...

Post on 26-Jul-2020

2 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Multicast routing (Chapter 4.8)

Outline

1. Advantages of multicast2. Multicast addressing3. IGMP 3. Multicast Routing Protocols4. Multicast in the Internet

Multicasting

UnicastA flow from one source to one destinationIP packets contain destination IP address

BroadcastA flow from one source to all destinationsIP packets contain broadcast address 255.255.2555.255

MulticastA flow from one source transmits to a Group of destinationsIP packets contain a class D address for destinationRanges from 224.0.0.0 to 239.255.255.255 (256K addresses)

Multicast vs. Multiple Unicast

11

22 33

11

22 33

Group AddressGroup Addressincludes includes 11, , 22 and and 33

PacketPacketduplicatedduplicated

PacketPacketduplicatedduplicated

Multiple Multiple UnicastUnicast:: Multicast:Multicast:

Advantages of Multicasting

Advantages:Lower overhead at the source

– Source sends only one packetBandwidth is conserved on shared links

– Only one copy of each packet is sent on each linkRequirements:

Group address management– Network/router participation

Packet duplication at routing nodesDisadvantages

Security Business modelsNo Incentives for deployment

Applications of Multicast

Push content to large population of usersVideo streams, audio streamsCaching servers

Resource discoveryCan send multicast queries (if destination is not known)Progressive or expanding ring search (increase TTL)

Publish/subscribe modelsEnd point identifiers need not be known apriori

Multimedia collaborationVideo conferencing

Remote sensing

Multicast Addressing

Class D address

Multicast addresses are in the range 224.0.0.0 through 239.255.255.255The set of hosts listening to a particular multicast address is called a host groupA sender of packets to a multicast group is known as a multicast sourceMulticast packets, at least for now, are sent only as UDP packets

Some of the addresses 224.0.0.0 to 224.0.0.15 are reserved for well-known groups239.0.0.0 to 239.255.255.255 are for local/administratively scoped applications

11 11 11 0028 bits28 bits

Multicast groupMulticast group

Mapping to Ethernet Addresses

Ethernet has a 48-bit address fieldIt has its own multicast address range

01.00.5e.00.00.00 through 01.00.5e.7f.ff.ffLower order 23 bits can be used for multicast addresses

IP multicast address has 28 bits for specifying a group addressThus, only the lower order 23 bits of IP multicast address are copied into the Ethernet address

Link-Layer Multicast Addresses

For Ethernet and other LANs using 802 addresses:Ranges from 01:00:5E:00:00:00 to 01:00:5E:FF:FF:FF

Map low-order 23 bits of class D address to lower order 23 bits of ethernet multicast address space

For point-to-point links: no mapping needed.

LAN multicast address(01:00:5E:00:00:00)0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 1 1 1 1 0 0

1 1 1 0 28 bits

23 bits

IP multicast address

group bit

Components of theIP Multicast Architecture

hosts

routers

service model

host-to-router protocol(IGMP)

multicast routing protocols(DVMRP, MOSPF,PIM)

Multicast service model

Uses the notion of host groupsSender sends to a group address

Any receiver who has joined this group gets this packetsImplications?

No limits on number or location of receiversBest effort delivery (same as in unicast)Dynamic membership

Host can join/leave at will (no synchronization required among group members)

Scope controlCan limit the distribution using TTL

TTL scope control

A multicast router will only forward a multicast datagram acrossan interface if the TTL value in the header is greater than the TTL value assigned to the interface

Unrestricted225

Restricted to the same continent128

Restricted to the same region63

Restricted to the same site15

Restricted to the same subnet1

Restricted to the same host0

TTLInitial scope

IGMP

Internet Group Management Protocol (IGMP)Allows a router to know which of its directly connected hosts belongs to which multicast groupIGMP is required to support TRPB, RPM, CBT and PIM protocols

IGMP (cont’d)

IGMP is part of the IP layerIGMP messages are transmitted in IP packets

IP header IGMPmessage

20 bytes 8 bytes

IGMPversion

IGMPtype (unused) 16-bit Checksum

32-bit group address (class D)

IGMP Host Queries

Routers uses IGMP “query” messages to periodically query hosts on their subnets and learn if they are members of any multicast group

Queries are addressed to all hosts group (224.0.0.1) and carry an IP TTL of 1 (no more than once a minute)Hosts who are members of multicast groups respond with one IGMP “report” message for each group they are a member ofTo improve efficiency, hosts wait a random amount of time before responding

– During this waiting time, hosts listen to other host responses– If another host reports membership in the same group, then the

first host aborts its report

IGMP Host QueriesAn Example

A B

Example: A and B are members ofmulticast group G1

IGMP query, TTL=1IGMP destination group = 0IP destination address = 224.0.0.1IP source address = router address

A waits100 ms

B waits200 ms

IGMP Host QueriesAn Example

A B

Example: A and B are members ofmulticast group G1

A responds100 ms later

B abortsresponsebecause ithears A’s

report

IGMP report, TTL=1IGMP destination group = G1IP destination address = G1IP source address = A

Router is nowaware that at least

one host on itssubnet is a member of G1

IGMP Host QueriesAn Example

A B

Example: A and B are members ofmulticast group G1

IGMP Reports

Hosts may also send IGMP reports when they first join a multicast groupIn this case they don’t need to wait for an IGMP query first

When hosts leave a group, they do not announceThe router will discover if no one is left in the group when it does its next IGMP query

A report is sent with IP destination address = G (that is being reported) and with an IP TTL =1Multicast routers receive all IP multicast datagrams, and therefore need not be addressed explicitly

IGMP Version 2

Changes from version 1:New message for group-specific Query message

– Is there any host on a specific multicast address– Allows router to send a group specific message

New message and procedures to reduce “leave latency”.– Leave group sent to all-routers group (224.0.0.2)– Querier will find out if this is the last host for this group by issuing a

query for that groupStandard querier election method specified

– Multicast router with the lowest IP address is elected as querierVersion and type fields merged into a single field.IGMP message types:Membership query, Membership report, Leave group

4.8.3. Multicast Routing Protocols

FloodingShared Spanning TreeSource-Based Spanning TreesReverse Path Forwarding (RPF)Truncated Reverse Path Broadcast (TRPB)Reverse Path Multicasting (RPM)DVMRP, PIM

Flooding

Same algorithm we saw for unicast routingA router copies a packet and transmits it on all outbound links (except the one the packet came in on)Routers keep a list of sequence numbers

If a packet with the same sequence number has already been seen, drop the packet

Flooding

B

A

C D

E

A communicateswith group G: {B,C,D}

Flooding

B

A

C D

E

A communicateswith group G: {B,C,D}

FloodingAdvantages and Disadvantages

Advantages:Simple to implementNo group management protocol required

Disadvantages:The router sequence number lists can grow very large, so this solution does not scaleRouters will still frequently receive the same packet more than oncePackets will end up going where they aren’t wanted

Source Based Trees

Instead of building one shared spanning tree for all multicast packets, use a separate spanning tree for each sourceEach source-based spanning tree is explicitly constructed using the shortest paths from the source to all other destinations

Source Based Trees (cont’d)

B

A

C D

E

All edges haveequal weights

Spanning Tree Path for (A, G)Spanning Tree Path for (C, G)etc...

Source Based Trees (cont’d)

B

A

C D

E

All edges haveequal weights

C communicateswith group G: {A,B,D}

Spanning Tree Path for (A, G)Spanning Tree Path for (C, G)etc...

Source Based Trees (cont’d)

B

A

C D

E

All edges haveequal weights

Source Based TreesAdvantages and Disadvantages

Advantages:Packets follow shortest paths to all destinationsNo duplicate packets are generated in the network

Disadvantages:Source Based Trees must be explicitly set upMulticast routing tables can grow very large, since they carry separate entries for each sourcePackets still arrive where they aren’t wanted

Reverse Path Forwarding

Also known as Reverse Path BroadcastRPF is a simple algorithm used to achieve source-based spanning trees implicitly

Unicast routing tables are used to make forwarding decisionsForwarding algorithm:

When packets arrive at a router,– If the packet arrives on a link the router would normally use to reach the

packet’s source, then the router forwards a copy of the packet on all other outgoing links

– If the packet arrives on another link, then it is discarded

RPF (cont’d)

B

A

C D

E

All edges haveequal weights

Will be discarded

Will be discarded

C communicateswith group G: {A,B,D}

RPF (cont’d)

B

A

C D

E

All edges haveequal weights

RPFAdvantages and Disadvantages

Advantages:Efficient and easy to implementNo sequence number tracking is requiredSource-based spanning trees are constructed implicitly using unicast routing tables; no explicit tree construction is required

Disadvantages:Some duplicate packets still arrive at routersPackets still go where they aren’t wanted

3.5 TRPB (Truncated RPB)

Extension of RPFUses special control messages so a router can determine if there are any members of the multicast group on the subnet

Control messages are generated by a special protocol called the Internet Group Management Protocol (IGMP)

If there are no members listening to the multicast group, the router truncates the spanning tree and does not forward packets addressed to that group on the subnet

TRPB (cont’d)

B

A

C D

E

All edges haveequal weights

Will be discarded

Will be discarded

Router is aware that E isnot a member of the multicastgroup

No packet sent to E

C communicateswith group G: {A,B,D}

TRPB (cont’d)

B

A

C D

E

All edges haveequal weights

TRPBAdvantages and Disadvantages

Advantages:Same advantages as RPF but with the improvement that packets no longer go to destination hosts that don’t want them

Disadvantages:Packets still go to every router in the network, even those thatdon’t need to receive them

Reverse Path Multicast (RPM)

Generalize the concept of truncating all the way back to the source.If a packet arrives and there are no group members downstream, arouter sends a “prune” message on the link from which the packetarrived.

Prune messages allow the parent router stop forwarding the group’s packets down unnecessary branches

RPM (cont’d)

B

A

C D

E

Will be discarded

Will be discarded

Router is aware that E isnot a member of the multicastgroup

No packet sent to E

C communicateswith group G: {A,B,D}

RPM (cont’d)

B

A

C D

E

C communicateswith group G: {A,B,D}

RPM (cont’d)

B

A

C D

E

Prune messages

Will be discardedWill be discardedC communicateswith group G: {A,B,D}

Later...

Branches pruned:Routers no longerforward packetsfrom C to G on these links

RPM (cont’d)

B

A

C D

E

RPM (cont’d)

Pruned branches only stay pruned for a limited time. After timing out, the pruned branches “grow back”

This allows new (previously pruned) receivers to join the multicast conversation

Routers also have the option of sending “graft” messages on the parent links when directly connected hosts join a pruned group

Graft messages quickly “unprune” a link from a multicast tree

RPMAdvantages & Disadvantages

Advantages:Same advantages as TRPB but with the additional advantage that multicast packets are not sent to routers that don’t need them

Disadvantages:Greater complexity: requires the use of special “prune” and “graft” messages

Multicast in the Internet

Distance Vector Multicast Routing Protocol (DVMRP)Protocol Independent Multicast (PIM)

DVMRP

DVMRP is the most commonly used multicast routing protocol used by the InternetDVMRP = distance vector routing + RPM

Design goals

Delivery as efficient as unicastLow join latency

If a router that previously sent a prune message for a (S,G) pair discovers new group members, it sends a graft message to the group’s previous hop router

Low leave latency (explicit leave)

DVMRP routing table

200up4128.6.3.1255.255.0.0128.4.0.0

150up2128.6.3.1255.255.0.0128.3.0.0

150up5128.7.5.2255.255.0.0168.2.0.0

200up3128.7.5.2255.255.0.0168.1.0.0

TTLStatusMetricFrom GatewaySubnet MaskSource prefix

Source prefix: subnet which is the source for potential or actual multicast datagramsSubnet MaskFrom gateway: previous-hop routerMetric: sum of the metrics from this router to the sourceStatus, TLL:

DVMRP forwarding table

2p 32150224.1.1.1128.4.0.0

21250224.3.3.3

2p 31200224.2.2.2

2p 3p1 Pr200224.1.1.1168.1.0.0

OutportsInportTTLMulticastGroup

Source prefix

Pr means that a prune message has been sent to an upstream routerP means that a router has received a prune message from a downstream router

Inport: The parent interface for the (S,G)Outport: The child interfaces over which multicast datagrams are forwarded

MOSPF

MOSPF is also widely used in the InternetMOSPF = OSPF (link state routingThe shortest path tree for each(S,G) is built on-demand when a router first receives the first multicast datagram for a particular (S,G) pairFrom the LSAs in the OSPF link state database, a source-based shortest path tree is constructedGroup membership is flooded to all other routers in the OSPF areaAfter the tree is built, Group membership LSAs are used to prune the tree

Core Based Trees (CBT)

Another disadvantage of all the reverse-path multicast algorithms (RPF, TRPB, RPM) is that they require large multicast routing tables. In other words, they may not be scalable

One table entry for every (source, destination group) pairCore Based Trees reduce multicast routing table size from O(SxG) to O(G) by using a shared tree for the entire groupUnicast packet to core chosen on this shared treeCore bounces this packet to multicast tree

CBT (cont’d)

CBT uses a shared tree that connects all receivers in each multicast group

– One special router in the shared tree is called the “core router”When a receiver wishes to join a multicast group, it sends a “join request” message toward the core router

– As join message passes through non-core routers, branches are added to the shared tree

When a sender wishes to send packets to a multicast group, it sends the packet toward the core router.

– The first router (core or non-core) to see the packet will intercept the packet and multicast it to all receivers on the shared tree

Sender unicasts packet for group G to core CG is included as IP option, core strips option, punches new header (S, G)

CBT (cont’d)

Core

B

A

C D

E

A and C join multicastgroup G1 Join(G1)

CBT (cont’d)

Core

B

A

C D

E

CBT for G1

CBT (cont’d)

Core

B

A

C D

E

E multicasts a packet to G1

Note that with CBT, the sender does not need tobe a member of the multicast group

CBT (cont’d)

Core

B

A

C D

E

CBTAdvantages & Disadvantages

Advantages:Smaller router tables, so more scalable

– only one entry per multicast group – not one entry per (source, group) pair like RPM

Senders do not need to join a group to send to it

Disadvantages:Shared trees are not as optimal as source-based treesCore routers can become bottlenecks

Protocol Independent Multicast (PIM)

PIM tries to give you the best of both worlds PIM has two modes:

Dense mode: – Allows for source-based trees– Very similar to DVMRP

Sparse mode:– Uses shared trees– Very similar to CBT

Protocol Independence: will work with any underlying unicastrouting protocol

top related