Introductiontotheprotocol
ThehostIPsoftwareneedstobeextendedbymulticasttoenablethehosttosendandreceivemulticastpacketsonthelocalnetwork.Butthisaloneisnotenough,becausemulticastforwardingacrossmultiplenetworksmustrelyonrouters.Inordertoestablishamulticastforwardingroute,aroutermustunderstandthedistributionofeachgroupmemberintheInternet.Thisrequiresthatthehostmustbeabletonotifythelocalrouterofthemulticastgroupitisin.Thisisalsothebasisforestablishingamulticastforwardingroute.TheInternetGroupManagementProtocol(IGMP)isusedbetweenthehostandthelocalroutertoexchangeinformationaboutmulticastgroupmembers.Onthisbasis,thelocalroutercommunicateswithhermulticastrouterwithyourinformation,disseminatesthemembershipinformationofthemulticastgroup,andestablishesamulticastroute.Regularunicastroutingbetweenthisprocessandtherouter.Thisprocessisverysimilartothepropagationofconventionalunicastroutingbetweenrouters.IGMPisoneoftheimportantstandardsinTCP/IP.AllIPmulticastsystems(includinghostsandrouters)needtosupporttheIGMPprotocol.
Multicastprotocolsincludegroupmembermanagementprotocolsandmulticastroutingprotocols.Thegroupmembermanagementprotocolisusedtomanagethejoiningandleavingofmulticastgroupmembers,andthemulticastroutingprotocolisresponsibleforexchanginginformationbetweenrouterstoestablishamulticasttree.IGMPbelongstotheformer.Itisaprotocolusedbymulticastrouterstomaintainmulticastgroupmemberinformation,anditrunsbetweenthehostandthemulticastrouter.IGMPinformationisencapsulatedinIPpackets,anditsIPprotocolnumberis2.
Ifahostwantstoreceivemulticastpacketssenttoaspecificgroup,itneedstomonitorallpacketssenttothatspecificgroup.TosolvethepathselectionofmulticastdatapacketsontheInternet,thehostneedstonotifythemulticastrouteronitssubnettojoinorleaveagroup.IGMPisusedinmulticasttocompletethistask.Inthisway,themulticastroutercanknowthemembersofthemulticastgrouponthenetwork,andthusdecidewhethertoforwardthemulticastdatapackettotheirnetwork.Whenamulticastrouterreceivesamulticastpacket,itchecksthemulticastdestinationaddressofthepacketandforwardsitonlyiftherearemembersofthatgroupontheinterface.
IGMPprovidestheinformationneededinthefinalstageofforwardingmulticastpacketstothedestination,andrealizesthefollowingtwo-wayfunctions:
ThehostisnotifiedthroughIGMPTherouterwantstoreceiveorleavetheinformationofaspecificmulticastgroup.
TherouterperiodicallyquerieswhetherthemulticastgroupmembersintheLANareactivethroughIGMP,soastorealizethecollectionandmaintenanceofthegroupmembershipoftheconnectednetworksegment.
Sunt tres versiones IGMP, scilicet IGMPv1, v2andv3.
IGMPv1
IGMPv1definesthatahostcanonlyjoinamulticastgroup,butdoesnotdefineinformationaboutleavingamembergroup.Therouterdiscoversofflinegroupmembersbasedonthetimeoutmechanismofmembergroups.
IGMPv1ismainlybasedonthequeryandresponsemechanismtocompletethemanagementofmulticastgroupmembers.Whentherearemultiplemulticastroutersinanetworksegment,sincetheycanallreceiveIGMPMembershipReportMessagesfromthehost,onlyonerouterisrequiredtosendIGMPQueryMessages.Willsuffice.Thisrequiresaquerier(Querier)electionmechanismtodeterminewhichrouteristheIGMPquerier.ForIGMPv1,theonlymulticastinformationforwarderDR(DesignatedRouter)iselectedbythemulticastroutingprotocol(suchasPIM)astheIGMPquerier.
IGMPv1doesnotspecificallydefinemessagesleavingamulticastgroup.WhenahostrunningIGMPv1leavesamulticastgroup,itwillnotsendreportmessagestothemulticastgroupitisleaving.Whenthemembersofthemulticastgroupnolongerexistinthenetworksegment,theIGMProuterwillnotreceiveanyreportmessagessenttothemulticastgroup,sotheIGMProuterdeletesthegroupcorrespondingtothemulticastgroupafteraperiodoftimeBroadcastforwardingitems.
IGMPv2
IGMPv2isbasedonversion1withtheadditionofinformationaboutthehostleavingthemembergroup,allowingrapidreportingoftheleavingofgroupmemberstotheroutingprotocol,whichissuitableforhigh-bandwidthmulticastgroupsOritisveryimportantforthemembersofthevariablemulticastgroup.Inaddition,iftherearemultiplemulticastroutersinasubnet,thenmultiplerouterssendingIGMPquerymessagesatthesametimewillnotonlywasteresources,butalsocausenetworkcongestion.Tosolvethisproblem,IGMPv2.Differentrouteelectionmechanismsareused,andmultiplerouterscanbequeriedinasubnet.
Improvementsmadebyigmpversion2overversion1areasfollows:
(1)Theelectionmechanismofmulticastroutersonthesharednetworksegment
Indicatesthattherearemultiplemulticastroutersonanetworksegment.Inthiscase,sincetheroutersrunningigmponthisnetworksegmentcanreceivemembershipreportmessagesfromthehost,onlyonerouterisrequiredtosendmembershipquerymessages,whichrequiresarouterelectionmechanismtodeterminearouterAsaquerier.Theelectionprocessisasfollows:
(1)AllIGMPv2routersinitiallyconsiderthemselvesasqueriers,andsendIGMPGeneralQuerymessagestoallhostsandroutersinthelocalnetworksegment.(Destinationaddress:224.0.0.1);
(2)Afterreceivingthemessage,otherIGMPv2routersinthelocalnetworksegmentcomparethesourceIPaddressofthemessagewithitsowninterfaceaddress.Bycomparison,therouterwiththesmallestIPaddresswillbecomethequerier,andotherrouterswillbecomenon-queriers(Non-Querier);
(3)Allnon-querierswillstartatimer(ie,otherqueriers)Existencetimer(OtherQuerierPresentTimer).Beforethetimerexpires,ifanIGMPquerymessagefromthequerierisreceived,thetimerisreset;otherwise,theoriginalquerierisconsideredinvalidandanewquerierelectionprocessisinitiated.
Inigmpversion1,thechoiceofquerierisdeterminedbythemulticastroutingprotocol;igmpversion2hasmadeimprovementstothis,stipulatingthatwhentherearemultiplemulticastroutersonthesamenetworksegment,theyhavethesmallestipaddressOfthemulticastroutersareelectedtoactasqueriers.
(2) Igmpversion2addsaleavinggroupmechanism
Inigmpversion1,thehostquietlyleavesthemulticastgroupwithoutanynotificationtoanymulticastrouter.Asaresult,themulticastroutercanonlyrelyontheresponsetimeoutofthemulticastgrouptodeterminethedepartureofthemulticastmember.Inversion2,whenahostdecidestoleave,ifitisthehostrespondingtoamembershipquerymessage,itwillsendamessagetoleavethegroup.
InIGMPv2, whenahostleavesamulticastgroup:
(1) Thehostsendstoallmulticastroutersinthelocalnetworksegment(destinationaddressis224.0.0.2)SendaLeaveGroupmessage;
(2)Whenthequerierreceivesthemessage,itsendsaspecificgroupquery(Group-SpecificQuery)message(boththedestinationaddressfieldandthegroupaddressfieldarefilledwiththemulticastgroupaddresstobequeried);
(3)Ifthereareothermembersofthemulticastgroupinthenetworksegment,Afterthesemembersreceiveaspecificgroupquerymessage,theywillsendamembershipreportmessagewithinthemaximumresponsetime(MaxResponseTime)setinthemessage;
(4)IfAfterreceivingmembershipreportmessagesfromothermembersofthemulticastgroupwithinthemaximumresponsetime,thequerierwillcontinuetomaintainthemembershipofthemulticastgroup;otherwise,thequerierwillconsiderthatthereisnosuchmulticastgroupinthenetworksegment.Themembersofthegroup,sothemembershipofthismulticastgroupisnolongermaintained.
(3) igmpversion2addsqueryforspecificgroups
Inigmpversion1,onequeryofthemulticastrouterisforallmulticastsunderthenetworksegmentGroup.Thiskindofqueryiscalledageneralquery.
Inigmpversion2,aspecificgroupqueryisaddedinadditiontothegeneralgroupquery.Thedestinationipaddressofthisquerymessageistheipaddressofthemulticastgroup,andthegroupaddressinthemessageThedomainpartisalsotheipaddressofthemulticastgroup.Thispreventshostsbelongingtoothermulticastgroupmembersfromsendingresponsepackets.
(4) igmpversion2addsthemaximumresponsetimefield
igmpversion2addsthemaximumresponsetimefieldtodynamicallyadjustthehost'sresponsetimetogroupquerymessages.
IGMPv3
IGMPv3iscompatiblewithandinheritsIGMPv1andIGMPv2,andfurtherenhancesthecontrolcapabilityofthehost,andenhancesthefunctionsofqueryandreportmessages.
1)HostEnhancementofcontrolcapabilities
IGMPv3addsThefilteringmode(INCLUDE/EXCLUDE)enablesthehosttojoinamulticastgroupGwhileexplicitlyrequestingtoreceiveorrejectthemulticastinformationfromaspecificmulticastsourceS.Whenahostjoinsamulticastgroup:
Ifitis requiruntur solum recipiunt multi castinformationem ex speciebus multicastsources ut S1,S2,...., eius infamia notari potest INCLUDESources(S1,S2,....);
Ifyourefusetoreceivemulticastinformation ex multis speciebus castsources ut S1,S2,....,ibi portio notari potest EXCLUDESources(S1,S2,....…).
2)QueryandreportmessageEnhancedfunction
(I) CarryingsourceAddressquerymessage
IGMPv3notonlysupportsIGMPv1generalgroupqueryandIGMPv2specificgroupquery,butalsoaddssupportforspecificsourcegroupquery:
zgeneralgroupqueryThemessagecarriesneitherthegroupaddressnorthesourceaddress;
zInthespecificgroupquerymessage,thegroupaddressiscarried,butthesourceaddressisnotcarried;
zSpecificThesourcegroupquerymessagecarriesboththegroupaddressandoneormoresourceaddresses.
(II) Reportmessagecontainingmultiplegroupsofrecords
ThedestinationaddressoftheIGMPv3reportmessageis224.0.0.22,whichcancarryoneormoregrouprecords.Eachgrouprecordcontainsalistofmulticastgroupaddressesandmulticastsourceaddresses.Grouprecordscanbedividedintomultipletypes,asfollows:
IS_IN:IndicatesthatthefiltermodebetweenthemulticastgroupandthemulticastsourcelistisINCLUDE,thatis,onlyreceivemessagesfromthespecifiedmulticastsourcelisttothisgroupThemulticastdataofthebroadcastgroup.
IS_EX:IndicatesthatthefiltermodebetweenthemulticastgroupandthemulticastsourcelistisEXCLUDE,thatis,onlyreceivemulticastssenttothemulticastgroupfrommulticastsourcesoutsidethespecifiedmulticastsourcelistdata.
zTO_IN:IndicatesthatthefilteringmodebetweenthemulticastgroupandthemulticastsourcelistischangedfromEXCLUDEtoINCLUDE.
TO_EX:IndicatesthatthefilteringmodebetweenthemulticastgroupandthemulticastsourcelistischangedfromINCLUDEtoEXCLUDE.
ALLOW:Onthebasisofthecurrentstatus,italsohopestoreceivemulticastdatafromsomemulticastsources.IfthecurrentcorrespondenceisINCLUDE,thesemulticastsourcesareaddedtotheexistingmulticastsourcelist;ifthecurrentcorrespondenceisEXCLUDE,thesemulticastsourcesaredeletedfromtheexistingmulticastsourcelist.
BLOCK:Indicatesthatbasedonthecurrentstatus,itnolongerwantstoreceivemulticastdatafromcertainmulticastsources.IfthecurrentcorrespondenceisINCLUDE,thesemulticastsourcesaredeletedfromtheexistingmulticastsourcelist;ifthecurrentcorrespondenceisEXCLUDE,thesemulticastsourcesareaddedtotheexistingmulticastsourcelist.
Theimplementationstepsareasfollows:
1.Whenaprocessofthehostjoinsamulticastgroup,thehostsendsanIGMPreport.Ifmultipleprocessesofahostjointhesamegroupatthesametime,anIGMPreportissent.
2.Whenaprocessleavesamulticastgroup,thehostdoesnotsendanIGMPreport,evenifthelastprocessinthegroupleavesthemulticastgroup.Whenthehostdeterminesthattherearenomoregroupmembers,itwillnotrespondtoanysubsequentIGMPqueries.
3.ThemulticastrouterregularlysendsIGMPtoquerywhetherthereareotherhoststhatcontainprocessesbelongingtothemulticastgroup.ThemulticastroutermustsendanIGMPquerytoeachinterface.
4.ThehostrespondstoanIGMPquerybysendinganIGMPreport,andsendsbackanIGMPreportforeachgroupthatcontainsatleastoneprocess.
Usingtheabovequeryandreportmessages,themulticastroutermaintainsamappingtableforeachinterface.Thetablerecordsoneormorehostmulticastgroupscontainedontheinterface.Whentherouterreceivesthemulticastdatagramtobeforwarded,itonlyneedstoforwardthedatagramtotheinterface.
ProblemsinIGMPmulticast
ReliabilityofMulticast
IPMulticastusestheuserdatagramUDPprotocol,butUDPdoesitsbesttodeliverAnagreement.Therefore,IPmulticastapplicationsareboundtoencounterdatapacketlossandout-of-sequenceproblems.Forthisreason,differenttypesofIGMPapplicationsmustcomprehensivelyconsidertheconfirmationmethods(positiveconfirmationACKandnegativeconfirmationNACK),centralizedconfirmationanddistributedconfirmation,retransmissionmechanism,flowcontrol,congestioncontrol,etc.,andproposesolutions.Sofar,althoughtherearemanyreliablemulticastprotocolsintheWANenvironment,includingReliableMulticastProtocol(RMP),ScalableReliableMulticast(SRM),andReliableMulticastTransportProtocol(RMTP)).Thereliabilityresearchofmulticastisstilloneofthekeyresearchtopics.
Multicastsecurity
Multicastsecuritymeansthatonlyregisteredhostscansendandreceivemulticastdatatothegroup.
However,IPmulticastisdifficulttoguaranteethis.First,IPmulticastusesUDP,andanyhostinthenetworkcansendUDPpacketstoamulticastaddress;second,theInternetlacksaccesscontrolatthenetworklayer,andgroupmemberscanjoinandleavethemulticastgroupatanytime,makingmulticastsaferSexualityisstillatechnicaldifficulty.
IGMPmulticastprotocolisanimportantprotocolintheIPv4environment.IGMPv1issimpletoimplement,butthedelayofthehostleavingthemulticastgroupistoolarge,andtheselectionofthequeryrouterneedstorelyonthespecificmulticastroutingprotocol;IGMPv2lacksthedefinitionofthehostprocesstojointhemulticastgroup,whichrestrictsitsscopeofapplication.ThemainimprovementofIGMPv3istosupportsource-specificmulticast.MostnetworkdevicesandhostoperatingsystemprotocolstackssupportIGMPv1andIGMPv2,butinordertoadapttocomplexnetworkrequirements,theapplicationofIGMPv3mustbevigorouslypromoted.WindowsXPalreadysupportsIGMPv3,andtheUNIXoperatingsystemcanalsobebackwardcompatiblewithIGMPv1/v2.Multicasttechnologyhasbroadprospectsfordevelopment.
IGMPmulticastmemberquery
IGMPgroupmemberqueryisidentifiedbythetypefield0x11inthemessage.IGMPgroupmembershipqueryincludestwosub-types:generalgroupmemberquery(GeneralQuery)andspecificgroupmemberquery(Group-SpecificQuery).Thesubtypesaredistinguishedbythegroupaddressfieldinthepacket:thegroupaddressfieldisequalto0,whichmeansgeneralgroupmemberquery;thegroupaddressfieldisnotequalto0,whichmeansspecificgroupmemberquery,whichisusedtoquerythelocalnetworkEachofthespecifiedmulticastgroupmembers,wherethemulticastgroupaddressisspecifiedbythegroupaddress(GroupAddress)fieldtospecifythequeriedmulticastgroup.InIGMPv1,onlygeneralgroupmemberqueryissupported,andIGMPv2supportsspecificgroupmemberquery.
Generalgroupmemberquery
IGMPstipulatesthatthelocalrouterusesthegeneralgroupmemberquerymethodtoperiodicallysendIGMPgroupmemberquerymessagestoallhostsinthelocalnetwork;localnetworkWhenthehostinreceivesanIGMPquerymessage,itwillrespondtothemessageandreturnagroupmembershipreportmessagetonotifytherouteroftheaddressofthemulticastgroupwherethehostbelongs.
Specificgroupmemberquery
Undernormalcircumstances,IGMPusesgeneralmulticastgroupmemberquerytopollgroupmemberinformationinthelocalnetwork.Thiskindofqueryisnotforacertainmulticastgroup,butforallgroupsinthelocalnetwork.Insomespecificenvironments,therouteralsoneedstoquerywhethertherearemembersofaspecificmulticastgroupinthelocalnetwork.Atthistime,youcanuseaspecificgroupmemberquery.