0% found this document useful (0 votes)
4 views

Computer Networks Notes

The document provides comprehensive notes on computer networks, covering definitions, goals, structures, types of networks, topologies, and protocols. It details various network types such as LAN, WAN, and VPN, as well as the OSI and TCP/IP models. Additionally, it discusses design issues, connection-oriented vs. connectionless services, and applications of computer networks.

Uploaded by

ness.fit.rizz
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Computer Networks Notes

The document provides comprehensive notes on computer networks, covering definitions, goals, structures, types of networks, topologies, and protocols. It details various network types such as LAN, WAN, and VPN, as well as the OSI and TCP/IP models. Additionally, it discusses design issues, connection-oriented vs. connectionless services, and applications of computer networks.

Uploaded by

ness.fit.rizz
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

Computer Networks Notes

➢​ Introduction to Computer Networks


➢​ Definition
➢​ Goals of Computer Networks
➢​ Structure of Computer Networks
➢​ Broadcast and Point-to-Point Networks
➢​ Broadcast Networks
➢​ Point-to-Point Networks
➢​ Network Topology and Its Various Types
➢​ Definition of Network Topology
➢​ Categories of Network Topology
➢​ Types of Network Topologies
➢​ Detailed Explanation of Each Topology
➢​ Types of Networks
➢​ 1. Local Area Network (LAN)
➢​ 2. Personal Area Network (PAN)
➢​ 3. Metropolitan Area Network (MAN)
➢​ 4. Wide Area Network (WAN)
➢​ 5. Campus Area Network (CAN)
➢​ 6. Storage Area Network (SAN)
➢​ 7. Backbone Network
➢​ 8. Virtual Private Network (VPN)
➢​ Network Software
➢​ Design Issues for the Layers
➢​ Connection-Oriented vs. Connectionless Service
➢​ Connection-Oriented Service
➢​ Connectionless Service
➢​ Applications of Computer Networks
➢​ Protocols and Standards
➢​ The OSI Reference Model
➢​ Layers of the OSI Model
➢​ The TCP/IP Protocol Suite
➢​ Layers of the TCP/IP Model
➢​ Comparison Between OSI and TCP/IP Reference Models
➢​ Key Differences
➢​ Physical Layer
➢​ Functions of the Physical Layer
➢​ Analog Signals vs. Digital Signals
➢​ Transmission Impairment
➢​ Data Rate Limits
➢​ Performance
➢​ Data Transmission Media
➢​ Guided Transmission Media
➢​ Unguided Transmission Media
➢​ Electromagnetic Spectrum
➢​ Digital Modulation and Multiplexing
➢​ Public Switched Telephone Networks (PSTN)
➢​ Switching: Circuit Switching, Message Switching, and Packet Switching
➢​ Circuit Switching
○​ Phases of Circuit Switching

1
○​ Characteristics
○​ Applications
➢​ Message Switching
○​ Characteristics
○​ Applications
➢​ Packet Switching
○​ Characteristics
○​ Applications
➢​ Comparison Summary
➢​ Data Link Layer
➢​ Functions of the Data Link Layer
➢​ Sub-layers of the Data Link Layer
➢​ Data Link Control
➢​ Framing
➢​ Flow Control
➢​ Error Control
➢​ High-Level Data Link Control (HDLC)
➢​ Point-to-Point Protocol (PPP)
➢​ Channel Allocation Problem
➢​ Multiple Access Methods
➢​ Channelization Techniques
➢​ Transport Layer
➢​ Functions of the Transport Layer
➢​ Key Protocols
➢​ Elements of Transport Protocols
➢​ 1. Addressing
➢​ 2. Establishing and Releasing Connection
➢​ 3. Flow Control & Buffering
➢​ 4. Error Control
➢​ 5. Multiplexing & De-multiplexing
➢​ 6. Crash Recovery
➢​ User Datagram
➢​ UDP Operations
➢​ Uses of UDP
➢​ Remote Procedure Call (RPC)

Introduction: Computer Network: Definition, Goals, Structure; Broadcast and PointTo-Point


Networks; Network Topology and their various Types; Types of Network, Network software,
Design issues for the layers, Connection-oriented vs. Connectionless service, Applications
of Computer network, Protocols and Standards, The OSI Reference Model, The TCP/IP
Protocol suite, Comparison between OSI and TCP/IP Reference model

2
Introduction to Computer Networks

Definition
A computer network is a system that connects multiple independent computers, enabling them
to share information and resources. This interconnection can occur through various media,
including wired connections (like copper wires or optical fibers) and wireless methods (such as
radio waves or satellite links). The primary purpose of a computer network is to facilitate
communication and data exchange among users and devices.

Goals of Computer Networks


The goals of computer networks are critical in guiding their design and implementation. Key
objectives include:

-​ Resource Sharing: Networks allow multiple users to access shared resources such as
printers, files, and applications, which enhances efficiency and reduces costs[1][5].
-​ Reliability: High reliability ensures that resources remain accessible even in the event of
hardware failures. This is often achieved through redundancy, where data is replicated
across multiple machines[2][3].
-​ Performance: Networks are designed to minimize latency and maximize throughput,
ensuring that applications run smoothly and respond quickly to user requests[1][3].
-​ Security: Protecting data from unauthorized access is paramount. Security measures
include firewalls, encryption, and authentication protocols to safeguard sensitive
information[1][2].
-​ Scalability: Networks must be able to adapt to changing demands, accommodating
growth in users and devices without compromising performance[2][3].

Structure of Computer Networks


The structure of a computer network refers to its architecture, which includes the arrangement of
nodes (computers and devices), the connections between them, and the protocols governing
communication. Common network topologies include:

-​ Bus Topology: All devices share a single communication line. It's simple but can be less
reliable due to a single point of failure.
-​ Star Topology: All devices connect to a central hub or switch. This topology is more
reliable since failure in one connection does not affect others.
-​ Ring Topology: Each device connects to two others, forming a circular pathway for
data. While efficient, a failure in any single device can disrupt the entire network.
-​ Mesh Topology: Every device connects directly to multiple other devices. This provides
high redundancy and reliability but can be complex and costly to implement.

3
Broadcast and Point-to-Point Networks

Broadcast Networks
In a broadcast network, all nodes share a common communication medium. When one node
sends a message, it is received by all other nodes on the network. Broadcast networks are
typically easier to set up but can become congested with high traffic volumes.

Characteristics:

-​ Simple communication model.


-​ Suitable for small networks or applications where all nodes need access to the same
data.
-​ Examples include traditional Ethernet networks.

Point-to-Point Networks
In contrast, a point-to-point network establishes a direct link between two nodes. This type of
network is often used for dedicated connections where high bandwidth and low latency are
required.

Characteristics:

-​ Provides a secure and efficient communication channel.


-​ Ideal for scenarios such as connecting two offices or linking devices directly.
-​ Examples include leased lines or direct fiber connections.

Network Topology and Its Various Types

Definition of Network Topology


Network topology refers to the arrangement and interconnection of different elements, such as
nodes (computers, devices) and links (cables, wireless connections), within a computer network.
It defines how these components are organized and how data flows between them.
Understanding network topology is crucial for designing efficient and effective network
infrastructures.

Categories of Network Topology


Network topologies can be classified into two main categories:

4
-​ Physical Topology: This describes the actual physical layout of the network, including
how devices are interconnected through cables or wireless signals.
-​ Logical Topology: This focuses on the way data flows within the network, regardless of
the physical connections. It illustrates how devices communicate with each other.

Types of Network Topologies


There are several common types of network topologies, each with its own advantages and
disadvantages:

Topology Type Description Advantages Disadvantages

Bus Topology All devices share a - Easy to implement - Difficult to


single communication - Cost-effective troubleshoot
line (bus).
- Suitable for small - A failure in the bus
networks cable brings down
the entire network

Star Topology All devices connect to - Easy to manage - Central hub failure
a central hub or and troubleshoot can disrupt the entire
switch. network
- Failure of one
device does not - Requires more
affect others cabling than bus
topology

Ring Topology Each device - Equal access for all - A failure in any link
connects to two nodes can disrupt the entire
others, forming a network
circular pathway for - Data travels in a
data. predictable manner - Adding/removing
nodes can be
disruptive

Mesh Topology Every node is - High redundancy - Expensive due to


connected to every and reliability extensive cabling
other node, providing
multiple paths for - Excellent for critical - Complex to set up
data. applications and manage

Tree Topology A hybrid topology that - Scalable and - If the root node fails,
combines hierarchical the entire segment
characteristics of star goes down
and bus topologies.

5
Topology Type Description Advantages Disadvantages

- Easy to manage - More complex than


large networks bus or star topologies

Hybrid Topology Combines two or - Flexible and - Complex design can


more different scalable lead to management
topologies. challenges
- Can be designed
based on specific - Higher costs due to
needs mixed technologies

Detailed Explanation of Each Topology


1.​ Bus Topology

-​ In bus topology, all devices are connected to a single central cable known as the
bus. Data transmitted by any device travels along this cable until it reaches its
intended recipient.
-​ Use Cases: Commonly used in small networks due to its simplicity.

2.​ Star Topology

-​ In star topology, all nodes connect independently to a central hub or switch. This
structure allows for easy addition or removal of devices without disrupting the
network.
-​ Use Cases: Widely used in home and office networks.

3.​ Ring Topology

-​ Each device in a ring topology is connected in a circular configuration. Data


travels in one direction (or both directions in some cases) around the ring until it
reaches its destination.
-​ Use Cases: Often used in token ring networks where data integrity is crucial.

4.​ Mesh Topology

-​ Mesh topology can be fully meshed (where every node connects directly to every
other node) or partially meshed (where some nodes are interconnected). This
provides multiple pathways for data transmission.
-​ Use Cases: Ideal for critical applications like military communications or air traffic
control systems.

5.​ Tree Topology

6
-​ Tree topology is structured like a hierarchy with a root node branching out into
various levels of nodes. It combines characteristics of both star and bus
topologies.
-​ Use Cases: Suitable for large networks that require hierarchical organization.

6.​ Hybrid Topology

-​ Hybrid topology integrates multiple topology types to suit specific networking


needs, allowing flexibility and scalability.
-​ Use Cases: Commonly found in large organizations with diverse networking
requirements.

Types of Networks
Computer networks can be classified into several types based on their scale, purpose, and
technology. Here are the primary types:

1. Local Area Network (LAN)


-​ Description: Connects computers and devices within a limited geographic area, such as
a home, school, or office.
-​ Characteristics: High data transfer rates, low latency, and typically uses Ethernet
technology.
-​ Use Cases: Ideal for small organizations or residential settings.

2. Personal Area Network (PAN)


-​ Description: A small network that connects personal devices within a short range,
usually within 10 meters.
-​ Characteristics: Often uses Bluetooth or infrared technology.
-​ Use Cases: Connecting devices like smartphones, tablets, and laptops for personal use.

3. Metropolitan Area Network (MAN)


-​ Description: Covers a larger geographic area than a LAN but smaller than a WAN,
typically spanning a city.
-​ Characteristics: Can connect multiple LANs within a metropolitan region.
-​ Use Cases: Used by municipalities or large organizations to connect various buildings.

4. Wide Area Network (WAN)


-​ Description: A network that covers a broad area, potentially spanning countries or
continents.

7
-​ Characteristics: Utilizes various communication channels such as leased lines and
satellite links.
-​ Use Cases: Connecting branch offices of multinational corporations.

5. Campus Area Network (CAN)


-​ Description: A network that interconnects multiple LANs within a limited geographical
area, such as a university campus.
-​ Characteristics: Typically owned and managed by a single organization.
-​ Use Cases: Used in educational institutions to connect various departments and
facilities.

6. Storage Area Network (SAN)


-​ Description: A specialized network designed to provide access to consolidated
block-level data storage.
-​ Characteristics: High-speed network that connects storage devices to servers.
-​ Use Cases: Used in enterprise environments for efficient data storage management.

7. Backbone Network
-​ Description: A central part of a computer network that interconnects various networks
and sub-networks.
-​ Characteristics: High-capacity transmission lines that carry data between different
networks.
-​ Use Cases: Forms the core infrastructure of large organizations and the Internet.

8. Virtual Private Network (VPN)


-​ Description: A secure network that uses encryption to allow users to send and receive
data over shared or public networks as if they were directly connected to a private
network.
-​ Characteristics: Provides privacy and security over the Internet.
-​ Use Cases: Commonly used by remote workers to access corporate networks securely.

Network Software
Network software includes applications and protocols that facilitate communication between
devices on a network. This software can be categorized into:

-​ Network Operating Systems (NOS): Software that manages network resources and
allows devices to communicate (e.g., Windows Server, Linux).
-​ Protocols: Sets of rules governing data transmission (e.g., TCP/IP, HTTP).
-​ Network Management Software: Tools for monitoring and managing network
performance (e.g., SolarWinds).

8
Design Issues for the Layers
When designing networks based on layered architectures like OSI or TCP/IP, several issues
must be considered:

1.​ Interoperability: Ensuring different systems can work together seamlessly across
layers.
2.​ Scalability: Designing the network to accommodate growth in users and devices without
performance degradation.
3.​ Security: Implementing measures at each layer to protect against unauthorized access
and data breaches.
4.​ Performance Optimization: Balancing load across layers to maximize throughput and
minimize latency.

Connection-Oriented vs. Connectionless Service

Connection-Oriented Service
-​ Establishes a dedicated connection between sender and receiver before data
transmission begins.
-​ Guarantees delivery of packets in the same order they were sent (e.g., TCP).

Connectionless Service
-​ Sends packets without establishing a dedicated end-to-end connection.
-​ Does not guarantee delivery or order of packets (e.g., UDP).

Applications of Computer Networks


Computer networks support a wide range of applications, including:

1.​ File Sharing: Allows users to access shared files across the network.
2.​ Email Communication: Facilitates sending and receiving messages over the Internet.
3.​ Web Browsing: Enables access to websites and online services through browsers.
4.​ Streaming Services: Supports video and audio streaming applications like Netflix or
Spotify.
5.​ Remote Access: Allows users to connect to their work networks from remote locations.

Protocols and Standards


Protocols are essential for ensuring reliable communication over networks. Key protocols
include:

9
1.​ Transmission Control Protocol (TCP): Ensures reliable transmission of data with error
correction.
2.​ Internet Protocol (IP): Responsible for addressing and routing packets across
networks.
3.​ Hypertext Transfer Protocol (HTTP): Used for transferring web pages on the Internet.

Standards ensure interoperability among different systems and devices, with organizations like
IEEE and IETF defining these standards.

The OSI Reference Model


The OSI (Open Systems Interconnection) Reference Model is a conceptual framework used
to understand and implement network communication across diverse systems. It divides the
communication process into seven distinct layers, each with specific functions and
responsibilities, facilitating interoperability between different networking technologies.

Layers of the OSI Model


1.​ Physical Layer: Deals with the physical connection between devices, transmitting raw
bitstreams over a physical medium (e.g., cables, radio frequencies).
2.​ Data Link Layer: Responsible for node-to-node data transfer and error
detection/correction. It packages data into frames.
3.​ Network Layer: Manages routing of data packets across the network. It uses logical
addressing (IP addresses) to determine the best path for data transmission.
4.​ Transport Layer: Ensures reliable data transfer through segmentation, flow control, and
error correction. Key protocols include TCP and UDP.
5.​ Session Layer: Manages sessions between applications, handling connection
establishment, maintenance, and termination.
6.​ Presentation Layer: Translates data formats, handles encryption/decryption, and
performs data compression.
7.​ Application Layer: Provides network services directly to end-user applications (e.g.,
HTTP for web browsing, SMTP for email).

The OSI model is essential for understanding how different networking protocols interact and
provides a standardized approach to networking.

The TCP/IP Protocol Suite


The TCP/IP (Transmission Control Protocol/Internet Protocol) suite is a set of
communication protocols used for the Internet and similar networks. It is more practical than the
OSI model and consists of four layers:

10
Layers of the TCP/IP Model
1.​ Application Layer: Corresponds to the OSI's application, presentation, and session
layers. It includes protocols like HTTP, FTP, SMTP, and DNS that enable user-level
applications to communicate over the network.
2.​ Transport Layer: Similar to the OSI transport layer, it ensures reliable or unreliable
delivery of messages using protocols like TCP (connection-oriented) and UDP
(connectionless).
3.​ Internet Layer: Equivalent to the OSI network layer, it handles packet forwarding
through routers using IP addresses.
4.​ Network Access Layer: Combines the functions of the OSI physical and data link
layers, dealing with hardware addressing and defining protocols for physical
transmission.

The TCP/IP suite is widely adopted due to its robustness and flexibility in supporting diverse
networking environments.

Comparison Between OSI and TCP/IP Reference Models


Feature OSI Model TCP/IP Model

Number of Layers Seven Four

Development Theoretical Practical

Layer Functions More distinct roles per layer Some layers combine
functions

Protocol Specification More detailed Less formalized

Usage Primarily educational Widely used in real-world

Focus Comprehensive Internet-centric


communication framework communication

Key Differences
-​ The OSI model is more comprehensive with distinct layers for each function, while
TCP/IP combines some functionalities.
-​ The OSI model serves as a theoretical guideline for understanding networking concepts,
whereas TCP/IP is designed for practical implementation in real-world networks.

11
Physical Layer: Functions of Physical Layer, Analog signals, Digital signals, Transmission
Impairment, Data Rate Limits, and Performance.Data Transmission Media: Guided
Transmission Media, Magnetic Media, Twisted Pairs, Coaxial Cable, Power Lines, Fiber Optics,
Wireless Transmission, Electromagnetic Spectrum, Radio Transmission, Microwave
Transmission, Infrared Transmission, Light Transmission, Digital Modulation and Multiplexing,
Public Switched Telephone Networks. Switching: Circuit switching, Message switching &
Packet switching

Physical Layer
The Physical Layer is the first layer of the OSI (Open Systems Interconnection) model. It is
responsible for the transmission of raw data bits over a physical medium, defining the electrical
and physical specifications for devices and their connections. This layer encompasses various
aspects of the hardware involved in data transmission, including cables, connectors, and
signaling methods.

Functions of the Physical Layer


The main functions of the Physical Layer include:

1.​ Establishment and Termination of Connections: The Physical Layer establishes and
terminates connections between devices and the communication medium. This involves
activating the physical connection when data transmission begins and deactivating it
once communication ends[1][2].

2.​ Signal Encoding and Modulation: It converts digital data (binary values) into signals
suitable for transmission over the communication channel. This process includes
modulation, where binary data is transformed into electrical signals, light pulses, or radio
waves[4][5].

3.​ Data Rate Control: The Physical Layer determines the rate at which data can be
transmitted, measured in bits per second (bps). It ensures that devices can send and
receive data at compatible rates[6].

4.​ Synchronization: This layer ensures that sending and receiving devices are
synchronized to maintain data integrity during transmission. It handles both synchronous
and asynchronous transmissions[4][6].

5.​ Transmission Modes: The Physical Layer defines how data is transmitted, including
simplex (one-way), half-duplex (two-way but not simultaneous), and full-duplex
(simultaneous two-way communication)[4].

12
6.​ Physical Medium Specification: It specifies the characteristics of the transmission
medium (e.g., copper cables, fiber optics) and how devices connect to it. This includes
pin configuration, voltage levels, and cable standards[1][7].

7.​ Configuration Types: The Physical Layer supports different configurations such as
point-to-point (direct connection between two devices) and multipoint (multiple devices
sharing a single communication line) setups[4][5].

Analog Signals vs. Digital Signals


-​ Analog Signals: Continuous signals that vary in amplitude or frequency to represent
information. They are used in traditional telephone systems and radio transmissions.
-​ Digital Signals: Discrete signals that represent data as binary values (0s and 1s). Digital
signals are more robust against noise and distortion, making them suitable for modern
networking technologies.

Transmission Impairment
Transmission impairment refers to any degradation of signal quality as it travels through a
medium. Common causes include:

-​ Attenuation: Loss of signal strength over distance.


-​ Distortion: Alteration of the signal shape due to varying transmission speeds.
-​ Noise: Unwanted electrical signals that interfere with the transmitted signal.

Data Rate Limits


The maximum data rate that can be achieved over a physical medium is influenced by several
factors:

-​ Bandwidth: The range of frequencies that a medium can transmit.


-​ Signal-to-Noise Ratio (SNR): A measure of signal strength relative to background
noise.
-​ Shannon's Capacity Formula: Defines the theoretical maximum data rate $$ C $$ for a
channel:

C=Blog2 (1+SNR)

where C is capacity in bits per second, B is bandwidth in hertz, and SNR is the signal-to-noise
ratio.

Performance
The performance of the Physical Layer is critical for overall network efficiency. Key performance
metrics include:

13
-​ Throughput: The actual rate at which data is successfully transmitted.
-​ Latency: The time delay from when a request is made until it is fulfilled.
-​ Error Rates: The frequency of errors occurring during transmission, which can
necessitate retransmissions.

Data Transmission Media


Data transmission media are the physical pathways that facilitate the transfer of data between
devices in a network. These media can be broadly categorized into guided (wired) and
unguided (wireless) transmission types, each with distinct characteristics and applications.

Guided Transmission Media


Guided transmission media provide a physical path for signals, ensuring that data is transmitted
along specific routes. The primary types include:

1.​ Twisted Pair Cable

-​ Description: Consists of pairs of insulated copper wires twisted together to


reduce electromagnetic interference.
-​ Types:
-​ Unshielded Twisted Pair (UTP): Commonly used in local area networks
(LANs) and telephone systems.
-​ Shielded Twisted Pair (STP): Includes shielding to protect against
external interference, suitable for environments with high electromagnetic
noise.
-​ Applications: LANs, telephony, and data communication.

2.​ Coaxial Cable

-​ Description: Comprises a central conductor surrounded by insulation, a metallic


shield, and an outer insulating layer. This design minimizes signal loss and
external interference.
-​ Applications: Cable television, broadband internet, and CCTV systems.

3.​ Fiber Optics

-​ Description: Utilizes thin strands of glass or plastic to transmit data as light


signals. Fiber optic cables can carry large amounts of data over long distances
with minimal loss.
-​ Components:
-​ Core: The central part where light travels.

14
-​ Cladding: Reflects light back into the core.
-​ Sheath: Protects the fiber from environmental damage.
-​ Applications: Internet backbones, long-distance telecommunications, and
high-speed data connections.

4.​ Power Lines

-​ Description: Uses existing electrical power lines to transmit data alongside


electricity. This technology is known as Power Line Communication (PLC).
-​ Applications: Home networking and smart grid communications.

Unguided Transmission Media


Unguided transmission media do not require a physical medium; instead, they transmit signals
through the air or space using electromagnetic waves. Key types include:

1.​ Wireless Transmission


-​ Description: Involves the use of radio waves, microwaves, or infrared signals to
transmit data without physical connections.
-​ Types:
-​ Radio Transmission: Utilizes radio waves (3 kHz to 1 GHz) for
communication over short to long distances. It is omnidirectional and can
penetrate walls.
-​ Microwave Transmission: Uses high-frequency microwave signals for
point-to-point communication over long distances. Requires line-of-sight
between transmitter and receiver.
-​ Infrared Transmission: Employs infrared light for short-range
communication, typically used in remote controls and wireless
peripherals.
-​ Light Transmission: Involves using laser beams for high-speed data
transfer over short distances, often employed in free-space optical
communications.

Electromagnetic Spectrum
The electromagnetic spectrum encompasses all types of electromagnetic radiation, ranging
from low-frequency radio waves to high-frequency gamma rays. Different segments of this
spectrum are utilized for various forms of wireless communication:

-​ Radio Waves: Used in broadcasting and mobile communications.


-​ Microwaves: Employed in satellite communications and radar systems.
-​ Infrared Waves: Used in remote controls and short-range wireless communications.

15
Digital Modulation and Multiplexing
-​ Digital Modulation: Refers to techniques used to encode digital information onto carrier
waves for transmission over various media. Common methods include Phase Shift
Keying (PSK), Frequency Shift Keying (FSK), and Amplitude Shift Keying (ASK).
-​ Multiplexing: Allows multiple signals to share the same transmission medium by
combining them into a single signal. Techniques include Time Division Multiplexing
(TDM) and Frequency Division Multiplexing (FDM).

Public Switched Telephone Networks (PSTN)


The PSTN is a global network of interconnected voice-oriented public telephone networks that
utilize circuit switching for establishing calls. It comprises both analog and digital technologies,
allowing users to connect through traditional landlines as well as mobile networks.

Switching: Circuit Switching, Message Switching, and Packet


Switching
Switching is a fundamental concept in networking that refers to the process of directing data
from one node to another within a network. There are three primary types of switching methods:
circuit switching, message switching, and packet switching. Each method has its own
characteristics, advantages, and use cases.

Circuit Switching
Definition: Circuit switching is a method of communication where a dedicated communication
path (or circuit) is established between two endpoints for the duration of the connection. This
method is commonly associated with traditional telephone networks.

Phases of Circuit Switching


1.​ Connection Establishment: A dedicated circuit is established between the source and
destination through intermediate switches. This phase involves signaling between the
endpoints to confirm the connection.
2.​ Data Transfer: Once the circuit is established, data (often voice signals) can be
transmitted continuously over the dedicated path without interruption.
3.​ Connection Relinquishment: At the end of the communication session, one endpoint
sends a signal to terminate the connection, releasing the resources used for that circuit.

Characteristics
-​ Dedicated Bandwidth: The entire bandwidth of the circuit is reserved for the duration of
the call, ensuring consistent quality.
-​ Reliability: Provides a high level of reliability since the path remains dedicated until
disconnection.

16
-​ Quality of Service (QoS): Guarantees a certain level of service quality, making it
suitable for applications requiring real-time communication (e.g., voice calls).
-​ Inefficiency in Resource Use: Resources may be wasted during silent periods in a call
since they remain reserved even when not actively transmitting data.

Applications
-​ Traditional telephone systems (landlines).
-​ Dial-up internet connections.
-​ Optical circuit switching in data centers.

Message Switching
Definition: Message switching is a method where entire messages are sent from one node to
another without establishing a dedicated path. Each message is stored at intermediate nodes
until it can be forwarded to its destination.

Characteristics
-​ Store-and-Forward: Each message is stored at an intermediate node before being
forwarded, allowing for efficient handling of traffic bursts.
-​ No Dedicated Path: Unlike circuit switching, there is no dedicated connection;
resources are used only when messages are being transmitted.
-​ Variable Delay: Transmission delays can vary depending on network congestion and
message size.

Applications
-​ Used in early email systems and telegraphy where messages could be queued at
various points before reaching their final destination.

Packet Switching
Definition: Packet switching divides data into smaller packets that are transmitted
independently across the network. Each packet may take different paths to reach the
destination, where they are reassembled into the original message.

Characteristics
-​ Dynamic Routing: Packets can take multiple paths based on current network
conditions, allowing for efficient use of bandwidth.
-​ No Connection Setup: There is no need for a dedicated connection; packets are sent
as needed.
-​ Flexibility and Scalability: Suitable for high-traffic environments as it allows multiple
users to share network resources effectively.

17
Applications
-​ The backbone of modern Internet communication, including web browsing, file transfers,
and streaming services.
-​ Used in protocols such as TCP/IP, which underpins most Internet traffic.

Comparison Summary
Feature Circuit Switching Message Switching Packet Switching

Connection Type Dedicated circuit No dedicated path No dedicated path

Data Transmission Continuous Store-and-forward Packets sent


independently

Delay Fixed delay Variable delay Variable delay

Resource Utilization Less efficient More efficient Highly efficient

Reliability High Moderate Moderate

Quality of Service Guaranteed Not guaranteed Variable

Typical Applications Telephone networks Early email systems Internet


communication

18
Data Link Layer: Functions of Data Link Layer, Data Link Control: Framing, Flow and Error
Control, Error Detection and Correction, High-Level Data Link Control (HDLC) & point — to —
Point protocol (PPP), Channel Allocation Problem, Multiple Access: Radom Access (ALOHA,
CSMA, CSMA/CD, CSMA/CA), ControlledAccess (Reservation, Polling, Token Passing),
Channelization (FDMA, TDMA, CDMA), Wired LAN: Ethernet Standards and FDDI, Wireless
LAN: IEEE 802.1 Ix and Bluetooth Standards.

Data Link Layer


The Data Link Layer is the second layer of the OSI (Open Systems Interconnection) model. It
plays a crucial role in facilitating node-to-node communication over a physical link, ensuring that
data is transmitted reliably between directly connected devices. This layer is responsible for
framing, addressing, error detection and correction, flow control, and media access control.

Functions of the Data Link Layer


1.​ Framing

-​ The Data Link Layer encapsulates packets received from the Network Layer into
frames for transmission over the physical medium. Each frame includes headers
and trailers that contain control information, such as source and destination
addresses.
-​ Framing helps to delineate where one packet ends and another begins, allowing
for organized data transmission.

2.​ Addressing

-​ The Data Link Layer assigns a unique hardware address (MAC address) to each
device on the network. This addressing ensures that frames are delivered to the
correct destination node.
-​ The MAC address is embedded in the frame header, enabling devices to identify
each other on the same local area network (LAN).

3.​ Error Control

-​ To ensure data integrity, the Data Link Layer implements error detection and
correction mechanisms. It adds error-checking bits (such as checksums or cyclic
redundancy checks) to frames.
-​ If an error is detected during transmission, the layer can request retransmission
of corrupted frames to ensure reliable communication.

4.​ Flow Control

19
-​ Flow control mechanisms are employed to manage data transmission rates
between sender and receiver devices. This prevents overwhelming a slower
device with too much data at once.
-​ Techniques such as stop-and-wait or sliding window protocols are used to
regulate data flow effectively.

5.​ Media Access Control (MAC)

-​ The Data Link Layer manages how multiple devices share the same
communication medium to avoid collisions. It determines when a device can
transmit data over a shared channel.
-​ Protocols like CSMA/CD (Carrier Sense Multiple Access with Collision Detection)
for wired networks and CSMA/CA (Carrier Sense Multiple Access with Collision
Avoidance) for wireless networks are examples of media access control
methods.

6.​ Synchronization

-​ The Data Link Layer ensures that both sender and receiver are synchronized
during transmission. This synchronization is crucial for maintaining the integrity of
data being sent across the link.

Sub-layers of the Data Link Layer


The Data Link Layer is further divided into two sub-layers:

1.​ Logical Link Control (LLC)

-​ The LLC sub-layer manages communication between the network layer and
upper layers. It handles flow control, error checking, and acknowledgment of
received frames.
-​ This sub-layer allows multiple network protocols to coexist over the same
physical medium by providing multiplexing capabilities.

2.​ Media Access Control (MAC)

-​ The MAC sub-layer is responsible for controlling access to the physical


transmission medium. It defines how devices on a network uniquely identify
themselves and access shared resources.
-​ The MAC layer also manages frame addressing and error detection specific to
the physical medium being used.

20
Data Link Control
Data Link Control refers to the mechanisms and protocols used in the Data Link Layer to ensure
reliable data transmission over a physical medium. This includes functions such as framing, flow
control, error control, and various protocols designed to manage data communication effectively.

Framing
Framing is the process of encapsulating network layer packets into frames for transmission.
Each frame consists of a header, payload (data), and trailer, which contain control information
such as:

-​ Source and Destination Addresses: Identifies the sender and receiver.


-​ Frame Type: Indicates the protocol used.
-​ Error Detection Bits: Used for error checking.

Framing helps in defining the start and end of each packet, ensuring that data is organized for
transmission and reception.

Flow Control
Flow control mechanisms are essential to manage the rate of data transmission between sender
and receiver, preventing buffer overflow at the receiving end. Common flow control techniques
include:

1.​ Stop-and-Wait Protocol: The sender transmits a frame and waits for an
acknowledgment (ACK) before sending the next frame. This method is simple but can be
inefficient due to idle time while waiting for ACKs.

2.​ Sliding Window Protocol: Allows multiple frames to be sent before requiring an
acknowledgment. The sender maintains a window of frames that can be sent, increasing
efficiency by utilizing the available bandwidth more effectively.

Error Control
Error control ensures that transmitted data is received accurately by detecting and correcting
errors that may occur during transmission. Key components include:

1.​ Error Detection: Techniques used to identify errors in received frames. Common
methods include:

-​ Parity Check: Adds a parity bit to ensure that the total number of 1s is even or
odd.
-​ Checksum: Sums up the binary values of data segments and sends this sum
along with the data.

21
-​ Cyclic Redundancy Check (CRC): A more robust method that uses polynomial
division to detect errors.

2.​ Error Correction: Involves retransmitting corrupted or lost frames. Common techniques
include:

-​ Automatic Repeat Request (ARQ): The receiver sends a negative


acknowledgment (NAK) if an error is detected, prompting the sender to retransmit
the affected frame.
-​ Forward Error Correction (FEC): The sender transmits additional redundant
data so that the receiver can correct certain types of errors without needing
retransmission.

High-Level Data Link Control (HDLC)


HDLC is a widely used protocol for point-to-point and point-to-multipoint communication. It
provides error detection, flow control, and framing using a standardized format. HDLC supports
both connection-oriented and connectionless modes, making it versatile for various applications.

Point-to-Point Protocol (PPP)


PPP is another widely used protocol that provides a standard method for transporting
multi-protocol datagrams over point-to-point links. Key features include:

-​ Link Establishment: Negotiates link parameters between devices.


-​ Authentication: Supports user authentication through methods like PAP (Password
Authentication Protocol) or CHAP (Challenge Handshake Authentication Protocol).
-​ Error Detection: Uses checksums for error detection.

Channel Allocation Problem


The channel allocation problem arises when multiple devices need to share a communication
medium. Efficiently managing access to this medium is crucial to minimize collisions and
maximize throughput.

Multiple Access Methods


Multiple access methods can be categorized into two main types:

1.​ Random Access

-​ ALOHA: A simple protocol where devices transmit whenever they have data but
may collide with other transmissions.
-​ Carrier Sense Multiple Access (CSMA): Devices sense the channel before
transmitting:

22
-​ CSMA/CD (Collision Detection): Used in wired networks; devices detect
collisions and retransmit after a random backoff period.
-​ CSMA/CA (Collision Avoidance): Used in wireless networks; devices
avoid collisions by waiting for a clear channel before transmitting.

2.​ Controlled Access

-​ Reservation: Devices request permission to transmit by reserving slots in


advance.
-​ Polling: A central controller polls devices to see if they have data to send.
-​ Token Passing: A token circulates in the network; only the device holding the
token can transmit, preventing collisions.

Channelization Techniques
Channelization techniques divide available bandwidth into distinct channels for multiple users:

1.​ Frequency Division Multiple Access (FDMA): Divides the frequency spectrum into
separate channels for each user.
2.​ Time Division Multiple Access (TDMA): Allocates time slots for each user on a shared
channel.
3.​ Code Division Multiple Access (CDMA): Uses unique spreading codes for each user,
allowing multiple users to share the same frequency band simultaneously.

Transport Layer: Functions of Transport Layer, Elements of Transport Protocols: Addressing,


Establishing and Releasing Connection, Flow Control & Buffering, Error Control, Multiplexing &
De-multiplexing, Crash Recovery,User Datagram Protocol (UDP): User Datagram, UDP
Operations, Uses of UDP, RPC, Principles of Reliable Data Transfer: Building a Reliable Data
Transfer Protocol, Pipelined Reliable Data Transfer Protocol, Go Back-N(GBN), Selective
Repeat(SR).Application layer : Functions of Application layer, Application Layer Protocols: DNS,
DHCP, WWW, HTTP, HTTPs, TELNET, FTP, SMTP, POP, IIMAP

Transport Layer
The Transport Layer is the fourth layer of the OSI (Open Systems Interconnection) model,
responsible for ensuring reliable data transfer between end systems in a network. It provides
essential services that facilitate communication between applications running on different hosts,
managing how data is segmented, transmitted, and reassembled.

23
Functions of the Transport Layer
1.​ End-to-End Communication

-​ The Transport Layer ensures that data is transmitted from the source to the
destination reliably. It takes messages from the upper layers (like the Session
Layer), segments them into smaller units, and sends them over the network.

2.​ Segmentation and Reassembly

-​ Data from applications is divided into smaller segments for transmission. Each
segment is assigned a header containing control information (such as sequence
numbers) to facilitate reassembly at the destination. This process allows for
efficient use of network resources and ensures that large messages can be
transmitted without overwhelming the network.

3.​ Reliable Delivery

-​ The Transport Layer provides mechanisms for reliable data transmission.


Protocols like TCP (Transmission Control Protocol) ensure that all segments are
received accurately by:
-​ Acknowledgments (ACKs): The receiver sends back an
acknowledgment for received segments.
-​ Retransmission: If a segment is lost or corrupted, it can be retransmitted
based on feedback from the receiver.
-​ Duplicate Control: Sequence numbers help in identifying and discarding
duplicate segments.

4.​ Flow Control

-​ Flow control mechanisms prevent the sender from overwhelming the receiver
with too much data at once. This is typically implemented using protocols such
as:
-​ Sliding Window Protocol: Allows multiple segments to be in transit
before requiring an acknowledgment, optimizing throughput while
ensuring that the receiver can handle incoming data without loss.

5.​ Error Detection and Correction

-​ The Transport Layer implements error detection techniques (like checksums) to


identify errors in transmitted segments. If errors are detected, the layer can
request retransmission of affected segments, ensuring data integrity.

6.​ Multiplexing

24
-​ The Transport Layer enables multiple applications to use the same network
connection simultaneously by multiplexing. It uses port numbers to differentiate
between different applications or services running on a host, allowing for
organized and efficient communication.

7.​ Connection Management

-​ The Transport Layer can establish, maintain, and terminate connections between
devices. For connection-oriented protocols like TCP, a handshake process is
used to establish a connection before data transfer begins, ensuring both parties
are ready for communication.

Key Protocols
-​ Transmission Control Protocol (TCP): A connection-oriented protocol that provides
reliable data transmission through error checking, flow control, and acknowledgment
mechanisms.
-​ User Datagram Protocol (UDP): A connectionless protocol that allows for faster
transmission without guarantees of delivery or order, suitable for applications where
speed is critical (e.g., video streaming).
-​ Datagram Congestion Control Protocol (DCCP) and Stream Control Transmission
Protocol (SCTP) are also used in specific scenarios requiring different levels of
reliability and ordering.

Elements of Transport Protocols


Transport protocols are crucial for ensuring reliable and efficient communication between
applications over a network. Key elements of transport protocols include addressing, connection
management, flow control, error control, multiplexing and de-multiplexing, and crash recovery.

1. Addressing
Transport protocols use port numbers to identify specific applications or services on a host.
Each application running on a device is assigned a unique port number, allowing the transport
layer to direct incoming data to the appropriate application. For example:

-​ TCP and UDP protocols utilize source and destination port numbers in their headers to
facilitate communication between applications.

2. Establishing and Releasing Connection


Transport protocols manage the establishment and termination of connections between devices:

25
-​ Connection Establishment: In connection-oriented protocols like TCP, a three-way
handshake process is used to establish a connection. This involves:

1.​ The client sends a SYN (synchronize) packet to the server.


2.​ The server responds with a SYN-ACK (synchronize-acknowledge) packet.
3.​ The client sends an ACK (acknowledge) packet back to the server.

-​ Connection Release: When communication is complete, the connection is terminated


using a four-way handshake process, ensuring that all data has been transmitted before
closing the connection.

3. Flow Control & Buffering


Flow control mechanisms prevent the sender from overwhelming the receiver with too much
data at once:

-​ Buffering: Data is temporarily stored in buffers at both sender and receiver ends to
accommodate differences in processing speeds.
-​ Techniques:
-​ Stop-and-Wait Protocol: The sender waits for an acknowledgment after sending
each segment.
-​ Sliding Window Protocol: Allows multiple segments to be sent before requiring
an acknowledgment, optimizing throughput while ensuring that the receiver can
handle incoming data.

4. Error Control
Error control mechanisms ensure data integrity during transmission:

-​ Error Detection: Techniques like checksums and cyclic redundancy checks (CRC) are
used to identify errors in transmitted segments.
-​ Error Correction: If an error is detected, mechanisms such as Automatic Repeat
Request (ARQ) are employed to retransmit corrupted segments.

5. Multiplexing & De-multiplexing


Multiplexing allows multiple applications to share the same network connection by combining
their data streams into a single transmission:

-​ Multiplexing: The transport layer gathers data from multiple application processes and
encapsulates it with headers containing port numbers before sending it over the network.

-​ De-multiplexing: At the receiving end, the transport layer examines incoming packets'
headers to direct them to the correct application based on destination port numbers. This
process ensures that each application receives only its intended data.

26
6. Crash Recovery
Crash recovery mechanisms are essential for maintaining data integrity and continuity in case of
failures:

-​ Transport protocols implement strategies for recovering from crashes or unexpected


disconnections, such as:
-​ State Recovery: Maintaining state information about ongoing connections so
that they can be resumed after a failure.
-​ Retransmission Strategies: Using sequence numbers and acknowledgments to
ensure that lost or corrupted segments are resent.

User Datagram Protocol (UDP) is a fundamental transport layer protocol within the Internet
Protocol (IP) suite, designed for applications that require fast and efficient data transmission.
Below is an overview of its key components, operations, uses, and related concepts.

User Datagram
A User Datagram is the basic unit of data transmitted over UDP. It consists of a header and a
payload:

-​ Header: Contains essential information such as source and destination port numbers,
length of the datagram, and a checksum for error-checking.
-​ Payload: The actual data being transmitted.

UDP Operations
UDP operates in a connectionless manner, meaning it does not establish a dedicated
end-to-end connection before sending data. Key operational characteristics include:

-​ No Connection Setup: UDP allows for immediate data transmission without the
overhead of establishing a connection.
-​ Best-Effort Delivery: UDP does not guarantee delivery, order, or error correction. If
packets are lost or arrive out of order, the application must handle these issues.
-​ Low Overhead: The simplicity of UDP results in lower latency and reduced processing
time compared to connection-oriented protocols like TCP.

Uses of UDP
UDP is particularly suited for applications where speed is critical and occasional data loss is
acceptable. Common use cases include:

-​ Voice over IP (VoIP): Real-time voice communication where timely delivery is prioritized
over reliability.

27
-​ Streaming Media: Video and audio streaming services that can tolerate some packet
loss without significant degradation in quality.
-​ Online Gaming: Fast-paced games that require quick updates and can manage
occasional lost packets.
-​ Domain Name System (DNS): Quick query-response transactions where speed is
essential.

Remote Procedure Call (RPC)


UDP can be utilized in Remote Procedure Calls (RPC), allowing programs to execute
procedures on remote systems as if they were local calls. RPC over UDP benefits from low
latency, making it suitable for applications that require fast response times.

28

You might also like