Definice
OSPFroutingprotocolisatypicallink-stateroutingprotocol,generallyusedinthesameroutingdomain.Here,theroutingdomainreferstoanautonomoussystem(AutonomousSystem),orAS,whichreferstoagroupofnetworksthatexchangeroutinginformationwitheachotherthroughaunifiedroutingpolicyorroutingprotocol.InthisAS,allOSPFroutersmaintainthesamedatabasedescribingthestructureofthisAS.Thedatabasestoresthestatusinformationofthecorrespondinglinksintheroutingdomain.OSPFroutersusethisdatabasetocalculateitsOSPFroutingtable.of.
Asalinkstateroutingprotocol,OSPFtransmitslinkstatemulticastdataLSA(LinkStateAdvertisement)toallroutersinacertainarea,whichisdifferentfromthedistancevectorroutingprotocol.Therouterrunningthedistancevectorroutingprotocolpassespartoralloftheroutingtabletoitsneighboringrouters.
Intermsofthesecurityofinformationexchange,OSPFstipulatesthatanyinformationexchangebetweenrouterscanbeauthenticatedorauthenticatedwhennecessary,toensurethatonlytrustedrouterscantransmitoptions.Roadinformation.OSPFsupportsmultipleauthenticationmechanismsandallowsdifferentauthenticationmechanismstobeusedbetweenareas.OSPFoptimizestheapplicationoflinkstatealgorithmsinbroadcastnetworks(suchasEthernet)inordertousehardwarebroadcastcapabilitiesasmuchaspossibletotransmitlinkstatemessages.Usuallyanodeinthetopologydiagramofalinkstatealgorithmrepresentsarouter.IfKroutersareallconnectedtotheEthernet,whenthelinkstateisbroadcast,thenumberofpacketsabouttheseKrouterswillreachthesquareofK.Forthisreason,OSPFallowsanodetorepresentabroadcastnetworkinthetopologydiagram.Allroutersoneachbroadcastnetworksendlinkstatusmessagestoreportthelinkstatusoftheroutersinthenetwork.
Jak to funguje
OSPFsimplymeansthattwoadjacentroutersbecomeneighborsintheformofsendingmessages,andtheneighborsthensendlinkstateinformationtoeachothertoformanadjacency,andthenEachcalculatestherouteaccordingtotheshortestpathalgorithm,putsitintheOSPFroutingtable,andcomparestheOSPFroutewithotherroutesandaddsittotheglobalroutingtable.Thewholeprocessusesfivetypesofmessages,threestages,andfourtables.
Pět typů zpráv
Hellomessage:establishandmaintainneighborrelationships.
DBDmessage:Sendlinkstateheaderinformation.
LSRmessage:SendthelinkstateheaderinformationneededfromDBDtoneighbors,requestingcompleteinformation.
LSUmessage:SendthecompleteinformationcorrespondingtotheheaderinformationoftheLSRrequesttotheneighbor.
LSACK:AcknowledgethemessageafterreceivingtheLSUmessage.
Tři stupně
Neighbordiscovery:TheneighborrelationshipisformedbysendingHellomessages.
Routeannouncement:Neighborssendlinkstateinformationtoformanadjacencyrelationship.
Routingcalculation:Calculatetheroutingtablebasedontheshortestpathalgorithm.
Fourtables
Neighbortable:Themainrecordformstheneighborrelationshiprouter.
Databáze stavů odkazů:Informace o stavu záznamů.
OSPFroutingtable: odvozeno z databáze odkazů.
Globalroutingtable:OSPFroutingiscomparedwithothers.
Pracovní proces
(1) Známý odkaz
Eachrouterknowsitsownlink,thatis,thenetworkdirectlyconnectedtoit.
(2) Hledání sousedů
DifferentfromRIP,afterOSPFprotocolruns,itdoesnotbroadcastroutinginformationtothenetworkimmediately,butfirstsearchesforthelinkstatusthatcanbeexchangedwithitselfinthenetworkInformationperipheralrouter.Routersthatcanexchangelinkstateinformationareneighborstoeachother.
(3) Vytvořte datový paket stavu linku
Oncetherouterhasestablishedaneighborrelationship,itcancreatealinkstatedatapacket.
(4)Přenos informací o stavu spojení
TherouterfloodstheLSAdescribingthelinkstatetoneighbors,andfinallyformsalinkstatedatabasecontainingcompletenetworklinkstateinformation.
(5) Výpočet tras
EachrouterintheroutingareacanusetheSPFalgorithmtoindependentlycalculateroutes.
Hlavní výhoda protokolu OSPF
(1)OSPFissuitableforawiderangeofnetworks:ThereisnolimitonthenumberofhopsforroutingintheOSPFprotocol,sotheOSPFprotocolcanbeusedinInmanyoccasions,italsosupportsawidernetworkscale.Aslongasitisinamulticastnetwork,theOSPFprotocolcansupportdozensofrouterstoworktogether.
(2)Multicast-triggeredupdate:AftertheconvergenceoftheOSPFprotocoliscompleted,itwillsendtopologychangeinformationtootherroutersinatriggeredmanner,whichcanreducetheutilizationofnetworkbandwidth;atthesametime,itcanreduceSmallinterference,especiallywhenusingthemulticastnetworkstructure,whensendingoutinformation,itdoesnotcauseothereffectsonotherdevices
(3)Fastconvergencespeed:Ifthenetworkstructurechanges,theOSPFprotocolsystemwillSendoutnewpacketsasquicklyaspossible,sothatthenewtopologywillquicklyspreadtotheentirenetwork;moreover,OSPFusesshort-periodHELLOpacketstomaintainneighborstatus.
(4)Takethecostasthemetricvalue:WhentheOSPFprotocolisdesigned,theinfluenceofthelinkbandwidthontheroutemetricvalueisconsidered.TheOSPFprotocolusesthecostvalueasthestandard,andlinkcostandlinkbandwidthhaveaninverserelationship.Thehigherthebandwidth,thelowerthecost.Inthisway,OSPFroutingismainlybasedonbandwidthfactors.
(5)TheOSPFprotocolisdesignedtoavoidroutingloops:Undertheshortestpathalgorithm,thelinkstateintherouteisreceived,andthenthepathisgenerated,sothatnoloopwilloccur.
(6)Extensiveapplication:ItiswidelyusedontheInternet,andtherearealotofapplicationexamplesinothers.ProvethatthisisoneofthemostwidelyusedIGPs.
OSPFarea
ThepurposeofdividingtheareainOSPFistocontroltherangeoflinkstateinformationLSAflooding,reducethesizeofthelinkstatedatabaseLSDB,andimprovethescalabilityofthenetworkToachieverapidconvergence.
Whenthenetworkcontainsmultipleareas,theOSPFprotocolhasspecialregulations,thatis,theremustbeanArea0,whichisusuallycalledthebackbonearea(BackboneArea).WhendesigninganOSPFnetwork,oneisverygood.Themethodistostartfromthebackboneareaandthenexpandtootherareas.Thebackboneareaisatthecenterofallotherareas,thatis,allareasmustbephysicallyorlogicallyconnectedtothebackbonearea.ThereasonforthisdesignideaisthattheOSPFprotocolmustimporttheroutinginformationofallareasintothebackbonearea,andthentheroutinginformationfromThebackboneareaisdistributedtootherareas.
OSPFrozdělujeplochynaněkoliktypů.
Backbonearea:Asacentralentity,otherareasareconnectedtoit.Thenumberofthebackboneareais0.Inthisarea,alltypesofLSAsareallowedtobeissued.
Standardarea:Thedefaultareatypeexceptthebackbonearea.Inthistypeofarea,alltypesofLSAsareallowedtobepublished.
Stubarea:STUBarea.ThistypeofareadoesnotacceptroutinginformationaboutASoutside,thatis,itdoesnotaccepttype5ASexternalLSAs.Whenroutingtothenetworkoutsidetheautonomoussystem,therouterusesthelackForprovincialrouting(0.0.0.0),thestubareacannotcontaintheautonomoussystemborderrouterASBR.
Completelystubarea:ThistypeofareadoesnotacceptroutinginformationabouttheoutsideoftheAS,anddoesnotacceptsummaryroutesfromotherareasintheAS,thatis,type3,type4,andtype5LSAsarenotaccepted,ThecompletelystubareacannotcontaintheautonomoussystemborderrouterASBR.