0% found this document useful (0 votes)
2 views132 pages

Module 2

The document covers the Physical Layer and Data Link Layer in networking, detailing various guided transmission media such as twisted pair cables, coaxial cables, fiber optics, and power lines. It explains data transmission methods, including serial and parallel transmission, as well as synchronous and asynchronous transmission modes. Additionally, it discusses the advantages and disadvantages of each type of transmission medium and mode, along with their applications in real-world scenarios.

Uploaded by

mikeyfirasath201
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views132 pages

Module 2

The document covers the Physical Layer and Data Link Layer in networking, detailing various guided transmission media such as twisted pair cables, coaxial cables, fiber optics, and power lines. It explains data transmission methods, including serial and parallel transmission, as well as synchronous and asynchronous transmission modes. Additionally, it discusses the advantages and disadvantages of each type of transmission medium and mode, along with their applications in real-world scenarios.

Uploaded by

mikeyfirasath201
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Module 2

Physical Layer & DataLink


Layer
Physical Layer and Datalink
Layer- Contents

Guided Transmission Media: Persistent


Storage, Twisted Pairs, Coaxial Cable,
Power Lines, Fiber optics, Data
Transmission: Serial and Parallel
Transmission, Asynchronous and
Synchronous Transmission,
Multiplexing, Switching.
Data Link Layer Design Issues- Services
Provided to the network Layer, Framing,
Error Control, Flow Control, Error
Detection and Correction- Error
Correcting Codes, Error Detecting
Codes.
Physical Layer – Guided
Transmission Media
• The purpose of the physical layer is to
transport bits from one machine to
other.
• Various physical media can be used for
the actual transmission.
• Transmission media that rely on a
physical cable or wire are often called
guided transmission media because
the signal transmissions are guided
along a path with a physical cable or
wire.
Types of Guided
Transmission Media

• Twisted Pair Cable


• Coaxial cable
• Power Lines
• Fiber optics
Twisted Pair Cable
• Twisted pair is a physical media made up of a pair of
cables twisted with each other.
• In which one wire is to carry the signal to destination
and other is used as a ground reference.
• 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.
• Twisting is done so that the noise will equally affect the
wire from the external environment.
Twisted Pair Cable

• A twisted pair consists of two insulated


copper wires arranged in a regular
spiral pattern.
Types of Twisted Pair Cable
Unshielded Twisted Pair
Cable(UTP)

• 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.
Unshielded Twisted Pair Cable(UTP)
Advantages
• Less Expensive
• Easy to install
• High-speed capacity
Disadvantages
• Susceptible to external interference
• Lower capacity and performance in comparison to STP
• Short distance transmission due to attenuation
Shielded Twisted Pair Cable(STP)

• 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.
Shielded Twisted Pair Cable(STP)

Advantages
• Better performance at a higher data rate in comparison to UTP
• Comparatively faster
• Installation of STP is easy.
Disadvantages
• Comparatively difficult to install and manufacture
• More expensive
• Bulky
Twisted Pair Cable

Applications
Local Area Networks(LANs)- Commonly used in Ethernet Networks for
connecting Computers, switches, Routers and other network devices.
Telephone Networks – Traditional telephone lines uses twisted pair
cables to connect homes and businesses to the telephone network.
Intercom Systems – used in intercom systems within buildings to enable
voice communication between different rooms or areas.
Coaxial Cable • Coaxial cable is very commonly used transmission
media, for example, TV wire is usually a coaxial
cable.
• The name of the cable is coaxial as it contains two
conductors parallel to each other.
• It has a higher frequency as compared to Twisted
pair cable.
• The inner conductor of the coaxial cable is made up
of copper, and the outer conductor is made up of
copper mesh. The middle core is made up of non-
conductive cover that separates the inner
conductor from the outer conductor.
• The middle core is responsible for the data
transferring whereas the copper mesh prevents
from the EMI(Electromagnetic interference).
Coaxial Cable
Coaxial Cable
Types
1. Baseband Transmission
It is defined as the process of
transmitting a single signal at high
speed.
2. Broadband Transmission
It is defined as the process of
transmitting multiple signals
simultaneously.
Coaxial Cable
Advantages
• The data can be transmitted at
high speed.
• It has better shielding as
compared to twisted pair cable.
• It provides higher bandwidth.
Disadvantages
• It is more expensive as
compared to twisted pair cable.
• If any fault occurs in the cable
causes the failure in the entire
netwo
Coaxial Cable
Applications
Transmission of cable TV Signals -Coaxial cables are the
standard medium for transmitting cable television signals
from service providers to consumers' homes.
Closed-Circuit Television (CCTV) - Coaxial cables are
commonly used to transmit video signals from security
cameras to monitoring systems, especially in analog
CCTV systems.
Medical Imaging Systems - Used in medical imaging
equipment to transmit high-frequency signals for clear and
accurate imaging.
Fiber Optic

• Fiber optic cable is a cable that uses


electrical signals for communication.
• Fiber optic is a cable that holds the
optical fibers coated in plastic that are
used to send the data by pulses of light.
• The plastic coating protects the optical
fibers from heat, cold, electromagnetic
interference from other types of wiring.
• Fiber optics provide faster data
transmission than copper wires.
Fiber Optic

Diagrammatic Representation
Fiber Optic
Basic Elements of Fiber Optic Cable
• Core: The optical fiber consists of a narrow
strand of glass or plastic known as a core. A
core is a light transmission area of the fiber.
The more the area of the core, the more light
will be transmitted into the fiber.
• Cladding: The concentric layer of glass is
known as cladding. The main functionality of
the cladding is to provide the lower refractive
index at the core interface as to cause the
reflection within the core so that the light waves
are transmitted through the fiber.
• Jacket: The protective coating consisting of
plastic is known as a jacket. The main purpose
of a jacket is to preserve the fiber strength,
absorb shock and extra fiber protection.
Fiber Optic
Types
Single-Mode Fiber(SMF)
Single-mode fiber has a small core diameter (8-10
micrometers) and allows only one mode of light to
propagate, making it suitable for long-distance
communication with high bandwidth and minimal
signal loss.
Multi -Mode Fiber(MMF)
Multi-mode fiber has a larger core diameter (50-
62.5 micrometers) and allows multiple modes of
light to propagate, making it suitable for shorter
distances with lower bandwidth due to modal
dispersion.
Fiber Optic
Advantages
• Increased capacity and bandwidth
• Lightweight
• Less signal attenuation
• Immunity to electromagnetic interference
• Resistance to corrosive materials
Disadvantages
• Difficult to install and maintain
• High cost
• Fragile
Fiber Optic

Applications
• Medical Purpose: Used in several
types of medical instruments.
• Defense Purpose: Used in
transmission of data in aerospace.
• For Communication: This is largely
used in formation of internet cables.
• Industrial Purpose: Used for lighting
purposes and safety measures in
designing the interior and exterior of
automobiles.
Power Lines
• The use of electrical power lines for data communication is an old idea, recently revived for
high-rate communication both inside homes (as LANs) and outside homes (for broadband
Internet access).
• Power lines, which already exist in homes to distribute electricity, offer a convenient way to
network devices by simply plugging them into electrical outlets.
• This eliminates the need for additional cables or wireless setups, as data signals are
superimposed on the low-frequency power signal.
• However, household electrical wiring was designed for power distribution, not data, and
presents challenges like signal attenuation at higher frequencies, variable electrical properties,
and interference from appliances.
• Despite these issues, it is feasible to achieve data rates of at least 100 Mbps using advanced
communication schemes that handle impaired frequencies and errors.
• Various proprietary standards exist for power-line networking, with international standards
currently under development.
Data Transmission
• Data transmission is sending and receiving
digital or analog data between devices.
• This can be achieved through different
mediums, such as cables, optical fibers, or
wireless signals.
• In our daily lives, data transmission is
essential, whether sending and receiving
emails, answering phone calls, or watching
our favorite TV shows.
• The way in which data is transmitted from
one device to another device is known
as transmission mode.
Data Transmission
• Data transmission involves at least two or
more digital devices communicating over a
network, and requires a few key components:
• Sender. The device that starts the
transmission of data.
• Receiver. The device that receives the data
sent by the sender.
• Message or data. This is the information
transmitted from one device to another,
including text, images, audio, video, or any
other form of content.
• Medium. The physical path or channel
through which data is transmitted, such as an
optical cable or wireless transmission.
• Protocol. A set of rules governing the format,
timing, and sequencing of data transmission.
Types of Transmission Mode
• In Simplex mode, the communication is unidirectional, i.e., the
data flow in one direction.
• A device can only send the data but cannot receive it or it can
receive the data but cannot send the data.
• This transmission mode is not very popular as mainly

Simplex Mode communications require the two-way exchange of data.


• The radio station is a simplex channel as it transmits the signal
to the listeners but never allows them to transmit back.
• Keyboard and Monitor are the examples of the simplex mode as
a keyboard can only accept the data from the user and monitor
can only be used to display the data on the screen.
• In a Half-duplex channel, direction can be reversed, i.e., the station can
transmit and receive the data as well.
• Messages flow in both the directions, but not at the same time.
• The entire bandwidth of the communication channel is utilized in one
direction at a time.

Half-Duplex • In half-duplex mode, it is possible to perform the error detection, and if


any error occurs, then the receiver requests the sender to retransmit

Mode the data.


• A Walkie-talkie is an example of the Half-duplex mode. In Walkie-talkie,
one party speaks, and another party listens. After a pause, the other
speaks and first party listens. Speaking simultaneously will create the
distorted sound which cannot be understood.
• In Full duplex mode, the communication is bi-directional, i.e., the
data flow in both the directions.
• Both the stations can send and receive the message simultaneously.
• Full-duplex mode has two simplex channels. One channel has traffic
moving in one direction, and another channel has traffic flowing in
the opposite direction.

Full Duplex • The Full-duplex mode is the fastest mode of communication


between devices.

Mode • The most common example of the full-duplex mode is a telephone


network. When two people are communicating with each other by
a telephone line, both can talk and listen at the same time.
Data
Transmission
- Types
Data Transmission – Serial
and Parallel Transmission
There are two methods used for
transferring data between
computers which are given below:
1. Serial Transmission
2. Parallel Transmission
Serial Transmission
• In Serial Transmission, data-bit
flows from one computer to another
computer in bi-direction. In this
transmission, one bit flows at one
clock pulse. In Serial Transmission,
8 bits are transferred at a time
having a start and stop bit.
Parallel Transmission

• In Parallel Transmission, many bits


are flow together simultaneously
from one computer to another
computer.
• Parallel Transmission is faster than
serial transmission to transmit the
bits. Parallel transmission is used
for short distance.
SlNo Synchronous Asynchronous
Transmission Transmission
In this type, a single
In this type, multiple
communication link is
1. parallels links used to
used to transfer data from
transmit the data
one end to another
In serial transmission, In Parallel Transmission,

Serial v/s
2. data(bit) flows in bi- data flows in multiple
direction. lines.
Serial Transmission is Parallel Transmission is

Parallel
3.
cost-efficient. not cost-efficient.
In serial transmission, In Parallel Transmission,
4. one bit transferred at one eight bits transferred at

Transmission 5.
clock pulse.
Serial Transmission is
slow in comparison of
one clock pulse.
Parallel Transmission is
fast in comparison of
Parallel Transmission. Serial Transmission.
Sl Parallel
No Serial Transmission Transmission
Generally, Serial Generally, Parallel
6. Transmission is used for Transmission is used for
long-distance. short distance.

The circuit used in


The circuit used in Serial
7. Parallel Transmission is

Serial v/s
Transmission is simple.
relatively complex.

Serial Transmission is full Parallel Transmission is

Parallel 8.
duplex as sender can
send as well as receive
the data
half-duplex since the
data is either send or
receive

Transmission 9.
Converters are required
in a serial transmission to
No converters are
required in Parallel
convert the data between
Transmission
internal and parallel form

Serial transmission is Parallel transmission is


10. reliable and unreliable and
straightforward. complicated.
Data Transmission –
Synchronous and
Asynchronous
• Synchronous Transmission
• In Synchronous Transmission, data is
sent in the form of blocks or frames.
• This transmission is the full-duplex
type. Between sender and receiver,
synchronization is compulsory.
• In Synchronous transmission, There is
no time gap present between data.
• It is more efficient and more reliable
than asynchronous transmission to
transfer a large amount of data.
Synchronous Transmission
• Both the sender and receiver are
synchronized with a common clock signal.
• This means they operate at the same
speed and know exactly when to send and
receive data.
• Data is sent in a continuous stream, with
each byte or chunk of data following the
previous one without any gaps.
• It’s efficient for sending large amounts of
data quickly because there’s less overhead
(extra bits) needed to start and stop the
transmission.
Synchronous Transmission
Examples
• Chat Rooms
• Telephonic Conversations
• Video Conferencing
Asynchronous Transmission
• In Asynchronous Transmission, data is sent in
form of byte or character.
• This transmission is the half-duplex type
transmission. In this transmission start bits
and stop bits are added with data.
• It does not require synchronization.
• Asynchronous transmission is like sending
individual text messages without knowing
exactly when the other person will read them.
Asynchronous
Transmission
• The sender and receiver do
not share a common clock
signal. Instead, data is sent
one byte or character at a
time, with start and stop bits
indicating the beginning and
end of each byte.
• Each piece of data is sent
independently, with gaps in
between, allowing the
receiver to process each byte
as it arrives.
• It’s flexible and simpler to
implement, especially useful
for communications where
data is sent intermittently.
Asynchronous Transmission
Examples
• Email
• Forums
• Letters
Synchronous v/s Asynchronous Transmission
SlNo Synchronous Transmission Asynchronous Transmission
1 In Synchronous transmission, data is In Asynchronous transmission, data is sent in
sent in form of blocks or frames. form of bytes or characters.
2 Synchronous transmission is fast. Asynchronous transmission is slow.
3 Synchronous transmission is costly. Asynchronous transmission is economical.
4 In Synchronous transmission, there In Asynchronous transmission, there is a gap
is no gap present between data. present between data.
5 Errors are detected and corrected in Errors are detected and corrected when the data
real time. is received.
6 In this transmission, users have to Here, users do not have to wait for the completion
wait till the transmission is complete of transmission in order to get a response from
before getting a response back from the server.
the server.
Multiplexing

• Multiplexing is a technique used to combine


and send the multiple data streams over a
single medium. The process of combining the
data streams is known as multiplexing and
hardware used for multiplexing is known as a
multiplexer.
• The basic aim of the Multiplexing is to share
an expensive resource by putting-up multiple
signals on the same channel.
• Multiplexing technique is widely used in
telecommunications in which several telephone
calls are carried through a single wire.
• The 'n' input lines are transmitted through a
multiplexer and multiplexer combines the signals to
Multiplexing form a composite signal.
• The composite signal is passed through a
Demultiplexer and demultiplexer separates a signal to
component signals and transfers them to their
respective destinations.
Multiplexing

Advantages
• More than one signal can be sent over a
single medium.
• The bandwidth of a medium can be
utilized effectively.
Multiplexing
Classification of Multiplexing Techniques
Frequency Division
Multiplexing(FDM)

• Frequency division
multiplexing is defined as a
type of multiplexing where the
bandwidth of a single physical
medium is divided into a
number of smaller,
independent frequency
channels.
FDM
FDM
FDM
FDM

• A guard band in Frequency Division


Multiplexing (FDM) is a small frequency
range that is intentionally left unused
between adjacent frequency channels.
• Its primary purpose is to prevent
interference between these channels,
ensuring that the signals transmitted in
neighboring frequency bands do not
overlap or interfere with each other.
FDM
• Advantages Of FDM:
• FDM is used for analog signals.
• FDM process is very simple and easy modulation.
• Many signals can be sent through an FDM
simultaneously.
• It does not require any synchronization between sender
and receiver.
• Disadvantages Of FDM:
• FDM technique is used only when low-speed channels
are required.
• It suffers the problem of crosstalk.
• Many modulators are required.
• It requires a high bandwidth channel.
• Applications Of FDM:
• FDM is commonly used in TV networks.
• It is used in FM and AM broadcasting.
Wavelength Division
Multiplexing(WDM)
• Wavelength Division Multiplexing is same as FDM except that the optical
signals are transmitted through the fibre optic cable.
• WDM is used on fibre optics to increase the capacity of a single fibre.
• It is used to utilize the high data rate capability of fibre optic cable.
• It is an analog multiplexing technique.
• Optical signals from different source are combined to form a wider band of
light with the help of multiplexer.
• At the receiving end, demultiplexer separates the signals to transmit them to
their respective destinations.
• Multiplexing and Demultiplexing can be achieved by using a prism.
• Prism can perform a role of multiplexer by combining the various optical
signals to form a composite signal, and the composite signal is transmitted
through a fibre optical cable.
• Prism also performs a reverse operation, i.e., demultiplexing the signal.
Wavelength Division Multiplexing(WDM)
WDM
WDM
• Advantages of WDM
1. WDM is a quite simple technique.
2. The optical link provides greater bandwidth.
3. It allows secured transmission of optical signal.
4. This technique increases the signal carrying capacity of the system.
• Disadvantages of WDM
1. The presence of optical component increases the overall cost of the
system.
2. Proper wavelength spacing must be required otherwise it will lead to
signal interference
Applications
1. Telecommunications networks
2. Internet Service Providers(ISPs)
3. Optical Access Networks
4. Military and Defense Communication Systems.
Time Division
Multiplexing(TDM)
• It is a digital technique.
• In Time Division Multiplexing technique, the total time
available in the channel is distributed among different
users. Therefore, each user is allocated with different
time interval known as a Time slot at which data is to be
transmitted by the sender.
• A user takes control of the channel for a fixed amount of
time.
• In Time Division Multiplexing technique, data is not
transmitted simultaneously rather the data is
transmitted one-by-one.
• In TDM, the signal is transmitted in the form of frames.
Frames contain a cycle of time slots in which each
frame contains one or more slots dedicated to each
user.
TDM
TDM

• TDM is divided into


1. Synchronous TDM
2. Statistical TDM(Asynchronous TDM)
Synchronous TDM
• A Synchronous TDM is a technique in
which time slot is preassigned to every
device.
• In Synchronous TDM, each device is
given some time slot irrespective of the
fact that the device contains the data or
not.
• If the device does not have any data,
then the slot will remain empty.
• In Synchronous TDM, signals are sent in
the form of frames. Time slots are
organized in the form of frames. If a
device does not have data for a
particular time slot, then the empty slot
will be transmitted.
TDM
Synchronous TDM
In the above figure, the Synchronous TDM technique is implemented. Each device is
allocated with some time slot. The time slots are transmitted irrespective of whether the
sender has data to send or not.
Statistical TDM(Asynchronous TDM)
• An asynchronous TDM is also known as Statistical TDM.
• An asynchronous TDM is a technique in which time slots are not fixed as in the case of
Synchronous TDM.
• Time slots are allocated to only those devices which have the data to send. Therefore, we
can say that Asynchronous Time Division multiplexor transmits only the data from active
workstations.
• An asynchronous TDM technique dynamically allocates the time slots to the devices.
• In Asynchronous TDM, total speed of the input lines can be greater than the capacity of
the channel.
• Asynchronous Time Division multiplexer accepts the incoming data streams and creates a
frame that contains only data with no empty slots.
Statistical TDM(Asynchronous TDM)
• The difference between Asynchronous TDM and Synchronous TDM is that many slots in
Synchronous TDM are unutilized, but in Asynchronous TDM, slots are fully utilized. This
leads to the smaller transmission time and efficient utilization of the capacity of the
channel.
• In Synchronous TDM, if there are n sending devices, then there are n time slots. In
Asynchronous TDM, if there are n sending devices, then there are m time slots where m
is less than n (m<n).
• The number of slots in a frame depends on the statistical analysis of the number of input
lines.
Statistical TDM(Asynchronous TDM)
Statistical TDM(Asynchronous TDM)
Advantages
• High Capacity
• Simple Implementation
• Precise Time Synchronization
Disadvantages
• Inefficient use of Bandwidth
• High Implementation Cost
• Vulnerable to timing jitter
Applications
• Telecommunications
• Digital Subscriber Line(DSL)
• Cellular Neworks
• Radar Systems
Switching
• In computer
networking, Switching is the
process of transferring data packets
from one device to another in a
network, or from one network to
another, using specific devices
called switches.
• In large networks, there can be
multiple paths from sender to
receiver. The switching technique
will decide the best route for data
transmission.
Switching
• Switching in computer networks
is a crucial technique used to
route data from a source to a
destination efficiently.
• It involves the process of
moving packets or frames of
data through a network, from
one device to another, by
selecting a specific path.
• Switching plays a vital role in
both wired and wireless
networks, ensuring that data
reaches its intended destination
accurately and promptly.
Switching
• A switch is a dedicated piece of
computer hardware that facilitates the
process of switching i.e., incoming
data packets and transferring them to
their destination.
• A switch works at the Data Link
layer of the OSI Model.
• A switch primarily handles the
incoming data packets from a source
computer or network and decides the
appropriate port through which the
data packets will reach their target
computer or network.
Switching
Fig: Switched Network
Switching
Circuit Switching
• Circuit switching is a method of
communication used primarily in
traditional telephony systems, where
a dedicated communication path or
circuit is established between two
parties before any data or voice is
transmitted.
• This dedicated circuit remains open
for the entire duration of the
communication session, ensuring a
continuous and reliable connection.
Circuit Switching
Basic Concepts:
Dedicated Path: In circuit switching, a specific path
consisting of a series of connected switches and
physical links is established between the source and
the destination before any data transmission begins.
This path is exclusively reserved for the duration of
the communication session.
Continuous Transmission: Once the circuit is
established, data (usually voice or video) is
transmitted continuously over this path without
interruption. The data is sent as a continuous
stream, and the circuit remains active until the
communication session ends.
Connection-Oriented: Circuit switching is a
connection-oriented communication method. This
means that a connection must be established before
any actual data transfer can occur, and the
connection must be maintained throughout the
session.
Circuit Switching

Phases in circuit switching:

• setup phase: the resources need to be


reserved during the setup phase;
• Data transfer Phase: the resources
remain dedicated for the entire
duration of data transfer
• teardown phase: Termination
Circuit Switching
Circuit Switching
Advantages:
•A well defined and dedicated path exists for the data to travel.
•There is no header overhead.
•There is no waiting time at any switch and the data is transmitted without any delay.
•Data always reaches the other end in order.
•No re-ordering is required.
Disadvantages:
•The channel is blocked for two ends only.
•It is inefficient in terms of utilization of system resources.
•The time required for establishing the circuit between the two ends is too long.
•Dedicated channels require more bandwidth.
•It is more expensive than other switching techniques.
•Routing decisions can not be changed once the circuit is established
Applications
• Traditional Telephony (PSTN): The most common
application of circuit switching is in traditional
public switched telephone networks (PSTN),
where a dedicated circuit is established for each
phone call.
Circuit • Private Branch Exchanges (PBX): Circuit
switching is also used in private branch

Switching exchanges, which manage internal phone systems


within businesses or organizations.
• Dedicated Leased Lines: Circuit-switched
dedicated lines, such as T1 or E1 lines, are used
for consistent, high-quality connections between
two locations.
Message Switching
• Message switching is an early technique used in telecommunications networks
where entire messages are treated as independent units and transmitted from one
point to another through a network.
• Unlike circuit switching, where a dedicated path is established for the entire
duration of the communication, message switching stores the entire message at
each intermediate node (router or switch) before forwarding it to the next node.
• This method is known as "store-and-forward" switching.
• Several intermediate nodes transfer data and ensure that the message reaches its
destination. Message-switched data networks are hence called hop-by-hop
systems.
Message Switching
• Store and forward – The intermediate nodes have the responsibility of
transferring the entire message to the next node. Hence, each node must
have storage capacity. A message will only be delivered if the next hop
and the link connecting it are both available, otherwise, it’ll be stored
indefinitely. A store-and-forward switch forwards a message only if
sufficient resources are available and the next hop is accepting data. This
is called the store-and-forward property.
• Message delivery – This implies wrapping the entire information in a
single message and transferring it from the source to the destination
node. Each message must have a header that contains the message
routing information, including the source and destination.
Message
Switching
Advantages
• Efficient Use of Resources: Since there is no need for a dedicated
path, network resources can be shared among multiple users. This leads
to more efficient use of bandwidth and switching equipment.
• Flexibility: Message switching allows for dynamic routing, making it
adaptable to changing network conditions, such as congestion or node
failures.
• No Setup Time: Unlike circuit switching, there is no need to establish a
connection before transmission, reducing the overall delay in initiating

Message
communication.

Disadvantages
• High Latency: The store-and-forward mechanism introduces

Switching
significant delays, especially for long messages, as each message must
be stored and then forwarded at each node. This makes message
switching unsuitable for real-time applications like voice or video
communication.
• Storage Requirements: Each intermediate node must have sufficient
storage capacity to hold entire messages, which can be problematic if the
messages are large or if the network is handling many messages
simultaneously.
• Complexity in Routing: Dynamic routing requires each node to make
independent routing decisions, which can complicate the network's
operation and require more sophisticated algorithms.
Applications
• Historical Use in Telegraphy: Message switching
was widely used in early telegraph networks,
where messages (telegrams) were transmitted
between telegraph offices in a store-and-forward
manner.

Message • Email Systems: Early email systems and some


modern messaging systems use concepts similar
to message switching, where entire messages are
Switching stored on mail servers before being delivered to
the recipient.
• File Transfer Systems: In some file transfer
systems, files (treated as messages) are stored on
intermediate servers before being sent to the final
destination.
Packet Switching
• Message is broken into individual chunks
known as packets.
• Each packet is sent individually
• Each packet will have source and destination
IP address with sequence number.
• Sequence number will help the receiver to
❖Reorder the packets.
❖Detect missing packets.
❖Send acknowledgements.
Packet Switching
Packet Switching

• If any packet is missing or corrupted,


then the message will be sent to resend
the message.
• If the correct order of the packets is
reached, then the acknowledgment
message will be sent.
Packet Switching

• Types of Packet Switching


➢Datagram Packet Switching
➢Virtual Circuit Switching
Packet Switching
Virtual Circuit Switching (Connection-
Oriented Switching)
• Virtual Circuit Switching is also known as
connection-oriented switching.
• In the case of Virtual circuit switching, a
preplanned route is established before the
messages are sent.
• Call request and call accept packets are used to
establish the connection between sender and
receiver.
• In this case, the path is fixed for the duration of
a logical connection.
Virtual Circuit Switching
Virtual Circuit
Switching
• In the above diagram, A and B are the sender and
receiver respectively. 1 and 2 are the nodes.
• Call request and call accept packets are used to
establish a connection between the sender and
receiver.
• When a route is established, data will be
transferred.
• After transmission of data, an acknowledgment
signal is sent by the receiver that the message has
been received.
• If the user wants to terminate the connection, a
clear signal is sent for the termination.
Packet Switching
Datagram Packet Switching(Connectionless Packet
Switching)
• It is a packet switching technology in which packet is
known as a datagram, is considered as an independent
entity. Each packet contains the information about the
destination and switch uses this information to forward
the packet to the correct destination.
• The packets are reassembled at the receiving end in
correct order.
• In Datagram Packet Switching technique, the path is not
fixed.
• Intermediate nodes take the routing decisions to forward
the packets.
• Datagram Packet Switching is also known as
connectionless switching.
Datagram Packet Switching
Packet Switching
• Advantages
• Packets are rerouted in case of any problems (e.g. busy links or disabled links). This ensures reliable
communication.
• It is more efficient for data transmission as it does not require path to be established between the sender and
receiver and data are transmitted immediately.
• Many users can share the same channel simultaneously. Hence packet switching makes use of available
bandwidth efficiently.
• Disadvantages
• Packet switching network can not be used in applications requiring very little delay and higher quality of
service e.g. reliable voice calls.
• Protocols used in the packet switching are complex and require high initial implementation costs.
• If the network becomes overloaded, packets are delayed or discarded or dropped. This leads to
retransmission of lost packets by the sender. This often leads to loss of critical information if errors are not
recovered.
Packet Switching
Applications
• The Internet
• Local Area Networks (LANs)
• VoIP (Voice over IP)
Datagram V/s Virtual Circuit Network

Datagram Network Virtual Circuit Network


1 Not required Required
2 Data packets reach the destination in random order, which Packets reach in order to the destination as data follows the
means they need not reach in the order in which they were same path.
sent out.
3 Datagram networks are not as reliable as Virtual Circuits. Virtual Circuits are highly reliable.
4 Efficiency high, delay more Efficiency low and delay less
5 A Datagram based network is a true packet switched A virtual circuit network uses a fixed path for a particular
network. There is no fixed path for transmitting data. session, after which it breaks the connection and another path
has to be set up for the next session.
6 Widely used in Internet Used in X.25, ATM(Asynchronous Transfer Mode)
Circuit Switching v/s Message Switching
Slno Circuit Switching Message Switching
1 Circuit Switching is done by setting a In message Switching, data is first stored by one node
physical path between two systems. then forward to another node to transfer the data to
another system.
2 In circuit switching, data is not stored. In message Switching, data is first stored, then
forwarded to the next node.
3 Circuit Switching needs a dedicated Message switching does not need a dedicated
physical path that’s why the messages physical path and on Message switching, The
need not be addressed. messages are addressed independently.
4 Circuit Switching is costlier than message The cost of message switching is less than circuit
Switching. switching.
5 The transmission capacity of circuit while the transmission capacity of message switching
switching is very low. is high.
6 In a circuit switching, Messages need not In message switching, Messages are addressed as
be addressed as there is one dedicated independent routes are established.
path.
PART II DATA LINK LAYER
DataLink Layer Design
Issues
• The data link layer uses the services of the
physical layer below it to send and receive bits
over communication channels that may lose data.
• It has a number of functions, including:
1. Providing a well-defined service interface to the
network layer.
2. Framing sequences of bytes as a self-
contained segments.
3. Detecting and correcting transmission errors.
4. Regulating the flow of data so that slow
recievers are not swamped by fast senders.
DataLink Layer Design
Issues

• To accomplish these goals, the data


link layer takes the packets it gets
from the network layer and
encapsulates them into frames for
transmission.
• Each frame consists of a frame
header, a payload field for holding the
packet and a frame trailer.
DataLink
Layer Design
Issues
DataLink Layer Design Issues
1. Services Provided to the Network
Layer.
• In the OSI Model, each layer uses
the services of the layer below it
and provides services to the layer
above it.
• The data link layer uses the
services offered by the physical
layer.
• The primary function of this layer
is to provide a well defined service
interface to network layer above it.
Services Provided to
the Network Layer

The types of services provided can


be of three types −
1. Unacknowledged connectionless service
2. Acknowledged connectionless service
3. Acknowledged connection - oriented
service
Unacknowledged
connectionless service
• Frames are sent from the source
to the destination without any
acknowledgment of receipt.
• There is no established or
released logical connection,
and if a frame is lost due to
errors, no recovery attempt is
made at this layer.
Example: Ethernet is a typical
protocol that uses this service,
suitable for low error rates and
real-time traffic like voice where
delays are worse than errors.
Acknowledged
Connectionless Service:
• Each frame sent is
acknowledged individually,
allowing the sender to know
whether a frame was received
correctly or lost.
• If a frame is not acknowledged
within a set time, it can be
retransmitted.
Example: WiFi (802.11) uses this
service, useful for unreliable
channels like wireless networks
where acknowledgments help
ensure frames are received
properly.
Acknowledged connection
- oriented service
• A logical connection is established between the
source and destination before data transfer
begins. Frames are numbered and guaranteed to
be received exactly once and in the correct
order. This service provides a reliable bit stream
to the Network Layer.
1. Phases:Connection Establishment: Both sides
initialize necessary variables and counters.
2. Data Transfer: Frames are transmitted over the
established connection.
3. Connection Release: Resources and variables
used for the connection are freed.
Example: This service is suited for long, unreliable
links like satellite channels or long-distance
telephone circuits, where ensuring frame order and
reliability is crucial.
DataLink Layer Design Issues
2. Framing
• The data link layer encapsulates
each data packet from the network
layer into frames that are then
transmitted.
• A frame has three parts, namely
• Frame Header
• Payload field that contains the data packet
from network layer
• Trailer
Frame Delimiters:
o Frames need to be distinguishable from each other
in a continuous stream of data. To achieve this,
specific patterns or sequences of bits, known as
Key delimiters, are used to mark the beginning and end
of a frame.
Concepts in o Common methods include:
Framing ▪ Character Count: The frame header contains

the number of characters in the frame.


▪ Starting and Ending Characters (Flag Bytes):

Special characters (like 01111110 in HDLC


protocol) mark the start and end of a frame.
▪ Bit Stuffing: A technique where additional bits

are inserted into the data to ensure that the


delimiter pattern does not appear in the middle
of the data.
DataLink Layer Design
Issues
3. Error Control
• At the sending node, a frame in a
data-link layer needs to be changed
to bits, transformed to
electromagnetic signals, and
transmitted through the transmission
media. At the receiving node,
electromagnetic signals are received,
transformed to bits, and put together
to create a frame.
• Since electromagnetic signals are
susceptible to error, a frame is
susceptible to error. The error needs
first to be detected, after detection it
needs to be either corrected by the
receiver node or discarded and
retransmitted by the sending node.
Error Control

• The data link layer ensures


error free link for data
transmission. The issues it
caters to with respect to error
control are −
➢ Dealing with transmission errors
➢ Sending acknowledgement frames in
reliable connections
➢ Retransmitting lost frames
➢ Identifying duplicate frames and
deleting them
➢ Controlling access to shared channels
in case of broadcasting
DataLink Layer Design
Issues
4. Flow Control
Flow control allows the two
nodes to communicate with
each other and work at different
speeds.
The data link layer monitors the
flow control so that when a fast
sender sends data, a slow
receiver can receive the data at
the same speed. Because of this
flow control technique is used.
There are two methods are used
for flow control, which are as
follows −
➢ Feedback Based Flow Control
➢ Rate Based Flow Control
Flow Control

Feedback based flow control


• In feedback-based flow control, the
sender station delivers data or frame
information to the receiving station. This
informs the receiving station of the size
and speed with which the data will be
transmitted.
• The receiver transmits data back to the
sender after receiving it. The data
transmitted by the receiver to the sender
includes information about how the
receiver processes data and whether it is
ready to accept a specific amount of data.
Flow Control
Rate-based flow control
• The rate-based flow control uses an
inbuilt mechanism to alert the
sender.
• When the sender delivers data to
the receiver, and the receiver is
unable to receive it at that high rate,
the built-in mechanism kicks in and
limits or restricts the overall rate at
which the data is arriving. Unlike the
feedback-based technique, this one
does not necessitate any specific
acknowledgement from the sender.
Error Detection And Correction
• When data is transmitted from one device to another device, the
system does not guarantee whether the data received by the device is
identical to the data transmitted by another device.
• An Error is a situation when the message received at the receiver end
is not identical to the message transmitted.
Error Detection And Correction
• Types of Errors
Single bit Error
A single-bit error refers to a type of data
transmission error that occurs when one
bit (i.e., a single binary digit) of a
transmitted data unit is altered during
transmission, resulting in an incorrect or
corrupted data unit.
Error Detection And Correction
• Multi-bit error
A multiple-bit error is an error type that
arises when more than one bit in a data
transmission is affected. Although
multiple-bit errors are relatively rare
when compared to single-bit errors, they
can still occur, particularly in high-noise
or high-interference digital environments.
Error Detection And Correction
• Burst Error
When several consecutive bits are flipped
mistakenly in digital transmission, it
creates a burst error. This error causes a
sequence of consecutive incorrect values.
Error Detection Techniques
• The main techniques for detecting errors in the frames are:
➢Parity Check
➢Check Sum
➢Cyclic Redundancy Check(CRC)
Parity Check
• Parity Check is of two types
• 1. Simple Parity Check
• 2. Two dimensional parity check
Simple Parity Check
• The simple parity check is done by adding an extra bit,
called parity bit to the data to make a number of 1s
either even in case of even parity or odd in case of odd
parity.
• While creating a frame, the sender counts the number
of 1s in it and adds the parity bit in the following way
➢In case of even parity: If a number of 1s is even then parity bit value
is 0. If the number of 1s is odd then parity bit value is 1.
➢In case of odd parity: If a number of 1s is odd then parity bit value is
0. If a number of 1s is even then parity bit value is 1.
Simple Parity Check
• On receiving a frame, the receiver
counts the number of 1s in it. In
case of even parity check, if the
count of 1s is even, the frame is
accepted, otherwise, it is rejected.
A similar rule is adopted for odd
parity check.
• The parity check is suitable for
single bit error detection only.
Two-dimensional Parity Check
• Two-dimensional Parity
check bits are calculated for
each row, which is equivalent to
a simple parity check bit. Parity
check bits are also calculated for
all columns, then both are sent
along with the data. At the
receiving end, these are
compared with the parity bits
calculated on the received data.
CheckSum
• Checksum error detection is a method used to identify errors in
transmitted data. The process involves dividing the data into
equally sized segments and using a 1’s complement to
calculate the sum of these segments. The calculated sum is
then sent along with the data to the receiver. At the receiver’s
end, the same process is repeated and if all zeroes are
obtained in the sum, it means that the data is correct.
CheckSum
• Checksum – Operation at Sender’s Side
• Firstly, the data is divided into k segments each of m bits.
• On 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.
CheckSum
• Checksum – Operation at Receiver’s Side
• At the receiver’s end, all received segments are added using
1’s complement arithmetic to get the sum. The sum is
complemented.
• If the result is zero, the received data is accepted; otherwise
discarded.
CheckSum - Flowchart
CheckSum - Example
Cyclic Redundancy Check(CRC)
Steps
• 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.
• 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.
Cyclic
Redundancy
Check(CRC)
Cyclic Redundancy Check(CRC)- Example
• 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.
• CRC remainder replaces the appended string
of 0s at the end of the data unit, and the final
string would be 11100111 which is sent
across the network.
Cyclic Redundancy Check(CRC)- Example
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-Correcting Codes
• Error Correction codes are used to detect and correct the errors when
data is transmitted from the sender to the receiver.
• Error Correction can be handled in two ways:
• Backward error correction: Once the error is discovered, the receiver
requests the sender to retransmit the entire data unit.
• Forward error correction: In this case, the receiver uses the error-
correcting code which automatically corrects the errors.
Error Correcting Codes – Hamming Code
• The 7-bit Hamming code is a type of error-correcting code that can detect and correct single-
bit errors in a block of data.
• It works by adding parity bits to the data bits, which allows the detection and correction of
errors when the data is received.
(refer the separate word file for more explanations)

You might also like