下載本文檔
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
ipdefault-network、iproute、ipdefault-gatewaycisco16448ipdefault-gatewayiproutingipdefault-networkiprouteipdefault-networkiproute被路由選擇協(xié)議出去。ipdefault-network產(chǎn)生的默認(rèn)路由是可以被EIGRP和RIP的但不被OSPFRIPipdefault-network,debugipripiproute也可以被EIRGP,但是這條靜態(tài)路由必須重分發(fā)到EIGRP協(xié)議中;在12.0T以后的IOS版本中,RIP將不默認(rèn)路由,除非RIPRIP同樣,在OSPF中也不能該命令產(chǎn)生的默認(rèn)路由,(default-informationoriginate)ipdefault-network同時(shí)使用ipdefault-networkiproute方設(shè)定默認(rèn)路由時(shí),如果ipdefault-network設(shè)定的網(wǎng)絡(luò)是直連(靜態(tài)、且已知)的,那么它就成為默認(rèn)路由;如果ipdefault-network指定的網(wǎng)絡(luò)是由交換路由信iproute最后,如果使用多條iproute令,則流量會(huì)自動(dòng)在多條鏈負(fù)載均衡。ipdefault-gateway,ipdefault-networkiproute默認(rèn)路由的區(qū)別中遇到了也不犯錯(cuò)了。指定默認(rèn)路由(lastresortgateway)31、ipdefault-iproutingipdefault-gateway2、ipdefault-networkiproute兩者都用于iprouting有效的路由器上,區(qū)別主要在于路由協(xié)議是否這條路由信息。比如:IGRP無法識(shí)別,因此默認(rèn)路由時(shí)必須用ipipdefault-networkadministrativedistance同時(shí)使用ipdefault-networkiproute雙方設(shè)定默認(rèn)路由iprouteiprouteiproutingmycisco(config)#noiproutingmycisco(config)#ipdefault-gatewayType sequencetoSending5,100-byteICMPEchoesto5,timeoutis2Successrateis100percent(5/5),round-tripmin/avg/max=60/60/60msmycisco#showiprouteDefaultgatewayisHostGatewayLastUseTotalUsesInterfaceICMPredirectcacheisemptyiprouteiprouteType sequencetoSending5,100-byteICMPEchoesto5,timeoutis2Successrateis100percent(5/5),round-tripmin/avg/max=56/56/60msmycisco#showiprouteCodes:C–connected,S–static,I–IGRP,R–RIP,M–mobile,–D–EIGRP,EX–EIGRPexternal,O–OSPF,IA–OSPFinterareaE1–OSPFexternaltype1,E2–OSPFexternaltype2,E–EGPi–IS-IS,L1–IS-ISlevel-1,L2–IS-ISlevel-2,*–candidatedefaultU–per-userstaticrouteGatewayoflastresortistonetworkC/8isdirectlyconnected,Loopback0C/24isdirectlyconnected,Ethernet0S*/0[1/0]viaipdefault-networkmycisco(config)#iproutemycisco#showipCodes:C–connected,S–static,I–IGRP,R–RIP,M–mobile,–D–EIGRP,EX–EIGRPexternal,O–OSPF,IA–OSPFinterareaE1–OSPFexternaltype1,E2–OSPFexternaltype2,E–EGPi–IS-IS,L1–IS-ISlevel-1,L2–IS-ISlevel-2,*–candidatedefaultU–per-userstaticrouteGatewayoflastresortisnotC/8isdirectlyconnected,Loopback0S/8[1/0]viaC/24isdirectlyconnected,接著執(zhí)行mycisco(config)#ipdefault-networkmycisco#showipCodes:C–connected,S–static,I–IGRP,R–RIP,M–mobile,–D–EIGRP,EX–EIGRPexternal,O–OSPF,IA–OSPFinterareaE1–OSPFexternaltype1,E2–OSPFexternaltype2,E–EGPi–IS-IS,L1–IS-ISlevel-1,L2–IS-ISlevel-2,*–candidatedefaultU–per-userstaticrouteGatewayoflastresortistonetworkC/8isdirectlyconnected,Loopback0S*/8[1/0]viaC/24isdirectlyconnected,ipdefault-ipdefault-gatewaycommanddiffersfromtheothertwocommandsinthatitshouldonlybeusedwheniproutingisdisabledontheCiscorouter.Forinstance,iftherouterisahostintheIPworld,youcanusethiscommandtodefineadefaultgatewayforit.YoumightalsousethiscommandwhenyourlowendCiscorouterisinbootmodeinordertoTFTPaCiscoIOS®Softwareimagetotherouter.Inbootmode,therouterdoesnothaveiproutingenabled.ipdefault-Unliketheipdefault-gatewaycommand,youcanuseipdefault-networkwheniproutingisenabledontheCiscorouter.Whenyouconfigureipdefault-networktherouterconsidersroutestothatnetworkforinstallationasthegatewayoflastresortontherouter.Foreverynetworkconfiguredwithipdefault-network,ifarouterhasaroutetothatnetwork,thatrouteisflaggedasacandidatedefaultroute.LookatthefollowingroutingtabletakenfromaCiscorouter:2513#showipCodes:C-connected,S-static,I-IGRP,R-RIP,M-mobile,B-BGPD-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterareaE1-OSPFexternaltype1,E2-OSPFexternaltype2,E-EGPi-IS-IS,L1-IS-ISlevel-1,L2-IS-ISlevel-2,*-candidatedefaultGatewayoflastresortisnotsetissubnetted,1subnets isdirectlyconnected,Ethernet0S[1/0]viaissubnetted,1subnets isdirectlyconnected,Notethestaticroutetoviaandthatthegatewayoflastresortisnotset.Ifyouconfigureipdefault-network,theroutingtablechangestothefollowing:2513#showipCodes:C-connected,S-static,I-IGRP,R-RIP,M-mobile,B-BGPD-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterareaE1-OSPFexternaltype1,E2-OSPFexternaltype2,E-EGPi-IS-IS,L1-IS-ISlevel-1,L2-IS-ISlevel-2,*-candidatedefaultGatewayoflastresortistonetworkissubnetted,1subnets isdirectlyconnected,Ethernet0 [1/0]viaS*[1/0]viaissubnetted,1subnets isdirectlyconnected,TokenRing02513#showipprotocolsYoucanseethegatewayoflastresorthasnowbeensetas.Thisresultisindependentofanyroutingprotocol,asshownbytheshowipprotocolscommandatthebottomoftheoutput.YoucanaddanothercandidatedefaultroutesimplybyconfiguringanotherinstanceofipEnterconfigurationcommands,oneperline.EndwithCNTL/Z.2513(config)#ipdefault-network2513#showipCodes:C-connected,S-static,I-IGRP,R-RIP,M-mobile,B-BGPD-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterareaE1-OSPFexternaltype1,E2-OSPFexternaltype2,E-EGPi-IS-IS,L1-IS-ISlevel-1,L2-IS-ISlevel-2,*-candidatedefaultGatewayoflastresortistonetworkissubnetted,1subnets isdirectlyconnected,Ethernet0 [1/0]via [1/0]viaisvariablysubnetted,2subnets,2 [1/0]via [1/0]viaissubnetted,1subnets isdirectlyconnected,TokenRing0Noticethatafterenteringtheabovecommand,thenetworkwasnotflaggedasadefaultnetwork.Thefollowingsectionexplainswhy.FlaggingaDefaultNote:Theipdefault-networkcommandisclassful,whieansiftherouterhasaroutetothesubnetindicatedbythiscommand,itinstallstheroutetothemajornet.Atthispointneithernetworkhasbeenflaggedasthedefaultnetwork.Theipdefault-networkcommandmustbeissuedagain,usingthemajornet,inordertoflagthecandidatedefaultroute.Enterconfigurationcommands,oneperline.EndwithCNTL/Z.2513(config)#ipdefault-network2513#showipCodes:C-connected,S-static,I-IGRP,R-RIP,M-mobile,B-BGPD-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterareaE1-OSPFexternaltype1,E2-OSPFexternaltype2,E-EGPi-IS-IS,L1-IS-ISlevel-1,L2-IS-ISlevel-2,*-candidatedefaultGatewayoflastresortistonetworkissubnetted,1subnets isdirectlyconnected,Ethernet0 [1/0]via [1/0]viaisvariablysubnetted,2subnets,2 [1/0]via [1/0]viaissubnetted,1subnets isdirectlyconnected,TokenRing0Iftheoriginalstaticroutehadbeentothemajornetwork,theextrastepofconfiguringthedefaultnetworktwicewouldnothavebeennecessary.TherearestillnoIPprotocolsrunninghere.Withoutanydynamicprotocolsrunning,youcanconfigureyourroutertochoosefromanumberofcandidatedefaultroutesbasedonwhethertheroutingtablehasroutestonetworksotherthan/0.Thiscommandallowsyoutoconfigurerobustnessintotheselectionofagatewayoflastresort.Ratherthanconfiguringstaticroutestospecificnext-hops,youcanhavetherouterchooseadefaultroutetoaparticularnetworkbycheckingintheroutingtable.Ifyoulosetheroutetoaparticularnetwork,therouterselectsthesecondcandidatedefault,asspecifiedabove.Youcanremovethelostroutebyremovingthestaticrouteintheconfigurationasfollows:Enterconfigurationcommands,oneperline.EndwithCNTL/Z.2513(config)#noiproute%SYS-5-CONFIG_I:ConfiguredfromconsolebyAfterremovingthestaticroutetotheoriginaldefaultnetwork,theroutingtablelookslikethis:2513#showiprouteCodes:C-connected,S-static,I-IGRP,R-RIP,M-mobile,B-BGPD-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterareaE1-OSPFexternaltype1,E2-OSPFexternaltype2,E-EGPi-IS-IS,L1-IS-ISlevel-1,L2-IS-ISlevel-2,*-candidatedefaultGatewayoflastresortistonetworkissubnetted,1subnets isdirectlyconnected,Ethernet0 [1/0]via isvariablysubnetted,2subnets,2 [1/0]via [1/0]viaissubnetted,1subnets isdirectlyconnected,TokenRing0UsingDifferentRoutingGatewaysoflastresortselectedusingtheipdefault-networkcommandarepropagateddifferentlydependingonwhichroutingprotocolispropagatingthedefaultroute.ForIGRPandEIGRPtopropagatetheroute,thenetworkspecifiedbytheipdefault-networkcommandmustbeknowntoIGRPorEIGRP.ThismeansthenetworkmustbeanIGRP-orEIGRP-derivednetworkintheroutingtable,orthestaticrouteusedtogeneratetheroutetothenetworkmustberedistributedintoIGRPorEIGRP.RIPadvertisesarouteto.Forexample,notethatthegatewayoflastresortontherouterbelowwaslearnedusingthecombinationoftheiprouteandipdefault-networkcommands.IfyouenableRIPonthisrouter,RIPadvertisesarouteto(althoughnottotheTokenRingnetworkbecauseofsplit-horizon):%SYS-5-CONFIG_I:Configuredfromconsolebyconsole2513#debugipripRIPprotocoldebuggingisonRIP:sendingupdateto55viaEthernet0()default,metric1network,metricRIP:sendingupdateto55viaTokenRing0network,metricNote:InIOSrelease12.0Tandlater,RIPdoesnotadvertisethedefaultrouteriftherouteisnotlearnedviaRIP.Therefore,itmaybenecessarytoredistributetherouteintoRIP,orusethedefault-informationoriginatecommand.OSPF,likeRIP,advertisesaroutefor.However,withOSPF,therouteroriginatingthedefaultroutemustbeconfiguredwiththedefault-informationoriginatecommand.Formoredetailedinformation,seeHowDoesOSPFGenerateDefaultRoutes?.iprouteCreatingastaticroutetonetworkisanotherwaytosetthegatewayoflastresortonarouter.Aswiththeipdefault-networkcommand,usingthestaticroutetoisnotdependentonanyroutingprotocols.However,iproutingmustbeenabledontherouter.Note:IGRPdoesnotunderstandarouteto,thereforeitcannotpropagatedefaultroutescreatedusingtheiproutecommand.Usetheipdefault-networkcommandtohaveIGRPpropagateadefaultroute.EIGRPpropagatesaroutetonetwork,butthestaticroutemustberedistributedintoEIGRP.RIPandOSPFbehaveasdescribedwhenusingtheipdefault-networkcommand.Keepinmindthatthenoteabovestillapplies.LookatanexampleofconfiguringagatewayoflastresortusingtheiprouteEnterconfigurationcommands,oneperline.EndwithCNTL/Z.router-3(config)#iprouterouter-3#showipCodes:C-connected,S-static,I-IGRP,R-RIP,M-mobile,B-BGPD-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterareaN1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2E1-OSPFexternaltype1,E2-OSPFexternaltype2,E-EGPi-IS-IS,L1-IS-ISlevel-1,L2-IS-ISlevel-2,*-candidatedefaultU-per-userstaticroute,o-ODRGatewayoflastresortistonetwork/24issubnetted,2subnetsCisdirectlyconnected,Cisdirectlyconnected,Ethernet0S*/0[1/0]viaNote:Ifyouconfiguremultiplenetworksascandidatedefaultroutesusingtheipdefault-networkcommand,thenetworkthathasthelowestadministrativedistanceischosenasthenetworkforthegatewayof
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- JOINSET卓英社科技股份有限公司簡介 產(chǎn)品介紹(2)一級代理分銷經(jīng)銷KOYUELEC光與電子
- 黑色可愛卡通傳統(tǒng)節(jié)日下元節(jié)宣傳介紹(詩詞鑒賞)
- 邁向高效職場:2024版辦公自動(dòng)化培訓(xùn)課件大揭秘
- (浙江選考)2021版新高考物理一輪復(fù)習(xí)6第五章機(jī)械能及其守恒定律3第3節(jié)機(jī)械能守恒定律教學(xué)案
- 2024-2025學(xué)年高中歷史第四單元中國特色社會(huì)主義建設(shè)的道路第11課經(jīng)濟(jì)建設(shè)的發(fā)展和曲折2教學(xué)教案新人教版必修2
- 2024年物理高考二輪復(fù)習(xí)熱學(xué)作業(yè)4含解析
- 2025版高考?xì)v史一輪復(fù)習(xí)模塊4選修內(nèi)容選修1歷史上重大改革回眸學(xué)案含解析岳麓版
- 廢舊設(shè)備拆解作業(yè)安全措施
- 公共管理知識(shí)試題及答案
- 發(fā)現(xiàn)牛股的八種方法
- 【公開課】《農(nóng)業(yè)專題復(fù)習(xí)》【課件】
- 第7課《大雁歸來》課件(共15張ppt) 部編版語文八年級下冊
- 培訓(xùn)的方式和方法課件
- 三年級下冊口算天天100題(A4打印版)
- 三基選擇題(東南大學(xué)出版社)
- 2021年大唐集團(tuán)招聘筆試試題及答案
- DBJ53/T-39-2020 云南省民用建筑節(jié)能設(shè)計(jì)標(biāo)準(zhǔn)
- 2022版義務(wù)教育數(shù)學(xué)課程標(biāo)準(zhǔn)解讀課件PPT模板
- 實(shí)驗(yàn)五 PCR擴(kuò)增課件
- 馬拉松運(yùn)動(dòng)醫(yī)療支援培訓(xùn)課件
- 中醫(yī)藥宣傳手冊
評論
0/150
提交評論