~/netref / PPP & Serial
##

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
Authenticate
PAP / CHAP
Network
NCP / IPCP
Open
Terminate
LCP
Authentication failure → straight to Terminate. Termination returns the link to Link Dead.
1Link DeadPhysical layer down; carrier detect triggers establishment
2Link EstablishmentLCP negotiates options (MRU, auth method, magic number)
3AuthenticationOptional — PAP or CHAP must succeed to continue
4Network-LayerNCP (e.g. IPCP) configures L3 and assigns addresses
5Link TerminationLCP closes the link → returns 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
// LCP codes
1Configure-Request
2Configure-Ack
3Configure-Nak
4Configure-Reject
5Terminate-Request
6Terminate-Ack
7Code-Reject
8Protocol-Reject
9Echo-Request
10Echo-Reply
11Discard-Request
// protocol field values
0xC021LCP
0xC023PAP
0xC223CHAP
0x8021IPCP
0x0021IPv4
0x8057IPv6CP
0x0057IPv6
// authentication — PAP vs CHAP
PAPCHAP
Method2-way handshake3-way challenge
SecretSent in cleartextNever sent — MD5 hash of challenge + secret
WhenOnce at link-upLink-up + periodic re-challenge
PPP protocol0xC0230xC223

// 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
ppp + chap · cisco ios
username R2 password S3cret
!
interface Serial0/0
 encapsulation ppp
 ppp authentication chap
 ip address negotiated
 compress stac
 ppp multilink group 1
verify & troubleshoot
show interfaces serial0/0
show ppp multilink
debug ppp negotiation
debug ppp authentication