mod11
mod11
Lecture I
Overview of Data Communications
and Networking
➢Data Communication
➢ Networks & Internet
➢ Protocols & Standards
➢ Layered Tasks
➢ Internet Model
➢ OSI Model
Data
Data Flow
Data
Data Flow
both directions
Example: Telephone network
Data
Data
Networks & Distributed processing
◼ Interconnection of ‘Intelligent devices’ is called a ‘computer network’
◼ In ‘Distributed processing’ a task is divided and submitted among
multiple computers using network
◼ Network Criteria: to design an effective and efficient network the
most important criteria are
◼ Performance can be measured in many ways
1. Transmit time
2. Response time
◼ Performance’ depends on
◼No of users: large no of users may slow down the ‘response time’ due to
heavy traffic
◼Type of transmission medium: defines the speed at which the data can travel
performance
◼Software: efficient mechanisms to transform raw data into transmittable
ETC.
Mesh Topology
◼ Every device has a dedicated point-to-point
link to every other device
◼ A fully connected mesh network has n(n-
1)/2 links ( nC2 )
◼ Every device required to have at least n-1
I/O ports
◼ Eliminates traffic problem as links are not
shared
◼ It is robust as breaking one link couldn't defunct the network
completely
◼ Privacy/security is maintained
1. Layered Architecture
2. Peer-to-Peer Processes
3. Encapsulation
2.30
Seven layers of the OSI model
The interaction between layers in the OSI model
Figure 2.4 An exchange using the OSI model
Physical layer
◼ The responsibility of physical layer is to coordinate the functions
required to transmit a bit stream over a physical medium
◼ The duties are
◼ Defines the characteristics of the interface between devices and
transmission medium
◼ Type of transmission medium, topology, etc…
◼ Representation of bits
◼ Encoding, voltage level, duration etc…
◼ Data rate
◼ Synchronization of bits
◼ Sender’s and receiver’s clock synchronization
Data link layer
◼ Flow control
◼This mechanism helps to prevents overflow at receiving side
◼ Error control
◼Mechanism to detect/correct errors in transmission
◼ Access Control
◼Which device has the control over the link at a given time
Datalink layer contd.
◼ Physical addressing and hop-hop delivery can
be done in one network only
◼ Mail Services: Provides the basis for email forwarding and storage.
•The name is misleading because TCP and IP are only two of the many
protocols that compose the suite.
•It has its origin in the work done by the US Department of Defense.
• TCP / IP defines 3 transport layer protocol:
•Transmission Control Protocol (TCP)
•User Datagram Protocol (UDP)
•Stream Control Transmission Protocol(SCTP)
•TCP / IP defines 1 main network layer protocol:
•IP (Internetworking Protocol)
•OSI model specifies function belong to each of its layers.
•The layers of TCP/IP protocol suite contain relatively independent
protocols.
TCP/IP and OSI model
2.51
Physical Address
2.52
IP address
2.53
Lecture II
The Physical Layer
• Signals
• Digital Transmission
• Analog Transmission
• Multiplexing
• Transmission Media
Position of the physical layer
DATA
Aperiodic Signal
Periodic Signal
Note
Solution
From Table 3.1 we find the equivalents of 1 ms (1 ms is 10−3 s) and 1
s (1 s is 106 μs). We make the following substitutions:.
π/2 rad
π rad
Solution
We know that 1 complete cycle is 360°. Therefore, 1/6 cycle is
The time-domain and frequency-domain plots of a sine wave
3.75
Note
3.78
Composite signals
◼ A single-frequency sine wave is not useful in
data communications; we need to change one
or more of its characteristics to make it useful.
◼ When we change one or more characteristics
of a single frequency signal, it becomes a
composite signal made of many frequencies.
◼ A composite signal is composed of multiple
sine waves called harmonics
Three harmonics
Figure The time domain and frequency domain of three sine waves
The spectrum has only five spikes, at 100, 300, 500, 700, and 900 Hz).
The spectrum has only five spikes, at 100, 300, 500, 700, and 900 Hz (see Figure 3.13).
A periodic signal has a bandwidth of 20 Hz. The highest frequency is 60 Hz. What is the
lowest frequency? Draw the spectrum if the signal contains all frequencies of the same
amplitude.
Solution
Let fh be the highest frequency, fl the lowest frequency, and B the bandwidth. Then
B = fh – fl ⇨ 20 = 60 - fl ⇨ fl = 60 -20 = 40 Hz
Solution
The answer is definitely no. Although the signal can have the
same bandwidth (1000 Hz), the range does not overlap. The
medium can only pass the frequencies between 3000 and 4000
Hz; the signal is totally lost.
DIGITAL SIGNALS
Solution
the bit rate is:
100 × 24 × 80 × 8 bits /min = 100 × 24 × 80 × 8 / 60 bits /sec = 25600
bps = 25.6 kbps
Analog vs Digital
• Channels or links are of two types
• low-pass: lower limit is zero and upper
limit is any frequency ()
•band-pass: has a band width with
frequencies f1and f2
1.Bandwidth of channel.
2.Signal levels
3.Channel quality (level of noise)
◼ For a noise less channel the nyquist bit rate defines the theoretical
◼ In reality, this is not true because noise will limit signal level for
Example
ANS:
Ans:
Since this result is not a power of 2 we need to either increase the number of
levels or reduce the bit rate If we have 128 levels, the bit rate is 280 kbps If we
have 64 levels, the bit rate is 240 kbps
Noisy Channel: Shannon Capacity
This means that the capacity of this channel is zero regardless of the bandwidth. In other
words, we cannot receive any data through this channel.
Example
Solution: First, we use the Shannon formula to find the upper limit.
The Shannon capacity gives the upper limit; the Nyquist formula gives us how many signal
level we need.
TRANSMISSION IMPAIRMENT
Solution
We can calculate the power in the signal as
Solution
We can calculate the throughput as
What is the propagation time if the distance between the two points is
12,000 km? Assume the propagation speed to be 2.4 × 108 m/s in cable.
Solution
We can calculate the propagation time as
Example
What are the propagation time and the transmission time for a 2.5-kbyte
message (an e-mail) if the bandwidth of the network is 1 Gbps? Assume
that the distance between the sender and the receiver is 12,000 km and
that light travels at 2.4 × 108 m/s.
Example
What are the propagation time and the transmission time for a
5-Mbyte message (an image) if the bandwidth of the network is
1 Mbps? Assume that the distance between the sender and the
receiver is 12,000 km and that light travels at 2.4 × 108 m/s.
Solution
Note that in this case, because the message is very long and the bandwidth is not very high, the
dominant factor is the transmission time, not the propagation time. The propagation time can be
ignored.
Bandwidth Delay Product
signal
Data and signal elements
Solution
We assume that the average value of c is 1/2 . The baud
rate is then
DC Component
◼ When there is no transition between +ve voltage & -ve voltage for
long periods of time in a signal , the frequency of the signal become
zero. which is known as the direct-current (DC) component.
◼ A component having zero frequency
◼ Can’t be passed through some components of a communication
system like transformer
◼ Energy consumed is useless
Self Synchronization
◼ No Synchronization: if receivers clock is faster
Solution
At 1 Kbps:
1000 bits sent ➔1001 bits received➔1 extra bps
At 1 Mbps:
1,000,000 bits sent ➔1,001,000 bits received➔1000 extra bps
Line coding schemes
Unipolar scheme
In a unipolar scheme, all the signal levels are on one side of the time
axis, either above or below
NRZ (Non-Return-to-Zero): positive voltage defines bit 1 and the zero
voltage defines bit 0
◼ One is coded as +ve voltage
Note:
Bipolar schemes:
1) AMI
2) Pseudoternary
Bipolar schemes: AMI and pseudoternary
AMI: Bit 0 is zero level and 1 bit alternate +ve and –ve voltage
Pseudoternary: Bit 1 is zero level and 0 bit alternate +ve and –ve level
Multilevel scheme :mBnL
• In mBnL schemes, a pattern of m data elements is encoded as a
pattern of n signal elements in which 2m ≤ Ln.
Where
m: length of the binary pattern,
B: Binary data
n: Length of the signal pattern.
L: Number of levels in the signaling.
4.160
Redundancy
• A 4 bit data word can have 24 combinations.
• A 5 bit word can have 25=32 combinations.
• We therefore have 32 - 16 = 16 extra words.
• As a result, the 5-bit patterns can always have two '1's
in them even if the data is all '0's a translation.
• Some of the extra words are used for control/signalling
purposes.
Scrambling
• Long sequence of 0s present in the data creates synchronization
problem. For example in AMI long sequence of 0s represented as 0
voltage level can create synchronization problem.
• Scrambling can be used to avoid long sequence of 0s in the original
stream.
Two schemes available for scrambling
✓ B8ZS(Bipolar 8-Zero Substitution)
✓ HDB3(High-density bipolar 3-zero)
B8ZS(Bipolar 8-Zero Substitution)
▪Eight consecutive zero-level voltages are replaced by the sequence
000VB0VB.
V→ Same polarity of previous Non-zero pulse(violates line
coding rule)
B→ Bipolar(opposite of previous Non-zero pulse) (According
to line coding rule)
HDB3(High-Density Bipolar 3-Zero)
Rules:
1. If the number of nonzero pulses after the last substitution is odd, the
substitution pattern will be 000V, which makes the total number of
nonzero pulses even.
2. If the number of nonzero pulses after the last substitution is even, the
substitution pattern will be B00V, which makes the total number of
nonzero pulses even.
Example
ANALOG-TO-DIGITAL CONVERSION
Techniques
Steps of PCM:
◼ Sampling: Collect the sample data at instantaneous points of message signal at
regular interval. It is also known pulse amplitude modulation(PAM)
◼ Quantizing: Reduces the redundant bits and compresses the value.
◼ Encoding: It designates each quantized level by a binary code.
Sampling
• Analog signal is sampled every TS secs.
• Sampling is measuring amplitude in equal intervals
• 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
• The process is referred to as pulse amplitude modulation
(PAM) and the outcome is a signal with analog (non
integer) values
Figure 4.22 Three different sampling methods for PCM
Pulse width is τ.
τ = zero Pulse width = τ
Pulse width = τ
Sampling rate/ sampling frequency
• Accuracy of reproduction of the original signal depend on the
no of samples taken
• The analog signal is sampled every Ts second, where Ts is the
sample interval or period.
• The inverse of the sampling interval is called the sampling rate
or sampling frequency
Note
Solution
The human voice normally contains frequencies from 0 to 4000 Hz.
So the sampling rate and bit rate are calculated as follows:
▪ Parallel Transmission
▪ Serial Transmission
Transmission mode
Parallel Transmission
◼ Information is organized into group of bits
◼ All bits of one group are transmitted with each clock tick
from one device to other
◼ More speed
◼ Cost is high(uses n wires for transmission of n bits)
restricted to short distance
Serial Transmission
◼ One bit follows another using same line. We need
only 1 communication link or channel
Note:
In asynchronous transmission, we send 1 start
bit (0) at the beginning and 1 or more stop bits
(1s) at the end of each byte. There may be a gap
between each byte.
Asynchronous Transmission
◼ Insertion of extra bits & a gap makes it slower
◼ But cheap and effective
Note:
In synchronous transmission,
we send bits one after another without
start/stop bits or gaps.
It is the responsibility of the receiver to
group the bits.
Synchronous Transmission
◼ More speed
◼ Synchronization is necessary
◼ In synchronous transmission, we send bits one after another without
start or stop bits or gaps. The bits are usually sent as bytes and many
bytes are grouped into a frame. A frame is identified with a start and
an end byte.
◼ Accuracy is completely dependent on the ability of the receiving
device to keep an accurate count of the bits as they come in
◼ Byte synchronization is done in datalink layer
Analog Transmission
Modulation of Digital Data
1. Converting digital data to band pass analog signal is known as Digital to Analog
conversion
2. Converting low pass analog signal to a band pass analog signal is known as analog
to analog conversion
Solution :
In this example, S = 1000, N = 8000, and r and L are unknown.
We find first the value of r and then the value of L.
S = N * 1/r → r = N / S = 8000 bits / 1000 baud = 8 bits/baud
r = log 2 (L ) → L = 2r = 28 = 256
Amplitude Shift Keying
• The amplitude of the carrier signal is varied to represent binary one or zero
•ASK is highly susceptible to noise interference, i.e. a zero may be changed
to 1 or vice versa
•If one of the bit values is represented by no voltage then it is called on/off
keying (OOK). It results in reduction of energy transmitted.
• Bandwidth of the ASK is proportional to the signal rate S.
is given by B=(1+d) S
• Where S is the baud rate and d is a factor depends on modulation and
filtering . The value of d lies between 0 and 1
The required bandwidth has a minimum value of S and a maximum value
•
of 2S
• The middle of the bandwidth is where fc ,the carrier frequency is located.
Implementation of binary ASK
We have an available bandwidth of 100 kHz which
spans from 200 to 300 kHz. What are the carrier
frequency and the bit rate if we modulated our data by
using ASK with d = 1?
Solution
The middle of the bandwidth is located at 250 kHz.
That is fc = 250 kHz.
We can use the formula for bandwidth to find the bit rate
(with d = 1 and r = 1).
Example
Given a bandwidth of 10,000 Hz (1000 to 11,000 Hz), draw the full-
duplex ASK diagram of the system. Find the carriers and the bandwidths
in each direction. Assume there is no gap between the bands in the two
directions.
Solution
If the difference between the two frequencies (f1 and f2) is 2f,
then the required BW B will be:
B = (1+d) x S + 2f
The minimum value of 2f should be at least S
We have an available bandwidth of 100 kHz which spans from
200 to 300 kHz. What should be the carrier frequency and the
bit rate if we modulated our data by using FSK with d = 1?
Solution
The midpoint of the band is at 250 kHz. We choose 2Δf to be 50 kHz;
this means
Phase Shift Keying
• The phase shift of the carrier signal is varied to
represent digital data.
• The bandwidth requirement, B is:
B = (1+d)xS
• PSK is much more robust than ASK as it is not that
vulnerable to noise, which changes amplitude of the
signal.
• BW = same as of ASK
• Avoids problems of noise and bandwidth
• Can be represented in a constellation diagram or
phase-state diagram
• More variations in phase may be added to represent
more than one bit
BPSK
i. To increase the bit rate we can code 2 or more bits onto a one signal
element
ii. The bit rate increases as compared to baud rate
iii. But needs sophisticated devices to distinguish small difference in
phase
• It uses two BPSK
• In QPSK, the bit stream is parallelized(serial to parallel
conversion) so that every two incoming bits are split up and
sends one bit to one modulator and the next bit to other
modulator.
• One carrier frequency is phase shifted 90o from the other - in
quadrature.
• Two composite signals created by the multiplier with same
frequency with different phases
• The two PSKed signals are then added to produce one of 4
signal elements. L = 4 here.
• There are 4 possible phases 450 , -450 , 1350 , -1350
Find the bandwidth for a signal transmitting at 12
Mbps for QPSK. The value of d = 0.
Solution:
For QPSK, 2 bits is carried by one signal element. This means that r
= 2.
So the signal rate (baud rate) is S = N × (1/r) = 6 Mbaud. With a
value of d = 0, we have B = S = 6 MHz.
Three constellation diagrams
Quadrature Amplitude Modulation
Note:
Methods:
Amplitude Modulation (AM)
Frequency Modulation (FM)
Phase Modulation (PM)
Amplitude modulation
• The carrier signal is modulated so that
its amplitude varies with the changing
amplitude of modulating signal
•Phase and frequency of the carrier
signal remains the same
•The modulating signal becomes an
envelope of the carrier
•The bandwidth of an AM signal is twice
the bandwidth of the modulating signal
• BWt = 2 BWm
• BWt is total bandwidth
• BWm is bandwidth of modulating signal
AM band allocation
Frequency modulation
• The frequency of the carrier signal
is modulated so that its frequency
varies with the changing amplitude
of modulating signal
•Phase and peak amplitude remains
the same
•The bandwidth of an FM signal is
ten times the bandwidth of the
modulating signal
• BWt = 10 BWm (approximately)
• BWt is total bandwidth
•BWm is bandwidth of modulating
signal
Frequency modulation
The total bandwidth required for FM can be determined from the bandwidth
of the audio signal: BFM = 2(1 + β)B. Where is usually 4.
Phase Modulation (PM)
• The phase of the carrier signal is modulated to
follow the changing voltage level of the
modulating signal.
Phase modulation
Note
The total bandwidth required for PM can be determined from the
bandwidth
and maximum amplitude of the modulating signal:
BPM = 2(1 + β)B.
Where = 2 most often.
5.231
The Physical Layer contd.
• Multiplexing
• Transmission Media
• Switching
MULTIPLEXING
• Bandwidth is limited
• Bandwidth utilization is the wise use of available bandwidth
to achieve specific goals.
• Efficiency can be achieved by multiplexing; i.e., sharing of the
bandwidth between multiple users.
• Whenever the bandwidth of a medium linking two devices is
greater than the bandwidth needs of the devices, the link can
be shared.
• Multiplexing is the set of techniques that allows the
(simultaneous) transmission of multiple signals across a single
data link.
Categories of multiplexing
Multiplexing
◼ Combine several channels into one
◼ It is not practical to have a separate line for each other device we want to
communicate
◼ Therefore, it is better to share communication medium
◼ The technique used to share a link by more than one device is called multiplexing
◼ Multiplexing needs that the BW of the link should be greater than the total
individual BW of the devices connected.
◼ In a multiplexed system one link may contain more than one channel
signal travel
•Channels must be separated by strips of unused BWs
(called Guard Bands) to prevent signals from overlapping
•Carrier frequencies must not interfere with the original
signals
Example 1
Assume that a voice channel occupies a bandwidth of 4 KHz. We need to
combine three voice channels into a link with a bandwidth of 12 KHz,
from 20 to 32 KHz. Show the configuration using the frequency domain
without the use of guard bands.
Solution
Shift (modulate)
each of the three
voice channels to
a different
bandwidth, as
shown in Figure
Example
Solution
For five channels, we need at least four guard bands. This means that the
required bandwidth is at least
5 x 100 + 4 x 10
= 540 KHz
as shown in Figure
Wave Division Multiplexing
◼ Very narrow bands of light
from different sources are
combined to make a wider
band of light
t
Synchronous Time division
Multiplexing
❑ The data flow of each connection is divided into units, where each
unit occupies one input time slot
❑ A unit can be 1 bit, one character or one block of data
❑ Each i/p unit becomes one o/p unit and occupies 1 timeslot
❑ Duration of an o/p time slot is n times shorter than duration of an
i/p time slot (Toutput = Tinput / n) where n is the no of connections or
channels
❑ For n input connections, a frame is organized into n time slots
❑ Each slot carrying one unit from each section
❑ The data rate of link is n time faster, and unit duration is n times
shorter
Synchronous time-division multiplexing
Time division Multiplexing contd.
◼ If the data rate of a link is 3 times the data rate of a
connection
◼ then the duration of a unit on a connection will be 3
times that of a time slot
Example
Four 1-Kbps connections are multiplexed together. A unit is 1 bit. Find
(1) the duration of 1 bit before multiplexing, (2) the transmission rate of
the link, (3) the duration of a time slot, and (4) the duration of a frame?
Solution
1. The duration of 1 bit is 1/1 Kbps, or 0.001 s (1 ms).
2. The rate of the link is 4 times the rate of connection, i.e. 4
Kbps.
3. The duration of each time slot is 1/4 th of the bit duration
before multiplexing i.e. 1/4 ms or 250 s.
or inverse of data rate i.e. 1/4 Kbps = 250 s.
4. The duration of a frame is same as duration of each unit,
i.e. 1 ms.
or 4 times the bit duration i.e. 4 * 250 ms = 1ms
Example 6.5
the data rate for each one of the 3 input connection is 1 kbps. If 1
bit at a time is multiplexed (a unit is 1 bit), what is the duration of (a)
each input slot, (b) each output slot, and (c) each frame?
Solution
We can answer the questions as follows:
a. The data rate of each input connection is 1 kbps. This means that
the bit duration is 1/1000 s or 1 ms. The duration of the input
time slot is 1 ms (same as bit duration).
b. The duration of each output time slot is one-third of the input
time slot. This means that the duration of the output time slot is
1/3 ms.
c. Each frame carries three output time slots. So the duration of a
frame is 3 × 1/3 ms, or 1 ms.
Note: The duration of a frame is the same as the duration of an
input unit.
Example 6.6
The Figure given below shows synchronous TDM with 4 1Mbps data
stream inputs and one data stream for the output. The unit of data
is 1 bit. Find (a) the input bit duration, (b) the output bit duration, (c)
the output bit rate, and (d) the output frame rate.
Solution
a. The input bit duration is the inverse of the bit rate:
1/1 Mbps = 1 μs.
b. The output bit duration is one-fourth of the input bit duration, or
¼ μs.
c. The output bit rate is the inverse of the output bit duration or
1/(4μs) or 4 Mbps. so the output rate = 4 × 1 Mbps = 4 Mbps.
d. the frame rate is always the same as input rate. So the frame
rate is 1,000,000 frames per second. Because we are sending 4
bits in each frame, verify the result by multiplying frame rate
with number of bits per frame.
Interleaving
Solution
Each frame carries 1 byte from each channel;
the size of each frame, therefore, is 4 bytes, or 32 bits.
Because each channel is sending 100 bytes/s and a frame carries 1
byte from each channel, the frame rate must be 100 frames per
second(frame rate is same as input rate). The bit rate is 100 × 32, or
3200 bps.
Example
Solution
Data rate matching
• Used to handle disparity in the input rates
• Multilevel Multiplexing: used when the data rate of the input
links are multiples of each other.
• Multiple slot Allocation: The higher bit rate channels are
allocated more slots per frame, and the output frame rate is a
multiple of each input link.
• Pulse Stuffing: used when there is used when bit rate of the
sources are not multiple of each other. The slowest speed link will
be brought up to the speed of the other links by dummy bit
insertion, this is called pulse stuffing.
Multilevel multiplexing
Multiple-slot multiplexing
Pulse stuffing
Synchronization