Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
20 views

DCCN Notes Unit1

Uploaded by

pratheepku32
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

DCCN Notes Unit1

Uploaded by

pratheepku32
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 61

Unit 1

Unit I: Introduction: A Brief History – Applications – Computer Networks – Categories of Networks –


Standards and Standards Organizations – Network Architecture – Open Systems and OSI Model –
TCP/IP Architecture.

Communication Media and Data Transmission: Fourier Analysis – Analog and Digital Data Transmission
– Modulation and Demodulation – Transmission Media – Wireless Communications – Data Transmission
Basics – Transmission Mode – Interfacing – Multiplexing.

Error Detection and Correction: Types of Errors – Error Detection – Error Correction. Data Link Control
and Protocol Concepts: Flow Control – Error Control – Asynchronous Protocols – Synchronous Protocols
– High-Level Data Link Control (HDLC).

Computer Network is a collection of two or more computers. It helps users to communicate


more easily.
Basic Terminologies of Computer Networks
 Network: A network is a collection of computers and devices that are connected together to
enable communication and data exchange.
 Nodes: Nodes are devices that are connected to a network. These can include computers, Servers,
Printers, Routers, Switches, and other devices.
 Protocol: A protocol is a set of rules and standards that govern how data is transmitted over a
network. Examples of protocols include TCP/IP, HTTP, and FTP.
 Topology: Network topology refers to the physical and logical arrangement of nodes on a
network. The common network topologies include bus, star, ring, mesh, and tree.
 Service Provider Networks: These types of Networks give permission to take Network Capacity
and Functionality on lease from the Provider. Service Provider Networks include Wireless
Communications, Data Carriers, etc.
 IP Address: An IP address is a unique numerical identifier that is assigned to every device on a
network. IP addresses are used to identify devices and enable communication between them.
 DNS: The Domain Name System (DNS) is a protocol that is used to translate human-readable
domain names (such as www.google.com) into IP addresses that computers can understand.
 Firewall: A firewall is a security device that is used to monitor and control incoming and
outgoing network traffic. Firewalls are used to protect networks from unauthorized access and
other security threats.

Layers of the OSI Model?


The OSI model consists of seven abstraction layers arranged in a top-down order:
1. Physical Layer
2. Data Link Layer
3. Network Layer
4. Transport Layer
5. Session Layer
6. Presentation Layer
7. Application Layer
Physical Layer – Layer 1
The lowest layer of the OSI reference model is the physical layer. The physical layer refers to
the physical communication medium and the technologies to transmit data across that medium. At its
core, data communication is the transfer of digital and electronic signals through various physical
channels like fiber-optic cables, copper cabling, and air. The physical layer includes standards for
technologies and metrics closely related with the channels, such as Bluetooth, NFC, and data transmission
speeds.

Functions of the Physical Layer

 Bit synchronization: The physical layer provides the synchronization of the bits by providing a
clock. This clock controls both sender and receiver thus providing synchronization at the bit level.
 Bit rate control: The Physical layer also defines the transmission rate i.e. the number of bits sent
per second.
 Physical topologies: Physical layer specifies how the different, devices/nodes are arranged in a
network i.e. bus, star, or mesh topology.
 Transmission mode: Physical layer also defines how the data flows between the two connected
devices. The various transmission modes possible are Simplex, half-duplex and full-duplex.

Data Link Layer (DLL) – Layer 2

The data link layer refers to the technologies used to connect two machines across a network
where the physical layer already exists. It manages data frames, which are digital signals encapsulated
into data packets. Flow control and error control of data are often key focuses of the data link layer.
Ethernet is an example of a standard at this level. The data link layer is often split into two sub-layers: the
Media Access Control (MAC) layer and Logical Link Control (LLC) layer.
Functions of the Data Link Layer
 Framing: Framing is a function of the data link layer. It provides a way for a sender to transmit a
set of bits that are meaningful to the receiver. This can be accomplished by attaching special bit
patterns to the beginning and end of the frame.
 Physical addressing: After creating frames, the Data link layer adds physical addresses (MAC
addresses) of the sender and/or receiver in the header of each frame.
 Error control: The data link layer provides the mechanism of error control in which it detects
and retransmits damaged or lost frames.
 Flow Control: The data rate must be constant on both sides else the data may get corrupted thus,
flow control coordinates the amount of data that can be sent before receiving an acknowledgment.
 Access control: When a single communication channel is shared by multiple devices,the MAC
sub-layer of the data link layer helps to determine which device has control over the channel at

Network Layer – Layer 3

The network layer is concerned with concepts such as routing, forwarding, and addressing across
a dispersed network or multiple connected networks of nodes or machines. The network layer may also
manage flow control. Across the internet, the Internet Protocol v4 (IPv4) and IPv6 are used as the main
network layer protocols.

Functions of the Network Layer


 Routing: The network layer protocols determine which route is suitable from source to
destination. This function of the network layer is known as routing.
 Logical Addressing: To identify each device on Internetwork uniquely, the network layer defines
an addressing scheme. The sender & receiver’s IP addresses are placed in the header by the
network layer. Such an address distinguishes each device uniquely and universally.

Transport Layer – Layer 4


The primary focus of the transport layer is to ensure that data packets arrive in the right order,
without losses or errors, or can be seamlessly recovered if required. Flow control, along with error
control, is often a focus at the transport layer. At this layer, commonly used protocols include the
Transmission Control Protocol (TCP), a near-lossless connection-based protocol, and the User Datagram
Protocol (UDP), a lossy connectionless protocol. TCP is commonly used where all data must be intact
(e.g. file share), whereas UDP is used when retaining all packets is less critical (e.g. video streaming).

Functions of the Transport Layer


 Segmentation and Reassembly: This layer accepts the message from the (session) layer, and
breaks the message into smaller units. Each of the segments produced has a header associated
with it. The transport layer at the destination station reassembles the message.
 Service Point Addressing: To deliver the message to the correct process, the transport layer
header includes a type of address called service point address or port address. Thus by specifying
this address, the transport layer makes sure that the message is delivered to the correct process.

Session Layer – Layer 5


The session layer is responsible for network coordination between two separate applications in a
session. A session manages the beginning and ending of a one-to-one application connection and
synchronization conflicts. Network File System (NFS) and Server Message Block (SMB) are commonly
used protocols at the session layer.

Functions of the Session Layer


 Session establishment, maintenance, and termination: The layer allows the two processes to
establish, use and terminate a connection.
 Synchronization: This layer allows a process to add checkpoints that are considered
synchronization points in the data. These synchronization points help to identify the error so that
the data is re-synchronized properly, and ends of the messages are not cut prematurely and data
loss is avoided.
 Dialog Controller: The session layer allows two systems to start communication with each other
in half-duplex or full-duplex.

Presentation Layer – Layer 6


The presentation layer is primarily concerned with the syntax of the data itself for applications to
send and consume. For example, Hypertext Markup Language (HTML), JavaScipt Object Notation
(JSON), and Comma Separated Values (CSV) are all modeling languages to describe the structure of data
at the presentation layer.

Functions of the Presentation Layer

 Translation: For example, ASCII to EBCDIC.


 Encryption/ Decryption: Data encryption translates the data into another form or code. The
encrypted data is known as the ciphertext and the decrypted data is known as plain text. A key
value is used for encrypting as well as decrypting data.
 Compression: Reduces the number of bits that need to be transmitted on the network.

Application Layer – Layer 7


The application layer is concerned with the specific type of application itself and its standardized
communication methods. For example, browsers can communicate using HyperText Transfer Protocol
Secure (HTTPS), and HTTP and email clients can communicate using POP3 (Post Office Protocol
version 3) and SMTP (Simple Mail Transfer Protocol).

Functions of the Application Layer

The main functions of application layer are given below.


 Network Virtual Terminal: It allows a user to log on to a remote host.
 FTAM- File transfer access and management : This application allows a user to
access file in a remote host, retrieve files in remote host and manage or
control files from a remote computer.
 Mail Services : Provide email service.

OSI Model in a Nutshell


Layer Information Device or
No Layer Name Responsibility Form(Data Unit) Protocol

Application Helps in identifying the client and


Message SMTP
7 Layer synchronizing communication.

Data from the application layer is


Presentation JPEG, MPEG,
extracted and manipulated in the required Message
Layer GIF
6 format for transmission.

Establishes Connection, Maintenance,


Session Layer Ensures Authentication, and Ensures Message Gateway
5 security.

Transport Take Service from Network Layer and


Segment Firewall
4 Layer provide it to the Application Layer.

Network Transmission of data from one host to


Packet Router
3 Layer another, located in different networks.

Data Link
Node to Node Delivery of Message. Frame Switch, Bridge
2 Layer
Layer Information Device or
No Layer Name Responsibility Form(Data Unit) Protocol

Physical Establishing Physical Connections Hub, Repeater,


Bits
1 Layer between Devices. Modem, Cables

TCP/IP model
o The TCP/IP model was developed prior to the OSI model.
o The TCP/IP model is not exactly similar to the OSI model.
o The TCP/IP model consists of five layers: the application layer, transport layer, network layer,
data link layer and physical layer.
o The first four layers provide physical standards, network interface, internetworking, and transport
functions that correspond to the first four layers of the OSI model and these four layers are
represented in TCP/IP model by a single layer called the application layer.
o TCP/IP is a hierarchical protocol made up of interactive modules, and each of them provides
specific functionality.

Here, hierarchical means that each upper-layer protocol is supported by two or more lower-level
protocols.

Functions of TCP/IP layers:


Network Access Layer

o A network layer is the lowest layer of the TCP/IP model.


o A network layer is the combination of the Physical layer and Data Link layer defined in the OSI
reference model.
o It defines how the data should be sent physically through the network.
o This layer is mainly responsible for the transmission of the data between two devices on the same
network.
o The functions carried out by this layer are encapsulating the IP datagram into frames transmitted
by the network and mapping of IP addresses into physical addresses.
o The protocols used by this layer are ethernet, token ring, FDDI, X.25, frame relay.

Internet Layer

o An internet layer is the second layer of the TCP/IP model.


o An internet layer is also known as the network layer.
o The main responsibility of the internet layer is to send the packets from any network, and they
arrive at the destination irrespective of the route they take.

Following are the protocols used in this layer are:

IP Protocol: IP protocol is used in this layer, and it is the most significant part of the entire TCP/IP suite.

Following are the responsibilities of this protocol:

o IP Addressing: This protocol implements logical host addresses known as IP addresses. The IP
addresses are used by the internet and higher layers to identify the device and to provide
internetwork routing.
o Host-to-host communication: It determines the path through which the data is to be transmitted.
o Data Encapsulation and Formatting: An IP protocol accepts the data from the transport layer
protocol. An IP protocol ensures that the data is sent and received securely, it encapsulates the
data into message known as IP datagram.
o Fragmentation and Reassembly: The limit imposed on the size of the IP datagram by data link
layer protocol is known as Maximum Transmission unit (MTU). If the size of IP datagram is
greater than the MTU unit, then the IP protocol splits the datagram into smaller units so that they
can travel over the local network. Fragmentation can be done by the sender or intermediate router.
At the receiver side, all the fragments are reassembled to form an original message.
o Routing: When IP datagram is sent over the same local network such as LAN, MAN, WAN, it is
known as direct delivery. When source and destination are on the distant network, then the IP
datagram is sent indirectly. This can be accomplished by routing the IP datagram through various
devices such as routers.

ARP Protocol

o ARP stands for Address Resolution Protocol.


o ARP is a network layer protocol which is used to find the physical address from the IP address.
o The two terms are mainly associated with the ARP Protocol:
o ARP request: When a sender wants to know the physical address of the device, it
broadcasts the ARP request to the network.
o ARP reply: Every device attached to the network will accept the ARP request and process
the request, but only recipient recognize the IP address and sends back its physical address
in the form of ARP reply. The recipient adds the physical address both to its cache
memory and to the datagram header

ICMP Protocol

o ICMP stands for Internet Control Message Protocol.


o It is a mechanism used by the hosts or routers to send notifications regarding datagram problems
back to the sender.
o A datagram travels from router-to-router until it reaches its destination. If a router is unable to
route the data because of some unusual conditions such as disabled links, a device is on fire or
network congestion, then the ICMP protocol is used to inform the sender that the datagram is
undeliverable.
o An ICMP protocol mainly uses two terms:
o ICMP Test: ICMP Test is used to test whether the destination is reachable or not.
o ICMP Reply: ICMP Reply is used to check whether the destination device is responding
or not.
o The core responsibility of the ICMP protocol is to report the problems, not correct them. The
responsibility of the correction lies with the sender.
o ICMP can send the messages only to the source, but not to the intermediate routers because the IP
datagram carries the addresses of the source and destination but not of the router that it is passed
to.

Transport Layer

The transport layer is responsible for the reliability, flow control, and correction of data which is being
sent over the network.
The two protocols used in the transport layer are User Datagram protocol and Transmission control
protocol.

o User Datagram Protocol (UDP)


o It provides connectionless service and end-to-end delivery of transmission.
o It is an unreliable protocol as it discovers the errors but not specify the error.
o User Datagram Protocol discovers the error, and ICMP protocol reports the error to the
sender that user datagram has been damaged.
o UDP consists of the following fields:
Source port address: The source port address is the address of the application program
that has created the message.
Destination port address: The destination port address is the address of the application
program that receives the message.
Total length: It defines the total number of bytes of the user datagram in bytes.
Checksum: The checksum is a 16-bit field used in error detection.
o UDP does not specify which packet is lost. UDP contains only checksum; it does not
contain any ID of a data segment.

o Transmission Control Protocol (TCP)


o It provides a full transport layer services to applications.
o It creates a virtual circuit between the sender and receiver, and it is active for the duration
of the transmission.
o TCP is a reliable protocol as it detects the error and retransmits the damaged frames.
Therefore, it ensures all the segments must be received and acknowledged before the
transmission is considered to be completed and a virtual circuit is discarded.
o At the sending end, TCP divides the whole message into smaller units known as segment,
and each segment contains a sequence number which is required for reordering the frames
to form an original message.
o At the receiving end, TCP collects all the segments and reorders them based on sequence
numbers.

Application Layer

o An application layer is the topmost layer in the TCP/IP model.


o It is responsible for handling high-level protocols, issues of representation.
o This layer allows the user to interact with the application.
o When one application layer protocol wants to communicate with another application layer, it
forwards its data to the transport layer.
o There is an ambiguity occurs in the application layer. Every application cannot be placed inside
the application layer except those who interact with the communication system. For example: text
editor cannot be considered in application layer while web browser using HTTP protocol to
interact with the network where HTTP protocol is an application layer protocol.

Following are the main protocols used in the application layer:


o HTTP: HTTP stands for Hypertext transfer protocol. This protocol allows us to access the data
over the world wide web. It transfers the data in the form of plain text, audio, video. It is known as
a Hypertext transfer protocol as it has the efficiency to use in a hypertext environment where there
are rapid jumps from one document to another.
o SNMP: SNMP stands for Simple Network Management Protocol. It is a framework used for
managing the devices on the internet by using the TCP/IP protocol suite.
o SMTP: SMTP stands for Simple mail transfer protocol. The TCP/IP protocol that supports the e-
mail is known as a Simple mail transfer protocol. This protocol is used to send the data to another
e-mail address.
o DNS: DNS stands for Domain Name System. An IP address is used to identify the connection of a
host to the internet uniquely. But, people prefer to use the names instead of addresses. Therefore,
the system that maps the name to the address is known as Domain Name System.
o TELNET: It is an abbreviation for Terminal Network. It establishes the connection between the
local computer and remote computer in such a way that the local terminal appears to be a terminal
at the remote system.
o FTP: FTP stands for File Transfer Protocol. FTP is a standard internet protocol used for
transmitting the files from one computer to another computer.
Internet Services
Allows us to access huge amount of information such as text, graphics, sound and software over the
internet. Following diagram shows the four different categories of Internet Services.

Communication Services

There are various Communication Services available that offer exchange of information with individuals
or groups. The following table gives a brief introduction to these services:

ElectronicMail
1
Used to send electronic message over the internet.

Telnet
2
Used to log on to a remote computer that is attached to internet.

Newsgroup
3
Offers a forum for people to discuss topics of common interests.

InternetRelayChat(IRC)
4
Allows the people from all over the world to communicate in real time.

MailingLists
5 Used to organize group of internet users to share common information
through e-mail.

InternetTelephony(VoIP)
6 Allows the internet users to talk across internet to any PC equipped to
receive the call.

InstantMessaging
7
Offers real time chat between individuals and group of people. Eg. Yahoo messenger, MSN messenger.

Information Retrieval Services


There exist several Information retrieval services offering easy access to information present on the
internet. The following table gives a brief introduction to these services:

FileTransferProtocol(FTP)
1
Enable the users to transfer files.

Archie
2 It’s updated database of public FTP sites and their content. It helps to
search a file by its name.

Gopher
3
Used to search, retrieve, and display documents on remote sites.

Very Easy Rodent Oriented Netwide Index to Computer Achieved (VERONICA)


4 VERONICA is gopher based resource. It allows access to the information
resource stored on gopher’s servers.

Web Services

Web services allow exchange of information between applications on the web. Using web services,
applications can easily interact with each other.

The web services are offered using concept of Utility Computing.

World Wide Web (WWW)

WWW is also known as W3. It offers a way to access documents spread over the several servers over the
internet. These documents may contain texts, graphics, audio, video, hyperlinks. The hyperlinks allow the
users to navigate between the documents.

Video Conferencing

Video conferencing or Video teleconferencing is a method of communicating by two-way video and


audio transmission with help of telecommunication technologies.

Uses of the Internet


Some of the important usages of the internet are:
 Online Businesses (E-commerce): Online shopping websites have made our life easier, e-
commerce sites like Amazon, Flipkart, and Myntra are providing very spectacular services with
just one click and this is a great use of the Internet.
 Cashless Transactions: All the merchandising companies are offering services to their customers
to pay the bills of the products online via various digital payment apps like Paytm, Google Pay,
etc. UPI payment gateway is also increasing day by day. Digital payment industries are growing
at a rate of 50% every year too because of the INTERNET.
 Education: It is the internet facility that provides a whole bunch of educational material to
everyone through any server across the web. Those who are unable to attend physical classes can
choose any course from the internet and can have point-to-point knowledge of it just by sitting at
home. High-class faculties are teaching online on digital platforms and providing quality
education to students with the help of the Internet.
 Social Networking: The purpose of social networking sites and apps is to connect people all over
the world. With the help of social networking sites, we can talk, and share videos, and images
with our loved ones when they are far away from us. Also, we can create groups for discussion or
for meetings.
 Entertainment: The Internet is also used for entertainment. There are numerous entertainment
options available on the internet like watching movies, playing games, listening to music, etc.
You can also download movies, games, songs, TV Serial, etc., easily from the internet.
What is the Internet Protocol (IP)?

The Internet Protocol (IP) is a protocol, or set of rules, for routing and addressing packets of data so that
they can travel across networks and arrive at the correct destination. Data traversing the Internet is
divided into smaller pieces, called packets. IP information is attached to each packet, and this information
helps routers to send packets to the right place. Every device or domain that connects to the Internet is
assigned an IP address, and as packets are directed to the IP address attached to them, data arrives where
it is needed.

Once the packets arrive at their destination, they are handled differently depending on which transport
protocol is used in combination with IP. The most common transport protocols are TCP and UDP.

Transmission Control Protocol (TCP)

TCP is a connection oriented protocol and offers end-to-end packet delivery. It acts as back bone for
connection.

 Transmission Control Protocol (TCP) corresponds to the Transport Layer of OSI Model.
 TCP is a reliable and connection oriented protocol.

User Datagram Protocol (UDP)

 UDP is connectionless and unreliable protocol. It doesn’t require making a connection with the
host to exchange data. Since UDP is unreliable protocol, there is no mechanism for ensuring that
data sent is received.

File Transfer Protocol (FTP)

FTP is used to copy files from one host to another. FTP offers the mechanism for the same in following
manner:

 FTP creates two processes such as Control Process and Data Transfer Process at both ends i.e. at
client as well as at server.
 FTP establishes two different connections: one is for data transfer and other is for control
information.

Telnet

 Telnet is a protocol used to log in to remote computer on the internet. There are a number of
Telnet clients having user friendly user interface.
Hyper Text Transfer Protocol (HTTP)

 HTTP is a communication protocol. It defines mechanism for communication between browser


and the web server. It is also called request and response protocol because the communication
between browser and server takes place in request and response pairs.

Communication Media and Data Transmission:

Fourier analysis:

Fourier analysis is a method of representing general functions by approximate sum of simple


trigonometric functions. The method is named after mathematician Jean Baptiste Joseph Fourier who
formulated and proved the Fourier series. Fourier analysis is used in electronics, communications and
acoustics.

The Fourier series decomposes a periodic function as a sum of sine and cosine components as expressed
below:

where, g(t) is the periodic function

T is the time period

f is the fundamental frequency expressed as 1/T

an is the sine amplitude of the nth harmonic

bn is the cosine amplitude of the nth harmonic

c is a constant

The values of an, bn and c are computed by the following expressions:


1.AnalogCommunication:
In analog communication the data is transferred with the help of analog signal in between transmitter and
receiver. Any type of data is transferred in analog signal. Any data is converted into electric form first and
after that it is passed through communication channel. Analog communication uses a continuous signal
which varies in amplitude, phase, or some other property with time in proportion to that of a variable.
The below figure illustrates the Analog Communication System:

2DigitalCommunication:
In digital communication digital signal is used rather than analog signal for communication in between
the source and destination. The digital signal consists of discrete values rather than continuous values. In
digital communication physical transfer of data occurs in the form of digital bit stream i.e 0 or 1 over
a point-to-point or point-to-multipoint transmission medium. In digital communication the digital
transmission data can be broken into packets as discrete messages which is not allowed in analog
communication.
The below figure illustrates the Digital Communication System:
Difference between Analog Communication and Digital Communication:
S .No. ANALOG COMMUNICATION DIGITAL COMMUNICATION

In analog communication analog signal is In digital communication digital signal is


01.
used for information transmission. used for information transmission.

Analog communication uses analog signal Digital communication uses digital signal
02. whose amplitude varies continuously with whose amplitude is of two levels either Low
time from 0 to 100. i.e., 0 or either High i.e., 1.

It gets affected by noise highly during It gets affected by noise less during
03. transmission through communication transmission through communication
channel. channel.

In analog communication only limited


It can broadcast large number of channels
04. number of channels can be broadcasted
simultaneously.
simultaneously.

In analog communication error Probability In digital communication error Probability is


05.
is high. low.

In analog communication noise immunity is In digital communication noise immunity is


06.
poor. good.

In digital communication coding is possible.


In analog communication coding is not
07. Different coding techniques can be used to
possible.
detect and correct errors.

Separating out noise and signal in analog Separating out noise and signal in digital
08.
communication is not possible. communication is possible.
S .No. ANALOG COMMUNICATION DIGITAL COMMUNICATION

Analog communication system is having Digital communication system is having less


09.
complex hardware and less flexible. complex hardware and more flexible.

In analog communication for multiplexing


In Digital communication for multiplexing
Frequency Division Multiplexing (FDM) is
10. Time Division Multiplexing (TDM) is used.
used.

11. Analog communication system is low cost. Digital communication system is high cost.

12. It requires low bandwidth. It requires high bandwidth.

13. Power consumption is high. Power consumption is low.

14. It is less portable. Portability is high.

No privacy or privacy is low, so it is not


15. Privacy is high, so it is highly secured.
highly secured.

16. Not assures an accurate data transmission. It assures a more accurate data transmission.

17. Synchronization problem is hard. Synchronization problem is easier.

Modulation and de modulation :

There are two important processes used in data communication


namely, modulation and demodulation. Both these processes make a communication successful by the
transfer of data and information with the minimum distortion, minimum losses and efficient use of
spectrum. The electronic device that is employed to perform modulation and demodulation is called
modem. It performs modulation and demodulation of information during its transmission.

The process of superimposing a message signal on a carrier signal so that the message can be
transmitted over long distances is called modulation. Here, the carrier signal is the signal of high
frequency which is used to carry the message signal. The following figure shows the block diagram of
modulation.
The modulation of a signal is performed at the transmitting end in the communication system with the
help of a modulator circuit (a part of modem). In the modulation, a specific parameter, i.e. amplitude,
frequency or phase, of the carrier signal is altered in accordance with the modulating signal or message
signal. After modulation, the modulated signal is transmitted over the communication channel by a
transmitter.

The common types of modulation that are being extensively used in data communication are − amplitude
modulation, frequency modulation, phase modulation, polarization modulation, pulse code
modulation, quadrature amplitude modulation, etc.

The modulation process is widely used in transmission of signals using electromagnetic waves, radio
waves, optics (in fiber optics), etc.

What is Demodulation?

The process of obtaining the original message from the modulated signal is called demodulation. In
simple words, demodulation is the process of separating a message signal from a carrier signal. The
process of demodulation is shown in the following block diagram.

The electronic circuit that is used to perform the demodulation process is called demodulator, it is the part
of the modem. The process of demodulation is performed at the receiver end of a communication system.

Difference between Modulation and Demodulation

Modulation and demodulation are the basic processes involved in data communication. There are many
differences between modulation and demodulation that are highlighted in the following table −
Basis of Modulation Demodulation
Difference

The process of superimposing The process of extracting


a low energy message signal the message signal from a
Definition on a high energy carrier modulated signal is known
signal is known as as “demodulation”.
“modulation”.

The process of modulation is Demodulation is performed


performed at transmission at receiving end of the
Operation end
end of the communication communication system.
system.

The electronic circuit that is The electronic circuit


required to perform required to done
Circuit
modulation is called demodulation is called
required
modulator. demodulator or sometimes,
detector.

In modulation, the message In demodulation, the


Process signal is added on a carrier message is separated from
wave for transmission. the carrier signal.

Modulation process is need Demodulation is needed


for mixing of two signal of for recovery of original
Need
different parameters together. signal from a mix of two
signals.

The main purpose of The purpose of


modulation is to transmit the demodulation is to regain
Purpose
messages to long distances. the original message at the
receiver end.

The process of modulation is The demodulation involves


Process comparatively simple. relatively more complex
complexity process for the recovery of
data.

In modulation, the parameter


of the signal (such as In demodulation, the signal
Signal
frequency, amplitude, phase, parameter is transformed
transformation
etc.) is transformed from low from high to low value.
to high value.

TRANSMISSION MEDIA
o Transmission media is a communication channel that carries the information from the sender to the
receiver. Data is transmitted through the electromagnetic signals.
o The main functionality of the transmission media is to carry the information in the form of bits
through LAN(Local Area Network).
o It is a physical path between transmitter and receiver in data communication.
o In a copper-based network, the bits in the form of electrical signals.
o In a fibre based network, the bits in the form of light pulses.
o In OSI(Open System Interconnection) phase, transmission media supports the Layer 1. Therefore, it
is considered to be as a Layer 1 component.
o The electrical signals can be sent through the copper wire, fibre optics, atmosphere, water, and
vacuum.
o The characteristics and quality of data transmission are determined by the characteristics of medium
and signal.
o Transmission media is of two types are wired media and wireless media. In wired media, medium
characteristics are more important whereas, in wireless media, signal characteristics are more
important.
o Different transmission media have different properties such as bandwidth, delay, cost and ease of
installation and maintenance.
o The transmission media is available in the lowest layer of the OSI reference model, i.e., Physical
layer.

Some factors need to be considered for designing the transmission media:


o Bandwidth: All the factors are remaining constant, the greater the bandwidth of a medium, the
higher the data transmission rate of a signal.
o Transmission impairment: When the received signal is not identical to the transmitted one due to
the transmission impairment. The quality of the signals will get destroyed due to transmission
impairment.
o Interference: An interference is defined as the process of disrupting a signal when it travels over a
communication medium on the addition of some unwanted signal.

Causes Of Transmission Impairment:


o Attenuation: Attenuation means the loss of energy, i.e., the strength of the signal decreases with
increasing the distance which causes the loss of energy.
o Distortion: Distortion occurs when there is a change in the shape of the signal. This type of
distortion is examined from different signals having different frequencies. Each frequency
component has its own propagation speed, so they reach at a different time which leads to the delay
distortion.
o Noise: When data is travelled over a transmission medium, some unwanted signal is added to it
which creates the noise.

Classification Of Transmission Media:

o Guided Transmission Media


o UnGuided Transmission Media

Wireless communication :

Wireless communication involves the transmission of information over a distance without the help of
wires, cables or any other forms of electrical conductors.
Wireless communication is a broad term that incorporates all procedures and forms of connecting and
communicating between two or more devices using a wireless signal through wireless communication
technologies and devices.

Features of Wireless Communication

The evolution of wireless technology has brought many advancements with its effective features.

 The transmitted distance can be anywhere between a few meters (for example, a television's
remote control) and thousands of kilometers (for example, radio communication).
 Wireless communication can be used for cellular telephony, wireless access to the internet,
wireless home networking, and so on.
 Other examples of applications of radio wireless technology include GPS units, garage door
openers, wireless computer mice, keyboards and headsets, headphones, radio receivers, satellite
television, broadcast television and cordless telephones.

Wireless - Advantages

Wireless communication involves transfer of information without any physical connection between two
or more points. Because of this absence of any 'physical infrastructure', wireless communication has
certain advantages. This would often include collapsing distance or space.

Wireless communication has several advantages; the most important ones are discussed below −

Cost effectiveness

Wired communication entails the use of connection wires. In wireless networks, communication does not
require elaborate physical infrastructure or maintenance practices. Hence the cost is reduced.

Example − Any company providing wireless communication services does not incur a lot of costs, and as
a result, it is able to charge cheaply with regard to its customer fees.
Flexibility

Wireless communication enables people to communicate regardless of their location. It is not necessary to
be in an office or some telephone booth in order to pass and receive messages.

Miners in the outback can rely on satellite phones to call their loved ones, and thus, help improve their
general welfare by keeping them in touch with the people who mean the most to them.

Convenience

Wireless communication devices like mobile phones are quite simple and therefore allow anyone to use
them, wherever they may be. There is no need to physically connect anything in order to receive or pass
messages.

Example − Wireless communications services can also be seen in Internet technologies such as Wi-Fi.
With no network cables hampering movement, we can now connect with almost anyone, anywhere,
anytime.
Speed

Improvements can also be seen in speed. The network connectivity or the accessibility were much
improved in accuracy and speed.

Example − A wireless remote can operate a system faster than a wired one. The wireless control of a
machine can easily stop its working if something goes wrong, whereas direct operation can’t act so fast.
Accessibility

The wireless technology helps easy accessibility as the remote areas where ground lines can’t be properly
laid, are being easily connected to the network.

Example − In rural regions, online education is now possible. Educators no longer need to travel to far-
flung areas to teach their lessons. Thanks to live streaming of their educational modules.
Constant connectivity

Constant connectivity also ensures that people can respond to emergencies relatively quickly.

Example − A wireless mobile can ensure you a constant connectivity though you move from place to
place or while you travel, whereas a wired land line can’t.

DATA TRANSMISSION :
o The way in which data is transmitted from one device to another device is known as transmission
mode.
o The transmission mode is also known as the communication mode.
o Each communication channel has a direction associated with it, and transmission media provide the
direction. Therefore, the transmission mode is also known as a directional mode.
o The transmission mode is defined in the physical layer.
The Transmission mode is divided into three categories:

o Simplex mode
o Half-duplex mode
o Full-duplex mode

Simplex mode

o In Simplex mode, the communication is unidirectional, i.e., the data flow in one direction.
o A device can only send the data but cannot receive it or it can receive the data but cannot send the
data.
o This transmission mode is not very popular as mainly communications require the two-way
exchange

of data. The simplex mode is used in the business field as in sales that do not require any

corresponding reply.

o The radio station is a simplex channel as it transmits the signal to the listeners but never
o allows them to transmit back.
o Keyboard and Monitor are the examples of the simplex mode as a keyboard can only accept the
o data from the user and monitor can only be used to display the data on the screen.
o The main advantage of the simplex mode is that the full capacity of the communication channel
o can be utilized during transmission.

Advantage of Simplex mode:


o In simplex mode, the station can utilize the entire bandwidth of the communication channel,
o so that more data can be transmitted at a time.

Disadvantage of Simplex mode:


o Communication is unidirectional, so it has no inter-communication between devices.

Half-Duplex mode

o In a Half-duplex channel, direction can be reversed, i.e., the station can transmit and receive
o the data as well.
o Messages flow in both the directions, but not at the same time.
o The entire bandwidth of the communication channel is utilized in one direction at a time.
o In half-duplex mode, it is possible to perform the error detection, and if any error occurs,
o then the receiver requests the sender to retransmit the data.
o A Walkie-talkie is an example of the Half-duplex mode. In Walkie-talkie, one party speaks,
o and another party listens. After a pause, the other speaks and first party listens.
o Speaking simultaneously will create the distorted sound which cannot be understood.

Advantage of Half-duplex mode:


o In half-duplex mode, both the devices can send and receive the data and also can
o utilize the entire bandwidth of the communication channel during the transmission of data.

Disadvantage of Half-Duplex mode:


o In half-duplex mode, when one device is sending the data, then another has to wait,
o this causes the delay in sending the data at the right time.

Full-duplex mode

o In Full duplex mode, the communication is bi-directional, i.e., the data flow in both the directions.
o Both the stations can send and receive the message simultaneously.
o Full-duplex mode has two simplex channels. One channel has traffic moving in one
o direction, and another channel has traffic flowing in the opposite direction.
o The Full-duplex mode is the fastest mode of communication between devices.
o The most common example of the full-duplex mode is a telephone network.
o When two people are communicating with each other by a telephone line, both can talk
o and listen at the same time.

Advantage of Full-duplex mode:


o Both the stations can send and receive the data at the same time.

Disadvantage of Full-duplex mode:


o If there is no dedicated path exists between the devices, then the capacity of the
o communication channel is divided into two parts.

Differences b/w Simplex, Half-duplex and Full-duplex mode

Basis for Simplex mode Half-duplex mode Full-duplex mode


comparison
Direction of In simplex mode, the In half-duplex mode, In full-duplex mode, the
communication communication is the communication is communication is bidirectional.
unidirectional. bidirectional, but one
at a time.

Send/Receive A device can only send Both the devices can Both the devices can send and
the data but cannot send and receive the receive the data simultaneously.
receive it or it can only data, but one at a
receive the data but time.
cannot send it.

Performance The performance of half- The performance of The Full-duplex mode has better
duplex mode is better full-duplex mode is performance among simplex
than the simplex mode. better than the half- and half-duplex mode as it
duplex mode. doubles the utilization of the
capacity of the communication
channel.

Example Examples of Simplex Example of half- Example of the Full-duplex


mode are radio, duplex is Walkie- mode is a telephone network.
keyboard, and monitor. Talkies.

INTERFACING AND SERVICES:

Network service provides data Storage, manipulation, presentation, communication.

This is implemented using client-server architecture or peer-to-peer architecture.

Service Interface is used to implement a Service-Oriented Architecture (SOA).


This is implemented to achieve interoperability among the applications among various technologies.

The basis of functions of each and every layered structure is to provide a service to the layer above it.

Types of interface’s services

The types of interface’s services are as follows −

Entities and peer entities

An entity is an active element in each and every layer, It can be either a software entity or hardware entity.
Example of software entity − Process.

Example of hardware entity − I/O chip's.

Services provider and services user

The entities and layer n implement services for the (n+1) which is above the nth layer to

layer n which provides services is called services provider and layer (n+1) which takes

these services is called as services user.

Services Access Points

They are available at the interfaces of n and n+1 layer. Services are available at SAP’s that means the layer
n SAPs are those placed at the interfaces where layer n+1 access the service being offered.

Interface Data Unit (IDU)

For the successful exchange of information between two layers, a set of rules about the interfaces should be
presented, the layer (n+1) entity passes an IDU to the layer and entity through the SAP. IDU contains
mainly two parts: ICI and SDU.

 SDU − Services Data Unit is a part of IDU, The SDU is the information which is passed across two
networks from peer network to peer entity and then goes to the help layer (n+1).
 ICI − ICI contains the control information which is necessary to help the lower layer n to do the
necessary job.
Protocol data unit

In order to transfer the SDU the layer n entity has to divide into many smaller pieces. Each pieces in given
header is buying the entities to their peer protocol as shown in below figure

Layer n entities exchanging PDU their layer n protocol


The relationship between layer and interfaces is shown in the diagram below −

MULTIPLEXING AND DEMULTIPLEXING:

What is Multiplexing?

Multiplexing is a technique used to combine and send the multiple data streams over a single medium. The proce
known as multiplexing and hardware used for multiplexing is known as a multiplexer.

Multiplexing is achieved by using a device called Multiplexer (MUX) that combines n input lines to generate a sing
many-to-one, i.e., n input lines and one output line.

Demultiplexing is achieved by using a device called Demultiplexer (DEMUX) available at the receiving end.
component signals (one input and n outputs). Therefore, we can say that demultiplexing follows the one-to-many ap

Why Multiplexing?

ADVERTISEMENT

ADVERTISEMENT

o The transmission medium is used to send the signal from sender to receiver. The medium can only have one
o If there are multiple signals to share one medium, then the medium must be divided in such a way that each
available bandwidth. For example: If there are 10 signals and bandwidth of medium is100 units, then the 10
o When multiple signals share the common medium, there is a possibility of collision. Multiplexing concept i
o Transmission services are very expensive.

History of Multiplexing

o Multiplexing technique is widely used in telecommunications in which several telephone calls are carried th
o Multiplexing originated in telegraphy in the early 1870s and is now widely used in communication.
o George Owen Squier developed the telephone carrier multiplexing in 1910.

Concept of Multiplexing

o The 'n' input lines are transmitted through a multiplexer and multiplexer combines the signals to form a com
o The composite signal is passed through a Demultiplexer and demultiplexer separates a signal to componen
respective destinations.

Advantages of Multiplexing:

o More than one signal can be sent over a single medium.


o The bandwidth of a medium can be utilized effectively.

Multiplexing Techniques
Multiplexing techniques can be classified as:

Frequency-division Multiplexing (FDM)

o It is an analog technique.
o Frequency Division Multiplexing is a technique in which the available bandwidth of a single
o transmission medium is subdivided into several channels.

o In the above diagram, a single transmission medium is subdivided into several frequency
o channels, and each frequency channel is given to different devices.
o Device 1 has a frequency channel of range from 1 to 5.
o The input signals are translated into frequency bands by using modulation techniques,

and they are combined by a multiplexer to form a composite signal.

o The main aim of the FDM is to subdivide the available bandwidth into different frequency

channels and allocate them to different devices.

o Using the modulation technique, the input signals are transmitted into frequency
bands and then combined to form a composite signal.

o The carriers which are used for modulating the signals are known as sub-carriers.
o They are represented as f1,f2..fn.
o FDM is mainly used in radio broadcasts and TV networks.

Advantages Of FDM:

o FDM is used for analog signals.


o FDM process is very simple and easy modulation.
o A Large number of signals can be sent through an FDM simultaneously.
o It does not require any synchronization between sender and receiver.

Disadvantages Of FDM:

o FDM technique is used only when low-speed channels are required.


o It suffers the problem of crosstalk.
o A Large number of modulators are required.
o It requires a high bandwidth channel.

Applications Of FDM:

o FDM is commonly used in TV networks.


o It is used in FM and AM broadcasting. Each FM radio station has different frequencies

, and they are multiplexed to form a composite signal.


o The multiplexed signal is transmitted in the air.

Wavelength Division Multiplexing (WDM)

o Wavelength Division Multiplexing is same as FDM except that the optical signals are

transmitted through the fibre optic cable.

o WDM is used on fibre optics to increase the capacity of a single fibre.


o It is used to utilize the high data rate capability of fibre optic cable.
o It is an analog multiplexing technique.
o Optical signals from different source are combined to form a wider band of light

with the help of multiplexer.

o At the receiving end, demultiplexer separates the signals to transmit them

to their respective destinations.

o Multiplexing and Demultiplexing can be achieved by using a prism.


o Prism can perform a role of multiplexer by combining the various
o optical signals to form a composite signal, and the composite signal is transmitted

through a fibre optical cable.


o Prism also performs a reverse operation, i.e., demultiplexing the signal.

Time Division Multiplexing

o It is a digital technique.
o In Frequency Division Multiplexing Technique, all signals operate at the same time

with different frequency, but in case of Time Division Multiplexing technique,

all signals operate at the same frequency with different time.

o In Time Division Multiplexing technique, the total time available in the channel
o is distributed among different users. Therefore, each user is allocated with different
o time interval known as a Time slot at which data is to be transmitted by the sender.
o A user takes control of the channel for a fixed amount of time.
o In Time Division Multiplexing technique, data is not transmitted simultaneously rather
o the data is transmitted one-by-one.
o In TDM, the signal is transmitted in the form of frames. Frames contain a cycle of time
o slots in which each frame contains one or more slots dedicated to each user.
o It can be used to multiplex both digital and analog signals but mainly used to multiplex digital signals.

There are two types of TDM:

o Synchronous TDM
o Asynchronous TDM

Synchronous TDM

o A Synchronous TDM is a technique in which time slot is preassigned to every device.


o In Synchronous TDM, each device is given some time slot irrespective of the fact that the
o device contains the data or not.
o If the device does not have any data, then the slot will remain empty.
o In Synchronous TDM, signals are sent in the form of frames. Time slots are organized in the
o form of frames. If a device does not have data for a particular time slot, then the empty
o slot will be transmitted.
o The most popular Synchronous TDM are T-1 multiplexing, ISDN multiplexing, and
o SONET multiplexing.
o If there are n devices, then there are n slots.

Concept Of Synchronous TDM

In the above figure, the Synchronous TDM technique is implemented. Each device is allocated

with some time slot. The time slots are transmitted irrespective of whether the sender has data to send or not.

Disadvantages Of Synchronous TDM:

o The capacity of the channel is not fully utilized as the empty slots are also transmitted
o which is having no data. In the above figure, the first frame is completely filled, but in the
o last two frames, some slots are empty. Therefore, we can say that the capacity of the channel
o is not utilized efficiently.
o The speed of the transmission medium should be greater than the total speed of the input lines.
o An alternative approach to the Synchronous TDM is Asynchronous Time Division Multiplexing.

Asynchronous TDM
o An asynchronous TDM is also known as Statistical TDM.
o An asynchronous TDM is a technique in which time slots are not fixed as in the case of
o Synchronous TDM. Time slots are allocated to only those devices which have the data
o to send. Therefore, we can say that Asynchronous Time Division multiplexor transmits o
o nly the data from active workstations.
o An asynchronous TDM technique dynamically allocates the time slots to the devices.
o In Asynchronous TDM, total speed of the input lines can be greater than the capacity of the channel.
o Asynchronous Time Division multiplexor accepts the incoming data streams and creates a
o frame that contains only data with no empty slots.
o In Asynchronous TDM, each slot contains an address part that identifies the source of the data.

o The difference between Asynchronous TDM and Synchronous TDM is that many slots
o in Synchronous TDM are unutilized, but in Asynchronous TDM, slots are fully utilized. This leads to
efficient utilization of the capacity of the channel.
o In Synchronous TDM, if there are n sending devices, then there are n time slots.
o In Asynchronous TDM, if there are n sending devices, then there are m time slots
o where m is less than n (m<n).
o The number of slots in a frame depends on the statistical analysis of the number of input lines.

Concept Of Asynchronous TDM

In the above diagram, there are 4 devices, but only two devices are sending the data, i.e., A and C. Therefore, the d
through the transmission line.

Frame of above diagram can be represented as:


The above figure shows that the data part contains the address to determine the source of the data.

Error Detection

When data is transmitted from one device to another device, the system does not guarantee whether the data
received by the device is identical to the data transmitted by another device. An Error is a situation when
the message received at the receiver end is not identical to the message transmitted.

Types Of Errors
Errors can be classified into two categories:

o Single-Bit Error
o Burst Error

Single-Bit Error:

The only one bit of a given data unit is changed from 1 to 0 or from 0 to 1.

In the above figure, the message which is sent is corrupted as single-bit, i.e., 0 bit is changed to 1.

Single-Bit Error does not appear more likely in Serial Data Transmission. For example, Sender sends the
data at 10 Mbps, this means that the bit lasts only for 1 ?s and for a single-bit error to occurred, a noise must
be more than 1 ?s.

Single-Bit Error mainly occurs in Parallel Data Transmission. For example, if eight wires are used to send
the eight bits of a byte, if one of the wire is noisy, then single-bit is corrupted per byte.

Burst Error:

The two or more bits are changed from 0 to 1 or from 1 to 0 is known as Burst Error.

The Burst Error is determined from the first corrupted bit to the last corrupted bit.

The duration of noise in Burst Error is more than the duration of noise in Single-Bit.

Burst Errors are most likely to occur in Serial Data Transmission.


The number of affected bits depends on the duration of the noise and data rate.

Error Detecting Techniques:

The most popular Error Detecting Techniques are:

o Single parity check


o Two-dimensional parity check
o Checksum
o Cyclic redundancy check

Single Parity Check

o Single Parity checking is the simple mechanism and inexpensive to detect the errors.
o In this technique, a redundant bit is also known as a parity bit which is appended at the end of the
data unit so that the number of 1s becomes even. Therefore, the total number of transmitted bits
would be 9 bits.
o If the number of 1s bits is odd, then parity bit 1 is appended and if the number of 1s bits is even,
then parity bit 0 is appended at the end of the data unit.
o At the receiving end, the parity bit is calculated from the received data bits and compared with the
received parity bit.
o This technique generates the total number of 1s even, so it is known as even-parity checking.
Drawbacks Of Single Parity Checking
o It can only detect single-bit errors which are very rare.
o If two bits are interchanged, then it cannot detect the errors.

Two-Dimensional Parity Check

o Performance can be improved by using Two-Dimensional Parity Check which organizes the data
in the form of a table.
o Parity check bits are computed for each row, which is equivalent to the single-parity check.
o In Two-Dimensional Parity check, a block of bits is divided into rows, and the redundant row of bits
is added to the whole block.
o At the receiving end, the parity bits are compared with the parity bits computed from the received
data.
Drawbacks Of 2D Parity Check
o If two bits in one data unit are corrupted and two bits exactly the same position in another data unit
are also corrupted, then 2D Parity checker will not be able to detect the error.
o This technique cannot be used to detect the 4-bit errors or more in some cases.

Checksum

A Checksum is an error detection technique based on the concept of redundancy.

It is divided into two parts:

Checksum Generator

A Checksum is generated at the sending side. Checksum generator subdivides the data into equal segments
of n bits each, and all these segments are added together by using one's complement arithmetic. The sum is
complemented and appended to the original data, known as checksum field. The extended data is
transmitted across the network.

Suppose L is the total sum of the data segments, then the checksum would be ?L
The Sender follows the given steps:
The block unit is divided into k sections, and each of n bits.
All the k sections are added together by using one's complement to get the sum.
The sum is complemented and it becomes the checksum field.
The original data and checksum field are sent across the network.

Checksum Checker

A Checksum is verified at the receiving side. The receiver subdivides the incoming data into equal
segments of n bits each, and all these segments are added together, and then this sum is complemented. If
the complement of the sum is zero, then the data is accepted otherwise data is rejected.

The Receiver follows the given steps:


The block unit is divided into k sections and each of n bits.
All the k sections are added together by using one's complement algorithm to get the sum.
The sum is complemented.
If the result of the sum is zero, then the data is accepted otherwise the data is discarded.

Cyclic Redundancy Check (CRC)

CRC is a redundancy error technique used to determine the error.

Following are the steps used in CRC for error detection:

o In CRC technique, a string of n 0s is appended to the data unit, and this n number is less than the
number of bits in a predetermined number, known as division which is n+1 bits.
o Secondly, the newly extended data is divided by a divisor using a process is known as binary
division. The remainder generated from this division is known as CRC remainder.
o Thirdly, the CRC remainder replaces the appended 0s at the end of the original data. This newly
generated unit is sent to the receiver.
o The receiver receives the data followed by the CRC remainder. The receiver will treat this whole
unit as a single unit, and it is divided by the same divisor that was used to find the CRC remainder.

If the resultant of this division is zero which means that it has no error, and the data is accepted.

If the resultant of this division is not zero which means that the data consists of an error. Therefore, the data
is discarded.
Let's understand this concept through an example:

Suppose the original data is 11100 and divisor is 1001.

CRC Generator
o A CRC generator uses a modulo-2 division. Firstly, three zeroes are appended at the end of the data
as the length of the divisor is 4 and we know that the length of the string 0s to be appended is
always one less than the length of the divisor.
o Now, the string becomes 11100000, and the resultant string is divided by the divisor 1001.
o The remainder generated from the binary division is known as CRC remainder. The generated value
of the CRC remainder is 111.
o CRC remainder replaces the appended string of 0s at the end of the data unit, and the final string
would be 11100111 which is sent across the network.
CRC Checker
o The functionality of the CRC checker is similar to the CRC generator.
o When the string 11100111 is received at the receiving end, then CRC checker performs the modulo-
2 division.
o A string is divided by the same divisor, i.e., 1001.
o In this case, CRC checker generates the remainder of zero. Therefore, the data is accepted.
Data link control and protocol concepts:

Flow control:

Data Link Control is the service provided by the Data Link Layer to provide reliable data

transfer over the physical medium. For example, In the half-duplex transmission mode, one

device can only transmit the data at a time. If both the devices at the end of the links transmit

the data simultaneously, they will collide and leads to the loss of the information.

The Data link layer provides the coordination among the devices so that no collision occurs.

The Data link layer provides three functions:

o Line discipline
o Flow Control
o Error Control

Line Discipline

o Line Discipline is a functionality of the Data link layer that provides the coordination
o among the link systems. It determines which device can send, and when it can send the data.

Line Discipline can be achieved in two ways:

o ENQ/ACK
o Poll/select

END/ACK
END/ACK stands for Enquiry/Acknowledgement is used when there is no wrong receiver

available on the link and having a dedicated path between the two devices so that the device

capable of receiving the transmission is the intended one.

END/ACK coordinates which device will start the transmission and whether the recipient is ready or not.

Working of END/ACK

The transmitter transmits the frame called an Enquiry (ENQ) asking whether the receiver is

available to receive the data or not.

The receiver responses either with the positive acknowledgement(ACK) or with the

negative acknowledgement(NACK) where positive acknowledgement means that the

receiver is ready to receive the transmission and negative acknowledgement means that the

receiver is unable to accept the transmission.

Following are the responses of the receiver:

o If the response to the ENQ is positive, the sender will transmit its data, and once
o all of its data has been transmitted, the device finishes its transmission with an EOT (
o END-of-Transmission) frame.
o If the response to the ENQ is negative, then the sender disconnects and restarts the
o transmission at another time.
o If the response is neither negative nor positive, the sender assumes that the ENQ
o frame was lost during the transmission and makes three attempts to establish
Poll/Select

The Poll/Select method of line discipline works with those topologies where one device is

designated as a primary station, and other devices are secondary stations.

Working of Poll/Select

o In this, the primary device and multiple secondary devices consist of a single transmission line,
o and all the exchanges are made through the primary device even though the destination is a
o secondary device.
o The primary device has control over the communication link, and the secondary device
o follows the instructions of the primary device.
o The primary device determines which device is allowed to use the communication channel.
o Therefore, we can say that it is an initiator of the session.
o If the primary device wants to receive the data from the secondary device, it asks the
o secondary device that they anything to send, this process is known as polling.
o If the primary device wants to send some data to the secondary device, then it tells the
o target secondary to get ready to receive the data, this process is known as selecting.

Select

o The select mode is used when the primary device has something to send.
o When the primary device wants to send some data, then it alerts the secondary device
o for the upcoming transmission by transmitting a Select (SEL) frame, one field of the
o frame includes the address of the intended secondary device.
o When the secondary device receives the SEL frame, it sends an acknowledgement that
o indicates the secondary ready status.
o If the secondary device is ready to accept the data, then the primary device sends
o two or more data frames to the intended secondary device. Once the data has been transmitted,
o the secondary sends an acknowledgement specifies that the data has been received.
Poll

o The Poll mode is used when the primary device wants to receive some data from the secondary device.
o When a primary device wants to receive the data, then it asks each device whether it has anything to
o send.
o Firstly, the primary asks (poll) the first secondary device, if it responds with the NACK
o (Negative Acknowledgement) means that it has nothing to send. Now, it approaches the
o second secondary device, it responds with the ACK means that it has the data to send.
o The secondary device can send more than one frame one after another or sometimes
o it may be required to send ACK before sending each one, depending on the type of the
o protocol being used.

Flow Control

o It is a set of procedures that tells the sender how much data it can transmit before the data overwhelms the r
o The receiving device has limited speed and limited memory to store the data. Therefore, the receiving
sending device to stop the transmission temporarily before the limits are reached.
o It requires a buffer, a block of memory for storing the information until they are processed.

Two methods have been developed to control the flow of data:

o Stop-and-wait
o Sliding window

Stop-and-wait

o In the Stop-and-wait method, the sender waits for an acknowledgement after every frame it sends.
o When acknowledgement is received, then only next frame is sent. The process of alternately
o sending and waiting of a frame continues until the sender transmits the EOT (End of transmission) frame.

Advantage of Stop-and-wait

The Stop-and-wait method is simple as each frame is checked and acknowledged before the next frame is sent.

Disadvantage of Stop-and-wait

Stop-and-wait technique is inefficient to use as each frame must travel across all the way to the receiver,

and an acknowledgement travels all the way before the next frame is sent. Each frame sent and

received uses the entire time needed to traverse the link.

Sliding Window

o The Sliding Window is a method of flow control in which a sender can transmit the several
o frames before getting an acknowledgement.
o In Sliding Window Control, multiple frames can be sent one after the another due to which
o capacity of the communication channel can be utilized efficiently.
o A single ACK acknowledge multiple frames.
o Sliding Window refers to imaginary boxes at both the sender and receiver end.
o The window can hold the frames at either end, and it provides the upper limit on the
o number of frames that can be transmitted before the acknowledgement.
o Frames can be acknowledged even when the window is not completely filled.
o The window has a specific size in which they are numbered as modulo-n means that
o they are numbered from 0 to n-1. For example, if n = 8, the frames are numbered
o from 0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7,0,1........
o The size of the window is represented as n-1. Therefore, maximum n-1
o frames can be sent before acknowledgement.
o When the receiver sends the ACK, it includes the number of the next frame that
o it wants to receive. For example, to acknowledge the string of frames ending with
o frame number 4, the receiver will send the ACK containing the number 5.
o When the sender sees the ACK with the number 5, it got to know that the
o frames from 0 through 4 have been received.

Sender Window

o At the beginning of a transmission, the sender window contains n-1 frames, and
o when they are sent out, the left boundary moves inward shrinking the size of the window.
o For example, if the size of the window is w if three frames are sent out, then the number of
o frames left out in the sender window is w-3.
o Once the ACK has arrived, then the sender window expands to the number which
o will be equal to the number of frames acknowledged by ACK.
o For example, the size of the window is 7, and if frames 0 through 4 have been sent out
o and no acknowledgement has arrived, then the sender window contains only two
o frames, i.e., 5 and 6. Now, if ACK has arrived with a number 4 which means that 0 through
o 3 frames have arrived undamaged and the sender window is expanded to include the next four frames.
o Therefore, the sender window contains six frames (5,6,7,0,1,2).
Receiver Window

o At the beginning of transmission, the receiver window does not contain n frames, but it contains
o n-1 spaces for frames.
o When the new frame arrives, the size of the window shrinks.
o The receiver window does not represent the number of frames received, but it represents the
o number of frames that can be received before an ACK is sent. For example, the size of the
o window is w, if three frames are received then the number of spaces available in the window is (w-3).
o Once the acknowledgement is sent, the receiver window expands by the number equal to the
o number of frames acknowledged.
o Suppose the size of the window is 7 means that the receiver window contains seven spaces for
o seven frames. If the one frame is received, then the receiver window shrinks and moving
o the boundary from 0 to 1. In this way, window shrinks one by one, so window now contains
o the six spaces. If frames from 0 through 4 have sent, then the window contains two spaces
o before an acknowledgement is sent.
Error Control

Error Control is a technique of error detection and retransmission.

Categories of Error Control:

Stop-and-wait ARQ

Stop-and-wait ARQ is a technique used to retransmit the data in case of damaged or lost frames.

This technique works on the principle that the sender will not transmit the next frame until it receives

the acknowledgement of the last transmitted frame.

Four features are required for the retransmission:


o The sending device keeps a copy of the last transmitted frame until the acknowledgement is received.
o Keeping the copy allows the sender to retransmit the data if the frame is not received correctly.
o Both the data frames and the ACK frames are numbered alternately 0 and 1 so that they can be
o identified individually. Suppose data 1 frame acknowledges the data 0 frame means that the
o data 0 frame has been arrived correctly and expects to receive data 1 frame.
o If an error occurs in the last transmitted frame, then the receiver sends the NAK frame which is
o not numbered. On receiving the NAK frame, sender retransmits the data.
o It works with the timer. If the acknowledgement is not received within the allotted time, then the
o sender assumes that the frame is lost during the transmission, so it will retransmit the frame.

Two possibilities of the retransmission:

o Damaged Frame: When the receiver receives a damaged frame, i.e., the frame contains an error,
o then it returns the NAK frame. For example, when the data 0 frame is sent, and then the receiver
o sends the ACK 1 frame means that the data 0 has arrived correctly, and transmits the data 1 frame.
o The sender transmits the next frame: data 1. It reaches undamaged, and the receiver returns ACK 0.
o The sender transmits the next frame: data 0. The receiver reports an error and returns the
o NAK frame. The sender retransmits the data 0 frame.
o Lost Frame: Sender is equipped with the timer and starts when the frame is transmitted.
o Sometimes the frame has not arrived at the receiving end so that it can be acknowledged
o neither positively nor negatively. The sender waits for acknowledgement until the timer goes off.
o If the timer goes off, it retransmits the last transmitted frame.

Sliding Window ARQ

SlidingWindow ARQ is a technique used for continuous transmission error control.

Three Features used for retransmission:

o In this case, the sender keeps the copies of all the transmitted frames until they have been
o acknowledged. Suppose the frames from 0 through 4 have been transmitted, and the last
o acknowledgement was for frame 2, the sender has to keep the copies of frames 3 and 4
o until they receive correctly.
o The receiver can send either NAK or ACK depending on the conditions. The NAK frame
o tells the sender that the data have been received damaged. Since the sliding window is a
o continuous transmission mechanism, both ACK and NAK must be numbered for the
o identification of a frame. The ACK frame consists of a number that represents the next frame
o which the receiver expects to receive. The NAK frame consists of a number that represents the
o damaged frame.
o The sliding window ARQ is equipped with the timer to handle the lost acknowledgements.
o Suppose then n-1 frames have been sent before receiving any acknowledgement.
o The sender waits for the acknowledgement, so it starts the timer and waits before
o sending any more. If the allotted time runs out, the sender retransmits one or all the frames
o depending upon the protocol used.

Two protocols used in sliding window ARQ:

o Go-Back-n ARQ: In Go-Back-N ARQ protocol, if one frame is lost or damaged,


o then it retransmits all the frames after which it does not receive the positive ACK.

Three possibilities can occur for retransmission:

o Damaged Frame: When the frame is damaged, then the receiver sends a NAK frame.

In the above figure, three frames have been transmitted before an error discovered in the third frame.
In this case, ACK 2 has been returned telling that the frames 0,1 have been received successfully

without any error. The receiver discovers the error in data 2 frame, so it returns the NAK 2 frame.

The frame 3 is also discarded as it is transmitted after the damaged frame. Therefore, the sender

retransmits the frames 2,3.

o Lost Data Frame: In Sliding window protocols, data frames are sent sequentially.
o If any of the frames is lost, then the next frame arrive at the receiver is out of sequence.
o The receiver checks the sequence number of each of the frame, discovers the frame
o that has been skipped, and returns the NAK for the missing frame. The sending device
o retransmits the frame indicated by NAK as well as the frames transmitted after the lost frame.
o Lost Acknowledgement: The sender can send as many frames as the windows allow before
o waiting for any acknowledgement. Once the limit of the window is reached, the sender
o has no more frames to send; it must wait for the acknowledgement. If the acknowledgement is lost,
o then the sender could wait forever. To avoid such situation, the sender is equipped with
o the timer that starts counting
o whenever the window capacity is reached. If the acknowledgement has not been received
o within the time limit, then the sender retransmits the frame since the last ACK.

Selective-Reject ARQ

o Selective-Reject ARQ technique is more efficient than Go-Back-n ARQ.


o In this technique, only those frames are retransmitted for which negative acknowledgement
o (NAK) has been received.
o The receiver storage buffer keeps all the damaged frames on hold until the frame in error
o is correctly received.
o The receiver must have an appropriate logic for reinserting the frames in a correct order.
o The sender must consist of a searching mechanism that selects only the requested frame
o for retransmission.
Features Synchronous Transmission Asynchronous Transmission

Definition It is a type of transmission that enables It is a form of transmission in which the


synchronized communication by transmitter and receiver have their own
sharing a common clock pulse between internal clocks and hence don't require an
the transmitter and the receiver. external common clock pulse.

Basic The transmission begins with the block It employs the start and stops bits to
header, which contains a bit sequence. precede and follow a character.

Data Unit Data is transmitted as frames in It transmits data one byte at a specific
synchronous transmission. time.

Storage It doesn't require any storage at the The local buffer storages are needed to
terminal end. construct blocks at both ends of the line in
asynchronous transmission.
Transmission The data transfer rate of synchronous The data transfer rate is slow.
speed transmission is fast.

Cost It is complicated and costly. It is simple and cost-effective.

Gap between the There is no gap between data in There is a gap between the data bytes, and
data Synchronous transmission due to the it has start and end bits between which
common clock pulse. actual data is present.

Implementation It is implemented by hardware and It is only implemented by hardware.


software.

Time interval The time delay between two The time delay between two
transmissions is constant. transmissions is random.

Bits The start and stop bits are not utilized The start and stop bits are used to transmit
in data transmission. data with additional overhead.

Synchronized It doesn't require any synchronized It needs synchronized clocks at both ends.
clocks clocks.

Complexity It is simple and easy to design. It is complex to design.

Band Channels It mainly uses both voice-band and It mainly uses voice-band channels that
broad-band channels. have a limited type.

Examples Some examples of synchronous Some examples of asynchronous


transmission are Video Conferencing, transmission are emails, letters, forums,
Chat Rooms, and Telephonic etc.
Conversations.

High-level Data Link Control (HDLC) is a group of communication protocols of the data link layer
for transmitting data between network points or nodes. Since it is a data link protocol, data is
organized into frames. A frame is transmitted via the network to the destination that verifies
its successful arrival. It is a bit - oriented protocol that is applicable for both point - to - point and
multipoint communications.

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)

Types of HDLC Frames

There are three types of HDLC frames. The type of frame is determined by the control field of the frame −

 I-frame − I-frames or Information frames carry user data from the network layer.
 They also include flow and error control information that is piggybacked on user data.
 The first bit of control field of I-frame is 0.
 S-frame − S-frames or Supervisory frames do not contain information field.
 They are used for flow and error control when piggybacking is not required.
 The first two bits of control field of S-frame is 10.
 U-frame − U-frames or Un-numbered frames are used for myriad miscellaneous functions,
 like link management. It may contain an information field, if required.
 The first two bits of control field of U-frame is 11.

You might also like