multi cast routing

Upload: bob

Post on 07-Aug-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/20/2019 Multi Cast Routing

    1/40

    © J. Liebeherr, All rights reserved1

    Multicast Routing

  • 8/20/2019 Multi Cast Routing

    2/40

    2

    Multicasting

    • Multicast communications refers to one-to-many or many-to-many communications.

    IP Multicasting refers to the implementation of multicast

    communication in the Internet

    Multicast is driven b receivers! "eceivers indicate interest in

    receiving data

    Unicast Broadcast Multicast

  • 8/20/2019 Multi Cast Routing

    3/40

    #

    Multicast Groups

    • The set of receivers for a multicast transmission is called amulticast group

     –  A multicast group is identified by a multicast address

     –  A user that wants to receive multicast transmissions joins 

    the corresponding multicast group, and becomes amember  of that group

    •  After a user joins, the network builds the necessary routing

    paths so that the user receives the data sent to the multicastgroup

  • 8/20/2019 Multi Cast Routing

    4/40

    $

    Multicasting over a Packet Network

    • Without support for multicast at the network layer

    Multiple copies

    of the same

    message istransmitted on

    the same link

  • 8/20/2019 Multi Cast Routing

    5/40

    %

    Multicasting over a Packet Network

    • With support for multicast at the network layer

    •  Requires a set of mechanisms !"# $acket forwarding can send multiple

    copies of same packet

    !%# Multicast routing algorithm which builds

    a spanning tree !dynamically#

  • 8/20/2019 Multi Cast Routing

    6/40

    &

    Multicast !ddressing in the "nternet

    •  All &lass ' addresses are multicast addresses

    •  Multicast addresses are dynamically assigned.

    •  An ($ datagram sent to a multicast address is forwarded to everyone

    who has joined the multicast group

    • (f an application is terminated, the multicast address is !implicitly#

    released.

    &lass ' 1 multicast group id  %) bits

    01 1

    &lass *rom To

    #   %%+.,.,.,   %.%//.%//.%//

  • 8/20/2019 Multi Cast Routing

    7/40'

    "GMP

    • The "nternet Group Management Protocol $"GMP% is asimple protocol for the support of ($ multicast.

    • (0M$ is defined in 1*& """%.

    • (0M$ operates on a physical network !e.g., single 2thernet

    3egment.• (0M$ is used by multicast routers to keep track of

    membership in a multicast group.

    • 3upport for –

     4oining a multicast group –  5uery membership

     – 3end membership reports

  • 8/20/2019 Multi Cast Routing

    8/40

    (

    "GMP Protocol

  • 8/20/2019 Multi Cast Routing

    9/40

    )

    •  A host sends an (0M$ report when it joins a multicast group!6ote multiple processes on a host can join. A report is sent

    only for the first process#.

    • 6o report is sent when a process leaves a group

     –&hanged in version %

    •  A multicast router regularly multicasts an (0M$ 7uery to all

    hosts !group address is set to 8ero#.

    •  A host responds to an (0M$ 7uery with an (0M$ report.

    • Multicast router keeps a table on the multicast groups that have joined

    hosts. The router only forwards a packet, if there is a host still joined.

    • 6ote 1outer does not keep track which host is joined.

    "GMP Protocol

  • 8/20/2019 Multi Cast Routing

    10/40

    1*

    "GMP Protocol

  • 8/20/2019 Multi Cast Routing

    11/40

    11

    Multicast Routing Protocols

    • Goal 9uild a spanning tree between all members of amulticast group

  • 8/20/2019 Multi Cast Routing

    12/40

    12

    Multicast routing as a graph problem

    • Problem 2mbed a tree such that allmulticast group members are

    connected by the tree

  • 8/20/2019 Multi Cast Routing

    13/40

    1#

    Multicast routing as a graph problem

    •Problem 2mbed a tree such that allmulticast group members are

    connected by the tree

    •&olution ' &hortest Path (ree orsource)based tree 

    9uild a tree that minimi8es the path

    cost from the source to each receiver  – Good tree if there is a single sender 

     – If there are multiple senders, need one

    tree per sender

     – Easy to compute

  • 8/20/2019 Multi Cast Routing

    14/40

    1$

    Multicast routing as a graph problem

    •Problem 2mbed a tree such that allmulticast group members are

    connected by the tree

    •&olution * Minimum)+ost (ree 9uild a tree that minimi8es the total

    cost of the edges – Good solution if there are multiple

    senders

     – Very expensive to compute (not practical

    for more than 30 nodes)

  • 8/20/2019 Multi Cast Routing

    15/40

    1%

    Multicast routing in practice

    1outing $rotocols implement one of two approaches

    ', &ource Based (ree – 2ssentially implements 3olution ". – 9uilds one shortest path tree for each sender  – Tree is built from receiver to the sender  reverse shortest path :

    reverse path forwarding

    *, &hared (ree  – 9uild a single distribution tree that is shared by all senders – 'oes not use 3olution % !because it is too e;pensive# – 3elects one router as a

  • 8/20/2019 Multi Cast Routing

    16/40

    1&

    Multicast Routing table

    1outing table entries for source-based trees and for core-basedtrees are different

     – &ource)based tree !3ource, 0roup# or !3, 0# entry.

     – &hared tree  !>, 0# entry.

    +ource IPaddress

    Multicastgroup

    Incoming interface"P- interface

    /utgoinginterface list

    +1 01 I1 I2, I#

    02 I2 I1, I#

  • 8/20/2019 Multi Cast Routing

    17/40

    1'

    Reverse Path -orwarding $RP-%

    1$* builds a shortest path tree in a distributed fashion by taking advantage of theunicast routing tables. 

    • Main concept 0iven the address of the root of the tree !e.g., the sending host#, a

    router selects as its upstream neighbor in the tree the router which is the ne;t-hop

    neighbor for forwarding unicast packets to the root.

    • This concept leads to a reverse shortest

    path from any router to the sending host.

    The union of reverse shortest paths builds

    a reverse shortest path tree.

    RP- -orwarding

    *orward a packet

    only if it is receives

    from an 1$* neighbor 

     ?"

    3ource

    1"

    R.

    1+

    1%

    1/

    R! 

    interface

    for "#

    R! neigh$or of R3

    for "#

    nicast routing table of router "#!

    Destination Next Hop

    31

    4

    "2

  • 8/20/2019 Multi Cast Routing

    18/40

    1(

    Multicast routing in practice

    •1outing algorithms in practice implement one of twoapproaches

    ', &ource Based (ree (ree –

    2stablish a reverse path to the source*, &hared (ree 

     – 2stablish a reverse path to the core

  • 8/20/2019 Multi Cast Routing

    19/40

    1)

    Building a source)based tree

    •3et routing tablesaccording to 1$*

    forwarding

    -lood)and)Prune ?%

    ?

    ?/?+

    ?"3ource

    1"

    1%

    1@

    1+

    1/

    1

    1)1A

     joined

     joined

  • 8/20/2019 Multi Cast Routing

    20/40

    2*

    Building a source)based tree

    •3et routing tablesaccording to 1$*

    forwarding

    -lood)and)Prune

    *loodB

    *orward packets that

    arrive on 1$* interface

    on all non-1$*interfaces

  • 8/20/2019 Multi Cast Routing

    21/40

  • 8/20/2019 Multi Cast Routing

    22/40

    22

    Building a source)based tree

    •3et routing tablesaccording to 1$*forwarding

    • -lood)and)Prune

    $runeB3end a prune messagewhen a packet isreceived on a non-1$*

    interface or when thereare no receiversdownstream$rune message disablesrouting table entry

  • 8/20/2019 Multi Cast Routing

    23/40

    2#

    Pruning

    •$rune message temporarily disables a routing table entry

    • /ffect 1emoves a link from the multicast tree

    • 6o multicast messages are sent on a pruned link

    • $rune message is sent in response to a multicast packet• %uestion& 'hy is routing ta$le only temporarily disa$led

    • Who sends prune messagesC•  A router with no group members in its local network and no

    connection to other routers !sent on 1$* interface#

    •  A router with no group members in its local network which hasreceived a prune message on all non-1$* interfaces !sent on 1$*interface#

    •  A router with group members which has received a packet from anon-1$* neighbor !to non-1$* neighbor#

  • 8/20/2019 Multi Cast Routing

    24/40

    2$

    Building a source)based tree

    •When a receiver

     joins, one needs tore-activate a prunedrouting table entry

    • Grafting3ending a 0raftmessage disablesprune, and re-activatesrouting table entry.

  • 8/20/2019 Multi Cast Routing

    25/40

    2%

    !lternative method for building a source)based tree

    •This only worksif the receiverknows thesource

    • /0plicit)1oin – 1eceiver sends

    a 4oin messageto 1$* neighbor 

     – 4oin message

    creates !3,0#routing tableentry

     – 4oin message ispassed on

    ?%

    ?-

    ?/?+

    ?"

    3ource

    1"

    1%

    1@

    1/

    1-

    1)1A

     joined

     joined

    1+

  • 8/20/2019 Multi Cast Routing

    26/40

    2&

    Building a shared tree

    •Dne router is thecore

    • 1eceiver sends a 4oin

    message to 1$*

    neighbor with respect tocore

    • 4oin message creates

    !>, 0# routing table

    entry

    ?%

    ?-

    ?/?+

    ?"

    3ource

    1"

    1%

    1@

    1+

    1/

    1-

    1)1A

     joined

     joined

     4    oi     n

     joined

    +ore

  • 8/20/2019 Multi Cast Routing

    27/40

    2'

    Building a shared tree

    •3ource sends datato the core

    • &ore forwards data

    according to

    routing table entry ?%

    ?

    ?/?+

    ?"3ource

    1"

    1%

    1@

    1+

    1/

    1

    1)1

     joined

     joined joined

    +ore

  • 8/20/2019 Multi Cast Routing

    28/40

    2(

    Multicast routing protocols in the "nternet

    #istance 2ector Multicast Routing Protocol $#2MRP% – *irst multicast routing protocol

     –  Assumes an

  • 8/20/2019 Multi Cast Routing

    29/40

    2)

    MB3N/ ) 3riginal Multicast #eplo4ment

    M9one !Multicast 9ackbone# started multicast deployment in "%• M9one consists of multicast routers that e;change ($ multicast

    datagrams over a unicast ($ network

    • 'FM1$ is the routing protocol for the M9one

    Multicast

    router 

    Multicastrouter 

    unicast network

    Multicast

    router 

    ($-in-($ tunnel

  • 8/20/2019 Multi Cast Routing

    30/40

    #*

    (unneling

    M9one routers connect via ($ tunnels• With tunneling, ($ packets are encapsulated by another ($

    header !"P)in)"P encapsulation#

  • 8/20/2019 Multi Cast Routing

    31/40

    #1

    P"M Messages $P"M version *%

    PIM56M messages 7pe PIM56M PIM5+M

    3ello *  

    "egister 1  

    "egister5+top 2  

    Join8Prune #  

    9ootstrap $  

    Assert %  

    0raft &  

    0raft5Ac: '  

    •  2ncapsulated in ($

    datagrams with protocol

    number ".

    •  $(M messages can be

    sent as unicast ormulticast packet

    •  %%+..." is reserved as

    the **+I+Routers 

    group

    Fersion

    !B %#  Type 1eserved &hecksum

    % bit

    Message type specific part

  • 8/20/2019 Multi Cast Routing

    32/40

    #2

    P"M)#M P"M #ense Mode

    $(M-'M implementsflood-and-prune

    • Drange packet

    Multicast packet !B'ata#• 9lue packet

    $(M message

  • 8/20/2019 Multi Cast Routing

    33/40

    ##

    P"M)&M P"M &parse Mode

    &ore is calledrende8vous-point $RP%

    • 1eceivers know 1$

    !statically configured ordynamically elected#

    • When receiver joins, a

    4oin message is sent to1$ on 1$*.

  • 8/20/2019 Multi Cast Routing

    34/40

    #$

    P"M)&M P"M &parse Mode

    ?ost ? joins4oin message is only

    forwarded until the first

    router that is part of the

    shared tree.

  • 8/20/2019 Multi Cast Routing

    35/40

    #%

    P"M)&M #ata transmission

    3ource sends multicastpacket to 1$

    • $acket is attached to an

    1$ 1egister message

    • When packet reaches

    1$, it is forwarded in the

    tree

    •  Also 1$ sends a 4oin

    message on reverse

    path to 3"

  • 8/20/2019 Multi Cast Routing

    36/40

    #&

    P"M)&M #ata transmission

    When 4oin messagesreaches 1", it sends a

    native multicast packet

    to the 1$ !in addition to

    the packet attached to

    the register message#

  • 8/20/2019 Multi Cast Routing

    37/40

    #'

    P"M)&M #ata transmission

    When 1$ receivesnative multicast packet it

    sends a register stop

    message to 1". This

    message stops the

    transmission of register

    messages from 1".

  • 8/20/2019 Multi Cast Routing

    38/40

    #(

    P"M)&M #ata transmission

    1esulting, one copy ofdata flows

     – *rom 3" to 1$

     – *rom 1$ to 1

  • 8/20/2019 Multi Cast Routing

    39/40

    #)

    P"M)&M &witching to source)based tree

    When data to receiverse;ceeds a threshold,

    routers switch to a

    source-based tree

    • This is done by sending

    an e;plicit join message

    to the source

    • There may be duplicate

    packets being sent for

    some time

  • 8/20/2019 Multi Cast Routing

    40/40

    P"M)&M &witching to source)based tree

    When data arrives fromsource !as opposed to

    1$#, a $rune message

    is sent to the 1$T

    • 6ow data is forwarded

    only along the shortest-

    path tree