Hdlc&point To Point Protocol
Hdlc&point To Point Protocol
Hdlc&point To Point Protocol
(HDLC)
Transfer Modes
HDLC supports two types of transfer modes, normal response mode and
asynchronous balanced mode.
Normal Response Mode (NRM) − Here, two types of stations are there,
a primary station that send commands and secondary station that can
respond to received commands. It is used for both point - to - point and
multipoint communications.
Asynchronous Balanced Mode (ABM) − Here, the configuration is
balanced, i.e. each station can both send commands and respond to
commands. It is used for only point - to - point communications.
HDLC Frame
HDLC is a bit - oriented protocol where each frame contains up to six fields. The
structure varies according to the type of frame. The fields of a HDLC frame are
−
Flag − It is an 8-bit sequence that marks the beginning and the end of
the frame. The bit pattern of the flag is 01111110.
Address − It contains the address of the receiver. If the frame is sent by
the primary station, it contains the address(es) of the secondary
station(s). If it is sent by the secondary station, it contains the address of
the primary station. The address field may be from 1 byte to several
bytes.
Control − It is 1 or 2 bytes containing flow and error control information.
Payload − This carries the data from the network layer. Its length may
vary from one network to another.
FCS − It is a 2 byte or 4 bytes frame check sequence for error detection.
The standard code used is CRC (cyclic redundancy code)
The frame format of PPP resembles HDLC frame. Its various fields are:
1. Flag field: Flag field marks the beginning and end of the PPP frame. Flag byte is
01111110. (1 byte).
2. Address field: This field is of 1 byte and is always 11111111. This address is the
broadcast address i.e. all the stations accept this frame.
3. Control field: This field is also of 1 byte. This field uses the format of the U-frame
(unnumbered) in HDLC. The value is always 00000011 to show that the frame does
not contain any sequence numbers and there is no flow control or error control.
4. Protocol field: This field specifies the kind of packet in the data field i.e. what is
being carried in data field.
5. Data field: Its length is variable. If the length is not negotiated using LCP during line
set up, a default length of 1500 bytes is used. It carries user data or other information.
6. FCS field: The frame checks sequence. It is either of 2 bytes or 4 bytes. It contains
the checksum.
Transition Phases in PPP
PPP uses several other protocols to establish link, authenticate users and to carry the
network layer data.
The various protocols used are:
1. Link Control Protocol
2. Authentication Protocol
3. Network Control Protocol
1. Link Control Protocol
• All LCP packets are carried in the data field of the PPP frame.
• The presence of a value C021 16 in the protocol field of PPP frame indicates that LCP
packet is present in the data field.
• The various fields present in LCP packet are:
1. Code: 1 byte-specifies the type of LCP packet.
2. ID: 1 byte-holds a value used to match a request with the reply.
3. Length: 2 byte-specifies the length of entire LCP packet.
4. Information: Contains extra information required for some LCP packet.
• There are eleven different type of LCP packets. These are categorized in three
groups:
1. Configuration packet: These are used to negotiate options between the two ends.
For example: configure-request, configure-ack, configure-nak, configure-reject are
some configuration packets.
2. Link termination packets: These are used to disconnect the link between two end
points. For example: terminate-request, terminate-ack, are some link termination
packets.
3. Link monitoring and debugging packets: These are used to monitor and debug
the links. For example: code-reject, protocol-reject, echo-request, echo-reply and
discard-request are some link monitoring and debugging packets.
2. Authentication Protocol
Authentication protocols help to validate the identity of a user who needs to access the
resources.
There are two authentication protocols:
1. Password Authentication Protocols (PAP)
2. Challenge Handshake Authentication Protocol (CHAP)
• After establishing the link and authenticating the user, PPP connects to the network
layer. This connection is established by NCP.
• Therefore NCP is a set of control protocols that allow the encapsulation of the data
coming from network layer.
• After the network layer configuration is done by one of the NCP protocols, the users
can exchange data from the network layer.
• PPP can carry a network layer data packet from protocols defined by the Internet,
DECNET, Apple Talk, Novell, OSI, Xerox and so on.
• None of the NCP packets carry networks layer data. They just configure the link at the
network layer for the incoming data.