Data Link Layer Services
Data Link Layer Services
Data Link Layer Services
Unit- 2
DLC SERVICES
❑ Data link control functions include framing and flow and
error control.
Framing
❑ Physical layer : bit synchronization to ensure that the sender
and receiver use the same bit durations and timing
❑ Frames can be of fixed or variable size.
❑ Fixed-size framing: no need for defining the boundaries of
the frames; the size itself can be used as a delimiter eg: atm
wan
❑ Variable-size framing: need to define the end of one frame
and the beginning of the next.
❑ Two approaches : a character-oriented approach and a
bit-oriented approach.
Character-Oriented Framing
(byte-oriented)
❑ Data to be carried are 8-bit characters from a coding
system such as ASCII.
❑ The header has source and destination addresses and
other control information, and trailer, has error detection
redundant bits, are also multiples of 8 bits.
❑ To separate one frame from the next, an 8-bit (1-byte)
flag is added at the beginning and the end of a frame.
❑ The flag, composed of protocol-dependent special
characters, signals the start or end of a frame
Character-Oriented Framing
❑ When any character used for the flag could also be part
of the information.
❑ To fix this, a byte-stuffing strategy is used
❑ Byte stuffing (or character stuffing): a special byte is added
to the data section of the frame when there is a character
with the same pattern as the flag.
❑ The data section is stuffed with an extra byte. This byte is
usually called the escape character (ESC) and has a
predefined bit pattern.
❑ Receiver removes the esc character, and treats the next
character as data, not as a delimiting flag.
Byte stuffing (Character stuffing)
Bit-Oriented Framing
❑ The data section of a frame is a sequence of bits to be
interpreted by the upper layer as text, graphic, audio,
video, and so on.
❑ In addition to headers (and possible trailers), we need
a delimiter to separate one frame from the other.
❑ Most protocols use a special 8-bit pattern flag,
01111110, as the delimiter to define the beginning and
the end of the frame
Bit stuffing
❑ If a 0 and 5 consecutive 1 bits are encountered, an extra 0
is added.
❑ The extra bit is added after one 0 followed by five 1s
regardless of the value of the next bit.
Flow Control
Authentication Protocols
❑ Authentication means validating the identity of a user who
needs to access a set of resources.
❑ PPP has created two protocols for authentication: Password
Authentication Protocol and Challenge Handshake
Authentication Protocol.
Password Authentication Protocol (PAP)
❑ PAP performs a two-step process:
a. The user who wants to access a system sends an
authentication identification and a password.
b. The system checks the validity of the identification
and password and either accepts or denies
connection.
❑ When a PPP frame is carrying any PAP packets, the
value of the protocol field is 0xC023.
❑ The three PAP packets are authenticate-request,
authenticate-ack, and authenticate-nak.
PAP packets encapsulated in a PPP
frame
Challenge Handshake Authentication
Protocol (CHAP)
❑ CHAP is a three-way handshaking authentication
protocol that provides greater security than PAP.
❑ the password is kept secret; it is never sent online.
a. The system sends the user a challenge packet
containing a challenge value
b. The user applies a predefined function that takes
the challenge value and the user’s own password
and creates a result. The user sends the result in the
response packet to the system.
c. The system does the same. It applies the same
function to the password of the user (known to the
system) and the challenge value to create a result.
CHAP packets encapsulated in a PPP
frame
Challenge Handshake Authentication
Protocol
❑ CHAP packets are encapsulated in the PPP frame with
the protocol value C223
❑ There are four CHAP packets: challenge, response,
success, and failure.
❑ The first packet is used by the system to send the
challenge value.
❑ The second is used by the user to return the result of
the calculation.
❑ The third is used by the system to allow access to the
system.
❑ The fourth is used by the system to deny access to the
system.
Network Control Protocols
❑ IPCP defines 7
packets, distinguished
by their code values
Summary
❑ Data link control deals with the design and procedures
for node-to-node communication
❑ Byte-oriented and bit-oriented.
❑ Flow control means creating a balance
❑ Error control :corrupted frames - discarded;
uncorrupted frames are accepted with or without
sending acknowledgments.
❑ DLC protocol can be either connectionless or
connection-oriented
❑ High-level data link control (HDLC)
❑ Point-to-point protocol (PPP)
Test your Understanding
❑ Why flags are needed when we use variable-size
frames?