昨天下午做了这个实验,在实验过程中,也第一次用到了Dynamips这个软件(由众博友推荐),它确实是可以模拟出cisco路由器的硬件环境,然后直接在这个环境下运行cisco的IOS,呵呵,初次使用,不是很灵活,但经过整整一下午,也掌握了它的使用方法(以后有些实验估计boson netsim会有些命令没有),但是今天的实验还是贴出在boson netsim上配置的情况,但会贴一张Dynamips下的图。
先说说ppp和chap,ppp(point to point protocol)是点到点型线路的数据链路层协议, 它支持在各种物理类型的点到点串行线路上传输上层协议报文,而chap则是ppp可选的身份认证协议之一,另外一种叫pap,好像安全性不及chap。下面看实验。
拓扑图如下所示:
在配置的时候需要注意的是:要分别在r1和r2上的全局模式下用username ** password ##来为本地口令数据库添加记录,而此处的**应该是对端路由器的名字,##则为设定的密码,两个路由器的该命令要写同一密码。如下所示:
r1(config)#username r2 password cisco
r2(config)#username r1 password cisco;
接下来看详细的配置情况:
1.1 在r1上show run
 
r1#show run
Building configuration...
!
Version 12.1
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname r1
!
username r2 password cisco
!
!
!
ip subnet-zero
!
!
!
!
!
!
!
!
!
!
interface Serial0
 ip address 192.168.2.1 255.255.255.0
 no ip directed-broadcast
 clock rate 64000
 encapsulation ppp
 ppp authentication chap
!
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
 
1.2 在r1上show ip route
r1#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default
       U - per-user static route
Gateway of last resort is not set
     192.168.1.0/24 is subnetted, 1 subnets
C       192.168.1.0 is directly connected, Ethernet0
     192.168.2.0/24 is subnetted, 1 subnets
C       192.168.2.0 is directly connected, Serial0
     192.168.3.0/24 is subnetted, 1 subnets
R       192.168.3.0 [120/1] via 192.168.2.2, 00:05:25, Serial0
 
1.3在r1上show ip pro
r1#show ip pro
Routing Protocol is "rip" 
  Sending updates every 30 seconds, next due in 17 seconds
  Invalid after 180 seconds, hold down 180, flushed after 240
  Outgoing update filter list for all interfaces is
  Incoming update filter list for all interfaces is
  Redistributing:   rip
  Default version control: send version 1, receive any version
    Interface        Send  Recv   Key-chain
    Serial0            1    1 2
    Ethernet0          1    1 2
  Routing for Networks:
    192.168.1.0
    192.168.2.0
  Routing Information Sources:
    192.168.2.2           120      00:00:09
  Distance: (default is 120)
2.1 在r2上show run
r2# show run
Building configuration...
!
Version 12.1
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname r2
!
username r1 password cisco
!
!
!
ip subnet-zero
!
!
!
!
!
!
!
!
!
!
interface Serial0
 ip address 192.168.2.2 255.255.255.0
 no ip directed-broadcast
 encapsulation ppp
 ppp authentication chap
!
interface Ethernet0
 ip address 192.168.3.1 255.255.255.0
 no ip directed-broadcast
!
!
router rip
 network 192.168.2.0
 network 192.168.3.0
!
ip classless
no ip http server
!
!
!
line con 0
 transport input none
line aux 0
line vty 0 4
!
no scheduler allocate
end
2.2 在r2上show ip route
r2# show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default
       U - per-user static route
Gateway of last resort is not set
     192.168.2.0/24 is subnetted, 1 subnets
C       192.168.2.0 is directly connected, Serial0
     192.168.1.0/24 is subnetted, 1 subnets
R       192.168.1.0 [120/1] via 192.168.2.1, 00:07:18, Serial0
     192.168.3.0/24 is subnetted, 1 subnets
C       192.168.3.0 is directly connected, Ethernet0
2.3 在r2上show pro

r2#show ip pro
Routing Protocol is "rip" 
  Sending updates every 30 seconds, next due in 17 seconds
  Invalid after 180 seconds, hold down 180, flushed after 240
  Outgoing update filter list for all interfaces is
  Incoming update filter list for all interfaces is
  Redistributing:   rip
  Default version control: send version 1, receive any version
    Interface        Send  Recv   Key-chain
    Serial0            1    1 2
    Ethernet0          1    1 2
  Routing for Networks:
    192.168.2.0
    192.168.3.0
  Routing Information Sources:
    192.168.2.2           120      00:00:09
  Distance: (default is 120)
       在这样配置之后,本来是可以用debug ppp authentication  这个命令来看到r1和r2之间发送数据包来进行身份认证过程的,但是在boson netsim上输入该命令之后,并不报错,但也没有任何的反应,我想这可能是boson 的bug吧,于是我就换用了Dynamips,在正确配置之后,我也输入了debug ppp authentication 这个命令,但是它就只出现了一条 ppp authentication debug is on之后也就没反应了,难道是由于二者一次性的就认证成功了,所以不现出来了?(希望博友们给予指点)。我在Dynamips下用debug ip rip命令并截了一张图,如下所示:
从这个图可以看到RIP协议的路由学习过程,它通过接收邻居路由器发来的udp包对路由进行学习和更新,如上图中的:
network      192.168.2.0   metric 1
network      192.168.2.0   metric 2
就是R1学习到的关于192.168.2.0和192.168.3.0这两个网络的路由信息。
从pc2上使用 tracert 192.168.1.1也可以清楚的看出从pc2到pc1的路由情况,如下所示:
以前只是从书上知道RIP的工作原理,但这次通过实验亲眼见到了其学习的过程,感觉还是受益匪浅的。

本文转自 victoryan 51CTO博客,原文链接:http://blog.51cto.com/victoryan/39417

cisco路由器基本实验之六 CHAP and RIP (Boson NetSim)相关推荐

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

    言归正传,Boson Netsim的实验规划,默认路由下一个实验应该是RIP协议的配置.众所周知,RIP(Routing Information Protocol),即路由信息协议,它与IGRP,OS ...

  2. cisco路由器基本实验之一 静态路由的配置(Boson NetSim

    花了快一个月的时间之后,我的Linux服务器建设学习算是小告了一个段落了.现在开始要回到windows里面利用Boson NetSim这个cisco实验模拟器来加深对路由交换的配置学习了.好在上学期上 ...

  3. cisco路由器基本实验之一 静态路由的配置(Boson NetSim)

    花了快一个月的时间之后,我的Linux服务器建设学习算是小告了一个段落了.现在开始要回到windows里面利用Boson NetSim这个cisco实验模拟器来加深对路由交换的配置学习了.好在上学期上 ...

  4. cisco路由器基本实验之二 默认路由的配置(Boson NetSim)

    昨天做的是静态路由的配置,按照Boson NetSim上面写的实验计划,后面还有一系列的实验,如下图所示:昨天做的就是Laber4 静态路由的配置,今天则是Laber5,默认路由的配置,还是和昨天一样 ...

  5. cisco路由器基本实验之七 Standard Access-Lists with RIP (Boson NetSim)

    今天又做了实验,呵呵,实验题目是Standard Access-Lists with RIP,就是大名鼎鼎的访问控制列表了,它的作用可就大了,比如进行安全方面的控制啊,流量方面也可以通过访问控制列表进 ...

  6. cisco路由器基本实验之四 动态路由之IGRP协议的配置(Boson NetSim)

    又快到了开学的时间了,所以最近要整理一些开学用的东西,可能要忙一点了,但是cisco系列的基本实验还是得完成,把它们写在博客上也可以作为自己学习路上的的见证,哈哈,闲话不说,还是看实验.今天是配置IG ...

  7. cisco路由器基本实验之五 配置Loopback接口进行远程登录 (Boson NetSim)

    先说点题外话,本来这两天是没时间来更新博客了的,但是事情出了点变化,使得我又有时间上网了,上网当然要到博客里面去逛逛了,没想到收到一封来自51cto的短信,说我的博客已经被评为推荐博客了,呵呵,真的很 ...

  8. cisco路由器基本实验之九 PAT的配置(Packet Tracer)

    昨天的实验是NAT,这种技术可以起到缓解IPV4 地址空间不足的问题,而PAT(Port  Address Transltaions,端口地址翻译)则适用于网络中只有一个内部全局地址的情况,如果此时还 ...

  9. cisco路由器基本实验之八 关于NAT的实验(Boson NetSim)

    前几天生病了,也没有精力做实验,因此也有几天没有更新博客了,现在感冒好了,让我学到的经验就是:一定要坚持锻炼,千万不能等到感冒之后才想去锻炼. 今天的实验是关于NAT的配置.NAT,即是Network ...

最新文章

  1. python的变量对大小写并不敏感_Robot Framework 内置变量
  2. [洛谷2月月月赛]富金森林公园
  3. 关于castle和Could not find the dialect in the configuration错误
  4. [jQuery] 你有写过jQuery的扩展吗?都有哪些写法?
  5. Emacspeak,Linux的声音界面
  6. 手机存储不足怎么办?用好这份清理指南你的手机还能再战三年
  7. JavaScript中var关键字的使用详解
  8. Javascript执行效率总结
  9. matlab练习程序(对应点集配准的四元数法)
  10. ok6410开发板移植DirectFB手记
  11. matlab mpopt,matpower安装到MATLAB下遇到的问题
  12. css幸运大转盘,用CSS实现一个抽奖转盘
  13. 抽象代数 04.01 群的生成元组
  14. 华为重度渗透的欧洲,美国如何清剿?
  15. Maven项目进行打包出现 The POM for xxxx is missing, no dependency information available
  16. SPSS数据分析之连续变量频率分析
  17. uni-app动态引入图片
  18. 命名实体识别python_命名实体识别的两种方法
  19. 地图兴趣点搜索一(基本流程)
  20. java a 运算_java 基本运算-三目运算-++a和a++的区别-键盘输入

热门文章

  1. nginx反向代理/负载均衡MySQL
  2. TCP粘包和拆包的定义,产生的原因以及解决方案
  3. AntV 数据可视化解决方案发布
  4. MapperException: 无法获取实体类xxxxx对应的表名! 三种解决方法,总有一款适合你。
  5. App 签名过期或泄露怎么办?别担心,Google 已经给出解决方案!
  6. 如何枚举String类型的枚举?
  7. 如何使用Java逐行读取大文本文件?
  8. 用Java获取当前工作目录
  9. require,include,require_once和include_once之间的区别?
  10. 静态方法和类方法之间的区别