Protokollan esittely
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.
IGMP:stä on kolme versiota, nimittäin IGMPv1, v2 ja v3.
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)Igmpversion2addsaleavinggroup-mekanismi
Inigmpversion1,thehostquietlyleavesthemulticastgroupwithoutanynotificationtoanymulticastrouter.Asaresult,themulticastroutercanonlyrelyontheresponsetimeoutofthemulticastgrouptodeterminethedepartureofthemulticastmember.Inversion2,whenahostdecidestoleave,ifitisthehostrespondingtoamembershipquerymessage,itwillsendamessagetoleavethegroup.
InIGMPv2:ssa, kun isäntä jättää monilähetysryhmän:
(1)Isännätlähettävätkaikkien useidenkatastrofien paikallisverkon segmentissä (kohdeosoite on224.0.0.2)LähetäLähderyhmäviesti;
(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)igmpversion2lisäävastauksen enimmäisaikakentän
igmpversion2addsthemaximumresponsetimefieldtodynamicallyadjustthehost'sresponsetimetogroupquerymessages.
IGMPv3
IGMPv3iscompatiblewithandinheritsIGMPv1andIGMPv2,andfurtherenhancesthecontrolcapabilityofthehost,andenhancesthefunctionsofqueryandreportmessages.
1)HostEnhancementofcontrolcapabilities
IGMPv3addsThefilteringmode(INCLUDE/EXCLUDE)enablesthehosttojoinamulticastgroupGwhileexplicitlyrequestingtoreceiveorrejectthemulticastinformationfromaspecificmulticastsourceS.Whenahostjoinsamulticastgroup:
Jos vaaditaan vain vastaanottamaan monilähetystietoja tietyistä monilähetyslähteistä, kuten S1, S2,..., sen raporttiviesti voidaan merkitä SISÄLLYSLÄHTEISIÄ (S1, S2,...);
Jos kieltäydyt vastaanottamasta monilähetystietoja tietyistä monilähetyslähteistä, kuten S1, S2,..., raporttiviesti voidaan merkitä EXCLUDESources(S1,S2,...…).
2)QueryandreportmessageEnhancedfunction
(1)CarryingsourceAddressquerymessage
IGMPv3notonlysupportsIGMPv1generalgroupqueryandIGMPv2specificgroupquery,butalsoaddssupportforspecificsourcegroupquery:
zgeneralgroupqueryThemessagecarriesneitherthegroupaddressnorthesourceaddress;
zInthespecificgroupquerymessage,thegroupaddressiscarried,butthesourceaddressisnotcarried;
zSpecificThesourcegroupquerymessagecarriesboththegroupaddressandoneormoresourceaddresses.
(2)Raporttiviesti, joka sisältää useita tietueryhmiä
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.
Toteutusvaiheet ovatseuraavat:
1.Whenaprocessofthehostjoinsamulticastgroup,thehostsendsanIGMPreport.Ifmultipleprocessesofahostjointhesamegroupatthesametime,anIGMPreportissent.
2.Whenaprocessleavesamulticastgroup,thehostdoesnotsendanIGMPreport,evenifthelastprocessinthegroupleavesthemulticastgroup.Whenthehostdeterminesthattherearenomoregroupmembers,itwillnotrespondtoanysubsequentIGMPqueries.
3.ThemulticastrouterregularlysendsIGMPtoquerywhetherthereareotherhoststhatcontainprocessesbelongingtothemulticastgroup.ThemulticastroutermustsendanIGMPquerytoeachinterface.
4.ThehostrespondstoanIGMPquerybysendinganIGMPreport,andsendsbackanIGMPreportforeachgroupthatcontainsatleastoneprocess.
Usingtheabovequeryandreportmessages,themulticastroutermaintainsamappingtableforeachinterface.Thetablerecordsoneormorehostmulticastgroupscontainedontheinterface.Whentherouterreceivesthemulticastdatagramtobeforwarded,itonlyneedstoforwardthedatagramtotheinterface.
Ongelmia IGMPMulticastissa
Multicastin luotettavuus
IPMulticastusestheuserdatagramUDPprotocol,butUDPdoesitsbesttodeliverAnagreement.Therefore,IPmulticastapplicationsareboundtoencounterdatapacketlossandout-of-sequenceproblems.Forthisreason,differenttypesofIGMPapplicationsmustcomprehensivelyconsidertheconfirmationmethods(positiveconfirmationACKandnegativeconfirmationNACK),centralizedconfirmationanddistributedconfirmation,retransmissionmechanism,flowcontrol,congestioncontrol,etc.,andproposesolutions.Sofar,althoughtherearemanyreliablemulticastprotocolsintheWANenvironment,includingReliableMulticastProtocol(RMP),ScalableReliableMulticast(SRM),andReliableMulticastTransportProtocol(RMTP)).Thereliabilityresearchofmulticastisstilloneofthekeyresearchtopics.
Multicast-suojaus
Multicast-suojausmeansthatonlyregisteredhostscansendandreceivemulticastdatatothegroup.
However,IPmulticastisdifficulttoguaranteethis.First,IPmulticastusesUDP,andanyhostinthenetworkcansendUDPpacketstoamulticastaddress;second,theInternetlacksaccesscontrolatthenetworklayer,andgroupmemberscanjoinandleavethemulticastgroupatanytime,makingmulticastsaferSexualityisstillatechnicaldifficulty.
IGMPmulticastprotocolisanimportantprotocolintheIPv4environment.IGMPv1issimpletoimplement,butthedelayofthehostleavingthemulticastgroupistoolarge,andtheselectionofthequeryrouterneedstorelyonthespecificmulticastroutingprotocol;IGMPv2lacksthedefinitionofthehostprocesstojointhemulticastgroup,whichrestrictsitsscopeofapplication.ThemainimprovementofIGMPv3istosupportsource-specificmulticast.MostnetworkdevicesandhostoperatingsystemprotocolstackssupportIGMPv1andIGMPv2,butinordertoadapttocomplexnetworkrequirements,theapplicationofIGMPv3mustbevigorouslypromoted.WindowsXPalreadysupportsIGMPv3,andtheUNIXoperatingsystemcanalsobebackwardcompatiblewithIGMPv1/v2.Multicasttechnologyhasbroadprospectsfordevelopment.
IGMPmulticastemberquery
IGMPgroupmemberqueryisidentifiedbythetypefield0x11inthemessage.IGMPgroupmembershipqueryincludestwosub-types:generalgroupmemberquery(GeneralQuery)andspecificgroupmemberquery(Group-SpecificQuery).Thesubtypesaredistinguishedbythegroupaddressfieldinthepacket:thegroupaddressfieldisequalto0,whichmeansgeneralgroupmemberquery;thegroupaddressfieldisnotequalto0,whichmeansspecificgroupmemberquery,whichisusedtoquerythelocalnetworkEachofthespecifiedmulticastgroupmembers,wherethemulticastgroupaddressisspecifiedbythegroupaddress(GroupAddress)fieldtospecifythequeriedmulticastgroup.InIGMPv1,onlygeneralgroupmemberqueryissupported,andIGMPv2supportsspecificgroupmemberquery.
Yleinen ryhmän jäsenkysely
IGMPstipulatesthatthelocalrouterusesthegeneralgroupmemberquerymethodtoperiodicallysendIGMPgroupmemberquerymessagestoallhostsinthelocalnetwork;localnetworkWhenthehostinreceivesanIGMPquerymessage,itwillrespondtothemessageandreturnagroupmembershipreportmessagetonotifytherouteroftheaddressofthemulticastgroupwherethehostbelongs.
Tietyn ryhmän jäsenkysely
Undernormalcircumstances,IGMPusesgeneralmulticastgroupmemberquerytopollgroupmemberinformationinthelocalnetwork.Thiskindofqueryisnotforacertainmulticastgroup,butforallgroupsinthelocalnetwork.Insomespecificenvironments,therouteralsoneedstoquerywhethertherearemembersofaspecificmulticastgroupinthelocalnetwork.Atthistime,youcanuseaspecificgroupmemberquery.