用 GNS3 做CCNA网络实验(5)
来源:互联网 发布:什么叫客户网络情况 编辑:程序博客网 时间:2024/06/06 01:05
用 GNS3 做CCNA网络实验(5)
8. 路由实验: RIP
RIP 和 RIP V2 的配置是最基础的路由协议配置操作,理解了 RIP 的配置,其他的动态路由协议的配置应该就很容易掌握。RIP 路由协议虽然比较古老了,但对以中小型的企业网络,还是很有用途的。而且,现在的 Linksys 宽带/无线 路由器,都支持RIP协议来构建桥接多个网段,有实际应用价值。
(1) 准备实验
我们假定是关闭 GNS3 后重新打开 GNS3 开始新的实验。
先为这次实验准备一个子目录,例如 在 gns3Project 下建一个子目录 rip1.
在 GNS3 打开我们以前保存的已经测试过的 topology, 例如 router1.net 然后装入配置文件。
在 GNS3 菜单 File -> Save topology as 把这个 topology 改名为 rip1.net 并保存 到 rip1 子目录下。
在 菜单 File -> Import/Export 选 Export to a directory 把原来的配置卸出到子目录 rip1 下。
这样,下面的实验所用到的 topology 和配置文件均保存在这个子目录下。
现在 启动各个路由器 (R1,R2,PC1,和 PC2),并打开各个 控制台 Console。
(2) 查看路由协议配置前的路由信息
R1:
R2:
(3) 配置路由器
R1:
从路由信息我们可以看到, R1 直接与2 个网段(192.168.100.0 和 172.17.1.0) 相连。但这2个网段的数据包并不直接通过,我们就需要启用 RIP 路由协议来让数据包通过:
- R1#
- R1#conf t
- Enter configuration commands, one per line. End with CNTL/Z.
- R1(config)#
- R1(config)#router rip
- R1(config-router)#version 2
- R1(config-router)#network 192.168.100.0
- R1(config-router)#network 172.17.1.0
- R1(config-router)#^Z
- R1#
R1#R1#conf tEnter configuration commands, one per line. End with CNTL/Z.R1(config)#R1(config)#router ripR1(config-router)#version 2R1(config-router)#network 192.168.100.0R1(config-router)#network 172.17.1.0R1(config-router)#^ZR1#
R2:
R2 直接与2 个网段(192.168.110.0 和 172.17.1.0) 相连,我们启用 RIP 路由协议来让数据包通过:
- R2#
- R2#conf t
- Enter configuration commands, one per line. End with CNTL/Z.
- R2(config)#router rip
- R2(config-router)#version 2
- R2(config-router)#network 192.168.110.0
- R2(config-router)#network 172.17.1.0
- R2(config-router)#^Z
- R2#
- R2#copy runn start
- Destination filename [startup-config]?
- Building configuration...
- [OK]
- R2#
R2#R2#conf tEnter configuration commands, one per line. End with CNTL/Z.R2(config)#router ripR2(config-router)#version 2R2(config-router)#network 192.168.110.0R2(config-router)#network 172.17.1.0R2(config-router)#^ZR2#R2#copy runn startDestination filename [startup-config]?Building configuration...[OK]R2#
(4) 测试
从 PC2 ping
- PC2>ping 192.168.100.254
- Type escape sequence to abort.
- Sending 5, 100-byte ICMP Echos to 192.168.100.254, timeout is 2 seconds:
- !!!!!
- Success rate is 100 percent (5/5), round-trip min/avg/max = 616/976/1772 ms
- PC2>ping 192.168.100.10
- Type escape sequence to abort.
- Sending 5, 100-byte ICMP Echos to 192.168.100.10, timeout is 2 seconds:
- !!!!!
- Success rate is 100 percent (5/5), round-trip min/avg/max = 980/1034/1100 ms
- PC2>
PC2>ping 192.168.100.254Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.100.254, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 616/976/1772 msPC2>ping 192.168.100.10Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.100.10, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 980/1034/1100 msPC2>
从 PC1 ping
- PC1#
- PC1#ping 192.168.110.253
- Type escape sequence to abort.
- Sending 5, 100-byte ICMP Echos to 192.168.110.253, timeout is 2 seconds:
- !!!!!
- Success rate is 100 percent (5/5), round-trip min/avg/max = 576/648/716 ms
- PC1#ping 192.168.110.22
- Type escape sequence to abort.
- Sending 5, 100-byte ICMP Echos to 192.168.110.22, timeout is 2 seconds:
- !!!!!
- Success rate is 100 percent (5/5), round-trip min/avg/max = 1016/1128/1228 ms
- PC1#
PC1#PC1#ping 192.168.110.253Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.110.253, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 576/648/716 msPC1#ping 192.168.110.22Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.110.22, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 1016/1128/1228 msPC1#
呵呵,3个网段是连通的了,数据包可以100%通过。
(5) 启用路由协议后的路由信息
R1:
R2:
下一步我们尝试 OSPF 的配置。
- 用 GNS3 做CCNA网络实验(5)
- 用 GNS3 做CCNA网络实验(1)
- 用 GNS3 做CCNA网络实验(2)
- 用 GNS3 做CCNA网络实验(3)
- 用 GNS3 做CCNA网络实验(4)
- 用 GNS3 做CCNA网络实验(6)
- 用 GNS3 做CCNA网络实验(7)
- CCNA网络系列实验(1)之GNS3安装配置指南
- GNS3-1.4导入虚拟机做实验操作
- 如何优化GNS3的CCNA实验室
- 如何优化GNS3的CCNA实验室
- 如何优化GNS3的CCNA实验室
- 通过CCNA.CCNP.CCIE必做的246个实验
- GNS3 网络模拟器介绍
- gre tunnel实验(GNS3)
- GNS3 L2TP VPN实验详解
- CCNA实验十一 STP
- CCNA实验三十二 ISDN
- 二叉树的建立与遍历
- 用 GNS3 做CCNA网络实验(3)
- cocos2d-x发生undefined reference to `XX'错误
- 可变参数
- 用 GNS3 做CCNA网络实验(4)
- 用 GNS3 做CCNA网络实验(5)
- 这说明什么?【转载】早点长大的飞秋2013
- 程序员如果想安身立命 什么情况????
- 用 GNS3 做CCNA网络实验(6)
- 实训第一天
- 计算机cpu和外设的平等性--DMA简述
- 在外部程序执行之前运行
- 用 GNS3 做CCNA网络实验(7)
- 堆排序及其分析