PPP Protokol
PPP Protokol
PPP Protokol
Contents
1. Overview of PPP 2. SLIP - Serial Line IP 3. PPP protocol features 4. PPP Protocol Stack 5. PPP framing 6. LCP and NCP 7. Typical PPP session 8. PPP authentication
indigoo.com
PPP
1 Rev. 2.50
indigoo.com
Layer2 protocols run on lines (serial, dial-up) that do not provide a framing (raw bit pipes). PPP is a collection of protocols; each of these protocols provides a specific function. Client (initiator) Server (responder)
IP IP IP IP
Exchange of IP packets
IP
NCP
Authentication of user Tell me who you are I am user@domain.com+password Link (layer 2) establishment and option negotiation I want compression ok
LCP
LCP
HDLC
HH
Payload
HT
HH
Payload
HT
HH
Payload
HT
HDLC
Phy
indigoo.com
SLIP was used as framing protocol over serial lines before the advent of PPP. SLIP framing: Frame delimiter: The byte 0xC0 serves as frame delimiter. Transparency: 0xDB, 0xDC is used as escape sequence for 0xC0 in payload: 0xC0 in payload becomes 0xDB 0xDC in SLIP frame. 0xDB in payload becomes 0xDB 0xDD in SLIP frame. SLIP has some deficiencies: 1. SLIP does not have error detection mechanism (left to TCP to detect and recover from errors on the transmission line). 2. SLIP only supports IP (no other layer 3 protocols). 3. SLIP does not provide dynamic IP address assignment. 4. SLIP does not provide authentication. PPP was devised in order to overcome the deficiencies of SLIP.
3 Rev. 2.50
indigoo.com
PPP is not a single protocol but a protocol suite and consists of: 1. Framing method (frame/packet delineation): Serial lines provide bit transport, thus a means for finding the start of packets is required. 2. Link control protocol (LCP): LCP is used for establishing a data link including options for the operation. 3. Network control protocol (NCP): Each network protocol, e.g. IP, has its own NCP for establishing and configuring the network-layer operation. 4. Authentication protocols (CHAP, PAP, EAP): Client (and optional server) authentication make sure the right communication partners talk to each other. 5. Encryption protocols (ECP, DES, AES etc.) for privacy. 6. Bandwidth control (BACP): Bonding of multiple channels (Multilink PPP-MLPPP) to provide more bandwidth. 7. Compression control (CCP). Serial lines are usually comparably slow. Compression provides more throughput. PPP affords error detection (checksum). PPP allows to dynamically assign an IP address (NCP). PPP provides authentication (PAP / CHAP) PPP is a symmetric protocol: the 2 parties in a PPP session are the initiator (I, usually client) and the responder (R, usually server).
Peter R. Egli 2013 4 Rev. 2.50
indigoo.com
BAP/BACP LQR / LQM
LCP CCP Compression Control Protocol: Negotiation and control of compression HDLC-like framing on both ends of link. IPCP IP Control Protocol (is a NCP Network Control Protocol): Establishment of IP on both ends of point-to-point link (mainly assignment of IP address, default gateway and DNS server from responder to initiator). BCP Bridging Control Protocol: Establishment of bridging modules on both ends of point-to-point link (similar to IPCP, but instead of routing initializes bridging). BAP/BACP Bandwidth Allocation (Control) Protocol: BAP/BACP can be used to add/remove individual links in a multi-link bundle (MultiLink PPP). ECP Encryption Control Protocol: Configuring and enabling of encryption on both ends of the link. CHAP CHallenge Authentication Protocol: Description see below. PAP Password Authentication Protocol: Description see below. EAP Extensible Authentication Protocol: Protocol supporting a range of authentication algorithms/protocols LCP Link Control Protocol: Negotiation and control of link parameters on both ends (MRU Max. Receive Unit, header compression, encapsulation). LQR Link Quality Report: Monitoring of link quality.
Peter R. Egli 2013 5 Rev. 2.50
indigoo.com
1 Flag=0x7E
PPP framing is character oriented (frame always integral number of bytes (byte stuffing).
The field address is fixed = 11111111b which means that all stations are to accept the frame.
Control = 00000011b which means that the frame is unnumbered (PPP does provide error detection, but no error correction; reliable transmission with PPP is set forth in RFC1663).
The protocol field identifies the Layer 3 protocol contained in the payload (values see IANA assigned numbers). The payload is variable length (default 1500 bytes). The checksum is either a 2 byte CRC16 (default) or 4 byte CRC32 (frame > 4kB).
6 Rev. 2.50
indigoo.com
7 Rev. 2.50
indigoo.com
LCP PPP LCP Configuration Request LCP PPP LCP Configuration Request LCP PPP LCP Configuration Ack LCP PPP LCP Configuration Reject LCP PPP LCP Configuration Request LCP PPP LCP Configuration Ack LCP PPP LCP Identification LCP PPP LCP Identification CHAP PPP CHAP Challenge CHAP PPP CHAP Response CHAP PPP CHAP Success CCP PPP CCP Configuration Request IPCP PPP IPCP Configuration Request IPCP PPP IPCP Configuration Request IPCP PPP IPCP Configuration Ack IPCP PPP IPCP Configuration Request IPCP PPP IPCP Configuration Nak IPCP PPP IPCP Configuration Request IPCP PPP IPCP Configuration Ack LCP LCP LCP LCP PPP PPP PPP PPP LCP LCP LCP LCP Echo Request Echo Reply Echo Request Termination Ack
indigoo.com
PAP and CHAP are used for Authentication with PPP (is the one I am talking to the one he pretends to be?).
PAP RFC1661 Password Authentication Protocol: * PAP simply sends a username and password (cleartext) to the remote computer. * Thus PAP is considered insecure. * PAP is symmetric and does not allow asymmetric settings with an authenticator and a peer (authenticator authenticates peer). CHAP RFC1994 Challenge Handshake Authentication Protocol: * With CHAP an authenticator (usually server) authenticates a peer (usually client); thus CHAP is asymmetric. * CHAP procedure: 1. Authenticator computes random value (=challenge) 2. Authenticator sends challenge (random value to foil replay attacks) to peer. 3. Peer computes a hash (MD5) value on identifier (username), secret (password) and challenge. 4. Peer sends hash value to authenticator. 5. Authenticator performs the same calculation and checks if the result is ok. * CHAP trace see PPP trace above.
9 Rev. 2.50