【实验名称】
PPP PAP认证。
【实验目的】
掌握PPP PAP认证的过程及配置。
【背景描述】
你是公司的网络管理员,公司为了满足不断增长的业务需求,申请了专线接入,你的客户端路由器与ISP进行链路协商时要验证身份,配置路由器保证链路建立,并考虑其安全性。
【技术原理】
PPP协议位于OSI七层模型的数据链路层,PPP协议按照功能划分为两个子层:LCP、NCP。LCP主要负责链路的协商、建立、回拨、认证、数据的压缩、多链路捆绑等功能。NCP主要负责和上层的协议进行协商,为网络层协议提供服务。
PPP的认证功能是指在建立PPP链路的过程中进行密码的验证,验证通过建立连接,验证不通过拆除链路。
PPP协议支持两种认证方式PAP和CHAP。PAP(Password Authentication Protocol,密码验证协议)是指验证双方通过两次握手完成验证过程,它是一种用于对试图登录到点对点协议服务器上的用户进行身份验证的方法。由被验证方主动发出验证请求,包含了验证的用户名和密码。由验证方验证后做出回复,通过验证或验证失败。在验证过程中用户名和密码以明文的方式在链路上传输。
【实现功能】
在链路协商时保证安全验证。链路协商时用户名、密码以明文的方式传输。
【实验设备】
R1762(两台)、V.35线缆(1条)
【实验拓扑】
无标题.jpg (7.87 KB)
2008-11-14 13:36
图 23
注:RB为DCE端口。
【实验步骤】
步骤1. 基本配置。
Red-Giant(config)#hostname Ra
Ra(config)# interface serial 1/2
Ra(config-if)#ip address 1.1.1.1 255.255.255.0
Ra(config-if)#no shutdown
Red-Giant(config)#hostname Rb
Rb(config)# interface serial 1/2
Rb(config-if)#ip address 1.1.1.2 255.255.255.0
Rb(config-if)#clock rate 000
Rb(config-if)#no shutdown
验证测试: (以Ra为例)
Ra#show interface serial 1/2
serial 1/2 is UP , line protocol is UP
Hardware is PQ2 SCC HDLC CONTROLLER serial
Interface address is: 1.1.1.1/24
MTU 1500 bytes, BW 2000 Kbit
Encapsulation protocol is HDLC, loopback not set
Keepalive interval is 10 sec , set
Carrier delay is 2 sec
RXload is 1 ,Txload is 1
Queueing strategy: WFQ
5 minutes input rate 11 bits/sec, 0 packets/sec
5 minutes output rate 11 bits/sec, 0 packets/sec
33 packets input, 726 bytes, 0 no buffer
Received 33 broadcasts, 0 runts, 0 giants
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 abort
32 packets output, 704 bytes, 0 underruns
0 output errors, 0 collisions, 6 interface resets
3 carrier transitions
V.35 DTE cable
DCD=up DSR=up DTR=up RTS=up CTS=up
步骤2. 配置PPP PAP认证。
被验证方的配置
Ra(config)# interface serial 1/2
Ra(config-if)# encapsulation ppp ! 接口下封装PPP协议
Ra(config-if)#ppp pap sent-username Ra password 0 star
! PAP认证的用户名、密码
验证方的配置
Rb(config)#username Ra password 0 star
! 验证方配置被验证方用户名、密码
Rb(config-if)# encapsulation ppp
Rb(config-if)#ppp authentication pap ! PPP启用PAP认证方式
验证测试:
Ra#debug ppp authentication ! 观察PAP验证过程
%LINK CHANGED: Interface serial 1/2, changed state to down
%LINE PROTOCOL CHANGE: Interface serial 1/2, changed state to DOWN
PPP: ppp_clear_author(), protocol %LINK CHANGED: Interface serial 1/2, changed state to up
PPP: serial 1/2 PAP ACK received
PPP: serial 1/2 Passed PAP authentication with remote
PPP: serial 1/2 lcp authentication OK!
PPP: ppp_clear_author(), protocol = TYPE_IPCP
= TYPE_LCP
%LINE PROTOCOL CHANGE: Interface serial 1/2, changed state to UP.
【注意事项】
1、在DCE端要配置时钟;
2、Rb(config)#username Ra password 0 star username后面的参数是对方的主机名;
3、在接口下封装ppp;
4、debug ppp authentication 在路由器物理层up,链路尚未建立的情况下打开才有信息输出,本实验的实质是链路层协商建立的安全性,该信息出现在链路协商的过程中。
【参考配置】
Ra#show running-config ! 路由器Ra配置
Building configuration...
Current configuration : 483 bytes
!
version 8.32(building 53)
hostname Ra
!
interface serial 1/2
encapsulation PPP
ppp pap sent-username Ra password 7 072d172e07
ip address 1.1.1.1 255.255.255.0
!
interface serial 1/3
clock rate 000
!
interface FastEthernet 1/0
duplex auto
speed auto
!
interface FastEthernet 1/1
duplex auto
speed auto
!
interface Null 0
!
line con 0
line aux 0
line vty 0 4
login
!
end
Rb#show running-config !路由器Rb配置
Building configuration...
Current configuration : 469 bytes
!
version 8.32(building 53)
hostname Rb
!
username Ra password 0 star
!
interface serial 1/2
encapsulation PPP
ppp authentication pap
ip address 1.1.1.2 255.255.255.0
clock rate 000
!
interface serial 1/3
!
interface FastEthernet 1/0
duplex auto
speed auto
!
interface FastEthernet 1/1
duplex auto
speed auto
!
interface Null 0
!
line con 0
line aux 0
line vty 0 4
login
!
end下载本文