Lecture-2.1 DLL Design Issues

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 28

University Institute of Engineering

DEPARTMENT OF COMPUTER SCIENCE


& ENGINEERING
Bachelor of Engineering (Computer Science & Engineering)
Subject Name: Computer Network
Subject Code: CST-256

Prepared By :Er. Jagmeet Kaur(E8387)


DISCOVER . LEARN . EMPOWER
UNIT-I
Syllabus
Introduction: Introduction to network, types of transmission technologies, Network Categories: LAN, MAN, WAN (Wireless /Wired),
Network Software: Concept of Layers, Protocols, interfaces and services. Reference Models: OSI, TCP/IP and comparison, Concept of
Topologies.
Physical Layer: Bit rate, Baud rate, Bandwidth, Transmission Impairments: Attenuation, Distortion, Noise; Data rate limits: Nyquist
formula, Shannon Formula, Modulation & modems; Transmission Modes, Multiplexing: Frequency Division, Time Division, Wavelength
Division
Transmission Media and Switching: Twisted pair, coaxial, fiber optics, Wireless Transmission (radio, microwave & infrared);Message
switching, Circuit Switching & Packet Switching.
UNIT-II
Data Link Layer(Flow and Error Control): Design issues, Error Detection & Correction; Flow control & Error Control; Sliding Window
Protocols, ARQ: Stop & Wait , Go Back n, Selective Repeat ; Examples of DLL protocols – HDLC, PPP;
Data Link Layer (Medium Access Sub layer) Channel Allocation; Random Access: ALOHA, CSMA protocols; Controlled Access: Polling,
Reservation, Token Passing; Examples of IEEE standards(802.2,802.3,802.4, 802.5), Basics of Wi-Fi(802.11).
Network Layer: Design issues, Logical Addressing: IPv4 & IPv6; Packet Formats & their comparison IPv4 & IPv6; Routing Algorithms:
Distance Vector, Link State

UNIT-III
Network Layer(Continue): Congestion Control: Principles of congestion control; Congestion prevention policies, Leaky bucket & Token
Bucket Algorithms.
Transport Layer: Services provided to upper layers, Elements of Transport protocols. Addressing, Flow Control & buffering; Example
Transport protocols: TCP, SCTCP & UDP.
Application Layer and Network Security: Domain Name System, Simple Network Management Protocol, Electronic Mail, World Wide
Web, Basics of authentication, Public and Private Key Cryptography, Digital Signatures and Certificates, Firewalls.

2
Data-link layer
• Data-link layer is the second layer after physical layer. The data link
layer is responsible for maintaining the data link between two hosts
or nodes.
• The data link layer is divided into two sub-layers :
• Logical Link Control Sub-layer (LLC) –
Provides the logic for the data link , Thus it controls the
synchronization , flow control , and error checking functions of the
data link layer. Functions are –
• (i) Error Recovery.
• (ii) It performs the flow control operations.
• (iii) User addressing.

3
• Media Access Control Sub-layer (MAC) –
It is the second sub-layer of data-link layer. It controls the flow and
multiplexing for transmission medium. Transmission of data packets is
controlled by this layer. This layer is responsible for sending the data
over the network interface card.
Functions are 

• (i) To perform the control of access to media.


• (ii) It performs the unique addressing to stations directly connected to
LAN.
• (iii) Detection of errors.

4
Design issues with data link layer are :
• Services provided to the network layer –
The data link layer act as a service interface to the network layer. The
principle service is transferring data from network layer on sending
machine to the network layer on destination machine. This transfer
also takes place via DLL (Dynamic Link Library).
• Frame synchronization –
The source machine sends data in the form of blocks called frames to
the destination machine. The starting and ending of each frame
should be identified so that the frame can be recognized by the
destination machine . 

5
Design issues

• Flow control –
Flow control is done to prevent the flow of data frame at the receiver
end. The source machine must not send data frames at a rate faster
than the capacity of destination machine to accept them.
• Error control –
Error control is done to prevent duplication of frames. The errors
introduced during transmission from source to destination machines
must be detected and corrected at the destination machine.

6
Error Detection and Correction
• There are many reasons such as noise, cross-talk etc., which may help data to
get corrupted during transmission. The upper layers work on some
generalized view of network architecture and are not aware of actual
hardware data processing.Hence, the upper layers expect error-free
transmission between the systems. Most of the applications would not
function expectedly if they receive erroneous data. Applications such as voice
and video may not be that affected and with some errors they may still
function well.
• Data-link layer uses some error control mechanism to ensure that frames
(data bit streams) are transmitted with certain level of accuracy. But to
understand how errors is controlled, it is essential to know what types of
errors may occur.
7
Store-and-forward

Types of Errors
There may be three types of errors:
• Single bit error
• In a frame, there is only one bit, anywhere though, which is corrupt.
• Multiple bits error
• Burst error
• Frame contains more than1 consecutive bits corrupted.

8
Error control mechanism
Error control mechanism may involve two possible ways:
• Error detection
• Error correction
Error Detection
• Errors in the received frames are detected by means of Parity Check and Cyclic
Redundancy Check (CRC). In both cases, few extra bits are sent along with actual data
to confirm that bits received at other end are same as they were sent. If the counter-
check at receiver’ end fails, the bits are considered corrupted.
Parity Check
• One extra bit is sent along with the original bits to make number of 1s either even in
case of even parity, or odd in case of odd parity.
• The sender while creating a frame counts the number of 1s in it. For example, if even
parity is used and number of 1s is even then one bit with value 0 is added. This way
number of 1s remains even.If the number of 1s is odd, to make it even a bit with value
1 is added.
1.9
• The receiver simply counts the number of 1s in a frame. If the count
of 1s is even and even parity is used, the frame is considered to be
not-corrupted and is accepted. If the count of 1s is odd and odd parity
is used, the frame is still not corrupted.
• If a single bit flips in transit, the receiver can detect it by counting the
number of 1s. But when more than one bits are erro neous, then it is
very hard for the receiver to detect the error.

10
Error correction

• Basic approach used for error detection is the use of redundancy bits,
where additional bits are added to facilitate detection of errors.
• Some popular techniques for error detection are:
1. Simple Parity check
2. Two-dimensional Parity check
3. Checksum
4. Cyclic redundancy check

11
1. Simple Parity check

• Blocks of data from the source are subjected to a check bit or parity
bit generator form, where a parity of :
• 1 is added to the block if it contains odd number of 1’s, and
• 0 is added if it contains even number of 1’s
• This scheme makes the total number of 1’s even, that is why it is
called even parity checking.

1.12
1.13
2. Two-dimensional Parity check :
Parity check bits are calculated for each row, which is equivalent to a
simple parity check bit. Parity check bits are also calculated for all
columns, then both are sent along with the data. At the receiving end
these are compared with the parity bits calculated on the received
data.

1.14
3. Checksum

• In checksum error detection scheme, the data is divided into k


segments each of m bits.
• In the sender’s end the segments are added using 1’s complement
arithmetic to get the sum. The sum is complemented to get the
checksum.
• The checksum segment is sent along with the data segments.
• At the receiver’s end, all received segments are added using 1’s
complement arithmetic to get the sum. The sum is complemented.
• If the result is zero, the received data is accepted; otherwise discarded.

15
Checksum

16
Cyclic redundancy check (CRC)

•  Unlike checksum scheme, which is based on addition, CRC is based


on binary division.
• In CRC, a sequence of redundant bits, called cyclic redundancy check
bits, are appended to the end of data unit so that the resulting data
unit becomes exactly divisible by a second, predetermined binary
number.
• At the destination, the incoming data unit is divided by the same
number. If at this step there is no remainder, the data unit is assumed
to be correct and is therefore accepted.
• A remainder indicates that the data unit has been damaged in transit
and therefore must be rejected.

17
Cyclic redundancy check (CRC)

18
Sliding Window Protocol

• The sliding window is a technique for sending multiple frames at a


time. It controls the data packets between the two devices where
reliable and gradual delivery of data frames is needed. It is also used
in TCP (Transmission Control Protocol).
• In this technique, each frame has sent from the sequence number.
The sequence numbers are used to find the missing data in the
receiver end. The purpose of the sliding window technique is to avoid
duplicate data, so it uses the sequence number.

19
Types of Sliding Window Protocol

Sliding window protocol has two types:


• Go-Back-N ARQ
• Selective Repeat ARQ

20
Go-Back-N ARQ

• Go-Back-N ARQ protocol is also known as Go-Back-N Automatic Repeat


Request. It is a data link layer protocol that uses a sliding window
method. In this, if any frame is corrupted or lost, all subsequent frames
have to be sent again.
• The size of the sender window is N in this protocol. For example, Go-Back-
8, the size of the sender window, will be 8. The receiver window size is
always 1.
• If the receiver receives a corrupted frame, it cancels it. The receiver does
not accept a corrupted frame. When the timer expires, the sender sends
the correct frame again. The design of the Go-Back-N ARQ protocol is
shown below.
21
22
The example of Go-Back-N ARQ is shown
below in the figure.

23
Selective Repeat ARQ
• Selective Repeat ARQ is also known as the Selective Repeat Automatic
Repeat Request. It is a data link layer protocol that uses a sliding window
method. The Go-back-N ARQ protocol works well if it has fewer errors.
But if there is a lot of error in the frame, lots of bandwidth loss in sending
the frames again. So, we use the Selective Repeat ARQ protocol. In this
protocol, the size of the sender window is always equal to the size of the
receiver window. The size of the sliding window is always greater than 1.
• If the receiver receives a corrupt frame, it does not directly discard it. It
sends a negative acknowledgment to the sender. The sender sends that
frame again as soon as on the receiving negative acknowledgment. There
is no waiting for any time-out to send that frame. The design of the
Selective Repeat ARQ protocol is shown below.

24
25
26
Difference between the Go-Back-N ARQ and Selective Repeat ARQ?

Selective Repeat ARQ


Go-Back-N ARQ
1. In this, only the frame is sent again,
1. If a frame is corrupted or lost in which is corrupted or lost.
it,all subsequent frames have to 2. There is a loss of low bandwidth.
be sent again. 3. It is more complex because it has to do
2. If it has a high error rate,it sorting and searching as well. And it also
requires more storage.
wastes a lot of bandwidth.
4. In this, sorting is done to get the frames
3. It is less complex. in the correct order.
4. It does not require sorting. 5. The search operation is performed in it.
5. It does not require searching. 6. It is used less because it is more complex.
6. It is used more.
27
References:
• https://beginnersbook.com/2019/03/computer-network-architecture
/
• https://www.tutorialspoint.com/data_communication_computer_net
work/physical_layer_introduction.htm
• http://highered.mheducation.com/sites/0072967757/student_view0/
chapter1/powerpoint_slides.html

28

You might also like