introduction to ppp

23
Introduction Introduction to to Point-to-Point Protocol Point-to-Point Protocol (PPP) (PPP) Frank Fang Kuo Yu Frank Fang Kuo Yu 10/12/2006 10/12/2006

Upload: frank-fang-kuo-yu

Post on 17-Jun-2015

239 views

Category:

Technology


2 download

DESCRIPTION

Course Material in 2006

TRANSCRIPT

Page 1: Introduction to PPP

IntroductionIntroductiontoto

Point-to-Point ProtocolPoint-to-Point Protocol(PPP)(PPP)

Frank Fang Kuo YuFrank Fang Kuo Yu

10/12/200610/12/2006

Page 2: Introduction to PPP

AgendaAgenda PPP in Wired PC-to-PC Dial-up ProcessPPP in Wired PC-to-PC Dial-up Process

Modem, AT Command, PPP OverviewModem, AT Command, PPP Overview

PPP in Wireless Internet AccessPPP in Wireless Internet Access WAP over CSD, WAP over GPRS, Phone as WAP over CSD, WAP over GPRS, Phone as

ModemModem

PPP IllustratedPPP Illustrated Packet Format, LCP, PAP, CHAP, IPCPPacket Format, LCP, PAP, CHAP, IPCP

Protocol Analysis in EtherealProtocol Analysis in Ethereal SI2 MMS ~ HTTP-TCP-IP-PPP-CSDSI2 MMS ~ HTTP-TCP-IP-PPP-CSD

Page 3: Introduction to PPP

Wired PC-to-PC Dial-Up ProcessWired PC-to-PC Dial-Up Process

`

PC

modem modem

PC

dial-out dial-in

`

Modem = modulation + demodulationModem = modulation + demodulation

AT Commands for Modem ControlAT Commands for Modem Control

Control Mode and Data ModeControl Mode and Data Mode

Protocol Stack in Data ModeProtocol Stack in Data Mode

Page 4: Introduction to PPP

Modem and Modem ControlModem and Modem Control Modem = modulation + demodulationModem = modulation + demodulation

Perform the conversion of Perform the conversion of digitaldigital signals into an signals into an analoganalog form form suitable for transmission over ordinary telephone linessuitable for transmission over ordinary telephone lines

Automatic Detection and Negotiation of Different Carrier Rates and Automatic Detection and Negotiation of Different Carrier Rates and Modulation MethodsModulation Methods

– e.g., V.90, K56Flex, USR X2, V.34, V.FC, V.32bis, V.32, …e.g., V.90, K56Flex, USR X2, V.34, V.FC, V.32bis, V.32, … Error Detection and CorrectionError Detection and Correction

– e.g., V.42, LAPM, MNP4e.g., V.42, LAPM, MNP4 Data CompressionData Compression

– e.g., V.42bis, MNP5e.g., V.42bis, MNP5

AT CommandsAT Commands

Control modem’s operation and configurationControl modem’s operation and configuration

Page 5: Introduction to PPP

Command Mode and Data ModeCommand Mode and Data Mode

Command ModeCommand Mode PC sidePC side

– Issues AT commandsIssues AT commands– Handles responses of AT commandsHandles responses of AT commands– Monitors unsolicited result codes Monitors unsolicited result codes

modem sidemodem side– AT Command InterpreterAT Command Interpreter

Data ModeData Mode PPP uses a collection of protocols to establish and configure a PPP uses a collection of protocols to establish and configure a

point-to-point link, and to transport packets over the link.point-to-point link, and to transport packets over the link.

Switching between Command Mode and Data ModeSwitching between Command Mode and Data Mode

Page 6: Introduction to PPP

Protocol Stack in Data ModeProtocol Stack in Data Mode

`

PC

modem modem

PC

dial-out dial-in

IPPPP

TCP / UDPIP

PPP

TCP / UDP

`

1. A method for encapsulating datagrams;

2. Link Control Protocol (LCP) for establishing, configuring, and testing the data-link connection;

3. Optionally Password Authentication Protocol (PAP) or Challenge-Handshake Authentication Protocol (CHAP) which is used for authentication;

4. Internet Protocol Control Protocol (IPCP) for establishing and configuring the Internet Protocol over PPP;

Page 7: Introduction to PPP

WAP over GSM CSDWAP over GSM CSD

Page 8: Introduction to PPP

WAP over GPRSWAP over GPRS

Page 9: Introduction to PPP

PPP in Terminal EquipmentPPP in Terminal Equipment

Page 10: Introduction to PPP

TE/MT Separation Case 1TE/MT Separation Case 1Data Transfer in “IP” Based ServiceData Transfer in “IP” Based Service

Page 11: Introduction to PPP

TE/MT Separation Case 2TE/MT Separation Case 2Data Transfer in “PPP” Based ServiceData Transfer in “PPP” Based Service

Page 12: Introduction to PPP

The Roles of PPP in Mobile The Roles of PPP in Mobile PhonePhone

Case 1 ~ For “browser on phone”Case 1 ~ For “browser on phone” WAP over CSD ~ PPP is used for Dial-OutWAP over CSD ~ PPP is used for Dial-Out

Case 2 ~ For “phone as modem”Case 2 ~ For “phone as modem” IP Based Service ~ PPP is used for Dial-InIP Based Service ~ PPP is used for Dial-In

Page 13: Introduction to PPP

The Architecture of PPP in Mobile The Architecture of PPP in Mobile PhonePhone

PPPDial-Out

IP

TCP / UDP

SNDCPPPP

Dial-In

CSD

1.1. WAP over CSDWAP over CSD~ IP ~ IP PPP Dial-Out PPP Dial-Out CSD CSD

2.2. WAP over GPRSWAP over GPRS~ IP ~ IP SNDCP SNDCP

3.3. Modem RouteModem Route~ PPP Dial-In ~ PPP Dial-In SNDCP SNDCP

11 22 33

Question: Can 2 and 3 coexist?Question: Can 2 and 3 coexist?

Question: Can 1 and 3 coexist?Question: Can 1 and 3 coexist?

Hint: Does the handset support Hint: Does the handset support multiple PDP contexts?multiple PDP contexts?

Hint: Class B Mode of Operation:Hint: Class B Mode of Operation:the MS is attached to the MS is attached to bothboth GPRS GPRSand other GSM services, but the and other GSM services, but the MS can MS can onlyonly operate operate oneone set of set of services at a time.services at a time.

Page 14: Introduction to PPP

Protocol Stack in Data Mode Protocol Stack in Data Mode (revisited)(revisited)

`

PC

modem modem

PC

dial-out dial-in

IPPPP

TCP / UDPIP

PPP

TCP / UDP

`

1. A method for encapsulating datagrams;

2. Link Control Protocol (LCP) for establishing, configuring, and testing the data-link connection;

3. Optionally Password Authentication Protocol (PAP) or Challenge-Handshake Authentication Protocol (CHAP) which is used for authentication;

4. Internet Protocol Control Protocol (IPCP) for establishing and configuring the Internet Protocol over PPP;

Page 15: Introduction to PPP

Format of PPP FrameFormat of PPP Frame

• FlagFlag 0x7E0x7E the escape of 0x7E in data ~ (0x7D, 0x5E)the escape of 0x7E in data ~ (0x7D, 0x5E)the escape of 0x7D in data ~ the escape of 0x7D in data ~

(0x7D, 0x5D)(0x7D, 0x5D)the escape of control characterthe escape of control character

• AddressAddress 0xFF0xFF omitted if LCP/ACFC is negotiatedomitted if LCP/ACFC is negotiated

• ControlControl 0x030x03 omitted if LCP/ACFC is negotiatedomitted if LCP/ACFC is negotiated

• ProtocolProtocol 0x00210x0021 IP in “information field”IP in “information field”0x80210x8021 IPCP in “information field”IPCP in “information field”0xC0210xC021 LCP in “information field”LCP in “information field”0xC0230xC023 PAP in “information field”PAP in “information field”0xC2230xC223 CHAP in “information field”CHAP in “information field”

Page 16: Introduction to PPP

PPP Connection EstablishmentPPP Connection Establishment

http://www.tcpipguide.com/free/t_PPPLinkSetupandPhases.htmhttp://www.tcpipguide.com/free/t_PPPLinkSetupandPhases.htm

Page 17: Introduction to PPP

LCP Message ExchangesLCP Message Exchanges

LCP Configuration OptionsLCP Configuration Options

• Maximum-Receive-Unit (MRU)Maximum-Receive-Unit (MRU)

• Async-Control-Character-Map (ACCM)Async-Control-Character-Map (ACCM)

• Authentication-ProtocolAuthentication-Protocol - C023 PAP- C023 PAP - C223 CHAP- C223 CHAP - …- …

• Protocol-Field-Compression (PFC)Protocol-Field-Compression (PFC) - used to reduce the protocol field from 2 - used to reduce the protocol field from 2 bytesbytes to 1 byteto 1 byte

• Address-and-Control-Field-Compression Address-and-Control-Field-Compression (ACFC)(ACFC) - used to omit the address field (0xff) and - used to omit the address field (0xff) and thethe control field (0x03)control field (0x03) • … …

Page 18: Introduction to PPP

Password Authentication Protocol Password Authentication Protocol (PAP)(PAP)

Page 19: Introduction to PPP

Challenge-Handshake Authentication Protocol Challenge-Handshake Authentication Protocol (CHAP)(CHAP)

Page 20: Introduction to PPP

IPCP Message ExchangesIPCP Message Exchanges

IPCP Configuration IPCP Configuration OptionsOptions

• IP-Compression-ProtocolIP-Compression-Protocol

• IP-AddressIP-Address

• Primary DNS Server AddressPrimary DNS Server Address

• Secondary DNS Server AddressSecondary DNS Server Address

• … …

Page 21: Introduction to PPP

Protocol Analysis in EtherealProtocol Analysis in Ethereal

LCPLCP

PAPAPP

IPCPIPCP

Model:Model: XYZXYZApplication:Application: MMS sendingMMS sendingProtocol:Protocol: HTTP / TCP / IP / PPP / CSDHTTP / TCP / IP / PPP / CSDOperator:Operator: China MobileChina Mobile

Page 22: Introduction to PPP

ConclusionsConclusions PPP consists of three key components:PPP consists of three key components:

a method for encapsulating multi-protocol datagramsa method for encapsulating multi-protocol datagrams

a a Link Control Protocol (LCP)Link Control Protocol (LCP) for establishing, for establishing, configuring, and testing the data link connectionconfiguring, and testing the data link connection

a family of a family of Network Control Protocols (NCPs)Network Control Protocols (NCPs) for for establishing and configuring different network-layer establishing and configuring different network-layer protocolsprotocols

Roles of PPP in Mobile PhoneRoles of PPP in Mobile Phone

WAP over CSD ~ PPP Dial-OutWAP over CSD ~ PPP Dial-Out

Phone as Modem ~ PPP Dial-InPhone as Modem ~ PPP Dial-In

Protocol Analysis ~ SI2 MMS HTTP/TCP/IP/PPP/CSDProtocol Analysis ~ SI2 MMS HTTP/TCP/IP/PPP/CSD

Page 23: Introduction to PPP

ReferencesReferences W. Richard Stevens, W. Richard Stevens, ““TCP/IP Illustrated, Volume 1.”TCP/IP Illustrated, Volume 1.”

James D. Carlson, James D. Carlson, “PPP Design, Implementation and “PPP Design, Implementation and Debugging.”Debugging.”

Andrews Sun, Andrews Sun, “Using & Managing PPP.”“Using & Managing PPP.”

RFC SourcebookRFC Sourcebook ((http://www.networksorcery.com/enp/default0803.htm)http://www.networksorcery.com/enp/default0803.htm)

The TCP/IP GuideThe TCP/IP Guide ((http://www.tcpipguide.com/free/t_PointtoPointProtocolPPP.htm)http://www.tcpipguide.com/free/t_PointtoPointProtocolPPP.htm)