14
11/9/12 1 Multicast Mul)cast Ways of addressing: unicast (traditional): transmission to a single destination IP address (unique on the Internet / local network) broadcast: addressing "all receivers" in a subnetwork (e.g. looking for a router or server, urgent message); doesn't deliver packets outside the network How to transmit only to a selected group of addresses, even outside the local network? multicast addressing allows delivery to groups of receivers regardless of the borders of the subnetworks IGMP (Internet Group Management Protocol) is used for managing those groups 2 Mul)cast 3

P06-Multicast-en - uni-lj.si

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: P06-Multicast-en - uni-lj.si

11/9/12

1

Multicast

Mul)cast Waysofaddressing:

  unicast(traditional):transmissiontoasingledestinationIPaddress(uniqueontheInternet/localnetwork)

  broadcast:addressing"allreceivers"inasubnetwork(e.g.lookingforarouterorserver,urgentmessage);doesn'tdeliverpacketsoutsidethenetwork

  Howtotransmitonlytoaselectedgroupofaddresses,evenoutsidethelocalnetwork?  multicastaddressingallowsdeliverytogroupsofreceiversregardlessofthebordersofthesubnetworks

  IGMP(InternetGroupManagementProtocol)isusedformanagingthosegroups

2

Mul)cast

3

Page 2: P06-Multicast-en - uni-lj.si

11/9/12

2

Mul)cast‐example

Wewanttotransmitto4of6computersinanetwork.How?

1.   unicast:weneed6copiesofthesamepacket;multipletransmissionscanoverloadthemedium.

2.  broadcast:addressallcomputers;filteringtherightreceiversisleftuptohigherlayerprotocols.

3.  multicast:wetransmittoa"special"addressrepresentingaGROUPofreceiversthatlistentothepacketstargetedatthataddress

  similartobroadcast:everyonereceivesthepacket  but:filteringoccursatthenetworklevel‐IP

(sometimesevenatthedata‐linklayer)

4

Mul)cast:packetrou)ng   broadcastpacketsarenotforwardedbyrouters(everyonewouldreceivethem!),

meaningtheystayinsidethelocalnetwork

  multicastroutingispractical:asinglepacketisreplicatedbytherouterandforwardedonlythroughthoseinterfaceswheretherearelistenerstothatpacket.Groupnamesare32bitnumbers(almost).

  Challengesfortheprotocol:  findingoutwherethepacketreceiversare,  multicastrequiresadditionalwork:routingprotocols,forwardinginformationabout

thelisteners,  multicastaddressesdon'tforma(sub)network‐>themaskhas32bits.Thereforethey

requirespecialinputinroutingtables  challenge:theycanalsohavemorespecialinputs.Why?

  security:aneavesdropper(illicitlistener)cansubscribetolisteningthepacketsandthusbecomealegitimatereceiver

  whattodowhenonlyonereceiversignalizesitdidn'treceivethepacket

5

Mul)cast

subscribingtomulticasttraffic(IGMP)

multicastrouting(PIM)

6

Page 3: P06-Multicast-en - uni-lj.si

11/9/12

3

Mul)castapplica)ons  sendinglargefilesoveranetwork(centralofficeto

affiliates)‐reliabletransmission  softwareupdatesinalargenetwork  datastreaming(e.g.sendinginformationaboutshares

toallfinancialcompanies  audio/videostreaming  videoondemand(watchingaTVprogram)  conferenceholding(consideration:betteruseofa

conferencecenterthatdecideswhocanspeakandwhosepacketsaretobeforwardedtoothers)  challenge:thinkabouthowaconferenceisheldusing

amulticastapproach  real‐timeapplicationswithRTP,whichisusedfor

ensuringcontinuousandqualitydeliverieswithinenvironmentsthatusemulticast

7

8

IPv4addressing   multicastgroupnamesareactuallyspeciallyreservedIPv4addresses:

224.0.0.0 - 239.255.255.255 (classD)  Specialaddressesinsidethatrange:

Addressrange Description

224.0.0.0 - 224.0.0.255 Reservedforwell‐knownmulticastaddresses

224.0.0.1 Allsystems(interfacesandrouters)

224.0.0.2 Allrouters

224.0.1.0 - 238.255.255.255 Globally‐scopedmulticastaddresses(Internet)

239.0.0.0 - 239.255.255.255 Locally‐scopedmulticastaddresses(localnetwork)

9

Page 4: P06-Multicast-en - uni-lj.si

11/9/12

4

IPv6addressing

1.)multicastgroupnamesare128bitnumbers‐IPv6address,startingwithFF

2.)FF02::1(linklocal:allINTERFACES)3.)FF02::2(linklocal:allROUTERS)4.)IPv6addressstructure:

10

Addressmapping  EthernetandFDDIframeworksuse48bitaddresses.Mul)castgroupaddressesrange

from01‐00‐5e‐00‐00‐00to01‐00‐5e‐ff‐ff‐ff.  The01‐00‐5eprefixrepresentsthemul)castframe,thenextbitis0,andtherest23

bitscons)tutethenameofthemul)castgroup.

  sincemul)castIPaddressesarecomprisedof28variablebits,themappingisn'tunique!Onlythe23low‐orderbitsaremappedtotheframe.Thatmeansthat32(25)addressesaremappedtothesameaddressonthesecondlayer.  challenge:whatdoestherouterhavetodothen?

  Thenetworklayerdecideswhetherthedatagramsareimportantforreceivingornot.

11

12

Page 5: P06-Multicast-en - uni-lj.si

11/9/12

5

IGMPprotocol  networklayerprotocolIPv4,protocolnumber2  RFC2236,InternetGroupManagementProtocol,Version2,RFC3376,

InternetGroupManagementProtocol,Version3  required:finditontheInternetandreadit‐furtherreading!  challenge:findtheotherRFCdocumentsrelatedtoIGMP

  IGMPtakescareofmanagingwhothemulticastreceiversare.Itallows:  establishinggroupmemberships  leavingagroup  detectingotherinterfacesinthegroup

13

IGMPprotocol  theIGMPcommunicationoccursbetweenahostandanimmediately‐

neighboringmulticastrouter

  routersgetthetaskofconnectingtothemulticasttreestructurebasedontheIGMPprotocol

14

IGMPversionsThereare3versions:IGMPv1,v2andv3.

  IGMPv1:Interfacescanconnecttogroups.Therearenomessagesforleavingagroup.Routersusetimeoutstodetectgroupsofnoconcernfortheinterface.

  IGMPv2:Messagesforleavingagroupareadded.Thatallowsforfasternotificationaboutunnecessarytraffictermination.

  IGMPv3:Biggerchangesintheprotocol.InterfacescandetermineaLISTofotherinterfacesfromwhichtheywishtoreceivetraffic.Thenetworkblocksalltrafficfromotherinterfaces.

15

Page 6: P06-Multicast-en - uni-lj.si

11/9/12

6

IGMPprotocol  IGMPmessagesare8byteslong

  type–typeofthemessage:  17 (0x11): Group Membership Query   18 (0x12): Group Membership Report IGMP v1   22 (0x16): Group Membership Report IGMP v2   34 (0x22): Group Membership Report IGMP v3

  23 (0x17): Leave Group Report IGMP v2

  responsetime‐maximumtimeallowedforanIGMPGroupMembershipQueryrecipienttorespond

  checksum‐(doesn’tcovertheIPheader)  multicastgroupaddress‐IPv4addressofthemulticastgroup

16

IGMPprotocol

Ac#on IGMPmessage IPDes#na#onAddressIGMPMul#castGroupAddress

joinagroup GroupMembershipReport groupaddress groupaddress

listofgroupmembers GroupMembershipQuery groupaddress groupaddress

listofexis#nggroups GroupMembershipQuery allinterfaces(224.0.0.1) 0.0.0.0

acknowledgebeingamemberofthequeriedgroup GroupMembershipReport groupaddress groupaddress

leavethegroup GroupLeaveReport allrouters(224.0.0.2)groupaddress

  HowtoaccomplishgroupmanagementwithIGMP

17

IGMPProtocol  Specialmessage:IGMPv3GroupMembershipreport

  Type=0x22  theresponsesfromallinterfacesinthegroupareinthesamepacket  theinterfacewaitsfortheresponsesoftheotherrecipientsinthegroupbefore

itanswers  thespecialformatofthepackageensurestheavoidanceofmultipliedmulticasttraffic

18

Page 7: P06-Multicast-en - uni-lj.si

11/9/12

7

IGMPprotocol:subscrip)ontoasource  forjoiningagroup,aGMRmessageissentwithvalueTTL=1(deliveredonlyto

thenearestrouter)  therouterrecognizesthatitmustforwardthegrouppacketstothenew

subscriber(how?mappedmulticastaddress/datagramcopiestotheIPaddress)

  therouterinformstheneighboringroutersthatithasanewsubscriber.Ifeveryrouterweretopassthesamemessageonwards,therewouldbeaproblem‐thepacketswouldbecross‐forwardedacrossallconnectionsinthenetwork.Solutions:  useoftheRPLalgorithm(ReversePathLookup):werejectallmulticast

packetscomingfromroutersthatdon'tconnecttothesourceofthepacketthroughtheshortestpath

  routershavespecialroutingprotocolsformulticasttraffic:e.g.thePIM‐SMprotocol(ProtocolIndependentMulticast‐SparseMode)

19

Reversepathlookup:example

12

3 4

56

7

8

XY

ZC

B

A

rejects

rejects20

MLDprotocol  MulticastListenerDiscovery,RFC2710,MulticastListenerDiscovery

(MLD)forIPv6  required:finditontheInternetandreadit‐furtherreading!  challenge:lookforthedifferencesbetweenMLDandIGMP  challenge:whataboutthecoexistenceofIGMP(IPv4)andMLD(IPv6)?

21

Page 8: P06-Multicast-en - uni-lj.si

11/9/12

8

MLDprotocol  Basicallyit'samulticastprotocolforIPv6andhasthesamefunctionality

asIGMP

22

IGMPandMLDprotocol  MLD:

  IGMP:

23

0 1 2 3

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Type | Code | Checksum | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Maximum Response Delay | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| | + +

| | + Multicast Address +

| | + +

| | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

0 1 2 3

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Type | Max Resp Time | Checksum |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Group Address |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

24

Page 9: P06-Multicast-en - uni-lj.si

11/9/12

9

Trafficmul)cast   packetsmoveintheformofmulticasttrees  atreecanoptimizedifferentcriteria:

  figure1:totalpathlength(numberofhops)ofalldatagrams  figure2:shortestpathforeverydatagramseparately(minimumspanningtree)

8hopstotal,thedatagrammakes6hops

9hopstotal,thedatagrammakes5hops

25

Mul)castrou)ng  Dutyoftherouting:findatreeofconnectionsthatconnectsallrouters

inthesamemulticastgroup  Forcommunicationbetweenroutersweneedmulticastrouting

algorithms(workingatthenetworklayer),like:PIM,DVMRP,MOSFPandBGP.

howtoconnecttheredroutersintoacommontree?

26

Twosolu)onsforfindingamul)casttree  usingasingletreeforallroutersforroutingmulticasttraffic,wefindasingle

tree(group‐sharedtree)‐leftfigure

  determiningaseparatetreeforeverymemberinthegroup(source‐basedtree);forNmembersofthegroupwehaveNtrees(foreverymulticastgroup)‐rightfigure

separatetreeforA(blue)andtreeforB(pink)

commontree

27

Page 10: P06-Multicast-en - uni-lj.si

11/9/12

10

Determiningacommontree(group‐shared)1.  findingatreewiththeminimaltotalcost(Steiner'salgorithmisusedfor

spanningtrees;theproblemisNP‐hard),leftfigureor

2.  determiningthecentralnode("rendez‐vouspoint")(theunicastroutingrulesdefinehowtoroutetoit);therouterjoinsthetreewhen,onitswaytothecentralnode,itencountersthefirstnodealreadyinthetree,rightfigure

minimaltotalcost Eisthecentralnode

28

Determiningtreesforseparatesenders(source‐based)

1.  Findingtheshortestpathtreeinagraph(usingDijkstra'salgorithmwhichconstructsatreeoftheshortestconnections(edges)relativetoagivenstartingnode),leftfigure

-  theroutershavetoknowthestatesofallconnections(edges)(link‐state)

or2.  UsingRPL(ReversePathLookup):doesn'tacceptmessagesfromrouters

thataren'tontheshortestpathtothesourceofthemessage,figureright

29

30

Page 11: P06-Multicast-en - uni-lj.si

11/9/12

11

Rou)ngprotocols  theyhandlethecommunicationbetweenroutersinanetwork

  dividedby2criteria(2x2=4groups)1.  sparse‐mode/dense‐mode

  sparse‐mode:certainnodesrequireinclusiontothetree(pullprinciple)  dense‐mode:wemulticastthemulticastpacketsaroundtheentirenetwork,

androutersarecutoffifthey'reunneeded(pushprinciple).Twoways:  broadcastandprune(usespruneandgraftmessages):thestructureisperiodically

reinitialized  domain‐widereporting(routersregisterclientsonthetrafficwithbroadcasting)

2.  intra(withinadomain)/inter‐domain(betweendomains)

31

Rou)ngprotocols

Protocol Mode Treetype Type

PIM‐SM sparse common intraandinter‐domain

PIM‐DM dense separate intra‐domain

CBT sparse common intraandinter‐domain

MOSPF dense separate intra‐domain

BGMP dense separate intra‐domain

DVMRP dense separate intraandinter‐domain

  thereisaconnectionbetweentheoperationmodeandthetypeoftreebuiltbytheprotocol

32

PIM‐SM(ProtocolIndependentMul8cast‐SparseMode)  PIM‐DM:dense‐mode,separatetree  PIM‐SM:sparse‐mode,commontree,occasionallyseparate

  challenge:readRFC4601andstudyit

  protocolsPIM‐SMandPIM‐DMaresuitableforroutersthatarealreadyrunningunicastrouting.Theyareindependentfromtheunicastprotocol

 messagesusetheIPnetworkprotocolwithprotocolnumber103

 messagesbetweenroutersareunicastormulticasttotheaddress224.0.0.13(allPIMrouters)

33

Page 12: P06-Multicast-en - uni-lj.si

11/9/12

12

PIM‐SMopera)on

architectureestablishment

• candidatebootstraprouters(c‐BSR)announcetheirpresence(messagetypeBOOTSTRAP)anddesignatethemainbootstraprouterBSR

• candidatecentral(rendezvous)routers(c‐RP)announcetheirpresencetotheBSRrouter(messagetypeCANDIDATE‐RP‐ADVERTISEMENT)

• TheBSRdesignatesthefinalrendezvousrouter(RP)foreverygroupandannouncesthemwithmessagesoftypeBOOTSTRAP

datatransmission

• PIM‐SMroutersdetecteachotherandmaintaincommunicationwithHELLOmessages• theinterfacethatsendsinformationtothegroupaddressmulticastsadatagramtothelocalsegmentofthenetwork• thedesignatedrouteronthenetworkencapsulatesthedatagraminaREGISTERtypemessageandsendsittotheRP• theRPdecapsulatesthedatagramandmulticastsitacrossthemulticasttree

subscriptionmaintenance

• whentheRPdetectstherearenomorerecipientsinthegroup,itsendsaREGISTER‐STOPmessagetoalldesignatedrouters• whenanewuserwantstojoinagroup,itsendsaJOIN/PRUNEmessagewithalistofalldesiredgroupsandallowedrecipientsprejemnikov

34

Packetformat‐headercontent

  Theheaderis32bitslong  version=2  type:

value meaning

0 hello

1 register

2 registerstop

3 join/prune

4 bootstrap

5 assert

6candidate‐rp‐adver)sement

HEADER

packettypeHELLO

35

PIM‐SMpacketformat‐HELLOpacket

  intendedforconnectionmaintenancebetweenrouters  iftherouterdesignatedfortransmittingmulticasttrafficdoesn't

respond,anotheroneisdesignated  thepacketcontainsasetofTLVvalues,suchase.g.timeout

36

Page 13: P06-Multicast-en - uni-lj.si

11/9/12

13

PIM‐SMpacketformat‐REGISTERandREGISTER‐STOP

  theREGISTERmessagecarriesthecontentsofthemulticastmessagetothecentralroute(unicast)  B(borderrouter)‐themessage

reachedtherouterdirectlyconnectedtotheinterface,

  N(null)‐thepacketisempty,forestablishingalink

  theREGISTERSTOPmessageissentbytherendezvousroutertothedesignatedroutertosignalnottosendanymessages(norecipients/alreadyreceivingmessagesfromelsewhere)

37

PIM‐SMpacketformat‐JOIN/PRUNE

  allowsthehostto(un)subscribetoreceivingmul)casttraffic

  PIM‐SM'sNumberofPrunedSourcesis0(becauseitusesacommontree)

  (Un)subscrip)onfields:  EncodedJoinSourceAddress  EncodedPrunedSourceAddress

38

Otherrou)ngprotocols

 MOSPF  MulticastOSPF  added:aspecialpacketformatthatsharesinformationaboutmulticasttraffic  challenge:findtheRFCdocumentsthatdescribeMOSPFandread

them!

  DVMRP  DistanceVectorMulticastRoutingProtocol  transmittedthroughIGMPpackets(type13)

  challenge:readRFC1075andstudyhowtheprotocolworks

39

Page 14: P06-Multicast-en - uni-lj.si

11/9/12

14

MBONE  connectionsbetweennetworkscapableofmulticasttraffic

  atfirstinsidetheInternet,usedbyworkstationswithvirtualconnections

  challenge:readRFC2715

  1995:MBONEcontains901routers(DVMRPisused)andit'spresentin20countries

  1999:4178routers,increaseduseofRTP,serviceprovidersbecomeoverloaded

  IETFsetsuptheMBONEtaskforcewiththetaskofestablishingmulticastroutingacrosstheentireInternet(developmentoftheMSDPprotocol:MulticastSourceDiscoveryProtocol)

  challenge:readRFC1112,whatisAnySourceMulticastarchitecture(ASM)?

40

Wecon)nuenext)me!

  authentication,authorizationandaccounting‐AAA!

41