ppp链路认证实验

实验拓扑

实验需求

  1. 路由器A和B通过专线相连,路由器A和B相连网络的掩码为/30网段,两台路由器能通信
  2. 在路由器A与B上实现PAP认证,使两台路由器能互通
  3. 在路由器A与B上实现CHAP认证,使两台路由器能互通;

注意:认证者为R2,被认证者为R1;

实验思路

  1. 给两边路由器配置好IP地址,通过Ping测试联通性
  2. 设置PAP单向认证,通过Ping测试联通性
  3. 配置PAP双向认证,通过Ping测试联通性
  4. 配置CHAP单向认证,通过Ping测试联通性
  5. 配置CHAP双向认证,通过Ping测试联通性

实验步骤

1 配置IP 进行测试联通

办事处

Router>en
Router#conf ter
Enter configuration commands,one per line.End with CNTL/Z.
Router( config)#int s1/2
Router( config-if)#ip add 192.168.1.1 255.255.255.252
Router( config-if)#no shut

总部

Router>en
Router#conf ter
Enter configuration commands,one per line.End with CNTL/Z.
Router(config)#int s1/2
Router(config-if)#ip add 192.168.1.2 255.255.255.252
Router( config-if))#no shut

测试

总部路由器

Router( config-if)#doping192.168.1.1
Type escape sequence to abort.
Sending 5,100-byteICMP Echos to 192.168.1.1,timeout is 2 seconds:
!!!!!
Success rate is 100 percent(5/5),round-trip min/avg/max = 16/19/21ms

办事处路由器

Router( config-if)#do ping 192.168.1.2
Type escape sequence to abort.
Sending 5,100-byte ICMP Echos to 192.168.1.2,timeout is 2 seconds:
!! !!!
Router( config-if)#
Success rate is 100 percent(5/5),round-trip min/avg/max = 18/19/20 ms

2 单向PAP认证

总部

Router( config)#username lsy password 123
Router( config)#ints1/2
Router( config-if)#en
Router( config-if)#encapsulation ppp
Router( config-if)#
*Aug 19 03:57:26.539:%LINEPROTO-5-UPDOWN:Line protocol on Inte
rface Serial1/2,changed state to down
Router( config-if)#ppp authentication pap

到办事处路由器先进行ping是否还能通信

Router( config )#do ping192.168.1.2
Type escape sequence to abort.
Sending 5,100-byteICMP Echos to 192.168.1.2,timeout is 2 seco
nds:
.....
Successrate is_0 percent(0/5)
Router( config)#
此时是无法ping通
Router ( config)#ints1/2
Router( config-if)#en
Router( config-if)#encapsulation ppp
Router( config-if)#ppp pap sent-username lsy pas
Router( config-if)#ppp pap sent-username lsy password123
*Aug 19 04:02:16.890:%LINEPROTO-5-UPDOWN:Line protocol on Inte
rface Serial1/2,changed state to up
Router( config-if)#do ping192.168.1.2
Type escape sequence to abort.
Sending 5,100-byte ICMP Echos to 192.168.1.2,timeout is 2 seco
nds:
!!!!!
Success rate is 100 percent(5/5),round-trip min/avg/max = 7/1
/15 ms

3 双向PAP认证
先关闭两个路由器上的单向pap认证

总部和办事处

Router ( config-if)#no encapsulation ppp
Router( config-if)#do show interfaces s1/2
Serial1/2isup, line protocol is up
Hardware is M4T
Internet address is 192.168.1.2/30
MTU 1500 bytes,BW1544Kbit/sec,DLY 20000 usec,
reliability 255/255,txload 1/255,rxload 1/255
EncapsulationHDLC,crc 16, loopback not set
Keepalive set(10 sec)
Restart-Delay is 0 secs
Last input 00:00:02,output 00:00:12,output hang never
Last clearing of "show interface" counters 00:00:04
Queueing strategy : fifo
output queue:0/40( size/max),,
5 minute input rate 0 bits/sec,0 packets/sec
5minute output rate 0 bits/sec,0 packets /sec
l packets input, 16 bytes,0 no buffer
Received 1 broadcasts(0IP multicasts)
runts,0giants,0 throttles
0input errors,0 CRC,0 frame,0 overrun,0 ignored,0 abortpackets output,0 bytes,0 underruns
0 output errors, 0 collisions,0 interface resets
l unknown protocol drops
0 output buffer failures,0 output buffers swapped out
Input queue:0/75/0/0(size/max/drops/flushes); Total output drops: 0

总部

Router( config)#int s1/2
Router( config-if)#en ppp
Router( config-if)#ppp authentication pap
Router(config-if)#ppp pap sent-username lsy password123

办事处

Router( config)#int s1/2
Router( config-if)#en ppp
Router( config-if)#ppp authentication pap
Router(config-if)#ppp pap sent-username lsy password 123
*Aug 19 06:23:48.287: %3LINEPROTO-5-UPDOWN:Line protocol on Interface Seriall/2,changed state

测试ping

Router( config-if)#do ping 192.168.1.2
Type escape sequence to abort.
Sending 5,100-byte ICMP Echos to 192.168.1.2,timeout is 2 seconds:
!!!!!
Success rate is 100 percent(5/5),round-trip min/avg/max = 10/10/13 ms

`
4 chap 单向认证
同理先关闭上面的认证在进行
总部

Router( config-if)#int s1/2
Router( config-if)#en ppp
Router ( config-if)#ppp authentication chap
Router( config-if)#exit
outer( config)#username yy password 22

办事处

Router( config)#int s1/2
Router( config-if)#en ppp
Router( config-if)#ppp cah
Router( config-if)#ppp cha
Router( config-if)#ppp chap ho
Router( config-if)#ppp chap hostname yy
Router( config-if)#pp
Router( config-if)#ppp chap p
Router( config-if)#ppp chap password 22

办事处测试

Router( config-if)#do ping192.168.1.2
Type escape sequence to abort.
Sending 5,100-byte ICMP Echos to 192.168.1.2,timeout is 2 seconds:
!!!!!
Success rate is 100 percent(5/5),round-trip min/avg/max = 9/9/10 ms

4 chap 双向认证
双方设置认证的用户名为对方设备的hostname,并设置相同的密码

清理单向chap配置
办事处

Router( config)#username zl password 123
Router( config)#int s1/2
Router( config-if)#en ppp
Router( config-if)#ppp authen
Router( config-if)#ppp authentication chap
Router(config-if)#ppp chap hostname lsy
Router( config-if)#no shut
*Aug 19 07:10:13.764:%LINEPROTO-5-UPDOMN: Line protocol on Interface Serial1/2,changed state t
*Aug 19 07:1i:35.165:%LINEPROTO-5-UPDOWN:Line protocol on Interface Serial1/2,changed state to up

总部

R2(config)#username lsy password 123
R2(config)#int s1/2
R2(config-if)#en ppp
R2(config-if#ppp authentication chap
R2( config-if)#ppp chap hostname zl
R2(config-if)#no shut
R2(config-if)#
*Aug 1907:11:35.165:%LINEPROTO-5-UPDOWN:Line protocol on Interface Serial1/2,changed state to up

测试

Router( config-if)#do ping192.168.1.2
Type escape sequence to abort.
Sending 5,100-byte ICMP Echos to 192.168.1.2,timeout is 2 seconds :
!!!!!
Success rate is 100 percent(5/5),round-trip min/avg/max = 8/10/13 ms

实验总结

1.pap明文传输和密码,支持双方认证,认证用户名和密码可以不一致2.chap质检握手身份核实(密码被隐藏),在chap双方认证中,双方密码必须保持一致,否则认证失败。

单向和双向验证:CHAP 被定义为单向身份验证方法。然而,您可以在两个方向上使用 CHAP 以创建双向身份验证。因此,通过双向 CHAP,每一端都可以发起单独的三次握手。默认情况下,路由器使用其主机名向对等体标识其身份。然而,可以通过ppp chap hostname命令更改此 CHAP 用户名

Cisco ppp链路单双认证相关推荐

  1. Http和Https的区别/握手协议/单双认证

    HTTP与HTTPS有什么区别? HTTP协议传输的数据都是未加密的,也就是明文的,因此使用HTTP协议传输隐私信息非常不安全,为了保证这些隐私数据能加密传输,于是网景公司设计了SSL(Secure ...

  2. 大型企业网络配置系列课程详解(六) --PPP链路的配置与相关概念的理解

    大型企业网络配置系列课程详解(六)<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office&qu ...

  3. PPP简介,PPP分层体系架构,PPP链路建立过程及PPP的帧格式

    PPP(Point-to-Point Protocol)是一种用于在两个网络节点之间传输数据的通信协议.它最初是为在拨号网络上进行拨号连接而开发的,现在已经被广泛应用于各种网络环境中,例如在宽带接入. ...

  4. 【一通百通】Bash的单双括号建议:多用[[]], 少用[]

    一. bash [  ] 单双括号 基本要素: Ø  [ ] 两个符号左右都要有空格分隔 Ø  内部操作符与操作变量之间要有空格:如  [  "a"  =  "b&quo ...

  5. python笔记22-literal_eval函数处理返回json中的单双引号

    前言 在做接口测试的时候,最常见的接口返回数据就是json类型,json类型数据实际上就是字串,通常标准的json格式是可以转化成python里面的对应的数据类型的 有时候开发返回的数据比较坑,不按常 ...

  6. LaTeX设置单双栏方法 基于LaTex+VSCode+MAC

    全局设置 在文档的导言区使用单双栏选项设置全局文章 单栏设置方法: \documentclass[onecolumn]{article} 双栏设置方法: \documentclass[twocolum ...

  7. i12单双耳切换_多种形态,切换惬意,雷柏i100蓝牙TWS耳机,支持单耳/双耳使用...

    忙碌的一周还会开始,开不完的会,做不完的工作,脑负荷超标,只想一头钻入音乐的海洋. 在盛夏的欢愉中,它有一份独特的吸引力.是一剂舒心良方,能坠入仲夏夜的梦中,温暖.灵动.美妙,全身心的沉浸,给身心慰藉 ...

  8. matlab版本之间的单双引号问题

    matlab版本之间的单双引号问题 问题描述 运行matlab文件的时候出现错误提示 Creating a string using double quotes is not supported. U ...

  9. ORA-00923: FROM keyword not found where expected(单双引号)

    1.前提 在学习oracel的过程中遇到的一个关于单双引号的问题 备注一下 2.学习过程中创建表语句是这样的 create table DEPT_DML --部门表 ( DEPT_NO NUMBER( ...

  10. python 输出引号_python输出字符串单双引号如何选择

    在Python当中字符串的输出既可以使用单引号,也可以使用双引号,使用单引号或双引号是没有区别的:当使用双引号将输出的字符串括起来时,内部也可使用单引号,将单双引号匹配正确即可. 在Python中我们 ...

最新文章

  1. 如何搭建高接通率的音视频场景?
  2. 堆和栈的区别(转载)+自己总结
  3. MYSQL 获取每个汉字的拼音首字母
  4. pytorch线性回归_PyTorch中的线性回归
  5. 颠覆认知!25张动图,让你重新认识地球
  6. 6月20日云栖精选夜读丨国内首家!阿里云宣布全面提供IPv6服务
  7. 【编译】StreamInsight应用调优入门(一)——概述
  8. 计算重叠最长子串问题
  9. Android进阶:Binder那么弱怎么面大厂?
  10. Keil MDK5解决error: L6002U: Could not open file …\obj\main.o: No such file or directory
  11. ArcGIS:使用镶嵌功能将地理空间数据云下载的多幅DEM合并为一幅
  12. Ubuntu 重装显卡驱动(因内核升级导致失效后)
  13. 一分钟教程:注册谷歌邮箱
  14. Nike Air Shake ndestrukt white red Performance Reviews
  15. 如何用邮件客户端收发电子邮件,如何配置邮件客户端?
  16. SNF开发平台WinForm之十三-单独从服务器上获取PDF文件进行显示-SNF快速开发平台3.3-Spring.Net.Framework...
  17. 区块链毕业设计必读论文【2020-5】
  18. spring boot 2.0 redis 分布式锁
  19. 【计算机网络】-TCP的拥塞控制及拥塞控制方法
  20. python 学生管理系统 增,删,改,查

热门文章

  1. C/C++ 创建两个链表,实现两个链表低位到高位相加,并输出链表
  2. ubuntu通过iptables设置某一个ip网段禁用所有端口
  3. spring aop的简单使用
  4. 压缩下载到浏览器的工具类
  5. 30岁前成功的12条黄金法则
  6. PHP7实战开发简单CMS内容管理系统(3) 引入后台首页
  7. EXCEL统计不重复值的数量
  8. busybox的编译和使用
  9. 程序设计: 猫大叫一声,所有的老鼠都开始逃跑,主人被惊醒。(C#语言)
  10. linux下nginx tomcat集群