IT Students' Data Communication Guide
IT Students' Data Communication Guide
Lecture Notes
Data Communication
(BTIT201N)
Session Jan-June 2023
Subject Teacher
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.
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
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.
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.
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:
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
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
================
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)
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
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).
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.
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
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.
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).
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Frequency Modulation is abbreviated FM.
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
6. Digital Modulation
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.
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.
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.
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.
Advantages of FDM:
Disadvantages of FDM:
Applications of FDM:
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.
o Synchronous TDM
o Asynchronous TDM
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.
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.
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
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.
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
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.
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
Disadvantages
Serial transmission
Parallel transmission
========================
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
o Single-Bit Error
o Burst 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.
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.
The number of affected bits depends on the duration of the noise and data rate.
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.
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.
2.3 Checksum
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.
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
2.4 Cyclic Redundancy Check (CRC)
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.
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.
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.
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
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.
Suppose the 4th bit is changed from 0 to 1 at the receiving end, then parity bits are
recalculated.
R1 bit
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
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
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.
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.
o ENQ/ACK
o Poll/select
END/ACK
758.3K
Is THIS Apple's New 27' iMac? iMac Pro Rumor Roundup!
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.
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.
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.
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.
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.
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.
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
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 −
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
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
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.
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.
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.
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.
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
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.
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
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.
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.
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.
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
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.
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.
• 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.
• 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:-
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.
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:
Disadvantages of ISDN:
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 :
IP Version Types:
Example – 3221:1cd7:74b6:6da7:0000:0000:7349:6472
➢ MAC Address :
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.
➢ 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.
Prepared by: - Er. Gaurav Shrivastava, Asst. Professor (I.T. Dept.) SVIIT-SVVV, Indore
Figure: ARP operation
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.
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.
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 (b) BOOTP client and server on the same and different network
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:
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.
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
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.
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
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.
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.
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.
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.
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
An application layer protocol defines how the application processes running on different
systems, pass the messages to each other.
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
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.
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.
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.
• 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
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
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.
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.
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:
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.
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 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
➢ 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
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.
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.
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.
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.
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.
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
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.
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