Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
60 views135 pages

IT Students' Data Communication Guide

This document provides an overview of data communication concepts including: 1. Data communication involves exchanging data between two devices through a communication medium in a meaningful way, ensuring delivery, accuracy, timeliness and low jitter. 2. The five components of a data communication system are the data/message, source, destination, medium, and protocols. 3. There are two types of connections - point-to-point which uses a dedicated link between two devices, and multipoint which connects three or more devices in a broadcast configuration. 4. Protocols like PPP are commonly used to establish point-to-point connections over various physical networks. Multipoint connections allow broadcasting and multicasting of data

Uploaded by

Gvzgjbc Ccdbnmn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views135 pages

IT Students' Data Communication Guide

This document provides an overview of data communication concepts including: 1. Data communication involves exchanging data between two devices through a communication medium in a meaningful way, ensuring delivery, accuracy, timeliness and low jitter. 2. The five components of a data communication system are the data/message, source, destination, medium, and protocols. 3. There are two types of connections - point-to-point which uses a dedicated link between two devices, and multipoint which connects three or more devices in a broadcast configuration. 4. Protocols like PPP are commonly used to establish point-to-point connections over various physical networks. Multipoint connections allow broadcasting and multicasting of data

Uploaded by

Gvzgjbc Ccdbnmn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 135

Shri Vaishnav Vidyapeeth Vishwavidyalaya, Indore (MP)

Think Excellence. Live Excellence.

Shri Vaishnav Institute of Information Technology


Department of Information Technology

Lecture Notes
Data Communication

(BTIT201N)
Session Jan-June 2023

Subject Teacher

Er. Gaurav Shrivastava


B.E. (CSE), M.E. (IT)
Asst. Professor (IT Dept.)
SVIIT-SVVV, Indore
Syllabus
UNIT–I
Introduction: Data Communication Components, Types of Connections, Transmission
Modes, Network Devices, Topologies, Protocols and Standards, OSI Model, Transmission
Media, Bandwidth, Bit Rate, Bit Length, Baseband and Broadband Transmission,
Attenuation, Distortion, Noise, Throughout, Delay and Jitter.

UNIT–II
Data Encoding: Unipolar, Polar, Bipolar, Line and Block Codes. Multiplexing:
Introduction and History, FDM, TDM, WDM, Synchronous and Statistical
TDM.Synchronous and Asynchronous transmission, Serial and Parallel Transmission.

UNIT–III
Error Detection & Correction: Correction, Introduction–Block Coding–Hamming
Distance, CRC, Flow Control and Error Control, Stop and Wait, Error Detection and Error
Go Back– N ARQ, Selective Repeat ARQ, Sliding Window, Piggybacking, Random
Access, CSMA/CD, CDMA/CA

UNIT–IV
Network Switching Techniques: Circuit, Message, Packet and Hybrid Switching
Techniques.X.25, ISDN.Logical Addressing, Ipv4, Ipv6, Address Mapping, ARP, RARP,
BOOTP and DHCP, User Datagram Protocol, Transmission Control Protocol, SCTP.

UNIT–V
Application Layer Protocols: Domain Name Service Protocol, File Transfer Protocol,
TELNET, WWW and Hyper Text Transfer Protocol, Simple Network Management
Protocol, Simple Mail Transfer Protocol, Post Office Protocol v3.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
UNIT–I
1. Introduction
In today’s world, the communication is deciding the all facts of the growth. Effective,
easiest, understandable, timely communications are creating the world’s better growth. The
growth of the internet, telecommunication field, communication devices make the people
interactive, happily and wealthy. An event happens in place can be communicated to any
place in the world. For example, a live sports event happened in Calcutta can be viewed by
the people sitting in any place in the world.

The network allows people to communicate information to any people in the world by
means of one-to-one, one-to-many or all. In this chapter, we are going to study about the
introduction of networks, network hardware, network software and network architecture.

2. Data Communication
2.1 Data
The word ‘data’ refers that representation of information in an understandable form by the
two parties who are creating and using it. The Webster dictionary defined data as
“information in digital form that can be transmitted or processed”. The data may be in any
form such as text, symbols, images, videos, signals and so on.

2.2 Communication
Communication is a referred as exchanging information from one entity to another entity in
a meaningful way. The entities may be referred as human being, machines, animals, birds,
etc. The communication could be done between the two entities / parties. The meaningful
way refers that the meaning of the communication must be understandable between the two
entities.

The figure 1.1 shows the model for communication between two people.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
In figure 1.1 the speaker (a person) making oral communication to the listener (other
person) in an understandable language ‘English’ using the word “Hello”. To provide the
communication, the information must be carried by a carrier. The carrier may be either
wire or wireless. In oral communication between two people, the wireless is acting as a
carrier to carry the information. In computer technology, the carrier is referred as
communication medium. In computer network, the speaker is referred as source of the
information and listener is referred as the receiver or destination of the information.

2.3 Data Communication


From the above two reference, we understand that “Data communication is process of
exchanging data between two devices through a communication medium in a meaningful
way”. The devices must be part of the communication system. The communication system
is made up of the both hardware equipment and software. To provide the effective
communication system, the following four fundamental characteristics must be followed;

1. Delivery: The data to be communicated must be delivered to the correct destination.


2. Accuracy: The data should be delivered accurately as it is without any alteration.
3. Timeliness: The communication system must deliver the data without any delay.
4. Jitter: In network the data are split into smaller groups (packets) and send them
separately. The variation of the arrival between two packets is referred as jitter.

3. Data Communication Components


The following five components are the essential part of the communication system and
figure shows the representation of the components placement in the communication
system.

Fig : Components of Data Communication

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
1. Data/Message: It is the primary part of the communication system. The information is
communicated between the source and destination is called data/message.
2. Source: The source is a device which generates and sends the data to the destination.
3. Destination: It is a device that receives the data.
4. Medium: It acts as carrier to carry the data from the source to the destination. The
carrier provides the path through wire or wireless.
5. Protocol: It is set of rules that govern the data communication in a correct manner.
The source and destination may be computer, mobile phones, workstations, servers, video
cameras and so on. The protocol provides the effective communication. This provides the
methodology how to interact with each other without any loss or interference.

4. Types of Connections
As we have already known that a network is a two or more devices interconnected through
a communication medium. The medium provides the physical pathway between two
devices. The connectivity between the devices is classified into point-to-point and
multipoint.

• Point-to-Point Connection
• Multipoint Connection

4.1 Point-to-Point Connection


A point-to-point connection is a direct link between two devices such as a computer and
a printer. It uses dedicated link between the devices. The entire capacity of the link is used
for the transmission between those two devices. Most of today’s point-to-point connections
are associated with modems and PSTN (Public Switched Telephone Network)
communications. In point to point networks, there exist many connections between
individual pairs of machines.

To move from sources to destination, a packet (short message) may follow different routes.
In networking, the Point-to-Point Protocol (PPP) is a data link protocol commonly used in
establishing a direct connection between two networking nodes. It can provide connection
authentication, transmission encryption, and compression PPP is used over many types of
physical networks including serial cable, phone line, trunk line, cellular telephone,
specialized radio links, and fiber optic links such as SONET. PPP is also used
over Internet access connections (now marketed as “broadband”).

Internet service providers (ISPs) have used PPP for customer dial-up access to the Internet,
since IP packets cannot be transmitted over a modem line on their own, without some data
link protocol. Two encapsulated forms of PPP, Point-to-Point Protocol over Ethernet
(PPPoE) and Point-to-Point Protocol over ATM (PPPoA), are used most commonly by

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Internet Service Providers (ISPs) to establish a Digital Subscriber Line (DSL) Internet
service connection with customers.

PPP is commonly used as a data link layer protocol for connection over synchronous and
asynchronous circuits, where it has largely superseded the older Serial Line Internet
Protocol (SLIP) and telephone company mandated standards (such as Link Access
Protocol, Balanced (LAPB) in the X.25 protocol suite). PPP was designed to work with
numerous network layer protocols, including Internet Protocol (IP), TRILL, Novell’s
Internetwork Packet Exchange (IPX), NBF and AppleTalk.

4.2 Multipoint Connection


A multipoint connection is a link between three or more devices. It is also known as
Multi-drop configuration. The networks having multipoint configuration are
called Broadcast Networks. In broadcast network, a message or a packet sent by any
machine is received by all other machines in a network. The packet contains address field
that specifies the receiver. Upon receiving a packet, every machine checks the address
field of the packet. If the transmitted packet is for that particular machine, it processes it;
otherwise it just ignores the packet.

Broadcast network provides the provision for broadcasting & multicasting. Broadcasting is
the process in which a single packet is received and processed by all the machines in the
network. It is made possible by using a special code in the address field of the packet.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
When a packet is sent to a subset of the machines i.e. only to few machines in the network
it is known as multicasting. Historically, multipoint connections were used to attach central
CPs to distributed dumb terminals. In today’s LAN environments, multipoint connections
link many network devices in various configurations.

5. Transmission Modes
Communication between two devices can be simplex, half-duplex, or full-duplex.

5.1 Simplex:
In simplex mode, the communication is unidirectional, as on a one-way street. Only one of
the two devices on a link can transmit; the other can only receive. Keyboards and
traditional monitors are examples of simplex devices. The keyboard can only introduce
input; the monitor can only accept output. The simplex mode can use the entire capacity of
the channel to send data in one direction.

5.2 Half-Duplex:
In half-duplex mode, each station can both transmit and receive, but not at the same time.
When one device is sending, the other can only receive, and vice versa. In a half-duplex
transmission, the entire capacity of a channel is taken over by whichever of the two devices
is transmitting at the time. Walkie-talkies and CB (citizens band) radios are both half-
duplex systems. The half-duplex mode is used in cases where there is no need for
communication in both directions at the same time; the entire capacity of the channel can
be utilized for each direction.

5.3 Full-Duplex:
In full-duplex both stations can transmit and receive simultaneously. The full-duplex mode
is like a two way street with traffic flowing in both directions at the same time. In full-
duplex mode, signals going in one direction share the capacity of the link: with signals
going in the other direction. One common example of full-duplex communication is the
telephone network. When two people are communicating by a telephone line, both can talk

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
and listen at the same time. The full-duplex mode is used when communication in both
directions is required all the time. The capacity of the channel, however, must be divided
between the two directions.

6. Network
A network is a set of devices (often referred to as nodes) connected by communication
links. A node can be a computer, printer, or any other device capable of sending and/or
receiving data generated by other nodes on the network.

6.1 Network Criteria


A network must be able to meet a certain number of criteria. The most important of these
are performance, reliability, and security.

Performance:
Performance can be measured in many ways, including transit time and response time.
Transit time is the amount of time required for a message to travel from one device to
another. Response time is the elapsed time between an inquiry and a response. The
performance of a network depends on a number of factors, including the number of users,
the type of transmission medium, the capabilities of the connected hardware, and the
efficiency of the software.

Reliability:
Network reliability is measured by the frequency of failure, the time it takes a link to
recover from a failure, and the network's robustness in a catastrophe.

Security:
Network security issues include protecting data from unauthorized access, protecting data
from damage and development, and implementing policies and procedures for recovery
from breaches and data losses.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
6.2 Networking Devices

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
7. NETWORK TOPOLOGY:
The term physical topology refers to the way in which a network is laid out physically. One
or more devices connect to a link; two or more links form a topology. The topology of a
network is the geometric representation of the relationship of all the links and linking
devices (usually called nodes) to one another. There are four basic topologies possible:
mesh, star, bus, and ring.

7.1 Mesh: In a mesh topology, every device has a dedicated point-to-point link to every
other device. The term dedicated means that the link carries traffic only between the
two devices it connects. To find the number of physical links in a fully connected mesh
network with n nodes, we first consider that each node must be connected to every other
node. Node 1 must be connected to n - I nodes, node 2 must be connected to n – 1
nodes, and finally node n must be connected to n - 1 nodes. We need n(n - 1) physical
links. However, if each physical link allows communication in both directions (duplex
mode), we can divide the number of links by 2. In other words, we can say that in a
mesh topology, we need n(n -1) /2 duplex-mode links. To accommodate that many
links, every device on the network must have n – 1 input/output ports to be connected to
the other n - 1 stations.

Advantages:
1. The use of dedicated links guarantees that each connection can carry its own data load,
thus eliminating the traffic problems that can occur when links must be shared by multiple
devices.
2. A mesh topology is robust. If one link becomes unusable, it does not incapacitate the
entire system.
3. There is the advantage of privacy or security. When every message travels along a
dedicated line, only the intended recipient sees it. Physical boundaries prevent other users
from gaining access to messages.
4. Point-to-point links make fault identification and fault isolation easy. Traffic can be
routed to avoid links with suspected problems. This facility enables the network manager to
discover the precise location of the fault and aids in finding its cause and solution.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Disadvantages:
1. Disadvantage of a mesh are related to the amount of cabling because every device must
be connected to every other device.
2. Installation and reconnection are difficult.
3. The sheer bulk of the wiring can be greater than the available space (in walls, ceilings, or
floors) can accommodate.
4. The hardware required to connect each link (I/O ports and cable) can be prohibitively
expensive.

7.2. Star Topology: In a star topology, each device has a dedicated point-to-point link only
to a central controller, usually called a hub. The devices are not directly linked to one
another. Unlike a mesh topology, a star topology does not allow direct traffic between
devices. The controller acts as an exchange: If one device wants to send data to another, it
sends the data to the controller, which then relays the data to the other connected device.

Advantages:
1. A star topology is less expensive than a mesh topology. In a star, each device needs only
one link and one I/O port to connect it to any number of others.
2. Easy to install and reconfigure.
3. Far less cabling needs to be housed, and additions, moves, and deletions involve only
one connection: between that device and the hub.
4. Other advantage include robustness. If one link fails, only that link is affected. All other
links remain active. This factor also lends itself to easy fault identification and fault
isolation. As long as the hub is working, it can be used to monitor link problems and
bypass defective links.

Disadvantages:
One big disadvantage of a star topology is the dependency of the whole topology on one
single point, the hub. If the hub goes down, the whole system is dead. Although a star
requires far less cable than a mesh, each node must be linked to a central hub. For this

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
reason, often more cabling is required in a star than in some other topologies (such as ring
or bus).

7.2 BUS: A bus topology is multipoint. One long cable acts as a backbone to link all the
devices in a network. Nodes are connected to the bus cable by drop lines and taps. A
drop line is a connection running between the device and the main cable. A tap is a
connector that either splices into the main cable or punctures the sheathing of a cable to
create a contact with the metallic core. As a signal travels along the backbone, some of
its energy is transformed into heat. Therefore, it becomes weaker and weaker as it
travels farther and farther. For this reason there is a limit on the number of taps a bus
can support and on the distance between those taps.

Advantages:
Advantages of a bus topology include ease of installation. Backbone cable can be laid
along the most efficient path, then connected to the nodes by drop lines of various lengths.
In this way, a bus uses less cabling than mesh or star topologies. In a star, for example, four
network devices in the same room require four lengths of cable reaching all the way to the
hub. In a bus, this redundancy is eliminated. Only the backbone cable stretches through the
entire facility. Each drop line has to reach only as far as the nearest point on the backbone.

Disadvantages:
Disadvantages include difficult reconnection and fault isolation. A bus is usually designed
to be optimally efficient at installation. It can therefore be difficult to add new devices.
Signal reflection at the taps can cause degradation in quality. This degradation can be
controlled by limiting the number and spacing of devices connected to a given length of
cable. Adding new devices may therefore require modification or replacement of the
backbone. In addition, a fault or break in the bus cable stops all transmission, even between
devices on the same side of the problem. The damaged area reflects signals back in the
direction of origin, creating noise in both directions.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
7.4 RING: In a ring topology, each device has a dedicated point-to-point connection with
only the two devices on either side of it. A signal is passed along the ring in one direction,
from device to device, until it reaches its destination. Each device in the ring incorporates a
repeater. When a device receives a signal intended for another device, its repeater
regenerates the bits and passes them along.
Advantages:
A ring is relatively easy to install and reconfigure. Each device is linked to only its
immediate neighbours (either physically or logically). To add or delete a device requires
changing only two connections. The only constraints are media and traffic considerations
(maximum ring length and number of devices). In addition, fault isolation is simplified.
Generally in a ring, a signal is circulating at all times. If one device does not receive a
signal within a specified period, it can issue an alarm. The alarm alerts the network
operator to the problem and its location.
Disadvantages:
Unidirectional traffic can be a disadvantage. In a simple ring, a break in the ring (such as a
disabled station) can disable the entire network. This weakness can be solved by using a
dual ring or a switch capable of closing off the break. Ring topology was prevalent when
IBM introduced its local-area network Token Ring. Today, the need for higher-speed
LANs has made this topology less popular.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
8. Protocols & Standards
8.1 Protocol: A protocol is a set of rules that govern data communications. It represents an
agreement between the communicating devices.
• Syntax
• Semantics
• Timing

8.1.1 Syntax: The term syntax refers to the structure or format of the data, meaning the
order in which they are presented. For example, a simple protocol might expect the first 8
bits of data to be the address of the sender, the second 8 bits to be the address of the
receiver, and the rest of the stream to be the message itself.

8.1.2 Semantics: The word semantics refers to the meaning of each section of bits. How is
a particular pattern to be interpreted, and what action is to be taken based on that
interpretation? For example, does an address identify the route to be taken or the final
destination of the message?

8.1.3 Timing: The term timing refers to two characteristics: when data should be sent and
how fast they can be sent. For example, if a sender produces data at 100 Mbps but the
receiver can process data at only 1 Mbps, the transmission will overload the receiver and
some data will be lost.

8.2 Standards
An association of organizations, governments, manufacturers and users form the standards
organizations and are responsible for developing, coordinating and maintaining the
standards. The intent is that all data communications equipment manufacturers and users
comply with these standards. The primary standards organizations for data communication
are:

8.2.1. International Standard Organization (ISO)


ISO is the international organization for standardization on a wide range of subjects. It is
comprised mainly of members from the standards committee of various governments
throughout the world. It is even responsible for developing models which provides high
level of system compatibility, quality enhancement, improved productivity and reduced
costs. The ISO is also responsible for endorsing and coordinating the work of the other
standards organizations.

8.2.2. International Telecommunications Union-Telecommunication Sector(ITU-T)


ITU-T is one of the four permanent parts of the International Telecommunications Union
based in Geneva, Switzerland. It has developed three sets of specifications: the V series for
modem interfacing and data transmission over telephone lines, the X series for data
transmission over public digital networks, email and directory services; the I and Q series

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
for Integrated Services Digital Network (ISDN) and its extension Broadband ISDN. ITU-T
membership consists of government authorities and representatives from many countries
and it is the present standards organization for the United Nations.

8.2.3. Institute of Electrical and Electronics Engineers (IEEE)


IEEE is an international professional organization founded in United States and is
compromised of electronics, computer and communications engineers. It is currently the
world’s largest professional society with over 200,000 members. It develops
communication and information processing standards with the underlying goal of
advancing theory, creativity, and product quality in any field related to electrical
engineering.

8.2.4. American National Standards Institute (ANSI)


ANSI is the official standards agency for the United States and is the U.S voting
representative for the ISO. ANSI is a completely private, non-profit organization
comprised of equipment manufacturers and users of data processing equipment and
services. ANSI membership is comprised of people form professional societies, industry
associations, governmental and regulatory bodies, and consumer goods.

8.2.5. Electronics Industry Association (EIA)


EIA is a non-profit U.S. trade association that establishes and recommends industrial
standards. EIA activities include standards development, increasing public awareness, and
lobbying and it is responsible for developing the RS (recommended standard) series of
standards for data and communications.

9. OSI Model
The OSI model is based on a proposal developed by the International Standards
Organization (ISO) as a first step toward international standardization of the protocols used
in the various layers (Day and Zimmermann, 1983). It was revised in 1995(Day, 1995).
The model is called the ISO-OSI (Open Systems Interconnection) Reference Model
because it deals with connecting open systems—that is, systems that are open for
communication with other systems. The OSI model is a layered framework for the design
of network systems that allows communication between all types of computer systems. It
consists of seven separate but related layers, each of which defines a part of the process of
moving information across a network.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
The OSI model is composed of seven ordered layers: physical (layer 1), data link (layer 2),
network (layer 3), transport (layer 4), session (layer 5), presentation (layer 6), and
application (layer 7). Figure below shows the layers involved when a message is sent from
device A to device B. As the message travels from A to B, it may pass through many
intermediate nodes. These intermediate nodes usually involve only the first three layers of
the OSI model.

9.1. Physical Layer


The physical layer coordinates the functions required to carry a bit stream over a physical
medium. It deals with the mechanical and electrical specifications of the interface and
transmission medium. It also defines the procedures and functions that physical devices
and interfaces have to perform for transmission to occur.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
The physical layer is also concerned with the following:

Physical characteristics of interfaces and medium. The physical layer defines the
characteristics of the interface between the devices and the transmission medium. It also
defines the type of transmission medium.
Representation of bits. The physical layer data consists of a stream of bits (sequence of
Os or 1s) with no interpretation. To be transmitted, bits must be encoded into signals--
electrical or optical. The physical layer defines the type of encoding .
Data rate. The transmission rate-the number of bits sent each second-is also defined by the
physical layer. In other words, the physical layer defines the duration of a bit, which is how
long it lasts.
Synchronization of bits. The sender and receiver not only must use the same bit rate but
also must be synchronized at the bit level. In other words, the sender and the receiver
clocks must be synchronized.
Line configuration. The physical layer is concerned with the connection of devices to the
media. In a point-to-point configuration, two devices are connected through a dedicated
link. In a multipoint configuration, a link is shared among several devices.

Physical topology. The physical topology defines how devices are connected to make a
network. Devices can be connected by using a mesh topology (every device is connected to
every other device), a star topology (devices are connected through a central device), a ring
topology (each device is connected to the next, forming a ring), a bus topology (every
device is on a common link), or a hybrid topology (this is a combination of two or more
topologies).
Transmission mode. The physical layer also defines the direction of transmission between
two devices: simplex, half-duplex, or full-duplex. In simplex mode, only one device can
send; the other can only receive. The simplex mode is a one-way communication. In the
half-duplex mode, two devices can send and receive, but not at the same time. In a full-
duplex (or simply duplex) mode, two devices can send and receive at the same time.

9.2. Data Link Layer


The data link layer transforms the physical layer, a raw transmission facility, to a reliable
link. It makes the physical layer appear error-free to the upper layer (network layer).

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Other responsibilities of the data link layer include the following:

Framing. The data link layer divides the stream of bits received from the network layer
into manageable data units called frames.
Physical addressing. If frames are to be distributed to different systems on the network,
the data link layer adds a header to the frame to define the sender and/or receiver of the
frame. If the frame is intended for a system outside the sender's network, the receiver
address is the address of the device that connects the network to the next one.
Flow control. If the rate at which the data are absorbed by the receiver is less than the rate
at which data are produced in the sender, the data link layer imposes a flow control
mechanism to avoid overwhelming the receiver.
Error control. The data link layer adds reliability to the physical layer by adding
mechanisms to detect and retransmit damaged or lost frames. It also uses a mechanism to
recognize duplicate frames. Error control is normally achieved through a trailer added to
the end of the frame.
Access control. When two or more devices are connected to the same link, data link layer
protocols are necessary to determine which device has control over the link at any given
time.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
9.3. Network Layer
The network layer is responsible for the source-to-destination delivery of a packet, possibly
across multiple networks (links). Whereas the data link layer oversees the delivery of the
packet between two systems on the same network (links), the network layer ensures that
each packet gets from its point of origin to its final destination. If two systems are
connected to the same link, there is usually no need for a network layer. However, if the
two systems are attached to different networks (links) with connecting devices between the
networks (links), there is often a need for the network layer to accomplish source-to-
destination delivery.

Other responsibilities of the network layer include the following:


Logical addressing. The physical addressing implemented by the data link layer handles
the addressing problem locally. If a packet passes the network boundary, we need another
addressing system to help distinguish the source and destination systems. The network
layer adds a header to the packet coming from the upper layer that, among other things,
includes the logical addresses of the sender and receiver.
Routing. When independent networks or links are connected to create intemetworks
(network of networks) or a large network, the connecting devices (called routers or

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
switches) route or switch the packets to their final destination. One of the functions of the
network layer is to provide this mechanism.

9.4. Transport Layer


The transport layer is responsible for process-to-process delivery of the entire message. A
process is an application program running on a host. Whereas the network layer oversees
source- to-destination delivery of individual packets, it does not recognize any relationship
between those packets. It treats each one independently, as though each piece belonged to a
separate message, whether or not it does. The transport layer, on the other hand, ensures
that the whole message arrives intact and in order, overseeing both error control and flow
control at the source- to-destination level.

Other responsibilities of the transport layer include the following:

Service-point addressing. Computers often run several programs at the same time. For
this reason, source-to-destination delivery means delivery not only from one computer to
the next but also from a specific process (running program) on one computer to a specific

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
process (running program) on the other. The transport layer header must therefore include a
type of address called

service-point address (or port address). The network layer gets each packet to the correct
computer; the transport layer gets the entire message to the correct process on that
computer.

Segmentation and reassembly. A message is divided into transmittable segments, with


each segment containing a sequence number. These numbers enable the transport layer to
reassemble the message correctly upon arriving at the destination and to identify and
replace packets that were lost in transmission.

Connection control. The transport layer can be either connectionless or connection


oriented. A connectionless transport layer treats each segment as an independent packet
and delivers it to the transport layer at the destination machine. A connection oriented
transport layer makes a connection with the transport layer at the destination machine first
before delivering the packets. After all the data are transferred, the connection is
terminated.
Flow control. Like the data link layer, the transport layer is responsible for flow control.
However, flow control at this layer is performed end to end rather than across a single link.
Error control. Like the data link layer, the transport layer is responsible for error control.
However, error control at this layer is performed process-to-process rather than across a
single link. The sending transport layer makes sure that the entire message arrives at the
receiving transport layer without error (damage, loss, or duplication). Error correction is
usually achieved through retransmission.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
9.5. Session Layer
The services provided by the first three layers (physical, data link, and network) are not
sufficient for some processes. The session layer is the network dialog controller. It
establishes, maintains, and synchronizes the interaction among communicating systems.
Specific responsibilities of the session layer include the following:

Dialog control. The session layer allows two systems to enter into a dialog. It allows the
communication between two processes to take place in either half duplex (one way at a
time) or full-duplex (two ways at a time) mode.
Synchronization. The session layer allows a process to add checkpoints, or
synchronization points, to a stream of data.

9.6. Presentation Layer


The presentation layer is concerned with the syntax and semantics of the information
exchanged between two systems.

Specific responsibilities of the presentation layer include the following:

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Translation. The processes (running programs) in two systems are usually exchanging
information in the form of character strings, numbers, and so on. The information must be
changed to bit streams before being transmitted. Because different computers use different
encoding systems, the presentation layer is responsible for interoperability between these
different encoding methods. The presentation layer at the sender changes the information
from its sender-dependent format into a common format. The presentation layer at the
receiving machine changes the common format into its receiver-dependent format.
Encryption. To carry sensitive information, a system must be able to ensure privacy.
Encryption means that the sender transforms the original information to another form and
sends the resulting message out over the network. Decryption reverses the original process
to transform the message back to its original form.
Compression. Data compression reduces the number of bits contained in the information.
Data compression becomes particularly important in the transmission of multimedia such
as text, audio, and video.

9.7 Application Layer

The application layer enables the user, whether human or software, to access the network.
It provides user interfaces and support for services such as electronic mail, remote file
access and transfer, shared database management, and other types of distributed
information services.

Specific services provided by the application layer include the following:


Network virtual terminal. A network virtual terminal is a software version of a physical
terminal, and it allows a user to log on to a remote host.
File transfer, access, and management. This application allows a user to access files in a
remote host (to make changes or read data), to retrieve files from a remote computer for
use in the local computer, and to manage or control files in a remote computer locally.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Mail services. This application provides the basis for e-mail forwarding and storage.
Directory services. This application provides distributed database sources and access for
global information about various objects and services.

9.8 Summary of OSI Layers

10. Transmission Media


A transmission medium can be broadly defined as anything that can carry information from
a source to a destination. For example, the transmission medium for two people having a
dinner conversation is the air. The air can also be used to convey the message in a smoke
signal or semaphore. For a written message, the transmission medium might be a mail
carrier, a truck, or an airplane.

In data communications the definition of the information and the transmission medium is
more specific. The transmission medium is usually free space, metallic cable, or fiber-optic
cable. The information is usually a signal that is the result of a conversion of data from
another form.

10.1 Guided Media


Guided media, which are those that provide a conduit from one device to another, include
twisted-pair cable, coaxial cable, and fiber-optic cable. A signal traveling along any of
these media is directed and contained by the physical limits of the medium. Twisted-pair
and coaxial cable use metallic (copper) conductors that accept and transport signals in the
form of electric current. Optical fiber is a cable that accepts and transports signals in the
form of light.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
10.1.1 Twisted-Pair Cable
A twisted pair consists of two conductors (normally copper), each with its own plastic
insulation, twisted together, as shown in Figure 7.3.

One of the wires is used to carry signals to the receiver, and the other is used only as a
ground reference. The receiver uses the difference between the two. In addition to the
signal sent by the sender on one of the wires, interference (noise) and crosstalk may affect
both wires and create unwanted signals. If the two wires are parallel, the effect of these
unwanted signals is not the same in both wires because they are at different locations
relative to the noise or crosstalk sources (e,g., one is closer and the other is farther). This
results in a difference at the receiver. By twisting the pairs, a balance is maintained. For
example, suppose in one twist, one wire is closer to the noise source and the other is
farther; in the next twist, the reverse is true. Twisting makes it probable that both wires are
equally affected by external influences (noise or crosstalk). This means that the receiver,
which calculates the difference between the two, receives no unwanted signals. The
unwanted signals are mostly canceled out. From the above discussion, it is clear that the
number of twists per unit of length (e.g., inch) has some effect on the quality of the cable.

Applications
Twisted-pair cables are used in telephone lines to provide voice and data channels. The
local loop-the line that connects subscribers to the central telephone office-commonly
consists of unshielded twisted-pair cables. The DSL lines that are used by the telephone
companies to provide high-data-rate connections also use the high-bandwidth capability of
unshielded twisted- pair cables. Local-area networks, such as lOBase-T and lOOBase-T,
also use twisted-pair cables.

10.1.2. Coaxial Cable


Coaxial cable (or coax) carries signals of higher frequency ranges than those in twisted pair
cable, in part because the two media are constructed quite differently. Instead of having
two wires, coax has a central core conductor of solid or stranded wire (usually copper)
enclosed in an insulating sheath, which is, in turn, encased in an outer conductor of metal
foil, braid, or a combination of the two. The outer metallic wrapping serves both as a shield
against noise and as the second conductor, which completes the circuit. This outer
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
conductor is also enclosed in an insulating sheath, and the whole cable is protected by a
plastic cover (see Figure 7.7).

Applications
Coaxial cable was widely used in analog telephone networks where a single coaxial
network could carry 10,000 voice signals. Later it was used in digital telephone networks
where a single coaxial cable could carry digital data up to 600 Mbps. However, coaxial
cable in telephone networks has largely been replaced today with fiber-optic cable. Cable
TV networks also use coaxial cables. In the traditional cable TV network, the entire
network used coaxial cable. Later, however, cable TV providers replaced most of the media
with fiber-optic cable; hybrid networks use coaxial cable only at the network boundaries,
near the consumer premises. Cable TV uses RG-59 coaxial cable. Another common
application of coaxial cable is in traditional Ethernet LANs. Because of its high bandwidth,
and consequently high data rate, coaxial cable was chosen for digital transmission in early
Ethernet LANs.

10.1.3. Fiber Optic Cable: A fiber-optic cable is made of glass or plastic and transmits
signals in the form of light. To understand optical fiber, we first need to explore several
aspects of the nature of light. Light travels in a straight line as long as it is moving through
a single uniform If a ray of light traveling through one substance suddenly enters another
substance (of a different density), the ray changes direction. Figure 7.10 shows how a ray
of light changes direction when going from a more dense to a less dense substance.

As the figure shows, if the angle of incidence I (the angle the ray makes with the line
perpendicular to the interface between the two substances) is less than the critical angle, the
ray refracts and moves closer to the surface. If the angle of incidence is equal to the critical
angle, the light bends along the interface. If the angle is greater than the critical angle, the
ray reflects (makes a turn) and travels again in the denser substance. Note that the critical
angle is a property of the substance, and its value differs from one substance to another.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Optical fibers use reflection to guide light through a channel. A glass or plastic core is
surrounded by a cladding of less dense glass or plastic. The difference in density of the two
materials must be such that a beam of light moving through the core is reflected off the
cladding instead of being refracted into it. See Figure 7.11.

10.1.4. Cable Composition


Figure 7.14 shows the composition of a typical fiber-optic cable. The outer jacket is made
of either PVC or Teflon. Inside the jacket are Kevlar strands to strengthen the cable. Kevlar
is a strong material used in the fabrication of bulletproof vests. Below the Kevlar is another
plastic coating to cushion the fiber. The fiber is at the center of the cable, and it consists of
cladding and core.

Applications

Applications
Fiber-optic cable is often found in backbone networks because its wide bandwidth is cost-
effective. Today, with wavelength-division multiplexing (WDM), we can transfer data at a
rate of 1600 Gbps. The SONET network provides such a backbone. Some cable TV
companies use a combination of optical fiber and coaxial cable, thus creating a hybrid
network. Optical fiber provides the backbone structure while coaxial cable provides the

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
connection to the user premises. This is a cost-effective configuration since the narrow
bandwidth requirement at the user end does not justify the use of optical fiber. Local-area
networks such as 100Base-FX network (Fast Ethernet) and 1000Base-X also use fiber-
optic cable.
Advantages and Disadvantages of Optical Fiber

Advantages
Fiber-optic cable has several advantages over metallic cable (twisted pair or coaxial).
a. Higher bandwidth. Fiber-optic cable can support dramatically higher bandwidths (and
hence data rates) than either twisted-pair or coaxial cable. Currently, data rates and
bandwidth utilization over fiber-optic cable are limited not by the medium but by the signal
generation and reception technology available.

b. Less signal attenuation. Fiber-optic transmission distance is significantly greater than


that of other guided media. A signal can run for 50 km without requiring regeneration. We
need repeaters every 5 km for coaxial or twisted-pair cable.
c. Immunity to electromagnetic interference. Electromagnetic noise cannot affect fiber-
optic cables.
d. Resistance to corrosive materials. Glass is more resistant to corrosive materials than
copper.
e. Light weight. Fiber-optic cables are much lighter than copper cables.
f. Greater immunity to tapping. Fiber-optic cables are more immune to tapping than
copper cables. Copper cables create antenna effects that can easily be tapped.

Disadvantages
There are some disadvantages in the use of optical fiber.
a. Installation and maintenance. Fiber-optic cable is a relatively new technology. Its
installation and maintenance require expertise that is not yet available everywhere.
b. Unidirectional light propagation. Propagation of light is unidirectional. If we need
bidirectional communication, two fibers are needed.
c. Cost. The cable and the interfaces are relatively more expensive than those of other
guided media. If the demand for bandwidth is not high, often the use of optical fiber cannot
be justified.

10.2 Unguided Media: Wireless


Unguided media transport electromagnetic waves without using a physical conductor. This
type of communication is often referred to as wireless communication. Signals are
normally broadcast through free space and thus are available to anyone who has a device
capable of receiving them. Unguided signals can travel from the source to destination in
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
several ways: ground propagation, sky propagation, and line-of-sight propagation, as
shown in Figure 7.18. In ground propagation, radio waves travel through the lowest portion
of the atmosphere, hugging the earth. These low- frequency signals emanate in all
directions from the transmitting antenna and follow the curvature of the planet. Distance
depends on the amount of power in the signal: The greater the power, the greater the
distance. In sky propagation, higher-frequency radio waves radiate upward into the
ionosphere where they are reflected back to earth. This type of transmission allows for
Bandwidth, greater distances with lower output power. In line-or-sight propagation, very
high-frequency signals are transmitted in straight lines directly from antenna to antenna.
Antennas must be directional, facing each other, and either tall enough or close enough
together not to be affected by the curvature of the earth. Line-of-sight propagation is tricky
because radio transmissions cannot be completely focused.

11. BIT RATE


It is the number of bits transmitted in one second.
It is expressed as bits per second (bps).
Relation between bit rate and bit interval can be as follows
Bit rate = 1 / Bit interval

12. BIT LENGTH or Bit Interval (Tb)


It is the time required to send one bit.
It is measured in seconds.

13. Baseband and Broadband Transmission


13.1 Baseband Transmission
The signal is transmitted without making any change to it (ie. Without modulation)

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
In baseband transmission, the bandwidth of the signal to be transmitted has to be less than
the bandwidth of the channel.

Ex. Consider a Baseband channel with lower frequency 0Hz and higher frequency 100Hz,
hence its bandwidth is 100 (Bandwidth is calculated by getting the difference between the
highest and lowest frequency).

We can easily transmit a signal with frequency below 100Hz, such a channel whose
bandwidth is more than the bandwidth of the signal is called Wideband channel Logically
a signal with frequency say 120Hz will be blocked resulting in loss of information, such a
channel whose bandwidth is less than the bandwidth of the signal is called Narrowband
channel

13.2 Broad band Transmission


Given a bandpass channel, a digital signal cannot be transmitted directly through it In
broadband transmission we use modulation, i.e we change the signal to analog signal
before transmitting it.

The digital signal is first converted to an analog signal, since we have a bandpass channel
we cannot directly send this signal through the available channel. Ex. Consider the
bandpass channel with lower frequency 50Hz and higher frequency 80Hz, and the signal to
be transmitted has frequency 10Hz.

To pass the analog signal through the bandpass channel, the signal is modulated using a
carrier frequency. Ex. The analog signal (10Hz) is modulated by a carrier frequency of
50Hz resulting in an signal of frequency 60Hz which can pass through our bandpass
channel.

The signal is demodulated and again converted into an digital signal at the other end as
shown in the figure below.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
14. Understand error classification

Errors in the data are basically caused due to the various impairments that occur during the
process of transmission. When there is an imperfect medium or environment exists in the
transmission it prone to errors in the original data. Errors can be classified as follows:
• Attenuation
• Noise
• Distortion,

14.1 Attenuation: As signal travels through the medium, its strength decreases as distance
increases, as shown in the figure 7.1, the example is voice, it becomes weak over the
distance and loses its contents beyond a certain distance. As the distance increases
attenuation also increases.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
14.2 Noise: Noise is defined as an unwanted data. When some electromagnetic signal gets
inserted during the transmission, it is generally called as a Noise. Due to Noise it is
difficult to retrieve the original data or information.

14.3 Distortion: When there is an interference of the different frequencies who travel
across the medium with the different speed, Distortion occurs. So it is important to
have a space (guard space) between the different frequencies.

15. Throughout
Throughput is the actual amount of data that is successfully sent/received over the
communication link. Throughput is presented as kbps, Mbps or Gbps, and can differ from
bandwidth due to a range of technical issues, including latency, packet loss, jitter and more

16. Delay and Jitter


Delay is the time it takes for data to move from one endpoint on the network to another. It
is a complex measurement affected by multiple factors. Jitter, on the other hand, is the
difference in delay between two packets. Similarly, it may also be caused by several factors
on the network.

================

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
UNIT–II
Data Encoding

1. Introduction: Data as well as signals that represent data can either be digital or
analog. Line coding is the process of converting digital data to digital signals. By this
technique we convert a sequence of bits to a digital signal. At the sender side digital
data are encoded into a digital signal and at the receiver side the digital data are
recreated by decoding the digital signal.

A line code is the code used for data transmission of a digital signal over a transmission
line. This process of coding is chosen so as to avoid overlap and distortion of signal
such as inter-symbol interference.

Coding methods: Coding methods are used to convert digital data into digital signals.
There are two types of coding methods:
1 Line Coding
2 Block Coding
2. Line coding
It is the process of converting Digital data into digital signal. In other words, it is
converting of binary data (i.e. A sequence of bits) into digital signal (i.e. a sequence of
discrete, discontinuous voltage pulses)

Figure: Line Coding

Properties of Line Coding


Following are the properties of line coding −
• As the coding is done to make more bits transmit on a single signal, the bandwidth
used is much reduced.
• For a given bandwidth, the power is efficiently used.
• The probability of error is much reduced.
• Error detection is done and the bipolar too has a correction capability.
• Power density is much favorable.
• The timing content is adequate.
• Long strings of 1s and 0s is avoided to maintain transparency.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Types of Line Coding
There are 3 types of Line Coding
1. Unipolar
2. Polar
3. Bi-polar

2.1 Unipolar Signaling


Unipolar signaling is also called as On-Off Keying or simply OOK.
The presence of pulse represents a 1 and the absence of pulse represents a 0.
There are two variations in Unipolar signaling −
• Non Return to Zero NRZNRZ
• Return to Zero RZRZ

2.1.1 Unipolar Non-Return to Zero (NRZ)

In this type of unipolar signaling, a High in data is represented by a positive pulse called
as Mark, which has a duration T0 equal to the symbol bit duration. A Low in data input has
no pulse.
The following figure clearly depicts this.

Advantages
The advantages of Unipolar NRZ are −
• It is simple.
• A lesser bandwidth is required.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Disadvantages
The disadvantages of Unipolar NRZ are −
• No error correction done.
• Presence of low frequency components may cause the signal droop.
• No clock is present.
• Loss of synchronization is likely to occur (especially for long strings
of 1s and 0s).

2.1.2 Unipolar Return to Zero (RZ)

In this type of unipolar signaling, a High in data, though represented by a Mark pulse, its
duration T0 is less than the symbol bit duration. Half of the bit duration remains high but it
immediately returns to zero and shows the absence of pulse during the remaining half of
the bit duration.

It is clearly understood with the help of the following figure.

Advantages
The advantages of Unipolar RZ are −
• It is simple.
• The spectral line present at the symbol rate can be used as a clock.
Disadvantages
The disadvantages of Unipolar RZ are −
• No error correction.
• Occupies twice the bandwidth as unipolar NRZ.
• The signal droop is caused at the places where signal is non-zero at 0 Hz.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
2.2 Polar Signaling
There are two methods of Polar Signaling. They are −
• Polar NRZ
• Polar RZ

2.2.1 Polar NRZ


In this type of Polar signaling, a High in data is represented by a positive pulse, while a
Low in data is represented by a negative pulse. The following figure depicts this well.

Advantages
The advantages of Polar NRZ are −
• It is simple.
• No low-frequency components are present.
Disadvantages
The disadvantages of Polar NRZ are −
• No error correction.
• No clock is present.
• The signal droop is caused at the places where the signal is non-zero at 0 Hz.

2.2.2 Polar RZ
In this type of Polar signaling, a High in data, though represented by a Mark pulse, its
duration T0 is less than the symbol bit duration. Half of the bit duration remains high but it
immediately returns to zero and shows the absence of pulse during the remaining half of
the bit duration.
However, for a Low input, a negative pulse represents the data, and the zero level remains
same for the other half of the bit duration. The following figure depicts this clearly.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Advantages
The advantages of Polar RZ are −
• It is simple.
• No low-frequency components are present.
Disadvantages
The disadvantages of Polar RZ are −
• No error correction.
• No clock is present.
• Occupies twice the bandwidth of Polar NRZ.
• The signal droop is caused at places where the signal is non-zero at 0 Hz.

2.3 Bipolar Signaling


This is an encoding technique which has three voltage levels namely +, - and 0. Such a
signal is called as duo-binary signal.
An example of this type is Alternate Mark Inversion AMIAMI. For a 1, the voltage level
gets a transition from + to – or from – to +, having alternate 1s to be of equal polarity.
A 0 will have a zero voltage level.
Even in this method, we have two types.
• Bipolar NRZ
• Bipolar RZ
From the models so far discussed, we have learnt the difference between NRZ and RZ. It
just goes in the same way here too. The following figure clearly depicts this.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
The above figure has both the Bipolar NRZ and RZ waveforms. The pulse duration and
symbol bit duration are equal in NRZ type, while the pulse duration is half of the symbol
bit duration in RZ type.

Advantages
Following are the advantages −
• It is simple.
• No low-frequency components are present.
• Occupies low bandwidth than unipolar and polar NRZ schemes.
• This technique is suitable for transmission over AC coupled lines, as signal
drooping doesn’t occur here.
• A single error detection capability is present in this.
Disadvantages
• Following are the disadvantages −
• No clock is present.
• Long strings of data causes loss of synchronization.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
3. Block Codes

Block coding adds redundancy to line coding so that error detection can be implemented.
Block coding changes a block of m bits into a block of n bits, where n is larger than m.
Block coding is referred to as an mB/nB encoding technique.
The additional bits added to the original ―m bits‖ are called parity bits or check bits

Example: 4B/5B encoding Here a 4 bit code is converted into a 5 bit code

4. Modulation
• The Process of converting analog data to analog signal is called Modulation.
• Modulation is used to send an information bearing signal over long distances.
• Modulation is the process of varying some characteristic of a periodic wave with an
external signal called carrier signal.
• These carrier signals are high frequency signals and can be transmitted over the air
easily and are capable of traveling long distances.
• The characteristics (amplitude, frequency, or phase) of the carrier signal are varied in
accordance with the information bearing signal (analog data).
• The information bearing signal is also known as the modulating signal.

• The modulating signal is a slowly varying – as opposed to the rapidly varying carrier
frequency.

Types of Modulation: Signal modulation can be divided into two broad categories:
➢ Analog modulation
➢ Digital modulation.

Analog or digital refers to how the data is modulated onto a sine wave.
If analog audio data is modulated onto a carrier sine wave, then this is referred to as analog
modulation.
Digital modulation is used to convert digital data to analog signal. Ex ASK, FSK, PSK.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
5. Analog Modulation
Analog Modulation can be accomplished in three ways:
1. Amplitude modulation (AM)
2. Frequency modulation (FM)
3. Phase modulation (PM).

5.1. Amplitude modulation (AM)


Amplitude modulation is a type of modulation where the amplitude of the carrier signal is
varied in accordance with modulating signal.
The envelope, or boundary, of the amplitude modulated signal embeds modulating signal.
Amplitude Modulation is abbreviated AM.

5.2. Frequency modulation (FM)


Frequency modulation is a type of modulation where the frequency of the carrier is varied
in accordance with the modulating signal. The amplitude of the carrier remains constant.

The information-bearing signal (the modulating signal) changes the instantaneous


frequency of the carrier. Since the amplitude is kept constant, FM modulation is a low-
noise process and provides a high quality modulation technique which is used for music
and speech in hi-fidelity broadcasts.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Frequency Modulation is abbreviated FM.

5.3 Phase modulation (PM)


In phase modulation, the instantaneous phase of a carrier wave is varied from its reference
value by an amount proportional to the instantaneous amplitude of the modulating signal.

Phase Modulation is abbreviated PM.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
6. Digital Modulation

Digital modulation is used to convert digital data to analog signal.


It can be accomplished in the following ways:
1. ASK
2. FSK
3. PSK
4. QAM

6.1 Amplitude Shift Keying (ASK)


In amplitude shift keying, the amplitude of the carrier signal is varied to create signal
elements.
Both frequency and phase remain constant while the amplitude changes.

Binary ASK (BASK)

ASK is normally implemented using only two levels and is hence called binary amplitude
shift keying. Bit 1 is transmitted by a carrier of one particular amplitude. To transmit Bit 0
we change the amplitude keeping the frequency is kept constant.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
6.2 Frequency Shift Keying (FSK)
In Frequency shift keying, we change the frequency of the carrier wave.

Bit 0 is represented by a specific frequency, and bit 1 is represented by a different


frequency.
In the figure below frequency used for bit 1 is higher than frequency used for bit 0

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
6.3 Phase Shift Keying (PSK)

Phase shift keying (PSK) is a method of transmitting and receiving digital signals in which
the phase of a transmitted signal is varied to convey information.
Both amplitude and frequency remain constant as the phase changes.
The simplest from of PSK has only two phases, 0 and 1.
If the phase of the wave does not change, then the signal state stays the same (low or high).
If the phase of the wave changes by 180 degrees, that is, if the phase reverses, then the
signal state changes (from low to high or from high to low)

6.4 QAM
The concept of Quadrature Amplitude Modulation (QAM) involves use of two carriers, one
for phase and the other for quadrature, with different amplitude levels for each carrier.
It is a combination of ASK & PSK.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
7 Multiplexing
Multiplexing is a technique used to combine and send the multiple data streams over a
single medium. The process of combining the data streams is 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 single output line. Multiplexing follows 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. DEMUX separates a signal into its component signals (one input and n
outputs). Therefore, we can say that demultiplexing follows the one-to-many approach.

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

History of Multiplexing
o Multiplexing technique is widely used in telecommunications in which several
telephone calls are carried through a single wire.
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

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
o The 'n' input lines are transmitted through a multiplexer and multiplexer combines
the signals to form a composite signal.
o The composite signal is passed through a Demultiplexer and demultiplexer separates
a signal to component signals and transfers them to their 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 can be classified as:

6.1 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 transmission medium is subdivided into several channels.

o In the above diagram, a single transmission medium is subdivided into several


frequency channels, and each frequency channel is given to different devices. 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.
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
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.
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. The multiplexed
signal is transmitted in the air.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
6.2 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 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.
o

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
6.3 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 is
distributed among different users. Therefore, each user is allocated with different
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 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 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

6.3.1 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 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 form of frames. If a device does not have data for a particular time
slot, then the empty slot will be transmitted.
o The most popular Synchronous TDM are T-1 multiplexing, ISDN multiplexing, and
SONET multiplexing.
o If there are n devices, then there are n slots.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
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 which is having no data. In the above figure, the first frame is completely
filled, but in the last two frames, some slots are empty. Therefore, we can say that
the capacity of the channel is not utilized efficiently.
o The speed of the transmission medium should be greater than the total speed of the
input lines. An alternative approach to the Synchronous TDM is Asynchronous Time
Division Multiplexing.

4.3.2. 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 Synchronous TDM. Time slots are allocated to only those devices which have the
data to send. Therefore, we can say that Asynchronous Time Division multiplexor
transmits only 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 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.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
o The difference between Asynchronous TDM and Synchronous TDM is that many
slots in Synchronous TDM are unutilized, but in Asynchronous TDM, slots are fully
utilized. This leads to the smaller transmission time and efficient utilization of the
capacity of the channel.
o In Synchronous TDM, if there are n sending devices, then there are n time slots. In
Asynchronous TDM, if there are n sending devices, then there are m time slots
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.

o In the above diagram, there are 4 devices, but only two devices are sending the data,
i.e., A and C. Therefore, the data of A and C are only transmitted through the
transmission line.
o Frame of above diagram can be represented as:

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

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
7. Synchronous and Asynchronous transmission,

Synchronous Transmission

In Synchronous Transmission, data flows in a full-duplex mode in the form of blocks or


frames. Synchronization between the sender and receiver is necessary so that the sender
knows where the new byte starts (since there is no gap between the data). Therefore, each
block of characters is labeled with the synchronization characters and the receiving device
acquires the data until a special ending character is identified.

Synchronous Transmission is efficient, reliable and is used for transferring a large amount
of data. It provides real-time communication between connected devices. Chat Rooms,
Video Conferencing, telephonic conversations, as well as face to face interactions, are
some of the examples of Synchronous Transmission.

The voice-band and broad-band channels are usually used in the synchronous transmission
modes as it provides a faster speed up to 1200 bps and serves the purpose of high data
transfer speed.

Asynchronous Transmission
In Asynchronous Transmission data flows in a half-duplex mode, 1 byte or a character at a
time. It transmits the data in a continuous stream of bytes. In general, the size of a character
sent is 8 bits to which a parity bit is added, i.e. a start and a stop bit that gives the total of
10 bits.

It does not require a clock for synchronization; rather it uses the parity bits to tell the
receiver how to interpret the data. These parity bits are known as start and stop bits which
control the transfer of data.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
It uses character-based synchronization so that the receiving terminal could synchronize
itself with the receipt of data on a character. It is simple, fast, economical and does not
require a 2-way communication. Letters, emails, forums, televisions and radios are some of
the examples of Asynchronous Transmission.

Key Differences Between Synchronous and Asynchronous Transmission

1. In Synchronous Transmission, data is transferred in the form of frames. On the other


hand, in Asynchronous Transmission data is transmitted 1 byte at a time.
2. Synchronous Transmission requires a clock signal between the sender and receiver so
as to inform the receiver about the new byte. In contrast, in Asynchronous
Transmission sender and receiver does not require a clock signal as the data sent here
has a parity bit attached to it which indicates the start of the new byte.
3. Data transfer rate of Asynchronous Transmission is slower than that of Synchronous
Transmission.
4. Asynchronous Transmission is simple and economical, whereas Synchronous
Transmission is complicated and expensive.
5. Synchronous Transmission is efficient and has lower overhead as compared to the
Asynchronous Transmission.
6. In asynchronous data transfer, the line is kept at a stable value (logic 1) if no data is
transmitted through the line. As against, in synchronous transfer, the end of the data is
indicated by the sync character(s). Further than the sync characters, the line can be
either high or low.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Comparison Chart

BASIS FOR
SYNCHRONOUS TRANSMISSION ASYNCHRONOUS TRANSMISSION
COMPARISON

Meaning Transmission starts with the block header It uses start bit and stop bit preceding
which holds a sequence of bits. and following a character respectively.

Transmission Sends data in the form of blocks or Sends 1 byte or character at a time
manner frames

Synchronization Present with the same clock pulse. Absent

Transmission Fast Slow


Speed

Gap between the Does not exist Exist


data

Cost Expensive Economical

Time Interval Constant Random

Implemented by Hardware and software Hardware only

Examples Chat Rooms, Video Conferencing, Letters, emails, forums, etcetera.


Telephonic Conversations, etcetera.

Serial and Parallel Transmission.

There are two methods used for transferring data between computers which are given
below: Serial Transmission and Parallel Transmission.

Serial Transmission:
In Serial Transmission, data-bit flows from one computer to another computer in bi-
direction. In this transmission, one bit flows at one clock pulse. In Serial Transmission, 8
bits are transferred at a time having a start and stop bit.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Parallel Transmission:

In Parallel Transmission, many bits are flow together simultaneously from one computer to
another computer. Parallel Transmission is faster than serial transmission to transmit the
bits. Parallel transmission is used for short distance.

Difference Between Serial Transmission & Parallel Transmission

S.NO Serial Transmission Parallel Transmission

In serial transmission, data(bit) flows in In Parallel Transmission, data flows in


1.
bi-direction. multiple lines.

Parallel Transmission is not cost-


2. Serial Transmission is cost-efficient.
efficient.

In serial transmission, one bit transferred In Parallel Transmission, eight bits


3.
at one clock pulse. transferred at one clock pulse.

Serial Transmission is slow in Parallel Transmission is fast in


4.
comparison of Parallel Transmission. comparison of Serial Transmission.

Generally, Serial Transmission is used Generally, Parallel Transmission is used


5.
for long-distance. for short distance.

The circuit used in Serial Transmission is The circuit used in Parallel


6.
simple. Transmission is relatively complex.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Advantages
Serial transmission

• It is cost-effective
• It is appropriate for long-distance communication.
• More reliable

Parallel transmission

• Transmits data at a higher speed.


• Suits better for short-distance communication.
• Set of bits are transferred simultaneously.

Disadvantages
Serial transmission

• Data transmission rate is low.


• Throughput relies on the bit rate.

Parallel transmission

• It is a costly transmission system.


• In order to transmit the data over long ranges, the thickness of the wire has to be
increased to diminish signal degradation.
• There are multiple communication channels required.

========================

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
UNIT–III
Error Detection & Correction

1. 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

1.1 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.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
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.

1.2 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.

2. 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

2.1Single 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.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
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.

2.2 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.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
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.
o

2.3 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

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
The Sender follows the given steps:
1. The block unit is divided into k sections, and each of n bits.
2. All the k sections are added together by using one's complement to get the sum.
3. The sum is complemented and it becomes the checksum field.
4. 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:


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

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
2.4 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.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
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.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
o In this case, CRC checker generates the remainder of zero. Therefore, the data is
accepted.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
3. Error Correction
Error Correction codes are used to detect and correct the errors when data is transmitted
from the sender to the receiver.

Error Correction can be handled in two ways:

o Backward error correction: Once the error is discovered, the receiver requests the
sender to retransmit the entire data unit.
o Forward error correction: In this case, the receiver uses the error-correcting code
which automatically corrects the errors.

A single additional bit can detect the error, but cannot correct it.

For correcting the errors, one has to know the exact position of the error. For example, If
we want to calculate a single-bit error, the error correction code will determine which one
of seven bits is in error. To achieve this, we have to add some additional redundant bits.

45.1M
918
Exception Handling in Java - Javatpoint
Next
Stay

Suppose r is the number of redundant bits and d is the total number of the data bits. The
number of redundant bits r can be calculated by using the formula:

2r>=d+r+1

The value of r is calculated by using the above formula. For example, if the value of d is 4,
then the possible smallest value that satisfies the above relation would be 3.

To determine the position of the bit which is in error, a technique developed by R.W
Hamming is Hamming code which can be applied to any length of the data unit and uses
the relationship between data units and redundant units.

4. Hamming Code
Parity bits: The bit which is appended to the original data of binary bits so that the total
number of 1s is even or odd.

Even parity: To check for even parity, if the total number of 1s is even, then the value of
the parity bit is 0. If the total number of 1s occurrences is odd, then the value of the parity
bit is 1.

Odd Parity: To check for odd parity, if the total number of 1s is even, then the value of
parity bit is 1. If the total number of 1s is odd, then the value of parity bit is 0.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Algorithm of Hamming code:
o An information of 'd' bits are added to the redundant bits 'r' to form d+r.
o The location of each of the (d+r) digits is assigned a decimal value.
o The 'r' bits are placed in the positions 1,2,.....2k-1.
o At the receiving end, the parity bits are recalculated. The decimal value of the parity
bits determines the position of an error.

Relationship b/w Error position & binary number.

Let's understand the concept of Hamming code through an example:

Suppose the original data is 1010 which is to be sent.

Total number of data bits 'd' = 4


Number of redundant bits r : 2r >= d+r+1
2r>= 4+r+1
Therefore, the value of r is 3 that satisfies the above relation.
Total number of bits = d+r = 4+3 = 7;

Determining the position of the redundant bits

The number of redundant bits is 3. The three bits are represented by r1, r2, r4. The position
of the redundant bits is calculated with corresponds to the raised power of 2. Therefore,
their corresponding positions are 1, 21, 22.

1. The position of r1 = 1
2. The position of r2 = 2
3. The position of r4 = 4
Representation of Data on the addition of parity bits:

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Determining the Parity bits

Determining the r1 bit

The r1 bit is calculated by performing a parity check on the bit positions whose binary
representation includes 1 in the first position.

We observe from the above figure that the bit positions that includes 1 in the first position
are 1, 3, 5, 7. Now, we perform the even-parity check at these bit positions. The total
number of 1 at these bit positions corresponding to r1 is even, therefore, the value of the
r1 bit is 0.

Determining r2 bit

The r2 bit is calculated by performing a parity check on the bit positions whose binary
representation includes 1 in the second position.

We observe from the above figure that the bit positions that includes 1 in the second
position are 2, 3, 6, 7. Now, we perform the even-parity check at these bit positions. The
total number of 1 at these bit positions corresponding to r2 is odd, therefore, the value of
the r2 bit is 1.

Determining r4 bit

The r4 bit is calculated by performing a parity check on the bit positions whose binary
representation includes 1 in the third position.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
We observe from the above figure that the bit positions that includes 1 in the third position
are 4, 5, 6, 7. Now, we perform the even-parity check at these bit positions. The total
number of 1 at these bit positions corresponding to r4 is even, therefore, the value of the
r4 bit is 0.

Data transferred is given below:

Suppose the 4th bit is changed from 0 to 1 at the receiving end, then parity bits are
recalculated.

R1 bit

The bit positions of the r1 bit are 1,3,5,7

We observe from the above figure that the binary representation of r1 is 1100. Now, we
perform the even-parity check, the total number of 1s appearing in the r1 bit is an even
number. Therefore, the value of r1 is 0.

R2 bit

The bit positions of r2 bit are 2,3,6,7.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
We observe from the above figure that the binary representation of r2 is 1001. Now, we
perform the even-parity check, the total number of 1s appearing in the r2 bit is an even
number. Therefore, the value of r2 is 0.

R4 bit

The bit positions of r4 bit are 4,5,6,7.

We observe from the above figure that the binary representation of r4 is 1011. Now, we
perform the even-parity check, the total number of 1s appearing in the r4 bit is an odd
number. Therefore, the value of r4 is 1.

o The binary representation of redundant bits, i.e., r4r2r1 is 100, and its
corresponding decimal value is 4. Therefore, the error occurs in a 4 th bit position.
The bit value must be changed from 1 to 0 to correct the error.

5. Data Link Controls


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

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
5.1 Line Discipline
o Line Discipline is a functionality of the Data link layer that provides the coordination
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

758.3K
Is THIS Apple's New 27' iMac? iMac Pro Rumor Roundup!

ENQ/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.

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

Working of ENQ/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.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Following are the responses of the receiver:

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

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.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Working of Poll/Select

o In this, the primary device and multiple secondary devices consist of a single
transmission line, and all the exchanges are made through the primary device even
though the destination is a secondary device.
o The primary device has control over the communication link, and the secondary
device follows the instructions of the primary device.
o The primary device determines which device is allowed to use the communication
channel. 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
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 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 for the upcoming transmission by transmitting a Select (SEL) frame, one field
of the frame includes the address of the intended secondary device.
o When the secondary device receives the SEL frame, it sends an acknowledgement
that indicates the secondary ready status.
o If the secondary device is ready to accept the data, then the primary device sends two
or more data frames to the intended secondary device. Once the data has been
transmitted, the secondary sends an acknowledgement specifies that the data has
been received.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
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 send.
o Firstly, the primary asks (poll) the first secondary device, if it responds with the
NACK (Negative Acknowledgement) means that it has nothing to send. Now, it
approaches the second secondary device, it responds with the ACK means that it has
the data to send. The secondary device can send more than one frame one after
another or sometimes it may be required to send ACK before sending each one,
depending on the type of the protocol being used.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
5.2 Flow Control
o It is a set of procedures that tells the sender how much data it can transmit before the
data overwhelms the receiver.
o The receiving device has limited speed and limited memory to store the data.
Therefore, the receiving device must be able to inform the 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.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
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 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.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Sliding Window

o The Sliding Window is a method of flow control in which a sender can transmit the
several frames before getting an acknowledgement.
o In Sliding Window Control, multiple frames can be sent one after the another due to
which 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
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
they are numbered from 0 to n-1. For example, if n = 8, the frames are numbered
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 frames can
be sent before acknowledgement.
o When the receiver sends the ACK, it includes the number of the next frame that it
wants to receive. For example, to acknowledge the string of frames ending with
frame number 4, the receiver will send the ACK containing the number 5. When the
sender sees the ACK with the number 5, it got to know that the frames from 0
through 4 have been received.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Sender Window

o At the beginning of a transmission, the sender window contains n-1 frames, and
when they are sent out, the left boundary moves inward shrinking the size of the
window. For example, if the size of the window is w if three frames are sent out,
then the number of 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
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 and no acknowledgement has arrived, then the sender window contains only two
frames, i.e., 5 and 6. Now, if ACK has arrived with a number 4 which means that 0
through 3 frames have arrived undamaged and the sender window is expanded to
include the next four frames. 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 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 number of frames that can be received before an ACK is sent. For
example, the size of the 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 number of frames acknowledged.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
o Suppose the size of the window is 7 means that the receiver window contains seven
spaces for seven frames. If the one frame is received, then the receiver window
shrinks and moving the boundary from 0 to 1. In this way, window shrinks one by
one, so window now contains the six spaces. If frames from 0 through 4 have sent,
then the window contains two spaces before an acknowledgement is sent.

5.3 Error Control

Error Control is a technique of error detection and retransmission.

Categories of Error Control:

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
5.3.1 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. 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 identified individually. Suppose data 1 frame acknowledges the data 0
frame means that the 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 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 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, then it returns the NAK frame. For example, when the data 0
frame is sent, and then the receiver sends the ACK 1 frame means that the data 0 has
arrived correctly, and transmits the data 1 frame. The sender transmits the next
frame: data 1. It reaches undamaged, and the receiver returns ACK 0. The sender
transmits the next frame: data 0. The receiver reports an error and returns the 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. Sometimes the frame has not arrived at the receiving end so that it can
be acknowledged neither positively nor negatively. The sender waits for
acknowledgement until the timer goes off. If the timer goes off, it retransmits the last
transmitted frame.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
5.3.2 Sliding Window ARQ

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

Two protocols used in sliding window ARQ:

5.3.2.1. Go-Back-n ARQ: In Go-Back-N ARQ protocol, if one frame is lost or damaged,
then it retransmits all the frames after which it does not receive the positive ACK.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
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.

Three possibilities can occur for retransmission:

o Damaged Frame: When the frame is damaged, then the receiver sends a NAK
frame.
o Lost Data Frame: In Sliding window protocols, data frames are sent sequentially. If
any of the frames is lost, then the next frame arrive at the receiver is out of sequence.
The receiver checks the sequence number of each of the frame, discovers the frame
that has been skipped, and returns the NAK for the missing frame. The sending
device 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 waiting for any acknowledgement. Once the limit of the window is
reached, the sender has no more frames to send; it must wait for the
acknowledgement. If the acknowledgement is lost, then the sender could wait
forever. To avoid such situation, the sender is equipped with the timer that starts
counting whenever the window capacity is reached. If the acknowledgement has not
been received 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 (NAK) has been received.
o The receiver storage buffer keeps all the damaged frames on hold until the frame in
error 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 for retransmission.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
6. Why Piggybacking?
Communications are mostly full – duplex in nature, i.e. data transmission occurs in both
directions. A method to achieve full – duplex communication is to consider both the
communication as a pair of simplex communication. Each link comprises a forward
channel for sending data and a reverse channel for sending acknowledgments.
However, in the above arrangement, traffic load doubles for each data unit that is
transmitted. Half of all data transmission comprise of transmission of acknowledgments.
So, a solution that provides better utilization of bandwidth is piggybacking. Here, sending
of acknowledgment is delayed until the next data frame is available for transmission. The
acknowledgment is then hooked onto the outgoing data frame. The data frame consists of
an ack field. The size of the ack field is only a few bits, while an acknowledgment frame
comprises of several bytes. Thus, a substantial gain is obtained in reducing bandwidth
requirement.

6.1Working Principle
Suppose that there are two communication stations X and Y. The data frames transmitted
have an acknowledgment field, ack field that is of a few bits length. Additionally, there are
frames for sending acknowledgments, ACK frames. The purpose is to minimize the ACK
frames.
The three principles governing piggybacking when the station X wants to communicate
with station Y are −

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
• If station X has both data and acknowledgment to send, it sends a data frame with
the ack field containing the sequence number of the frame to be acknowledged.
• If station X has only an acknowledgment to send, it waits for a finite period of time
to see whether a data frame is available to be sent. If a data frame becomes available,
then it piggybacks the acknowledgment with it. Otherwise, it sends an ACK frame.
• If station X has only a data frame to send, it adds the last acknowledgment with it.
The station Y discards all duplicate acknowledgments. Alternatively, station X may
send the data frame with the ack field containing a bit combination denoting no
acknowledgment.
6.2Example
The following diagram illustrates the three scenario −

7. Random Access Protocol


In this protocol, all the station has the equal priority to send the data over a channel. In
random access protocol, one or more stations cannot depend on another station nor any
station control another station. Depending on the channel's state (idle or busy), each station
transmits the data frame. However, if more than one station sends the data over a channel,
there may be a collision or data conflict. Due to the collision, the data frame packets may
be lost or changed. And hence, it does not receive by the receiver end.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Following are the different methods of random-access protocols for broadcasting frames on
the channel.

o Aloha
o CSMA
o CSMA/CD
o CSMA/CA

7.1 ALOHA Random Access Protocol

It is designed for wireless LAN (Local Area Network) but can also be used in a shared
medium to transmit data. Using this method, any station can transmit data across a network
simultaneously when a data frameset is available for transmission.

Aloha Rules

1. Any station can transmit data to a channel at any time.


2. It does not require any carrier sensing.
3. Collision and data frames may be lost during the transmission of data through
multiple stations.
4. Acknowledgment of the frames exists in Aloha. Hence, there is no collision
detection.
5. It requires retransmission of data after some random amount of time.

Pure Aloha

Whenever data is available for sending over a channel at stations, we use Pure Aloha. In
pure Aloha, when each station transmits data to a channel without checking whether the
channel is idle or not, the chances of collision may occur, and the data frame can be lost.
When any station transmits the data frame to a channel, the pure Aloha waits for the
receiver's acknowledgment. If it does not acknowledge the receiver end within the
specified time, the station waits for a random amount of time, called the backoff time (Tb).

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
And the station may assume the frame has been lost or destroyed. Therefore, it retransmits
the frame until all the data are successfully transmitted to the receiver.

1. The total vulnerable time of pure Aloha is 2 * Tfr.


2. Maximum throughput occurs when G = 1/ 2 that is 18.4%.
3. Successful transmission of data frame is S = G * e ^ - 2 G.

As we can see in the figure above, there are four stations for accessing a shared channel
and transmitting data frames. Some frames collide because most stations send their frames
at the same time. Only two frames, frame 1.1 and frame 2.2, are successfully transmitted to
the receiver end. At the same time, other frames are lost or destroyed. Whenever two
frames fall on a shared channel simultaneously, collisions can occur, and both will suffer
damage. If the new frame's first bit enters the channel before finishing the last bit of the
second frame. Both frames are completely finished, and both stations must retransmit the
data frame.

Slotted Aloha

The slotted Aloha is designed to overcome the pure Aloha's efficiency because pure Aloha
has a very high possibility of frame hitting. In slotted Aloha, the shared channel is divided
into a fixed time interval called slots. So that, if a station wants to send a frame to a shared
channel, the frame can only be sent at the beginning of the slot, and only one frame is
allowed to be sent to each slot. And if the stations are unable to send data to the beginning
of the slot, the station will have to wait until the beginning of the slot for the next time.
However, the possibility of a collision remains when trying to send a frame at the
beginning of two or more station time slot.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
1. Maximum throughput occurs in the slotted Aloha when G = 1 that is 37%.
2. The probability of successfully transmitting the data frame in the slotted Aloha is S =
G * e ^ - 2 G.
3. The total vulnerable time required in slotted Aloha is Tfr.

7.2 CSMA (Carrier Sense Multiple Access)

It is a carrier sense multiple access based on media access protocol to sense the traffic on
a channel (idle or busy) before transmitting the data. It means that if the channel is idle, the
station can send data to the channel. Otherwise, it must wait until the channel becomes idle.
Hence, it reduces the chances of a collision on a transmission medium.

CSMA Access Modes

1-Persistent: In the 1-Persistent mode of CSMA that defines each node, first sense the
shared channel and if the channel is idle, it immediately sends the data. Else it must wait
and keep track of the status of the channel to be idle and broadcast the frame
unconditionally as soon as the channel is idle.

Non-Persistent: It is the access mode of CSMA that defines before transmitting the data,
each node must sense the channel, and if the channel is inactive, it immediately sends the
data. Otherwise, the station must wait for a random time (not continuously), and when the
channel is found to be idle, it transmits the frames.

P-Persistent: It is the combination of 1-Persistent and Non-persistent modes. The P-


Persistent mode defines that each node senses the channel, and if the channel is inactive, it
sends a frame with a P probability. If the data is not transmitted, it waits for a (q = 1-p
probability) random time and resumes the frame with the next time slot..

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
7.3 CSMA/ CD

It is a carrier sense multiple access/ collision detection network protocol to transmit data
frames. The CSMA/CD protocol works with a medium access control layer. Therefore, it
first senses the shared channel before broadcasting the frames, and if the channel is idle, it
transmits a frame to check whether the transmission was successful. If the frame is
successfully received, the station sends another frame. If any collision is detected in the
CSMA/CD, the station sends a jam/ stop signal to the shared channel to terminate data
transmission. After that, it waits for a random time before sending a frame to a channel.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
7.4 CSMA/ CA

It is a carrier sense multiple access/collision avoidance network protocol for carrier


transmission of data frames. It is a protocol that works with a medium access control layer.
When a data frame is sent to a channel, it receives an acknowledgment to check whether
the channel is clear. If the station receives only a single (own) acknowledgment, that means
the data frame has been successfully transmitted to the receiver. But if it gets two signals
(its own and one more in which the collision of frames), a collision of the frame occurs in
the shared channel. Detects the collision of the frame when a sender receives an
acknowledgment signal.

Following are the methods used in the CSMA/ CA to avoid the collision:

Interframe space: In this method, the station waits for the channel to become idle, and if it
gets the channel is idle, it does not immediately send the data. Instead of this, it waits for
some time, and this time period is called the Interframe space or IFS. However, the IFS
time is often used to define the priority of the station.

Contention window: In the Contention window, the total time is divided into different
slots. When the station/ sender is ready to transmit the data frame, it chooses a random slot
number of slots as wait time. If the channel is still busy, it does not restart the entire
process, except that it restarts the timer only to send data packets when the channel is
inactive.

Acknowledgment: In the acknowledgment method, the sender station sends the data frame
to the shared channel if the acknowledgment is not received ahead of time.

=====================

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
UNIT–IV
1. Network Switching Techniques:

In large networks, there can be multiple paths from sender to receiver. The switching
technique will decide the best route for data transmission.

Switching technique is used to connect the systems for making one-to-one communication.

Classification Of Switching Techniques

1.1 Circuit Switching


o Circuit switching is a switching technique that establishes a dedicated path between
sender and receiver.
o In the Circuit Switching Technique, once the connection is established then the
dedicated path will remain to exist until the connection is terminated.
o Circuit switching in a network operates in a similar way as the telephone works.
o A complete end-to-end path must exist before the communication takes place.
o In case of circuit switching technique, when any user wants to send the data, voice,
video, a request signal is sent to the receiver then the receiver sends back the
acknowledgment to ensure the availability of the dedicated path. After receiving the
acknowledgment, dedicated path transfers the data.
o Circuit switching is used in public telephone network. It is used for voice
transmission.
o Fixed data can be transferred at a time in circuit switching technology.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Communication through circuit switching has 3 phases:
o Circuit establishment
o Data transfer
o Circuit Disconnect

Circuit Switching can use either of the two technologies:

1.1.1 Space Division Switching:


Space Division Switching is a circuit switching method that uses a physically distinct set of
cross points to achieve a single transmission route in a switch. Switches in Space Division
Switching are fast, robust, and nonblocking.
Two types of switches are used in Space Division Switching:
I. Crossbar Switch:
The Crossbar switch is a two-way switch with n input and n output lines. The crossbar
switch has n2 cross points, which are intersection points.

II. Multistage Switch:


The multistage switch is created by dividing the crossbar switch into smaller parts and then
connecting them. It cuts down on the number of cross points. If one path fails, another path
becomes available.
1.1.2. Time Division Switching:
Time Division Switching refers to the process of receiving and re-transmitting incoming
and outgoing messages in a separate time slot. The digitized message/data is divided into
time periods or slots.

Advantages of Circuit Switching:


• The communication channel is dedicated and exclusive in the case of the Circuit
Switching method.
• It has a fixed bandwidth.

Disadvantages of Circuit Switching:


• The only delay in data transfer happens once the dedicated channel is created.
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
• It takes around 10 seconds to establish a connection, during which no data may be
sent.
• This is more costly than other switching approaches since each connection requires a
dedicated route.
• It is inefficient to utilize since the capacity of the path is squandered after the path is
built and no data is transmitted.
• In this situation, the connection is devoted, thus even if the channel is free, no
additional data may be sent.

1.2 Message Switching


o Message Switching is a switching technique in which a message is transferred as a
complete unit and routed through intermediate nodes at which it is stored and
forwarded.
o In Message Switching technique, there is no establishment of a dedicated path
between the sender and receiver.
o The destination address is appended to the message. Message Switching provides a
dynamic routing as the message is routed through the intermediate nodes based on
the information available in the message.
o Message switches are programmed in such a way so that they can provide the most
efficient routes.
o Each and every node stores the entire message and then forward it to the next node.
This type of network is known as store and forward network.
o Message switching treats each message as an independent entity.

Advantages Of Message Switching

o Data channels are shared among the communicating devices that improve the
efficiency of using available bandwidth.
o Traffic congestion can be reduced because the message is temporarily stored in the
nodes.
o Message priority can be used to manage the network.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
o The size of the message which is sent over the network can be varied. Therefore, it
supports the data of unlimited size.

Disadvantages Of Message Switching

o The message switches must be equipped with sufficient storage to enable them to
store the messages until the message is forwarded.
o The Long delay can occur due to the storing and forwarding facility provided by the
message switching technique.

1.3 Packet Switching


o The packet switching is a switching technique in which the message is sent in one
go, but it is divided into smaller pieces, and they are sent individually.
o The message splits into smaller pieces known as packets and packets are given a
unique number to identify their order at the receiving end.
o Every packet contains some information in its headers such as source address,
destination address and sequence number.
o Packets will travel across the network, taking the shortest path as possible.
o All the packets are reassembled at the receiving end in correct order.
o If any packet is missing or corrupted, then the message will be sent to resend the
message.
o If the correct order of the packets is reached, then the acknowledgment message will
be sent.

Approaches of Packet Switching:

There are two approaches to Packet Switching:

1.3.1. Datagram Packet switching:


o It is a packet switching technology in which packet is known as a datagram, is
considered as an independent entity. Each packet contains the information about the
destination and switch uses this information to forward the packet to the correct
destination.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
o The packets are reassembled at the receiving end in correct order.
o In Datagram Packet Switching technique, the path is not fixed.
o Intermediate nodes take the routing decisions to forward the packets.
o Datagram Packet Switching is also known as connectionless switching.

1.3.2. Virtual Circuit Switching


o Virtual Circuit Switching is also known as connection-oriented switching.
o In the case of Virtual circuit switching, a preplanned route is established before the
messages are sent.
o Call request and call accept packets are used to establish the connection between
sender and receiver.
o In this case, the path is fixed for the duration of a logical connection.

Let's understand the concept of virtual circuit switching through a diagram:

o In the above diagram, A and B are the sender and receiver respectively. 1 and 2 are
the nodes.
o Call request and call accept packets are used to establish a connection between the
sender and receiver.
o When a route is established, data will be transferred.
o After transmission of data, an acknowledgment signal is sent by the receiver that the
message has been received.
o If the user wants to terminate the connection, a clear signal is sent for the
termination.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Differences b/w Datagram approach and Virtual Circuit approach

Datagram approach Virtual Circuit approach

Node takes routing decisions to forward the Node does not take any routing decision.
packets.

Congestion cannot occur as all the packets Congestion can occur when the node is
travel in different directions. busy, and it does not allow other packets
to pass through.

It is more flexible as all the packets are It is not very flexible.


treated as an independent entity.

Advantages Of Packet Switching:

o Cost-effective: In packet switching technique, switching devices do not require


massive secondary storage to store the packets, so cost is minimized to some extent.
Therefore, we can say that the packet switching technique is a cost-effective
technique.
o Reliable: If any node is busy, then the packets can be rerouted. This ensures that the
Packet Switching technique provides reliable communication.
o Efficient: Packet Switching is an efficient technique. It does not require any
established path prior to the transmission, and many users can use the same
communication channel simultaneously, hence makes use of available bandwidth
very efficiently.

Disadvantages Of Packet Switching:

o Packet Switching technique cannot be implemented in those applications that require


low delay and high-quality services.
o The protocols used in a packet switching technique are very complex and requires
high implementation cost.
o If the network is overloaded or corrupted, then it requires retransmission of lost
packets. It can also lead to the loss of critical information if errors are nor recovered.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
1.4. Hybrid switching

Hybrid switching enables both circuit and packet-switched services to be provided in the
same communication network. It uses synchronous slots based on circuit-oriented network.

Hybrid switching, which combines the principles of both circuit and packet-switching. This
technique first partitions a message into packets (packet-switching) and transmits each
packet via a dedicated circuit (circuit-switching). As soon as a packet is ready for
transmission, a circuit meeting appropriate bandwidth requirement is established between
the sending and receiving nodes. When the packet reaches its destination, the circuit is
terminated so that it can be used again. This scenario has many advantages but it also
requires extremely fast circuit-switching equipment.

Hybrid Switch: Using both Connection-orient (CO) and Connection-less-orient (CL) slot

In hybrid architecture, packet and circuit switching exist side by side so that trunk
bandwidth is shared by the two services. Thus, the packet sub network is visualized as a
network with varying trunk capacities according to load. The user can select either circuit
or packet service, depending on connection characteristics and needs.

The hybrid packet and circuit switching system allows merging of packet and circuit traffic
from user interface modules on a TDM (time division multiplexing) bus and transfer of
packet information from one module to another module or the exchange circuit information
between modules. Circuit exchanges or packet transfers are performed synchronously on
the TDM buses in bursts of period T, with each burst comprising a fixed number of bytes.

Hybrid switching dynamically combines both virtual cut-through and wormhole switching
to provide higher achievable throughput than wormhole alone, while significantly reducing
the buffer space required at intermediate nodes when compared to virtual cut-through. This
scheme is motivated by a comparison of virtual cut-through and wormhole switching
through cycle-level simulations, and then evaluated using the same methods.

Advantages of hybrid switching

• Handles a much more diverse range of traffic.


• Optimization between circuit switching and packet switching
• Lower complexity and board than fast packet switch.
• Can provide dedicated hardware for each traffic type.

Disadvantages of hybrid switching

• Cannot maintain maximum flexibility for future services because the future
distribution of satellite circuit and packet traffic is unknown.
• Waste of satellite resources in order to be designed to handle the full capacity of
satellite traffic.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
2. X.25
X.25 is a protocol suite defined by ITU-T for packet switched communications over WAN
(Wide Area Network). It was originally designed for use in the 1970s and became very
popular in 1980s. Presently, it is used for networks for ATMs and credit card verification.
It allows multiple logical channels to use the same physical line. It also permits data
exchange between terminals with different communication speeds.

X.25 has three protocol layers


• Physical Layer: It lays out the physical, electrical and functional characteristics that
interface between the computer terminal and the link to the packet switched node.
X.21 physical implementer is commonly used for the linking.

• Data Link Layer: It comprises the link access procedures for exchanging data over
the link. Here, control information for transmission over the link is attached to the
packets from the packet layer to form the LAPB frame (Link Access Procedure
Balanced). This service ensures a bit-oriented, error-free, and ordered delivery of
frames.

• Packet Layer: This layer defines the format of data packets and the procedures for
control and transmission of the data packets. It provides external virtual circuit
service. Virtual circuits may be of two types: virtual call and permanent virtual
circuit. The virtual call is established dynamically when needed through call set up
procedure, and the circuit is relinquished through call clearing procedure. Permanent
virtual circuit, on the other hand, is fixed and network assigned

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
3. ISDN:-

ISDN or Integrated Services Digital Network is a circuit-switched telephone network


system that transmits both data and voice over a digital line. You can also think of it as a
set of communication standards to transmit data, voice, and signaling.
These digital lines could be copper lines. It was designed to move outdated landline
technology to digital.
ISDN connections have a reputation for providing better speeds and higher quality than
traditional connections. Faster speeds and better connections allow data transmissions to
travel more reliably.

How ISDN works:

It’s easy enough to define ISDN, but do you know how it works?
Most people use ISDN for high-speed internet when options like DSL or cable modem
connections are not available.

Setting up ISDN is something you’ll want to work on with your Internet Service Provider
(ISP). A lot of the steps can easily be done from your home.
Your ISDN will be plugged in through a traditional POTS (Plain Old Telephone Service)
line that can access both phone numbers at once.

You’ll have to make sure you have a working POTS line and assigned phone numbers to
begin.

After that, you can follow the steps below to get your voice and data communications up
and running.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
ISDN setup
Setting up an ISDN connection involves using a serial port and plugging in the telephone
company line.

The process of setting up ISDN involves:

• Loading the modem driver disk and programming the modem


• Pointing the modem toward the right phone numbers
• Setting your connection speeds for each line
• Directing your modem to dial your ISP (Internet Service Provider) — this phone
number should be provided by your ISP
• If necessary, set your modem for BONDING (the ability to access higher speeds by
allowing your modem to dial both phone numbers at once)
What is the difference between ISDN and DSL?

There are a few key differences between ISDN and DSL. For starters, DSL transmits data
far faster than an ISDN line can That’s because ISDN is a dial-up service that goes through
a singular line. DSL connections never need to dial. They are sometimes called “always-on
connections.” Because of that, DSL sends its packets at speeds up to 100 Mbps, while
ISDN tops out around 128 Kbps. While both of these provide the same service, they do so
in radically different ways.

Advantages of ISDN:

• ISDN channels have a reliable connection.


• ISDN is used to facilitate the user with multiple digital channels.
• It has faster data transfer rate.

Disadvantages of ISDN:

• ISDN lines costlier than the other telephone system.


• It requires specialized digital devices.
• It is less flexible.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
4. Logical Addressing: -

IP addresses and MAC addresses are essential for data communication. Assume there are
two networks. The first network has three devices: A, B, C and the second network has
three devices: X, Y, Z. If a device A from the first network wishes to send data to a device
Y in the second network, it must first determine where Y is located in the second network,
which requires learning the IP address/ logical address, because the connection is subject to
change and is not permanent due to the nature of the Packet Switched Network (Logical).
However, in order to send data to that device, it must pass the data across physical
communication links, for which a MAC Address/Physical address is utilized.

➢ IP Address :

An Internet Protocol address is an IP address. It is a unique address that identifies the


device on the network. The Internet Service Provider (ISP) assigns IP addresses to all
devices on its network. IP addresses are not generated at random. The Internet Assigned
Numbers Authority (IANA), a part of the Internet Corporation for Assigned Names and
Numbers (ICANN), generates and assigns them mathematically. IP addresses are used at
the network layer. IP Addresses are routable in nature.

IP Version Types:

There are 2 different versions of IP as follows.


1. IPv4 (IP version 4) –
IPv4 employs a 32-bit address. It is composed of four numbers separated by a ‘dot’
i.e., periods called an octet (byte). Each number in the octet can range from 0 to 255.
Example – 172.166.3.28

2. IPv6 (IP version 6) –


IPv6 is the next generation of Internet Protocol addresses. In comparison to IPV4,
IPv6 has a larger address space. IPv6 has a length of 128 bits and is written in
hexadecimal. It is composed of eight fields, each of which contains two octets. As a
result, IPv6 has 16 octets in total.

Example – 3221:1cd7:74b6:6da7:0000:0000:7349:6472

➢ MAC Address :

A MAC address is a one-of-a-kind identification assigned to a NIC (Network Interface


Controller/Card). The full form of MAC address is Media Access Control address. MAC
addresses are 48 bits long and these addresses could not be routed between networks. MAC
Address is a 12-digit hexadecimal numeral which is most typically expressed with a colon
or hyphen separating every two digits (an octet), making reading easier. MAC Addresses
are used at the Data Link Layer.
Example –
A MAC address of 2c549188c9e3 is represented as
2C:54:91:88:C9:E3 or 2c-54-91-88-c9-e3.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Reason for IP address called a “logical” address, and the MAC address is called a
“physical” address:

• An IP address is also known as a logical address and it can change over time as
well as from one network to another. The Internet Service Provider will be in
charge of assigning it. When a device connects to a different network, it receives
a different IP address as a result of a change in Internet Service Provider.
• With the help of Dynamic Host Configuration Protocol (DHCP), even in the same
network, when a device wants to connect to the internet, it will acquire different
addresses from the pool. There is no assurance that the device always has the
same IP address. The IP address is not directly linked to any devices. As a result,
it is referred to as a logical address.
• However, there is a MAC address provided by the hardware interface vendor. It
never changes when a device is attached to any network. As a result, it is referred
to as a physical address.
• IP address is, for example, like school register no, university register no and
corporate employee id. When a person transfers from school to college and then
to the workplace, he or she is assigned a new Identification Number, which is
used to uniquely identify the individual inside that organization. At different
periods, the same individual was recognized with a different identification
number. Similarly, when one machine connects to a different network, it receives
a new IP address each time. Thus, it is called a logical address.
• However, that address is unique inside that network. But MAC address is like an
Aadhar number, it never changes to any business. It’s like an original identity.
• In the same way, the MAC address will be the same for the device’s (NIC), for
any network on which the device is associated. Thus, it is called a physical
address. A MAC address is also a unique address. There won’t be the same
address for two devices.

5. Address Mapping:
An internet is made of a combination of physical networks connected by internetworking
devices such as routers. A packet starting from a source host may pass through several
different physical networks before finally reaching the destination host. The hosts and
routers are recognized at the network level by their logical (IP) addresses, while at the
physical level, they are recognized by their physical (MAC) addresses. Thus, delivery of a
packet to a host or a router requires two levels of addressing: logical (IP) and physical
(MAC).

We need to be able to map a logical address to its corresponding physical address and vice
versa. These can be done by using either static or dynamic mapping.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
➢ Static mapping:
Static mapping involves in the creation of a table that associates a logical address with a
physical address. This table is stored in each machine on the network. Each machine that
knows, for example, the IP address of another machine but not its physical address can
look it up in the table. Static mapping has some limitations because physical addresses may
change in the following ways:

• A machine could change its NIC (Network Interface Card), resulting in a new
physical address.
• In some LANs, such as Local Talk, the physical address changes every time the
computer is turned on.
• A mobile computer can move from one physical network to another, resulting in a
change in its physical address.

To implement these changes, a static mapping table must be updated periodically. This
overhead could affect network performance.

➢ Dynamic mapping:
In such mapping each time a machine knows one of the two addresses (logical or physical),
it can use a protocol to find the other one.

6. Mapping Logical to Physical Address:

➢ ARP:
ARP stands for Address Resolution Protocol which is one of the most important
protocols of the Network layer in the OSI model. ARP finds the physical address, also
known as Media Access Control (MAC) address, of a host from its known IP address.

Figure: ARP Mapping

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Figure: ARP operation

Following steps are involved in logical to physical address mapping:

a) The host or the router sends an ARP query packet. The ARP query packet includes
the physical and IP addresses of the sender and the IP address of the receiver. As the
sender does not know the physical address of the receiver, the ARP query is
broadcast over the network.

b) Every host or router on the network receives and processes the ARP query packet,
but only the intended recipient recognizes its IP address and sends back an ARP
response packet.

c) The ARP response packet contains the recipient's IP and physical addresses. The
ARP response packet is unicast directly to the inquirer (host/router) by using the
physical address received in the query packet.

Let us consider an example In Figure, the system on the left (A) has a packet that needs to
be delivered to another system (B) with IP address 141.23.56.23. System A needs to pass
the packet to its data link layer for the actual delivery, but it does not know the physical
address of the recipient. It uses the services of ARP by asking the ARP protocol to send a
broadcast ARP request packet to ask for the physical address of a system with an IP
address of 141.23.56.23. This packet is received by every system on the physical network,
but only system B will answer it, as shown in Figure b. System B sends an ARP reply
packet that includes its physical address. Now system A can send all the packets it has for
this destination by using the physical address it received.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
➢ Cache Memory

Using ARP is inefficient if system A needs to broadcast an ARP request for each IP packet
it needs to send to system B. ARP can be useful if the ARP reply is cached (kept in cache
memory for a while) because a system normally sends several packets to the same
destination. A system that receives an ARP reply stores the mapping in the cache memory
and keeps it for 20 to 30 minutes unless the space in the cache is exhausted. Before sending
an ARP request, the system first checks its cache to see if it can find the mapping.

ARP Packet Format

Figure: ARP packet

The fields are as follows:

a) Hardware type: This is a 16-bit field defining the type of the network on which ARP is
running. Each LAN has been assigned an integer based on its type. For example,
Ethernet is given type 1. ARP can be used on any physical network.

b) Protocol type: This is a 16-bit field defining the protocol. For example, the value of
this field for the IPv4 protocol is 080016, ARP can be used with any higher-level
protocol.

c) Hardware length: This is an 8-bit field defining the length of the physical address in
bytes. For example, for Ethernet the value is 6.

d) Protocol length: This is an 8-bit field defining the length of the logical address in
bytes. For example, for the IPv4 protocol the value is 4.

e) Operation: This is a 16-bit field defining the type of packet. Two packet types are
defined: ARP request (1) and ARP reply (2).

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
f) Sender hardware address: This is a variable-length field defining the physical address
of the sender. For example, for Ethernet this field is 6 bytes long.

g) Sender protocol address: This is a variable-length field defining the logical (for
example, IP) address of the sender. For the IP protocol, this field is 4 bytes long.

h) Target hardware address: This is a variable-length field defining the physical address
of the target. For example, for Ethernet this field is 6 bytes long. For an ARP request
message, this field is all 0s because the sender does not know the physical address of the
target.

i) Target protocol address: This is a variable-length field defining the logical (for
example, IP) address of the target. For the IPv4 protocol, this field is 4 bytes long.

➢ RARP
Reverse Address Resolution Protocol (RARP) finds the logical address for a machine that
knows only its physical address. To create an IP datagram, a host or a router needs to know
its own IP address or addresses. The IP address of a machine is usually read from its
configuration file stored on a disk file. However, a diskless machine is usually booted from
ROM, which has minimum booting information. The ROM is installed by the
manufacturer. It cannot include the IP address because the IP addresses on a network are
assigned by the network administrator. The machine can get its physical address (by
reading its NIC, for example), which is unique locally. It can then use the physical address
to get the logical address by using the RARP protocol.

6.2.1 RARP Operation

a) A RARP request is created and broadcast on the local network.

b) Another machine on the local network that knows all the IP addresses will respond with
a RARP reply.

c) The requesting machine must be running a RARP client program; the responding
machine must be running a RARP server program.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Figure RARP Operation
RARP Packet Format & Encapsulation

• The format of the RARP packet is the same as the ARP packet format as displayed
in Figure 21.4, except that the operation field. Its value is 3 for RARP request
message and 4 for RARP replies message.

• An RARP packet is also encapsulated directly into a data link frame just like ARP
packet as displayed in Figure 21.5.

Limitations of RARP:

• As broadcasting is done at the data link layer. The physical broadcast address, all 1’s
in the case of Ethernet, does not pass the boundaries of a network.

• This means that if an administrator has several networks or several subnets, it needs
to assign a RARP server for each network or subnet.
• This is the reason that RARP is almost obsolete.
• Two protocols, BOOTP and DHCP, are replacing RARP.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
7. BOOTP
The Bootstrap Protocol (BOOTP) is a client/server-based protocol at application layer,
designed to provide physical address to logical address mapping. The administrator may
put the client and the server on the same network or on different networks, as shown in
Figure: a and Figure: b respectively. BOOTP messages are encapsulated in a UDP packet,
and the UDP packet itself is encapsulated in an IP packet, as shown in Figure (c).

Figure: (a) BOOTP client and server on the same network

Figure (b) BOOTP client and server on the same and different network

Figure (c) BOOTP data Encapsulation

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
BOOTP Operation
There are two cases of BOOTP operation described below:
Case 1: Client and server on same network (Figure: a)
1. When a BOOTP client is started, it has no IP address, so it broadcasts a message
containing its MAC address onto the network. This message is called a “BOOTP request,”
and it is picked up by the BOOTP server, which replies to the client with the following
information that the client needs:

a) The client’s IP address, subnet mask, and default gateway address.


b) The IP address and host name of the BOOTP server.
c) The IP address of the server that has the boot image, which the client needs to load
its operating system.

2. When the client receives this information from the BOOTP server, it configures and
initializes its TCP/IP protocol stack, and then connects to the server on which the boot
image is shared.

Case 2 : Client and server on different networks (Figure: b)


1. If the server exists on some distant network the BOOTP request is broadcast because
the client does not know the IP address of the server.
2. The client simply uses all as 0’s the source address and all 1’s as the destination
address.
3. But a broadcast IP datagram cannot pass through any router. To solve the problem,
there is a need for an intermediary.
4. One of the hosts in local network (or a router that can be configured to operate at the
application layer) can be used as a relay. The host in this case is called a relay agent.
5. The relay agent knows the unicast address of a BOOTP server. When it receives this
type of packet, it encapsulates the message in a unicast datagram and sends the
request to the BOOTP server.
6. The packet, carrying a unicast destination address, is routed by any router and
reaches the BOOTP server.
7. The BOOTP server knows the message comes from a relay agent because one of the
fields in the request message defines the IP address of the relay agent.
8. BOOTP server sends a BOOTP reply message to the relay agent.
9. The relay agent, after receiving the reply, sends it to the BOOTP client.
4.2.2. Limitations of BOOTP
• BOOTP is not a dynamic configuration protocol.
• When a client requests its IP address, the BOOTP server consults a table that
matches the physical address of the client with its IP address.
• This implies that the binding between the physical address and the IP address of the
client already exists. The binding is predetermined i.e. static.
• However, what if a host moves from one physical network to another? What if a host
wants a temporary IP address?
• BOOTP cannot handle these situations because the binding between the physical and
IP addresses is static and fixed in a table until changed by the administrator.
• BOOTP is a static configuration protocol.
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
8. DHCP
The Dynamic Host Configuration Protocol (DHCP) has been devised to provide static and
dynamic address allocation that can be manual or automatic

Static Address Allocation


In this capacity DHCP acts as BOOTP does. It is backward compatible with BOOTP,
which means a host running the BOOTP client can request a static address from a DHCP
server. A DHCP server has a database that statically binds physical addresses to IP
addresses.

Dynamic Address Allocation


DHCP has a second database with a pool of available. IP addresses. This second database
makes DHCP dynamic. When a DHCP client requests a temporary IP address, the DHCP
server goes to the pool of available (unused) IP addresses and assigns an IP address for a
negotiable period of time.

When a DHCP client sends a DHCP request to a DHCP server, the server first checks its
static database. If an entry with the requested physical address exists in the static database,
the permanent IP address of the client is returned

On the other hand, if the entry does not exist in the static database, the server selects an IP
address from the available pool, assigns the address to the client, and adds the entry to the
dynamic database.

The dynamic aspect of DHCP is needed when a host moves from network to network or is
connected and disconnected from a network ( as is a subscriber to a service Provider).

DHCP provides temporary IP addresses for a limited time. The addresses assigned from the
pool are temporary addresses.

The DHCP server issues a lease for a specific time. When the lease expires, the client
must either stop using the IP address or renew the lease.

The server has the option to agree or disagree with the renewal. If the server disagrees, the
client stops using the address.

➢ DHCP Operation
DHCP provides an automated way to distribute and update IP addresses and other
configuration information on a network. A DHCP server provides this information to a
DHCP client through the exchange of a series of messages, known as the DHCP
conversation or the DHCP transaction displayed in Figure.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
➢ DHCP Operation

1. A DHCP client sends a broadcast packet (DHCP Discover) to discover DHCP


servers on the LAN segment.
2. The DHCP servers receive the DHCP Discover packet and respond with DHCP
Offer packets, offering IP addressing information.
3. If the client receives the DHCP Offer packets from multiple DHCP servers, the first
DHCP Offer packet is accepted. The client responds by broadcasting a DHCP
Request packet, requesting network parameters from a single server.
4. The DHCP server approves the lease with a DHCP Acknowledgement (DHCP Ack)
packet. The packet includes the lease duration and other configuration information.

9. ICMP
IP provides unreliable and connectionless datagram delivery. It was designed this way to
make efficient use of network resources. The IP protocol is a best-effort delivery service
that delivers a datagram from its original source to its final destination. However, IP
protocol has two deficiencies: lack of error control and lack of assistance mechanisms.

• The IP protocol has no error-reporting or error-correcting mechanism.


• What happens if something goes wrong?
• What happens if a router must discard a datagram because it cannot find a router to
the? final destination, or because the time-to-live field has a zero value?
• What happens if the final destination host must discard all fragments of a datagram?
because it has not received all fragments within a predetermined time limit?

These are examples of situations where an error has occurred and the IP protocol has no
built-in mechanism to notify the original host.

• The IP protocol also lacks a mechanism for host and management queries.
• A host sometimes needs to determine if a router or another host is alive.
• And sometimes a network administrator needs information from another host or
router.

➢ Types of Messages

ICMP messages are divided into two broad categories: Error-reporting messages and Query
Messages

• The error-reporting messages report problems that a router or a host (destination)


may encounter when it processes an IP packet.
• The query messages, which occur in pairs, help a host or a network manager get
specific information from a router or another host.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
➢ Message Format
An ICMP message has an 8-byte header and a variable-size data section. Although the
general format of the header is different for each message type, the first 4 bytes are
common to all. As Figure 21.14 shows:
• The first field, ICMP type, defines the type of the message.
• The code field specifies the reason for the particular message type.
• The last common field is the checksum field used for securing ICMP header.
• The rest of the header is specific for each message type.
• The data section in error messages carries information for finding the original
packet
• that had the error.
• In ICMP query messages, the data section carries extra information based on the
type of the query.

10. User Datagram Protocol,


The User Datagram Protocol (UDP) is simplest Transport Layer communication protocol
available of the TCP/IP protocol suite. It involves minimum amount of communication
mechanism. UDP is said to be an unreliable transport protocol but it uses IP services which
provides best effort delivery mechanism.
In UDP, the receiver does not generate an acknowledgement of packet received and in turn,
the sender does not wait for any acknowledgement of packet sent. This shortcoming makes
this protocol unreliable as well as easier on processing.
Requirement of UDP
A question may arise, why do we need an unreliable protocol to transport the data? We
deploy UDP where the acknowledgement packets share significant amount of bandwidth
along with the actual data. For example, in case of video streaming, thousands of packets
are forwarded towards its users. Acknowledging all the packets is troublesome and may
contain huge amount of bandwidth wastage. The best delivery mechanism of underlying IP
protocol ensures best efforts to deliver its packets, but even if some packets in video
streaming get lost, the impact is not calamitous and can be ignored easily. Loss of few
packets in video and voice traffic sometimes goes unnoticed.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Features
• UDP is used when acknowledgement of data does not hold any significance.
• UDP is good protocol for data flowing in one direction.
• UDP is simple and suitable for query-based communications.
• UDP is not connection oriented.
• UDP does not provide congestion control mechanism.
• UDP does not guarantee ordered delivery of data.
• UDP is stateless.
• UDP is suitable protocol for streaming applications such as VoIP, multimedia
streaming.

➢ UDP Header
UDP header is as simple as its function.

UDP header contains four main parameters:



Source Port- This 16 bits information is used to identify the source port of the
packet.
• Destination Port- This 16 bits information, is used identify application level
service on destination machine.
• Length- Length field specifies the entire length of UDP packet (including
header). It is 16-bits field and minimum value is 8-byte, i.e. the size of UDP
header itself.
• Checksum- This field stores the checksum value generated by the sender
before sending. IPv4 has this field as optional so when checksum field does
not contain any value it is made 0 and all its bits are set to zero.
➢ UDP application
Here are few applications where UDP is used to transmit data:
• Domain Name Services
• Simple Network Management Protocol
• Trivial File Transfer Protocol
• Routing Information Protocol
• Kerberos

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
11. Transmission Control Protocol,
The transmission Control Protocol (TCP) is one of the most important protocols of Internet
Protocols suite. It is most widely used protocol for data transmission in communication
network such as internet.
Features:
• TCP is reliable protocol. That is, the receiver always sends either positive or negative
acknowledgement about the data packet to the sender, so that the sender always has
bright clue about whether the data packet is reached the destination or it needs to resend
it.
• TCP ensures that the data reaches intended destination in the same order it was sent.
• TCP is connection oriented. TCP requires that connection between two remote points be
established before sending actual data.
• TCP provides error-checking and recovery mechanism.
• TCP provides end-to-end communication.
• TCP provides flow control and quality of service.
• TCP operates in Client/Server point-to-point mode.
• TCP provides full duplex server, i.e. it can perform roles of both receiver and sender.

➢ Header
The length of TCP header is minimum 20 bytes long and maximum 60 bytes.

• Source Port (16-bits) - It identifies source port of the application process on


the sending device.
• Destination Port (16-bits) - It identifies destination port of the application
process on the receiving device.
• Sequence Number (32-bits) - Sequence number of data bytes of a segment in a
session.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
• Acknowledgement Number (32-bits) - When ACK flag is set, this number
contains the next sequence number of the data byte expected and works as
acknowledgement of the previous data received.
• Data Offset (4-bits) - This field implies both, the size of TCP header (32-bit
words) and the offset of data in current packet in the whole TCP segment.
• Reserved (3-bits) - Reserved for future use and all are set zero by default.
• Flags (1-bit each)
• Windows Size - This field is used for flow control between two stations and
indicates the amount of buffer (in bytes) the receiver has allocated for a
segment, i.e. how much data is the receiver expecting.
• Checksum - This field contains the checksum of Header, Data and Pseudo
Headers.
• Urgent Pointer - It points to the urgent data byte if URG flag is set to 1.
• Options - It facilitates additional options which are not covered by the regular
header. Option field is always described in 32-bit words. If this field contains
data less than 32-bit, padding is used to cover the remaining bits to reach 32-
bit boundary.

12. Stream Control Transmission Protocol.


It is a connection- oriented protocol in computer networks which provides a full-duplex
association i.e., transmitting multiple streams of data between two end points at the same
time that have established a connection in network. It is sometimes referred to as next
generation TCP or TCPng, SCTP makes it easier to support telephonic conversation on
Internet. A telephonic conversation requires transmitting of voice along with other data at
the same time on both ends, SCTP protocol makes it easier to establish reliable connection.
SCTP is also intended to make it easier to establish connection over wireless network and
managing transmission of multimedia data. SCTP is a standard protocol (RFC 2960) and is
developed by Internet Engineering Task Force (IETF).

Characteristics of SCTP :
1. Unicast with Multiple properties –
It is a point-to-point protocol which can use different paths to reach end host.
2. Reliable Transmission –
It uses SACK and checksums to detect damaged, corrupted, discarded, duplicate
and reordered data. It is similar to TCP but SCTP is more efficient when it comes
to reordering of data.
3. Message oriented –
Each message can be framed and we can keep order of datastream and tabs on
structure. For this, In TCP, we need a different layer for abstraction.
4. Multi-homing –
It can establish multiple connection paths between two end points and does not
need to rely on IP layer for resilience.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Advantages of SCTP :
1. It is a full- duplex connection i.e. users can send and receive data simultaneously.
2. It allows half- closed connections.
3. The message’s boundaries are maintained and application doesn’t have to split
messages.
4. It has properties of both TCP and UDP protocol.
5. It doesn’t rely on IP layer for resilience of paths.

Disadvantages of SCTP :
1. One of key challenges is that it requires changes in transport stack on node.
2. Applications need to be modified to use SCTP instead of TCP/UDP.
3. Applications need to be modified to handle multiple simultaneous streams.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
UNIT–V
Application Layer Protocols

1. Domain Name Service Protocol

An application layer protocol defines how the application processes running on different
systems, pass the messages to each other.

o DNS stands for Domain Name System.


o DNS is a directory service that provides a mapping between the name of a host on
the network and its numerical address.
o DNS is required for the functioning of the internet.
o Each node in a tree has a domain name, and a full domain name is a sequence of
symbols specified by dots.
o DNS is a service that translates the domain name into IP addresses. This allows the
users of networks to utilize user-friendly names when looking for other hosts instead
of remembering the IP addresses.
o For example, suppose the FTP site at EduSoft had an IP address of 132.147.165.50,
most people would reach this site by specifying ftp.EduSoft.com. Therefore, the
domain name is more reliable than IP address.

DNS is a TCP/IP protocol used on different platforms. The domain name space is divided
into three different sections: generic domains, country domains, and inverse domain.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
➢ Generic Domains
o It defines the registered hosts according to their generic behavior.
o Each node in a tree defines the domain name, which is an index to the DNS
database.
o It uses three-character labels, and these labels describe the organization type.

Label Description

aero Airlines and aerospace companies

biz Businesses or firms

com Commercial Organizations

coop Cooperative business Organizations

edu Educational institutions

gov Government institutions

info Information service providers

int International Organizations

mil Military groups

museum Museum & other nonprofit organizations

name Personal names

net Network Support centers

org Nonprofit Organizations

pro Professional individual Organizations

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
➢ Country Domain

The format of country domain is same as a generic domain, but it uses two-character
country abbreviations (e.g., us for the United States) in place of three character
organizational abbreviations.

➢ Inverse Domain

The inverse domain is used for mapping an address to a name. When the server has
received a request from the client, and the server contains the files of only authorized
clients. To determine whether the client is on the authorized list or not, it sends a query to
the DNS server and ask for mapping an address to the name.

Working of DNS
o DNS is a client/server network communication protocol. DNS clients send requests
to the. server while DNS servers send responses to the client.
o Client requests contain a name which is converted into an IP address known as a
forward DNS lookups while requests containing an IP address which is converted
into a name known as reverse DNS lookups.
o DNS implements a distributed database to store the name of all the hosts available
on the internet.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
o If a client like a web browser sends a request containing a hostname, then a piece of
software such as DNS resolver sends a request to the DNS server to obtain the IP
address of a hostname. If DNS server does not contain the IP address associated with
a hostname, then it forwards the request to another DNS server. If IP address has
arrived at the resolver, which in turn completes the request over the internet protocol.

2. File Transfer Protocol


FTP means "File Transfer Protocol" and refers to a group of rules that govern how
computers transfer files from one system to another over the internet. Businesses use FTP
to send files between computers, while websites use FTP for the uploading and
downloading of files from their website's servers.

FTP works by opening two connections that link the computers trying to communicate with
each other. One connection is designated for the commands and replies that get sent
between the two clients, and the other channel handles the transfer of data. During an FTP
transmission, there are four commands used by the computers, servers, or proxy servers
that are communicating. These are “send,” “get,” “change directory,” and “transfer.”

While transferring files, FTP uses three different modes: block, stream, and compressed.
The stream mode enables FTP to manage information in a string of data without any
boundaries between them. The block mode separates the data into blocks, and in the
compress mode, FTP uses an algorithm called the Lempel-Ziv to compress the data.

Although transferring files from one system to another is very simple and straightforward,
but sometimes it can cause problems. For example, two systems may have different file
conventions. Two systems may have different ways to represent text and data. Two
systems may have different directory structures. FTP protocol overcomes these problems
by establishing two connections between hosts. One connection is used for data transfer,
and another connection is used for the control connection.

➢ Mechanism of FTP

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
The above figure shows the basic model of the FTP. The FTP client has three components:
the user interface, control process, and data transfer process. The server has two
components: the server control process and the server data transfer process.

➢ There are two types of connections in FTP:

o Control Connection: The control connection uses very simple rules for
communication. Through control connection, we can transfer a line of command or
line of response at a time. The control connection is made between the control
processes. The control connection remains connected during the entire interactive
FTP session.
o Data Connection: The Data Connection uses very complex rules as data types may
vary. The data connection is made between data transfer processes. The data
connection opens when a command comes for transferring the files and closes when
the file is transferred.

➢ FTP Clients
o FTP client is a program that implements a file transfer protocol which allows you to
transfer files between two hosts on the internet.
o It allows a user to connect to a remote host and upload or download the files.
o It has a set of commands that we can use to connect to a host, transfer the files
between you and your host and close the connection.
o The FTP program is also available as a built-in component in a Web browser. This
GUI based FTP client makes the file transfer very easy and also does not require to
remember the FTP commands.

➢ Advantages of FTP:
o Speed: One of the biggest advantages of FTP is speed. The FTP is one of the fastest
way to transfer the files from one computer to another computer.
o Efficient: It is more efficient as we do not need to complete all the operations to get
the entire file.
o Security: To access the FTP server, we need to login with the username and
password. Therefore, we can say that FTP is more secure.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
o Back & forth movement: FTP allows us to transfer the files back and forth.
Suppose you are a manager of the company, you send some information to all the
employees, and they all send information back on the same server.

➢ Disadvantages of FTP:
o The standard requirement of the industry is that all the FTP transmissions should be
encrypted. However, not all the FTP providers are equal and not all the providers
offer encryption. So, we will have to look out for the FTP providers that provides
encryption.
o FTP serves two operations, i.e., to send and receive large files on a network.
However, the size limit of the file is 2GB that can be sent. It also doesn't allow you
to run simultaneous transfers to multiple receivers.
o Passwords and file contents are sent in clear text that allows unwanted
eavesdropping. So, it is quite possible that attackers can carry out the brute force
attack by trying to guess the FTP password.
o It is not compatible with every system.

3. Telnet
o The main task of the internet is to provide services to users. For example, users want
to run different application programs at the remote site and transfers a result to the
local site. This requires a client-server program such as FTP, SMTP. But this would
not allow us to create a specific program for each demand.
o The better solution is to provide a general client-server program that lets the user
access any application program on a remote computer. Therefore, a program that
allows a user to log on to a remote computer. A popular client-server program Telnet
is used to meet such demands. Telnet is an abbreviation for Terminal Network.
o Telnet provides a connection to the remote computer in such a way that a local
terminal appears to be at the remote side.

There are two types of logins:

• Local Login

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
o When a user logs into a local computer, then it is known as local login.
o When the workstation running terminal emulator, the keystrokes entered by the user are
accepted by the terminal driver. The terminal driver then passes these characters to the
operating system which in turn, invokes the desired application program.
o However, the operating system has special meaning to special characters. For example,
in UNIX some combination of characters have special meanings such as control
character with "z" means suspend. Such situations do not create any problem as the
terminal driver knows the meaning of such characters. But, it can cause the problems in
remote login.

• Remote login

o When the user wants to access an application program on a remote computer,


then the user must perform remote login.

How remote login occurs

• At the local site

The user sends the keystrokes to the terminal driver, the characters are then sent to
the TELNET client. The TELNET client which in turn, transforms the characters to a
universal character set known as network virtual terminal characters and delivers
them to the local TCP/IP stack

• At the remote site

The commands in NVT forms are transmitted to the TCP/IP at the remote machine.
Here, the characters are delivered to the operating system and then pass to the
TELNET server. The TELNET server transforms the characters which can be
understandable by a remote computer. However, the characters cannot be directly
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
passed to the operating system as a remote operating system does not receive the
characters from the TELNET server. Therefore, it requires some piece of software
that can accept the characters from the TELNET server. The operating system then
passes these characters to the appropriate application program.

Network Virtual Terminal (NVT)

o The network virtual terminal is an interface that defines how data and
commands are sent across the network.
o In today's world, systems are heterogeneous. For example, the operating
system accepts a special combination of characters such as end-of-file token
running a DOS operating system ctrl+z while the token running a UNIX
operating system is ctrl+d.
o TELNET solves this issue by defining a universal interface known as network
virtual interface.
o The TELNET client translates the characters that come from the local terminal
into NVT form and then delivers them to the network. The Telnet server then
translates the data from NVT form into a form which can be understandable
by a remote computer.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
4. World Wide Web
World Wide Web, which is also known as a Web, is a collection of websites or web
pages stored in web servers and connected to local computers through the internet.
These websites contain text pages, digital images, audios, videos, etc. Users can access
the content of these sites from any part of the world over the internet using their
devices such as computers, laptops, cell phones, etc. The WWW, along with internet,
enables the retrieval and display of text and media to your device.

The building blocks of the Web are web pages which are formatted in HTML and
connected by links called "hypertext" or hyperlinks and accessed by HTTP. These
links are electronic connections that link related pieces of information so that users
can access the desired information quickly. Hypertext offers the advantage to select a
word or phrase from text and thus to access other pages that provide additional
information related to that word or phrase.

A web page is given an online address called a Uniform Resource Locator (URL). A
particular collection of web pages that belong to a specific URL is called a website,
e.g., www.facebook.com, www.google.com, etc. So, the World Wide Web is like a
huge electronic book whose pages are stored on multiple servers across the world.

Small websites store all of their WebPages on a single server, but big websites or
organizations place their WebPages on different servers in different countries so that
when users of a country search their site they could get the information quickly from
the nearest server.

So, the web provides a communication platform for users to retrieve and exchange
information over the internet. Unlike a book, where we move from one page to
another in a sequence, on World Wide Web we follow a web of hypertext links to
visit a web page and from that web page to move to other web pages. You need a
browser, which is installed on your computer, to access the Web.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
➢ Difference between World Wide Web and Internet

Some people use the terms 'internet' and 'World Wide Web' interchangeably. They think
they are the same thing, but it is not so. Internet is entirely different from WWW. It is a
worldwide network of devices like computers, laptops, tablets, etc. It enables users to
send emails to other users and chat with them online. For example, when you send an
email or chatting with someone online, you are using the internet.

But, when you have opened a website like google.com for information, you are using
the World Wide Web; a network of servers over the internet. You request a webpage
from your computer using a browser, and the server renders that page to your browser.
Your computer is called a client who runs a program (web browser), and asks the other
computer (server) for the information it needs.

5. Hyper Text Transfer Protocol

The Hypertext Transfer Protocol (HTTP) is an application-level protocol for


distributed, collaborative, hypermedia information systems. This is the foundation for
data communication for the World Wide Web (i.e. internet) since 1990. HTTP is a
generic and stateless protocol which can be used for other purposes as well using
extensions of its request methods, error codes, and headers.
Basically, HTTP is a TCP/IP based communication protocol, that is used to deliver data
(HTML files, image files, query results, etc.) on the World Wide Web. The default port
is TCP 80, but other ports can be used as well. It provides a standardized way for
computers to communicate with each other. HTTP specification specifies how clients'
request data will be constructed and sent to the server, and how the servers respond to
these requests.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
➢ Basic Features
There are three basic features that make HTTP a simple but powerful protocol:
• HTTP is connectionless: The HTTP client, i.e., a browser initiates an HTTP
request and after a request is made, the client waits for the response. The
server processes the request and sends a response back after which client
disconnect the connection. So client and server knows about each other during
current request and response only. Further requests are made on new
connection like client and server are new to each other.
• HTTP is media independent: It means, any type of data can be sent by HTTP
as long as both the client and the server know how to handle the data content.
It is required for the client as well as the server to specify the content type
using appropriate MIME-type.
• HTTP is stateless: As mentioned above, HTTP is connectionless and it is a
direct result of HTTP being a stateless protocol. The server and client are
aware of each other only during a current request. Afterwards, both of them
forget about each other. Due to this nature of the protocol, neither the client
nor the browser can retain information between different requests across the
web pages.

➢ Basic Architecture
The following diagram shows a very basic architecture of a web application and depicts
where HTTP sits:

The HTTP protocol is a request/response protocol based on the client/server based


architecture where web browsers, robots and search engines, etc. act like HTTP
clients, and the Web server acts as a server.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
• Client
The HTTP client sends a request to the server in the form of a request method, URI,
and protocol version, followed by a MIME-like message containing request
modifiers, client information, and possible body content over a TCP/IP connection.
• Server
The HTTP server responds with a status line, including the message's protocol
version and a success or error code, followed by a MIME-like message containing
server information, entity meta information, and possible entity-body content.

6. Simple Network Management Protocol


Simple Network Management Protocol (SNMP) is an Internet Standard protocol for
collecting and organizing information about managed devices on IP networks and for
modifying that information to change device behaviour. Devices that typically support
SNMP include cable modems, routers, switches, servers, workstations, printers, and
more.

o SNMP has two components Manager and agent.


o The manager is a host that controls and monitors a set of agents such as routers.
o It is an application layer protocol in which a few manager stations can handle a set of
agents.
o The protocol designed at the application level can monitor the devices made by
different manufacturers and installed on different physical networks.
o It is used in a heterogeneous network made of different LANs and WANs connected
by routers or gateways.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Managers & Agents
o A manager is a host that runs the SNMP client program while the agent is a router
that runs the SNMP server program.
o Management of the internet is achieved through simple interaction between a
manager and agent.
o The agent is used to keep the information in a database while the manager is used to
access the values in the database. For example, a router can store the appropriate
variables such as a number of packets received and forwarded while the manager can
compare these variables to determine whether the router is congested or not.
o Agents can also contribute to the management process. A server program on the
agent checks the environment, if something goes wrong, the agent sends a warning
message to the manager.

Management with SNMP has three basic ideas:


o A manager checks the agent by requesting the information that reflects the behavior
of the agent.
o A manager also forces the agent to perform a certain function by resetting values in
the agent database.
o An agent also contributes to the management process by warning the manager
regarding an unusual condition.

Management Components
o Management is not achieved only through the SNMP protocol but also the use of
other protocols that can cooperate with the SNMP protocol. Management is achieved
through the use of the other two protocols: SMI (Structure of management
information) and MIB(management information base).
o Management is a combination of SMI, MIB, and SNMP. All these three protocols
such as abstract syntax notation 1 (ASN.1) and basic encoding rules (BER).

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
➢ SMI

The SMI (Structure of management information) is a component used in network


management. Its main function is to define the type of data that can be stored in an
object and to show how to encode the data for the transmission over a network.

➢ MIB
o The MIB (Management information base) is a second component for the network
management.
o Each agent has its own MIB, which is a collection of all the objects that the
manager can manage. MIB is categorized into eight groups: system, interface,
address translation, ip, icmp, tcp, udp, and egp. These groups are under the mib
object.

➢ SNMP

SNMP defines five types of messages: GetRequest, GetNextRequest, SetRequest,


GetResponse, and Trap.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
GetRequest: The GetRequest message is sent from a manager (client) to the agent
(server) to retrieve the value of a variable.

GetNextRequest: The GetNextRequest message is sent from the manager to agent


to retrieve the value of a variable. This type of message is used to retrieve the values
of the entries in a table. If the manager does not know the indexes of the entries, then
it will not be able to retrieve the values. In such situations, GetNextRequest message
is used to define an object.

GetResponse: The GetResponse message is sent from an agent to the manager in


response to the GetRequest and GetNextRequest message. This message contains the
value of a variable requested by the manager.

SetRequest: The SetRequest message is sent from a manager to the agent to set a
value in a variable.

Trap: The Trap message is sent from an agent to the manager to report an event. For
example, if the agent is rebooted, then it informs the manager as well as sends the
time of rebooting.

7. Simple Mail Transfer Protocol

o SMTP stands for Simple Mail Transfer Protocol.


o SMTP is a set of communication guidelines that allow software to transmit an
electronic mail over the internet is called Simple Mail Transfer Protocol.
o It is a program used for sending messages to other computer users based on e-mail
addresses.
o It provides a mail exchange between users on the same or different computers, and it
also supports:
o It can send a single message to one or more recipients.
o Sending message can include text, voice, video or graphics.
o It can also send the messages on networks outside the internet.
o The main purpose of SMTP is used to set up communication rules between servers.
The servers have a way of identifying themselves and announcing what kind of
communication they are trying to perform. They also have a way of handling the
errors such as incorrect email address. For example, if the recipient address is wrong,
then receiving server reply with an error message of some kind.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
➢ Working of SMTP
1. Composition of Mail: A user sends an e-mail by composing an electronic mail
message using a Mail User Agent (MUA). Mail User Agent is a program which is
used to send and receive mail. The message contains two parts: body and header.
The body is the main part of the message while the header includes information such
as the sender and recipient address. The header also includes descriptive information
such as the subject of the message. In this case, the message body is like a letter and
header is like an envelope that contains the recipient's address.
2. Submission of Mail: After composing an email, the mail client then submits the
completed e-mail to the SMTP server by using SMTP on TCP port 25.
3. Delivery of Mail: E-mail addresses contain two parts: username of the recipient and
domain name. For example, [email protected], where "vivek" is the username of the
recipient and "gmail.com" is the domain name.
If the domain name of the recipient's email address is different from the sender's
domain name, then MSA will send the mail to the Mail Transfer Agent (MTA). To
relay the email, the MTA will find the target domain. It checks the MX record from
Domain Name System to obtain the target domain. The MX record contains the
domain name and IP address of the recipient's domain. Once the record is located,
MTA connects to the exchange server to relay the message.
4. Receipt and Processing of Mail: Once the incoming message is received, the
exchange server delivers it to the incoming server (Mail Delivery Agent) which
stores the e-mail where it waits for the user to retrieve it.
5. Access and Retrieval of Mail: The stored email in MDA can be retrieved by using
MUA (Mail User Agent). MUA can be accessed by using login and password.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
8. POP Protocol
The POP protocol stands for Post Office Protocol. As we know that SMTP is used as a
message transfer agent. When the message is sent, then SMPT is used to deliver the
message from the client to the server and then to the recipient server. But the message
is sent from the recipient server to the actual server with the help of the Message
Access Agent. The Message Access Agent contains two types of protocols, i.e., POP3
and IMAP.

How is mail transmitted?

Suppose sender wants to send the mail to receiver. First mail is transmitted to the sender's
mail server. Then, the mail is transmitted from the sender's mail server to the receiver's
mail server over the internet. On receiving the mail at the receiver's mail server, the mail is
then sent to the user. The whole process is done with the help of email protocols. The
transmission of mail from the sender to the sender's mail server and then to the receiver's
mail server is done with the help of the SMTP protocol. At the receiver's mail server, the
POP or IMAP protocol takes the data and transmits to the actual user.

Since SMTP is a push protocol so it pushes the message from the client to the server. As
we can observe in the above figure that SMTP pushes the message from the client to the
recipient's mail server. The third stage of email communication requires a pull protocol,
and POP is a pull protocol. When the mail is transmitted from the recipient mail server to
the client which means that the client is pulling the mail from the server.

What is POP3?

The POP3 is a simple protocol and having very limited functionalities. In the case of the
POP3 protocol, the POP3 client is installed on the recipient system while the POP3 server
is installed on the recipient's mail server.

History of POP3 protocol

The first version of post office protocol was first introduced in 1984 as RFC 918 by
the internet engineering task force. The developers developed a simple and effective email
protocol known as the POP3 protocol, which is used for retrieving the emails from the
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
server. This provides the facility for accessing the mails offline rather than accessing the
mailbox offline.

In 1985, the post office protocol version 2 was introduced in RFC 937, but it was replaced
with the post office protocol version 3 in 1988 with the publication of RFC 1081. Then,
POP3 was revised for the next 10 years before it was published. Once it was refined
completely, it got published on 1996.

Although the POP3 protocol has undergone various enhancements, the developers
maintained a basic principle that it follows a three-stage process at the time of mail
retrieval between the client and the server. They tried to make this protocol very simple,
and this simplicity makes this protocol very popular today.

Let's understand the working of the POP3 protocol.

To establish the connection between the POP3 server and the POP3 client, the POP3 server
asks for the user name to the POP3 client. If the username is found in the POP3 server,
then it sends the ok message. It then asks for the password from the POP3 client; then the
POP3 client sends the password to the POP3 server. If the password is matched, then the
POP3 server sends the OK message, and the connection gets established. After the
establishment of a connection, the client can see the list of mails on the POP3 mail server.
In the list of mails, the user will get the email numbers and sizes from the server. Out of
this list, the user can start the retrieval of mail.

Once the client retrieves all the emails from the server, all the emails from the server are
deleted. Therefore, we can say that the emails are restricted to a particular machine, so it
would not be possible to access the same mails on another machine. This situation can be
overcome by configuring the email settings to leave a copy of mail on the mail server.

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Advantages of POP3 protocol

The following are the advantages of a POP3 protocol:

o It allows the users to read the email offline. It requires an internet connection only at
the time of downloading emails from the server. Once the mails are downloaded
from the server, then all the downloaded mails reside on our PC or hard disk of our
computer, which can be accessed without the internet. Therefore, we can say that the
POP3 protocol does not require permanent internet connectivity.
o It provides easy and fast access to the emails as they are already stored on our PC.
o There is no limit on the size of the email which we receive or send.
o It requires less server storage space as all the mails are stored on the local machine.
o There is maximum size on the mailbox, but it is limited by the size of the hard disk.
o It is a simple protocol so it is one of the most popular protocols used today.
o It is easy to configure and use.

Disadvantages of POP3 protocol

The following are the advantages of a POP3 protocol:

o If the emails are downloaded from the server, then all the mails are deleted from the
server by default. So, mails cannot be accessed from other machines unless they are
configured to leave a copy of the mail on the server.
o Transferring the mail folder from the local machine to another machine can be
difficult.
o Since all the attachments are stored on your local machine, there is a high risk of a
virus attack if the virus scanner does not scan them. The virus attack can harm the
computer.
o The email folder which is downloaded from the mail server can also become
corrupted.
o The mails are stored on the local machine, so anyone who sits on your machine can
access the email folder.

==========================

Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore

You might also like