##
PPP & Serial
Point-to-Point Protocol — the Layer-2 encapsulation for serial / dial links. LCP brings the link up, optional PAP/CHAP authenticates, then an NCP (IPCP) configures Layer 3.
// connection phases
Link Dead
→ Establish
LCP
→ LCP
Authenticate
PAP / CHAP
→ PAP / CHAP
Network
NCP / IPCP
→ NCP / IPCP
Open
→ Terminate
LCP
LCP
Authentication failure → straight to Terminate. Termination returns the link to Link Dead.
// PPP frame
Flag
1 B · 0x7E
Address
1 B · 0xFF
Control
1 B · 0x03
Protocol
2 B · —
Information
var B · —
FCS
2 / 4 B · —
Protocol identifies the payload (LCP, IPCP, IP…). Address/Control are fixed (0xFF / 0x03). FCS is the CRC.
// LCP header
Code
1 B
Identifier
1 B
Length
2 B
Data
var B
// connection example (CHAP)
R1R2
LCP — establish
Configure-Request
▶
Configure-Ack
◀
CHAP — authenticate
Challenge
◀
Response (MD5 hash)
▶
Success
◀
IPCP — network layer
Configure-Request / Ack
▶
IP addresses assigned — link Open
username R2 password S3cret
!
interface Serial0/0
encapsulation ppp
ppp authentication chap
ip address negotiated
compress stac
ppp multilink group 1 show interfaces serial0/0
show ppp multilink
debug ppp negotiation
debug ppp authentication