网络路由的原理和常见协议的工作机制.docx

上传人:b****8 文档编号:10695675 上传时间:2023-02-22 格式:DOCX 页数:6 大小:19.34KB
下载 相关 举报
网络路由的原理和常见协议的工作机制.docx_第1页
第1页 / 共6页
网络路由的原理和常见协议的工作机制.docx_第2页
第2页 / 共6页
网络路由的原理和常见协议的工作机制.docx_第3页
第3页 / 共6页
网络路由的原理和常见协议的工作机制.docx_第4页
第4页 / 共6页
网络路由的原理和常见协议的工作机制.docx_第5页
第5页 / 共6页
点击查看更多>>
下载资源
资源描述

网络路由的原理和常见协议的工作机制.docx

《网络路由的原理和常见协议的工作机制.docx》由会员分享,可在线阅读,更多相关《网络路由的原理和常见协议的工作机制.docx(6页珍藏版)》请在冰豆网上搜索。

网络路由的原理和常见协议的工作机制.docx

网络路由的原理和常见协议的工作机制

网络路由的原理和常见协议的工作机制

RoutingPage1of9WhatistheRoleoftheRouter?

Routersinterconnectworksinordertoallowmunicationandresourcesharingamongstthoseworks.Connectionsaremadebetweenroutersusingcablesorawirelessmedium.Variousroutingprotocolsenabletherouterstoexchangedata,andcanbeusedtocontroltheflowofthatdata.Someroutershaveswitchesbuiltintothem,andsomerequireaseparateswitch.Apictureofasmallroutercanbefoundbelow:

BEFOREMOVINGFORWARD,ITISIMPORATANTTOKNOWTHATAROUTERISNOTAFIREWALLANDAFIREWALLISNOTAROUTER.THATSAID,SOMEROUTERSHAVEBUILTINFIREWALLCAPABILITIESRoutingPage2of9HowdoesaRouteruseRoutingTables?

Todetermihedestinationofapacket,therouterwillexamihepacketandsendthepackettotheproperdestination.Toexamihepacket,therouterstripsoffthelayer-2informationandputstheresultingpacketintoaqueue–thisprocessourswhenthepacketarrivesattherouter.TherouterwilltheninspectthedestinationIPaddressofthepacketandsendittothecorrectport.Toperformthis,therouterwillusearoutingtable.Theroutingtabletellstherouterexactlywheretosendthepacketsforthegivendestination.Anexampleofaroutingtablecanbefoundbelow:

DestinationNetworkSubMaskGatewayInterface10.12.14.0255.255.255.00.0.0.0LAN76.30.4.0255.255.254.00.0.0.0WAN0.0.0.00.0.0.076.30.4.1WANTheponentsoftheroutingtablearefurtherdescribedbelow:

1)DestinationLANIP–ThedefinedworkID.EveryworkIDdirectlyconnectedtooneoftherouter’sportsisalwayslistedhere.2)SubMask–IdentifiestheworkIDfromanIPaddress.3)Gateway–TheIPaddressforthehoprouter(i.e.wherethepacketshouldgo).IfthepacketisdestinedforaworkIDthatisnotdirectlyconnectedtotherouter,thegatewaycolumntellsroutertheIPaddressofaroutertosendthepacketto;thenextrouterhandlesthepacketandtheoriginalrouterisrelievedofitsresponsibilityforthatpacket.IftheworkIDisdirectlyconnected,thenagatewayisn’tneeded.4)Interface–TheInterfacefieldidentifieswhichofitsphysicalportstouse.Theprovidedexampleshows“LAN”and“WAN”butsomeroutersmayshowaport’sIPaddressoranothertypeofabbreviation(likef0/0,f0/1asfoundonCiscorouters).***Whenlookingattheroutingtable,a0represents“anything.”AnexampleofthiscanbefoundintheprovidedroutingtablewiththeDestinationLANIPof10.12.14.0andthesubmaskof255.255.255.0.Thismeansthatanyvaluebetween1and254isaeptable.Exercise:

Usetheroutingtableabovetoanswerthefollowingquestions.1)WhatinterfacewouldapacketreceivedwithaDestinationLANIPof76.30.4.27besentto?

________2)IfapacketisreceivedforaDestinationLANIPof69.36.252.61,whatGatewayshouldthepacketbesentto?

____________________________________________________________________________RoutingPage3of9HowtoIdentifytheDefaultRouteintheRoutingTableMostroutershaveadefaultroute.Adefaultroutetellstherouterwheretoforwardpacketswhennootherroutecanbedeterminedbyusingtheroutingtable.Intheroutingtablebelow,thedefaultrouteisrepresentedinthethirdline:

DestinationLANIPSubMaskGatewayInterface10.12.14.0255.255.255.00.0.0.0LAN76.30.4.0255.255.254.00.0.0.0WAN0.0.0.00.0.0.076.30.4.1WANIsaRoutertheOnlyThingthathasaRoutingTable?

No,everynodeonaworkshouldhavearoutingtable.Takethetimetoopenamandpromptorterminalwindowandtypethemandstat–r.YoumayalsousethemandrouteprintintheWindowsmandpromptasanalternativeoptionorrouteinlinux.Thedefaultroute.Thisroutingtableshowsroutesfor10.12.14.0and76.30.4.0;thethirdlineintheroutingtablehas0.0.0.0forthedestinationandsubmask,representinganyotherdestination.Essentially,thisruleintheroutingtablesays(anydestinationaddress)(withanysubmask)(forwarditto76.30.4.1)(usingtheWANport).RoutingPage4of9WhatisNetworkAddressTranslation(NAT)?

NetworkAddressTranslation(NAT)istheprocessofmodifyingIPaddressinformationinIPv4headerswileittransitsthrougharoutingdevice.Thismodificationisdoneforsecuritypurposes,andtohidetheIPaddressesofputersontheLANwhileallowingtheputertoaesstotheInter.NATessentiallyextendsthelifeofIPv4addressesontheInter.ItmustbenotedthatNATisnotrouting,itisaseparatetechnologythatmanyroutersofferasafeature.WhatdoesthebasicsetupofNATlooklike?

Inthisscenario,youareaworkadministrator.YouhaveaLANwitheightputersonitthatneedaesstotheInter.YoucalltheInterServiceProviderandpurchaseaworkID(example:

1.2.3.136/29).YouthenassignanIPaddresstoeachputerandtotheLANconnectionontherouter,andthenassigntheIPaddressfortheISP’sroutertotheWANconnectiononthelocalrouter(example1.2.3.4).Theputersontheworkthenusetherouterastheirdefaultgateway(aesspointtotheInter).AnexampleofNATcanbefoundbelow:

InNATsmostbasicstructure,whentherouterreceivestherequestfromtheputerontheLANitwillreplacethesourceIPaddresswiththeIPaddressoftheWANonoutgoingpackets.Therouterwillthentrackthebasicdataabouttheactiveconnection(destinationaddressandport).Whenthereplyreturnstotherouter,therouterwillusetheconnectiontrackinginformationthatitstoredduringfromtheoutboundrequesttodetermiheprivateaddressontheLANandtherouterwillforwardthereplytotheappropriateputer.RoutingPage5of9WhatisPAT?

TherearemanymethodsusedtoNAT.ThemostmonmethodisPortAddressTranslation(PAT).PATusesportnumberstomaptrafficfromspecificputersontheLAN.WhenaputerontheLANmakesarequest,likeusingawebbrowsertoaessawebsite,therouterwillrecordthesourceIP,destinationIP,andtheportnumber.TheprivateIPaddressisthenswappedoutforthepublicIPaddressandauniqueportnumberoneachpacket–thisinformationisalsorecordedbytherouter.Anexampleofthisinteractioncanbeseenbelow:

Whenthetrafficisreturned,therouterwillparetheiningdestinationportandsourceIPaddresstotheentryintheNATtranslationtabletodetermineinternalIPaddressandmodifythepacketwiththeinternalsourceIPaddress.ThepacketwillthenbesenttotheoriginalputerwiththeoriginatingsourceIPaddress.Thisprocesswillevenworkwhenmorethan1puterontheworkareaessingthesameserveroutsideoftheworkbecausethoughtsofportsareavailableforPAT.Onethingtobeawareofisthatthisprocessonlyworksfortrafficleavingthework,notinboundtraffic.Noticehowthesource(Src:

)IPandporthavebeenchangedinthepacket.OriginalIPis10.0.0.2AfterPATIPis157.55.1.10Originalport3123AfterPATportis4135TheNATtranslationtable.Therouterhasstoredtheinformationsothatthereturnedpacketscanbesenttocorrecthost.RoutingPage6of9Then,WhatisPortForwarding?

Portforwardingtakescareofthelimitationsassociatedwithinboundrequests,likeaputeringfromoutsideoftheworkattemptingtoaessawebserverinsidethework.Portforwardingallowsaworkadministratortodesignateaspecificlocaladdressfordifferentworkservices.AputeroutsideoftheworkcanmakearequestforservicesusingthepublicIPaddressoftheworkandtheportnumberofthedesiredservice.Therouterwillexamihepacket,reviewthelistofservicesmappedtolocaladdresses,thesendthepackettotheproperhost.Anexampleofportforwardingcanbefoundbelow:

WhatistheDifferenceBetweenDynamicandStaticNATs?

BothstaticanddynamicNATrequirestheworktohaveenoughpublicaddressestosatisfythetotalnumberofsimultaneoususersessions.Fundamentally,staticNATsareusedforinboundtrafficanddynamicNATsareusedforoutboundtrafficbutbotherarefurtherexplainedbelow:

StaticNAT:

AstaticNAT(AKAinboundmapping)istheprocessofmappinganunregisteredIPaddresstoaregisteredIPaddress.Thismappingisdoneonaone-to-onebasis.Theunregistered(ormapped)IPaddressisassignedwiththesameregisteredIPaddresseachtimetherequestismade.Amonapplicationofthisisforwebserversorhoststhatmusthaveaconsistentaddressthatcanbeaessedfromoutsideofthework.AnexampleofstaticNATingcanbefoundbelow:

RoutingPage7of9DynamicNAT:

AdynamicNATprovidesapermanentmappingbetweenspecificinternalIPaddressesandaspecificpublicIPaddress.Toachievethis,dynamicNATusesapoolofpublicIPaddressesandassignstheIPaddressesonafirstefirstservebasiswhenthehostmakesarequestforaserviceoutsideofthework.AnexampleofdynamicNATingcanbefoundbelow:

WhatisDynamicRouting?

Thisjobsheethasshownmanyexamplesoftablesthatlookingliketheyarestatic.Don’tletthatfoolyouthough;mostroutershavetheabilitytoupdatetheirroutesdynamically,providedtheyareabletousedynamicroutingprotocols.Whilemanyroutingprotocolshavebeendefinedovertheyears,routingprotocolsaretypicallydividedintothreedistinctgroups:

1)distancevector;2)linkstate,and3)hybrid.Tounderstandthesegroups,youmustunderstandmetricsbeforeunderstandingthedifferentroutingprotocols.RoutingMetricsAmetricissimplyarelativevaluethatrouterswillusewhentheyhavemorethanoneroutetogettoanotherwork.Thesemetricsidentifythe“cost”ofusingagivenroute.Alowermetricnumberidentifiesthefirstpaththattheroutershouldtake;iftheroutercan’ttakethatpathitwilluseahighermetriumberifitisavailable.Anexampleofaroutingtablewithmetricscanbeseenbelow.Theroutingmetricandinterfacehasbeenoutlinedandidentifiestheinterfacetosendpacketstoforworkdestinationsof224.0.0.0withasubmaskof240.0.0.0.Inthisinstance,5pathsareavailableforthatdestinationbut4oftheinterfacescarrythesamemetric–meaningthatall4interfacescanbeused;ifthesamemetriumberisused,thenthewidestsubmaskwilltakeprecedence.Ifthereisaproblemwiththoseinterfaces,theroutershouldusetheinterfacewiththenexthighestmetric.RoutingPage8of9Dynamicroutingprotocolsallowaroutertofindalternativeroutesifaconnectionislostorunavailable.Therolethatthemetricplaysinthisprocessallowstheroutertofindthenextroute–therouterwillalwayschoseroutewiththelowestmetric.Itisimportanttoknowthatthereisnomonstandardusedtodetermihemetricvaluebutvarioustypesofdynamicprotocolsusedifferentcriteria.Youwillfindsomeofthemostmoncriteriafordete

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 解决方案 > 学习计划

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1