用 GNS3 做CCNA网络实验(5)

用 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#
 


 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#

 


 

(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>
 

从 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#
 

呵呵,3个网段是连通的了,数据包可以100%通过。

 

 

(5) 启用路由协议后的路由信息

 

R1:

 


 

R2:

 


 

 

 

下一步我们尝试 OSPF 的配置。

 

 

:-

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值