Documente Academic
Documente Profesional
Documente Cultură
DCCW
PPP-1
EE6364
Components of PPP
PPP consists of the following three main components:
A method 1 for encapsulating multi-protocol datagrams. PPP supports either
asynchronous link with 8 bits of data and no parity, or with bit-oriented
synchronous links.
A Link Control Protocol (LCP) for establishing, configuring, and testing the
data-link connection. This allows the two ends to negotiate various link layer
options.
A family of Network Control Protocols (NCPs) 2 for establishing and
configuring different network-layer protocols. This allows the two ends to
negotiate various network layer options.
DCCW
PPP-2
EE6364
PPP operation
The operation of PPP is as follows.
Before the two ends can start sending data packets, each end of the PPP link
must first send LCP packets to configure and test the data link. Once the link
has been established, the peer may be authenticated. Then, PPP must send
NCP packets to choose and configure one or more network-layer protocols.
Once each of the chosen network-layer protocols has been configured,
datagrams from each network-layer protocol can be sent over the link.
The link will remain configured for communications until explicit LCP or NCP
packets close the link down, or until some external event occurs (for example, an
inactivity timer expires or network administrator intervention).
In the process of configuring, maintaining and terminating the point-to-point link,
the PPP link goes through several distinct phases which are specified in the
following simplified state diagram:
Dead
Up
Opened
Establish
Fail
Terminate
Authenticate
Success
Fail
Closing
Network
The link begins with Link-Dead state. When the physical layer is ready for
communication (e.g., two analog modems are connected to each other), PPP will
proceed to the Link Establishment state. The LCP is used to establish the
connection through an exchange of Configure packets. When this is completed, it
enters the LCP OPENED state. Once the OPENED state is reached, the two
peers may Authenticate the other. If authentication is successful, each network
layer protocol must be configured separately by the appropriate NCP.
When these are done, the two ends can begin sending packets. PPP can
terminate the link any time. Either LCP or NCP can be used to close the link.
DCCW
PPP-3
EE6364
Addr
0xFF
Control
0x03
bytes
Information
Protocol
2
Up to 1500 (default)
Protocol
0x0021
Protocol
0xC021
bytes
DCCW
2 or 4
Code
ID
Protocol
0x8021
Code
ID
Length
2
Length
Flag
0x7E
FCS
Data (options)
LCP format
variable
Data (options)
NCP format
PPP-4
EE6364
Each PPP frame begins and ends with flag (0X7E) bytes. The beginning flag is
followed by an address byte and a control byte. Byte stuffing procedure is used
when any byte other than the flags is 0x7E. The Control Escape octet is defined
as binary 01111101 (hexadecimal 0x7d). The byte stuffing process is as follows:
After FCS computation, the transmitter examines the entire frame between the
two Flag Sequences. Each Flag Sequence and Control Escape octet is replaced
by a two-octet sequence consisting of the Control Escape octet (binary
01111101) followed by the original octet exclusive-or'd with hexadecimal 0x20.
The value of the address field is 0XFF to indicate a broadcast address, and the
value of the control filed is 0X03 to indicate it is an un-numbered frame and has
no flow control. The protocol field indicates the network protocol used for data
transfer, or LCP or NCP. The above figure indicates the network protocol used
for data transfer is IP (0x0021). Examples of other PPP protocol field values are:
Protocol Type
Network Layer Protocols
Assigned
Value
0x0021
0x0023
0x002B
0x003D
0x003F
0x0041
0x004D
0x0057
0x8021
0x8023
0x802B
0x803D
0x803F
0x8041
0x804D
0x8057
0xC021
0xC023
0xC025
0xC02B
0xC02D
0xC223
Protocol
IP V4
OSI network layer protocol
Novell IPX
PPP Multilink Protocol (RFC1990)
NetBIOS
Cisco system
IBM SNA
IP v6
IPv4 control protocol
OSI network layer control protocol
IPX control protocol
Multilink control protocol (RFC1990)
NetBIOS framing control protocol
Cisco system control protocol
IBM SNA control protocol (RFC2043)
IPv6 control protocol
Link control protocol
Password Authentication Protocol
Link quality report
Bandwidth control protocol (RFC2125)
Bandwidth allocation protocol
(RFC2125)
Challenge Handshake Authentication
Protocol
The information field contains the upper layer data and possibly padding. The
FCS field can be CRC16 or CRC32. The length of the FCS can be negotiated
using LCP.
DCCW
PPP-5
EE6364
For LCP and NCP frames, the value in the code field identifies the kind of packet.
The possible values for the code field are
Value
Packet
For both LCP and NCP:
1
Configure-Request
2
Configure-Ack
3
Configure-Nak
4
Configure-Reject
5
Terminate-Request
6
Terminate-Ack
7
Code-Reject
For LCP only:
8
Protocol-Reject
9
Echo-Request
10
Echo-Reply
11
Discard-Request
Functions
Start connection, define and negotiate configuration
Acknowledge Configure-Request received
Negative response to Configure-Request received
Configuration options not recognizable
Close a connection
Acknowledge the reception of Terminate-Request
Unknown code received
Unknown protocol field value received
Loopback for link quality determination
Reply to Echo-Request
Receiver discards the request received
The identifier (ID) field is used to aid in matching requests and replies. When a
packet is received with an invalid identifier, the packet is discarded.
The length field indicates the length of the LCP or NCP packet, including the
code, identifier, length, and the data fields.
The data field in the LCP and NCP packets contains the configuration options.
The format for each option is:
bytes
Type
Length
Data
variable
Type indicates the type of configuration option. Examples of types of options for
LCP are: maximum receive unit (MRU), authentication protocol, quality protocol,
magic number, protocol field compression. Examples of types of options for NCP
are: IP compression protocol, IP address.
Length indicates the length of this option. It includes the type, the length and the
data fields.
The data field contains the data specific to the configuration option.
DCCW
PPP-6
EE6364
Server
Ack or Nak
ID
Length
Message
Length
Message
ID
Length
Message
Length
Message
Code
3
Variable
Username
Nak
Protocol
0xC023
Length
Code
2
Control
0x03
Username
Length
Ack
Addr
0xFF
DCCW
1
ID
Flag
0x7E
Bytes
Code
Authentication Request
1
Information
1
Password
Length
Variable
Password
FCS
2 or 4
Flag
0x7E
1
PPP-7
EE6364
Response
Server
Success or Failure
1. The server sends a challenge packet to the user. The packet includes a
challenge value.
2. The user applies a predefined function that involves the challenge value, and
the password and generates a result. The user then sends the result back to
the server.
3. The server checks the results received by applying the predefined function on
the challenge value and the password. The server then responds with a
success or failure.
Four types of packets are used in CHAP. Their formats are:
Bytes
Challenge
Code
1
ID
Length
Response
Code
2
ID
Length
Success
Code
3
ID
Length
Failure
Code
4
ID
Length
Flag
0x7E
Addr
0xFF
Control
0x03
Bytes
DCCW
Protocol
0xC223
2
Variable
Variable
Challenge
Length
Challenge
Value
Username
Response
Length
Response
Value
Username
Message
Message
Information
FCS
2 or 4
Flag
0x7E
1
PPP-8
EE6364
End
Point
End
Point
Multilink PPP is based on an LCP option negotiation that permits an end point to
indicate to its PPP peer that it is capable of combining multiple physical links into
a "bundle". Multilink is negotiated during the initial LCP option negotiation. A PPP
end point indicates to its peer that it is willing to do multilink by sending the
multilink option as part of the initial LCP option negotiation.
Before transmission, the transmitting end point fragments the upper layer data
and encapsulated in one of the formats shown below:
Bit 0
Address 0xff
15
Control 0x03
Protocol ID (0x003d)
B E 0 0 0 0 0 0
Sequence Number
Sequence Number
Fragmented Data
DCCW
PPP-9
EE6364
Bit 0
Address 0xff
15
Control 0x03
Protocol ID (0x003d)
B E 0 0
Sequence Number
Fragmented Data
The B (beginning fragment) bit is a one bit field set to 1 on the first fragment
derived from a PPP packet and set to 0 for all other fragments from the same
PPP packet. The E (ending fragment) bit is a one bit field set to 1 on the last
fragment and set to 0 for all other fragments.
The format used is negotiated during the LCP negotiation. The fragmented data
are then transmitted simultaneously over the multilinks.
The receiving end point receives the fragmented data from multiple links. It then
reassembles the data based on the sequence numbers.
DCCW
PPP-10
EE6364
DCCW
PPP-11