In this lesson, we will study Framing and PPP protocol.
The main assumption here is that a data link is wire-like.
In the sense that the frames arrive,
if they arrive at all,
in the same order that as they were transmitted.
Therefore, the data link controls are applicable to point to point
communication lines as well as connection
over a network where frames follow this impulse.
In the previous few lessons,
we learned the flow control that prevents
the transmitter from overrunning the receiver buffer.
Today, we focus on framing.
Framing involves identifying the beginning
and end of a block of information within a digital stream.
Framing maps stream of physical layer bits
into frames.And a map frames into a bit stream.
We consider the case of frames that are of variable lengths.
Frame boundaries can be determined using
special characters to identify the beginning and end of frame.
Special bit patterns called flags to identify the beginning and end of frame.
And character counts in CRC check-In-master.
Character based of frame synchronization methods are used
when information in a frame consists of an integer number of characters.
To delineate a frame of characters,
special eight bit codes that do not cause bonding to
printable characters are used as control character.
The approach is called byte stuffing.
It operates as follows.
A special character DLE,
that is data link escape control with hexadecimal value one zero is introduced.
The two character sequence DLE and
STX is used to indicate the beginning of a frame and DLE,
ETX denotes the end of a frame.The receiver looks
for these character pairs to identify the beginning and end of a frame.
To deal with the occurrence of DLE, STX or DLE,
ETX pair in the data container in the frame.
And extra DLE is inserted or stuffed before the occurrence of a DLE inside of the frame.
Consequently, every legitimate DLE in the data is replaced by two DLEs.
Therefore, the only incidence of
a individual DLE occurs when DLE perceives that STX or ETX,
that identify beginning and end of frame.
Flag-based bit stuffing framing is for
transferring an arbitrary number of bits within a frame.
It is used in HDLC.
A frame is delineated by flag character that it is in hexadecimal 7E.
It use bit stuffing to prevent occurrence of flag inside as the frame data.
The transmitter in this extra zero after each consecutive five ones inside the frame.
The receiver checks for five consecutive ones.
If next bits equals zero, it is removed.
If next two bits has one, zero,
then flag is detected.
If next two bits are one,
one, then frame has errors.
We give an example of bit stuffing.
Point-to-Point Protocol, PPP, provides
a masthead for encapsulating IP packets over point-to-point links.
It can be used as a data link control to connect two routers or to
connect a personal computer to
an Internet service provider using a telephone line or modem.
PPP was designed to support a multiple network protocols simultaneously.
That is, PPP can transfer packets that are produced by different network layer protocols.
PPP protocol use an HDLC like frame format,
and also the same flag to encapsulate the datagrams over
point-to-point links But it use
bit stuffing as PPP frames consists of an integer number of bytes.
There are two problems with PPP bit stuffing though.
First, size of frame various unpredictable due to byte insertion.
Second, malicious users can inflate network bandwidth by inverting 7D and 7E.
PPP is character oriented HDLC.
They use the same flag hexadecimal 7E and also control escape in hexadecimal 7T.
PPP is used in many point to point applications.
Also used over shared links such as Ethernet,
to provide LCP, NCP and authentication features.
The Link Control Protocol,
LCP, is used to set up,
configure, test, maintain and to terminate a link connection.
PPP authentication is a password based protocol,
but ID and the password are transmitted unencrypted, susceptible to eavesdropping.
The Challenge Handshake Authentication Protocol, CHAP,
provides greater security by having the initiator
and responder go through a channel response sequence.
The protocol assumes that a pure process share a secret key.
After AOCP has established the link,
the authenticator sends a challenge to its peer process.
The challenge consists of a random number and an ID.
The peer process responds with a group D graphic checksum of the random value.
So it makes use of the shared secret.
The authenticator verifies the cryptographic checksum using the shared secret key.
If the two checksums agree,
the authenticator sends an authentication message.
As a quick summary, PPP use byte stuffing.
In next class, we will study HDLC that it is a bit stuffing.