CNND Module 2 Notes
CNND Module 2 Notes
Physical Layer
Syllabus
Syllabus
Transmission Media
• In data communication terminology, a transmission medium is a
physical path between the transmitter and the receiver i.e.
• it is the channel through which data is sent from one place to another.
Guided Media
• It is defined as the physical medium through which the signals are
transmitted.
• also referred to as Wired or Bounded transmission media.
• Signals being transmitted are directed and confined in a narrow pathway by
using physical links.
Features:
• High Speed
• Secure
• Used for comparatively shorter distances
• Types:
• Twisted pair:
• Coaxial Cable
Guided Media
• Types:
• Twisted pair:
• Coaxial Cable
• Fibre Optic
Types of Guided Media: Twisted Pair
• Twisted pair is a physical media made up of a pair of cables
twisted with each other.
• A twisted pair cable is cheap as compared to other
transmission media.
• Installation of the twisted pair cable is easy, and it is a
lightweight cable.
• The frequency range for twisted pair cable is from 0 to
3.5KHz.
• A twisted pair consists of two insulated copper wires
arranged in a regular spiral pattern.
Types of Guided Media: Twisted Pair
Types of Guided Media: Twisted
Pair
• Unshielded Twisted Pair:
• UTP consists of two insulated copper wires twisted around one
another.
• This type of cable has the ability to block interference and does not
depend on a physical shield for this purpose.
• It is used for telephonic applications.
Types of Guided Media: Twisted
Pair
• Unshielded Twisted Pair:
- Following are the categories of the unshielded twisted pair cable:
• Category 1: Category 1 is used for telephone lines that have low-
speed data.
• Category 2: It can support upto 4Mbps.
• Category 3: It can support upto 16Mbps.
• Category 4: It can support upto 20Mbps. Therefore, it can be used
for long-distance communication.
• Category 5: It can support upto 200Mbps.
Types of Guided Media: Twisted
Pair
• Unshielded Twisted Pair:
• Advantages :
• It is cheap.
• Installation of the unshielded twisted pair is easy.
• It can be used for high-speed LAN.
• Disadvantage:
• This cable can only be used for shorter distances because of attenuation.
• Susceptible to external interference
• Lower capacity and performance in comparison to STP
• Applications:
• Used in telephone connections and LAN networks
Types of Guided Media: Twisted
Pair
• Shielded Twisted Pair:
• This type of cable consists of a special jacket (a copper braid covering
or a foil shield) to block external interference.
• It is used in fast-data-rate Ethernet and in voice and data channels of
telephone lines.
Types of Guided Media: Twisted
Pair
• Shielded Twisted Pair:
- Characteristics Of Shielded Twisted Pair:
• The cost of the shielded twisted pair cable is not very high and not very low.
• An installation of STP is easy.
• It has higher capacity as compared to unshielded twisted pair cable.
Physical Layer
Syllabus
Syllabus
Unguided Media
• also referred to as Wireless or Unbounded transmission media.
• No physical medium is required for the transmission of
electromagnetic signals.
• Features:
• The signal is broadcasted through air
• Less Secure
• Used for larger distances
• There are 3 types of Signals transmitted through unguided
media:
(i) Radio waves
(ii) Microwaves
(iii) Infrared
Radio Waves
• the electromagnetic waves that are transmitted in all the directions
of free space.
• omnidirectional, i.e., the signals are propagated in all the
directions.
• The range in frequencies of radio waves is from 3Khz to 1 khz.
Radio Waves
• In the case of radio waves, the sending and receiving antenna are not
aligned, i.e., the wave sent by the sending antenna can be received by any
receiving antenna.
• An example of the radio wave is FM radio.
• Further Categorized as (i) Terrestrial and (ii) Satellite.
• Applications Of Radio waves:
• useful for multicasting when there is one sender and many receivers.
• An FM radio, television, cordless phones are examples of a radio wave.
• Advantages Of Radio transmission:
• Radio transmission is mainly used for wide area networks and mobile cellular
phones.
• Radio waves cover a large area, and they can penetrate the walls.
• Radio transmission provides a higher transmission rate.
Microwaves
• It is a line of sight transmission i.e. the sending and receiving antennas need
to be properly aligned with each other.
• These are majorly used for mobile phone communication and television
distribution.
Microwaves
• Characteristics of Microwave:
• Frequency range: The frequency range of terrestrial microwave is from
4-6 GHz to 21-23 GHz.
• Bandwidth: It supports the bandwidth from 1 to 10 Mbps.
• Short distance: It is inexpensive for short distance.
• Long distance: It is expensive as it requires a higher tower for a longer
distance.
• Attenuation: Attenuation means loss of signal. It is affected by
environmental conditions and antenna size.
Microwaves
• Advantages Of Microwave:
• Microwave transmission is cheaper than using cables.
• It is free from land acquisition as it does not require any land for the
installation of cables.
• Microwave transmission provides an easy communication in terrains as
the installation of cable in terrain is quite a difficult task.
• Communication over oceans can be achieved by using microwave
transmission.
Microwaves
• Disadvantages of Microwave transmission:
• Eavesdropping: An eavesdropping creates insecure
communication. Any malicious user can catch the signal in the air
by using its own antenna.
• Out of phase signal: A signal can be moved out of phase by using
microwave transmission.
• Susceptible to weather condition: A microwave transmission is
susceptible to weather condition. This means that any
environmental change such as rain, wind can distort the signal.
• Bandwidth limited: Allocation of bandwidth is limited in the case
Infrared
• Infrared waves are used for very short distance
communication.
λ = c/f
• Electromagnetic waves are a type of energy transfer that
occurs in space.
Representation of Electromagnetic Waves
Electromagnetic Spectrum
• The electromagnetic spectrum is a
– collection of frequencies, wavelengths, and photon
energies of electromagnetic waves
– spanning from 1Hz to 1025Hz,
– equivalent to wavelengths ranging from a few hundred
kilometres to a size smaller than the size of an atomic
nucleus.
• In a vacuum, all electromagnetic waves travel at
the same speed as light.
• For different forms of electromagnetic waves,
however, the wavelengths, frequencies, and photon
energy will vary.
Electromagnetic Spectrum
Electromagnetic Spectrum
Electromagnetic Waves in Electromagnetic
Spectrum
• Visible Rays
– Visible rays are electromagnetic waves that can be seen
with the naked eye. They are the most common type of
electromagnetic waves.
– These can be found in the frequency range of 4×1014Hz–
7×1014Hz or the wavelength range of 400nm–700nm.
– The visible light rays reflected or released from the
objects around us assist us in seeing the world, and the
range of visible radiation is different for different
creatures.
– Devices that emit light in the visible area of the
electromagnetic spectrum include bulbs, lamps, candles,
LEDs, tube lights, and so on.
Electromagnetic Waves in Electromagnetic
Spectrum
• Ultraviolet Rays
– Although the sun is the primary source of ultraviolet radiation on
Earth, the ozone layer absorbs the majority of UV energy before it
reaches the atmosphere.
– UV radiation has a wavelength of 400nm–1nm.
– These radiations are emitted by special lamps and extremely hot
bodies, and in big numbers, they can cause significant injury to
humans. It tans the skin and creates burns.
– Because these radiations may be focused on tiny beams, they are used
in high precision applications such as LASIK or laser-based eye
surgery.
– UV lamps are used in water purifiers to eliminate microorganisms
that may be present in the water.
– When working with UV welding arcs, welders use special goggles to
protect their eyes.
Electromagnetic Waves in Electromagnetic
Spectrum
• X-Rays
– This electromagnetic radiation is found outside of the ultraviolet
(UV) region of the electromagnetic spectrum and is extremely
valuable in the medical field.
– The wavelength range of X-ray radiation is 1nm–10–3nm.
– By blasting a metal target with high-energy electrons, X-rays can
be produced.
– X-rays are a diagnostic technique in medicine that can be quite
helpful in the treatment of some types of cancer. To find the source
of the problem, a doctor utilises an x-ray scanner to scan our bones
or teeth. Overexposure to x-rays can cause harm or death to the
organism’s healthy tissues. As a result, extreme caution must be
exercised when dealing with x-rays.
– At the airport checkpoint, security agents utilise it to search
through passengers’ luggage. X-rays are also emitted by the
universe’s heated gases.
Electromagnetic Waves in
Electromagnetic Spectrum
• Gamma-Rays
– The universe is the largest gamma-ray generator.
– These rays are in the electromagnetic spectrum’s higher
frequency region.
– Gamma rays have wavelengths ranging from 10–12m to
10–14m.
– Radioactive nuclei release high-frequency radiations,
which are also created during nuclear processes.
– Gamma rays have a wide range of medical applications,
including the destruction of cancerous cells. Gamma-ray
imaging is a technique used by doctors to examine the
insides of patients’ bodies.
Types of Radiation Frequency range (Hz) Wavelength Range
X-rays 1017-1020 1 nm – 1 pm
• Single-Bit Error:
• The only one bit of a given data unit is changed from 1 to 0 or
from 0 to 1.
Error Detection
• Types Of Errors
• Errors can be classified into two categories:
• Single-Bit Error
• Burst Error
• Burst Error:
• The two or more bits are changed from 0 to 1 or from 1 to 0 is
known as Burst Error.
• The Burst Error is determined from the first corrupted bit to the
last corrupted bit.
Error Detecting Techniques
• Checksum
- In checksum error detection scheme, the data is divided
into k segments each of m bits.
- In the sender’s end the segments are added using 1’s
complement arithmetic to get the sum. The sum is
complemented to get the checksum.
- The checksum segment is sent along with the data
segments.
- At the receiver’s end, all received segments are added
using 1’s complement arithmetic to get the sum. The sum is
complemented.
Error Detecting Techniques
• Checksum
Error Detecting Techniques
• Cyclic Redundancy Check (CRC)
- CRC is a redundancy error technique used to determine the error.
• Following are the steps used in CRC for error detection:
- In CRC technique, a string of n 0s is appended to the data unit, and this n
number is less than the number of bits in a predetermined number, known as
division which is n+1 bits.
- Secondly, the newly extended data is divided by a divisor using a process
is known as binary division.
- The remainder generated from this division is known as CRC remainder.
- Thirdly, the CRC remainder replaces the appended 0s at the end of the
original data. This newly generated unit is sent to the receiver.
Error Detecting Techniques
• Cyclic Redundancy Check (CRC)
- The receiver receives the data followed by the CRC remainder.
- The receiver will treat this whole unit as a single unit, and it is divided by the same
divisor that was used to find the CRC remainder.
• If the resultant of this division is zero which means that it has no error, and
the data is accepted.
• If the resultant of this division is not zero which means that the data
consists of an error. Therefore, the data is discarded.
Error Detecting Techniques
• Cyclic Redundancy Check (CRC)
Error Detecting Techniques
• Cyclic Redundancy Check (CRC)
• Eg. Suppose the original data is 11100 and divisor is
1001.
• CRC Generator
- A CRC generator uses a modulo-2 division.
• Firstly, three zeroes are appended at the end of the data as
the length of the divisor is 4 and we know that the length of
the string 0s to be appended is always one less than the
length of the divisor.
- Now, the string becomes 11100000, and the resultant string is
divided by the divisor 1001.
- The remainder generated from the binary division is known as
CRC remainder. The generated value of the CRC remainder is
111.
Error Detecting Techniques
• Cyclic Redundancy Check (CRC)
• Eg. Suppose the original data is 11100 and divisor is
1001.
• CRC Generator
Error Detecting Techniques
• Cyclic Redundancy Check (CRC)
• Eg. Suppose the original data is 11100 and divisor is
1001.
• CRC Checker
- The functionality of the CRC checker is similar to the CRC
generator.
- When the string 11100111 is received at the receiving end,
then CRC checker performs the modulo-2 division.
- A string is divided by the same divisor, i.e., 1001.
- In this case, CRC checker generates the remainder of zero.
Therefore, the data is accepted.
Error Detecting Techniques
• Cyclic Redundancy Check (CRC)
• Eg. Suppose the original data is 11100 and divisor is
1001.
• CRC Checker
Error Detecting Techniques
• Cyclic Redundancy Check (CRC)
• Eg.
THANK YOU!!!
Module 2
Physical Layer and Data Link Layer
• For correcting the errors, one has to know the exact position of the
error.
• r1=0
Error Correction : Hamming Code
• Determining the Parity bits
2. Determining the r2 bit
• The r1 bit is calculated by performing a parity check on
the bit positions whose binary representation includes 1 in
the second position.
• We observe the bit positions that includes 1 in the second
position are 2, 3, 6, 7.
• Now, we perform the even-parity check at these bit
positions. The total number of 1 at these bit positions
corresponding to r2 is odd, therefore, the value of the
r2 bit is 1.
• r2=1
Error Correction : Hamming Code
• Determining the Parity bits
2. Determining the r4 bit
• The r1 bit is calculated by performing a parity check on
the bit positions whose binary representation includes 1 in
the third position.
• We observe the bit positions that includes 1 in the third
position are 4, 5, 6, 7.
• Now, we perform the even-parity check at these bit
positions. The total number of 1 at these bit positions
corresponding to r4 is even, therefore, the value of the
r4 bit is 0.
• r4=0
Error Correction : Hamming Code
• Determining the Parity bits
• Data transferred is given below:
• Original data
• Received Data
Error Correction : Hamming Code
• Example : Sender original data : 1011
• Original data 7 6 5 4 3 2 1
1 0 1 r4=0 1 r2=0 r1=1
• Received data 7 6 5 4 3 2 1
1 1 to 0 1 r4=0 1 r2=0 r1=1
• Protocols:
2. Sliding Window
1. Go Back N
2. Selective Repeat
Elementary Data Link Protocols
• The error control mechanism is divided into two categories,
i.e.,
• Stop and Wait ARQ and
• sliding window.
Number of Sequence
Numbers Required- NOTE
For any sliding window protocol to work without any problem,
the following condition must be satisfied-
Available Sequence Numbers >= Sender Window Size + Receiver
Stop and Wait ARQ Protocol
• Stop and wait ARQ is a one bit sliding window protocol where-
Sender window size = 1
Receiver window size = 1
• Thus, in stop and wait ARQ,
• Minimum number of sequence numbers required
= Sender Window Size + Receiver Window Size
=1+1
=2
• Thus,
Minimum number of sequence numbers required in Stop and
Wait ARQ = 2.
The two sequence numbers used are 0 and 1.
How Stop and Wait ARQ Solves All Problems?
• Conclusion-
• Had the sequence numbers not been allotted to the data packets,
receiver would have accepted the duplicate data packet thinking of it as
the new data packet.
• This is how sequence numbers allotted to the data packets prove to be
useful for identifying the duplicate data packets and discarding them.
How Stop and Wait ARQ Solves All Problems?
• 3. Problem of Delayed
Acknowledgement-
• Sequence number on
acknowledgements help to solve the
problem of delayed
acknowledgement.
How Stop and Wait ARQ Solves All Problems?
• Step-02:
• Receiver receives the data packet correctly.
• Receiver now expects data packet with sequence number-1.
• Receiver sends the acknowledgement ACK-1.
• Step-03:
• Acknowledgement ACK-1 sent by the receiver gets delayed in reaching
the sender.
How Stop and Wait ARQ Solves All Problems?
• Step-05:
• Receiver receives the data packet and discovers it is the duplicate packet.
• It expects the data packet with sequence number-1 but receiving the data
packet with sequence number-0.
• It discards the duplicate data packet and re-sends acknowledgement ACK-1.
• ACK-1 requests the sender to send a data packet with sequence number-1.
How Stop and Wait ARQ Solves All Problems?
4. Problem of Damaged
Packet-
• If receiver receives a corrupted data
packet from the sender, it sends a
negative acknowledgement (NAK) to
the sender.
• NAK requests the sender to send the
data packet again.
How Stop and Wait ARQ Solves All Problems?
The major limitation of Stop and Wait ARQ is its very less efficiency.
• The term sliding window refers to the imaginary boxes to hold frames.
• It controls the data packets between the two devices where reliable and
gradual delivery of data frames is needed.
Sliding Window Protocols
• Working Principle
In these protocols, the sender has a buffer called the sending window and
the receiver has buffer called the receiving window.
The size of the sending window determines the sequence number of the outbound
frames. If the sequence number of the frames is an n-bit field, then the range of
sequence numbers that can be assigned is 0 to 2𝑛−1.
The sequence numbers are numbered as modulo-n.
For example, if the sending window size is 4, then the sequence numbers will be
0, 1, 2, 3, 0, 1, 2, 3, 0, 1, and so on. The number of bits in the sequence number is
2 to generate the binary sequence 00, 01, 10, 11.
The size of the receiving window is the maximum number of frames that
the receiver can accept at a time.
It determines the maximum number of frames that the sender can send
before receiving acknowledgment.
Sliding Window Protocols
• Example
• Suppose that we have sender
window and receiver window
each of size 4.
• So the sequence numbering of
both the windows will be
0,1,2,3,0,1,2 and so on.
• The following diagram shows the
positions of the windows after
sending the frames and
receiving acknowledgments.
Sliding Window Protocols
• Types of Sliding Window Protocols
The Sliding Window ARQ (Automatic Repeat reQuest)
protocols are of two categories −
Go-Back-N Automatic Repeat Request
• In Go-Back-N ARQ, the frames are numbered sequentially as Go-
Back-N ARQ sends the multiple frames at a time
• that requires the numbering approach to distinguish the frame from
another frame, and
• these numbers are known as the sequential numbers.
• Point-03: https://www.gatevidyalay.com/selective-
repeat-sliding-window-protocol/
THANK YOU!!!
Module 2
Physical Layer and Data Link Layer
• A frame is transmitted via the network to the destination that verifies its
successful arrival.
• It is a bit - oriented protocol that is applicable for both point - to - point and
multipoint communications.
HDLC - Transfer Modes
• HDLC supports two types of transfer modes, normal
response mode and asynchronous balanced mode.
1. Normal Response Mode (NRM)
2. Asynchronous Balanced Mode (ABM)