End Sem CN
End Sem CN
Unit 1
Data Communications
Data Communications Components
Networks
The Internet
Protocols and Standards
Network Models: The OSI Model
TCP/IP Protocol Suite
A Comparison of the OSI and TCP/IP Reference Models
Addressing
Physical Layer: Analog and Digital Signals
Transmission Modes
Transmission Media: Guided Media and Unguided Media
Error Detection and Correction Codes
Switching: Circuit Switching (Space-Division, Time Division, and Space-Time Division)
Packet Switching: Virtual Circuit and Datagram Approach
Message Switching
Unit 2
Data Link Layer: Design Issues
Data Link Control and Protocols: Flow and Error Control, Stop-and-Wait ARQ
Sliding Window Protocol, Go-Back-N ARQ, and Selective Repeat ARQ
High-Level Data Link Control (HDLC)
Point-to-Point Access, PPP (Point-to-Point Protocol), and PPP Stack
Medium Access Sublayer: Channel Allocation Problem
Controlled Access in Network Communication
Channelization in Network Communication
Multiple Access Protocols in Network Communication
IEEE Standards for LANs and WLANs: 802.3 (Ethernet) and 802.11 (Wi-Fi)
high‐speed LANs
Token Ring and Token Bus
Fiber Distributed Data Interface (FDDI)-Based LAN
Network Devices: Repeaters, Hubs, Switches, and Bridges
Unit-3
Computer Networks 1
Network Layer:
Functions of the Network Layer:
Protocols and Devices at the Network Layer:
Network Layer: Design Issues:
Routing Algorithms:
Congestion Control Algorithms:
Host-to-Host Delivery:
Internetworking:
Addressing:
Routing:
Summary:
Classful IP Addressing:
Classes of IP Addresses:
Classless Inter-Domain Routing (CIDR) - Classless Addressing:
Features of CIDR:
Subnet
Purpose of Subnetting:
Components of a Subnet:
Subnetting Process:
Example:
Network Layer Protocols:
Address Resolution Protocol (ARP):
Internet Protocol version 4 (IPv4):
Internet Control Message Protocol (ICMP):
Internet Protocol version 6 (IPv6):
ICMPv6 (Internet Control Message Protocol version 6):
Unit 4
Transport Layer
Transport Layer Functions:
Key Protocols at the Transport Layer:
Transport Layer Ports:
Quality of Service (QoS):
UDP (User Datagram Protocol):
TCP (Transmission Control Protocol):
Congestion Control:
Quality of Service (QoS):
Summary:
Computer Networks 2
Application Layer
Client-Server Model:
Socket Interface:
Summary:
Domain Name System (DNS):
Simple Mail Transfer Protocol (SMTP):
File Transfer Protocol (FTP):
Hypertext Transfer Protocol (HTTP) and World Wide Web (WWW):
Unit 1
Data Communications
Data communications is the process of transmitting and receiving data between two
devices or systems through a medium such as a wired or wireless connection. It
plays a fundamental role in computer networks and is essential for information
exchange. This topic covers various aspects of data communications:
Sender - The sender, also known as the transmitter, is the device or entity that
initiates data transmission.
Receiver - The receiver is the device or entity that receives the data transmitted
by the sender.
Protocol - A protocol is a set of rules and conventions that govern the data
communication process, ensuring data integrity, reliability, and proper
synchronization between sender and receiver.
Computer Networks 3
Data communication can be classified into two main types:
Simplex - In simplex mode, data flows in one direction only, from sender to
receiver. This mode is unidirectional, much like a TV broadcast.
Half-Duplex - Half-duplex mode allows data to flow in both directions, but not
simultaneously. Devices take turns transmitting and receiving, similar to a
walkie-talkie.
Noise - Noise refers to unwanted signals that can distort or disrupt the data
being transmitted. It's essential to have error detection and correction
mechanisms in place to deal with noise.
Computer Networks 4
HTTP/HTTPS - Hypertext Transfer Protocol (HTTP) and its secure version
(HTTPS) are used for transmitting web content.
2. Sender: The sender, also known as the transmitter or source, is the device or
entity that originates and initiates the data transmission. It is responsible for
encoding and sending the message.
3. Receiver: The receiver is the device or entity at the receiving end, which
decodes and processes the transmitted data. Its role is to extract the message
from the received signals.
Computer Networks 5
5. Protocol: Protocols are a set of rules and conventions that govern the format
and timing of data transmission, ensuring compatibility and successful
communication between sender and receiver.
11. Physical Interface: The physical interface provides the connection point for the
transmission medium and ensures that the signals are compatible with the
medium used.
12. Error Detection and Correction: Techniques and mechanisms for detecting
and correcting errors that may occur during data transmission, ensuring data
integrity.
13. Flow Control: Flow control mechanisms manage the rate of data transmission
to avoid overwhelming the receiver and maintain data synchronization between
sender and receiver.
Computer Networks 6
14. Multiplexing Techniques: Multiplexing methods such as time-division
multiplexing (TDM) and frequency-division multiplexing (FDM) allow multiple
signals to share a single transmission medium.
15. Network Topology: The physical or logical layout of devices and their
connections in a network, which can be in the form of bus, star, ring, or mesh
topologies.
Networks
In the context of computer networks, there are various components and concepts to
consider:
1. Network Types:
Wide Area Network (WAN): A WAN covers a larger geographical area and
can connect LANs over long distances, often using technologies like the
Internet or leased lines.
Metropolitan Area Network (MAN): A MAN falls between LAN and WAN in
terms of geographic scope, typically covering a city or large campus.
2. Network Topologies:
Computer Networks 7
Mesh Topology: In a mesh topology, every device is connected to every
other device, providing redundancy.
3. Networking Devices:
Switch: A switch connects devices within a single network and uses MAC
addresses to forward data.
Hub: Hubs are less intelligent and simply broadcast data to all devices on a
network.
4. Network Protocols:
HTTP/HTTPS: Hypertext Transfer Protocol and its secure version are used
for web communication.
5. Network Addressing:
Computer Networks 8
8. Firewalls: Firewalls are used to secure networks by controlling incoming and
outgoing network traffic based on an organization's previously established
security policies.
Tools and practices for monitoring and managing network resources and
performance.
The Internet
The Internet is a global network of interconnected computer networks that allows for
the exchange of data, information, and communication across the world. It is a vast
and complex system with several key components and concepts:
3. Web Browsers:
Computer Networks 9
Web browsers are software applications that allow users to access and
view web content. Common examples include Chrome, Firefox, and Safari.
5. IP Addresses:
6. Web Servers:
Web servers are computers or software that host websites and respond to
requests from web browsers. They deliver web content to users.
7. Web Hosting:
Search engines like Google and Bing help users find information on the
internet by indexing and ranking web content.
11. E-commerce:
Computer Networks 10
E-commerce refers to online buying and selling of products and services,
including platforms like Amazon and eBay.
Social media platforms like Facebook, Twitter, and Instagram enable users
to connect and share content with others online.
14. Cybersecurity:
Streaming services like Netflix and YouTube allow users to watch videos
and other media content over the internet in real-time.
Computer Networks 11
Layer 1: Physical Layer
3. TCP/IP Protocol Suite: The TCP/IP protocol suite is the foundation of the
internet. It includes protocols like:
UDP (User Datagram Protocol): Provides faster, but less reliable, data
transmission.
4. HTTP and HTTPS: Hypertext Transfer Protocol (HTTP) and its secure version
(HTTPS) define how web browsers and web servers communicate. HTTPS
adds encryption for secure data exchange.
5. Email Protocols:
POP3 (Post Office Protocol Version 3) and IMAP (Internet Message Access
Protocol): Retrieving emails from servers.
6. Ethernet: Ethernet is a widely used standard for LANs, specifying how data
packets are framed, addressed, and transmitted over the physical network.
7. Wireless Protocols:
Computer Networks 12
Bluetooth: Used for short-range wireless connections between devices.
9. Security Standards:
10. VoIP (Voice over Internet Protocol): Standards and protocols for transmitting
voice and multimedia over the internet.
13. RFCs (Request for Comments): RFCs are documents that specify internet
standards, protocols, and procedures. They are created and maintained by the
Internet Engineering Task Force (IETF).
Understanding and adhering to these protocols and standards is critical for ensuring
that diverse devices and systems can communicate effectively in a networked
world. They enable interoperability and reliable data transmission across the
internet and other communication systems.
Computer Networks 13
The Open Systems Interconnection (OSI) model is a conceptual framework used to
understand and standardize network communication. It divides the complex process
of network communication into seven distinct layers, each with its own specific
functions and responsibilities. Here's an overview of the OSI model:
Responsibilities: The physical layer deals with the physical medium and
transmission of raw bits over the network. It focuses on electrical,
mechanical, and functional characteristics of the hardware.
Responsibilities: The network layer deals with routing and forwarding data
packets between devices across different networks. It assigns logical
addresses (IP addresses) and makes routing decisions.
Computer Networks 14
ensures synchronization and checkpointing.
Key Points:
Each layer has its unique role and interacts with adjacent layers to ensure data
is transmitted reliably and accurately.
Real-world networking standards, such as the TCP/IP suite, do not always align
perfectly with the OSI model but are often used alongside it for practical
implementation.
Computer Networks 15
TCP/IP Protocol Suite
The TCP/IP (Transmission Control Protocol/Internet Protocol) suite is a fundamental
set of networking protocols that underlies the functionality of the internet and most
modern networks. It is divided into four primary layers, and it serves as the basis for
internet communication. Here's an overview of the TCP/IP Protocol Suite:
Responsibilities: The lowest layer is responsible for the physical and data
link aspects of network communication. It interacts directly with the
hardware and deals with addressing at the MAC (Media Access Control)
layer. It includes protocols for Ethernet, Wi-Fi, and others.
Computer Networks 16
2. Internet Layer:
Examples: IPv4 (Internet Protocol version 4), IPv6 (Internet Protocol version
6), ICMP (Internet Control Message Protocol).
3. Transport Layer:
4. Application Layer:
Key Points:
The TCP/IP suite is modular and can adapt to various networking technologies,
making it versatile and widely used.
IPv4 and IPv6 are the primary internet layer protocols. IPv6 was introduced to
address the exhaustion of IPv4 addresses and offers enhanced features.
Computer Networks 17
The application layer encompasses a broad range of protocols, each tailored to
specific services and applications.
Computer Networks 18
A Comparison of the OSI and TCP/IP Reference
Models
The OSI (Open Systems Interconnection) and TCP/IP (Transmission Control
Protocol/Internet Protocol) reference models are two frameworks used to
conceptualize and standardize network communication. Here's a comparison of the
two models:
1. Number of Layers:
OSI: The OSI model has seven layers, which are designed to provide a
comprehensive and detailed breakdown of network communication functions.
TCP/IP: The TCP/IP model has four layers, providing a more concise
representation of the networking process.
OSI:
1. Physical Layer
Computer Networks 19
2. Data Link Layer
3. Network Layer
4. Transport Layer
5. Session Layer
6. Presentation Layer
7. Application Layer
TCP/IP:
2. Internet Layer
3. Transport Layer
4. Application Layer
OSI: The OSI model is more of a theoretical concept and is less commonly
implemented directly in networking technologies. However, it serves as a
valuable reference for understanding network principles and interactions.
TCP/IP: The TCP/IP model is the basis for the internet and is more practically
used in real-world networking. It directly influences the design and operation of
the internet and most modern networks.
4. Historical Context:
OSI: The OSI model was developed in the late 1970s by the International
Organization for Standardization (ISO) and was intended to provide a universal
framework for networking.
TCP/IP: The TCP/IP model predates the OSI model and was developed as part
of the ARPANET project in the 1970s, with a focus on creating a practical
networking system.
5. Layer Correspondence:
Computer Networks 20
OSI and TCP/IP layers do not align perfectly. They have different names and
slightly different functionalities in some cases, but there is a general mapping:
OSI Data Link and Physical Layers roughly align with the TCP/IP Network
Interface Layer.
6. Real-World Use:
In summary, while both the OSI and TCP/IP models serve as valuable tools for
understanding network communication, the TCP/IP model is more widely used in
practical networking applications, including the internet. The OSI model offers a
more detailed and comprehensive framework for learning and theoretical
discussions but is less commonly used in real-world networking.
Computer Networks 21
Addressing
Addressing is a critical aspect of network communication, enabling devices to locate
and interact with each other within a network. Addressing can refer to various types
of identifiers and schemes used in networking:
Computer Networks 22
A URL is a web address that identifies the location of a resource on the
internet. It typically consists of a protocol (e.g., http://), a domain name
(e.g., www.example.com), and a resource path (e.g., /page).
4. Port Numbers:
Port numbers are used in transport layer protocols (TCP and UDP) to
distinguish between different services running on the same device. For
example, port 80 is commonly used for HTTP (web), while port 25 is used
for SMTP (email).
5. Email Address:
6. Domain Name:
7. Hostnames:
8. Subnet Mask:
Subnet masks define the range of IP addresses within a network. They are
used for subnetting and organizing IP addresses into smaller subnetworks.
9. Gateways:
Computer Networks 23
DNS is a system for translating human-readable domain names into IP
addresses, allowing users to access resources on the internet by using
familiar names.
1. Analog Signals:
Definition: Analog signals are continuous and vary smoothly over time.
They can take any value within a range and represent information as a
wave or continuous signal.
Characteristics:
Computer Networks 24
Examples: A classic example is the audio signal produced by a
microphone, which varies continuously in response to sound waves.
2. Digital Signals:
Characteristics:
Examples: Digital signals are used in digital devices, computers, and most
modern communication technologies, such as the internet.
Useful for representing continuous, real-world phenomena like sound and light.
Can carry an infinite range of values and can be more accurate for some
applications.
Computer Networks 25
In practice, modern telecommunications systems, including the internet,
predominantly use digital signals due to their robustness and efficiency. However,
analog signals are still used in specific applications where continuous, real-world
data representation is necessary. Understanding the differences between these
signal types is fundamental in the study of the physical layer in networking and
telecommunications.
Transmission Modes
In data communication and networking, transmission modes describe how data is
transmitted between devices or systems. There are three primary transmission
modes:
1. Simplex Mode:
Computer Networks 26
the listeners cannot send data back to the station through the same
channel.
2. Half-Duplex Mode:
3. Full-Duplex Mode:
Key Points:
Simplex is useful for situations where data only needs to flow in one direction.
Half-duplex is suitable when data needs to be sent and received, but not
simultaneously, as in walkie-talkies.
Computer Networks 27
Transmission Media: Guided Media and Unguided
Media
In networking and data communication, transmission media refers to the physical
pathways through which data is transmitted from one device to another. There are
two primary categories of transmission media: guided media (wired) and unguided
media (wireless).
Variants: Unshielded Twisted Pair (UTP) and Shielded Twisted Pair (STP).
2. Coaxial Cable:
Computer Networks 28
Advantages: Good bandwidth and resistance to interference.
3. Fiber-Optic Cable:
1. Radio Waves:
2. Microwaves:
3. Infrared Waves:
4. Satellite Communication:
Computer Networks 29
Key Points:
Guided media rely on physical cables to transmit data and are typically more
secure and reliable.
Unguided media use wireless signals and are suitable for mobile and remote
communication but can be subject to interference and signal degradation.
Error Detection:
1. Parity Bit:
Computer Networks 30
Description: Parity bit is a simple error detection method. An extra bit is
added to a data word (usually 7 or 8 bits) to make the total number of 1s
even (even parity) or odd (odd parity). If the parity bit doesn't match the
received data, an error is detected.
Error Correction:
1. Hamming Code:
Use: Used in computer memory systems and data transmission where error
correction is critical.
2. Reed-Solomon Code:
Computer Networks 31
Use: Applied in 4G and 5G mobile networks, deep-space communication,
and high-speed internet.
Key Points:
Error detection codes identify errors but do not correct them, while error
correction codes both detect and correct errors.
Parity and CRC are simple error detection methods, whereas Hamming, Reed-
Solomon, Turbo, and LDPC codes are advanced error correction techniques.
The choice of error correction code depends on the specific application, its error
tolerance, and the complexity of implementation.
Error detection and correction codes are critical in ensuring data integrity in various
communication and storage systems, from basic memory to advanced wireless
networks. The appropriate choice of code depends on the level of error protection
required for a given application.
Computer Networks 32
Circuit switching is one of the fundamental techniques for establishing a dedicated
communication path between two devices in a network. It is commonly associated
with traditional telephone networks but has variations to address different
requirements. Here's an overview of circuit switching methods:
Use: This approach is often found in early telephone networks and some
legacy communication systems.
Key Points:
Computer Networks 33
Circuit switching is characterized by the establishment of a dedicated
communication path for the entire duration of the conversation.
Space-time division circuit switching combines space and time division methods
to accommodate complex network requirements.
Circuit switching is less common in modern digital networks and has largely been
replaced by packet switching, which is more flexible and efficient. However, circuit
switching is still used in specific applications, such as dedicated communication
paths in some telecommunications systems.
2. Characteristics:
Computer Networks 34
Sequencing and flow control are more straightforward because packets are
sent in a predetermined order.
3. Use: The virtual circuit approach is used in technologies like Frame Relay and
ATM (Asynchronous Transfer Mode) networks, where a stable, predictable
connection is required.
Datagram Approach:
2. Characteristics:
Packets can take different paths to reach the destination, providing network
redundancy.
Computer Networks 35
3. Use: The datagram approach is the foundation of the Internet Protocol (IP) in
the context of the global internet and local area networks.
Key Points:
Virtual circuit networks are suitable for applications that require predictable,
consistent communication paths, while datagram networks are more flexible
and often used in the public internet.
Message Switching
Message switching is a communication technique that predates modern packet
switching and circuit switching. It involves the transmission of complete messages
or data units, rather than breaking data into smaller packets as in packet switching.
Here's an overview of message switching:
1. Message-Based Communication:
Computer Networks 36
In message switching, the entire message is treated as a unit of data for
transmission. This message can be of arbitrary size and can contain text,
voice, or other forms of data.
Messages can include routing information to guide their path through the
network.
2. Store-and-Forward Process:
Each node in the network stores the complete message before forwarding it
to the next node, hence the term "store-and-forward."
3. Message Handling:
Each message switch examines the routing information within the message
to determine the next destination.
4. Message Queuing:
Messages may need to wait in queues at each node if the next hop is not
immediately available. This queuing mechanism can introduce delays.
5. Completion-Based Communication:
Advantages:
Computer Networks 37
Suitable for low-data-rate applications: It can be efficient for low-volume,
store-and-forward applications.
Disadvantages:
Message switching was more common in earlier communication networks and was
used in some early telegraph and telex systems. However, it has largely been
supplanted by packet switching, which offers greater efficiency, flexibility, and
speed.
Computer Networks 38
Aspect Message Switching Packet Switching
Data Uses computer languages like ASCII, In packet switching, binary data
Representation Baudot, Morse code. is used.
packet switching:
Computer Networks 39
Unit 2
Data Link Layer: Design Issues
https://youtu.be/JRgmPco0KWI?si=pcjdudE9J_Qxwnat
The Data Link Layer is the second layer of the OSI model, and it plays a crucial role
in the reliable transmission of data over a physical medium. There are several
design issues to consider when implementing the Data Link Layer. Let's explore
these issues:
1. Framing:
Solution: Error detection codes like CRC (Cyclic Redundancy Check) and
error correction codes like Hamming codes are employed to ensure data
integrity.
3. Flow Control:
Issue: The sender and receiver may operate at different speeds, leading to
a potential overflow of data at the receiver. Flow control mechanisms are
needed to regulate the data flow.
Computer Networks 40
receiver.
Issue: Each device on a network needs a unique identifier. The Data Link
Layer must include address fields to specify the source and destination.
6. Switching:
7. Error Handling:
Issue: When errors are detected, the Data Link Layer must decide how to
handle them, whether by requesting retransmission or dropping the frame.
8. Duplexing:
Computer Networks 41
choice impacts network efficiency.
Issue: The Data Link Layer operates using various protocols and
standards. Compatibility and adherence to these standards are essential for
seamless communication.
Solution: Standardization bodies like IEEE and ISO define protocols such
as Ethernet and PPP (Point-to-Point Protocol) to ensure interoperability.
Designing the Data Link Layer involves addressing these issues to create a reliable,
efficient, and error-resistant communication system. The specific solutions chosen
depend on the network's requirements and the technologies in use.
Computer Networks 42
Data Link Control and Protocols: Flow and Error
Control, Stop-and-Wait ARQ
https://www.youtube.com/watch?v=YIX1NfaUpsU&list=PLxCzCOWd7aiGFBD2-
2joCpWOLUrDLvVV_&index=23&pp=iAQB
Data Link Control (DLC) is a sublayer within the Data Link Layer that ensures
reliable data transmission over a physical medium. It includes techniques for flow
control and error control. One of the simplest and fundamental Automatic Repeat
reQuest (ARQ) protocols for error control is Stop-and-Wait ARQ. Let's explore each
of these aspects in detail:
1. Flow Control:
Flow control is a mechanism that ensures the sender doesn't overwhelm the
receiver with data. It regulates the rate of data transmission to match the receiver's
processing capability. There are various flow control techniques:
Sliding Window Flow Control: Sliding Window allows the sender to transmit
multiple frames before waiting for acknowledgments. The receiver maintains a
window that tracks the sequence numbers of the frames it expects to receive.
This allows for better utilization of the network's bandwidth.
Computer Networks 43
2. Error Control:
Error control mechanisms are designed to detect and correct errors that occur
during data transmission. Common error control techniques include:
Hamming Codes: Hamming codes are a type of error correction code. They
add redundancy to the data, allowing the receiver to correct errors. Hamming
codes are particularly useful in applications where error correction is essential.
3. Stop-and-Wait ARQ:
Sender's Role:
Computer Networks 44
3. If the sender receives the ACK within a timeout period, it assumes
successful transmission and proceeds to send the next frame.
4. If no ACK is received within the timeout, the sender assumes the frame was
lost or corrupted and retransmits it.
Receiver's Role:
Characteristics:
Has a drawback of low efficiency, as the sender waits for the ACK before
sending the next frame, leading to underutilization of the network's
bandwidth.
Computer Networks 45
In summary, Data Link Control and Protocols, including flow control and error
control, are essential components of reliable data communication. Stop-and-Wait
ARQ is a simple yet effective error control protocol that ensures the successful
delivery of data frames with low overhead, making it suitable for specific network
scenarios.
The Sliding Window Protocol is a flow control mechanism that allows for multiple,
unacknowledged frames to be in transit simultaneously. It is used to optimize
network efficiency by keeping the sender busy while ensuring that the receiver
processes data at its own pace. Key features include:
Computer Networks 46
Sender and Receiver Windows: The sender maintains a "sending window,"
which is a range of sequence numbers for frames that can be transmitted. The
receiver maintains a "receiving window," which is a range of sequence numbers
for frames it expects to receive.
Go-Back-N ARQ is an error control protocol that improves the efficiency of data
retransmission in cases of frame loss. Key characteristics include:
Computer Networks 47
Sender Behavior: The sender can transmit multiple frames before waiting for
acknowledgments. It maintains a send window of frames. If an acknowledgment
is not received for a particular frame, all subsequent frames in the window are
retransmitted, hence "Go Back" to the beginning of the window.
Selective Repeat ARQ is another error control protocol, but it is more efficient in
handling errors than Go-Back-N. Key features include:
Sender Behavior: The sender can transmit multiple frames before waiting for
acknowledgments. It maintains a send window of frames. If an acknowledgment
is not received for a particular frame, only that frame is retransmitted, while the
rest continue to advance.
Computer Networks 48
Receiver Behavior: The receiver acknowledges frames as they arrive and
buffers out-of-sequence frames. Once missing frames are received, they are
delivered to the network layer in the correct order.
Comparison:
Go-Back-N ARQ is suitable for networks with relatively low error rates and is
simpler to implement. However, it may lead to inefficiency in high-error
scenarios.
Selective Repeat ARQ is more efficient in networks with higher error rates, as it
avoids retransmitting frames unnecessarily.
Both Go-Back-N and Selective Repeat are used in various data link layer protocols,
including those in wireless communication and Ethernet networks, to improve
reliability and efficiency. The choice between them depends on the specific network
conditions and requirements.
Computer Networks 49
High-Level Data Link Control (HDLC) is a widely used data link layer protocol that
standardizes the framing, addressing, and error-checking procedures for reliable
and efficient data transmission. HDLC is considered a foundation for many other
data link layer protocols. Here's an overview of HDLC:
1. Framing:
HDLC frames data for transmission. It uses a special flag sequence (01111110)
to delineate frames. This flag sequence helps identify the start and end of a
frame.
The frame structure includes fields for address, control, data, and error-
checking (FCS or Frame Check Sequence).
2. Addressing:
3. Control Field:
The control field in an HDLC frame carries information about frame types, such
as data frames, acknowledgment frames, or supervisory frames (used for flow
control).
4. Error Checking:
HDLC uses the Frame Check Sequence (FCS) field to perform error checking.
A cyclic redundancy check (CRC) algorithm is often used to calculate the FCS.
The receiver checks the FCS to detect any errors in the received frame.
5. Flow Control:
Computer Networks 50
HDLC provides flow control mechanisms, allowing the sender to adjust the rate
of transmission based on the receiver's ability to process data.
6. Modes of Operation:
7. Variants:
Applications:
Standardization:
HDLC's simplicity and robustness make it a foundation for various data link layer
protocols and a fundamental element in data communication and networking.
Computer Networks 51
Point-to-Point Access, PPP (Point-to-Point Protocol),
and PPP Stack
Point-to-Point (PPP) is a network protocol commonly used for establishing direct
connections between two network nodes, typically over serial communication links.
It's widely used in scenarios such as dial-up internet connections, serial connections
between routers, and more. Let's explore PPP and the PPP stack:
1. Point-to-Point Access:
Definition: PPP is a widely used data link layer protocol for establishing and
maintaining direct connections between two nodes in a network. It offers a
Computer Networks 52
standard method for encapsulating and transmitting multi-protocol data over
point-to-point links.
Features:
3. PPP Stack:
The PPP stack refers to the layered structure of protocols and components
involved in PPP communications. It consists of the following layers:
PPP Frame: The PPP frame is the basic unit of data transfer. It includes
flags for frame delineation, control information, data, and error-checking
(CRC).
Computer Networks 53
The PPP stack operates on the data link layer (Layer 2) of the OSI model,
allowing it to work with various network layer protocols (Layer 3), such as IP,
IPv6, and IPX.
In addition to the core components, PPP can also include security features,
quality of service (QoS) settings, and other options to meet the specific
requirements of the network connection.
PPP is a versatile and widely used protocol for point-to-point connections, offering
flexibility and reliability for various applications, including dial-up networking, serial
connections between routers, and more. The PPP stack defines a standardized
structure for establishing and maintaining these connections while supporting
multiple network layer protocols.
Computer Networks 54
The Medium Access Control (MAC) sublayer is part of the Data Link Layer and is
responsible for managing access to the shared communication medium in a
network. One of the critical challenges it addresses is the Channel Allocation
Problem, which involves deciding how devices share the communication channel
efficiently. This problem is particularly relevant in shared media networks, such as
Ethernet or wireless LANs. Here's an overview:
There are various methods for solving the Channel Allocation Problem:
1. Contention-Based Access:
Carrier Sense Multiple Access (CSMA): Devices listen to the channel and
wait for it to be idle before transmitting. If multiple devices sense an idle
channel simultaneously, they may contend to transmit. CSMA is used in
Ethernet networks.
2. Controlled Access:
Computer Networks 55
Frequency Division Multiple Access (FDMA): Devices are assigned
specific frequency bands to use for communication. It's used in some radio
and satellite networks.
3. Polling:
4. Reservation-Based:
Devices request reservations for specific time slots or frequency bands, and
the central authority grants or denies these requests. Used in some satellite
and wireless networks.
3. Challenges:
Efficiency: The method chosen must ensure efficient use of the channel and
minimize idle time while avoiding excessive collisions.
Scalability: The method should scale well with an increasing number of devices
on the network.
The choice of channel allocation method depends on the specific network type,
requirements, and technologies in use. Different network technologies use various
combinations of these methods to manage the channel efficiently and provide
reliable communication.
Computer Networks 56
Controlled Access in Network Communication
Controlled access is a method of channel allocation used in network
communication. It involves a controlled, organized approach to determining which
devices on a network are allowed to transmit data at any given time. Unlike
contention-based methods like Carrier Sense Multiple Access (CSMA), where
devices contend for access to the medium, controlled access methods rely on
predefined schedules or controlled mechanisms for device access. One of the most
common examples of controlled access is Time Division Multiple Access (TDMA).
Operation:
Devices can transmit their data exclusively during their allocated time slots.
Devices wait for their specific time slot to send data and avoid transmitting
outside of their allocated time.
Advantages:
Efficient: TDMA allows devices to utilize the channel fully, and there is no
contention for access.
Applications:
Computer Networks 57
TDMA is commonly used in various wireless communication systems,
including cellular networks (2G, 3G, and 4G), satellite communication, and
some radio systems. It's also used in some wired communication systems.
Operation:
Advantages:
Non-Interfering: FDMA ensures that devices do not interfere with each other
because they have their dedicated frequency bands.
Controlled access methods like TDMA and FDMA are employed in scenarios where
predictable and organized access to the communication channel is required. These
methods help manage network traffic efficiently and minimize the chances of
collisions and interference, making them suitable for various applications in both
wired and wireless communication.
Computer Networks 58
operates as a separate communication path, allowing multiple devices or
conversations to occur simultaneously without interference. Channelization is
particularly relevant in scenarios where shared communication mediums need to
accommodate various data streams efficiently. There are various methods and
approaches to channelization:
Computer Networks 59
Operation: Each user's data is transmitted using a unique spreading code.
These codes are designed to be orthogonal, allowing multiple signals to
coexist in the same frequency range without significant interference. CDMA
is commonly used in 3G and 4G cellular networks.
CSMA: In CSMA, devices listen to the medium to check if it's idle before
transmitting. If the medium is busy, they wait until it's clear. CSMA can be
Computer Networks 60
divided into several variants:
TDMA: TDMA divides the medium into time slots, with each device
allocated a specific time slot during which they can transmit. This is
common in cellular networks.
FDMA: FDMA divides the medium into frequency bands, and each device is
assigned a specific frequency band for transmission. This is used in some
radio and satellite networks.
5. Token Passing:
Computer Networks 61
Token Passing: In this method, devices take turns to transmit data by
passing a token from one device to the next. Only the device holding the
token is allowed to transmit.
6. Polling:
7. Random Access:
Random Access: In this category, protocols like ALOHA and its variants
allow devices to transmit data at random times. Devices monitor the
medium for collisions and retransmit if necessary.
The choice of a multiple access protocol depends on factors such as the network
type, technology, traffic patterns, and requirements. Each protocol has its strengths
and weaknesses, making it suitable for specific scenarios. Network designers select
the most appropriate protocol to optimize network performance and reliability.
Computer Networks 62
IEEE 802.3 (Ethernet) for LANs:
2. Key Features:
Data Link Layer: Ethernet operates at the Data Link Layer (Layer 2) of the
OSI model and uses MAC (Media Access Control) addresses to identify
devices on the network.
3. Variants:
Computer Networks 63
without the need for physical cables. Wi-Fi enables wireless Internet access,
networking, and device connectivity.
2. Key Features:
3. Variants:
Wi-Fi 6 (802.11ax): Provides higher data rates, lower latency, and better
performance in congested environments.
Wi-Fi 6E: An extension of Wi-Fi 6 that utilizes the 6 GHz band for even
greater capacity and less interference.
Both IEEE 802.3 (Ethernet) and IEEE 802.11 (Wi-Fi) are integral to modern
networking, offering wired and wireless solutions to cater to a wide range of
networking needs. The choice between them depends on factors like network
design, coverage area, and device mobility.
Computer Networks 64
high‐speed LANs
High-speed LANs (Local Area Networks) refer to networking environments that are
designed to provide fast data transmission rates within a limited geographical area,
typically within a building, campus, or data center. These networks are crucial for
supporting the increasing demands for bandwidth and performance, particularly in
businesses and organizations. High-speed LANs are characterized by their ability to
handle large volumes of data, support multiple users, and ensure low latency. Here
are some key aspects and technologies associated with high-speed LANs:
2. Fiber Optic Cabling: To achieve high data rates, many high-speed LANs use
fiber optic cabling. Fiber optics can transmit data at very high speeds and over
longer distances compared to traditional copper cabling.
4. Virtual LANs (VLANs): VLANs are used to segment LANs into multiple logical
networks, enabling improved network organization and security. They are
essential in larger high-speed LANs.
6. Wireless LANs (Wi-Fi): While Wi-Fi is often associated with wireless networks,
it can also provide high-speed LAN connectivity when using technologies like
Wi-Fi 5 (802.11ac) and Wi-Fi 6 (802.11ax). These standards offer increased
data rates and improved network capacity.
Computer Networks 65
7. Network Management: High-speed LANs require robust network management
tools to monitor, optimize, and troubleshoot network performance. Network
management solutions help ensure smooth operation and minimize downtime.
9. Jumbo Frames: Some high-speed LANs make use of jumbo frames, which are
larger than standard Ethernet frames. Jumbo frames can reduce overhead and
improve data transfer efficiency.
10. 10GBASE-T: This is a high-speed Ethernet standard that uses copper cabling
(like Cat 6a or Cat 7) to support 10 Gbps data rates. It's commonly used for
high-speed LANs in data centers and enterprise networks.
11. Data Center LANs: High-speed LANs are especially prevalent in data centers,
where massive amounts of data need to be efficiently managed and
transmitted. Technologies like 100 Gigabit Ethernet (100 GbE) are often used to
meet these demands.
Token Ring:
Computer Networks 66
around the network, and a device can only transmit data when it holds the
token.
Operation:
Devices are connected in a physical ring, but the actual data transmission
can occur in a star-wired configuration.
A token, a special data packet, circulates on the network. Only the device
holding the token can transmit data.
Advantages:
Predictable access: Since devices must wait for the token to transmit,
collisions are minimized.
Fairness: Token Ring provides fair access to all devices on the network.
Disadvantages:
Token Bus:
Definition: Token Bus is another LAN technology where devices are connected
in a linear bus topology. Like Token Ring, a token is used to control access to
the network.
Operation:
Computer Networks 67
A token is circulated along the bus, and only the device with the token can
transmit data.
When a device is done transmitting, it releases the token, allowing the next
device on the bus to access the network.
Advantages:
Simple cabling: Token Bus used a simpler linear bus topology compared to
the ring.
Predictable access: Collisions are minimized since devices must wait for
the token.
Disadvantages:
Slower adoption: Token Bus had limited adoption and was largely
overshadowed by Ethernet.
Limited scalability: Like Token Ring, Token Bus had limitations in terms of
scalability.
Lack of flexibility: The linear bus topology made it less flexible for network
expansion.
Both Token Ring and Token Bus were early attempts to address the problem of
medium access control in LANs. However, they were largely superseded by
Ethernet, which offered higher speeds and easier scalability. Ethernet's dominant
position in the LAN market led to its widespread adoption, while Token Ring and
Token Bus became less common over time.
Token Bus network is a standard in which tokens are passed along a virtual ring. In
the token bus network bus topology is used as physical media.
In this, the virtual ring is created with stations and therefore tokens are
subsequently passed from a station during a sequence with this virtual ring. Every
station or node in the token bus network knows the address of its predecessor
station and its successor station. A node (station) can transmit the data if and only if
it has a token. Its working rule is analogous to the token ring network.
Computer Networks 68
Token Bus
Token Ring is defined by the IEEE 802.5 standard. In the token ring network, the
token is passed over a physical ring instead of a virtual ring.
In this, a token is a special frame and a station can transmit the data frame if and
only if it has a token. And The tokens are issued on successful receipt of the data
frame.
Computer Networks 69
Token Ring
The token bus network is simply While the token ring network is
2.
designed for large factories. designed for offices.
6. The maximum time it takes to reach While the maximum time to reach
the last station in a token bus the last station in the token ring
Computer Networks 70
network cannot be calculated. network can be calculated.
In a token bus network, the cable In a token ring network, the cable
8.
length is 200m to 500m. length is 50m to 1000m.
12. It does not keep routing details. It keeps the information of routing.
1. Topology:
FDDI LANs are typically configured in a dual-ring topology. This means that
data travels in two counter-rotating rings, providing redundancy and fault
tolerance. If a break in one ring occurs, the network can still operate on the
other.
2. Data Rates:
Computer Networks 71
FDDI supports data transfer rates of 100 Mbps (megabits per second),
making it significantly faster than traditional Ethernet LANs.
3. Media:
FDDI networks use fiber optic cabling, which provides high bandwidth and
is immune to electromagnetic interference. This makes FDDI well-suited for
environments where reliability is essential.
4. Token Passing:
Similar to Token Ring, FDDI networks use token passing to control access
to the network. A token is passed between devices, and only the device
holding the token can transmit data.
5. Fault Tolerance:
FDDI is known for its built-in fault tolerance. In the event of a cable break or
other failure, the network can continue to operate by using the secondary
ring. This redundancy is essential for applications that require high
availability.
6. Management:
7. Standards:
8. Applications:
FDDI LANs are often used in critical applications such as data centers,
financial institutions, and other environments where network reliability and
high-speed data transfer are essential.
FDDI operates at the data link layer (Layer 2) of the OSI model and uses
MAC (Media Access Control) addresses for device identification.
Computer Networks 72
10. Legacy Technology:
While FDDI was once a popular LAN technology, it has largely been
replaced by Ethernet in most modern LAN environments due to Ethernet's
widespread adoption and cost-effectiveness.
FDDI-based LANs are a prime example of how technology has evolved to meet the
demands of specific applications and industries. While they are no longer as
commonly deployed in new installations, FDDI networks continue to operate in
certain environments where high reliability and fault tolerance are critical.
1. Repeater:
Computer Networks 73
them to the next segment of a network. Its primary function is to extend the
range of a network by boosting signal strength.
Use Cases:
2. Hub:
Use Cases:
Small Networks: Hubs are suitable for small networks with minimal data
traffic.
Monitoring and Packet Capture: They are used for network monitoring
and packet capture, where all network traffic is required to be visible.
3. Switch:
Function: A switch operates at the data link layer (Layer 2) of the OSI
model. It intelligently forwards data to the specific device on the network by
using MAC addresses. Switches are more efficient than hubs because they
don't broadcast data to all devices. Instead, they create a MAC address
table to make forwarding decisions.
Use Cases:
Computer Networks 74
VLAN Support: Switches often support virtual LANs (VLANs) to logically
segment a network.
4. Bridge:
Function: A bridge operates at the data link layer (Layer 2) and is used to
connect and filter traffic between two or more network segments. It is
primarily used to divide a network into smaller segments to reduce
broadcast domains and improve network performance.
Use Cases:
In summary:
Hub: Central connecting point for devices in a network. Broadcasts data to all
connected devices. Suitable for small networks or monitoring purposes.
In modern networks, switches are the most common and essential devices for
managing LAN traffic efficiently, while repeaters and hubs are less commonly used
due to their limited capabilities. Bridges are still relevant in certain scenarios where
network segmentation is necessary.
Unit-3
Computer Networks 75
Network Layer:
The network layer is the third layer of the OSI model and is primarily responsible for
the transportation of data packets from the source to the destination across various
interconnected networks. Its key functions include routing, logical addressing, and
fragmentation & reassembly.
2. Routing:
Determines the best path for data packets to reach their destination.
4. Congestion Control:
Computer Networks 76
The primary protocol at the network layer responsible for addressing and
routing packets across networks.
IPv4 and IPv6 are the two versions of the Internet Protocol.
2. Routing Protocols:
3. Devices:
1. Routing Algorithms:
2. Congestion Control:
4. Security:
Computer Networks 77
Designing protocols and mechanisms to secure data transmission and
prevent unauthorized access or attacks at the network layer.
6. Scalability:
Routing Algorithms:
Routing algorithms are fundamental to the network layer, determining the paths data
packets take from a source to their destination across interconnected networks.
Several types of routing algorithms exist, each with unique characteristics and
applications:
Each router maintains a table with the distance (number of hops) to reach
all destinations.
Simple and easy to implement but may result in slow convergence and
routing loops.
2. Link-State Routing:
Computer Networks 78
Efficient and provides faster convergence, but requires more memory and
processing power.
Similar to distance vector but includes additional information like policy and
path attributes.
4. Hierarchical Routing:
5. Adaptive Routing:
6. Static Routing:
Suitable for small networks with simple topologies but lacks adaptability.
Computer Networks 79
Increases the congestion window by a small amount on successful
transmission and decreases it significantly upon congestion detection.
Monitors queue lengths and selectively drops packets before the queue
becomes congested, preventing a sudden burst of congestion.
Monitors packet queuing delays and drops packets if the queue delay
exceeds a threshold.
Prioritizes certain types of traffic to ensure better service for critical data,
like voice or video.
6. Buffer Management:
Host-to-Host Delivery:
Host-to-host delivery refers to the process of transmitting data from one device
(host) to another across a network. It involves several interconnected layers and
protocols working together to ensure successful communication.
Computer Networks 80
Internetworking:
Internetworking refers to the concept of connecting multiple networks to enable
communication between devices or hosts that are part of different networks. This is
achieved through the use of devices like routers and switches that operate at the
network layer (Layer 3 of the OSI model) to forward data packets between
networks.
Routers: These devices connect different networks and determine the best
path for data packets to travel from the source to the destination. They use
routing tables and algorithms to make forwarding decisions based on logical
addresses (such as IP addresses).
Switches: Operate at Layer 2 (Data Link Layer) and forward data within a
single network based on MAC addresses. They help in creating and maintaining
local area networks (LANs).
Addressing:
Addressing in networking involves assigning unique identifiers to devices to
facilitate communication. At the network layer, IP addresses are used for addressing
hosts on a network. There are two primary versions of IP addresses:
IP addresses help routers and other networking devices to correctly route data
packets to their intended destinations across interconnected networks.
Routing:
Routing is the process of determining the best path for data packets to reach their
destination. It involves various routing algorithms and protocols, such as:
Computer Networks 81
Exterior Gateway Protocols (EGPs): Used between different autonomous
systems (e.g., BGP).
Routing decisions are based on factors like network topology, hop counts, link
costs, and quality of service requirements.
Summary:
Host-to-host delivery involves transmitting data across interconnected networks.
Routing determines the best path for data packets to travel through
interconnected networks.
Classful IP Addressing:
In the classful addressing scheme, IP addresses were divided into predefined
classes: A, B, C, D, and E.
Classes of IP Addresses:
1. Class A:
First octet (8 bits) reserved for the network address, and the next three
octets for hosts.
2. Class B:
Computer Networks 82
Range: 128.0.0.0 to 191.255.0.0
First two octets (16 bits) reserved for the network address, and the next two
octets for hosts.
3. Class C:
First three octets (24 bits) reserved for the network address, and the last
octet for hosts.
4. Class D:
5. Class E:
Classful addressing had limitations in efficiently utilizing IP address space and did
not account for varying network size requirements, leading to IP address exhaustion
and inefficient allocation of address blocks.
Computer Networks 83
CIDR introduced a more flexible approach to IP addressing, allowing variable-length
subnet masking (VLSM) and supernetting to efficiently allocate IP addresses and
subnetting.
Features of CIDR:
1. Prefix Notation:
The notation specifies the network portion and the remaining bits for hosts.
3. Supernetting:
Subnet
A subnet, short for subnetwork, refers to a logical subdivision of an IP network.
Subnetting allows a larger network to be divided into smaller, more manageable
parts, each with its own unique network address. It's a fundamental concept in IP
networking that enables efficient use of IP addresses, improves network
performance, and enhances security.
Purpose of Subnetting:
Computer Networks 84
1. IP Address Conservation: Subnetting helps optimize the allocation of IP
addresses by breaking down a larger network into smaller subnetworks. This
prevents wastage of IP addresses in smaller networks.
Components of a Subnet:
1. Subnet Mask: A subnet mask determines the network and host portions of an
IP address. It's a 32-bit number written in dotted-decimal notation (e.g.,
255.255.255.0 for a typical Class C network) that separates the network bits
from the host bits.
2. Network Address: This is the address that identifies the subnet itself. It's
obtained by performing a logical AND operation between the IP address and the
subnet mask.
Subnetting Process:
1. Determine the Required Subnets: Based on the network's needs, decide on
the number and size of subnets required.
3. Create Subnet Addressing Scheme: Use the subnet mask to determine the
network address range for each subnet and assign IP addresses accordingly.
Computer Networks 85
Example:
Given a Class C network address 192.168.1.0 and a subnet mask of 255.255.255.0
(/24), subnetting can create multiple smaller subnetworks (e.g., 192.168.1.0/24,
192.168.2.0/24, etc.) with their unique network addresses and host ranges.
ARP Reply: The device that holds the IP address responds with its MAC
address, allowing the requesting device to build its ARP cache and establish
communication.
Routing: Defines how data packets are routed between devices using logical
addressing.
Computer Networks 86
Error Reporting: Provides feedback about problems encountered during
packet transmission (e.g., destination unreachable, time exceeded).
Network Diagnostics: Used for tools like Ping (to check connectivity) and
Traceroute (to trace the path of packets).
Error Reporting: Provides error messages for IPv6 packet handling, such as
destination unreachable or packet too big.
Neighbor Discovery: Helps nodes discover other nodes on the same link and
performs functions like address resolution and router discovery.
Unit 4
Transport Layer
The Transport Layer is a critical component of the OSI (Open Systems
Interconnection) model responsible for ensuring reliable and efficient data transfer
Computer Networks 87
between devices across a network. Here's an overview of the Transport Layer:
Breaks down large data units from the Session Layer into smaller segments
for transmission.
2. End-to-End Connection:
3. Flow Control:
Computer Networks 88
Features: Ensures data integrity, sequencing, acknowledgment of received
data, and retransmission of lost packets.
Use Cases: Ideal for applications where data accuracy and reliability are
crucial (e.g., web browsing, email).
Use Cases: Used in applications where speed is more critical than data
integrity (e.g., video streaming, online gaming).
Well-Known Ports (0-1023): Reserved for standard services like HTTP (80),
FTP (21), SSH (22), etc.
Computer Networks 89
UDP is a connectionless, unreliable transport protocol.
2. Characteristics:
Simple and lightweight, suitable for applications where speed is prioritized over
data reliability.
3. Use Cases:
Real-time applications like VoIP (Voice over Internet Protocol), DNS (Domain
Name System), online gaming, and streaming media.
2. Characteristics:
Slower compared to UDP due to overhead but guarantees data integrity and
reliability.
3. Use Cases:
Applications where data accuracy and reliability are critical, such as web
browsing, email, file transfer, etc.
Computer Networks 90
Congestion Control:
1. Purpose:
2. Techniques:
QoS mechanisms prioritize certain types of traffic to ensure better service for
critical applications.
2. Techniques:
Computer Networks 91
Traffic Prioritization: Assigning priority levels to different types of traffic (voice,
video, data) to ensure consistent service.
Summary:
UDP vs. TCP: UDP is faster but less reliable, while TCP provides reliable data
delivery.
Congestion Control: AIMD, RED, and ECN are used to manage network
congestion.
Quality of Service: Prioritizes critical traffic for better service through traffic
prioritization, shaping, and differentiated services.
Application Layer
The Application Layer in networking encompasses various protocols and models
that enable communication between applications running on different devices.
Here's an explanation of the Client-Server Model and the Socket Interface:
Client-Server Model:
1. Concept:
2. Roles:
Computer Networks 92
Client: Initiates requests to the server and uses the services provided.
3. Characteristics:
Asymmetric Role: Clients and servers perform different functions within the
communication.
4. Examples:
Web servers (e.g., Apache, Nginx) serving web pages to clients (browsers like
Chrome, Firefox).
Email servers (e.g., SMTP, IMAP) providing email services to email clients
(Outlook, Thunderbird).
Socket Interface:
1. Definition:
2. Socket Types:
3. Functions:
Computer Networks 93
Data Transfer: Allows sending and receiving data through the socket.
4. Implementation:
Summary:
Client-Server Model: Divides tasks between service providers (servers) and
service requesters (clients) in a centralized manner.
2. Components:
DNS Servers: Store domain name/IP address mappings and handle DNS
queries.
DNS Resolver: Receives DNS queries from client applications and interacts
with DNS servers to resolve domain names.
3. Hierarchical Structure:
Computer Networks 94
4. Operations:
SMTP is a protocol used for sending and receiving email over the internet.
2. Operations:
3. Message Format:
2. Operations:
File Transfer: Upload and download files between the client and server.
3. Modes:
FTP Modes: FTP operates in two modes - the default is the standard FTP
mode and the other is the passive mode, which can resolve issues related to
Computer Networks 95
firewalls.
4. Ports: Uses port 21 for control (commands) and port 20 for data transfer (in
active mode).
HTTP is the protocol used for transferring hypertext documents on the web.
WWW refers to the collection of web pages accessible via the internet.
2. Operations:
3. HTTP Methods:
Computer Networks 96