PDC Combined
PDC Combined
Objectives:
• To understand basics of data communication
• To understand error detection and correction techniques
• To understand data link layer protocols
• To understand the performance of media access protocols
Abstract:
Syllabus:
Data Communication fundamentals: Introduction to Data Communication, Signals, Digital
representation of information, Basic properties of data communication system, Time and
frequency domain characterization of communication channels, Nyquist signaling rate,
Shannon Channel capacity, Line coding-NRZ, bipolar, Manchester, Differential Manchester
encoding, Modems and digital modulation- ASK, FSK, PSK,
QAM. [14 hours]
Properties of Media and Digital Transmission Systems: Twisted pair, Coaxial cable, Optical
fiber, Wireless transmission. [04 hours]
Peer to Peer Protocols: Peer to peer protocols and service models, ARQ protocols- Stop and
wait, Go back N, selective repeat, Transmission efficiency of ARQ protocols, Other adaptation
functions- Sliding window flow control, Timing recovery for synchronous services, Reliable
stream service, Data link control- HDLC datalink control, point to point control. Multiplexing-
FDM, TDM, STDM. [14 hours]
Media Access sublayer and LAN: Introduction to layered architecture, Protocols, Approaches
to sharing transmission Medium, Random Access Protocols, Token Passing protocols, IEEE
LAN standards, Bridges, MAN[IEEE802.6], FDDI. [08 hours]
Course Outcome
The students will be able to
• Apply the concepts of data communication system to calculate channel capacity.
• Analyse different encoding and modultaion schemes.
• Compute frame check sequence and error correction codes.
• Analyse flow and error control protocols
• Compute the performance of media access protocols
References:
1. Stallings W., Data & Computer Communications (9e), Pearson Education Inc., Noida,
2017.
2. Frozen B., Introduction to data communication & networking (4e), Tata McGraw Hill,
New Delhi-2014.
3. Garcia A. L., Widjaja I., Communication Networks (2e), Tata McGraw Hill, 2011.
Principles of Data
Communication
[L T P C] is [3 1 0 4]
ICT 2156
Course Outcomes
• Apply the concepts of data communication systems to calculate
channel capacity.
• Analyse different encoding and modulation schemes
• Compute frame check sequence and error correction codes.
• Analyse flow and error control protocols
• Compute the performance of media access protocols
ICT 2156: PRINCIPLES OF DATA COMMUNICATION [3 1 0 4]
Objectives:
• To understand basics of data communication
• To understand error detection and correction techniques
• To understand data link layer protocols
• To understand the performance of media access protocols
Abstract:
Introduction to Data Communication, Signals, Basic properties of data communication
system, Nyquist rate, Shannon Capacity, Signal encoding and Tx and Rx models,
Modulation schemes. Properties of Media and digital transmission systems, wired and
wireless medium, Error detection and correction, Block codes, CRC, Hamming code, Stop
and wait flow control, Sliding window flow control, ARQs, HDLC, Multiplexing, Media
Access Sublayer and LAN, Approaches to sharing transmission medium, Random access
protocols, Token passing protocols, IEEE LAN standards, Bridges, MAN, FDDI.
Syllabus:
Data Communication fundamentals: Introduction to Data Communication, Signals, Digital representation of
information, Basic properties of data communication system, Time and frequency domain characterization
of communication channels, Nyquist signaling rate, Shannon Channel capacity, Line coding-NRZ, bipolar,
Manchester, Differential Manchester encoding, Modems and digital modulation- ASK, FSK, PSK, QAM.
[14 hours]
Properties of Media and Digital Transmission Systems: Twisted pair, Coaxial cable, Optical fiber, Wireless
transmission. [04 hours]
Error detection and correction: Asynchronous and synchronous transmission, Error detection and correction
basics, Parity check, Internet checksum, Polynomial codes, Block codes, Hamming code.
[08 hours]
Peer to Peer Protocols: Peer to peer protocols and service models, ARQ protocols- Stop and wait, Go back N,
selective repeat, Transmission efficiency of ARQ protocols, Other adaptation functions- Sliding window flow
control, Timing recovery for synchronous services, Reliable stream service, Data link control- HDLC datalink
control, point to point control. Multiplexing-FDM, TDM, STDM. [14 hours]
Media Access sublayer and LAN: Introduction to layered architecture, Protocols,
Approaches to sharing transmission Medium, Random Access Protocols, Token Passing
protocols, IEEE LAN standards, Bridges, MAN[IEEE802.6], FDDI. [08 hours]
Course Outcome
The students will be able to
• Apply the concepts of data communication system to calculate channel capacity.
• Analyse different encoding and modultaion schemes.
• Compute frame check sequence and error correction codes.
• Analyse flow and error control protocols
• Compute the performance of media access protocols
References:
1. Stallings W., Data & Computer Communications (9e), Pearson Education Inc., Noida,
2017.
2. Frozen B., Introduction to data communication & networking (4e), Tata McGraw Hill,
New Delhi-2014.
3. Garcia A. L., Widjaja I., Communication Networks (2e), Tata McGraw Hill, 2011.
What is Data communication?
➢ It is the physical transfer of data over a point to point or point to
multipoint communication channel.
➢ Data communications deals with the transmission of signals in a reliable
and efficient manner
➢ Networking deals with the technology and architecture of the
communications networks used to interconnect communicating devices.
1.1 Trends
• Effective and efficient data communication and networking facilities
are vital to any enterprise
• Transmitter:
▪the data generated not transmitted directly
▪a transmitter transforms and encodes the information in such a
way as to produce electromagnetic signals that can be
transmitted
• Transmission system: This can be a single transmission line or a
complex network connecting source and destination.
• Receiver: The receiver accepts the signal from the transmission
system and converts it into a form that can be handled by the
destination device.
3.4
Figure 3.1 Comparison of analog and digital signals
3.5
Analog Signaling of Analog and Digital Data
3.6
Digital Signaling of Analog and Digital Data
Spectrum refers to the invisible radio frequencies that wireless signals travel over.
➢ Analog transmission: analog signal is propagated
through amplifiers
➢ Digital transmission: analog or digital signals are
propagated through repeaters
➢ Digital transmission is preferred technology today:
digital equipment, efficiently combine signals from
different sources; security; repeaters can give more
accurate data transmission
Any signal is either periodic (the following two) or aperiodic
Any signal is either periodic (the following two) or aperiodic
3-2 PERIODIC ANALOG SIGNALS
3.12
Figure 3.2 A sine wave
3.13
Figure 3.3 Two signals with the same phase and frequency,
but different amplitudes
3.14
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.15
Note
3.16
Figure 3.4 Two signals with the same amplitude and phase,
but different frequencies
3.17
Table 3.1 Units of period and frequency
3.18
Example 3.1
3.19
Example 3.2
Solution
First we change 100 ms to seconds, and then we
calculate the frequency from the period (1 Hz = 10−3
kHz).
3.20
Figure 3.5 Three sine waves with the same amplitude and frequency,
but different phases
Solution
We know that 1 complete cycle is 360°. Therefore, 1/6
cycle is
3.22
Figure 3.6 Wavelength and period
➢ The wavelength is the distance a simple signal can travel in one period.
(usually, unit of measurement is meters)
3.23
Figure 3.7 The time-domain and frequency-domain plots of a sine wave
A complete sine wave in the time domain can be represented by one single spike in the
frequency domain
Figure 3.8 The time domain and frequency domain of three sine waves
frequency domain is more compact and useful when we are dealing with more than one
sine wave
3.25
Signals and Communication
◼ A single-frequency sine wave is not useful in
data communications
◼ We need to send a composite signal, a signal
made of many simple sine waves.
◼ According to Fourier analysis, any composite
signal is a combination of simple sine waves
with different frequencies, amplitudes, and
phases.
3.26
Composite Signals and
Periodicity
◼ If the composite signal is periodic, the
decomposition gives a series of signals with
discrete frequencies.
◼ If the composite signal is nonperiodic, the
decomposition gives a combination of sine
waves with continuous frequencies.
3.27
Figure 3.10 Decomposition of a composite periodic signal in the time and
frequency domains
3.28
Figure 3.11 The time and frequency domains of a nonperiodic signal
3.29
Spectrum and Bandwidth
◼ The spectrum of a signal is the range of
frequencies contained in the signal.
◼ The bandwidth is the difference between the
lowest and highest frequency in the spectrum.
◼ Bandwidth is subset of Spectrum
3.30
Figure 3.12 The bandwidth of periodic and nonperiodic composite signals
3.31
Example 3.6
The spectrum has only five spikes, at 100, 300, 500, 700,
and 900 Hz (see Figure 3.13).
3.32
Figure 3.13 The bandwidth for Example 3.6
3.33
Example 3.7
Book Referred:
Title: Data Communications And Networking
Author: Behrouz A. Forouzan
Chapter: Chapter 3, Data and Signals
L3 Data Transmission
Chapter 3
Data Transmission : Stallings W., Data & Computer Communications (9e), Pearson
Education Inc., Noida, 2017.
Periodic Signal
• The simplest sort of signal is a periodic signal, in which the same signal
pattern repeats over time.
• Mathematically, a signal s(t) is defined to be periodic if and only if
.
the frequency components of the square wave with amplitudes A and –A
can be expressed as follows: [using Fourier Series]
.
UNITS of Parameter
.
.
Frequency Domain Concepts
➢The spectrum of a signal is the range of frequencies that it contains. For the
signal of Figure 3.4c, the spectrum extends from f to 3f.
.
Frequency Domain Concepts
➢The absolute bandwidth of a signal is the width of the spectrum. In the case
of Figure 3.4c, the bandwidth is 2f.
.
Relationship between Data Rate and Bandwidth
• What happens if we limit the bandwidth to just the first three frequency
components?
.
What data rate can be achieved? We look at three cases.
Case 1:
• Let f be 1MHz
• Bandwidth = (5x10^6)-(1x10^6) = 4MHz
• T=1/f=1/(10^6)=1x(10^-6)s=1μsecs
• Bit interval = 0.5T=0.5 μ secs
• data rate=1/(Bit interval)=1/0.5μ secs = 2Mbps
What data rate can be achieved? We look at three cases.
Case 2:
• Let f be 2MHz
• Bandwidth = (5x2x10^6)-(2x10^6) = 8MHz
• T=1/f=1/(2x10^6)=1x(2x10^-6)s=0.5μsecs
• Bit interval = 0.5T=0.5*(0.5 μ secs)=0.25 μsecs
• data rate=1/(Bit interval)=1/0.25μ secs = 4Mbps
What data rate can be achieved? We look at three cases.
Case 3:
Solution
.
wavelength
.
Transmission Impairment
Transmission Impairment
• The signal that is received may differ from the signal that is
transmitted due to various transmission impairment.
• Consequences
• For analog signals, these impairments can degrade the signal quality.
• For digital signals, bit errors may be introduced, such that a binary 1 is
transformed into a binary 0 or vice versa.
Impairment Causes
Transmission
Impairments
The imperfections of the medium causes impairments in the signal. What are
the possible impairments? First is the attenuation, then distortion and noise.
Transmission Impairment considerations
• Attenuation introduces three considerations for the transmission
engineer.
• First, a received signal must have sufficient strength so that the electronic
circuitry in the receiver can detect the signal.
• Second, the signal must maintain a level sufficiently higher than noise to be
received without error.
dB = 10log10 P2/P1
Where,
P2 is the power at the destination or point 2
P1 is the power at the transmitting end or point P1.
P1 P2
P2 = 0.5 P1
dB = 10 log 10(P2/P1)
= 10 log 10(0.5 P1/P1)
= 10 log 10(0.5)
= 10 *(-0.3010)
= -3dB (Approx)
A signal travels through a amplifier and its power
increased 20 times. Calculate the power gain
P1 P2
P2 = 20 P1
dB = 10 log 10(P2/P1)
= 10 log 10(20 P1/P1)
= 10 log 10(20)
= 10 *(1.301)
= 13dB (Approx)
Delay distortion
• Delay distortion arises particularly in a guided media but not in air.
• Delay distortion arises because velocity of propagation varies with
frequency.
• That means this signal components that we are sending will have
different velocities for different frequency components as it passes
through a guided media and this leads to delay distortion.
Delay distortion (contd…)
• Because of delay distortion, some of the signal components of one bit
position will spill over into other bit positions, causing intersymbol
interference
• 10001010➔10001001
Original Signal
Noise Signal
Noise
➢ The effect of intermodulation noise is to produce signals at a frequency that is the sum or
difference of the two original frequencies or multiples of those frequencies.
➢ For instance, consider two signals S1 and S2 generate signals of frequencies (S1 + S2) and (S1
- S2) that may interfere with the signals of the same frequencies sent by the sender. In any part
of the communication system, intermodulation noise is introduced because of this situation.
• There are four concepts here that we are trying to relate to one another.
• Data rate : The rate, in bits per second (bps), at which data can be communicated
• Bandwidth: The bandwidth of the transmitted signal as constrained by the transmitter and the
nature of the transmission medium, expressed in cycles per second, or Hertz
• Noise : The average level of noise over the communications path
• Error rate : The rate at which errors occur, where an error is the reception of a 1 when a 0 was
transmitted or the reception of a 0 when a 1 was transmitted
• There are four concepts here that we are trying to relate to one another.
• Data rate : The rate, in bits per second (bps), at which data can be communicated
• Bandwidth: The bandwidth of the transmitted signal as constrained by the
transmitter and the nature of the transmission medium, expressed in cycles per
second, or Hertz
• Noise : The average level of noise over the communications path
• Error rate : The rate at which errors occur, where an error is the reception of a1
when a 0 was transmitted or the reception of a 0 when a 1 was transmitted
• Tradeoffs:
• Increase the bandwidth, increases the data rate.
• Increase the signal levels, increases the data rate.
• Increase the signal levels, harder for receiver to interpret the bits (practical limit to
M)
A noiseless channel has a bandwidth of 4000 Hz and is transmitting a signal with two
signal levels. Calculate the maximum bit rate
B=4000Hz
M=2
C = 2B log2M
Bit Rate = 2 * 4000 * log22
= 2 * 4000 * 1
=8000 bps
A noiseless channel has a bandwidth of 4000 Hz and is transmitting a signal with two
signal with four signal levels. Calculate the maximum bit rate
B=4000Hz
M=4
C = 2B log2M
Bit Rate = 2 * 4000 * log24
= 2 * 4000 * 2
=16000 bps
Consider a noiseless channel with a bandwidth of 20 KHz. We need to send 280 Kbps
over a channel. How many signal levels are required?
C =280 Kbps
B = 20 KHz
C = 2B log2M Log a x = y
280 = 2 * 20 * log2 M x = ay
280/40 = log2 M
7 = log2 M
M = 27
M = 128
Shannon Capacity
➢ With noise, some bits may be corrupted;
➢ higher data rate, more bits corrupted
➢ Increasing signal strength overcomes noise
› Signal-to-noise ratio:
signalpower
SNR =
noisepower
High SNR➔ high-quality signal ➔ less intermediate repeaters
𝑺𝒊𝒈𝒏𝒂𝒍 𝒑𝒐𝒘𝒆𝒓
SNR=
𝑵𝒐𝒊𝒔𝒆 𝑷𝒐𝒘𝒆𝒓
𝑺𝒊𝒈𝒏𝒂𝒍 𝒑𝒐𝒘𝒆𝒓
SNRdB=10 log 10 (SNR or )
𝑵𝒐𝒊𝒔𝒆 𝑷𝒐𝒘𝒆𝒓
Example of Shannon and Nyquist Capacity
A channel uses spectrum of between 3MHz and 4MHz, with SNRdB = 24dB.
How many signal levels are required to achieve Shannon capacity?
OR
Let us consider an example that relates the Nyquist and Shannon formulations.
Suppose that the spectrum of a channel is between 3 MHz and 4 MHz and SNRdB =
24 dB. Then
Solution
B = 4 MHz - 3 MHz = 1 MHz Nyquist formula,
SNRdB = 24 dB = 10 log 10(SNR) B= 106 Hz
SNR = 251 C = 8 Mbps
Using Shannon’s formula, C = 2B log2M Log a x = y
C = 106 * log 2 (1+251) 8 * 106 = 2 * 106 * log2 M x = ay
= 106 * 8 4 = log2 M
= 8 Mbps M = 16
Consider a extremely noisy channel in which signal to noise ratio is almost zero.
Calculate the capacity of the channel
C = B * log2(1+SNR)
= B * log2(1+0)
= B * log2(1)
=B*0
=0
Calculate the highest bit rate(capacity of the channel) if the bandwidth is 3000 Hz and
signal to noise ration(SNR) is 3162
B = 3000 Hz
SNR = 3162
C = B * log2(1+SNR)
= 3000 * log2(1+3162)
= 3000 * log2(3163)
= 3000 * 11.627
= 34881 bps
Tutorial-1 Questions
Nyquist capacity=56kbps
Shannon capacity=39.8kbps
Smallest of two values decide channel capacity.
Tutorial 1 Question-2 Solution
Chapter 5
Signal Encoding Techniques:Part1
References:
Book Chapter 5
Data and Computer Communications, 8th
edition, by William Stallings
1
Outline
• Overview
—Encoding and Modulation
• Digital data, digital signal
• Digital data, analog signal
• Analog data, digital signal
• Analog data, analog signal
2
Analog Signaling of Analog and
Digital Data
3
Digital Signaling of Analog and
Digital Data
4
5
6
7
Encoding and Modulation
8
Modulation
• Modulation is the process of encoding source data onto
a carrier signal with frequency fc.
— The frequency of the carrier signal is chosen to be compatible
with the transmission medium being used.
— Modulation techniques involve operation on one or more of the
three parameters: amplitude, frequency, and phase
• According to the input source signal m(t) (either analog
or digital), which is called baseband signal (or
modulating signal) , the carrier signal fc(t) will be
modulated into modulated signal s(t).
9
Encoding/modulation Techniques
• Digital data, digital signal
— The equipment for encoding digital data into a digital signal is
less complex and less expensive than digital-to-analog
modulation equipment.
• Analog data, digital signal
— Conversion of analog data (e.g., voice, video) to digital form
permits the use of modern digital transmission & switching.
• Digital data, analog signal
— Optical system and unguided media (wireless system) only
propagate analog signals.
• Analog data, analog signal
— Baseband: easy and cheap, e.g., in voice-grade telephone lines,
voice signals are transmitted over telephone lines at their
original spectrum
— Modulation permits frequency division multiplexing, e.g., AM/FM
radios
10
(I) Digital Data, Digital Signal
• Digital signal is a sequence of discrete,
discontinuous voltage pulses.
• Each pulse is a signal element.
• Binary data are transmitted by encoding the bit
stream into signal elements.
• In the simplest case, one bit is represented by
one signal element.
—E.g., 1 is represented by a lower voltage level, and 0
is represented by a higher voltage level
11
Terminologies
• Unipolar
— If all signal elements have the same algebraic sign (all positive or all
negative), then the signal is unipolar.
• Polar
— One logic state represented by positive voltage, the other by negative
voltage
• Data rate
— Rate of data transmission measured in bps: bits per second
• Duration or length of a bit
— Time taken for transmitter to emit the bit
• Modulation rate/Signalling rate How are they
— Rate at which the signal level changes related?
— Measured in baud: signal elements per second
12
Interpreting Signals at the Receiver
• The receiver needs to know
— The timing of each signal element, i.e., when a signal element begins
and ends
— signal levels
— These tasks are performed by sampling each element position in the
middle of the interval and comparing the value to a threshold.
• Factors affecting successful interpreting of signals
— Signal-to-noise ratio (SNR)
— Data rate
— Bandwidth
• Some principles:
— An increase in data rate increases bit error rate (BER)
— An increase in SNR decreases BER
— An increase in bandwidth allows an increase in data rate
• Another factor that can improve performance:
— Encoding scheme: the mapping from data bits to signal elements
13
Evaluation of Encoding
Schemes (1)
• Signal Spectrum
— Lack of high frequencies reduces required bandwidth
— Lack of dc component allows ac coupling via transformer,
providing electrical isolation and reducing interference
— Concentrate power in the middle of the bandwidth
• Clocking
— Need to determine the beginning and end of each bit
— Synchronizing transmitter and receiver
1. Use external clock, which is expensive; or
2. Synchronization mechanism based on the transmitted signal
14
Comparison of Encoding
Schemes (2)
• Error detection
— Various error-detection techniques will be covered in Chapter 9
— Some error detection capability can be built into signal encoding
scheme
• Signal interference and noise immunity
— Some codes are better than others in the presence of noise
— Performance is usually expressed in terms of BER
• Cost and complexity
— Higher signal rate (thus data rate) leads to higher cost
— Some codes require a signal rate greater than the actual data
rate
15
Basic categories
16
Encoding Schemes
• Nonreturn to Zero (NRZ)
— Nonreturn to Zero-Level (NRZ-L)
— Nonreturn to Zero Inverted (NRZI)
• Multilevel Binary
— Bipolar-AMI
— Pseudoternary
• Biphase
— Manchester
— Differential Manchester
• Scrambling techniques
— B8ZS
— HDB3
17
NRZ
18
Nonreturn to Zero-Level (NRZ-L)
• Two different voltages for 0 and 1 bits
• Voltage is constant during a bit interval
—no transition, i.e. no return to zero voltage
• E.g. absence of voltage for zero, constant
positive voltage for one
• More often, negative voltage for one value and
positive for the other
• This is known as NRZ-L
19
Nonreturn to Zero Inverted
• NRZI: Nonreturn to zero, invert on ones
• Constant voltage pulse for duration of bit
• Data are encoded as presence or absence of
signal transition at the beginning of the bit time
• A transition (low to high or high to low) denotes
a binary 1
• No transition denotes binary 0
• NRZI is an example of differential encoding
technique
20
Differential Encoding
• Data are represented in terms of the changes
between successive signal elements, rather than
the signal elements themselves.
• It is more reliable to detect a transition in the
presence of noise than to compare a value to a
threshold.
• With a complex transmission layouts, it is easy
to lose the sense of the polarity of the signal.
21
NRZ pros and cons
• Pros
—Easy to engineer
—Make efficient use of bandwidth
• Cons
—The presence of dc component
—The lack of synchronization capability
• NRZ codes are commonly used for digital
magnetic recording, but not often used for
signal transmission.
22
Multilevel Binary
• Use more than two levels
• Bipolar-AMI: alternate mark inversion
—zero represented by no line signal
—one represented by a positive or negative pulse
—one pulses must alternate in polarity
—Advantages:
• No loss of synchronization if a long string of 1s occurs (0s
still be a problem)
• No net dc component
• Provides a simple means of error detection
23
Pseudoternary
• 1 represented by the absence of line signal
• 0 represented by alternating positive and
negative pulses
• No advantage or disadvantage over bipolar-AMI
24
Bipolar-AMI and Pseudoternary
0 1 0 0 1 1 0 0 0 1 1
25
Trade-off for Multilevel Binary
• Not as efficient as NRZ
—However, in bipolar-AMI & pseudoternary, each signal
element only represents one bit
—Receiver must distinguish between three levels
(+A, -A, 0)
—Requires approx. 3dB more signal power for same
probability of bit error, or
—The BER for NRZ codes, at a given SNR, is
significantly less than for mulitlevel binary.
26
Biphase
• Manchester
— There is a transition at the middle of each bit period.
— The midbit transition serves as a clock mechanism and also as
data: low to high represents 1, high to low represents 0
— Used by IEEE 802.3 Ethernet LAN
• Differential Manchester
— The midbit transition is used only to provide clocking.
— 0 is represented by the presence of a transition at the beginning
of a bit period.
— 1 is represented by the absence of a transition at the beginning
of a bit period.
— Note: this is a differential encoding scheme
— Used by IEEE 802.5 token ring LAN
27
Manchester Encoding
28
Differential Manchester
Encoding
29
Biphase Pros and Cons
• Pros
—Self-clocking: Because there is a predictable
transition during each bit time, the receiver can
synchronize on that transition.
—No dc component
—Error detection: the absence of an expected
transition can be used to detect errors
• Con
—Requires at least one transition per bit time and may
have as many as two transitions, thus,
—The maximum modulation rate is twice that for NRZ
—Requires more bandwidth
30
Scrambling
• Use scrambling to replace sequences that would
produce constant voltage
• Main idea:
— Sequences that would result in a constant voltage are replaced
by filling sequences that will provide sufficient transitions for the
receiver’s clock to maintain synchronization.
— Filling sequences must be recognized by receiver and replaced
with original data sequence.
— Filling sequence is the same length as original sequence.
• Design goals:
— No dc component
— No long sequences of zero-level line signals
— No reduction in data rate
— Error detection capability
31
B8ZS
• Bipolar With 8-Zeros Substitution
• Based on bipolar-AMI, whose drawback is a long string
of zeros may result in loss of synchronization.
• If octet of all zeros occurs and the last voltage pulse
preceding this octet was positive, encode as 000+-0-+
• If octet of all zeros occurs and the last voltage pulse
preceding this octet was negative, encode as 000-+0+-
32
HDB3
• High-Density Bipolar-3 Zeros
• Based on bipolar-AMI
• String of four zeros is replaced with sequences
containing one or two pulses.
+ 000+ -00-
33
B8ZS and HDB3
34
Modulation Rate
35
Tutorial Question
• For the bit stream 01001110, sketch the
waveforms for each of the line coding
technique: NRZL,NRZI,Manchester,Differential
Manchester.
• Assume that the signal level for the preceding
bit for NRZI was high;
• the most recent preceding 1 bit (AMI) has a
negative voltage;
• and the most recent preceding 0
bit(pseudoternary) has a negative voltage.
36
Digital data to digital signal
Line Coding
• Data as well as signals that represents data can either be digital or analog.
• Line coding is the process of converting digital data to digital signals. By below
mention techniques we converts 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.
0 1 0 0 1 1 0
+ve
Axis
-ve
Nonreturn to Zero level (NRZ-L)
0 1 0 0 1 1 0
+ve
Axis
-ve
Nonreturn to Zero Inverted (NRZI)
0 1 0 0 1 1 0
+ve
Axis
-ve
Bipolar(Alternate mark inversion (AMI))
0 1 0 0 1 1 0
+ve
Axis
-ve
0 1 0 0 1 1 0
+ve
Axis
-ve
0 1 0 0 1 1 0
+ve
Axis
-ve
0 1 0 0 1 1 0
+ve
Axis
-ve
si (t ) = A cos(2f i t ), 1 i M
where
f i = f c + (2i − 1 − M ) f d
f c = the carrier frequency
f d = the difference frequency
M = number of different signal elements = 2 L
L = number of bits per signal element
❑MFSK signal:
si (t ) = A cos( 2f i t ), 1 i M
where
f i = f c + ( 2i − 1 − M ) f d
M = number of different signal elements = 2 L
L = number of bits per signal element
f i = f c + (2i − 1 − M ) f d
000 → f1 = 75KHz
001 → f 2 = 125KHz
010 → f 3 = 175KHz
011 → f 4 = 225KHz
bandwidth = Ws = 2Mf d = 400 KHz
100 → f 5 = 275KHz
101 → f 6 = 325KHz
110 → f 7 = 375KHz
111 → f 8 = 425KHz
• Bandwidth=8MHz
f i = f c + (2i − 1 − M ) f d
Phase Shift Keying
• Phase of the carrier is varied to represent
digital data (binary 0 or 1)
• Amplitude and frequency remains constant.
• If phase 0 deg to represent 0, 180 deg to
represent 1. (2-PSK)
• PSK is not susceptible to noise degradation
that affects ASK or bandwidth limitations of
FSK
Differential PSK (DPSK)
❑ In DPSK, the phase shift is with reference to the previous bit
transmitted rather than to some constant reference signal
❑ Binary 0:signal burst with the same phase as the previous one
❑ Binary 1:signal burst of opposite phase to the preceding one
4-PSK (Quadrature PSK) method
Quadrature PSK
• To increase the bit rate, we can code 2 or
more bits onto one signal element.
• In QPSK, we parallelize the bit stream so that
every two incoming bits are split up and PSK a
carrier frequency. One carrier frequency is
phase shifted 90o from the other - in
quadrature.
• The two PSKed signals are then added to
produce one of 4 signal elements. L = 4
QPSK and Offset QPSK (OQPSK) Modulators
1 1
QPSK : s (t ) = I (t ) cos(2f c t ) − Q(t ) sin( 2f c t )
2 2
1 1
OQPSK : s (t ) = I (t ) cos(2f c t ) − Q(t − Tb ) sin( 2f c t )
2 2
for QPSK :
1 1→1 1→
4
3
0 1 → −1 1 →
4
− 3
0 0 → −1 − 1 →
4
−
1 0 → 1 −1 →
4
• Transmission bandwidth BT for ASK, PSK and
FSK is of the form
– BT =(1+r)R
– R- Bit rate
– r- Related to technique typically 0<r<1
❑Bandwidth Efficiency
data rate R 1
= =
➢ ASK/PSK: transmission bandwidth B 1 + r , 0 r 1
T
R log 2 M
➢ MPSK: = , M : number of different signal elements
BT 1+ r
➢ MFSK: R log 2 M
=
BT (1 + r ) M
Example
• Find the baud rate and bandwidth for a signal
transmitting at 12 Mbps, The value of r = 0.
• (for QPSK )
• The baud rate is D=R/L
• L=2, R=12Mbps, r=0
• D=6Mbps
• For QPSK, 2 bits is carried by one signal
element R=R/2=6Mbps
• BT=(1+r)R=6MHZ
Example
• 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 r = 1?
• The midpoint of the band is at 250 kHz.
B=100KHz, r=1
– BT=(1+r)R
– 100=2R
– R=100/2=50kbps
Example
• 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 r= 1?
– B =(1+r)R
T
Quadrature Amplitude Modulation (QAM)
0 1 0 0 1 1 0
+ve
Axis
-ve
0 1 0 0 1 1 0
+ve
Axis
-ve
0 1 0 0 1 1 0
+ve
Axis
-ve
0 1 0 0 1 1 0
+ve
Axis
-ve
➢ Twisted Pair
➢ Coaxial cable
➢ Optical Fiber
TWISTED PAIR
• A twisted pair consists
of two insulated copper
wires arranged in a
regular spiral pattern.
• Twisting tends to
decrease cross talk.
• Neighbouring pairs will
have different twist
length to reduce cross
talk.
TWISTED PAIR - TRANSMISSION
CHARACTERISTICS
➢ Analog
• Needs amplifiers every 5km to 6km
➢ Digital
• Needs a repeater every 2-3km
➢ Limited distance
➢ Limited bandwidth (1MHz)
➢ For long distance- limited data rate (100Mbps)
➢ For short distance(10Gbps)
➢ Less expensive
VARIETIES OF TWISTED PAIRS
➢ Unshielded Twisted Pair (UTP)
• Ordinary telephone wire
• Cheapest
• Easiest to install
• Suffers from external EM interference from
nearby twisted pair. (No electromagnetic shielding)
• Commonly used for local area networks.
🞤 Digital signals
• repeater every 1 to 9km
• closer for higher data rates
OPTICAL FIBER
• An optical fiber cable has a cylindrical shape and consists of three concentric
sections: the core, the cladding, and the jacket
• The core is the innermost section and consists of one or more very thin
strands, or fibers, made of glass or plastic.
• Each fiber is surrounded by its own cladding, a glass or plastic coating that
has optical properties different from those of the core .
• The interface between the core and cladding acts as a reflector to confine
light that would otherwise escape the core. The outermost layer, surrounding
one or a bundle of cladded fibers, is the jacket.
➢ Bandwidth of 370THz
➢ Greater capacity
• Data rates of hundreds of Gbps
➢ Smaller size & weight
➢ Lower attenuation
➢ Greater repeater spacing: 10s of km.
➢ Electromagnetic isolation: Not affected by
external electromagnetic interference
OPTICAL FIBER - TRANSMISSION
CHARACTERISTICS
• Rays at shallow angles are reflected and propagated along the fiber;
other rays are absorbed by the surrounding material
• Signals will spread out and limits the rate at which it is received.
• When the fiber core radius is reduced, fewer angles will reflect.
• The shortened path and higher speed allows light at the periphery to arrive at a
receiver at about the same time as the straight rays in the core axis.
Step Index VS Graded Index
Wired LAN Ethernet
Tutorials:
• Draw the table for the following and write its properties:
• Ethernet evolution through four generations.
• Categories of standard Ethernet w.r.t implementation.
• Categories of Fast Ethernet w.r.t implementation.
• Categories of Gigabit Ethernet w.r.t implementation.
• Draw the diagram of 802.3MAC frame and explain each fields in the frame.
Reference :
Chapter 13:
• Forouzan, Behrouz A. Data communications and networking I Behrouz A Forouzan. -
4th ed.
Wireless Transmission
Four Wireless Communication Techniques
(1) Broadcast Radio
(2) Terrestrial Microwave
(3) Satellite Microwave
(4) Infrared Communication
➢reception antenna
• electromagnetic energy contact on antenna converted to electrical energy
fed to receiver
• used in terrestrial
microwave and satellite
applications
Antenna Gain
➢Antenna gain is defined as the degree of directivity of the antenna’s radiation
pattern.
➢It is equal to the product of the antenna’s electrical efficiency and directivity
➢Antenna gain is defined as the power output, in a particular direction, compared to that
produced in any direction by a perfect omnidirectional antenna (isotropic antenna).
6 = 10 log(P2 /700)
P2/700 = 10^(0.6) = 3.98
P2 = 2786W
Antenna Gain and Effective Area Relationship
• A concept related to that of antenna gain is the effective area of an
antenna.
• The effective area of an antenna is related to the physical size of the
antenna and to its shape.
• The relationship between antenna gain and effective area is
λ = c/f
Effective Area (A) Calculation
Pt (4d ) (4fd )
2 2
= =
Pr 2
c 2
= carrier wavelength
Pt 4d
LdB = 10 log = 20 log
Pr
= −20 log ( ) + 20 log (d ) + 21 .98 dB
4fd
= 20 log = 20 log( f ) + 20 log(d ) − 147.56 dB
c
Free Space Loss
Free space loss accounting for gain of other antennas
• 4.2
• From Equation 4.2, the ratio of transmitted
power to received power is
• Pt/Pr1 = (4πd/λ)2 (1)
• Therefore:
(2)/(1)
• 10 log (Pr1/Pr2) = 10 log (22) = 6 dB
2 Example
The audio power of the human voice is concentrated at about 300 Hz.
Antennas of the appropriate size for this frequency are impracticably large.So
to send voice by radio the voice signal must be used to modulate a higher
(carrier) frequency for which the natural antenna size is smaller.
a. What is the length of an antenna half the wavelength long for
sending radio at 300 Hz?
b. An alternative is to use a modulation scheme, for transmitting the
voice signal by modulating a carrier frequency, so that the bandwidth of the
signal is a narrow band centered on the carrier frequency. Suppose we would
like a half-wave antenna to have a length of 1 meter. What carrier frequency
would we use?
• a. Using λf = c, we have λ = (3 × 108
m/sec)/(300 Hz) = 1,000 km, so that
λ/2 = 500 km.
• b. The carrier frequency corresponding to
λ/2 = 1 m is given by:
• f = c/λ = (3 × 108 m/sec)/(2 m) = 150 MHz.
3 Example
• You are communicating between two satellites. The
transmission obeys the free space law. The signal is too weak.
Your vendor offers you two options. The vendor can use a
higher frequency that is twice the current frequency or can
double the effective area of both of the antennas. Which will
offer you more received power or will both offer the same
improvement, all other factors remaining equal? How much
improvement in the received power do you obtain from the
best option?
• The received signal is, essentially, the same
• The received power will increase by a factor of
4
4 Example
Suppose a transmitter produces 50 W of power.
a. Express the transmit power in units of dBm and dBW.
b. If the transmitter’s power is applied to a unity gain antenna
with a 900-MHz carrier frequency, what is the received power
in dBm at a free space distance of 100 m?
c. Repeat (b) for a distance of 10 km.
d. Repeat (c) but assume a receiver antenna gain of 2.
• dBm and dBW - the basics
• A decibel is not an absolute level - it is a comparison between
two levels, and on its own it cannot be used to measure an
absolute level. As a result of this the quantities of dBm and
dBW are used:
• Better than Stop and wait because it keeps the sender busy
while waiting for acknowledgement
• Does not allow error free but out of order frames to be
accepted by the receiver
• This protocol can waste a lot of bandwidth if the error
rate is high because it requests the sender to retransmit the
frame in error and all the subsequently transmitted frames
Selective-Reject ARQ
• Also called selective retransmission or selective repeat
• Only frames that are rejected or timeout are retransmitted
• Subsequent frames are accepted by the destination and
buffered
• Maximum window size: 2k-1
• Minimizes retransmission (GOOD)
• Destination must maintain large enough buffer for frames
received out- of-order (BAD)
• More complex logic in transmitter (BAD)
• Not as widely used as Go-Back-N; useful for satellite links
with long propagation delays
Selective-Reject ARQ
• Setup-Window size (for both sender and receiver)
– For m bit sequence number the maximum window size 2m-1
• Operation
– Sender in case of damaged or lost frame retransmits
• Those which are negatively acknowledged
• Those for which timer expires
– Receiver can accept out of order frames and buffer (store) them until
the lost, damaged, or delayed frame arrives.
– Receiver does not acknowledge out of order frames but buffers
them only
– If the receiver receives an out-of-order, error free frame, it will send
a frame called Negative Acknowledge (NAK) with the number of the
frame to be retransmitted only.
– NAK improves the performance because it requests retransmission of
the lost frame before the corresponding sender timer expires
Selective Repeat ARQ, lost frame
Selective Repeat ARQ, window size
Performance
• More efficient than the other two protocols
because it reduces number of retransmissions
for noisy links
• The receiver and transmitter processing logic is
more complex
– Receiver must be able to reinsert the retransmitted
(lost, delayed, damaged) frame in the proper sequence
after it arrives
– The sender should be able to send out of order frame
when requested by the sender using NAK
– Needs more memory than Go-Back-N ARQ at the
receiver side. The receiver memory is large if the
window size is large
Error-Free Sliding-Window Flow
Control
For sliding-window flow control, the throughput
on the line depends on both the window size W
and the value of a. For convenience, let us again
normalize frame transmission time to a value of
1; thus, the propagation time is a.
• Case 1: The acknowledgment for frame 1 reaches
B before A has exhausted its window. Thus, A can
transmit continuously with no pause.
• Case 2: A exhausts its window at and cannot send
additional frames until Thus, normalized
throughput is W time units out of a period of
time units.
• Therefore, we can express the utilization as
– U=1 , W >= 2a + 1
– U= W/2a + 1 , W < 2a + 1
Example
• Consider the use of 1000-bit frames on a 1-
Mbps satellite channel with a 270-ms delay.
What is the maximum link utilization for
a) Stop-and-wait flow control?
b) Continuous flow control with a window size of
7?
c) Continuous flow control with a window size of
127?
d) Continuous flow control with a window size of
255?
L=103, R=106
• a= propagation Time/(L/R)
• a=270 ×10−3/(103/ 106) = 270
a) U = 1/(1 + 2a) = 1/541 = 0.002
b) U = W/(1 + 2a) = 7/541 = 0.013
c) U = 127/541 = 0.23
d) U = 255/541 = 0.47
Example
• A system uses the Stop-and-Wait ARQ
Protocol. If each frame carries 1000 bits of
data, how long does it take to send 1 million
bits of data if the distance between the sender
and receiver is 5000 Km and the propagation
speed is 2 x 108 m? Ignore transmission,
waiting, and processing delays. We assume no
data or control frame is lost or damaged.
• Propagation delay=d/V
• d=5000km=5 x 106 m, V= 2 x 108 m
• Propagation delay=5 x 106 / 2 x 108 =25ms
• Nr of frame=1000000/1000=1000
• Time delay for one successful frame delivery is
50ms(Ignore transmission, waiting, and processing
delays. We assume no data or control frame is lost or
damaged)
• For 1000 frame, time delay=1000x50ms=50s
Example
• Repeat using the Go-back-N ARQ Protocol
with a window size of 7.Ignore the overhead
due to the header and trailer. (Assume
transmission time of frame=1ms)
• We need to send w=7 frame
• 1000000/7000=143 windows
• Transmission time of window =7x1ms=7ms
• Delay for 1 window
• =twframe+2tprop =7+50=57ms
• Delay for 143 windows
• =143x57ms=8.151s
Example
• Using 5-bit sequence numbers, what is the
maximum size of the send and receive
windows for each of the following protocols?
a. Stop-and-Wait ARQ
b. Go-Back-NARQ
c. Selective-Repeat ARQ
a) Stop-and-Wait ARQ=20
b) Go-Back-NARQ=25 -1
c) Selective-Repeat ARQ=25-1
Example
• A sender sends a series of frame to the same
destination using 5-bit sequence numbers. If
the sequence number starts with 0, what is
the sequence number after sending 100
frame?
• A five-bit sequence number can create
sequence numbers from 0 to 31
• The sequence number in the Nth frame is (N
mod 32)
• 101th frame has the sequence number (101
mod 32) or 5.
HDLC Station Types
• Primary station
– Controls operation of link
– Frames issued are called commands
– Maintains separate logical link to each secondary
station
• Secondary station
– Under control of primary station
– Frames issued called responses
• Combined station
– May issue commands and responses
HDLC Link Configurations
• Unbalanced
– One primary and one or more secondary stations
– Supports full duplex and half duplex
• Balanced
– Two combined stations
– Supports full duplex and half duplex
HDLC Transfer Modes (1)
• Normal Response Mode (NRM)
– Unbalanced configuration
– Primary initiates transfer to secondary
– Secondary may only transmit data in response to
command from primary
HDLC Transfer Modes (2)
• Asynchronous Balanced Mode (ABM)
– Balanced configuration
– Either station may initiate transmission without
receiving permission
– Most widely used
HDLC Transfer Modes (3)
• Asynchronous Response Mode (ARM)
– Unbalanced configuration
– Secondary may initiate transmission without
permission form primary
– Primary responsible for line
Frame Structure
• Synchronous transmission
• All transmissions in frames
• Single frame format for all data and control
exchanges
Frame Structure
Flag Fields
• Delimit frame at both ends
• 01111110
• May close one frame and open another
• Receiver hunts for flag sequence to synchronize
• Bit stuffing used to avoid confusion with data containing
01111110
– 0 inserted after every sequence of five 1s
– If receiver detects five 1s it checks next bit
– If 0, it is deleted
– If 1 and seventh bit is 0, accept as flag
– If sixth and seventh bits 1, sender is indicating abort
Bit Stuffing
• Example with
possible errors
Address Field
• Identifies secondary station that sent or will receive frame
• Usually 8 bits long
• May be extended to multiples of 7 bits
– LSB of each octet indicates that it is the last octet (1) or not (0)
• All ones (11111111) is broadcast
Control Field
• Different for different frame type
– Information - data to be transmitted to user (next
layer up)
• Flow and error control piggybacked on information
frames
– Supervisory - ARQ when piggyback not used
– Unnumbered - supplementary link control
• First one or two bits of control filed identify
frame type
Control Field Diagram
Poll/Final Bit
• Use depends on context
• Command frame
– P bit
– 1 to solicit (poll) response from peer
• Response frame
– F bit
– 1 indicates response to soliciting command
Information Field
• Only in information and some unnumbered
frames
• Must contain integral number of octets
• Variable length
Frame Check Sequence Field
• FCS
• Error detection
• 16 bit CRC
• Optional 32 bit CRC
HDLC Operation
• Exchange of information, supervisory and
unnumbered frames
• Three phases
– Initialization
– Data transfer
– Disconnect
Examples of Operation (1)
Examples of Operation (2)
Hamming Code Basics
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
10.
Note
10.
Example 10.4
10.
Note
10.
Example 10.2
Find the minimum Hamming distance of the
coding scheme in Table 10.1.
Solution
We first find all Hamming distances.
10.
Example 10.3
Find the minimum Hamming distance of the
coding scheme in Table 10.2.
Solution
We first find all the Hamming distances.
10.
Note
10.
Example 10.7
10.
Example 10.8
10.
Figure 10.8 Geometric concept for finding dmin in error detection
10.
Figure 10.9 Geometric concept for finding dmin in error correction
10.
Note
10.
Example 10.9
Solution
This code guarantees the detection of up to three errors
(s = 3), but it can correct up to one error. In other words,
if this code is used for error correction, part of its capability
is wasted. Error correction codes need to have an odd
minimum distance (3, 5, 7, . . . ).
10.
Note
10.
Table 10.3 Simple parity-check code C(5, 4)
10.
Figure 10.10 Encoder and decoder for simple parity-check code
10.
Example 10.12
10.
Note
10.
Note
10.
Error Detection
and Correction
• Types of Errors
• Detection
• Correction
What is data transmission?
• Disadvantage:
– Although parallel transmission can transfer data faster, it requires more
transmission channels than serial transmission.
– This means that data bits can be out of sync, depending on transfer distance
and how fast each bit loads.
Example:
• If data is sent at 1Mbps then each bit lasts
only 1/1,000,000 sec. or 1 μs.
• For a single-bit error to occur, the noise
must have a duration of only 1 μs, which is
very rare.
Burst error
The term burst error means that two or
more bits in the data unit have changed
from 1 to 0 or from 0 to 1.
In words,
• The probability that a frame arrives with no bit errors
decreases when the probability of a single bit error increases.
• The probability that a frame arrives with no bit errors
decreases with increasing frame length.
• The longer the frame, the more bits it has and the higher the
probability that one of these is in error.
Error detecting code(Check bits/Redundancy check)
Four types of redundancy checks are used
in data communications
Vertical Redundancy Check
VRC
Performance
P = 11001
D = 110011
The CRC process can now be described as
• D(X)=1010001101
• P(X)=110101
Polynomial and Divisor
Polynomial??
Standard Polynomials
• An error E(X) will only be undetectable if it is divisible by P(X).
• P(X):X5+X4+X2+1
• D(X): X9+X7+X3+X2+1
P(X):X5+X4+X2+1
D(X): X9+X7+X3+X2+1
Tutorial 6
• D= 10111001
• P= 11001
Tutorial 6
• A wants to send a message “HI” to B. The
divisor used is 11001. What is the codeword
that is sent to B? The Hexadecimal
equivalent of H is 0x48 (110000) and I is
0x49 (110001). (Use polynomials)
• “1100 0011 0001 1101” is received by B. B
checks for error using hardware
implementation. What is the conclusion?
(Divisor=11001)
Checksum
At the sender
The unit is divided into k sections, each of n
bits.
All sections are added together using one’s
complement to get the sum.
The sum is complemented and becomes the
checksum.
The checksum is sent with the data
At the receiver
The unit is divided into k sections, each of n
bits.
All sections are added together using one’s
complement to get the sum.
The sum is complemented.
If the result is zero, the data are accepted:
otherwise, they are rejected.
Performance
The checksum detects all errors involving an
odd number of bits.
It detects most errors involving an even number
of bits.
If one or more bits of a segment are damaged
and the corresponding bit or bits of opposite
value in a second segment are also damaged, the
sums of those columns will not change and the
receiver will not detect a problem.
• Find the checksum at sender aand receiver
for the following sequence.
– 10110011 10101011 01011010 11010101
Tutorial 6
• What does “cyclic” signify in CRC?
• CRC versus Checksum versus Parity
check?
• VRC versus LRC?
• Calculate (and verify) the checksum of
“CHECKSUM”.
Error Correction
It can be handled in two ways:
1) receiver can have the sender retransmit the
entire data unit.
2) The receiver can use an error-correcting
code, which automatically corrects certain
errors.
Single-bit error correction
To correct an error, the receiver reverses the value
of the altered bit. To do so, it must know which bit
is in error.
Number of redundancy bits needed
• Let data bits = m
• Redundancy bits = r
Total message sent = m+r
The value of r must satisfy the following relation:
2r ≥ m+r+1
Error Correction
Hamming Code
Hamming Code
Hamming Code
Example of Hamming Code
Single-bit error
Error
Detection
Tutorial 7
• Calculate the number of parity(Redundancy
bits).
– If m=4
– m=7
Tutorial 7
• A bit word 1011 is to be transmitted ..
– Find the number of redundancy bits.
– Construct the even parity seven bit hamming code
for this data.
• If 7 bit hamming code is received as
1011011 .Assuming even parity state
whether it is correct or not ?If not, locate the
bit error.
HDLC
High Level Data Link Control
HDLC : High-level Data Link Control
2
HDLC : High-level Data Link Control
3
HDLC Station Types
• Primary station
• Controls operation of link
• Frames issued are called commands
• Maintains separate logical link to each secondary station
• Secondary station
• Under control of primary station
• Frames issued called responses
• Combined station
• May issue commands and responses
HDLC Link Configurations
• Unbalanced
• One primary and one or more secondary stations
• Supports full duplex and half duplex
• Balanced
• Two combined stations
• Supports full duplex and half duplex
HDLC Transfer Modes (1)
• Normal Response Mode (NRM)
• Unbalanced configuration
• Primary initiates transfer to secondary
• Secondary may only transmit data in response to command from primary
HDLC Transfer Modes (2)
• Asynchronous Balanced Mode (ABM)
• Balanced configuration
• Either station may initiate transmission without receiving permission
• Most widely used
HDLC Transfer Modes (3)
• Asynchronous Response Mode (ARM)
• Unbalanced configuration
• Secondary may initiate transmission without permission form primary
• Primary responsible for line
HDLC frame types
9
HDLC Frame Fields
Flag field
• is 8 bits of a fixed pattern (0111 1110).
• There is one flag at the beginning and one at the end frame.
• The ending flag of one Frame can be used as the beginning flag of the next
frame.
• To guarantee that the flag does not appear anywhere else in the frame
• HDLC uses a process called Bit Stuffing.
• Every time a sender wants to transmit a bit sequence having more than 6
consecutive 1’s, it inserts 1 redundant 0 after the 5th 1
10
Bit Stuffing
• the process of adding one extra zero whenever there are 5 consecutive 1’s in the
data, so that the receiver doesn’t mistake the data for a flag.
After
011111010 011111000 101101111 1010010
11
How does the receiver identify a stuffed bit?
12
Address Field
• Identifies secondary station that sent or will receive frame
• Usually 8 bits long
• May be extended to multiples of 7 bits
• LSB of each octet indicates that it is the last octet (1) or not (0)
• All ones (11111111) is broadcast
HDLC Control Field
14
Control Field
15
Control Field Diagram
Information Field
• Only in information and some unnumbered frames
• Must contain integral number of octets
• Variable length
I frame
18
Information Field
19
Information Field
20
Poll/Final Bit
• Use depends on context
• Command frame
• P bit
• 1 to solicit (poll) response from peer
• Response frame
• F bit
• 1 indicates response to soliciting command
Poll/Final
22
Frame Check Sequence Field
• FCS
• Error detection
• 16 bit CRC
• Optional 32 bit CRC
HDLC FCS Field
24
S-frame control field in HDLC
25
26
• Receive Ready (RR)
• Positive ACK of a received I- frame
• Receive Not Ready (RNR)
• Is RR frame with additional duties
• It Ack the receipt of a frame and announces that the
receiver is busy
• Reject (REJ)
• This is a NAK frame that can be used in Go-back-n
• Selective reject (SREJ)
• This is a NAK frame used in Selective Repeat ARQ
27
HDLC Operation
• Exchange of information, supervisory and unnumbered frames
• Three phases
• Initialization
• Data transfer
• Disconnect
Examples of Operation (1)
Examples of Operation (2)
Multiplexing
Introduction
• Under the simplest conditions, a medium can
carry only one signal at any moment in time.
• For multiple signals to share one medium, the
medium must somehow be divided
Why multiplexing?
• The communication media usually have much
higher bandwidth
• On the other hand individual users have lesser
data to send. And as a consequence the two
communicating stations do not utilize the full
capacity of a data link.
Multiplexing techniques can be categorized
into the following three types:
35
Statistical TDM Frame Format
Performance
Time it takes to
transmit one bit
• Five 4800-bps lines are to be multiplexed using TDM. Ignoring
overhead bits in the TDM frame, what is the total capacity
required for synchronous TDM? Assuming that we wish to
limit average TDM link utilization to 0.8, and assuming that
each TDM link is busy 60% of the time, what is the capacity
required for statistical TDM?
• total capacity required for synchronous
TDM=4800bpsx5=24kbps
• capacity required for statistical
TDM=(4800bpsx5x0.6)/0.8=18kbps
Example
• Show the contents of the five output frames for a
synchronous TDM multiplexer that combines four
sources sending the following characters. Note
that the characters are sent in the same order
that they are typed. The third source is silent.
a) Source 1 message: HELLO
b) Source 2 message: HI
c) Source 3 message:
d) Source 4 message: BYE
Example
• A character-interleaved time division multiplexer is
used to combine the data streams of a number of 110-
bps asynchronous terminals for data transmission over
a 2400-bps digital line. Each terminal sends
asynchronous characters consisting of 7 data bits, 1
parity bit, 1 start bit, and 2 stop bits. At least 3% of the
line capacity is reserved for pulse stuffing to
accommodate speed variations from the various
terminals.
a) Determine the number of bits per character.
b) Determine the number of terminals that can be
accommodated by the multiplexer.
a) n = 7 + 1 + 1 + 2 = 11 bits/character
b) Available capacity = 2400 × 0.97 = 2328 bps
If we use 20 terminals sending one character at
a time in TDM, the total capacity used is:
20x110 bps=220bps<2328
21 × 110 bps = 2310 bps available capacity
22 x 110bps=2420>2328
Statistical Time Division Multiplexing
45
To identify each piece of data,
an address is included
If the data is of variable size, a length
is also included
More precisely, the transmitted frame
contains a collection of data groups.
Example
We need to use synchronous TDM and combine 20
digital sources, each of 100 Kbps. Each output slot
carries 2 bit from each digital source, but one extra
bit is added to each frame for synchronization.
Answer the following questions:
a. What is the size of an output frame in bits?
b. What is the output frame rate?
c. What is the duration of an output frame?
d. What is the output data rate?
e. What is the efficiency of the system (ratio of useful
bits to the total bits).
• Each output frame carries 2 bits from each
source plus one extra bit for synchronization.
a) Frame size = 20 × 2 + 1 = 41 bits.
b) Each frame carries 2 bit from each source.
Frame rate = 100,000/2 = 50,000 frames/s.
c) Frame duration = 1 /(frame rate) = 1 /50,000
= 20 μs.
d) Data rate = (50,000 frames/s) × (41
bits/frame) = 2.05 Mbps.
e) In each frame 40 bits out of 41 are useful.
Efficiency = 40/41= 97.5%.
Example
• Ten sources, six with a bit rate of 200 kbps and
four with a bit rate of 400 kbps are to be
combined using TDM with no synchronizing bits.
Answer the following questions about the final
stage of the multiplexing:
a) What is the size of a frame in bits?
b) What is the frame rate?
c) What is the duration of a frame?
d) What is the data rate?
[Each output slot carries 1 bit from each digital source]
• We combine six 200-kbps sources into three 400-
kbps. Now we have seven 400-kbps channel.
a) Each output frame carries 1 bit from each of the
seven 400-kbps line. Frame size = 7 × 1 = 7 bits.
b) Each frame carries 1 bit from each 400-kbps
source. Frame rate = 400,000 frames/s.
c) Frame duration = 1 /(frame rate) = 1 /400,000 =
2.5 μs.
d) Output data rate = (400,000 frames/s) × (7
bits/frame) = 2.8 Mbps. We can also calculate
the output data rate as the sum of input data
rate because there is no synchronizing bits.
Output data rate = 6 × 200 + 4 × 400 = 2.8 Mbps.
Chapter 12
Multiple Access
Multiple Access
Control
MAC
Responsible framing
and MAC address and
Multiple Access Control
Multiple Access
Problem: When two or more nodes transmit at the same time, their
frames will collide and the link bandwidth is wasted during collision
How to coordinate the access of multiple sending/receiving nodes to
the shared link???
• Solution: We need a protocol to coordinate the transmission of the
active nodes
• These protocols are called Medium or Multiple Access Control
(MAC) Protocols belong to a sublayer of the data link layer called
MAC (Medium Access Control)
• What is expected from Multiple Access Protocols:
• Main task is to minimize collisions in order to utilize the bandwidth by:
• Determining when a station can use the link (medium)
• what a station should do when the link is busy
• what the station should do when it is involved in collision
Taxonomy of multiple-access protocols discussed in this chapter
Pure ALOHA:
1. Each station sends a frame whenever is has a frame to send
2. One channel to share, possibility of collision between frames from different stations
12.8
Procedure for ALOHA protocol
Critical time for pure ALOHA protocol
Tfr= Frame
Transmission time
If the frame transmission time is T sec, then the vulnerable time is = 2 T sec.
This means no station should send during the T-sec before this station starts
transmission and no station should start sending during the T-sec period that the
current station is sending.
Pure ALOHA
Slotted ALOHA:
1. We divide the time into slots and force the station to send only at the beginning of
the time slot
12.17
In danger time for slotted ALOHA protocol
Random Access – Slotted ALOHA
Note
0.4
0.3
Slotted Aloha
0.2
0.1
Pure Aloha
Disadvantage
1. Non-Persistent CSMA
2. 1-Persistent CSMA
3. p-Persistent CSMA
Nonpersistent CSMA
A station with frames to be sent, should sense the medium
1. If medium is idle, transmit; otherwise, go to 2
2. If medium is busy, (backoff) wait a random amount of time and
repeat 1
Non-persistent Stations are deferential (respect others)
Performance:
Random delays reduces probability of collisions because two stations
with data to be transmitted will wait for different amount of times.
Bandwidth is wasted if waiting time (backoff) is large because
medium will remain idle following end of transmission even if one or
more stations have frames to send
Random Waiting
times
Wasted time
1-persistent CSMA
To avoid idle channel time, 1-persistent protocol used
Station wishing to transmit listens to the medium:
1. If medium idle, transmit immediately;
2. If medium busy, continuously listen until medium becomes idle; then
transmit immediately with probability 1
Performance
1-persistent stations are selfish
If two or more stations becomes ready at the same time, collision
guaranteed
P-persistent CSMA
Time is divided to slots where each Time unit (slot) typically equals
maximum propagation delay
Station wishing to transmit listens to the medium:
1. If medium idle,
transmit with probability (p), OR
wait one time unit (slot) with probability (1 – p), then repeat 1.
2. If medium busy, continuously listen until idle and repeat step 1
3. Performance
Reduces the possibility of collisions like nonpersistent
Reduces channel idle time like 1-persistent
Flow diagram for three persistence methods
Persistent and Nonpersistent CSMA
N=0
Choose R between
0 & 2k - 1
K=10 K=N
Yes
No
No
N < 10 N==16
N=N+1
Yes
Abort
Exponential Backoff Algorithm
Solution
The frame transmission time is Tfr = 2 × Tp = 51.2 μs. This
means, in the worst case, a station needs to transmit for a
period of 51.2 μs to detect the collision. The minimum size of
the frame is 10 Mbps × 51.2 μs = 512 bits or 64 bytes. This is
actually the minimum size of the frame for Standard Ethernet.
Problem
• In a CSMA/CD network with a data rate of 10 Mbps,
the minimum frame size is found to be 512 bits for the
correct operation of the collision detection process.
What should be the minimum frame size if we increase
the data rate to 100 Mbps? To 1 Gbps? To 10 Gbps?
Solution
• Let us find the relationship between the minimum frame size and the data rate. We
• know that
Tfr = (frame size) / (data rate) = 2 × Tp = 2 × distance / (propagation speed)
or
(frame size) = [2 × (distance) / (propagation speed)] × (data rate)]
or
(frame size) = K × (data rate)
This means that minimum frame size is proportional to the data rate (K is a constant).
• When the data rate is increased, the frame size must be increased in a network with a
fixed length to continue the proper operation of the CSMA/CD.
• We calculate the minimum frame size based on the above proportionality relationship
• Data rate = 10 Mbps → minimum frame size = 512 bits
• Data rate = 100 Mbps → minimum frame size = 5120 bits
• Data rate = 1 Gbps → minimum frame size = 51,200 bits
• Data rate = 10 Gbps → minimum frame size = 512,000 bits
Collision of the first bit in CSMA/CD
In the above figure, the data rate is 10 Mbps, the distance between station A and C
is 2000 m, and the propagation speed is 2 x 10^8 m/s. Station A starts sending a
long frame at time t1 =0; station C starts sending a long frame at time t2 =3μs. The
size of the frame is long enough to guarantee the detection of collision by both
stations. Find:
a. The time when station C hears the collision (t3)'
b. The time when station A hears the collision (t4)'
c. The number of bits station A has sent before detecting the collision.
d. The number of bits station C has sent before detecting the collision.
Collision of the first bit in CSMA/CD
We have t1 = 0 and t2 = 3 μs
a. t3 − t1= (2000 m) / (2 × 10^8 m/s) =10 μs → t3 = 10 μs + t1 = 10 μs
b. t4 − t2 = (2000 m) / (2 × 10^8 m/s) =10 μs → t4 = 10 μs + t2 = 13 μs
c. Tfr(A) = t4 − t1 = 13 − 0 = 13 μs → BitsA = 10 Mbps × 13 μs = 130
bits
d. Tfr(C) = t3 − t2 = 10 − 3 = 07μs → BitsC = 10 Mbps × 07 μs = 70
bits.
13.2 Controlled Access or Scheduling (reservation
and Polling only for reference)
Primary is sending to
Secondary Secondary is sending
to Primary
3- Token-Passing network
Implements Distributed
Polling System
OSI MODEL
OSI Model
Communication Architecture
Strategy for connecting host computers and other
communicating equipment.
Defines necessary elements for data communication
between devices.
A communication architecture, therefore, defines a
standard for the communicating hosts.
A programmer formats data in a manner defined by the
communication architecture and passes it on to the
communication software.
Separating communication functions adds flexibility, for
example, we do not need to modify the entire host software
to include more communication devices.
OSI Model
Layer Architecture
Layer architecture simplifies the network design.
It is easy to debug network applications in a layered
architecture network.
The network management is easier due to the layered
architecture.
Network layers follow a set of rules, called protocol.
The protocol defines the format of the data being
exchanged, and the control and timing for the handshake
between layers.
OSI Model
2.8
Figure 2.4 An exchange using the OSI model
2.9
OSI Model
Physical Layer
Provides physical interface for transmission of information.
Defines rules by which bits are passed from one system to
another on a physical communication medium.
Covers all - mechanical, electrical, functional and procedural
- aspects for physical communication.
Such characteristics as voltage levels, timing of voltage
changes, physical data rates, maximum transmission
distances, physical connectors, and other similar attributes
are defined by physical layer specifications.
Figure 2.5 Physical layer
2.11
Note
2.12
OSI Model
2.14
Figure 2.7 Hop-to-hop delivery
2.15
Note
2.16
OSI Model
Network Layer
Implements routing of frames (packets) through the
network.
Defines the most optimum path the packet should take from
the source to the destination
Defines logical addressing so that any endpoint can be
identified.
Handles congestion in the network.
Facilitates interconnection between heterogeneous
networks (Internetworking).
The network layer also defines how to fragment a packet
into smaller packets to accommodate different media.
Figure 2.8 Network layer
2.18
Figure 2.9 Source-to-destination delivery
2.19
OSI Model
Transport Layer
Purpose of this layer is to provide a reliable mechanism for
the exchange of data between two processes in different
computers.
2.21
Figure 2.11 Reliable process-to-process delivery of a message
2.22
OSI Model
Session Layer
Session layer provides mechanism for controlling the dialogue
between the two end systems. It defines how to start, control and
end conversations (called sessions) between applications.
2.24
OSI Model
Presentation Layer
Presentation layer defines the format in which the data is to
be exchanged between the two communicating entities.
Also handles data compression and data encryption
(cryptography).
Figure 2.13 Presentation layer
2.26
OSI Model
Application Layer
Application layer interacts with application programs and is
the highest level of OSI model.
Application layer contains management functions to
support distributed applications.
Examples of application layer are applications such as file
transfer, electronic mail, remote login etc.
Figure 2.14 Application layer
2.28
OSI Model
OSI in Action
A message begins at the top application
layer and moves down the OSI layers to
the bottom physical layer.
As the message descends, each
successive OSI model layer adds a
header to it.
A header is layer-specific information
that basically explains what functions
the layer carried out.
Conversely, at the receiving end,
headers are striped from the message
as it travels up the corresponding
layers.
TCP/IP Model
TCP/IP MODEL
TCP/IP Model
TCP/IP Model
Application Layer
Application programs using the network
Transport Layer (TCP/UDP)
Management of end-to-end message transmission,
error detection and error correction
Network Layer (IP)
Handling of datagrams : routing and congestion
Data Link Layer
Management of cost effective and reliable data delivery,
access to physical networks
Physical Layer
Physical Media
TCP/IP PROTOCOL SUIT
• TCP/IP, or the Transmission Control Protocol/Internet
Protocol, is a suite of communication protocols used to
interconnect network devices on the internet.
• TCP/IP can also be used as a communications protocol in a
private network (an intranet or an extranet)
• TCP/IP specifies how data is exchanged over the internet by
providing end-to-end communications that identify how it
should be broken into packets, addressed, transmitted,
routed and received at the destination.
• TCP/IP requires little central management, and it is designed
to make networks reliable, with the ability to recover
automatically from the failure of any device on the network.
TCP IP
• TCP defines how • IP defines how to
applications can create address and route each
channels of
communication across a packet to make sure it
network. reaches the right
• It also manages how a destination.
message is assembled into • Each gateway computer
smaller packets before on the network checks
they are then transmitted
over the internet and this IP address to
reassembled in the right determine where to
order at the destination forward the message.
address.
TCP/IP (Transmission Control
Protocol/Internet Protocol)
Types of addressing: