Point-to-Point Protocol 是一种点到点链路层协议,主要用于在全双工的同异步链路上进行点到点的数据传输。
对物理层而言,PPP既支持同步链路又支持异步链路,而X.25、FR(Frame Relay)等数据链路层协议仅支持同步链路,SLIP仅支持异步链路。
PPP协议具有良好的扩展性,PPPoE。
提供LCP(Link Control Protocol)协议,用于各种链路层参数的协商。
提供各种NCP(Network Control Protocol)协议(如IPCP、IPXCP),用于各网络层参数的协商,更好地支持了网络层协议。
提供认证协议CHAP(Challenge-Handshake Authentication Protocol)、PAP(Password Authentication Protocol),更好的保证了网络的安全性。
无重传机制,网络开销小,速度快。
过程
建立ppp链路;进行LCP协商;进入认证,1.认证失败,拆链路,LCP转为down,2无认证或认证成功;进行NCP协商,之后就一直通信到结束归零
支持PPP的物理接口包括:
-
同/异步串口工作在同步方式形成的同步串口,其接口名称为Serial。
-
工作在协议模式的Async接口。
-
CE1/PRI接口和CT1/PRI接口形成的接口(包括ISDN PRI接口),其接口名称为Serial,逻辑特性与同步串口相同。
-
CE3接口形成的接口,其接口名称为Serial,逻辑特性与同步串口相同。
-
E1-F接口和T1-F接口形成的接口,其接口名称为Serial,逻辑特性与同步串口相同。
-
CPOS接口下的E1/T1通道形成的接口,其接口名称为Serial,逻辑特性与同步串口相同。
-
Cellular接口。
-
ISDN BRI接口。
-
POS接口。
验证方式
PAP
2次握手
CHAP
三次握手,有用户名密码,无用户名密码
R1为主,给对端P2发ip
PAP单向本地认证
R1
interface Pos2/0/0
link-protocol ppp
ip address 10.1.12.1 255.255.255.0
aaa
authentication-scheme PPP
authentication-mode local
domain ppp
authentication-scheme PPP
local-user admin password cipher huawei123
local-user admin service-type ppp
local-user admin privilege level 0
interface Pos2/0/0
ppp authentication-mode pap domain PPP
sh
un sh
interface Pos2/0/0
link-protocol ppp
ppp pap local-user admin password cipher huawei123
ip address 10.1.12.2 255.255.255.0
sh
un sh
R1 pos 2/0/0 抓包
PAP双向本地认证
R1,R2配置aaa本地认证,域名,ppp用户名及密码;
双方接口下认证方式PAP,认证域,翻动接口
interface Pos2/0/0
ppp authentication-mode pap domain PPP
ppp pap local-user admin password cipher huawei123
sh
un sh
CHAP单向本地认证
R1为验证方,R2为被验证方
R1配置配置aaa本地认证,域名,ppp用户名及密码;
接口认证方式改为CHAP即可
R1
interface Pos2/0/0
ppp authentication-mode chap domain PPP
sh
un sh
R2
int pos 2/0/0
link-protocol ppp
ppp chap user admin
ppp chap password chiper huawei123