0% found this document useful (0 votes)
2 views

Computer network 3ed sem

A data communication system consists of five main components: message, sender, receiver, transmission medium, and protocol. Data communication can occur in simplex, half-duplex, or full-duplex modes, and utilizes guided (wired) and unguided (wireless) media for transmission. Additionally, various types of networks, such as LAN, MAN, and WAN, facilitate communication over different geographical areas, employing different topologies to connect devices.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Computer network 3ed sem

A data communication system consists of five main components: message, sender, receiver, transmission medium, and protocol. Data communication can occur in simplex, half-duplex, or full-duplex modes, and utilizes guided (wired) and unguided (wireless) media for transmission. Additionally, various types of networks, such as LAN, MAN, and WAN, facilitate communication over different geographical areas, employing different topologies to connect devices.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 32

Components of Data Communication System

Data Communication is defined as exchange of data between two


devices via some form of transmission media such as a cable, wire
or it can be air or vacuum also. For occurrence of data
communication, communicating devices must be a part of
communication system made up of a combination of hardware or
software devices and programs.
Data Communication System Components:
There are mainly five components of a data communication
system:
1. Message
2. Sender
3. Receiver
4. Transmission Medium
5. Set of rules (Protocol)

1. Message:
This is most useful asset of a data communication system.
The message simply refers to data or piece of information
which is to be communicated. A message could be in any
form, it may be in form of a text file, an audio file, a video
file, etc.

2. Sender:
To transfer message from source to destination, someone
must be there who will play role of a source. Sender plays
part of a source in data communication system. It is simple
a device that sends data message. The device could be in
form of a computer, mobile, telephone, laptop, video
camera, or a workstation, etc.
3. Receiver:
It is destination where finally message sent by source has
arrived. It is a device that receives message. Same as
sender, receiver can also be in form of a computer,
telephone mobile, workstation, etc.

4.Transmission Medium:
In entire process of data communication, there must be
something which could act as a bridge between sender and
receiver, Transmission medium plays that part. It is physical
path by which data or message travels from sender to receiver.
Transmission medium could be guided (with wires) or unguided
(without wires), for example, twisted pair cable, fiber optic cable,
radio waves, microwaves, etc.

5.Set of rules (Protocol):


To govern data communications, various sets of rules had been
already designed by the designers of the communication
systems, which represent a kind of agreement between
communicating devices. These are defined as protocol. In simple
terms, the protocol is a set of rules that govern data
communication. If two different devices are connected but there
is no protocol among them, there would not be any kind of
communication between those two devices. Thus the protocol is
necessary for data communication to take place.

A typical example of a data communication system is sending an e-


mail. The user which send email act as sender, message is data
which user wants to send, receiver is one whom user wants to send
message, there are many protocols involved in this entire process,
one of them is Simple Mail Transfer Protocol (SMTP) , both sender
and receiver must have an internet connection which uses a
wireless medium to send and receive email.

Type of data communication (Data Flow)

As we know that data communication is communication in which


we can send or receive data from one device to another. The data
communication is divided into three types:
1. Simplex Communication: It is one-way communication or
we can say that unidirectional communication in which one
device only receives and another device only sends data
and devices uses their entire capacity in transmission. For
example, IoT, entering data using a keyboard, listing music
using a speaker, etc.
2. Half Duplex communication: It is a two-way
communication or we can say that it is a bidirectional
communication in which both the devices can send and
receive data but not at the same time. When one device is
sending data then another device is only receiving and
vice-versa. For example, walkie-talkie.
3. Full-duplex communication: It is a two-way
communication or we can say that it is a bidirectional
communication in which both the devices can send and
receive data at the same time. For example, mobile
phones, landlines, etc.

Communication Channels

Communication channels are the medium that connects two or


more workstations. Workstations can be connected by either wired
media or wireless media. It is also known as a transmission
medium. The transmission medium or channel is a link that carries
messages between two or more devices. We can group the
communication media into two categories:
 Guided media transmission
 Unguided media transmission
1. Guided Media: In this transmission medium, the physical link
is created using wires or cables between two or more computers or
devices, and then the data is transmitted using these cables in
terms of signals. Guided media transmission of the following types:
1. Twisted pair cable: It is the most common form of wire used in
communication. In a twisted-pair cable, two identical wires are
wrapped together in a double helix. The twisting of the wire
reduces the crosstalk. It is known as the leaking of a signal from
one wire to another due to which signal can corrupt and can cause
network errors. The twisting protects the wire from internal
crosstalk as well as external forms of signal interference. Types of
Twisted Pair Cable:
 Unshielded Twisted Pair (UTP): It is used in computers
and telephones widely. As the name suggests, there is no
external shielding so it does not protects from external
interference. It is cheaper than STP.
 Shielded Twisted Pair (STP): It offers greater protection
from crosstalk due to shield. Due to shielding, it protects
from external interference. It is heavier and costlier as
compare to UTP.

2. Coaxial Cable: It consists of a solid wire core that is surrounded


by one or more foil or wire shields. The inner core of the coaxial
cable carries the signal and the outer shield provides the ground. It
is widely used for television signals and also used by large
corporations in building security systems. Data transmission of this
cable is better but expensive as compared to twisted pair.

3. Optical fibers: Optical fiber is an important technology. It


transmits large amounts of data at very high speeds due to which it
is widely used in internet cables. It carries data as a light that
travels inside a thin glass fiber. The fiber optic cable is made up of
three pieces:
1. Core: Core is the piece through which light travels. It is
generally created using glass or plastic.
2. Cladding: It is the covering of the core and reflects the
light back to the core.
3. Sheath: It is the protective covering that protects fiber
cable from the environment.
2. Unguided Media: The unguided transmission media is a
transmission mode in which the signals are propagated from one
device to another device wirelessly. Signals can wave through the
air, water, or vacuum. It is generally used to transmit signals in all
directions. Unguided Media is further divided into various parts:
1. Microwave: Microwave offers communication without the use
of cables. Microwave signals are just like radio and television
signals. It is used in long-distance communication. Microwave
transmission consists of a transmitter, receiver, and
atmosphere. In microwave communication, there are
parabolic antennas that are mounted on the towers to send a
beam to another antenna. The higher the tower, the greater
the range.

2. Radio wave: When communication is carried out by radio


frequencies, then it is termed radio waves transmission. It offers
mobility. It is consists of the transmitter and the receiver. Both use
antennas to radiate and capture the radio signal.
3. Infrared: It is short-distance communication and can pass
through any object. It is generally used in TV remotes, wireless
mouse, etc.
Characteristics of Data Communication
The basic four fundamental characteristics depends on any data
communications system to make an effective are as
1. Delivery: The data should be delivered to the correct destination and
correct user.
2. Accuracy: The communication system should deliver the data accurately,
without introducing any errors. The data may get corrupted during
transmission affecting the accuracy of the delivered data.
3. Timeliness: Audio and Video data has to be delivered in a timely manner
without any delay; such a data delivery is called real time transmission of
data.
4. Jitter: It is the variation in the packet arrival time. Uneven Jitter may
affect the timeliness of data being transmitted.

Data Representation
A network is a collection of different devices connected and capable of
communicating. For example, a company's local network connects
employees' computers and devices like printers and scanners. Employees
will be able to share information using the network and also use the
common printer/ scanner via the network. Data to be transferred or
communicated from one device to another comes in various formats like
audio, video, etc. This tutorial explains how different data types are
represented in a computer and transferred in a network.

Different Data types in a computer network:

1. Texts
2. Numbers
3. Images
4. Videos
5. Audios

1.Textual data:
Data in text format is represented using bit patterns (combinations of two
binary bits - 0 and 1). Textual data is nothing but a string, and a string is a
collection of characters. Each character is given a specific number
according to an international standard called Unicode. The process of
allocating numbers to characters is called "Coding," and these numbers
are called "codes". Now, these codes are converted into binary bits to
represent the textual data in a pattern of bits, and these bits are
transferred as a stream via the network to other devices.
Unicode: It is the universal standard of character encoding. It gives a
unique code to almost all the characters in every language spoken in the
world. It defines more than 1 40 000 characters. It even defined codes for
emojis. The first 128 characters of Unicode point to ASCII characters. ASCII
is yet another character encoding format, but it has only 128 codes to 128
characters. Hence, ASCII is a subset of Unicode.

File extensions: .doc, .docx, .pdf, .txt, etc.

2. Numerical data
Numbers are directly converted into binary patterns by dividing by 2 without
any encoding. The numbers we want to transfer generally will be of the decimal
number system- ( )10. We need to convert the numbers from ( )10 to a binary
number system - ( )2 to get a bit stream.

Number formats:

Integers

Date

Boolean

Decimal

Fixed point

Floating point

Example:

Number: 780 Binary representation: 1100001100

3. Image
Image data is also transferred as a stream of bits like textual data. An
image, also called a picture, is a collection of little elements called
"Pixels". A single pixel is the smallest addressable element of a picture,
and it is like a dot with a size of 1/96 inch/ 0.26 mm. The dimensions of an
image are given by the number of pixels along the height of the
image X Number of pixels along the width of the image.

File extensions:

.jpg, jpeg, .png, etc.


4. Audios
Transferring an audio signal is different from other formats. Audio is
broadcasting recorded sound or music. An audio signal is generated as
an analog wave, converted into digital format to be stored in a
computer by representing the wave amplitude at moments in bits.
Another parameter is the sample rate. It represents the number of
samples or, in other words, samples saved.

The audio quality depends on the sampling rate and the bit rate. If
more bits are used to represent the amplitudes in moments and more
moments are captured accurately, we can save the audio with every
detail accurately.

File extensions:

.mp3, .m4a, .WAV, .AAC, etc.

5. Videos
A video is a collection of frames; each frame is a picture with the
same or different dimensions. These frames/ images are represented as
matrices, as we discussed above. All the frames/ images are displayed
continuously, one after the other, to show a video in movement. To
represent a video, The computer will analyze data about the video like:

1. FPS (Frames per second)


2. Duration of the video
3. Image resolution (Number of pixels Horizontally X Vertically)
4. Bit depth (Number of bits required to represent a pixel -> number of
colors)

A video is mostly combined with an audio component, like a film or a


video game.

File extensions:

.mp4, .MOV, .AVI, etc.

Types of area networks – LAN, MAN and WAN


The Network allows computers to connect and
communicate with different computers via any medium.
LAN, MAN, and WAN are the three major types of networks
designed to operate over the area they cover. There are
some similarities and dissimilarities between them. One of
the major differences is the geographical area they cover,
i.e. LAN covers the smallest area, MAN covers an area
larger than LAN and WAN comprises the largest of all.

Local Area Network (LAN) –

LAN or Local Area Network connects network devices in such a way


that personal computers and workstations can share data, tools,
and programs. The group of computers and devices are connected
together by a switch, or stack of switches, using a private
addressing scheme as defined by the TCP/IP protocol. Private
addresses are unique in relation to other computers on the local
network. Routers are found at the boundary of a LAN, connecting
them to the larger WAN.

Wireless Local Area Network (WLAN):

A Wireless Local Area Network (WLAN) is a type of network that


uses wireless technology, such as Wi-Fi, to connect devices in the
same area. WLANs use wireless access points to transmit data
between devices, allowing for greater mobility and flexibility.
Metropolitan Area Network (MAN) –

MAN or Metropolitan area Network covers a larger area than that


covered by a LAN and a smaller area as compared to WAN. MAN
has a range of 5-50km. It connects two or more computers that are
apart but reside in the same or different cities. It covers a large
geographical area and may serve as an ISP (Internet Service
Provider). MAN is designed for customers who need high-speed
connectivity. Speeds of MAN range in terms of Mbps. It’s hard to
design and maintain a Metropolitan Area Network.

Wide Area Network (WAN) –

WAN or Wide Area Network is a computer network that extends


over a large geographical area, although it might be confined
within the bounds of a state or country. WAN has a range of above
50 km. A WAN could be a connection of LAN connecting to other
LANs via telephone lines and radio waves and may be limited to an
enterprise (a corporation or an organization) or accessible to the
public. The technology is high-speed and relatively expensive.
There are two types of WAN: Switched WAN and Point-to-Point
WAN.
Personal Area Network (PAN)-

PAN is a personal area network having an interconnection of


personal technology devices to communicate over a short distance.
It covers only less than 10 meters or 33 feet of area. PAN has fewer
users as compared to other networks such as LAN, WAN, etc. PAN
typically uses some form of wireless technology. PAN involves the
transmission of data between information devices such as
smartphones, personal computers, tablet computers, etc.

Types of Network Topology


The arrangement of a network that comprises nodes and
connecting lines via sender and receiver is referred to as Network
Topology. The various network topologies are:
 Point to Point Topology
 Mesh Topology
 Star Topology
 Bus Topology
 Ring Topology
 Tree Topology
 Hybrid Topology

Point to Point Topology

Point-to-Point Topology is a type of topology that works on the


functionality of the sender and receiver. It is the simplest
communication between two nodes, in which one is the sender and
the other one is the receiver. Point-to-Point provides high
bandwidth.

Point to Point Topology

Mesh Topology

In a mesh topology, every device is connected to another device


via a particular channel. In Mesh Topology, the protocols used are
AHCP (Ad Hoc Configuration Protocols), DHCP (Dynamic Host
Configuration Protocol), etc.
Star Topology

In Star Topology, all the devices are connected to a single hub


through a cable. This hub is the central node and all other nodes
are connected to the central node. The hub can be passive in
nature i.e., not an intelligent hub such as broadcasting devices, at
the same time the hub can be intelligent known as an active hub.
Active hubs have repeaters in them. Coaxial cables or RJ-45 cables
are used to connect the computers. In Star Topology, many popular
Ethernet LAN protocols are used as CD(Collision Detection), CSMA
(Carrier Sense Multiple Access), etc.

Bus Topology

Bus Topology is a network type in which every computer and


network device is connected to a single cable. It is bi-directional. It
is a multi-point connection and a non-robust topology because if
the backbone fails the topology crashes. In Bus Topology, various
MAC (Media Access Control) protocols are followed by LAN ethernet
connections like TDMA, Pure Aloha, CDMA, Slotted Aloha, etc.
Bus Topology

Bus Topology is a network type in which every computer and


network device is connected to a single cable. It is bi-directional. It
is a multi-point connection and a non-robust topology because if
the backbone fails the topology crashes. In Bus Topology, various
MAC (Media Access Control) protocols are followed by LAN ethernet
connections like TDMA, Pure Aloha, CDMA, Slotted Aloha, etc.
Tree Topology
This topology is the variation of the Star topology. This topology
has a hierarchical flow of data. In Tree Topology, protocols like
DHCP and SAC (Standard Automatic Configuration ) are used.
Hybrid Topology

This topological technology is the combination of all the various


types of topologies we have studied above. Hybrid Topology is used
when the nodes are free to take any form. It means these can be
individuals such as Ring or Star topology or can be a combination of
various types of topologies seen above. Each individual topology
uses the protocol that has been discussed earlier.

What is OSI Model? – Layers of OSI Model

OSI stands for Open Systems Interconnection. It was


developed by ISO – ‘International Organization for Standardization’,
in the year 1984. It is a 7-layer architecture with each layer having
specific functionality to perform. All these 7 layers work
collaboratively to transmit the data from one person to another
across the globe.
Physical Layer – Layer 1
The lowest layer of the OSI reference model is the physical layer. It
is responsible for the actual physical connection between the
devices. The physical layer contains information in the form
of bits. It is responsible for transmitting individual bits from one
node to the next. When receiving data, this layer will get the signal
received and convert it into 0s and 1s and send them to the Data
Link layer, which will put the frame back together.
Ex- Hub, Repeater, Modem, and Cables are Physical Layer devices.
Data Link Layer (DLL) – Layer 2
The data link layer is responsible for the node-to-node delivery of
the message. The main function of this layer is to make sure data
transfer is error-free from one node to another, over the physical
layer. When a packet arrives in a network, it is the responsibility of
the DLL to transmit it to the Host using its MAC address.
The Data Link Layer is divided into two sublayers:
1. Logical Link Control (LLC)
2. Media Access Control (MAC)

Ex- Switch & Bridge are Data Link Layer devices.

Network Layer – Layer 3


The network layer works for the transmission of data from one host
to the other located in different networks. It also takes care of
packet routing i.e. selection of the shortest path to transmit the
packet, from the number of routes available. The sender &
receiver’s IP addresses are placed in the header by the network
layer.
Ex- Network layer is implemented by networking devices such as
routers and switches.

Note: Network Layer, Data Link Layer, and Physical Layer are also
known as Lower Layers or Hardware Layers.

Transport Layer – Layer 4


The transport layer provides services to the application layer and
takes services from the network layer. The data in the transport
layer is referred to as Segments. It is responsible for the End to End
Delivery of the complete message. The transport layer also
provides the acknowledgment of the successful data transmission
and re-transmits the data if an error is found.

Session Layer – Layer 5


This layer is responsible for the establishment of connection,
maintenance of sessions, and authentication, and also ensures
security.

Presentation Layer – Layer 6


The presentation layer is also called the Translation layer. The
data from the application layer is extracted here and manipulated
as per the required format to transmit over the network.

Application Layer – Layer 7


At the very top of the OSI Reference Model stack of layers, we find
the Application layer which is implemented by the network
applications. These applications produce the data, which has to be
transferred over the network. This layer also serves as a window for
the application services to access the network and for displaying
the received information to the user.

Note: OSI model acts as a reference model and is not


implemented on the Internet because of its late invention. The
current model being used is the TCP/IP model.

TCP/IP Model

TCP/IP was designed and developed by the Department of Defense


(DoD) in the 1960s and is based on standard protocols. It stands for
Transmission Control Protocol/Internet Protocol. The TCP/IP model is
a concise version of the OSI model. It contains four layers, unlike
the seven layers in the OSI model.
What Does TCP/IP Do?
The main work of TCP/IP is to transfer the data of a computer from
one device to another. The main condition of this process is to
make data reliable and accurate so that the receiver will receive
the same information which is sent by the sender. To ensure that,
each message reaches its final destination accurately, the TCP/IP
model divides its data into packets and combines them at the other
end, which helps in maintaining the accuracy of the data while
transferring from one end to another end.

What is the Difference between TCP and IP?


TCP and IP are different protocols of Computer Networks. The basic
difference between TCP (Transmission Control Protocol) and IP
(Internet Protocol) is in the transmission of data. In simple words, IP
finds the destination of the mail and TCP has the work to send and
receive the mail. UDP is another protocol, which does not require IP
to communicate with another computer. IP is required by only TCP.
This is the basic difference between TCP and IP.

How Does the TCP/IP Model Work?


Whenever we want to send something over the internet using the
TCP/IP Model, the TCP/IP Model divides the data into packets at the
sender’s end and the same packets have to be recombined at the
receiver’s end to form the same data, and this thing happens to
maintain the accuracy of the data. TCP/IP model divides the data
into a 4-layer procedure, where the data first go into this layer in
one order and again in reverse order to get organized in the same
way at the receiver’s end.

Layers of TCP/IP Model


1. Application Layer
2. Transport Layer(TCP/UDP)
3. Network/Internet Layer(IP)
4. Data Link Layer (MAC)
5. Physical Layer
1. Physical Layer
It is a group of applications requiring network communications. This
layer is responsible for generating the data and requesting
connections. It acts on behalf of the sender and the Network Access
layer on the behalf of the receiver. During this article, we will be
talking on the behalf of the receiver.
2. Data Link Layer
The packet’s network protocol type, in this case, TCP/IP, is
identified by the data-link layer. Error prevention and “framing” are
also provided by the data-link layer. Point-to-Point Protocol
(PPP) framing and Ethernet IEEE 802.2 framing are two examples of
data-link layer protocols.
3. Internet Layer
This layer parallels the functions of OSI’s Network layer. It defines
the protocols which are responsible for the logical transmission of
data over the entire network. The main protocols residing at this
layer are as follows:
 IP: IP stands for Internet Protocol and it is responsible for
delivering packets from the source host to the destination
host by looking at the IP addresses in the packet headers.
IP has 2 versions: IPv4 and IPv6. IPv4 is the one that most
websites are using currently. But IPv6 is growing as the
number of IPv4 addresses is limited in number when
compared to the number of users.
 ICMP: ICMP stands for Internet Control Message Protocol. It
is encapsulated within IP datagrams and is responsible for
providing hosts with information about network problems.
 ARP: ARP stands for Address Resolution Protocol. Its job is
to find the hardware address of a host from a known IP
address. ARP has several types: Reverse ARP, Proxy ARP,
Gratuitous ARP, and Inverse ARP.
The Internet Layer is a layer in the Internet Protocol (IP) suite,
which is the set of protocols that define the Internet. The Internet
Layer is responsible for routing packets of data from one device to
another across a network. It does this by assigning each device a
unique IP address, which is used to identify the device and
determine the route that packets should take to reach it.
Example: Imagine that you are using a computer to send an email
to a friend. When you click “send,” the email is broken down into
smaller packets of data, which are then sent to the Internet Layer
for routing. The Internet Layer assigns an IP address to each packet
and uses routing tables to determine the best route for the packet
to take to reach its destination. The packet is then forwarded to the
next hop on its route until it reaches its destination. When all of the
packets have been delivered, your friend’s computer can
reassemble them into the original email message.
In this example, the Internet Layer plays a crucial role in delivering
the email from your computer to your friend’s computer. It uses IP
addresses and routing tables to determine the best route for the
packets to take, and it ensures that the packets are delivered to
the correct destination. Without the Internet Layer, it would not be
possible to send data across the Internet.
4. Transport Layer
The TCP/IP transport layer protocols exchange data receipt
acknowledgments and retransmit missing packets to ensure that
packets arrive in order and without error. End-to-end
communication is referred to as such. Transmission Control
Protocol (TCP) and User Datagram Protocol are transport layer
protocols at this level (UDP).
 TCP: Applications can interact with one another
using TCP as though they were physically connected by a
circuit. TCP transmits data in a way that resembles
character-by-character transmission rather than separate
packets. A starting point that establishes the connection,
the whole transmission in byte order, and an ending point
that closes the connection make up this transmission.
 UDP: The datagram delivery service is provided by UDP,
the other transport layer protocol. Connections between
receiving and sending hosts are not verified by UDP.
Applications that transport little amounts of data use UDP
rather than TCP because it eliminates the processes of
establishing and validating connections.
5. Application Layer
This layer is analogous to the transport layer of the OSI model. It is
responsible for end-to-end communication and error-free delivery
of data. It shields the upper-layer applications from the
complexities of data. The three main protocols present in this layer
are:
 HTTP and HTTPS: HTTP stands for Hypertext transfer
protocol. It is used by the World Wide Web to manage
communications between web browsers and servers.
HTTPS stands for HTTP-Secure. It is a combination of HTTP
with SSL(Secure Socket Layer). It is efficient in cases where
the browser needs to fill out forms, sign in, authenticate,
and carry out bank transactions.
 SSH: SSH stands for Secure Shell. It is a terminal
emulations software similar to Telnet. The reason SSH is
preferred is because of its ability to maintain the encrypted
connection. It sets up a secure session over a TCP/IP
connection.
 NTP: NTP stands for Network Time Protocol. It is used to
synchronize the clocks on our computer to one standard
time source. It is very useful in situations like bank
transactions. Assume the following situation without the
presence of NTP. Suppose you carry out a transaction,
where your computer reads the time at 2:30 PM while the
server records it at 2:28 PM. The server can crash very
badly if it’s out of sync.
The host-to-host layer is a layer in the OSI (Open Systems
Interconnection) model that is responsible for providing
communication between hosts (computers or other devices) on a
network. It is also known as the transport layer.
Some common use cases for the host-to-host layer include:
1. Reliable Data Transfer: The host-to-host layer ensures
that data is transferred reliably between hosts by using
techniques like error correction and flow control. For
example, if a packet of data is lost during transmission, the
host-to-host layer can request that the packet be
retransmitted to ensure that all data is received correctly.
2. Segmentation and Reassembly: The host-to-host layer
is responsible for breaking up large blocks of data into
smaller segments that can be transmitted over the
network, and then reassembling the data at the
destination. This allows data to be transmitted more
efficiently and helps to avoid overloading the network.
3. Multiplexing and Demultiplexing: The host-to-host
layer is responsible for multiplexing data from multiple
sources onto a single network connection, and then
demultiplexing the data at the destination. This allows
multiple devices to share the same network connection and
helps to improve the utilization of the network.
4. End-to-End Communication: The host-to-host layer
provides a connection-oriented service that allows hosts to
communicate with each other end-to-end, without the need
for intermediate devices to be involved in the
communication.
Example: Consider a network with two hosts, A and B. Host A
wants to send a file to host B. The host-to-host layer in host A will
break the file into smaller segments, add error correction and flow
control information, and then transmit the segments over the
network to host B. The host-to-host layer in host B will receive the
segments, check for errors, and reassemble the file. Once the file
has been transferred successfully, the host-to-host layer in host B
will acknowledge receipt of the file to host A.
In this example, the host-to-host layer is responsible for providing a
reliable connection between host A and host B, breaking the file
into smaller segments, and reassembling the segments at the
destination. It is also responsible for multiplexing and
demultiplexing the data and providing end-to-end communication
between the two hosts.
Other Common Internet Protocols
TCP/IP Model covers many Internet Protocols. The main rule of
these Internet Protocols is how the data is validated and sent over
the Internet. Some Common Internet Protocols include:
 HTTP (Hypertext Transfer Protocol): HTTP takes care of
Web Browsers and Websites.
 FTP (File Transfer Protocol): FTP takes care of how the
file is to be sent over the Internet.
 SMTP (Simple Mail Transfer Protocol): SMTP is used to
send and receive data.

Error Detection and Correction in


Data link Layer
Data-link layer uses error control techniques to ensure that frames, i.e. bit
streams of data, are transmitted from the source to the destination with a
certain extent of accuracy.
Errors

When bits are transmitted over the computer network, they are subject to get
corrupted due to interference and network problems. The corrupted bits
leads to spurious data being received by the destination and are called
errors.

Types of Errors

Errors can be of three types, namely single bit errors, multiple bit errors, and
burst errors.
 Single bit error − In the received frame, only one bit has been
corrupted, i.e. either changed from 0 to 1 or from 1 to 0.

 Multiple bits error − In the received frame, more than one bits are
corrupted.

 Burst error − In the received frame, more than one consecutive bits
are corrupted.

Error Control

Error control can be done in two ways

 Error detection − Error detection involves checking whether any


error has occurred or not. The number of error bits and the type of
error does not matter.
 Error correction − Error correction involves ascertaining the exact
number of bits that has been corrupted and the location of the
corrupted bits.

For both error detection and error correction, the sender needs to send some
additional bits along with the data bits. The receiver performs necessary
checks based upon the additional redundant bits. If it finds that the data is
free from errors, it removes the redundant bits before passing the message
to the upper layers.

Error Detection Techniques


There are three main techniques for detecting errors in frames: Parity
Check, Checksum, and Cyclic Redundancy Check (CRC).
Parity Check

The parity check is done by adding an extra bit, called parity bit to the data
to make a number of 1s either even in case of even parity or odd in case of
odd parity.

While creating a frame, the sender counts the number of 1s in it and adds the
parity bit in the following way

 In case of even parity: If a number of 1s is even then parity bit value is


0. If the number of 1s is odd then parity bit value is 1.
 In case of odd parity: If a number of 1s is odd then parity bit value is 0.
If a number of 1s is even then parity bit value is 1.

On receiving a frame, the receiver counts the number of 1s in it. In case of


even parity check, if the count of 1s is even, the frame is accepted,
otherwise, it is rejected. A similar rule is adopted for odd parity check.

The parity check is suitable for single bit error detection only.

Checksum

In this error detection scheme, the following procedure is applied

 Data is divided into fixed sized frames or segments.


 The sender adds the segments using 1’s complement arithmetic to get
the sum. It then complements the sum to get the checksum and sends
it along with the data frames.
 The receiver adds the incoming segments along with the checksum
using 1’s complement arithmetic to get the sum and then
complements it.
 If the result is zero, the received frames are accepted; otherwise, they
are discarded.
Cyclic Redundancy Check (CRC)

Cyclic Redundancy Check (CRC) involves binary division of the data bits being
sent by a predetermined divisor agreed upon by the communicating system.
The divisor is generated using polynomials.

 Here, the sender performs binary division of the data segment by the
divisor. It then appends the remainder called CRC bits to the end of the
data segment. This makes the resulting data unit exactly divisible by
the divisor.
 The receiver divides the incoming data unit by the divisor. If there is no
remainder, the data unit is assumed to be correct and is accepted.
Otherwise, it is understood that the data is corrupted and is therefore
rejected.
Error Correction Techniques

Error correction techniques find out the exact number of bits that have been
corrupted and as well as their locations. There are two principle ways

 Backward Error Correction (Retransmission) − If the receiver


detects an error in the incoming frame, it requests the sender to
retransmit the frame. It is a relatively simple technique. But it can be
efficiently used only where retransmitting is not expensive as in fiber
optics and the time for retransmission is low relative to the
requirements of the application.
 Forward Error Correction − If the receiver detects some error in the
incoming frame, it executes error-correcting code that generates the
actual frame. This saves bandwidth required for retransmission. It is
inevitable in real-time systems. However, if there are too many errors,
the frames need to be retransmitted.

The four main error correction codes are

 Hamming Codes
 Binary Convolution Code
 Reed – Solomon Code
 Low-Density Parity-Check Code

Flow Control and Error Control


Data Link Layer is responsible for reliable point-to-point data transfer over a physical
medium. To implement this data link layer provides three functions:

 Line Discipline:
Line discipline is the functionality used to establish coordination between link
systems. It decides which device sends data and when.
 Flow Control:
Flow control is an essential function that coordinates the amount of data the sender
can send before waiting for acknowledgment from the receiver.
 Error Control:
Error control is functionality used to detect erroneous transmissions in data frames
and retransmit them.

What is Flow Control in the Data Link Layer?


Flow control is a set of procedures that restrict the amount of data a sender should send
before it waits for some acknowledgment from the receiver.

 Flow Control is an essential function of the data link layer.


 It determines the amount of data that a sender can send.
 It makes the sender wait until an acknowledgment is received from the receiver’s end.
 Methods of Flow Control are Stop-and-wait , and Sliding window.
Methods to Control the Flow of Data
Stop-and-wait Protocol

Stop-and-wait protocol works under the assumption that the communication


channel is noiseless and transmissions are error-free.

Working:

 The sender sends data to the receiver.


 The sender stops and waits for the acknowledgment.
 The receiver receives the data and processes it.
 The receiver sends an acknowledgment for the above data to the sender.
 The sender sends data to the receiver after receiving the
acknowledgment of previously sent data.
 The process is unidirectional and continues until the sender sends
the End of Transmission (EoT) frame.

Sliding Window Protocol

The sliding window protocol is the flow control protocol for noisy channels
that allows the sender to send multiple frames even before acknowledgments
are received. It is called a Sliding window because the sender slides its window
upon receiving the acknowledgments for the sent frames.

Working:

 The sender and receiver have a “window” of frames. A window is a space


that consists of multiple bytes. The size of the window on the receiver
side is always 1.
 Each frame is sequentially numbered from 0 to n - 1, where n is the
window size at the sender side.
 The sender sends as many frames as would fit in a window.
 After receiving the desired number of frames, the receiver sends an
acknowledgment. The acknowledgment (ACK) includes the number of
the next expected frame.
What is Error Control in the Data Link Layer?

Error Control is a combination of both error detection and error correction. It


ensures that the data received at the receiver end is the same as the one sent by
the sender.

Error detection is the process by which the receiver informs the sender about
any erroneous frame (damaged or lost) sent during transmission.

Error correction refers to the retransmission of those frames by the sender.

Purpose of Error Control

Error control is a vital function of the data link layer that detects errors in
transmitted frames and retransmits all the erroneous frames. Error discovery and
amendment deal with data frames damaged or lost in transit and the
acknowledgment frames lost during transmission. The method used in noisy
channels to control these errors is ARQ or Automatic Repeat Request.
Categories of Error Control
Stop-and-wait ARQ

 In the case of stop-and-wait ARQ after the frame is sent, the sender
maintains a timeout counter.
 If acknowledgment of the frame comes in time, the sender transmits the
next frame in the queue.
 Else, the sender retransmits the frame and starts the timeout counter.
 In case the receiver receives a negative acknowledgment, the sender
retransmits the frame.

Sliding Window ARQ


To deal with the retransmission of lost or damaged frames, a few changes are made to the
sliding window mechanism used in flow control.
Go-Back-N ARQ:
In Go-Back-N ARQ, if the sent frames are suspected or damaged, all the frames are re-
transmitted from the lost packet to the last packet transmitted.
Selective Repeat ARQ:
Selective repeat ARQ/ Selective Reject ARQ is a type of Sliding Window ARQ in which
only the suspected or damaged frames are re-transmitted.

You might also like