缺省路由.docx

上传人:b****7 文档编号:10632106 上传时间:2023-02-22 格式:DOCX 页数:13 大小:24.50KB
下载 相关 举报
缺省路由.docx_第1页
第1页 / 共13页
缺省路由.docx_第2页
第2页 / 共13页
缺省路由.docx_第3页
第3页 / 共13页
缺省路由.docx_第4页
第4页 / 共13页
缺省路由.docx_第5页
第5页 / 共13页
点击查看更多>>
下载资源
资源描述

缺省路由.docx

《缺省路由.docx》由会员分享,可在线阅读,更多相关《缺省路由.docx(13页珍藏版)》请在冰豆网上搜索。

缺省路由.docx

缺省路由

实验拓扑:

怎样产生默认路由?

预配置:

R1:

Router(config)#noipdomain-lookup

Router(config)#lineconsole0

Router(config-line)#noexec-t

Router(config-line)#loggingsy

Router(config-line)#exit

Router(config)#hostR1

R1(config)#ints2/1

R1(config-if)#ipaddress12.0.0.1255.255.255.0

R1(config-if)#noshut

R2:

Router(config)#noipdomain-lookup

Router(config)#lineconsole0

Router(config-line)#noexec-t

Router(config-line)#loggingsy

Router(config-line)#exit

Router(config)#hostnameR2

R2(config)#ints2/1

R2(config-if)#ipaddress12.0.0.2255.255.255.0

R2(config-if)#noshut

R2(config-if)#ints2/2

R2(config-if)#ipaddress23.0.0.2255.255.255.0

R2(config-if)#noshut

R3:

Router(config)#noipdomain-lookup

Router(config)#lineconsole0

Router(config-line)#noexec-t

Router(config-line)#loggingsy

Router(config-line)#exit

Router(config)#hostnameR3

R3(config)#ints2/1

R3(config-if)#ipaddress23.0.0.3255.255.255.0

R3(config-if)#noshut

实验配置:

第一种:

R1#showiproute

*Jan2222:

15:

51.059:

%SYS-5-CONFIG_I:

Configuredfromconsolebycons

Codes:

C-connected,S-static,R-RIP,M-mobile,B-BGP

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

N1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2

E1-OSPFexternaltype1,E2-OSPFexternaltype2

i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2

ia-IS-ISinterarea,*-candidatedefault,U-per-userstaticroute

o-ODR,P-periodicdownloadedstaticroute

Gatewayoflastresortisnotset

23.0.0.0/24issubnetted,1subnets

R23.0.0.0[120/1]via12.0.0.2,00:

00:

24,Serial2/1

12.0.0.0/24issubnetted,1subnets

C12.0.0.0isdirectlyconnected,Serial2/1

R2(config)#doshowiproute

Codes:

C-connected,S-static,R-RIP,M-mobile,B-BGP

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

N1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2

E1-OSPFexternaltype1,E2-OSPFexternaltype2

i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2

ia-IS-ISinterarea,*-candidatedefault,U-per-userstaticroute

o-ODR,P-periodicdownloadedstaticroute

Gatewayoflastresortisnotset

23.0.0.0/24issubnetted,1subnets

C23.0.0.0isdirectlyconnected,Serial2/2

12.0.0.0/24issubnetted,1subnets

C12.0.0.0isdirectlyconnected,Serial2/1

R1(config)#routerrip

R1(config-router)#ver2

R1(config-router)#noau

R1(config-router)#net12.0.0.0

R1(config-router)#exit

R1(config)#exit

R2(config)#routerrip

R2(config-router)#ver2

R2(config-router)#noau

R2(config-router)#net12.0.0.0

R2(config-router)#net23.0.0.0

R2(config-router)#exit

R3(config)#intlo0

R3(config-if)#ipaddress3.3.3.3255.255.255.0

R3(config-if)#intlo1

R3(config-if)#ipaddress172.16.1.1255.255.255.0

R3(config)#routerrip

R3(config-router)#version2

R3(config-router)#noauto-summary

R3(config-router)#net23.0.0.0

R3(config)#iproute0.0.0.00.0.0.0172.16.1.2

R3(config)#routerrip

R3(config-router)#redistributestaticmetric1

R1#showiproute

Codes:

C-connected,S-static,R-RIP,M-mobile,B-BGP

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

N1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2

E1-OSPFexternaltype1,E2-OSPFexternaltype2

i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2

ia-IS-ISinterarea,*-candidatedefault,U-per-userstaticroute

o-ODR,P-periodicdownloadedstaticroute

Gatewayoflastresortis12.0.0.2tonetwork0.0.0.0

23.0.0.0/24issubnetted,1subnets

R23.0.0.0[120/1]via12.0.0.2,00:

00:

07,Serial2/1

12.0.0.0/24issubnetted,1subnets

C12.0.0.0isdirectlyconnected,Serial2/1

R*0.0.0.0/0[120/2]via12.0.0.2,00:

00:

07,Serial2/1

R1#ping3.3.3.3

Typeescapesequencetoabort.

Sending5,100-byteICMPEchosto3.3.3.3,timeoutis2seconds:

!

!

!

!

!

Successrateis100percent(5/5),round-tripmin/avg/max=24/50/92ms

R2(config)#doshowiproute

Codes:

C-connected,S-static,R-RIP,M-mobile,B-BGP

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

N1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2

E1-OSPFexternaltype1,E2-OSPFexternaltype2

i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2

ia-IS-ISinterarea,*-candidatedefault,U-per-userstaticroute

o-ODR,P-periodicdownloadedstaticroute

Gatewayoflastresortis23.0.0.3tonetwork0.0.0.0

23.0.0.0/24issubnetted,1subnets

C23.0.0.0isdirectlyconnected,Serial2/2

12.0.0.0/24issubnetted,1subnets

C12.0.0.0isdirectlyconnected,Serial2/1

R*0.0.0.0/0[120/1]via23.0.0.3,00:

00:

13,Serial2/2

R3#showiproute

Codes:

C-connected,S-static,R-RIP,M-mobile,B-BGP

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

N1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2

E1-OSPFexternaltype1,E2-OSPFexternaltype2

i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2

ia-IS-ISinterarea,*-candidatedefault,U-per-userstaticroute

o-ODR,P-periodicdownloadedstaticroute

Gatewayoflastresortis172.16.1.2tonetwork0.0.0.0

3.0.0.0/24issubnetted,1subnets

C3.3.3.0isdirectlyconnected,Loopback0

23.0.0.0/24issubnetted,1subnets

C23.0.0.0isdirectlyconnected,Serial2/1

172.16.0.0/24issubnetted,1subnets

C172.16.1.0isdirectlyconnected,Loopback1

12.0.0.0/24issubnetted,1subnets

R12.0.0.0[120/1]via23.0.0.2,00:

00:

10,Serial2/1

S*0.0.0.0/0[1/0]via172.16.1.2

第二种

R1与R2不变,

R3(config)#noiproute0.0.0.00.0.0.0172.16.1.2

R3(config)#routerrip

R3(config-router)#noredistributestaticmetric1

R3(config)#routerrip

R3(config-router)#default-informationoriginate

R3(config-router)#exit

R1#showiproute

Codes:

C-connected,S-static,R-RIP,M-mobile,B-BGP

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

N1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2

E1-OSPFexternaltype1,E2-OSPFexternaltype2

i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2

ia-IS-ISinterarea,*-candidatedefault,U-per-userstaticroute

o-ODR,P-periodicdownloadedstaticroute

Gatewayoflastresortisnotset

23.0.0.0/24issubnetted,1subnets

D23.0.0.0[90/2681856]via12.0.0.2,00:

00:

57,Serial2/1

12.0.0.0/24issubnetted,1subnets

C12.0.0.0isdirectlyconnected,Serial2/1

R1#ping23.0.0.3

Typeescapesequencetoabort.

Sending5,100-byteICMPEchosto23.0.0.3,timeoutis2seconds:

!

!

!

!

!

R3(config)#doshowiproute

Codes:

C-connected,S-static,R-RIP,M-mobile,B-BGP

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

N1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2

E1-OSPFexternaltype1,E2-OSPFexternaltype2

i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2

ia-IS-ISinterarea,*-candidatedefault,U-per-userstaticroute

o-ODR,P-periodicdownloadedstaticroute

Gatewayoflastresortisnotset

3.0.0.0/24issubnetted,1subnets

C3.3.3.0isdirectlyconnected,Loopback0

23.0.0.0/24issubnetted,1subnets

C23.0.0.0isdirectlyconnected,Serial2/1

172.16.0.0/24issubnetted,1subnets

C172.16.1.0isdirectlyconnected,Loopback1

12.0.0.0/24issubnetted,1subnets

R12.0.0.0[120/1]via23.0.0.2,00:

00:

23,Serial2/1

第三种:

R1(config)#norouterrip

R1(config)#routereigrp100

R1(config-router)#net12.0.0.10.0.0.255

R2(config)#norouterrip

R2(config)#routereigrp100

R2(config-router)#net12.0.0.20.0.0.255

R2(config-router)#net23.0.0.20.0.0.255

R2(config-router)#noau

R3(config)#norouterrip

R3(config)#routereigrp100

R3(config-router)#net23.0.0.30.0.0.255

R3(config-router)#net172.16.1.10.0.0.255

R3(config)#ipdefault-network172.16.0.0

如果加了下面两个中的任意一个:

R3(config)#routereigrp100

R3(config-router)#noauto-summary

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

R3(config)#ints2/1

R3(config-if)#ipsummary-addresseigrp100172.16.0.0255.255.0.0

R1#showiproute

Codes:

C-connected,S-static,R-RIP,M-mobile,B-BGP

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

N1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2

E1-OSPFexternaltype1,E2-OSPFexternaltype2

i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2

ia-IS-ISinterarea,*-candidatedefault,U-per-userstaticroute

o-ODR,P-periodicdownloadedstaticroute

Gatewayoflastresortis12.0.0.2tonetwork172.16.0.0

23.0.0.0/24issubnetted,1subnets

D23.0.0.0[90/2681856]via12.0.0.2,00:

03:

49,Serial2/1

D*172.16.0.0/16[90/2809856]via12.0.0.2,00:

00:

18,Serial2/1

12.0.0.0/24issubnetted,1subnets

C12.0.0.0isdirectlyconnected,Serial2/1

R2#showiproute

Codes:

C-connected,S-static,R-RIP,M-mobile,B-BGP

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

N1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2

E1-OSPFexternaltype1,E2-OSPFexternaltype2

i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2

ia-IS-ISinterarea,*-candidatedefault,U-per-userstaticroute

o-ODR,P-periodicdownloadedstaticroute

Gatewayoflastresortisnotset

23.0.0.0/24issubnetted,1subnets

C23.0.0.0isdirectlyconnected,Serial2/2

D*172.16.0.0/16[90/2297856]via23.0.0.3,00:

00:

04,Serial2/2

12.0.0.0/24issubnetted,1subnets

C12.0.0.0isdirectlyconnected,Serial2/1

如果不加:

R1#showiproute

Codes:

C-connected,S-static,R-RIP,M-mobile,B-BGP

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

N1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternal

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

当前位置:首页 > 职业教育 > 其它

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

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