Professional Documents
Culture Documents
w2 05 Point To Point Protocol (PPP)
w2 05 Point To Point Protocol (PPP)
Today, millions of Internet users need to connect their home computer to the
computers of an Internet provider to access the Internet. There are also a lot
of individuals who need to connect to a computer from home, but they do not
want to go through the Internet. The majority of these users have either a
dialup or leased telephone line. The telephone line provides a physical link,
but to control and manage the transfer of data, there is a need for a point-to-
point link protocol. Figure-1 shows a physical point-to-point connection.
The first protocol devised for this purpose was Serial Line Internet Protocol
(SLIP). However, SLIP has some deficiencies: it does not support protocols
other than Internet Protocol (IP), it does not allow the IP addresses to be
assigned dynamically, and it does not support authentication of the user. The
Point-to-Point Protocol (PPP) is a protocol designed to respond to respond
to these deficiencies.
TRANSITION STATES
The different phase through which a PPP connection goes can be described
using a transition state diagram as shown in Figure-2
Idle state. The idle state means that the link is not being used. There is
no active carrier and the line is quiet.
Establishing state. When one of the end points starts the
communication, the connection goes into the establishing state. In
this state, options are negotiated between the two parties. If the
negotiation is successful, the system goes to the authenticating state (if
authentication is required) or directly to the networking state. The LCP
packets, discussed shortly, are used for this purpose. Several packets
may be exchanged during this state.
BRBRAITT : Nov-2006 2
“DATA NETWORKS” FOR JTOs PH-II - Point-to-Point Protocol (PPP)
Detect carrier
Idle
Terminating
(link) Fail Success
Authenticatin
g
Finish
Networking (exchanging Success
user data and control)
PPP LAYERS
Figure-3 shows the PPP layers. PPP has only physical and link layers. This
means that a protocol that wants to use the services of PPP should have
other layers (network, transport, and so on).
BRBRAITT : Nov-2006 3
“DATA NETWORKS” FOR JTOs PH-II - Point-to-Point Protocol (PPP)
Physical Layer
No specific protocol is denied for the physical layer in PPP. Instead, it is left to
the implementer to use whatever is available. PPP supports any of the
protocols recognized by ANSI.
ANSI standards
Physical
At the data link layer, PPP employs a version of HDLC. Figure-4 shows the
format of a PPP frame.
11111111 11000000
Flag field. The flag field, like the one in HDLC, identifies the
boundaries of a PPP frame. Its value is 01111110.
Address field. Because PPP is used for a point-to-point connection, it
uses the broadcast address of HDLC, 11111111, to avoid a data link
address in the protocol.
BRBRAITT : Nov-2006 4
“DATA NETWORKS” FOR JTOs PH-II - Point-to-Point Protocol (PPP)
Control field. The control field uses the format of the format of the U-
frame in HDLC. The value is 11000000 to show that the frame does not
contain any sequence number and that there is no flow and error
control.
Protocol field. The protocol field defines what is being carried in the
data field: user data or other information. We will discuss this field in
detail shortly.
Data field. This field carries either the user data or other information
that we will discuss shortly.
FCS. The frame check sequence field, as in HDLC, is simply a two-
byte or four-byte CRC.
All LCP packets are carried in the payload field of the PPP frame. What
defines the frame as one carrying an LCP packet is the value of the protocol
field, which should be set to C02116. Figure-5 shows the format of the LCP
packet.
Payload
Flag Address Control Protocol FCS Flag
(and padding )
C02116
Code. The field defines the type of LCP packet. We will discuss these
packets and their purpose in the next section.
ID. This field holds a value used to match a request with the reply. One
end point inserts a value in this field, which will be copied in the reply
packet.
BRBRAITT : Nov-2006 5
“DATA NETWORKS” FOR JTOs PH-II - Point-to-Point Protocol (PPP)
Length. This field define the length of the whole LCP packet.
Information. This field contains extra information needed for some
LCP packets.
LCP Packets
Configuration Packets
BRBRAITT : Nov-2006 6
“DATA NETWORKS” FOR JTOs PH-II - Point-to-Point Protocol (PPP)
The link termination packets are used to disconnect the link between two end
points.
Terminate-request. Either party can terminate the link by sending a
terminate-request packet.
Terminate-ack. The party that receives the terminate-request packet
should answer with a terminate-ack packet.
These packets are used for monitoring and debugging the link.
Options
There are many options that can be negotiated between the two end points.
Options are inserted in the information field of the configuration packets. We
list some of the most common options in Table-2
Option Default
Maximum receive unit 1500
Authentication protocol None
Protocol field compression Off
Address and control field compression Off
AUTHENTICATION
BRBRAITT : Nov-2006 7
“DATA NETWORKS” FOR JTOs PH-II - Point-to-Point Protocol (PPP)
PAP
Figure-6 PAP
User System
Point-to-point physical link
Authenticate-request packet
User name and password
Accept or reject
PAP Packets
BRBRAITT : Nov-2006 8
“DATA NETWORKS” FOR JTOs PH-II - Point-to-Point Protocol (PPP)
PAP Packets
Payload
Flag Address Control Protocol FCS Flag
(and padding )
C023
C0231616
CHAP
BRBRAITT : Nov-2006 9
“DATA NETWORKS” FOR JTOs PH-II - Point-to-Point Protocol (PPP)
Figure-8 CHAP
User System
Point-to-point physical link
Challenge packet
Challenge value
Response packet
Response and name
Success or failure packet
Accept or reject
CHAP Packets
After the link has been established and authentication (if any) has been
successful, the connection goes to the networking state. In this state, PPP
uses another protocol called Network Control Protocol (NCP). NCP is a set
of control protocols to allow the encapsulation of data coming from network
layer protocols (such as IP, IPX, and AppleTalk) in the PPP frame.
BRBRAITT : Nov-2006 10
“DATA NETWORKS” FOR JTOs PH-II - Point-to-Point Protocol (PPP)
CHAP Packets
Challenge Name
Challenge Code=1 ID Length
length
Challenge value
Response Name
Response Code=2 ID Length
length
Response value
Payload
Flag Address Control Protocol FCS Flag
(and padding )
C223
C0231616
IPCP
The set of packets that establish and terminate a network layer connection for
IP packets is called Internetwork Protocol Control Protocol (IPCP). The format
of an IPCP packet is shown in Figure-10. Note that the value of the protocol
field, 802116, defines the packet encapsulated in the protocol as an IPCP
packet.
Payload
Flag Address Control Protocol FCS Flag
(and padding )
80216
BRBRAITT : Nov-2006 11
“DATA NETWORKS” FOR JTOs PH-II - Point-to-Point Protocol (PPP)
Seven packets are defined for the IPCP protocol, distinguished by their code
values as shown in Table-3
A party uses the configure-request packet to negotiate options with the other
party and to set the IP addresses, and so on.
After configuration, the link is ready to carry IP protocol data in the payload
field of a PPP frame. This time, the value of the protocol field is 0021 16 to
show that the IP data packet, not the IPCP packet, is being carried across the
link.
After IP has sent all of its packets the IPCP can take control and use the
terminate-request and terminate-ack packets to end the network connection.
Other Protocols
Note the other protocols have their own set of control packets defined by the
value of the protocol field in the PPP frame.
AN EXAMPLE
Let us given an example of the states through which a PPP connection goes
to deliver some network layer packets. Figure-11 shows the steps:
BRBRAITT : Nov-2006 12
“DATA NETWORKS” FOR JTOs PH-II - Point-to-Point Protocol (PPP)
Figure-11 An example
User System
Establishing
Configure-request
Establishing
Authenticating
Configure-ack State
Authenticate-request
Authenticating
Authenticate-ack
State
Networking
Configure-request
Networking
Configure-ack State
User data
Networking
State
User data
Terminating-request
Terminating
Networking
Terminating-ack State
Terminating-request Terminating
Terminating-ack State
BRBRAITT : Nov-2006 13