21CS52 CN Module 2
21CS52 CN Module 2
COMPUTER NETWORKS
Subject Code: 21CS52
2
MODULE- 2
• The Data link layer: Design issues of DLL,
Error detection and correction, Elementary
data link protocols, Sliding window
protocols.
• The medium access control sublayer: The
channel allocation problem, Multiple
access protocols.
Laboratory Component :
1. Implement simple ESS and with transmitting nodes in
wire-less LAN by simulation and determine the
throughput with respect to transmission of packets
2. Write a program for error detecting code using CRC-
CCITT (16- bits).
DATA LINK LAYER
• This layer is one of the most complicated layers.
• Data link layer works between two hosts which are
directly connected:
Point to point
Broadcast
• The work of data link layer tends to get more
complex when it is dealing with multiple hosts on
single collision domain.
DATA LINK LAYER
• Data link layer has two sub-layers:
them.
No logical connection.
higher layers.
This service is suitable for voice transmission, links using
highly reliable.
DATA LINK LAYER DESIGN ISSUES
in the header
DATA LINK LAYER DESIGN ISSUES
3. Error Control
• How to make sure all frames are eventually delivered to the
network layer at the destination and in the proper order.
• For the connection oriented service, the data link layer must
guarantee that all the frames sent arrive at the receiver in the
proper order, and only one correct copy of each frame is
expected at the receiver.
• The receiver usually sends an acknowledgement (ACK) or a
negative acknowledgement (NACK) back to the transmitter.
• These ACKs and NACKs are typically very short in length
and do not consume the channel capacity.
DATA LINK LAYER DESIGN ISSUES
3. Error Control
• To stop the loss of a frame or an ACK/NACK due to
channel errors causing the transmitter to wait forever to
transmit the next frame, a time out procedure is used. If
after certain time, an ACK or NACK is not reached the
transmitter, the frame is sent again.
• However, if only the ACK is lost, the sender transmits a
copy of the same frame causing duplication and waste of
channel capacity.
• By introducing sequence numbers to all frames, passing of a
duplicate frame to the network layer can be prevented.
DATA LINK LAYER DESIGN ISSUES
4. Flow Control
• Another important design issue that occurs in the data link
layer (and higher layers as well) is what to do with a sender
that systematically wants to transmit frames faster than the
receiver can accept them.
• This situation can occur when the sender is running on a
fast, powerful computer and the receiver is running on a
slow, low-end machine.
• A common situation is when a smart phone requests a Web
page from a far more powerful server.
DATA LINK LAYER DESIGN ISSUES
4. Flow Control
• Clearly, something has to be done to prevent this situation.
Two approaches are commonly used:
Feedback-based flow control, the receiver sends back
Module – 2(b)
The medium access control sub layer:
The channel allocation problem,
Multiple access protocols.
39
Introduction
• Broadcast networks
• Key issue: who gets to use the channel when there is competition
• Referred to as
• Multiaccess channels
• Random access channels
• MAC (Medium Access Control) sublayer
• LANs
• Wireless networks
• Satellite networks
The MAC Sublayer
40
TDM:
• Each user is statically allocated every Nth time slot
• Same problems as FDM
42
• Example, if C is 100 Mbps, the mean frame length, 1/μ, is 10,000 bits, and the
frame arrival rate, λ, is 5000 frames/sec, then T = 200 μsec. Note that if we ignored
the queueing delay and just asked how long it takes to send a 10,000- bit frame on
a 100-Mbps network, we would get the (incorrect) answer of 100 μsec. That result
only holds when there is no contention for the channel.
43
Textbooks
1. Computer-Networks- Andrew S.
Tanenbaum and David J. Wetherall,
Pearson Education, 5th Edition.
(www.pearsonhighered.com/tanenbaum)
Reference Books
1. Behrouz A Forouzan, Data and Communications
and Networking, Fifth Edition, McGraw Hill,
Indian Edition
Thank you