免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 763 | 回复: 0
打印 上一主题 下一主题

Dynamips---PPP协议实验配置 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-04-30 14:21 |只看该作者 |倒序浏览


PPP(Point to Point Protocol)协议是在点对点链路上运行的数据链路层协议
PPP协议支持两种认证协议:
1.PAP(Password Authentication Protocol,口令认证协议)
2.CHAP(Challenge Handshake Authentication Protocol,质询握手认证协议)
PAP是两次握手认证协议,口令以明文传送,被认证方首先发起认证请求。
CHAP是三次握手认证协议,不发送口令,主认证方首先发起认证请求,安全性比PAP高

详细配置过程:

拓扑图:R1 S0/1 与 R2 s0/1口相连
.net文件如下:
autostart = false
[localhost]
      [[3640]]
      image = c:\Program Files\Dynamips\images\C3640-IS.BIN
      confreg = 0x2102
      idlepc = 0x604feb34
      ram = 64
   
      [[ROUTER R1]]
      model = 3640
      console = 2001
      s1/0 = R2 s1/1
   
      [[ROUTER R2]]
      model = 3640
      console = 2002

注:因我个人一直用的是Dynamips GUI(简单嘛),所以用GUI也可以的,3640的NM-4T模块支持4个serial接口。
一、单向验证
1:R1启动pap(R1为主验证方,R2为被验证方)
R1(config)#int s1/0
R1(config-if)#no shut
R1(config-if)#ip add 1.1.1.1 255.255.255.0
R1(config-if)#encapsulation ppp                                       #修改封装协议为PPP
R1(config-if)#ppp authentication pap                                #认证协议为pap
R1(config-if)#exi
R1(config)#username test password test                          #设置验证用户名及密码
R2(config)#int s1/1
R2(config-if)#no shut
R2(config-if)#ip add 1.1.1.2 255.255.255.0
R2(config-if)#encapsulation ppp
R2(config-if)#ppp pap sent-username test password test             #发送验证用户名及密码
2:R1启动chap(R1为主验证方,R2为被验证方)
R1(config)#int s1/0
R1(config-if)#no shut
R1(config-if)#ip add 1.1.1.1 255.255.255.0
R1(config-if)#encapsulation ppp                               #修改封装协议为PPP
R1(config-if)#ppp authentication chap                      #认证协议为pap
R1(config-if)#exi
R1(config)#username R2 password test                    # 发送被验证方用户名及密码,R2为被验证方hostname
  
R2(config)#int s1/1
R2(config-if)#no shut
R2(config-if)#ip add 1.1.1.2 255.255.255.0
R2(config-if)#encapsulation ppp
R2(config-if)#ppp chap password test                       #设置用户名及密码,用户名默认为hostname,用户名可更改,但必须两边一致
二、双向验证
1、R1跟R2同时启动pap
R1(config)#int s1/0
R1(config-if)#no shut
R1(config-if)#ip add 1.1.1.1 255.255.255.0
R1(config-if)#encapsulation ppp
R1(config-if)#ppp authentication pap
R1(config-if)#ppp pap sent-username test password test
R1(config-if)#exi
R1(config)#username test password test
R2(config)#int s1/1
R2(config-if)#no shut
R2(config-if)#ip add 1.1.1.2 255.255.255.0
R2(config-if)#encapsulation ppp
R2(config-if)#ppp authentication pap
R2(config-if)#ppp pap sent-username test password test
R2(config-if)#exi
R2(config)#username test password test
2、R1跟R2同时启动chap
R1(config)#int s1/0
R1(config-if)#no shut
R1(config-if)#ip add 1.1.1.1 255.255.255.0
R1(config-if)#encapsulation ppp
R1(config-if)#ppp authentication chap
R1(config-if)#exi
R1(config)#username R2 password test                            # R2为对方hostname
R2(config)#int s1/1
R2(config-if)#no shut
R2(config-if)#ip add 1.1.1.2 255.255.255.0
R2(config-if)#encapsulation ppp
R2(config-if)#ppp authentication chap
R2(config-if)#exi
R2(config)#username R1 password test                            # R1为对方hostname
3、R1启动pap,R2启动chap
R1(config)#int s1/0
R1(config-if)#no shut
R1(config-if)#ip add 1.1.1.1 255.255.255.0
R1(config-if)#encapsulation ppp
R1(config-if)#ppp authentication pap
R1(config-if)#ppp chap password test
R1(config-if)#exi
R1(config)#username test password test
R2(config)#int s1/1
R2(config-if)#no shut
R2(config-if)#ip add 1.1.1.2 255.255.255.0
R2(config-if)#encapsulation ppp
R2(config-if)#ppp authentication chap
R2(config-if)#ppp pap sent-username test password test
R2(config-if)#exi
R2(config)#username R1 password test                             # R1为对方hostname
验证:ping
     debug ppp authentication


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/27698/showart_289710.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP