31/ 6c0 010 010 0Es PSa3n>S >19 2 .16 8 .14 7.6by4xt" >19 2 .16 8 .14 7 padding="0"><">" name="description"/>
Tải bản đầy đủ - 0 (trang)
Chapter 12.  Default Routes and On-Demand Routing

Chapter 12.  Default Routes and On-Demand Routing

Tải bản đầy đủ - 0trang

thehostspaceandasfewernetworkbitsareused,more

addressesaresummarized.Takingthisconcepttoitslimit,what

ifsomanyzerosareaddedtothehostspacethatnonetwork

bitsremain?Inotherwords,whatifthesummaryaddress

consistsof32zerosandhasaprefixlengthof0(0.0.0.0/0)?

ThisaddresssummarizeseverypossibleIPv4address.

0.0.0.0/0istheIPv4defaultaddress,andarouteto0.0.0.0/0

isadefaultroute.[1]Similarly,thedefaultIPv6address::/0

summarizeseverypossibleIPv6address.EveryotherIP

addressismorespecificthanthedefaultaddress,sowhena

defaultrouteexistsinaroutetable,thatroutewillbematched

onlyifamorespecificmatchcannotbemade.

[1]ThisaddressisusedbyalltheopenIProutingprotocols.TheCiscoIGRPandEIGRPuseanactualnetwork

address,advertisedasanexternalroute.



FundamentalsofDefaultRoutes

WhenarouterisconnectedtotheInternet,adefaultrouteis

immenselyuseful.Withadefaultroute,therouterneedstoonly

recognizedestinationsthatareinternaltoitsown

administrativesystem.Thedefaultroutewillforwardpackets

destinedforanyotheraddresstotheInternetserviceprovider.

ThisnegatesthenecessityofrunningBorderGatewayProtocol

(BGP)withtheserviceprovidertolearnalloftheprefixesinthe

Internetroutetableatablewhichconsistsofwellover100,000

prefixes,andmightsoonbeapproaching200,000.Indealing

withlargeroutetables,topologychangesareanevenbigger

concernthanthedemandsonmemory.Inalargenetwork,

topologychangeswilloccurmorefrequently,resultingin

increasedsystemactivitytoadvertiseandprocessthose

changes.Usingadefaultrouteeffectively"hides"thechanges

ofmore-specificroutes,makingthenetworktowhichthe

defaultpointsappearmorestablefromthepointofviewofthe

routerusingthedefaultroute.

Defaultroutesarealsousefulonasmallerscale,withinsingle

autonomoussystems.Thesamebenefitsofdecreasedmemory

andprocessorutilizationcanbegainedinsmallernetworks,

althoughthebenefitsdecreaseasthenumberofroutes

decreases.

Defaultroutesarealsoveryusefulinhub-and-spoketopologies,

suchastheoneinFigure12-1.Here,thehubrouterhasa

staticroutetoeveryremotesubnet.Enteringnewstaticroutes

inthehubrouterwhenanewsubnetisbroughtonlineisafairly

trivialadministrativetask,butaddingtheroutestoeveryspoke

routermightbemuchmoretime-consuming.Byusingdefault

routesatthespokerouters,onlythehubneedsentriesfor

everysubnet.Whenaspokerouterreceivesapacketforan

unknowndestination,itwillforwardthepackettothehub,

whichcan,inturn,forwardthepackettothecorrect



destination.



Figure12-1.Defaultroutesgreatlysimplifythe

administrationofstaticroutinginahub-andspokenetwork.



[Viewfullsizeimage]



ThespokeroutersinFigure12-1aremorecorrectlycalled

"stub"routers.Astubrouterhasonlyasingleconnectionto

anotherrouter.Theroutingdecisionsbecomeverysimplein

suchadevice:Thedestinationiseitheroneoftherouter's

directlyconnectednetworks(stubnetworks),oritisreachable

viaitssingleneighbor.Andifthesingleneighboristheonly

next-hoproutingchoice,thestubrouterhaslittleneedfora

detailedroutetable.Adefaultrouteisusuallysufficient.

Aswithothersummaryroutes,thetrade-offwithdefaultroutes

isalossofroutingdetail.ThestubroutersinFigure12-1,for



instance,havenowayofknowingwhetheradestinationis

unreachable.Allpacketstounknowndestinationsareforwarded

tothehubrouter,andonlythenisreachabilitydetermined.

Packetstononexistentaddressesshouldbeinfrequentina

network.Ifforsomereasontheyarenot,abetterdesignchoice

mightbetoallowthestubrouterstorunaroutingprotocoland

learnroutesfromthehubsothatunknowndestinationscanbe

determinedassoonaspossible.Thedesignchoiceforyouto

makeinanetworksuchastheoneinFigure12-1iswhetherit

ismoreeconomicaltoforwardpacketswithunknown

destinationstothehubrouter,whichcanthendropthem,or

whetheritismoreeconomicaltorunadynamicroutingprotocol

betweenthehubandstubroutersjusttodroppacketsto

unknowndestinationsatthestubrouters.Althoughthe

resourceandoperationalcostsofrunningadynamicrouting

protocolareusuallysmall,thedefaultrouteisstillmorelikely

tobethebestchoice.

AnotherproblemwithlossofroutingdetailisshowninFigure

12-2.Theseroutersformanationwidebackbone,andlarge

localnetworksareconnectedtoeachofthebackbonerouters.

TheLosAngelesbackbonerouterhasdefaultroutespointingto

bothSanFranciscoandSanDiego.IfLosAngelesmustforward

apackettoSeattleandhasonlythetwodefaultroutes,ithas

nowayofknowingthatthebestrouteisviaSanFrancisco.Los

AngelesmightforwardthepackettoSanDiego,inwhichcase

thepacketwilluseasmallportionofsomeveryexpensive

bandwidth,andwillincursomeunnecessarypropagationdelay,

beforeitbelatedlyreachesitsdestination.Usingdefaultroutes

onthisbackboneisabaddesigndecision,[2]butitillustrates

howhidingroutedetailswithadefaultroutecanleadto

suboptimalrouting.

[2]Havingeachbackbonerouteradvertiseonlyadefaultrouteintoitslocalnetwork,ontheotherhand,canbe

averygooddesignchoice,limitingthesizeofthelocalroutetables.



Figure12-2.IftheLosAngelesrouterknowsonly



defaultroutespointingtoSanFranciscoandSan

Diegoandhasnomorespecificdetailsaboutthe

topologybehindthosetworouters,itcannot

routeefficiently.



FundamentalsofOn-DemandRouting

Althoughtheconfigurationofstaticroutesissimpleinahub

routersuchastheoneinFigure12-1,manynetwork

administratorsstillseestaticroutesasadministratively

undesirable.Thedifficultyisnotsomuchaddingroutesasnew

stubnetworksarebroughtonline,asitisrememberingto

removerouteswhenstubnetworksorstubroutersaretaken

offline.BeginningwithIOS11.2,Ciscooffersaproprietary

alternativeforhubrouterscalledOn-DemandRouting(ODR).

WithODR,ahubroutercanautomaticallydiscoverstub

networkswhilethestubroutersstilluseadefaultroutetothe

hub.ODRconveysaddressprefixesthatis,onlythenetwork

portionoftheaddressratherthantheentireaddresssoVLSMis

supported.Andbecauseonlyminimalrouteinformationis

traversingthelinkbetweenthestubandhubrouters,

bandwidthisconserved.

ODRisnotatrueroutingprotocol.Itdiscoversinformation

aboutstubnetworksbutdoesnotprovideanyrouting

informationtothestubrouters.Thelinkinformationis

conveyedbyadata-linkprotocoland,therefore,doesnotgo

furtherthanfromthestubroutertothehubrouter.However,as

acasestudywillshow,ODR-discoveredroutescanbe

redistributedintodynamicroutingprotocols.

Example12-1showsaroutetablecontainingODRentries.The

tableshowsthattheadministrativedistanceis160;themetric

oftheroutesis1.BecauseODRroutesarealwaysfromahub

routertoastubrouter,themetric(hopcount)willneverbe

morethan1.TheroutesalsoshowthatVLSMissupported.



Example12-1.Thisroutetableshowsseveral

ODRentries.



Router#showiproute

Codes:C-connected,S-static,I-IGRP,R-RIP,M-mobile

D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinte

N1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternal

E1-OSPFexternaltype1,E2-OSPFexternaltype2,E

i-IS-IS,L1-IS-ISlevel-1,L2-IS-ISlevel-2,*-c

U-per-userstaticroute,o-ODR

Gatewayoflastresortisnotset

192.168.1.0/24isvariablysubnetted,3subnets,2masks

o192.168.1.40/30[160/1]via192.168.1.37,00:00:27,Seri

C192.168.1.36/30isdirectlyconnected,Serial0

C192.168.1.192/27isdirectlyconnected,Ethernet1

o192.168.3.0/24[160/1]via192.168.1.37,00:00:27,Serial0

192.168.4.0/24isvariablysubnetted,2subnets,2masks

o192.168.4.48/29[160/1]via192.168.1.37,00:00:27,Seri

o192.168.4.128/27[160/1]via192.168.1.37,00:00:27,Ser

Router#



ThetransportmechanismforODRroutesisCiscoDiscovery

Protocol(CDP),aproprietarydatalinkprotocolthatgathers

informationaboutneighboringnetworkdevices.[3]Example12-2

showsthetypeofinformationcollectedbyCDP.

[3]CDPrunsnotonlyonroutersbutalsoonCiscoswitchesandaccessservers.



Example12-2.CDPcollectsinformationabout

neighboringCisconetworkdevices.

Bumble#showcdpneighborsdetail

------------------------DeviceID:P8R1

Entryaddress(es):

IPaddress:10.131.223.226

Platform:Cisco2620,Capabilities:Router



Interface:Serial0/0.708,PortID(outgoingport):Serial0/0.80

Holdtime:144sec



Version:

CiscoInternetworkOperatingSystemSoftware

IOS(tm)C2600Software(C2600-J1S3-M),Version12.3(6),RELEAS

Copyright(c)1986-2004byCiscoSystems,Inc.

CompiledWed11-Feb-0419:24bykellythw

advertisementversion:2

------------------------DeviceID:Blathers

Entryaddress(es):

IPaddress:192.168.3.2

Platform:cisco2610,Capabilities:Router

Interface:Serial0/0.1,PortID(outgoingport):Serial0/0.2

Holdtime:122sec



Version:

CiscoInternetworkOperatingSystemSoftware

IOS(tm)C2600Software(C2600-J1S3-M),Version12.3(10a),RELE

)

Copyright(c)1986-2004byCiscoSystems,Inc.

CompiledFri22-Oct-0420:43bykellythw

advertisementversion:2

------------------------Bumble#

-------------------------



CDPrunsonanymediathatsupportsthesubnetworkaccess

protocol(SNAP),whichmeansthatODRalsodependsonSNAP



support.AlthoughCDPisenabledbydefaultonallinterfacesof

allCiscodevicesrunningIOS10.3andlater,ODRsupport

beginswithIOS11.2.Theconfigurationcasestudywillshow

thatODRisconfiguredonthehubrouteronly;however,the

stubroutersmustrunIOS11.2orlaterforthehubrouterto

discovertheirattachednetworks.



ConfiguringDefaultRoutesandODR

Defaultroutescanbeconfiguredeitheroneachrouterthat

needsadefaultrouteorononerouterthatinturnadvertises

theroutestoitspeers.Thecasestudiesofthissectionexamine

bothmethods.

RecallfromthediscussionofclassfulroutelookupsinChapter

5,"RoutingInformationProtocol(RIP),"thatarouterfirst

matchesamajornetworknumberandthenmatchesthe

subnet.Ifasubnetcannotbematched,thepacketwillbe

dropped.ClasslessroutelookupisthedefaultbehavioronCisco

routersasofIOS11.3andlater;forearlierIOSversions,

lookupscanbechangedtoclassless(evenforclassfulrouting

protocols)withtheglobalcommandipclassless.

Anyrouterusingadefaultroutemustperformclasslessroute

lookups.Figure12-3showswhy.Inthisnetwork,Memphisis

speakingadynamicroutingprotocoltoTanisandGiza,butis

notreceivingroutesfromThebes.Memphishasadefaultroute

pointingtoThebesforroutingpacketstoBigNet.IfMemphis

receivesapacketwithadestinationaddressof192.168.1.50

andisperformingclassfulroutelookups,itwillfirstmatch

majornetwork192.168.1.0,ofwhichithasseveralsubnetsin

itsroutetable.Memphiswillthenattempttofindaroutefor

subnet192.168.1.48/28,butbecauseMemphisisnotreceiving

routesfromThebes,thissubnetisnotinitsroutetable.The

packetwillbedropped.



Figure12-3.MemphisforwardspacketstoThebes

withadefaultroute.IfMemphisusesclassful

routelookups,subnet192.168.1.48/28willbe

unreachable.



IfMemphisisconfiguredwithipclassless,itwilltrytofindthe

mostspecificmatchfor192.168.1.48/28withoutmatchingthe

majornetworkfirst.Findingnomatchforthissubnetinthe

routetable,itwillmatchthedefaultrouteandforwardthe

packettoThebes.



CaseStudy:StaticDefaultRoutes

TheconfigurationofMemphisinFigure12-3isdisplayedin

Example12-3.



Example12-3.ConfigurationofRouterMemphis

usesstaticIPv4andIPv6routestocreatedefault

routes.

interfaceserial0/0.1

ipaddress192.168.1.33255.255.255.240



Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Chapter 12.  Default Routes and On-Demand Routing

Tải bản đầy đủ ngay(0 tr)

×