Computer_Networks_and_Control
Computer_Networks_and_Control
for
1 Introduction 1
1.1 Data Commuincation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1.1 Components of a Data Communication System . . . . . . . . . . . . . . . . 1
1.1.2 Data Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Introduction to Computer Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2.1 Network Topologies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2.2 Communication Medium . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.2.3 Geographic Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3 Protocols and Protocol Layering in Computer Networks . . . . . . . . . . . . . . . . 7
1.3.1 What is a Protocol? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.3.2 The Need for Protocol Layering . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.4 OSI Framework for Network Communication . . . . . . . . . . . . . . . . . . . . . . 10
1.4.1 Physical Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.4.2 Data Link Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.4.3 Network Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.4.4 Transport Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.4.5 Session Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.4.6 Presentation Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.4.7 Application Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.5 TCP/IP Protocol Suite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.5.1 Layered Architecture of TCP/IP . . . . . . . . . . . . . . . . . . . . . . . . 13
1.5.2 Comparison with the OSI Model . . . . . . . . . . . . . . . . . . . . . . . . 13
1.5.3 Detailed Analysis of TCP/IP Layers . . . . . . . . . . . . . . . . . . . . . . 13
1.6 Switching Techniques in Computer Networks . . . . . . . . . . . . . . . . . . . . . . 15
1.6.1 Circuit Switching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
1.6.2 Message Switching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
1.6.3 Packet Switching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
1.6.4 Comparison of Switching Techniques . . . . . . . . . . . . . . . . . . . . . . 18
1.7 Multiplexing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1.7.1 Types of Multiplexing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1.7.2 Time-Division Multiplexing (TDM) . . . . . . . . . . . . . . . . . . . . . . . 19
1.7.3 Frequency-Division Multiplexing (FDM) . . . . . . . . . . . . . . . . . . . . 19
1.7.4 Wavelength-Division Multiplexing (WDM) . . . . . . . . . . . . . . . . . . . 20
1.7.5 Applications of Multiplexing in Computer Networks . . . . . . . . . . . . . . 21
1.7.6 Challenges Associated with Multiplexing . . . . . . . . . . . . . . . . . . . . 22
1.7.7 Factors Influencing Multiplexing Choice . . . . . . . . . . . . . . . . . . . . 22
1.8 Integrated Services Digital Network (ISDN) . . . . . . . . . . . . . . . . . . . . . . 22
1.8.1 Basic Principle: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
1.8.2 ISDN and the OSI Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
iii
CONTENTS Computer Network & Protocols (3220304)
Introduction
1
CHAPTER 1. INTRODUCTION Computer Network & Protocols (3220304)
2. Sender: The device that initiates data transmission. It converts the message into a suitable
format for transmission.
3. Receiver: The device that accepts the transmitted message and converts it back into its
original form.
4. Transmission medium: The physical path through which the message travels from the
sender to the receiver. Examples include copper wires, optical fibers, and wireless chRameshels.
5. Protocol: A set of rules governing data communication, ensuring that devices can interpret
and process the transmitted information correctly. Protocols standardize data formatting,
error checking, and control mechanisms.
Simplex Mode:
In simplex mode, data transmission occurs in only one direction. One device acts as the sender,
and the other as the receiver. There is no capability for the receiver to respond. Examples include
television broadcasting and weather sensors sending data to a central station.
Half-Duplex Mode:
Half-duplex mode allows data transmission in both directions, but only one direction at a time.
Once one device finishes sending, the other can begin. Walkie-talkies and early modems operate
in half-duplex mode.
Full-Duplex Mode:
Full-duplex mode enables simultaneous data transmission in both directions. This mode is com-
monly used in modern networks, allowing efficient communication between devices. Most network
interfaces and modems support full-duplex operation.
A) Mesh Topology
A mesh topology is characterized by a dedicated point-to-point link between every pair of nodes
within the network. This implies that each device maintains a direct connection to every other
device. The redundancy inherent in this architecture offers substantial fault tolerance, as the failure
of a single link does not compromise overall network connectivity. However, the implementation of
a full mesh topology necessitates a considerable number of physical connections. Mathematically,
the number of physical links in a fully connected mesh network with n nodes can be determined by
the formula n(n−1)
2
. This substantial requirement for interconnections results in elevated installation
and maintenance costs. Moreover, each device must possess (n − 1) input/output ports, further
escalating hardware expenses.
• Advantages:
• Disadvantages:
B) Star Topology
In a star topology, all network devices are connected to a central hub or switch. This central
device acts as a conduit for data transmission between nodes. While this topology simplifies
network management and troubleshooting, it introduces a single point of failure. If the central
device malfunctions, the entire network becomes inoperable.
• Advantages:
• Disadvantages:
C) Bus Topology
A bus topology employs a shared communication chRameshel, often referred to as a backbone, to
which all devices are connected. Data transmission occurs in a broadcast fashion, with all devices
receiving the transmitted data. While this topology is economical, it is susceptible to performance
degradation as the number of devices grows. Additionally, a fault in the backbone can disrupt the
entire network.
• Advantages:
• Disadvantages:
D) Ring Topology
A ring topology forms a closed loop, with each device connected directly to its neighbors. Data
circulates around the ring in a unidirectional mRamesher. While offering relatively high data
transfer rates, ring topologies are vulnerable to failures. A malfunctioning device can disrupt the
entire network.
• Advantages:
• Disadvantages:
E) Hybrid Topologies
Hybrid topologies emerge as a practical solution by combining the strengths of multiple basic
topologies. This approach often yields a network structure that is both flexible and cost-effective.
A star-bus hybrid topology exemplifies this concept. It integrates the centralized control of a
star topology with the shared medium of a bus topology. Each department within an organization
can utilize a star topology, with the departmental hubs interconnected via a common bus. This
configuration balances the advantages of centralized management with the cost-efficiency of a
shared medium.
Another common hybrid is the hierarchical topology, resembling a tree structure. Multiple star
topologies are interconnected to form a hierarchical arrangement. This topology is particularly
well-suited for large-scale networks, as it manages complexity and facilitates scalability.
By judiciously combining different topologies, organizations can create network architectures
that address their specific needs and challenges effectively.
• Wireless media: Radio waves, microwaves, and infrared light are used for wireless com-
munication. Wi-Fi, Bluetooth, and cellular networks are common examples of wireless tech-
nologies.
1. Personal Area Network – A Personal Area Network (PAN) is a computer network or-
ganized around an individual person within a small geographical area. Typically, it includes
devices such as personal computers, smartphones, tablets, printers, digital cameras, and per-
sonal digital assistants (PDAs). PANs are often implemented using wireless technologies like
Bluetooth, Wi-Fi, or near-field communication (NFC).
The primary function of a PAN is to enable communication and data exchange among per-
sonal devices. For instance, a user can transfer files between a smartphone and a laptop,
print documents from a tablet, or connect wireless headphones to a computer. PANs are
characterized by their limited range and typically operate within a radius of a few meters.
2. Local Area Network – A Local Area Network (LAN) interconnects devices within a con-
fined geographical area, such as an office, building, or campus. LANs are typically privately
owned and managed. They employ high-speed communication technologies such as Ethernet
to facilitate data exchange among computers, printers, servers, and other network devices.
LANs are characterized by their high data transfer rates, low latency, and shared resources.
They provide a platform for file sharing, printer sharing, and access to shared applications
and databases. Additionally, LANs often serve as the foundation for connecting to larger
networks like WANs and the internet.
MANs interconnect multiple LANs and provide connectivity to larger networks. They are of-
ten owned and operated by city governments, cable companies, or internet service providers.
MANs employ high-speed communication technologies, such as fiber optics, to provide broad-
band services to residential and business customers. They offer a range of services, including
internet access, cable television, and telephone services. MANs are essential for connecting
businesses, educational institutions, and government agencies within a metropolitan area.
4. Wide Area Network – A Wide Area Network (WAN) covers a vast geographical area,
spanning across cities, states, countries, or even continents. WANs interconnect multiple
LANs and MANs, creating a global network infrastructure. They are typically owned and
operated by telecommunication service providers.
WANs employ a variety of technologies, including satellite, microwave, and fiber optics,
to transmit data over long distances. They are characterized by their large scale, high
latency, and lower bandwidth compared to LANs and MANs. WANs are essential for enabling
communication and data exchange between geographically dispersed locations. There are two
primary types of WANs:
(a) Point-to-Point WANs: Connect two specific locations directly using a dedicated link.
(b) Switched WANs: Connect multiple locations through a shared network infrastructure.
5. Global Area Networks – With the increasing globalization of business and the prolifer-
ation of interconnected devices, the concept of a Global Area Network (GAN) has gained
prominence. A GAN is a vast network that spans the entire globe, encompassing multiple
continents and countries. It is characterized by its immense scale, high complexity, and the
integration of various network technologies.
GANs are essential for supporting global business operations, enabling seamless communi-
cation and collaboration among distributed teams. They also facilitate the exchange of data
and information on a global scale, driving innovation and economic growth.
of protocols, the necessity of multiple layers in protocol design, and the principles guiding protocol
layering, illustrated through practical scenarios.
2. Abstraction: Each layer provides a service to the layer above it and receives services from
the layer below, abstracting the complexity of underlying layers.
3. Interoperability: Different implementations of the same layer can work together as long
as they adhere to the same protocol standards.
4. Flexibility: Layers can be added, removed, or modified without impacting the entire system,
making it easier to adapt to new requirements.
2. Protocol Rules:
This scenario is straightforward and only requires one layer because the communication is direct
and simple.
1. Layer 1: Physical Mailing - Involves mailing the letter, including addressing and sending
it.
2. Layer 2: Encryption/Decryption - Encrypts the letter to protect its content and decrypts
it upon receipt.
4. Process:
• Ram’s Side:
(a) Third Layer: Ram creates the plaintext letter.
(b) Second Layer: Encrypts the plaintext to produce ciphertext.
(c) First Layer: Puts the ciphertext into an envelope and mails it.
• Ramesh’s Side:
(a) First Layer: Receives the letter, extracts the ciphertext.
(b) Second Layer: Decrypts the ciphertext to retrieve the plaintext.
(c) Third Layer: Reads the plaintext letter.
This multi-layered approach provides modularity; changes in encryption methods only require
updating the second layer, while the other layers remain unchanged.
• Encoding/Decoding: Converting data into electrical signals (e.g., digital to analog) and
vice versa.
• Bit Synchronization: Coordinating the timing of bit transmission and reception using
techniques like clocking.
• Physical Connection: Establishing and maintaining a physical link between devices (e.g.,
RJ45 connectors for Ethernet).
• Framing: Structuring data into data frames with headers and trailers (e.g., Ethernet
frames).
• Error Detection and Correction: Employing techniques like checksums, cyclic redun-
dancy checks (CRCs), and automatic repeat request (ARQ) to ensure data integrity.
• Media Access Control (MAC) Addressing: Using MAC addresses to identify devices
on a shared network medium (e.g., Ethernet MAC addresses).
• Flow Control: Regulating data flow to prevent buffer overflow (e.g., sliding window proto-
col).
• Routing: Selecting optimal paths for data packets using routing protocols (e.g., RIP, OSPF).
• Congestion Control: Managing network traffic to prevent congestion (e.g., TCP congestion
control).
• Segmentation and Reassembly: Dividing data into segments and reassembling them at
the destination.
• Error Control: Detecting and correcting errors in data transmission (e.g. checksums,
ARQ).
• Flow Control: Regulating the rate of data flow between end systems (e.g., sliding window).
• Data Encryption and Decryption: Protecting data confidentiality and integrity (e.g.,
AES, DES).
• Data Compression: Reducing data size for efficient transmission (e.g., ZIP, gzip).
• Data Conversion: Converting data formats between different systems (e.g., text to binary,
image formats).
• Network Services: Offering various network services such as email (SMTP), file transfer
(FTP), web browsing (HTTP), and database access (SQL).
• User Interface: Providing a user-friendly interface for interacting with network applica-
tions.
2. Transport Layer: Responsible for end-to-end communication, providing reliable data de-
livery and flow control. TCP and UDP are the primary protocols at this level.
3. Internet Layer: Handles packet routing and addressing across multiple networks. IP is the
cornerstone protocol.
4. Network Access Layer: Concerned with data transfer across the physical network, en-
compassing functions similar to the OSI model’s physical and data link layers.
2) Transport Layer –
The Transport layer provides end-to-end communication between applications on different hosts.
3) Internet Layer –
The Internet layer is responsible for packet routing and addressing.
• Ethernet: The dominant technology for wired LANs, defining physical and data link layer
specifications.
• Wi-Fi: Enables wireless communication, operating in the physical and data link layers.
• Application Layer: The web browser (an application) sends an HTTP request to a web
server.
• Transport Layer: TCP establishes a connection between the browser and the web server.
The HTTP request is encapsulated in a TCP segment.
• Internet Layer: The TCP segment is encapsulated in an IP packet, with source and desti-
nation IP addresses. Routers forward the packet based on IP addressing.
• Network Access Layer: The IP packet is converted into data frames for transmission over
the physical network.
The web server responds similarly, sending an HTML page back to the browser through the same
layers.
Example: Traditional telephone networks use circuit switching. When you make a phone call, a
dedicated circuit is established between your phone and the recipient’s phone. This circuit remains
active until you hang up.
Advantages:
1. Guaranteed bandwidth: Provides a dedicated channel, ensuring predictable performance.
3. Suitable for real-time applications: Ideal for voice and video communication.
Disadvantages:
1. Inefficient resource utilization: Idle circuits consume resources even when not in use.
Example: Early computer networks often used message switching. Messages would be trans-
mitted from one node to another, stored at intermediate nodes, and forwarded to the destination
when the entire message was received. This technique is less efficient than circuit switching, but
more flexible.
Advantages:
1. Efficient resource utilization: No dedicated circuit is required, allowing for dynamic
resource allocation.
2. Flexible routing: Messages can be routed through different paths according to network
conditions.
Disadvantages:
1. Higher latency: Messages may experience delays as they are stored and forwarded at
intermediate nodes.
Example: The internet primarily uses packet switching. When you send an email, it is divided
into packets, which are transmitted independently through the network.
Advantages:
1. Efficient resource utilization: Packets can be transmitted independently, maximizing
network capacity.
2. Flexibility: Packets can be routed through different paths based on network conditions.
4. Suitable for a wide range of applications: Supports various data types and transmission
rates.
Disadvantages:
1. Potential for packet loss: Packets may be lost or delayed during transmission.
2. Requires flow control and error detection: Mechanisms are needed to ensure reliable
data delivery.
1.7 Multiplexing
Multiplexing is a fundamental technique in computer networking that allows multiple signals or
data streams to be transmitted over a single physical medium. It efficiently manages bandwidth and
optimizes resource utilization, allowing multiple devices or users to share the same communication
channel without interference. Multiplexing is essential in scenarios where the transmission medium
is expensive, scarce, or limited in capacity. It forms the basis of various communication protocols
and networking technologies, ensuring that data is transmitted reliably and efficiently.
Each of these techniques serves different purposes and is suited for different types of networks.
In the following sections, we will discuss these types in detail, covering their basic principles and
providing suitable examples.
1. Synchronous TDM: In synchronous TDM, each signal gets an equal and fixed time slot,
regardless of whether it has data to transmit. This method ensures predictability but can be
inefficient if some time slots remain unused.
2. Asynchronous TDM (or Statistical TDM): In asynchronous TDM, time slots are as-
signed dynamically based on demand. This method is more efficient as it allocates slots only
when a signal has data to transmit.
Advantages of TDM:
• Efficient Use of Bandwidth: By dividing time into slots, TDM ensures that the commu-
nication channel is fully utilized.
• Simplified Error Detection and Correction: Since each signal occupies a distinct time
slot, errors are easier to detect and correct.
Limitations of TDM:
• Fixed Time Slots in Synchronous TDM: In synchronous TDM, time slots are fixed,
leading to potential inefficiencies if some slots are unused.
FDM is analogous to tuning different radio stations. Just as a radio can pick up multiple
stations by tuning to different frequencies, a communication channel using FDM can transmit
multiple signals simultaneously, each occupying a unique frequency band.
Examples: FDM is commonly used in radio broadcasting. In this scenario, different radio
stations transmit their signals at different frequencies within the same geographical area. A listener
can tune into a specific frequency to receive the desired radio station.
Another notable example is cable television, where multiple TV channels are transmitted over
a single cable using FDM. Each channel occupies a different frequency band, allowing viewers to
select from various channels without interference.
FDM is also used in traditional analog telephone systems, where multiple voice calls are trans-
mitted over a single line, each occupying a different frequency band.
Advantages of FDM:
• Simultaneous Transmission: Multiple signals can be transmitted simultaneously without
waiting for time slots, making FDM suitable for real-time applications.
Limitations of FDM:
• Bandwidth Limitation: FDM requires a wide bandwidth, and as the number of signals
increases, the available frequency spectrum may become congested.
For instance, in a DWDM system, a single fiber can carry up to 160 channels, each at a
different wavelength, allowing massive amounts of data to be transmitted over long distances
without interference.
Another application of WDM is in metro networks, where CWDM is used to transmit multiple
signals across shorter distances, providing cost-effective bandwidth solutions for urban areas.
Advantages of WDM:
• High Data Capacity: WDM significantly increases the capacity of optical fibers, enabling
the transmission of vast amounts of data over long distances.
• Efficient Use of Fiber: By using different wavelengths, WDM allows multiple data streams
to be transmitted over a single fiber, reducing the need for additional infrastructure.
Limitations of WDM:
• Cost: WDM systems, especially DWDM, can be expensive to implement due to the need
for precise wavelength control and specialized equipment.
• Complexity: Managing multiple wavelengths and ensuring they remain separate requires
advanced technology, adding complexity to the network.
2. Internet and Data Networks: WDM is extensively used in fiber-optic networks, forming
the backbone of the internet. It enables high-speed data transmission, supporting the growing
demand for bandwidth due to the proliferation of internet services and applications.
4. Broadcasting: FDM is used in radio and television broadcasting, allowing multiple channels
to be transmitted simultaneously over the same medium. In digital broadcasting, techniques
like Orthogonal Frequency-Division Multiplexing (OFDM) are used to improve spectral effi-
ciency and robustness.
5. Satellite Communication: In satellite communication, FDM and WDM are used to trans-
mit multiple signals from Earth stations to satellites and vice versa. This allows efficient use
of the satellite’s transponder bandwidth and supports multiple communication channels.
• Interference and Crosstalk: In FDM and WDM systems, signals may interfere with each
other if frequency or wavelength separation is insufficient. This can lead to crosstalk and
degraded signal quality.
• Resource Allocation: In TDM systems, allocating time slots to different signals can be
challenging, especially in dynamic networks where traffic patterns change frequently.
• Cost and Complexity: Advanced multiplexing techniques like DWDM require specialized
equipment and precise control, leading to higher costs and increased network complexity.
1. Basic Rate Interface (BRI): BRI provides two B-channels (64 Kbps each) for data and
one D-channel (16 Kbps) for signaling, making it suitable for small businesses and home
users.
2. Primary Rate Interface (PRI): PRI offers a higher data rate, typically with 23 B-channels
and one D-channel (in North America) or 30 B-channels and one D-channel (in Europe),
making it ideal for larger organizations requiring more bandwidth.
Examples: A classic example of ISDN usage is in video conferencing. In the 1990s and early
2000s, ISDN was widely adopted for video conferencing due to its ability to provide consistent and
high-quality transmission of both audio and video signals. Businesses used ISDN to connect geo-
graphically dispersed teams, enabling real-time communication without the latency issues common
in analog systems.
Another example is in remote access services, where ISDN was employed to provide digital
dial-up connections for accessing corporate networks. ISDN’s higher data rates compared to tra-
ditional modems made it a popular choice for remote workers needing reliable access to data and
applications.
Advantages of ISDN
• Simultaneous Transmission: ISDN supports multiple services (e.g., voice, data, video)
over the same line, enabling simultaneous communication.
• Fast Call Setup: ISDN enables faster call setup times compared to traditional PSTN,
improving efficiency in communication.
Limitations of ISDN
• Cost: ISDN services can be more expensive than analog services, particularly for small
businesses or home users.
• Gradual Phase-Out: With the advent of broadband technologies such as DSL and fiber-
optic networks, ISDN has seen a decline in usage.
time-division multiplexing (TDM) to combine multiple data streams into a single optical signal,
enhancing bandwidth utilization.
SONET frames are structured in a hierarchical manner, with lower-level signals being multi-
plexed into higher-level frames. The basic building block of SONET is the Synchronous Transport
Signal level 1 (STS-1), which has a data rate of 51.84 Mbps. Higher-level signals, such as STS-3
(155.52 Mbps) and STS-12 (622.08 Mbps), are created by multiplexing multiple STS-1 signals.
Advantages of SONET
• High Data Rates: SONET supports extremely high data rates, making it ideal for back-
bone networks that require large bandwidth.
• Scalability: SONET’s hierarchical structure allows for easy scalability, enabling networks
to grow without major reconfigurations.
• Fault Tolerance: SONET networks often use ring topologies with automatic protection
switching, ensuring that data can be rerouted in case of a failure.
Limitations of SONET
• Complexity: SONET networks can be complex to design and manage, particularly in large-
scale deployments.
• Cost: The infrastructure required for SONET, including optical fibers and multiplexing
equipment, can be expensive to implement.
From a network topology perspective, ISDN is typically used in point-to-point or star config-
urations, where individual devices connect to a central office. SONET, on the other hand, often
employs ring topologies, providing redundancy and fault tolerance.
In terms of switching techniques, ISDN relies on circuit switching, where a dedicated path is es-
tablished for each communication session. SONET, while also supporting circuit-switched services,
can be integrated with packet-switched networks, allowing for more flexible data transmission.
1.10 Conclusion
This chapter has provided an overview of computer networks, including their types, reference
models, switching techniques, and multiplexing methods. It also introduced ISDN and SONET
as examples of network technologies. In subsequent chapters, we will dive deeper into specific
network protocols and technologies.