第4章:OSI層次:網絡層_第1頁
第4章:OSI層次:網絡層_第2頁
第4章:OSI層次:網絡層_第3頁
第4章:OSI層次:網絡層_第4頁
第4章:OSI層次:網絡層_第5頁
已閱讀5頁,還剩146頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領

文檔簡介

OSILayer3:

NetworkLayerRoutingandAddressingLayer3:NetworkLayerOverviewoftheNetworkLayerIPAddressesandSubnetsLayer3DevicesARPProtocolNetworkLayerServicesRoutedandRoutingProtocolsVLSMICMPMobileIPLayer3ResponsibilitiesMovedatathroughnetworksUseahierarchicaladdressingscheme(opposedtoMACaddressing,whichisflat)SegmentnetworkandcontrolflowoftrafficReducecongestionTalktoothernetworksLayer3DevicesRoutersInterconnectnetworksegmentsornetworksMakelogicaldecisionsbasedonIPaddressesDeterminebestpathSwitchpacketsfromincomingportstooutgoingportsLayer3:NetworkLayerOverviewoftheNetworkLayerIPAddressesandSubnetsLayer3DevicesARPProtocolNetworkLayerServicesRoutedandRoutingProtocolsVLSMICMPMobileIPLayer3Packet/DatagramHeaderincludessourceANDdestinationaddresses固定部分可變部分04816192431版本標志生存時間協議標識服務類型總長度片偏移填充首部檢驗和源地址目的地址可選字段(長度可變)比特首部長度01234567DTRC未用優(yōu)先級數據部分比特數據部分首部傳送IP數據報首部可變部分首部04816192431版本標志生存時間協議標識服務類型總長度片偏移填充首部檢驗和源地址目的地址可選字段(長度可變)比特首部長度01234567DTRC未用優(yōu)先級數據部分比特數據部分首部傳送IP數據報固定部分首部04816192431版本標志生存時間協議標識服務類型總長度片偏移填充首部檢驗和源地址目的地址可選字段(長度可變)比特首部長度01234567DTRC未用優(yōu)先級數據部分比特數據部分首部傳送IP數據報固定部分可變部分首部04816192431版本標志生存時間協議標識服務類型總長度片偏移填充首部檢驗和源地址目的地址可選字段(長度可變)比特首部長度01234567DTRC未用優(yōu)先級數據部分比特固定部分可變部分版本——占4bit,指IP協議的版本目前的IP協議版本號為4(即IPv4)首部04816192431版本標志生存時間協議標識服務類型總長度片偏移填充首部檢驗和源地址目的地址可選字段(長度可變)比特首部長度01234567DTRC未用優(yōu)先級數據部分比特固定部分可變部分首部長度——占4bit,可表示的最大數值是15個單位(一個單位為4字節(jié))因此IP的首部長度的最大值是60字節(jié)。首部04816192431版本標志生存時間協議標識服務類型總長度片偏移填充首部檢驗和源地址目的地址可選字段(長度可變)比特首部長度01234567DTRC未用優(yōu)先級數據部分比特固定部分可變部分服務類型——占8bit,用來獲得更好的服務這個字段以前一直沒有被人們使用首部04816192431版本標志生存時間協議標識服務類型總長度片偏移填充首部檢驗和源地址目的地址可選字段(長度可變)比特首部長度01234567DTRC未用優(yōu)先級數據部分比特固定部分可變部分總長度——占16bit,指首部和數據之和的長度,單位為字節(jié),因此數據報的最大長度為65535字節(jié)。總長度必須不超過最大傳送單元MTU。

首部04816192431版本標志生存時間協議標識服務類型總長度片偏移填充首部檢驗和源地址目的地址可選字段(長度可變)比特首部長度01234567DTRC未用優(yōu)先級數據部分比特固定部分可變部分標識(identification)占16bit,它是一個計數器,用來產生數據報的標識。首部04816192431版本標志生存時間協議標識服務類型總長度片偏移填充首部檢驗和源地址目的地址可選字段(長度可變)比特首部長度01234567DTRC未用優(yōu)先級數據部分比特固定部分可變部分標志占3bit,最高位為0MF為0表示最后一個分片首部04816192431版本標志生存時間協議標識服務類型總長度片偏移填充首部檢驗和源地址目的地址可選字段(長度可變)比特首部長度01234567DTRC未用優(yōu)先級數據部分比特固定部分可變部分片偏移(12bit)指出:較長的分組在分片后某片在原分組中的相對位置。片偏移以8個字節(jié)為偏移單位。偏移=0/8=0偏移=0/8=0偏移=1400/8=175偏移=2800/8=350140028003799279913993799需分片的數據報數據報片1首部數據部分共3800字節(jié)首部1首部2首部3字節(jié)0數據報片2數據報片314002800字節(jié)0IP數據報分片的舉例首部04816192431版本標志生存時間協議標識服務類型總長度片偏移填充首部檢驗和源地址目的地址可選字段(長度可變)比特首部長度01234567DTRC未用優(yōu)先級數據部分比特固定部分可變部分生存時間(8bit)記為TTL(TimeToLive)數據報在網絡中可通過的路由器數的最大值。首部04816192431版本標志生存時間協議標識服務類型總長度片偏移填充首部檢驗和源地址目的地址可選字段(長度可變)比特首部長度01234567DTRC未用優(yōu)先級數據部分比特固定部分可變部分協議(8bit)字段指出此數據報攜帶的數據使用何種協議以便目的主機的IP層將數據部分上交給哪個處理過程運輸層網絡層首部TCPUDPICMPIGMPOSPF數據部分IP數據報協議字段指出應將數據部分交給哪一個進程首部04816192431版本標志生存時間協議標識服務類型總長度片偏移填充首部檢驗和源地址目的地址可選字段(長度可變)比特首部長度01234567DTRC未用優(yōu)先級數據部分比特固定部分可變部分首部檢驗和(16bit)字段只檢驗數據報的首部不包括數據部分。這里不采用

CRC

檢驗碼而采用簡單的計算方法。發(fā)送端接收端16bit字116bit字2置為全0檢驗和16bit字n16bit反碼算術運算求和……取反碼數據報首部IP數據報16bit檢驗和16bit字116bit字216bit檢驗和16bit字n16bit反碼算術運算求和16bit結果……取反碼數據部分若結果為0,則保留;否則,丟棄該數據報數據部分不參與檢驗和的計算首部04816192431版本標志生存時間協議標識服務類型總長度片偏移填充首部檢驗和源地址目的地址可選字段(長度可變)比特首部長度01234567DTRC未用優(yōu)先級數據部分比特固定部分可變部分源地址和目的地址都各占4字節(jié)NetworkLayerAddressesIPaddressesare32bitslongTheyarerepresentedasfouroctetsindotteddecimalformatTheIPaddresshastwocomponents:ThenetworkIDThehostIDLayer3AddressesNetworkIDassignedbyARIN(AmericanRegistryforInternetNumbers,)identifiesthenetworktowhichadeviceisattachedmaybeidentifiedbyone,two,orthreeofthefirstthreeoctetsHostIDassignedbyanetworkadministratoridentifiesthespecificdeviceonthatnetworkmaybeidentifiedbyone,two,orthreeofthelastthreeoctetsNetworkHostIPAddressesDifferentclassaddressesreservedifferentamountsofbitsforthenetworkandhostportionsoftheaddressClassANHHHClassBNNHHClassCNNNH0Network#Host#8810Network#Host#88110Network#Host#0–127ClassAaddress128-191ClassBaddress192–223ClassCaddress224–239ClassD–Multicast240–255ClassE-ResearchClassAClassBClassCClassesNumberofHostsThemaximumnumberofhostsvaryforeachclass.ClassAhas16,777,214availablehosts(224

–2)ClassBhas65,534availablehosts(216

–2)ClassChas254availablehosts(28

–2)ThefirstaddressineachnetworkisreservedforthenetworkaddressThelastaddressisreservedforthebroadcastaddress.ReservedAddressesNetworkAddressAnIPaddressthatendswithbinary0sinthehostpartoftheaddressClassAnetworkaddressexample:HostsonanetworkcanonlycommunicatedirectlywithotherhostsiftheyhavethesamenetworkID.ReservedAddressesBroadcastAddressisusedtosenddatatoallofthedevicesonanetwork.BroadcastIPaddressesendwithbinary1sinthehostpartoftheaddress.ClassBbroadcastaddressexample:55

(decimal255=binary11111111)ClassA

:areservednetworknumber55:abroadcastnumber

ClassB:areservednetwork

number55:abroadcast

numberClassC:areservednetwork

number55:abroadcast

numberIPAddressingTherearecertainIPaddressrangesreservedforprivateIPaddressingschemes.IPaddressdepletionanditssolutions:NATCIDRIPv6PrivateAddressSpace-55-55-55Networkadministratorssometimesneedtodividenetworksintosmallernetworks,calledsubnets,inordertoprovideextraflexibilityBitsareborrowedfromthehostfieldandaredesignatedasthesubnetfieldSubnetNetworkSubnetHostNetworkHostBasicsofSubnettingSubnetsaresmallerdivisionsofnetworksprovideaddressingflexibility.Subnetaddressesareassignedlocally,usuallybyanetworkadministrator.Subnetsreduceabroadcastdomain.HowmanybitscanIborrow?SizeofHostFieldMaximum#ofborrowedbitsClassA2422ClassB1614ClassC86TheminimumnumberofbitsyoucanborrowistwoTheminimumnumberofbitsborrowedis2,WHY?Ifyouweretoborrowonly1bit,tocreateasubnet,thenyouwouldonlyhaveanetworknumber-the.0network-andthebroadcastnumber-the.1networkThemaximumnumberofbitsthatcanbeborrowedcanbeanynumberthatleavesatleast2bits,remaining,forthehostnumberHowmanybitscanIborrow?Wemuststrikeabalancebetweenthenumberofsubnetsrequired,thehostspersubnetthatisacceptable,andtheresultingwasteofaddresses.NumberofBitsBorrowedNumberofSubnetsCreatedNumberofHostsPerSubnetTotalNumberofHostsPercentUsed226212449%363018071%4141419677%530618071%662212449%Byproduct:WasteAddressesClassCSubnetmaskAlias:extendednetworkprefixdefinehowmanybitsweusetoconstructthenetwork,andhowmanybitstodescribethehostaddressesSubnetMaskClassA ClassB ClassC CalculatingaSubnetWewillsubnettheIPaddress:Need:13subnets10hostsoneachsubnetStep#1DeterminethedefaultsubnetmaskWhatclassIPaddressisthis?ClassCClassCdefaultsubnetmask:Step#2FiguretheactualnumberofsubnetsandhostsbyborrowingbitsfromhostIDLet’sseehowmanysubnetsandhosts13subnets10hostsoneachsubnetBorrow4bitsfromthehostStep#3XXXXHHHH16possiblesubnets16possiblehostsforeachsubnetStep#3continued…Weget16possiblesubnetsand16possiblehostsforeachsubnetbecause:Forthe4bitsborrowedeachbitcanbea1ora0leavingyouwith24or16possiblecombinations.Thesamegoesforthe4leftoverhostbits.Important:Thereareonly14availablesubnetsandhostsoneachsubnet.Why?Step#3continued…Becauseyoucannotusethefirstandlastsubnet.Becauseyoucannotusethefirstandlastaddresswithineachsubnet.Foreach,oneisthebroadcastaddressandoneisthenetworkaddress.Step#4Determinethesubnetmask.XXXXHHHHWhereXrepresentstheborrowedbitsforsubnetting.Step#4continued…AddtheplacevaluesofXtogethertogetthelastoctetdecimalvalueofthesubnetmask.128+64+32+16=240Thesubnetmaskis:40ThesubnetmaskisusedtorevealthesubnetandhostaddressfieldsinIPaddresses.Step5DeterminetherangesofhostaddressesSubnet#SubnetBitsHostBitsInDecimal100000000-1111.0-1111.16-.31300100000-1111.32-.47400110000-1111.48-.63501000000-1111.64-.79601010000-1111.80-.95701100000-1111.96-.111801110000-1111.112-.127Step5continued…Subnet#SubnetBitsHostBitsInDecimal910000000-1111.128-.1431010010000-1111.144-.1591110100000-1111.160-.1751210110000-1111.176-.1911311000000-1111.192-.2071411010000-1111.208-.2231511100000-1111.224-.2391611110000-1111.240-.255Step5continued…16possiblesubnets.16possiblehostsoneachsubnet14availablesubnets14availablehostsoneachsubnetFiguringSubnetNetworkAddressesStep#1:ChangetheIPhostaddresstobinary.Step#2:Changethesubnetmasktobinary.Step#3:UsethebooleanoperatorANDtocombinethetwo.Step#4:Convertthenetworkbinaryaddresstodotteddecimal.FiguringSubnetNetworkAddressesIPHost 20SubnetMask 10101100.00010000.00000010.0111100011111111.11111111.11111111.0000000010101100.00010000.00000010.00000000ThisisthesubnetnetworkaddressItcanhelpdeterminepath.ANDInordertofindthenetworkIDofasubnet,theroutermusttaketheIPaddress,andthesubnetmask,andlogically,ANDthemtogetherGivenandneeding8usablesubnets,findthesubnetworknumbers,therangesofhostnumbers,andsubnetworkbroadcastnumbers.Practice:IPAddressingProblemsIPAddressisaclassC.Defaultsubnetmaskis.Weneedtoextendthenetworknumberbyenoughbitstogive8usablesubnets.Stealing2bitsyields2usablesubnets,stealing3bitsyields6usablesubnets,sowemuststeal4bitstoget14usablesubnets,ofwhichweneeded8.Thismakesthesubnetmask40.SotheNetworknumberis195.137.92.NNNNHHHHwhereNsstandfornetworkextensionbits(subnets)andHsstandforhostnumbers.Nextwemustnumberthesubnets;thereare16combinationsof4bitbinarynumbersbuttheyretaintheirplacevaluewithinthelastoctet.SolutionLayer3:NetworkLayerOverviewoftheNetworkLayerIPAddressesandSubnetsLayer3DevicesARPProtocolNetworkLayerServicesRoutedandRoutingProtocolsVLSMICMPMobileIPPathdeterminationPathdeterminationTherouterusestochoosethenexthopinthepathforthepackettotraveltoitsdestinationbasedonthelinkbandwidth,hop,delay…IPaddressesIPaddressesareimplementedinsoftware,andrefertothenetworkonwhichadeviceislocated.Routersconnectnetworks,eachofwhichmusthaveauniquenetworknumberinorderforroutingtobesuccessful.TheuniquenetworknumberisincorporatedintotheIPaddressthatisassignedtoeachdeviceattachedtothatnetworkRouterInterfaceRouterfunctionRouterfunction(cont.1)Stripsoffthedatalinkheader,carriedbytheframe.(ThedatalinkheadercontainstheMACaddressesofthesourceanddestination.)

Routerfunction(cont.2)Examinesthenetworklayeraddresstodeterminethedestinationnetwork.Routerfunction(cont.3)Consultsitsroutingtablestodeterminewhichofitsinterfacesitwillusetosendthedata,inorderforittoreachitsdestinationnetwork.Routerfunction(cont.4)SendthedataoutinterfaceB1,therouterwouldencapsulatethedataintheappropriatedatalinkframe.RouterInterfaceexampleInterfaceisarouter’sattachmenttoanetwork,itmayalsobereferredtoasaportinIProuting.Eachinterfacemusthaveaseparate,uniquenetworkaddress.IPaddressassignmentStatic

addressingConfigureeachindividualdevicewithanIPaddressYoushouldkeepverymeticulousrecords,becauseproblemscanoccurifyouuseduplicateIPaddresses.Dynamic

addressingThereareafewdifferentmethodscanbeusedtoassignIPaddressesdynamically:RARP:ReverseAddressResolutionProtocol.BOOTP:BOOTstrapProtocol.DHCP:DynamicHostConfigurationProtocol.Dynamicaddressing:

RARPMAC: KnownIP: UnknownRARPRequestRARPReplyRARPserverDynamicaddressing:

BOOTPMAC: KnownIP: UnknownUDPBroadcastUDPBroadcastBOOTPserverMAC1–IP1MAC2–IP2MAC3–IP3IPAddressGatewayIPofserverVendor-specificDynamicaddressing:

DHCPMAC: KnownIP: UnknownDHCPDiscoverUDPBroadcastDHCPOfferUDPUnicastDHCPserverIP1IP2IP3BroadcastDHCPRequestUnicastDHCPAckIPAddressGatewayIPofserversAndmore…Layer3:NetworkLayerOverviewoftheNetworkLayerIPAddressesandSubnetsLayer3DevicesARPProtocolNetworkLayerServicesRoutedandRoutingProtocolsVLSMICMPMobileIPAddressResolutionProtocolInorderfordevicestocommunicate,thesendingdevicesneedboththeIPaddressesandtheMACaddressesofthedestinationdevices.ARPenablesacomputertofindtheMACaddressofthecomputerthatisassociatedwithanIPaddress.AddressResolutionProtocolARPTableRAMA.B.C.1.2.3A.B.C.7.8.9A.B.C.4.5.6ABCARPoperationARPTable:?MACA.B.C.1.2.3MAC?IPIPDataA.B.C.1.2.3A.B.C.7.8.9A.B.C.4.5.6ABCARPoperation:

ARPrequestMACA.B.C.1.2.3MACff.ff.ff.ff.ff.ffIPIPWhatisyourMACAddr?A.B.C.1.2.3A.B.C.7.8.9A.B.C.4.5.6ABCARPoperation:

CheckingMACA.B.C.1.2.3MACff.ff.ff.ff.ff.ffIPIPWhatisyourMACAddr?ThatismyIPA.B.C.1.2.3A.B.C.7.8.9A.B.C.4.5.6ABCARPoperation:

ARPreplyMACA.B.C.7.8.9MACA.B.C.1.2.3IPIPThisismyMACAddrA.B.C.1.2.3A.B.C.7.8.9A.B.C.4.5.6ABCARPoperation:

CachingARPTable:A.B.C.7.8.9–MACA.B.C.1.2.3MACA.B.C.7.8.9IPIPDataARP:

DestinationlocalARP:InternetworkCommunicationHowtocommunicatewithdevicesthatarenotonthesamephysicalnetworksegment?DefaultgatewayProxyARPDefaultgatewayInorderforadevicetocommunicatewithanotherdeviceonanothernetwork,youmustsupplyitwithadefaultgateway.AdefaultgatewayistheIPaddressoftheinterfaceontherouterthatconnectstothenetworksegmentonwhichthesourcehostislocated.Inorderforadevicetosenddatatotheaddressofadevicethatisonanothernetworksegment,thesourcedevicesendsthedatatoadefaultgateway.

ProxyARPProxyARPisavariationoftheARP.Inthecasethesourcehostdoesnothaveadefaultgatewayconfigured.ARPReplyARP:

DestinationnotlocalARPFlowchartSendDatatoadeviceSendDataSendanARPrequestGetanARPreply

IstheMACaddressinmyARPcacheNYLayer3:NetworkLayerOverviewoftheNetworkLayerIPAddressesandSubnetsLayer3DevicesARPProtocolNetworkLayerServicesRoutedandRoutingProtocolsVLSMICMPMobileIPConnectionorientednetworkservicesAconnectionisestablishedbetweenthesenderandtherecipientbeforeanydataistransferred.CircuitswitchedConnection-orientedvs.circuitswitched.However,thetwotermsarenotthesameConnection-oriented:establishaconnectionwiththerecipient,first,andthenbeginthedatatransfer.Allpacketstravelsequentiallyacrossthesamechannel,ormorecommonly,acrossthesamevirtualcircuit.ConnectionlessnetworkservicesTheytreateachpacketseparately.IPisaconnectionlesssystem.PacketswitchedConnectionlessnetworkvs.packetswitched.Thetwotermsarenotthesame,eitherWhenthepacketspassfromsourcetodestination,theycan:Switchtodifferentpaths.Arriveoutoforder.Devicesmakethepathdetermination

foreachpacketbasedonavarietyofcriteria.Someofthecriteriamaydifferfrompackettopacket.Layer3:NetworkLayerOverviewoftheNetworkLayerIPAddressesandSubnetsLayer3DevicesARPProtocolNetworkLayerServicesRoutedandRoutingProtocolsVLSMICMPMobileIPNetworkprotocoloperationRoutedprotocolProtocolsthatprovidesupportforthenetworklayerarecalledroutedorroutableprotocols.IPisanetworklayerprotocol,andbecauseofthat,itcanberoutedoveraninternetwork.Non-routableprotocolNon-routableprotocolsareprotocolsthatdonotsupportLayer3.Themostcommonofthesenon-routableprotocolsisNetBEUI.NetBEUIisasmall,fast,andefficientprotocolthatislimitedtorunningononesegment.AddressingofaroutableprotocolRoutingtableE0E2E1Classification#1:

StaticandDynamicStaticroutes:Thenetworkadministratormanuallyentertheroutinginformationintherouter.Dynamicroutes:Routerscanlearntheinformationfromeachotheronthefly.Usingroutingprotocoltoupdateroutinginformation.RIP,IGRP,EIGRP,OSPF…Staticvs.dynamicroutesStaticroutes:Forhidingpartsofaninternetwork.Totestaparticularlinkinanetwork.Formaintainingroutingtableswheneverthereisonlyonepathtoadestinationnetwork.Dynamicroutes:Maintenanceofroutingtable.Timelydistributionofinformationintheformofroutingupdates.Reliesonroutingprotocoltoshareknowledge.Routerscanadjusttochangingnetworkconditions.RoutingprotocolRoutingprotocolsdeterminethepathsthatroutedprotocolsfollowtotheirdestinations.Routedvs.RoutingprotocolRoutingprotocolsdeterminehowroutedprotocolsareroutedClassification#2:

IGPandEGP

Dynamicroutes.InteriorGatewayProtocols(RIP,IGRP,EIGRP,OSPF):Beusedwithinanautonomoussystem,anetworkofroutersunderoneadministration,likeacorporatenetwork,aschooldistrict'snetwork,oragovernmentagency'snetwork.ExteriorGatewayProtocols(EGP,BGP):Beusedtoroutepacketsbetweenautonomoussystems.

IGP

IGPvs.EGPEGPClassification#3:

DVPandLSPDistance-VectorProtocols(RIP,IGRP):Viewnetworktopologyfromneighbor’sperspective.Adddistancevectorsfromroutertorouter.Frequent,periodicupdates.Passcopyofroutingtablestoneighborrouters.LinkStateProtocols(OSPF):Getscommonviewofentirenetworktopology.Calculatestheshortestpathtootherrouters.Event-triggeredupdates.Passeslinkstateroutingupdatestootherrouters.DistancevectorroutingLinkstateroutingRIP(RouteInformationProtocol)Mostpopular.InteriorGatewayProtocol.DistanceVectorProtocol.Onlymetricisnumberofhops.Maximumnumberofhopsis15.Updatesevery30seconds.Doesn’talwaysselectfastestpath.Generateslotsofnetworktraffic.RIPv2isanimprovedversionofRIPv1IGRP(InteriorGatewayRouteProtocol)andEIGRP(EnhancedIGRP)Ciscoproprietary.InteriorGatewayProtocol.DistanceVectorProtocol.Metriciscomposeofbandwidth,load,delayandreliability.Maximumnumberofhopsis255.Updatesevery90seconds.EIGRPisanadvancedversionofIGRP,thatishybridroutingprotocol.OSPF(OpenShortestPathFirst)OpenShortestPathFirst.InteriorGatewayProtocol.LinkStateProtocol.Metriciscomposeofcost,speed,traffic,reliability,andsecurity.Event-triggeredupdates.Layer3:NetworkLayerOverviewoftheNetworkLayerIPAddressesandSubnetsLayer3DevicesARPProtocolNetworkLayerServicesRoutedandRoutingProtocolsVLSMICMPMobileIPClassfulrouting&VLSMClassfulroutingClassfulroutingprotocolsrequirethatasinglenetworkusethesamesubnetmask.Example:networkmustusejustonesubnetmasksuchas.VLSM—Variable-LengthSubnetMasksVLSMissimplyafeaturethatallowsasingleautonomoussystemtohavenetworkswithdifferentsubnetmasks.VLSMWithVLSM,anetworkadministratorcanusealongmaskonnetworkswithfewhosts,andashortmaskonsubnetswithmanyhosts.IfaroutingprotocolallowsVLSM:usea30-bitsubnetmaskonnetworkconnections,52a24-bitmaskforusernetworks,Or,evena22-bitmask,,fornetworkswithupto1000users.WhyusetheVLSMVLSMallowsanorganizationtousemorethanonesubnetmaskwithinthesamenetworkaddressspace.ImplementingVLSMisoftenreferredtoas"subnettingasubnet",andcanbeusedtomaximizeaddressingefficiency.VLSMisoneofthemodificationsthathashelpedtobridgethegapbetweenIPv4andIPv6.VLSMAdvantages:

EfficientuseofIPaddressesBetterrouteaggregationSupportVLSMRoutingProtocol:OpenShortestPathFirst(OSPF)IntegratedIntermediateSystemtoIntermediateSystem(IntegratedIS-IS)EnhancedInteriorGatewayRoutingProtocol(EIGRP)RIPv2Staticrouting.AWasteofSpaceInthepast,ithasbeenrecommendedthatthefirstandlastsubnetnotbeused.ButwecanusedtheSubnet0fromCiscoIOSver12.0.FromIOSver12.0,theCmand:

router(config)#noipsubnet-zeroAWasteofSpace00

*****24(11100000)Host-idsubnet-idHowtousetheVLSMVLSM:AnExampleVLSM:AnExampleAclassCaddressof/24hasbeenallocated.Perth,Sydney,andSingaporehaveaWANconnectiontoKualaLumpur(KL).Perthrequires60hosts.KLrequires28hosts.SydneyandSingaporeeachrequire12hosts.TocalculateVLSMsubnetsandtherespectivehostsallocatethelargestrequirementsfirstfromtheaddressrange.Requirementslevelsshouldbelistedfromthelargesttothesmallest.VLSM:AnExampleStep1InthisexamplePerthrequires60hosts.Use6bitssince26

–2=62usablehostaddresses.Thus2bitswillbeusedfromthe4thOctettorepresenttheextended-network-prefixof/26andtheremaining6bitswillbeusedforhostaddresses.ApplyingVLSMonaddress/24gives:0hhhhhh/2692(11000000)/24(Subnetted)/26(00000000)Perth(60hosts)/26(NetworkAddress)/26/26……

1/262/263/26(BroadcastAddress)4/26(01000000)Unused(Subnetted)28/26(10000000)Unused92/26

(11000000)UnusedSeenextslideVLSM:AnExampleStep2KLrequires28hosts.Thenextavailableaddressafter3/26is4/26.Since28hostsarerequired,5bitswillbeneededforthehostaddresses,25

–2=30usablehostaddresses.Thus5bitswillberequiredtorepresentthehostsand3bitswillbeusedtorepresenttheextended-networkprefixof/27.ApplyingVLSMonaddress4/26gives:10hhhhh/2724(11100000)From4/264/27(01000000)KL(28hosts)4/27(NetworkAddress)5/276/27……

4/275/276/27(BroadcastAddress)6/27(01100000)Unused(Subnetted)28/27(10000000)Unused60/27(10100000)Unused92/27(11000000)Unused24/27(11100000)UnusedSeenextslideVLSM:AnExampleStep3NowSydneyandSingaporerequire12hostseach.Thenextavailableaddressstartsfrom6/27.Since12hostsarerequired,4bitswillbeneededforthehostaddresses,24=16,16–2=14usableaddresses.Thus4bitsarerequiredtorepresentthehostsand4bitsfortheextended-network-prefixof/28.ApplyingVLSMonaddress6/27gives:110hhhh/2840(11110000)From6/276/28Sydney(12hosts)6/28(NetworkAddress)7/288/28

……

09/2810/2811/28(BroadcastAddress)12/28Singapore(12hosts)12/28(NetworkAddress)13/2814/28……

26/2827/2828/28(BroadcastAddress)

28/28Unused(Subnetted)44/28Unused...…Unused40/28UnusedSeenextslideVLSM:AnExampleStep4NowallocateaddressesfortheWANlinks.RememberthateachWANlinkwillrequiretwoIPaddresses.Thenextavailablesubnetis28/28.Since2networkaddressesarerequiredforeachWANlink,2bitswillbeneededforhostaddresses,22

–2=2usableaddresses.Thus2bitsarerequiredtorepresentthelinksand6bitsfortheextended-network-prefixof/30.ApplyingVLSMon28/28gives:11000

hh/3052(11111100)From28/2828/30Perth–KL28/30(NetworkAddress)29/3030/3031/30(BroadcastAddress)32/30Sydney–KL32/30(NetworkAddress)33/3034/3035/30(BroadcastAddress)36/30Singapore–KL36/30(NetworkAddress)37/3038/3039/30(BroadcastAddress)40/30Unused44/30Unused…

…UnusedVLSM:AnExampleItisimportanttorememberthatonlyunusedsubnetscanbefurthersubnetted.Ifanyaddressfromasubnetisused,thatsubnetcannotbefurthersubnetted.VLSM:AnExampleRouteAggregationTheuseofClasslessInterDomainRouting(CIDR)andVLSMnotonly

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
  • 6. 下載文件中如有侵權或不適當內容,請與我們聯系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

最新文檔

評論

0/150

提交評論