实验八PPP与广域网链路测试综述.docx
《实验八PPP与广域网链路测试综述.docx》由会员分享,可在线阅读,更多相关《实验八PPP与广域网链路测试综述.docx(24页珍藏版)》请在冰豆网上搜索。
实验八PPP与广域网链路测试综述
一、实验目标
1、 掌握PPP的基本配置。
掌握广域网链路通信质量测试方式。
2、 理解PPP协商过程,PAP/CHAP认证过程,掌握PPP调试
3、 掌握PPPMultilink的配置及测试。
二、实验拓扑
三、实验内容
1、 基本信息配置
RT1
Router>enable
//进入全局模式
Router#configureterminal
//进入特权模式
Router(config)#hostnameRT1
//命名主机名
RT1(config)#noipdomainlookup
//禁用域名查找
RT1(config)#lineconsole0
//进入console线口
RT1(config-line)#loggingsynchronous
//自动换行
RT1(config-line)#nologin
//配置登陆不需要认证
RT1(config-line)#privilegelevel15
//配置console为最高权限
RT1(config-line)#exec-timeout0
//配置超时为0
RT1(config-line)#exit
//退出线口
RT1(config)#linevty04
//进入线口
RT1(config-line)#nologin
//配置登陆不需要认证
RT1(config-line)#privilegelevel15
//配置该线口为最高权限
RT1(config-line)#exit
//退出线口
RT3
Router>enable
Router#configureterminal
Router(config)#hostnameRT3
RT3(config)#noipdomainlookup
RT3(config)#lineconsole0
RT3(config-line)#loggingsynchronous
RT3(config-line)#nologin
RT3(config-line)#privilegelevel15
RT3(config-line)#exec-timeout0
RT3(config-line)#exit
RT3(config)#linevty04
RT3(config-line)#nologin
RT3(config-line)#privilegelevel15
RT3(config-line)#exit
2、 PPP基本配置
RT1(config)#interfaceserial0/0
//进入接口
RT1(config-if)#clockrate1000000
//配置DCE端时钟频率
RT1(config-if)#encapsulationppp
//配置数据链路层封装协议
RT1(config-if)#ipaddress10.10.13.1255.255.255.0
//配置ip地址
RT1(config-if)#noshutdown
//打开接口
RT1(config-if)#exit
//退出接口
RT3(config)#interfaceserial0/0
//进入接口
RT3(config-if)#encapsulationppp
//配置数据链路层封装协议
RT3(config-if)#ipaddress10.10.13.2255.255.255.0
//配置ip地址
RT3(config-if)#noshutdown
//打开接口
RT3(config-if)#exit
//退出接口
3、 RT1—RT3广域网链路通信质量测试
RT3#ping10.10.13.1size46repeat1000
//小包测试
Typeescapesequencetoabort.
Sending1000,46-byteICMPEchosto10.10.13.1,timeoutis2seconds:
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
Successrateis100percent(1000/1000),round-tripmin/avg/max=4/16/64ms
无丢包
RT3#ping10.10.13.1size8100repeat1000
//大包测试
Typeescapesequencetoabort.
Sending1000,8100-byteICMPEchosto10.10.13.1,timeoutis2seconds:
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
Successrateis100percent(1000/1000),round-tripmin/avg/max=16/67/148ms
无丢包
RT3#ping10.10.13.1size1500df-bitrepeat1000
//满MTU测试
Typeescapesequencetoabort.
Sending1000,1500-byteICMPEchosto10.10.13.1,timeoutis2seconds:
PacketsentwiththeDFbitset
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
Successrateis100percent(1000/1000),round-tripmin/avg/max=4/15/72ms
无丢包
4、 PPP自动获取IP地址调试
RT1(config)#iplocalpoolppp-ip-pool10.10.1.1110.10.1.200
//配置ip地址池
RT1(config)#interfaceserial0/0
//进入接口
RT1(config-if)#noipaddress
//清除上步配置的ip地址
RT1(config-if)#ipaddress10.10.1.1255.255.255.0
RT1(config-if)#peerdefaultipaddresspoolppp-ip-pool
//对端DTE缺失ip地址从此ip地址池获取
RT1(config-if)#pppipcpdns202.103.96.68
//配置DNS服务器
RT1(config-if)#exit
//退出接口
RT3(config)#interfaceserial0/0
//进入接口
RT3(config-if)#shutdown
//关闭接口
RT3(config-if)#noipaddress
//清除ip地址,此步是为了去掉ip地址后自动获取
RT3(config-if)#ipaddressnegotiated
//启用ip地址自动协商
RT3(config-if)#pppipcpdnsrequest
//启用DNS自动协商
RT3(config-if)#exit
//退出接口
5、 IPCP获取IP地址调试
//在RT3上打开debugpppnegotiation,然后将serial0/0打开,查看协商过程
RT3#debugpppnegotiation
//启用PPPip地址协商
PPPprotocolnegotiationdebuggingison
RT3#configureterminal
RT3(config)#interfaceserial0/0
RT3(config-if)#noshutdown
*Mar100:
46:
53.315:
Se0/0IPCP:
ICONFNAK[ACKsent]id2len16
*Mar100:
46:
53.315:
Se0/0IPCP:
Address10.10.1.11(0x03060A0A010B)
*Mar100:
46:
53.315:
Se0/0IPCP:
PrimaryDNS202.103.96.68(0x8106CA676044)
*Mar100:
46:
53.315:
Se0/0IPCP:
OCONFREQ[ACKsent]id3len16
*Mar100:
46:
53.315:
Se0/0IPCP:
Address10.10.1.11(0x03060A0A010B)
*Mar100:
46:
53.315:
Se0/0IPCP:
PrimaryDNS202.103.96.68(0x8106CA676044)
*Mar100:
46:
53.323:
Se0/0IPCP:
ICONFACK[ACKsent]id3len16
*Mar100:
46:
53
RT3(config-if)#.323:
Se0/0IPCP:
Address10.10.1.11(0x03060A0A010B)
*Mar100:
46:
53.323:
Se0/0IPCP:
PrimaryDNS202.103.96.68(0x8106CA676044)
*Mar100:
46:
53.323:
Se0/0IPCP:
StateisOpen
*Mar100:
46:
53.323:
Se0/0IPCP:
InstallnegotiatedIPinterfaceaddress10.10.1.11
*Mar100:
46:
53.335:
Se0/0IPCP:
Installrouteto10.10.1.1
*Mar100:
46:
53.351:
Se0/0IPCP:
Addlinkinfoforcefentry10.10.1.1
*Mar100:
46:
54.255:
%LINEPROTO-5-UPDOWN:
LineprotocolonInterfaceSerial0/0,changedstatetoup
RT3#undebugall
//关闭调试
PortStatisticsforunclassifiedpacketsisnotturnedon.
Allpossibledebugginghasbeenturnedoff
RT3#showipinterfacebrief
//查看端口信息
InterfaceIP-AddressOK?
MethodStatusProtocol
Serial0/010.10.1.11YESIPCPupup
6、 PPPPAP单向认证调试
本步目的:
PPPPAP单向认证成功,RT1、RT3相连接口UP
(1) 认证方配置
RT1(config)#usernameuserapasswordpassa
//配置用户数据库
RT1(config)#interfaceserial0/0
//进入接口
RT1(config-if)#noipaddress
//清除ip地址
RT1(config-if)#nopeerdefaultipaddress
//关闭ip地址自动获取
RT1(config-if)#nopppipcpdns
//关闭DNS自动获取
RT1(config-if)#ipaddress10.10.12.1255.255.255.252
RT1(config-if)#pppauthenticationpap
//启用PAP认证
(2) 被认证方配置
RT3(config)#interfaceserial0/0
//进入接口
RT3(config-if)#shutdown
//关闭端口
RT3(config-if)#noipaddressnegotiated
//关闭ip地址自动协商
RT3(config-if)#nopppipcpdns
//关闭DNS自动获取
RT3(config-if)#ipaddress10.10.12.2255.255.255.252
RT3(config-if)#ppppapsent-usernameuserapasswordpassa
//配置PAP用于认证的用户名和密码
(3) PAP单向认证调试
//在RT1上打开debugpppauthentication,将RT3的serial0/0打开,查看调试信息
RT1#debugpppauthentication
//PPP认证调试
PPPauthenticationdebuggingison
RT3#debugpppauthentication
//PPP认证调试
PPPauthenticationdebuggingison
RT3#configureterminal
RT3(config)#interfaceserial0/0
RT3(config-if)#noshutdown
*Mar101:
15:
51.523:
%LINK-3-UPDOWN:
InterfaceSerial0/0,changedstatetoup
*Mar101:
15:
51.527:
Se0/0PPP:
Usingdefaultcalldirection
*Mar101:
15:
51.531:
Se0/0PPP:
Treatingconnectionasadedicatedline
*Mar101:
15:
51.531:
Se0/0PPP:
Sessionhandle[E3000003]Sessionid[4]
*Mar101:
15:
51.535:
Se0/0PPP:
Authorizationrequired
*Mar101:
15:
51.603:
Se0/0PPP:
Noauthorizationwithoutauthentication
*Mar101:
15:
51.607:
Se0/0PAP:
UsinghostnamefrominterfacePAP
*Mar101:
15:
51.607:
Se0/0PAP:
UsingpasswordfrominterfacePAP
*Mar101:
15:
51.611:
Se0/0PAP:
OAUTH-REQid1len16from"usera"
*Mar101:
15:
51.671:
Se0/0PAP:
IAUTH-ACKid1len5
*Mar101:
15:
52.675:
%LINEPROTO-5-UPDOWN:
LineprotocolonInterfaceSerial0/0,changedstatetoup
RT1#undebugall
RT3#undebugall
(4) 过程分析:
由被认证方发起,RT3将自己的用户名(usera)和密码(passa)发送给认证方RT1,RT1收到后,查用户数据库,发现数据库中有对应条目回复认证通
7、 PPPCHAP单向认证
(1)认证方配置
RT1(config)#nousernameusera
//清除上步的用户数据库
RT1(config)#interfaceserial0/0
//进入接口
RT1(config-if)#nopppauthentication
//关闭PPP调试
RT1(config-if)#exit
//退出接口
RT1(config)#usernameuserapasswordpassa
//配置用户数据库
RT1(config)#interfaceserial0/0
//进入接口
RT1(config-if)#pppauthenticationchap
//启用CHAP认证
(2)被认证方配置
RT3(config)#interfaceserial0/0
//进入接口
RT3(config-if)#shutdown
//关闭端口
RT3(config-if)#noppppapsent-username
//清除上步PAP认证用户名
RT3(config-if)#pppchaphostnameusera
//配置CHAP认证默认用户名,用于发送给主认证方的
RT3(config-if)#pppchappasswordpassa
//配置默认密码
(3)CHAP单向认证调试
RT1#debugpppauthentication
//PPP认证调试
PPPauthenticationdebuggingison
RT3#debugpppauthentication
//PPP认证调试
PPPauthenticationdebuggingison
RT3(config)#interfaceserial0/0
//进入接口
RT3(config-if)#noshutdown
//打开接口
*Mar101:
51:
55.887:
%LINK-3-UPDOWN:
InterfaceSerial0/0,changedstatetoup
*Mar101:
51:
55.891:
Se0/0PPP:
Usingdefaultcalldirection
*Mar101:
51:
55.895:
Se0/0PPP:
Treatingconnectionasadedicatedline
*Mar101:
51:
55.895:
Se0/0PPP:
Sessionhandle[B9000004]Sessionid[5]
*Mar101:
51:
55.899:
Se0/0PPP:
Authorizationrequired
*Mar101:
51:
55.963:
Se0/0PPP:
Noauthorizationwithoutauthentication
*Mar101:
51:
55.975:
Se0/0CHAP:
ICHALLENGEid1len24from"RT1"
*Mar101:
51:
55.983:
Se0/0CHAP:
UsinghostnamefrominterfaceCHAP
*Mar101:
51:
55.987:
Se0/0CHAP:
UsingpasswordfrominterfaceCHAP
*Mar101:
51:
55.987:
Se0/0CHAP:
ORESPONSEid1len26from"usera"
*Mar101:
51:
56.027:
Se0/0CHAP:
ISUCCESSid1len4
*Mar101:
51:
57.031:
%LINEPROTO-5-UPDOWN:
LineprotocolonInterfaceSerial0/0,changedstatetoup
RT1#showipinterfacebrief
InterfaceIP-AddressOK?
MethodStatusProtocol
Serial0/010.10.12.1YESmanualupup
RT3#showipinterfacebrief
InterfaceIP-AddressOK?
MethodStatusProtocol
Serial0/010.10.12.2YESmanualupup
RT1#undebugall
RT3#undebugall
(4)、认证过程分析
由认证方发起认证,认证方RT1发送挑战信息,挑战信息包括:
01,ID,随机数,用户名RT1
被认证方RT3收到挑战信息后,根据收到的用户名查找用户数据库,发现没有对应项,使用默认密码,RT3根据ID,随机数,和密码用MD5算法生成hash值,然后回复RT1,回复信息包括:
02,ID,HASH值,用户名usera
RT1收到回复信息后,根据RT3发过来的用户名,查找用户数据库,根据ID,保存的随机数,和查找到的密码,经过MD5算法生成HASH值,与RT3发过来的HASH值比较,相同,RT1回复认证通过
8、PPPPAP双向认证调试
(1)RT1
RT1(config)#nousernameusera
//清除上不用户数据库
RT1(config)#interfaceserial0/0
//进入接口
RT1(config-if)#nopppauthentication
//关闭PPP调试
RT1(config-if)#exit
//退出接口
RT1(config)#usernameuserapasswordpassa
//配置用户数据库
RT1(config)#interfaceserial0/0
//进入接口
RT1(config-if)#pppauthenticationpap
//启用PAP认证
RT1(config-if)#ppppapsent-usernameuserbpasswordpassb
//配置用于认证的用户名和密码
(2)RT3
RT3(config)#interfaceserial0/0
//进入接口
RT3(config-if)#shutdown
//关闭接口
RT3(config-if)#nopppchaphostname
//清除上步CHAP默认主机名
RT3(config-if)#nopppchappassword
//清除上步CHAP默认密码
RT3(config-if)#exit
//退出接口
RT3(config)#usernameuserbpasswordpassb
//配置用户数据库
RT3(config)#interfaceserial0/0
//进入接口
RT3(config-if)#pppauthenticationpap
//启用PAP认证
RT3(config-if)#ppppapsent-usernameuserapasswordpassa
//配置用于认证的用户名和密码
(3)PAP双向认证调试
RT1#debugpppauthentication
//启用PPP调试
PPPauthenticationdebuggingiso