Presented By:
Harveer Choudhary
(CSE/IT)
Subject: Data communication and computer Networks (4CS4-07)
SYLLABUS
UNIT-1:
Introductory Concepts: Network hardware, Network software, topologies, Protocols
and standards, OSI model, TCP model, TCP/IP model, Physical Layer: Digital and
Analog Signals, Periodic Analog Signals, Signal Transmission, Limitations of Data
Rate, Digital Data Transmission, Performance Measures, Line Coding, Digital
Modulation, Media and Digital Transmission System
UNIT-2:
Data Link Layer: Error Detection and Correction, Types of Errors, Two dimensional
parity check, Detection verses correction, Block Coding, Linear Block Coding, Cyclic
Codes, Checksum, Standardized Polynomial Code, Error Correction Methods, Forward
Error Correction, Protocols: Stop and wait, Go-back-N ARQ, Selective Repeat
ARQ,Sliding window, Piggy backing, Pure ALOHA, Slotted ALOHA, CSMA/CD,
CSMA/CA
1.2
UNIT-3
Network Layer: Design issues, Routing algorithms: IPV4, IPV6, Address
mapping: ARQ, RARQ, Congestion control, Unicast, Multicast,
Broadcast routing protocols, Quality of Service, Internetworking
UNIT-4:
Transport Layer: Transport service, Elements of transport protocols,
User Datagram Protocol, Transmission Control Protocol, Quality of
service, Leaky Bucket and Token Bucket algorithm
UNIT-5:
Application Layer: WWW, DNS, Multimedia, Electronic mail, FTP,
HTTP, SMTP, Introduction to network security
1.3
Text/ Refrence Books
1. “Data Communication and Networking” by Behrouz A
Forouzan- TMH
2. “Data and Computer Communication” by William
Stallings
3. “Computer Networking” by James F Kurose and Keith W
Ross
4. “Computer Networks 5th Edition” by Tanenbaum
1.4
DATA COMMUNICATIONS
The term telecommunication means communication at a
distance.
The word data refers to information presented in
whatever form is agreed upon by the parties creating and
using the data.
Data communications are the exchange of data between
two devices via some form of transmission medium such
as a wire cable.
1.5
Components of a data communication system
1.6
Data flow (simplex, half-duplex, and full-duplex)
1.7
NETWORKS
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.
A link can be a cable, air, optical fiber, or any medium
which can transport a signal carrying information.
Topics discussed in this section:
Network Criteria
Physical Structures
Categories of Networks
1.8
Physical Structures
Type of Connection
Point to Point - single transmitter and receiver
Multipoint - multiple recipients of single transmission
Physical Topology
Connection of devices
Type of transmission - unicast, mulitcast, broadcast
1.9
Types of connections: point-to-point and multipoint
1.10
Categories of topology
1.11
A fully connected mesh topology (five devices)
1.12
A star topology connecting four stations
1.13
A bus topology connecting three stations
1.14
A ring topology connecting six stations
1.15
A hybrid topology: a star backbone with three bus networks
1.16
Categories of Networks
Local Area Networks (LANs)
Short distances
Designed to provide local interconnectivity
Wide Area Networks (WANs)
Long distances
Provide connectivity over large areas
Metropolitan Area Networks (MANs)
Provide connectivity over areas such as a city, a campus
1.17
An isolated LAN connecting 12 computers to a hub in a closet
1.18
WANs: a switched WAN and a point-to-point WAN
1.19
A heterogeneous network made of four WANs and two LANs
1.20
THE INTERNET
The Internet is a communication system that has brought
a wealth of information to our fingertips and organized it
for our use.
1.21
Figure 1.13 Hierarchical organization of the Internet
1.22
PROTOCOLS
A protocol is synonymous with rule. It consists of a set of
rules that govern data communications. It determines
what is communicated, how it is communicated and when
it is communicated. The key elements of a protocol are
syntax, semantics and timing
Topics discussed in this section:
Syntax
Semantics
Timing
1.23
Elements of a Protocol
Syntax
Structure or format of the data
Indicates how to read the bits - field delineation
Semantics
Interprets the meaning of the bits
Knows which fields define what action
Timing
When data should be sent and what
Speed at which data should be sent or speed at which it is being
received.
1.24
THE OSI MODEL
Established in 1947, the International Standards
Organization (ISO) is a multinational body dedicated to
worldwide agreement on international standards.
An ISO standard that covers all aspects of network
communications is the Open Systems Interconnection
(OSI) model.
It was first introduced in the late 1970s.
2.1
ISO is the organization.
OSI is the model.
2.2
Figure 2.2 Seven layers of the OSI model
2.3
see video =https://www.youtube.com/watch?v=Q3WpcO6vtQ8&t=81
2.4
Figure 2.3 The interaction between layers in the OSI model
2.5
Figure 2.4 An exchange using the OSI model
2.6
2-3 LAYERS IN THE OSI MODEL
In this section we briefly describe the functions of each
layer in the OSI model.
Physical Layer
Data Link Layer
Network Layer
Transport Layer
Session Layer
Presentation Layer
Application Layer
2.7
Figure 2.5 Physical layer
2.8
The physical layer is responsible for movements of
individual bits from one hop (node) to the next.
2.9
Figure 2.6 Data link layer
2.10
encapsulate
s = to
combine
Role of data link layer
Framing. Data-link layer takes packets from Network
Layer and encapsulates them into Frames. ...
Addressing. Data-link layer provides layer-2 hardware
addressing mechanism. ...
Synchronization. ...
Error Control. ...
Flow Control. ...
Multi-Access.
2.11
Note
The data link layer is responsible for moving
frames from one hop (node) to the next.
2.12
Figure 2.7 Hop-to-hop delivery
2.13
Figure 2.8 Network layer
2.14
Note
The network layer is responsible for the
delivery of individual packets from
the source host to the destination host.
2.15
Figure 2.9 Source-to-destination delivery
2.16
Figure 2.10 Transport layer
2.17
Note
The transport layer is responsible for the delivery
of a message from one process to another.
2.18
Figure 2.11 Reliable process-to-process delivery of a message
2.19
Figure 2.12 Session layer
2.20
Note
The session layer is responsible for dialog
control and synchronization.
2.21
Figure 2.13 Presentation layer
2.22
Note
The presentation layer is responsible for translation,
compression, and encryption.
2.23
Figure 2.14 Application layer
2.24
Note
The application layer is responsible for
providing services to the user.
2.25
Figure 2.15 Summary of layers
2.26
TCP/IP PROTOCOL SUITE
The layers in the TCP/IP protocol suite do not exactly
match those in the OSI model.
The original TCP/IP protocol suite was defined as having
four layers: host-to-network, internet, transport, and
application.
However, when TCP/IP is compared to OSI, we can say
that the TCP/IP protocol suite is made of
five layers: physical, data link, network, transport, and
application.
2.27
Figure 2.16 TCP/IP and OSI model
APPLICATION LAYER
TRANSPORT LAYER
NETWORK LAYER
NETWORK INTERFACE LAYER
2.28
2.29
2-5 ADDRESSING
Four levels of addresses are used in an internet employing
the TCP/IP protocols: physical, logical, port, and specific.
2.30
Figure 2.17 Addresses in TCP/IP
2.31
Figure 2.18 Relationship of layers and addresses in TCP/IP
2.32
Note
The physical addresses will change from hop to hop,
but the logical addresses usually remain the same.
2.33
2.34
Port Address
A port number is always associated with an IP address of a host
and the type of transport protocol used for communication. It
completes the destination or origination network address of a
message
Application-Specific Addresses
Some applications have user-friendly addresses that are designed
for that specific application. Examples include the e-
mail address (for example, forouzan@fhda.edu) and the
Universal Resource Locator (URL) (for example,
www.mhhe.com)..
2.35
ANALOG AND DIGITAL DATA
Data can be analog or digital.
The term analog data refers to information that is
continuous;
digital data refers to information that has discrete states.
Analog data take on continuous values. Digital data take
on discrete values.
3.1
Analog and Digital Data
Data can be analog or digital.
Analog data are continuous and take
continuous values.
Digital data have discrete states and take
discrete values.
3.2
Analog and Digital Signals
• Signals can be analog or digital.
• Analog signals can have an infinite number
of values in a range.
• Digital signals can have only a limited
number of values.
3.3
Figure 3.1 Comparison of analog and digital signals
3.4
3-2 PERIODIC ANALOG SIGNALS
In data communications, we commonly use periodic
analog signals and nonperiodic digital signals.
Periodic analog signals can be classified as simple or
composite.
A simple periodic analog signal, a sine wave, cannot be
decomposed into simpler signals.
A composite periodic analog signal is composed of
multiple sine waves.
3.5
Figure 3.2 A sine wave
3.6
Figure 3.3 Two signals with the same phase and frequency,
but different amplitudes
3.7
Note
Frequency and period are the inverse of
each other.
3.8
Figure 3.4 Two signals with the same amplitude and phase,
but different frequencies
3.9
Frequency
• Frequency is the rate of change with respect
to time.
• Change in a short span of time means high
frequency.
• Change over a long span of
time means low frequency.
3.10
Note
If a signal does not change at all, its
frequency is zero.
If a signal changes instantaneously, its
frequency is infinite.
3.11
3-4 TRANSMISSION IMPAIRMENT
Signals travel through transmission media, which are not
perfect. The imperfection causes signal impairment.
This means that the signal at the beginning of the
medium is not the same as the signal at the end of the
medium.
Three causes of impairment are attenuation, distortion,
and noise.
3.12
Figure 3.25 Causes of impairment
3.13
Attenuation
Means loss of energy -> weaker signal
When a signal travels through a medium it
loses energy overcoming the resistance of
the medium
Amplifiers are used to compensate for this
loss of energy by amplifying the signal.
3.14
Measurement of Attenuation
To show the loss or gain of energy the unit
“decibel” is used.
dB = 10log10P2/P1
P1 - input signal
P2 - output signal
3.15
Figure 3.26 Attenuation
3.16
Example 3.26
Suppose a signal travels through a transmission medium
and its power is reduced to one-half. This means that P2
is (1/2)P1. In this case, the attenuation (loss of power)
can be calculated as
A loss of 3 dB (–3 dB) is equivalent to losing one-half
the power.
3.17
Example 3.27
A signal travels through an amplifier, and its power is
increased 10 times. This means that P2 = 10P1 . In this
case, the amplification (gain of power) can be calculated
as
3.18
Distortion
Means that the signal changes its form or shape
Distortion occurs in composite signals
Each frequency component has its own
propagation speed traveling through a medium.
The different components therefore arrive with
different delays at the receiver.
That means that the signals have different phases
at the receiver than they did at the source.
3.19
Figure 3.28 Distortion
3.20
Noise
There are different types of noise
Thermal - random noise of electrons in the wire
creates an extra signal
Induced - from motors and appliances, devices
act are transmitter antenna and medium as
receiving antenna.
Crosstalk - same as above but between two
wires.
Impulse - Spikes that result from power lines,
lighning, etc.
3.21
Figure 3.29 Noise
3.22
Signal to Noise Ratio (SNR)
To measure the quality of a system the
SNR is often used. It indicates the
strength of the signal wrt the noise power
in the system.
It is the ratio between two powers.
It is usually given in dB and referred to as
SNRdB.
3.1
3-5 DATA RATE LIMITS
A very important consideration in data communications
is how fast we can send data, in bits per second, over a
channel. Data rate depends on three factors:
1. The bandwidth available
2. The level of the signals we use
3. The quality of the channel (the level of noise)
3.2
Bit Rate, Data Rate
3.3
Channel Capacity
3.4
Capacity of a System
The bit rate of a system increases with an
increase in the number of signal levels we
use to denote a symbol.
A symbol can consist of a single bit or “n”
bits.
The number of signal levels = 2n.
3.5
Nyquist Theorem(noiseless Channel)
Nyquist gives the upper bound for the bit rate
of a transmission system by calculating the
bit rate directly from the number of bits in a
symbol (or signal levels) and the bandwidth
of the system
Nyquist theorem states that for a noiseless
channel:
C = 2 B log22n
C= capacity in bps
B = bandwidth in Hz
3.6
Example 3.34
Consider a noiseless channel with a bandwidth of 3000
Hz transmitting a signal with two signal levels. The
maximum bit rate can be calculated as
3.7
Example 3.35
Consider the same noiseless channel transmitting a
signal with four signal levels (for each level, we send 2
bits). The maximum bit rate can be calculated as
3.8
Shannon’s Theorem(Noisy Channel)
Shannon’s theorem gives the capacity
of a system in the presence of noise.
C = B log2(1 + SNR)
3.9
Example 3.38
We can calculate the theoretical highest bit rate of a
regular telephone line. A telephone line normally has a
bandwidth of 3000. The signal-to-noise ratio is usually
3162.
For this channel the capacity is calculated as
This means that the highest bit rate for a telephone line
is 34.860 kbps.
3.10
Example 3.39
The signal-to-noise ratio is often given in decibels.
Assume that SNRdB = 36 and the channel bandwidth is 2
MHz.
The theoretical channel capacity can be calculated as
3.11
3.12
3.13
Note
The Shannon capacity gives us the
upper limit; the Nyquist formula tells us
how many signal levels we need.
3.14
Digital Transmission
Methods to transmit data digitally
Line coding
Block coding
Sampling
Transmission modes
Parallel
Serial
Synchronous
Asynchronous
1
Line Coding
Process of converting binary data to a digital signal
2
Signal Level versus Data Level
Signal level – number of
values allowed in a
particular signal
Data level – number of
values used to represent
data
3
Pulse Rate versus Bit Rate
Pulse rate – defines number of pulses per second
Pulse – minimum amount of time required to transmit
a symbol
Bit rate – defines number of bits per second
BitRate = PulseRate x log2L
where L is the number of data levels
4
Line Coding
Unipolar
Polar
Bipolar
5
Line Coding Schemes
6
Unipolar
Simplest method; inexpensive
Uses only one voltage level
Polarity is usually assigned to binary 1; a 0 is represented
by zero voltage
7
Polar
Uses two voltage levels, one positive and one
negative
Variations
Nonreturn to zero (NRZ)
Return to zero (RZ)
Manchester
Differential Manchester
8
Non return to Zero (NRZ)
Value of signal is always positive or negative
NRZ-L
Signal level depends on bit represented; positive
usually means 0, negative usually means 1
Problem: synchronization of long streams of 0s or
1s
NRZ-I (NRZ-Invert)
Inversion of voltage represents a 1 bit
0 bit represented by no change
9
NRZ-L and NRZ-I Encoding
10
11
Return to Zero (RZ)
In NRZ-I, long strings of 0s may still be a problem
May include synchronization as part of the signal
for both 1s and 0s
How?
Must include a signal change during each bit
Uses three values: positive, negative, and zero
1 bit represented by positive-to-zero
0 bit represented by negative-to-zero
12
RZ Encoding
13
RZ Encoding
Disadvantage
Requires two signal changes to encode each bit;
more bandwidth necessary
14
Manchester
Uses an inversion at the middle of each bit
interval for both synchronization and bit
representation
Negative-to-positive represents binary 1
Positive-to-negative represents binary 0
Achieves same level of synchronization with only
two levels of amplitude
15
Manchester Encoding
16
Differential Manchester
Inversion at middle of bit interval is used for
synchronization
Presence or absence of additional transition at
beginning of interval identifies the bit
Transition means binary 0; no transition means 1
Requires two signal changes to represent binary
0; only one to represent 1
17
Differential Manchester
18
Bipolar Encoding
Uses three voltage levels: positive, negative, and
zero
Zero level represents binary 0; 1s are
represented with alternating positive and negative
voltages, even when not consecutive
Two schemes
Alternate mark inversion (AMI)
19
Bipolar AMI
Neutral, zero voltage represents binary 0
Binary 1s represented by alternating positive and negative
voltages
20
21
University of South Alabama 22
Computer and Information Sciences
Example :code: 01001110 (NRZ-L,NRZ-I)
23
Example :code: 01001100011( Bipolar,
Manchaster, Diffrential Manchaster)
24
Multilevel Schemes
In mBnL schemes, a pattern of m data elements is
encoded as a pattern of n signal elements
2BIQ The first mBnL scheme two binary, one
quaternary (2BIQ),
uses data patterns of size 2 and encodes the 2-bit patterns
as one signal element belonging to a four-level signal.
25
Other Schemes
2B1Q – two binary, one
quaternary; uses four
voltage levels
One pulse can represent 2
bits; more efficient
26
Multitransition
MLT-3 – multi-line transmission, three level – similar to
NRZ-I using three levels of signals;
signal transitions occur at beginning of 1 bit, no transition
at beginning of 0
27
Transmission Mode
Parallel
Serial
Synchronous
Asynchronous
28
Parallel Transmission
Bits in a group are sent
simultaneously, each
using a separate link
n wires are used to
send n bits at one time
Advantage: speed
Disadvantage: cost;
limited to short distances
29
Serial Transmission
Transmission of data
one bit at a time using
only one single link
Advantage: reduced cost
Disadvantage: requires
conversion devices
Methods:
Asynchronous
Synchronous 30
Asynchronous Transmission
Transfer of data with start and stop bits and a
variable time interval between data units
Timing is unimportant
Start bit alerts receiver that new group of data is
arriving
Stop bit alerts receiver that byte is finished
Synchronization achieved through start/stop bits.
31
Asynchronous Transmission
32
Asynchronous Transmission
Requires additional overhead (start/stop bits)
Slower
Cheap and effective
Ideal for low-speed communication when gaps
may occur during transmission (ex: keyboard)
33
Synchronous Transmission
Requires constant timing relationship
Bit stream is combined into longer frames,
possibly containing multiple bytes
Any gaps between bursts are filled in with a
special sequence of 0s and 1s indicating idle
Advantage: speed, no gaps or extra bits
Byte synchronization accomplished by data link
layer
34
Synchronous Transmission
35
Transmission medium and physical layer
7.1
Transmission media
A transmission medium can be broadly defined
as anything that can carry information from a
source to a destination.
In telecommunications, transmission media can
be divided into two broad categories:
guided and unguided
7.2
Classes of transmission media
7.3
GUIDED MEDIA
Guided media, which are those that provide a conduit
from one device to another,
Include
twisted-pair cable
coaxial cable
fiber-optic cable
7.4
Twisted-pair cable
7.5
Twisted-pair cable
A twisted pair consists of two conductors (normally copper), each
with its own plastic insulation, twisted together.
One of the wires is used to carry signals to the receiver, and the
other is used only as a ground reference.
The most common twisted-pair cable used in communications is
referred to as unshielded twisted-pair (UTP).
IBM has also produced a version of twisted-pair cable for its use
called shielded twisted-pair (STP). STP cable has a metal foil or
braided mesh covering that encases each pair of insulated
conductors.
7.6
UTP and STP cables
7.7
UTP connector
7.8
Coaxial cable
7.9
Coaxial cable
Coaxial cable carries signals of higher frequency ranges than
those in twisted pair Cable.
Instead of having two wires, coax has a central core conductor of
solid or stranded wire (usually copper) enclosed in an insulating
sheath, which is, in turn, encased in an outer conductor of metal
foil, braid, or a combination of the two.
The outer metallic wrapping serves both as a shield against noise
and as the second conductor, which completes the circuit. This
outer conductor is also enclosed in an insulating sheath, and the
whole cable is protected by a plastic cover
7.10
Categories of coaxial cables
7.11
Optical fiber
7.12
Fiber construction
7.13
Optical fiber
A fiber-optic cable is made of glass or plastic and transmits signals
in the form of light.
To understand optical fiber, 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 substance.
If a ray of light traveling through one substance suddenly enters
another substance (of a different density), the ray changes
direction.
7.14
UNGUIDED MEDIA: WIRELESS
Unguided media transport electromagnetic waves
without using a physical conductor. This type of
communication is often referred to as wireless
communication.
Topics discussed in this section:
Radio Waves
Microwaves
Infrared
7.15
Electromagnetic spectrum for wireless communication
7.16
Wireless transmission waves
7.17
Omnidirectional antenna
7.18
Radio waves are used for multicast
communications, such as radio and
television, and paging systems.
7.19
Unidirectional antennas
7.20
Microwaves are used for unicast
communication such as cellular
telephones, satellite networks,
and wireless LANs.
7.21
Infrared signals can be used for short-
range communication in a closed area
using line-of-sight propagation.
7.22
Networking Devices
• Repeaters
• Hubs
• Bridges
• Routers
• Switch
• Gateways
• Modem
• NIC
What are internetworking devices?
• Internetworking devices are products used to
connect networks.
• As computer networks grow in size and
complexity, so do the internetworking devices
used to connect them.
Repeater
• A repeater can provide a simple solution if either
of these two problems exists.
• When signals first leave a transmitting station,
they are clean and easily recognizable.
• However, the longer the cable length, the weaker
and more deteriorated the signals become as
they pass along the networking media.
Location of Repeater
Hub
• Multi-port repeaters are often called hubs.
• Hubs are very common internetworking
devices. Generally speaking, the term hub is
used instead of repeater when referring to the
device that serves as the center of a star
topology network.
At what layer of the OSI model do
bridges operate?
bridges operate at the data link layer, layer 2,
What are routers?
• Routers are another type of internetworking
device.
• These devices pass data packets between
networks based on network protocol or layer 3
information.
• Routers have the ability to make intelligent
decisions as to the best path for delivery of
data on the network.
SWITCH
ANALOG-TO-DIGITAL CONVERSION
A digital signal is superior to an analog signal
because it is more robust to noise and can easily be
recovered, corrected and amplified.
For this reason, the tendency today is to change an
analog signal to digital data.
we describe two techniques
Pulse Code Modulation (PCM)
Delta Modulation (DM)
PCM
PCM consists of three steps to digitize an
analog signal:
1. Sampling
2. Quantization
3. Binary encoding
Before we sample, we have to filter the signal
to limit the maximum frequency of the signal
as it affects the sampling rate.
Filtering should ensure that we do not distort
the signal.
4.2
Components of PCM encoder
4.3
Sampling
Analog signal is sampled every TS secs.
Ts is referred to as the sampling interval.
fs = 1/Ts is called the sampling rate or
sampling frequency.
There are 3 sampling methods:
Ideal - an impulse at each sampling instant
Natural - a pulse of short width with varying
amplitude
Flattop - sample and hold, like natural but with
single amplitude value
4.4
Quantization
Sampling results in a series of pulses of varying
amplitude values ranging between two limits: a min
and a max.
The amplitude values are infinite between the two
limits.
We need to map the infinite amplitude values onto a
finite set of known values.
This is achieved by dividing the distance between min
and max into L zones, each of height
= (max - min)/L
4.5
Delta Modulation
This scheme sends only the difference between pulses,
if the pulse at time tn+1 is higher in amplitude value
than the pulse at time tn, then a single bit, say a “1”, is
used to indicate the positive value.
If the pulse is lower in value, resulting in a negative
value, a “0” is used.
This scheme works well for small changes in signal
values between samples.
If changes in amplitude are large, this will result in
large errors.
4.6
Delta modulation components
4.7
Delta demodulation components
4.8