您的位置:首页 > 其它

PingingLab传世经典系列《CCNA完全配置宝典》-2.2 默认路由

2013-08-09 15:50 816 查看
2.2 默认路由
实验目的:
1、掌握默认路由的基本配置。
2、理解默认路由的应用环境。

实验拓扑:



实验步骤:1、依据图中拓扑配置各设备的IP地址,并保证直连连通性;
在R1上做如下配置:
R1(config)#int f0/0R1(config-if)#no shutdownR1(config-if)#ip address 12.1.1.1 255.255.255.0R1(config-if)#exitR1(config)#int loopback 1R1(config-if)#ip address 1.1.1.1 255.255.255.255R1(config-if)#exit 在R2上做如下配置:
R2(config)#int f0/0R2(config-if)#no shutdownR2(config-if)#ip address 12.1.1.2 255.255.255.0R2(config-if)#exitR2(config)#int loopback 1R2(config-if)#ip address 2.2.2.2 255.255.255.255R2(config-if)#exitR2(config)#int loopback 2R2(config-if)#ip address 8.8.8.8 255.255.255.255R2(config-if)#exit 在R1上进行直连连通性测试:
R1#ping 12.1.1.2Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 12.1.1.2, timeout is 2 seconds:.!!!!Success rate is 80 percent (4/5), round-trip min/avg/max = 28/36/48 ms 此时说明直连连接没有问题。
2.通过部署默认路由,使得R1可以访问R2背后的所有环回网段,如下:
R1(config)#ip route 0.0.0.0 0.0.0.0 12.1.1.2 查看R1的路由表:
R1#show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static routeGateway of last resort is 12.1.1.2 to network 0.0.0.0 1.0.0.0/32 is subnetted, 1 subnetsC 1.1.1.1 is directly connected, Loopback1 12.0.0.0/24 is subnetted, 1 subnetsC 12.1.1.0 is directly connected, FastEthernet0/0 S* 0.0.0.0/0 [1/0] via 12.1.1.2 此时R1的路由表出现“S*”标识的路由条目,即静态默认路由。
3、在R1上测试默认路由,如下:
R1#ping 2.2.2.2Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds: !!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 28/38/52 msR1#ping 8.8.8.8Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 8.8.8.8, timeout is 2 seconds: !!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 28/36/56 ms 以上表明,通过部署默认路由,使得R1可以访问互联网的网段,此实验完成。
==========================================
PingingLab·高品质IT教育提供商
CCIE 实验室·IT项目实战·高端人才定制
深圳拼客信息科技有限公司·广州大学城外环西路站
新浪微博:@拼客科技PingingLab @PingingLab-陈鑫杰
PingingLab微信公众号:pinginglab
PingingLab技术交流群:240920680

本文出自 “陈鑫杰讲网络” 博客,请务必保留此出处http://chenxinjie.blog.51cto.com/7749507/1274517
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐