注册 | 登录 忘记密码? 51cto首页 | 博客 | 论坛 | 招聘
热点文章 利用手机和电池实现反地心..
 帮助

cisco路由器基本实验之三 动态路由之RIP协议的配置(Boson NetSim)


2007-08-18 07:46:21
版权声明:原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://victoryan.blog.51cto.com/191603/38714
         实验开始前,先说点与实验无关的事情,在前两篇路由配置的文章中,有很多的网友参与进来进行讨论,有非51cto的网友,也有51cto的朋友,在这里要感谢一下gairuhe朋友,他多次提出意见,建议我使用可以使用真正的IOS来进行实验模拟的Dynamips软件,并且建议我在文章中把路由表也贴出来,这样会看得更加直观和方便,这些建议都很好,在此谢谢众多网友的支持!
             言归正传,Boson Netsim的实验规划,默认路由下一个实验应该是RIP协议的配置。众所周知,RIP(Routing Information Protocol),即路由信息协议,它与IGRP,OSPF等一样都是属于IGP(Interior Gateway Protocol)——内部网关协议,它是一种历史很悠久的协议了,但是迄今为止,RIP还在小型网络中很流行,因为它是基于跳数来对路径进行度量的(仅仅只靠跳数来进行度量也成为了RIP为人所诟病的地方),这样使得RIP相比之下显得最简单,并且大多数的路由器也都支持RIP。据说,RIP还可以保证不同厂商的路由器互联时能有良好的兼容性。下面再说说RIP的大概工作机理。
  RIP把每经过一个路由器称为经过了一跳,而每经过一跳,RIP就会将他的度量值(metric)加1,这样的话,跳数越多的则路径越长,而RIP会优先选择一条到达目标网络跳数少的路径,他支持的最大跳数是15跳,超过则被认为是不可达。接下来看看我的实验。
      
 
顺便说一下,在最近几次的实验中,我都将以这幅图作为实验的拓扑图。和前两次一样,关键语句我都有注解,一来这样方便想学习的朋友,二来也可以作为我自己以后备查,呵呵,下面看看我的配置:
 
r1的配置:
 
Press Enter to Start

Router>
Router>en
Router#config t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hostname router1
router1(config)#interface e0
router1(config-if)#ip address 192.168.1.2 255.255.255.0
router1(config-if)#no shut
%LINK-3-UPDOWN: Interface Ethernet0, changed state to up
router1(config-if)#interface s0
router1(config-if)#ip address 192.168.2.1 255.255.255.0
router1(config-if)#clock rate 6400
router1(config-if)#no shut
%LINK-3-UPDOWN: Interface Serial0, changed state to up
router1(config-if)#exit
%LINK-3-UPDOWN: Interface Serial0, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to down
router1(config)#router rip                          //启用rip协议
router1(config-router)#network 192.168.1.0          //需要给出与本路由器直连的网络
router1(config-router)#network 192.168.2.0          //此处分别为192.168.1.0和192.168.2.0
router1(config-router)#exit
router1(config)#exit
router1#copy running startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
%LINK-3-UPDOWN: Interface Serial0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to up
 
r2的配置:
 
Press Enter to Start

Router>en
Router#con terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hostname router2
router2(config)#interface s0
router2(config-if)#ip address 192.168.2.2 255.255.255.0
router2(config-if)#no shut
%LINK-3-UPDOWN: Interface Serial0, changed state to up
router2(config-if)#interface e0
router2(config-if)#ip address 192.168.3.1 255.255.255.0
router2(config-if)#no shut
%LINK-3-UPDOWN: Interface Ethernet0, changed state to up
router2(config-if)#exit
router2(config)#router rip
router2(config-router)#network 192.168.3.0
router2(config-router)#network 192.168.2.0
router2(config-router)#exit
router2(config)#exit
router2#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
router2#ping 192.168.2.1                 //试ping一下,完全正确
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
router2#ping 192.168.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
 
pc1的配置:
 
Boson BOSS 5.0
Copyright 1998-2003 Boson Software, Inc.
Use the command help to get started
Press Enter to begin
C:>ipconfig /ip 192.168.1.1 255.255.255.0
C:>ipconfig /dg 192.168.1.2
C:>ping 192.168.3.2
Pinging 192.168.3.2 with 32 bytes of data:     //正式开始测试,完全正确
Reply from 192.168.3.2: bytes=32 time=60ms TTL=241
Reply from 192.168.3.2: bytes=32 time=60ms TTL=241
Reply from 192.168.3.2: bytes=32 time=60ms TTL=241
Reply from 192.168.3.2: bytes=32 time=60ms TTL=241
Reply from 192.168.3.2: bytes=32 time=60ms TTL=241
Ping statistics for 192.168.3.2:     Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
     Minimum = 50ms, Maximum =  60ms, Average =  55ms
C:>ping 192.168.3.1
Pinging 192.168.3.1 with 32 bytes of data:
Reply from 192.168.3.1: bytes=32 time=60ms TTL=241
Reply from 192.168.3.1: bytes=32 time=60ms TTL=241
Reply from 192.168.3.1: bytes=32 time=60ms TTL=241
Reply from 192.168.3.1: bytes=32 time=60ms TTL=241
Reply from 192.168.3.1: bytes=32 time=60ms TTL=241
Ping statistics for 192.168.3.1:     Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
     Minimum = 50ms, Maximum =  60ms, Average =  55ms
C:>ping 192.168.2.2
Pinging 192.168.2.2 with 32 bytes of data:
Reply from 192.168.2.2: bytes=32 time=60ms TTL=241
Reply from 192.168.2.2: bytes=32 time=60ms TTL=241
Reply from 192.168.2.2: bytes=32 time=60ms TTL=241
Reply from 192.168.2.2: bytes=32 time=60ms TTL=241
Reply from 192.168.2.2: bytes=32 time=60ms TTL=241
Ping statistics for 192.168.2.2:     Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
     Minimum = 50ms, Maximum =  60ms, Average =  55ms
C:>ping 192.168.2.1
Pinging 192.168.2.1 with 32 bytes of data:
Reply from 192.168.2.1: bytes=32 time=60ms TTL=241
Reply from 192.168.2.1: bytes=32 time=60ms TTL=241
Reply from 192.168.2.1: bytes=32 time=60ms TTL=241
Reply from 192.168.2.1: bytes=32 time=60ms TTL=241
Reply from 192.168.2.1: bytes=32 time=60ms TTL=241
Ping statistics for 192.168.2.1:     Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
     Minimum = 50ms, Maximum =  60ms, Average =  55ms
C:>ping 192.168.1.2
Pinging 192.168.1.2 with 32 bytes of data:
Reply from 192.168.1.2: bytes=32 time=60ms TTL=241
Reply from 192.168.1.2: bytes=32 time=60ms TTL=241
Reply from 192.168.1.2: bytes=32 time=60ms TTL=241
Reply from 192.168.1.2: bytes=32 time=60ms TTL=241
Reply from 192.168.1.2: bytes=32 time=60ms TTL=241
Ping statistics for 192.168.1.2:     Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
     Minimum = 50ms, Maximum =  60ms, Average =  55ms
pc2 的配置:
 
Boson BOSS 5.0
Copyright 1998-2003 Boson Software, Inc.
Use the command help to get started
Press Enter to begin
C:>ipconfig /ip 192.168.3.2 255.255.255.0
C:>ipconfig /dg 192.168.3.1
C:>ping 192.168.1.1
Pinging 192.168.1.1 with 32 bytes of data:        //正式测试,完全正确
Reply from 192.168.1.1: bytes=32 time=60ms TTL=241
Reply from 192.168.1.1: bytes=32 time=60ms TTL=241
Reply from 192.168.1.1: bytes=32 time=60ms TTL=241
Reply from 192.168.1.1: bytes=32 time=60ms TTL=241
Reply from 192.168.1.1: bytes=32 time=60ms TTL=241
Ping statistics for 192.168.1.1:     Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
     Minimum = 50ms, Maximum =  60ms, Average =  55ms
C:>ping 192.168.1.2
Pinging 192.168.1.2 with 32 bytes of data:
Reply from 192.168.1.2: bytes=32 time=60ms TTL=241
Reply from 192.168.1.2: bytes=32 time=60ms TTL=241
Reply from 192.168.1.2: bytes=32 time=60ms TTL=241
Reply from 192.168.1.2: bytes=32 time=60ms TTL=241
Reply from 192.168.1.2: bytes=32 time=60ms TTL=241
Ping statistics for 192.168.1.2:     Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
     Minimum = 50ms, Maximum =  60ms, Average =  55ms
C:>ping 192.168.2.1
Pinging 192.168.2.1 with 32 bytes of data:
Reply from 192.168.2.1: bytes=32 time=60ms TTL=241
Reply from 192.168.2.1: bytes=32 time=60ms TTL=241
Reply from 192.168.2.1: bytes=32 time=60ms TTL=241
Reply from 192.168.2.1: bytes=32 time=60ms TTL=241
Reply from 192.168.2.1: bytes=32 time=60ms TTL=241
Ping statistics for 192.168.2.1:     Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
     Minimum = 50ms, Maximum =  60ms, Average =  55ms
C:>ping 192.168.2.2
Pinging 192.168.2.2 with 32 bytes of data:
Reply from 192.168.2.2: bytes=32 time=60ms TTL=241
Reply from 192.168.2.2: bytes=32 time=60ms TTL=241
Reply from 192.168.2.2: bytes=32 time=60ms TTL=241
Reply from 192.168.2.2: bytes=32 time=60ms TTL=241
Reply from 192.168.2.2: bytes=32 time=60ms TTL=241
Ping statistics for 192.168.2.2:     Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
     Minimum = 50ms, Maximum =  60ms, Average =  55ms
C:>ping 192.168.3.1
Pinging 192.168.3.1 with 32 bytes of data:
Reply from 192.168.3.1: bytes=32 time=60ms TTL=241
Reply from 192.168.3.1: bytes=32 time=60ms TTL=241
Reply from 192.168.3.1: bytes=32 time=60ms TTL=241
Reply from 192.168.3.1: bytes=32 time=60ms TTL=241
Reply from 192.168.3.1: bytes=32 time=60ms TTL=241
Ping statistics for 192.168.3.1:     Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
     Minimum = 50ms, Maximum =  60ms, Average =  55ms
C:>ping 192.168.3.2
Pinging 192.168.3.2 with 32 bytes of data:
Reply from 192.168.3.2: bytes=32 time=60ms TTL=241
Reply from 192.168.3.2: bytes=32 time=60ms TTL=241
Reply from 192.168.3.2: bytes=32 time=60ms TTL=241
Reply from 192.168.3.2: bytes=32 time=60ms TTL=241
Reply from 192.168.3.2: bytes=32 time=60ms TTL=241
Ping statistics for 192.168.3.2:     Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
     Minimum = 50ms, Maximum =  60ms, Average =  55ms
C:>
下面是show run查看的r1的部分配置情况:
interface Serial0
 ip address 192.168.2.1 255.255.255.0
 no ip directed-broadcast
!
interface Ethernet0
 ip address 192.168.1.2 255.255.255.0
 no ip directed-broadcast
!
!
router rip
 network 192.168.1.0
 network 192.168.2.0
!
ip classless
no ip http server
!
!
!
line con 0
 transport input none
line aux 0
line vty 0 4
!
no scheduler allocate
end
show run查看的r2的部分配置情况:
interface Serial0
 ip address 192.168.2.2 255.255.255.0
 no ip directed-broadcast
!
interface Ethernet0
 ip address 192.168.3.1 255.255.255.0
 no ip directed-broadcast
!
!
router rip
 network 192.168.3.0
 network 192.168.2.0
!
ip classless
no ip http server
!
!
!
line con 0
 transport input none
line aux 0
line vty 0 4
!
no scheduler allocate
end
     不知道这样能不能看得直观些,希望大家继续提出意见,我会一一改进的~~~

本文出自 “Keep Moving” 博客,请务必保留此出处http://victoryan.blog.51cto.com/191603/38714





    文章评论
 
2007-08-18 09:15:18
不知道 BOSON支持 debug不?
(应该多debug和show下) 如:debug ip RIP
debug ip rip ev 这些可以看看RIP的更新信息!
在R1宣告完 该sh ip rout下

再看一下R2宣告完 在R1上再 sh IP rou下 看区别!
实验不是ping 通了 就完事了!(如果是这样做实验也没啥意思了 >v<)

最重要的 还是 过程多了什么条目 少了哪些条目!

2007-08-18 09:25:18
恩,记住了高手的指点!谢谢

2007-08-18 13:24:07
不用谢呵呵。。。大家共同进步才是最关键的
对于这个实验枫速向航把该说的都说了,我也不多说什么了。
加油!

2007-08-18 14:44:38
呵呵,多谢两位仁兄!

2007-08-20 12:58:57
如果你要做CCNA的实验 最好用这个(可以做新版CCNA无线的,可查看流量,可用Debug)
http://bbs.ciscoh3com.com/viewthread.php?tid=4642&extra=&authorid=0&page=1

2007-10-23 21:36:51
顶起来

2007-10-23 21:37:41
顶了他

2007-11-17 20:51:32
希望以后有更多的试验示例   有拓扑图   有操作过程的  
  我觉的这样我们的收益非凡   谢谢  

2007-11-17 21:21:32
好的,大家共同学习,共同进步~~~

2007-12-04 09:29:07
按照上面的做了实验,为什么我的R2不能PING通R1的192.168.1.2?同样的R1也PING R

2007-12-04 09:29:07
按照上面的做了实验,为什么我的R2不能PING通R1的192.168.1.2?同样的R1也PING R

2007-12-04 09:30:37
按照上面的做了实验,但是我的R2不能PING通192.168.1.2,同样的 R1也PING

2007-12-04 09:30:37
按照上面的做了实验,但是我的R2不能PING通192.168.1.2,同样的 R1也PING

2007-12-04 09:32:28
按照上面的做了实验,但是我的R2不能PING通192.168.1.2,同样的 R1也PING不通192.168.3.1呢??

2007-12-04 13:04:27
楼上的朋友是用什么模拟器做的实验呢?或者是真机?你这样问很不好说问题出现在哪里啊~~~

 

发表评论

昵   称:
验证码:  点击图片可刷新验证码  博客过2级,无需填写验证码
内   容: