PPP:点对点协议
是一种用来同步调制连接的数据链路层协议 具有身份验证功能(PAP、CHAP)、动态分配IP地址的能力、错误检测能力
PAP:PPP协议认证的一种方式 PAP使用明文传输 使用两次握手实现 没有CHAP安全性高
实验环境
- Cisco Packet Tracer 6.0
- 2台PT路由器
拓扑图
设备名称 | 接口 | IP | 子网掩码 |
---|---|---|---|
Client | Se 2/0 | 192.168.2.1 | 255.255.255.0 |
ISP | Se 2/0 | 192.168.2.2 | 255.255.255.0 |
# Client:
Client>en //进入特权模式
Client#conf t //进入全局配置模式
Enter configuration commands, one per line. End with CNTL/Z.
Client(config)#username ISP password abc //创建对方用户名和密码
Client(config)#int se2/0 //进入se2/0
Client(config-if)#no shut //开启se2/0
%LINK-5-CHANGED: Interface Serial2/0, changed state to down
Client(config-if)#ip add 192.168.2.1 255.255.255.0 //给se2/0设置ip
Client(config-if)#encap ppp //给se2/0口封装PPP
Client(config-if)#ppp auth pap //设置ppp验证方式为pap
Client(config-if)#ppp pap sent Client password 123 //发送对方路由器的用户名和密码
Client(config-if)#end //返回特权模式
Client#
# ISP:
ISP>en //进入特权模式
ISP#conf t //进入全局配置模式
Enter configuration commands, one per line. End with CNTL/Z.
ISP(config)#username Client password 123 //创建对方用户名和密码
ISP(config)#int se2/0 //进入se2/0
ISP(config-if)#no shut //开启se2/0
ISP(config-if)#
%LINK-5-CHANGED: Interface Serial2/0, changed state to up
ISP(config-if)#ip add 192.168.2.2 255.255.255.0 //给se2/0设置ip
ISP(config-if)#clock rate 64000 //设置se2/0的时钟频率
ISP(config-if)#encap ppp //给se2/0口封装PPP
ISP(config-if)#ppp auth pap //设置ppp验证方式为pap
ISP(config-if)#ppp pap sent ISP password abc //发送对方路由器的用户名和密码
ISP(config-if)#end //返回特权模式
ISP#
以上就配置完成PAP认证
使用路由器ping命令测试其连通性
Client#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/5/9 ms
可以看到ping成功了 PAP认证就配置成功了