Page 115 - DCAP207_NETWORKS_DCAP406_COMPUTER_NETWORKS
P. 115
Computer Networks/Networks
Notes Introduction
The data link layer is layer 2 of the seven-layer osi model of computer networking. It corresponds
to, or is part of the link layer of the tcp/ip reference model. The data link layer is the protocol
layer that transfers data between adjacent network nodes in a wide area network or between
nodes on the same local area network segment. The data link layer provides the functional and
procedural means to transfer data between network entities and might provide the means to
detect and possibly correct errors that may occur in the physical layer. Examples of data link
protocols are Ethernet for local area networks (multi-node), the Point-to-Point Protocol (PPP),
HDLC and ADCCP for point-to-point (dual-node) connections.
8.1 Elementary Data Link Protocols
The basic objective of computer communication in a network environment is to send an infinite
long message from source node to destination node. To explain how data link layer accomplishes
data communication to the destination host at the data link layer, it is assumed here that the
layer 3 or network layer has a long message to send to the destination host. The message
available at network layer is broken into packets to pass to data link layer. The data link layer
encapsulates each packet in a frame by adding header and trailer. Data link layer does not bother
for the contents of packet.
8.1.1 Simplex Stop and Wait
An error free communication channel is assumed. The source node retrieves a packet from the
network layer and encapsulates it into a frame to transmit. After transmission, the source node
waits for an acknowledgement from the destination node. After receiving, the acknowledgement,
the loop starts over again.
At the destination node, the machine waits for a frame from source destination. After receiving
a frame, it passes the frame to the network layer and sends an acknowledgement for the frame
to the source node. It then loops back to wait for next frame and the process continues till the End
of File frame is reached.
Stop and wait protocol involves only one outstanding frame at a time so no sequence numbers
are required. The acknowledgement the destination node sends back to the source machine is an
empty frame. The Stop and Wait protocol is easy to implement and does not call for congestion
because there is only one frame outstanding at any time. Also loss of frames is ruled out due to
congestion. The destination host will also not be swamped by the sender. The disadvantage of
this method is that an error free communication channel does not exist. Hence, it is easy that a
frame or an acknowledgement mat get lost or damaged and a deadlock situation may occur
where neither the source or destination nodes can advance.
8.1.2 Positive Acknowledgement with Retransmission Protocol (PAR)
It is an improvement on the Stop and Wait protocol. The source machine retrieves a packet from
the network layer, encapsulates it into a frame with a sequence number to transmit to the
destination node. After transmission, the source machine attempts to retrieve an
acknowledgement from the physical layer. Once an acknowledgement arrives with the correct
sequence number, next packet to send from network layer is retrieved and accordingly, the
sequence number to send next packet is updated. In this manner, the loop starts over. If no frame
is retrieved from the physical within specified time, the physical layer times out or an
acknowledgement with an incorrect sequence number arrives. In this case, the last frame sent is
retransmitted and thus the loop starts over.
108 LOVELY PROFESSIONAL UNIVERSITY