0% found this document useful (0 votes)
42 views76 pages

Computer Network Class-1

Uploaded by

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

Computer Network Class-1

Uploaded by

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

UNIT – 1

Introduction to Computer Networking


Topics Covered:
 DATA COMMUNICATIONS  PROTOCOL LAYERING
 Components  Scenarios
 Message  Principles of Protocol Layering
 Data Flow  Logical Connections
 NETWORKS  TCP/IP PROTOCOL SUITE
 Network Criteria  Layered Architecture
 Physical Structures  Brief Description of Layers
 NETWORK TYPES  Description of Each Layer
 Local Area Network  THE OSI MODEL
 Wide Area Network (WAN)  OSI versus TCP/IP
 The Internet  Lack of OSI Model’s Success
 Accessing the Internet
1.1 DATA COMMUNICATIONS
What is Data?
Data is a collection of raw facts, observations, or measurements that, by
themselves, may not carry meaning. When processed, organized, and interpreted, data becomes
information. Numbers, Facts, Observations, Measurements etc. are examples of Data.
Characteristics of Data:
1. Raw Form – Data is unprocessed and direct (e.g., numbers, text, sensor readings).
2. Variety – Data exists in multiple forms such as text, images, audio, video, or graphs.
3. Independent of Context – By itself, data may lack meaning until placed in context.
4. Stored & Transmitted – Data can be saved for future use or shared over communication
systems.
Types of Data:
There are two types of data, they are,
 Analog data
 Digital Data
Analog data:
Analog data is a type of data that is continuous – it changes smoothly and does not
jump in steps.
Examples:
 Your Voice: When you talk, your voice travels in the form of smooth sound waves.
 Temperature: The reading on a thermometer change continuously as the temperature rises or
falls.
 Clock with hands (Analog Clock): The hands move smoothly around the dial without
jumping numbers.
Digital Data:
Digital data is discrete – it is stored or sent in the form of numbers (mainly 0s and
1s).
Examples:
 Text on a Computer: Every letter you type is stored as binary numbers (e.g., A =
01000001).
 Digital Clock: It shows exact numbers (12:45), not smooth moving hands.
 Photos on Mobile: An image is stored as tiny dots (pixels), each represented by numbers.
 Music File (MP3): Your favorite song is saved as 0s and 1s so the computer can play it back.

Communication:
Communication is the process of sharing information, ideas, knowledge, and
feelings between two or more people using a medium.
When we communicate, we share information (data).
 Local Communication: Happens face-to-face.
 Remote Communication: Happens over a distance (using wired/wireless media).
Data refers to information presented in an agreed format between sender and receiver.
 It can happen through spoken words, written text, pictures, or symbols.
 We also communicate using body language, gestures, looks, and facial expressions, which
show how we feel and what we think.

 Spoken Word – “Talking, Phone Calls”


 Written Word – “Emails, WhatsApp, Letters”
 Visual Images – “Traffic Signs, Emojis, Pictures”
 Body Language – “Gestures, Smiles, Nods”
Types of Communication
↔️Downward Communication
 Flow: From senior (manager/teacher) to subordinates (employees/students).
 Purpose: To give instructions, assign duties, provide feedback, or announce decisions.
 Example: A teacher giving homework instructions to students.
↔️Upward Communication
 Flow: From subordinates to senior (bottom to top).
 Purpose: To share feedback, report progress/problems, or request approval.
 Example: An employee submitting a report to their manager.
↔️Lateral/Horizontal Communication
 Flow: Between people at the same level (colleagues, peers).
 Purpose: To share information, coordinate tasks, and save time.
 Example: Two classmates discussing how to complete a group project.
What is Data Communication?
Data Communication is the process of transferring data or information between two
or more devices (like computers, phones, or servers) through a medium such as cables, wireless
signals, or optical fibers.
 It ensures that information is transferred accurately and efficiently.
 The communication can be one-way (simplex) or two-way (half-duplex/full-duplex).
Example: Sending a WhatsApp message, streaming Netflix, or transferring files via Bluetooth
are all examples of data communication.
Characteristics of an Effective Data Communication:
A communication is considered effective if it meets four fundamental
characteristics:
Delivery:
The system must deliver data to the correct destination. Data must be received by the
intended device or user I.E. only by that device or user.
For example, if you send an email to your teacher, it should reach only your teacher, not
someone else. If it goes to the wrong person, the communication has failed.
Example: Sending money through UPI must deliver to the correct account holder.
Accuracy:
The system must deliver the data accurately (without errors). If the information
changes during transmission, it becomes useless. Imagine if you typed “1000”, but the receiver
gets “10000”—that’s an error.
Example: Downloading a PDF file if some parts are missing or corrupted, you can’t read it
properly.
Timeliness:
The system must deliver data in a timely manner (Data must be delivered on time).
Late delivery makes data useless.
In the case of video and audio, timely delivery means delivering data as they are produced, in the
same order that they are produced, and without significant delay. This kind of delivery is called
real-time transmission.
Example: If your friend says “Hello” on a video call but you hear it after 10 seconds, the
conversation won’t flow properly. Stock market trading apps need data in real-time; delays can
cause losses.
Jitter:
Jitter means, variation in packet arrival time.
When we send audio, video, or any data over the internet, the information is broken into small
packets. These packets should ideally arrive at the receiver at equal time intervals (like every
30 milliseconds). But due to network congestion, traffic, or delays, some packets arrive earlier
and some arrive later. This difference in arrival time is called jitter.
1.1.1 Components of a Data Communication System
To communicate or exchange information, certain components are required. A data
communication system is made up of five main components (see Figure 1.1):

Message: The actual information or data that needs to be communicated. Example: A text
message, audio, video, or file.
Sender: The device that creates and sends the message. Example: Computer, mobile phone, or
sensor.
Receiver: The device that receives the message. Example: Another computer, mobile phone, or
printer.
Transmission Medium: The path through which the message travels from sender to receiver.
Example: Cables (coaxial, fiber optic), wireless signals (radio waves, Bluetooth, Wi-Fi).
Protocol: A set of rules that both sender and receiver must follow to communicate properly.
Example: HTTP (for web), SMTP (for email), TCP/IP (for internet).
1.1.2 Message
A message is the actual information that needs to be communicated between devices.
It can take different forms such as text, numbers, images, audio, or video.
Text: Text is stored as a sequence of bits (0s and 1s). Each character (letter, number, or symbol)
is represented by a code. The most common system is Unicode, which uses 32 bits to represent
characters from almost any language in the world.
Numbers: Numbers are also stored as bit patterns. Unlike text, numbers are directly converted
into binary (0s and 1s). This makes it easy for computers to perform mathematical
calculations.
Images: Images are made up of pixels (tiny picture elements). Each pixel is represented by a bit
pattern. The resolution (number of pixels) determines the quality of the image.
Example:
 1,000 pixels → lower quality
 10,000 pixels → higher quality but requires more memory
Gray Scale Images
 Images are not just black and white. images can also have shades of gray.
 To represent gray levels, we use more bits per pixel (Using more bits per pixel allows
representation of different shades of gray.)
Example with 2 bits (4 shades):
 00 → Black
 01 → Dark Gray
 10 → Light Gray
 11 → White
More bits = more shades = better image quality.
Color Images
 Colors are represented by combining primary colors.
 Two common methods:
a) RGB (Red, Green, Blue)
 Colors are formed by mixing Red, Green, and Blue in different intensities.
 Examples:
o Red + Green = Yellow
o Red + Blue = Magenta
o Green + Blue = Cyan
o All three (Red + Green + Blue) = White
b) YCM (Yellow, Cyan, Magenta)
 Another way to represent colors formed by combining Yellow, Cyan, and Magenta.
 Commonly used in printing systems.
Audio
 Audio refers to sound or music (like speech, songs, or noise).
 It is naturally continuous, not broken into separate parts like text or numbers.
 Example: When we speak into a microphone, our voice becomes an electric signal
(continuous form).
 In data communication, audio can be converted into digital signals (bits) so that
computers and devices can store or transmit it.
Video
 Video refers to the recording or broadcasting of moving pictures (movies, online
classes, TV shows).
 A video can be:
1. A continuous signal (like live TV recording).
2. A series of images (frames) shown one after another very quickly to create the
effect of motion.
 Example: A movie is made up of thousands of images played with sound to give us a
smooth motion effect.
1.1.3 Data Flow
A transmission mode (also called communication mode or data flow mode) is the
mechanism that defines the direction of data flow between two communication devices. In
simple words, it specifies how information travels between a sender and a receiver.
There are three types of transmission modes:
 Simplex mode
 Duplex mode
o Half duplex Mode
o Full duplex Mode

Fig. Types of transmission modes


Simplex Mode transmission mode:
Simplex mode is a type of transmission mode in which data flows in only one direction (from
sender to receiver).
 It is also called one-way communication or unidirectional communication.
 In this mode, one device acts only as a sender and the other only as a receiver.
 The receiver cannot send data back on the same channel.

Key Characteristics
1. Unidirectional: Data moves in one direction only.
2. No feedback: Receiver cannot acknowledge or respond.
3. Full channel utilization: The entire bandwidth is dedicated to transmission in one
direction.
4. Simple & low cost: Hardware is cheaper since no return channel is needed.
5. Limitation: No error correction through feedback; reliability depends entirely on the
sender.
Example: Computer Keyboard to Computer: When you press a key on a keyboard, it sends
signals to the computer, but the keyboard does not receive any data back. This is a classic
example of simplex communication.
 Television Broadcasting: TV stations transmit signals to viewers without receiving any data
back from the television sets. This one-way broadcast is a typical simplex transmission.
 Loudspeaker Systems: An announcer speaks into a microphone, and their voice is amplified
and sent through speakers to the audience. The speakers only receive the audio signal and do
not send any information back.
Other Real-life examples of this communication mode include:
 Radio broadcasting
 Computer to printer
 Fire alarm system
Advantages of Simplex Mode
1. Simplicity: Easy to implement since data travels only one way.
2. Cost-effective: Requires only one channel, reducing hardware cost.
3. No data collision: Since data flows in a single direction, collisions cannot occur.
4. Efficient for one-way communication: Ideal where only sending is needed (e.g.,
broadcasting, input devices).
5. No coordination needed: Transmitter and receiver don’t need to synchronize responses.
Disadvantages of Simplex Mode
1. No bidirectional communication: Receiver cannot send data back.
2. No error-checking or acknowledgment: Cannot confirm if data was received correctly.
3. Limited flexibility: Not suitable for tasks requiring feedback or interaction.
4. Outdated for modern networks: Modern systems require two-way data flow (e.g.,
internet, video calls).
Duplex mode:
Duplex communication is a data transmission mode in which the flow of
information is bidirectional, meaning both devices can act as sender and receiver. Unlike simplex
communication (which is one-way only), duplex allows interactive communication.
Duplex can be further divided into two categories:
1. Half-Duplex Mode – two-way, but only one direction at a time.
2. Full-Duplex Mode – two-way, both directions simultaneously.
Half-Duplex Mode:
Half-duplex mode is a type of duplex communication where data can flow in both directions, but
only one direction at a time.
 At a given moment, one device acts as the sender while the other acts as the receiver.
 To reply, the devices must take turns.
 It is similar to a one-lane road where vehicles from opposite directions must wait and pass
one after another.
Key Characteristics
1. Bidirectional communication – both devices can send and receive.
2. Not simultaneous – only one device can transmit at a time.
3. Turn-taking system – sender transmits, then waits, while the receiver responds.
4. More efficient than simplex since two-way communication is possible.
5. Slower than full-duplex because devices must wait for their turn.
6. Collision avoidance required (e.g., “push-to-talk” in radios).
Examples
 Walkie-Talkies: a walkie-talkie is a device that can be used to send message in both the
directions, but both the persons cannot exchange the message simultaneously. One can
only speak and the other can only listen (They cannot speak simultaneously).
 Two-Way Radios (with push-to-talk buttons): Common in security or military
communication.
 Web Browsing: A computer sends a request, waits, and then receives a response
from the server.
 Universal Serial Bus (USB): Data can flow in both directions but not at the same
instant.
Real world example: a one-way road, in which a vehicle traveling in the opposite direction of
the traffic has to wait till the road is empty before it can pass through.
Advantages of Half-Duplex Mode
1. Efficient use of channel: Enables two-way communication on a single channel.
2. Cost-effective: Requires less complex hardware compared to full-duplex systems.
3. Simplified collision handling: Since only one device transmits at a time, chances of
collisions are reduced.
4. Ideal for periodic communication: Suitable for cases where continuous simultaneous
communication isn’t needed.
Disadvantages of Half-Duplex Mode
1. Slower Data Transmission: Since data can only run in one direction at a time,
communication is naturally delayed compared to full-duplex systems where data can be
delivered and received simultaneously.
2. Increased Latency: The need to exchange between sending and receiving modes introduces
delay, which can affect performance in congestion applications.
3. Not Ideal for High-Traffic Networks: In networks with congestion or applications requiring
constant communication, half-duplex mode can become a restriction.
4. Inefficient for Complex Communications: For tasks that require frequent two way
communication, half-duplex can be less effective as it forces devices to wait their turn, which can
lead to pauses.
Full Duplex Mode:
In Full Duplex Mode, data transmission occurs simultaneously in both
directions. The sender can send data and receive data at the same time. It is a dual-way
communication system, where both devices act as sender and receiver simultaneously.
Key Characteristics
1. Bidirectional Communication – Both devices can send and receive at the same time.
2. No Waiting Required – Unlike half-duplex, no turn-taking is needed.
3. Most Efficient Mode – Maximizes the use of communication channels.
4. Requires Two Channels / Advanced Techniques – Achieved using separate paths or
techniques like echo cancellation.
5. High-Performance Use – Common in modern, high-speed communication systems.
Examples
 Video calls / video conferencing
 Audio calls (telephone systems)
 Live chats
Example: A telephone is a full-duplex device, where both people can talk and listen
simultaneously without waiting.
Advantages of Full-Duplex
 Enables simultaneous two-way communication, ideal for real-time applications (video
calls, online gaming).
 Highly efficient, as no time is wasted in waiting.
 Provides greater reliability and accuracy (no need for feedback/error correction due to
immediate communication).
Disadvantages of Full-Duplex
 Expensive – Requires two communication channels or complex technology.
 Complex design compared to simplex and half-duplex.
 High bandwidth demand – Not always necessary for simple applications.
1.2 NETWORKS:
Imagine you’re sending a WhatsApp message to your friend. You type ‘Hi’, press send, and
within seconds it appears on their phone, even if they are miles away. How does this happen?
What hidden system makes two devices share information so quickly? The answer is computer
networks.
What is computer network?
A network is a collection of two or more interconnected devices (such as computers,
servers, switches, and routers) that communicate with each other to share resources, exchange
data, and provide services.
In data communication, a network enables the transfer of information between devices using
hardware components (like cables, routers, Wi-Fi) and software protocols (like TCP/IP).
Key Components of a Network:
There are three main components in network. They are,
1. Nodes (Devices): These are the endpoints in a network.
o Examples: Computers, laptops, smartphones, printers, servers.
o Nodes are the ones that generate, receive, or process data.
2. Links (Medium): The pathways that connect devices.
o Can be wired (Ethernet cables, fiber optics) or wireless (Wi-Fi, Bluetooth,
satellite).
o Without links, devices would exist but could never communicate.
3. Protocols (Rules): A set of rules and standards that define how data is transmitted and
understood.
o Common protocols: TCP/IP, HTTP, FTP.
o Think of protocols as the language devices use to “talk” to each other.
Analogy for Easier Understanding
Think of a classroom as a simple model of a network:
 Students = Devices/Nodes: (Each student is like a computer or phone that can send or
receive information.)
 Spoken Language = Protocols: (For communication to happen, everyone must speak
and understand the same language—like English in the classroom, TCP/IP in a network.)
 Classroom Air = Medium/Link: (The medium through which communication happens;
without air, no sound can travel. Similarly, without a medium, no data can travel.)
1.2.1 Network Criteria
Just connecting devices is not enough (sufficient) to make a network useful. The network
must also work well, be dependable, and keep data safe. In other words, a good network needs
three key qualities:
1. Performance (speed),
2. Reliability (stability),
3. Security (safety)
Performance
 Definition: How well a network carries out communication.
 Measures:
o Transit time: The time taken for a message (or packet) to travel from source to
destination.
o Response time: The delay between a request and the corresponding response.
 Factors affecting performance:
o Number of users: Too many users can slow down the network.
o Transmission medium: Fiber optic cable is faster than copper; 5G is faster than
3G.
o Hardware capability: A powerful router can handle more traffic efficiently.
o Software efficiency: Poorly written applications may increase delays.
 Example for students:
o When you stream a movie on Netflix, if the buffering is low and video is smooth →
network performance is high.
o If it keeps pausing → network performance is poor.
Analogy: Think of a highway. Transit time = how long it takes a car to travel between two cities.
Response time = how long before you get a reply after honking (horning) at another car.
2. Reliability
 Definition: The ability of a network to consistently deliver data accurately and without
failure.
 Measures:
o Frequency of failure: How often does the network crash or drop connections?
o Recovery time: How quickly does it recover after a failure?
o Robustness: Can it handle unexpected problems like power failures or cable
cuts?
 Example for students:
o During an online exam, if the Wi-Fi disconnects often, the network is unreliable.
o If it stays connected without interruption, it is reliable.
Analogy: Like electricity supply—if power keeps going off, it’s unreliable; if it stays on
consistently, it’s reliable.
3. Security
 Definition: Protecting the network and data from unauthorized access, misuse, or
damage.
 Concerns:
o Unauthorized access (hackers stealing passwords).
o Data damage (corruption during transfer).
o Data loss (accidental deletion, hardware crash).
o Recovery policies (backups, disaster recovery plans).
 Example for students:
o When you log in to your college portal, you use a username and password →
that’s basic security.
o If data is encrypted while transferring marksheets online, hackers can’t read it →
that’s advanced security.
Analogy: Think of a bank. Security guards = firewalls, CCTV = monitoring systems, vault =
encryption.
1.2.2 Physical Structures
Before we start learning (dive into) about networks, we first need to understand some
basic features, called network attributes, that describe how a network is built and how it works.
Types of connection:
Before we discuss the types of connections, let’s understand what a
connection actually means in a network.
 A connection is simply a communication path that allows two or more devices to
exchange data.
 This path can be wired (like copper cable, fiber optic) or wireless (like Wi-Fi, Bluetooth,
or satellite).
 Without a connection, devices cannot share information, even if they are part of the same
network.
Why are Connection Types Important?
 The way devices share this path decides the efficiency, speed, and reliability of the
network.
 Some connections are exclusive (like a private road), while others are shared (like a
highway used by many vehicles).
Two Main Types of Connections
1. Multipoint (Multidrop): A single link shared by several devices. Like a public highway
where many vehicles travel together.
Point-to-Point Connection:
A point-to-point connection is a direct (dedicated) communication
link between exactly two devices (nodes: Sender  Receiver). The entire capacity of the
link is dedicated to just those two devices. No other device can use or interfere with the link.

Example-1: A telephone call between two people is point-to-point → only those two can hear
each other.
For example, a private road from your house to your friend’s house.
Key features of Point-to-point connection:
1. Dedicated Path: Only connected two devices use the connection.
2. Direct Communication: Data travels directly from sender to receiver without competing
(challenging) with others.
3. Reliable & Fast: Since no sharing, less chance of collision or delay.
4. Simple Protocols: Since there are only two devices, communication rules are simpler.
5. Stable Performance: No collisions or interference from outside devices.
6. Can be Physical or Logical:
1. Physical point-to-point: A direct cable or wire between two devices.
2. Logical point-to-point: A virtual tunnel or logical channel over a shared medium.
Examples in Real Life
 A cable connecting your computer directly to a printer.
 Laptop connected to a switch/router port with an Ethernet cable.
 Two routers connected with a leased line or fiber optic cable.
 USB connection between your phone and a computer.
Advantages
 High performance (dedicated bandwidth).
 Secure (harder for others to tap in).
 Easier to troubleshoot.
Disadvantages
 Expensive if many devices need to be connected (requires separate links).
Not scalable for large networks.
Multipoint (Multidrop) Connection:
A multipoint connection is a communication link that is shared by (connecting)
more than two devices. In this connection, all devices are connected to the same medium, and
they take turns using it and the capacity of the link is shared among all the connected devices. In
multipoint connection, at a given time, only one device may be allowed to send, while others
must listen.

Diagram (to draw on board)


Characteristics
1. Shared Medium: All devices use the same communication channel.
2. Resource Sharing: Bandwidth is divided or allocated among devices.
3. Economical: One link can serve many devices (cost-effective).
4. Access Control Needed: Devices must follow rules (like time slots or collision
detection). Since many devices share the link, rules (protocols) are needed to decide
who sends when.
5. Types:
o Spatially shared: If two or more devices use the link at the same time, they must
share the capacity.
o Time shared: Each device gets the link for a certain time slot (like turn-taking).
Examples: Real-life Analogy:
o A classroom discussion where many students share the same room. If one speaks, others
must listen.
o A conference call with multiple participants.
 Many people (devices) share the same road.
 Sometimes it’s fast, sometimes it’s crowded.
 Everyone must follow traffic rules (protocols) to avoid chaos.
🔹 Advantages
 Cost-effective (one link for many devices).
 Easy to add more devices.
 Good for environments where devices send data occasionally.
Disadvantages:
 Slower performance if too many devices use it.
 Less secure (data may be visible to all connected devices).
 Complex communication management (risk of collisions).
Physical Topology
Physical topology refers to the actual physical layout of network. i.e. physical
topology shows how devices are physically connected (with cables, hubs, switches, etc.), not just
how they logically communicate.
Example, think of it as the map or road layout of a city—it shows how houses (devices) are
connected by roads (links).
Types of Network Topology
The way to arrange or connect patterns of computers/nodes/devices
used in the network is known as network topology. The common types of network topologies are
as follows:
1. Bus topology
2. Star Topology
3. Ring Topology
4. Mesh Topology
5. Tree Topology
6. Hybrid Topology
MESH Topology:
In a mesh topology, every device is connected to every other device on the
network by a dedicated point-to-point connection.
Mesh consists of n(n-1)/2 physical channels to link n number of devices. For the same n devices
in the network, each device contains (n-1) input and output ports.

There are two types of methods to transmit data via the Mesh topology, they are:
1. Routing
2. Flooding
Routing:
In a mesh topology, every device (node) is connected to every other device, providing
multiple paths for data transmission. To manage these multiple paths efficiently, routing logic is
applied.
Flooding:
Flooding is a data transmission technique in which the same data packet is sent to all
nodes in the network, regardless of the destination.
How it works: Each node receiving the packet forwards it to all its neighbors (except the one it
came from). This continues until the packet reaches every node in the network.
Types of MESH Topology
1. Partial Mesh Topology: In this type of topology few of the systems are linked similarly
to mesh topology but few nodes are only linked to two or three devices.
2. Full Mesh Topology: Every node or device is linked to each other.
Features of Mesh Topology
1. Fully Connected (Fully Linked):
o Every device is directly connected to every other device.
o Provides multiple dedicated paths for communication.
2. Robust and Reliable:
o Failure of one link or node does not affect the entire network, since data can be
rerouted through alternate paths.
o No single point of failure.
3. Not Flexible (Complex Setup):
o Adding a new device requires a direct link with all existing devices, which makes
expansion difficult.
o The cabling and configuration become complex as the number of nodes increases.
4. High Cost of Cabling:
o Requires a large number of cables and ports.
o Becomes expensive for large networks.
5. Efficient Data Transmission:
o Since dedicated links exist, data can be transmitted simultaneously between different
pairs of nodes without collisions.
6. High Fault Tolerance:
o Even if multiple links fail, the network can still function using other available paths.
Advantage of MESH Topology
1. Each connection may carry its unique data load.
2. It is robust.
3. Fault can be diagnosed easily.
4. Facilitates security and privacy.
The Disadvantage of MESH Topology
1. Installation and configuration are not simple.
2. Cabling cost is higher.
STAR Topology:
In Star Topology all the nodes are linked to a common device called as hub via
a cable. This hub is the central node and all other nodes are linked to the central node.
Unlike Mesh topology, star topology does not permit straightforward communication between
the devices, a device needs to communicate through the hub. If a device requires sending data to
another device, it has to first transfer the data to the hub, and then the hub forwards that data to
the selected device.

Features of STAR Topology


1. Each node has its unique connection to the hub.
2. Hub works as a repeater for data transmission.
3. Can be utilized with twisted pair, Optical Fibre, or coaxial cable.
Advantage of STAR Topology
1. Speedy performance with a smaller number of nodes and low network traffic.
2. Hub can be easily upgraded without hassle.
3. Simpler to troubleshoot.
4. Simpler to set up and modify.
5. If there is a failure in one node then the failed node is only affected, and the rest of the
nodes can work without any issues.
The Disadvantage of STAR Topology
1. Expensive to install.
2. Expensive in usage.
3. If the hub crashes then the entire network is stopped because all linked nodes depend on
the hub.
4. Efficiency is dependent on the hub, that is it depends on its capacity.
BUS Topology
Bus topology is a type of network in which each computer and network device is joined to a
single cable. When it consists of exactly two endpoints, then it is called Linear Bus topology.

Features of BUS Topology


1. It sends data only in one direction.
2. Every device is linked to a single cable.
Advantage of BUS Topology
1. Cost-effective.
2. Cable requirement is minimal as compared to other topologies.
3. Useful in small networks.
4. Easy to understand.
5. Easy to expand by connecting two cables.
The Disadvantage of BUS Topology
1. The whole network fails if cables fail.
2. The performance of the network decreases in case network traffic is heavy or nodes are
more or the cable has a limited length.
3. It works slower as compared to the ring topology.
RING Topology
It is named ring topology because it creates a ring as each computer is linked to the neighbouring
computer, with the last one linked to the first, there are exactly two neighbours for each
computer.

Features of RING Topology


1. The multiple numbers of repeaters are installed for Ring topology with a high number of
nodes, because if one node wants to send some data to the last node in the ring topology
with more nodes like 100 nodes, then the data will have to travel through 99 nodes to
reach the 100th node. Hence repeaters are used in the network to prevent data loss.
2. The transmission is in one direction, but it is possible to implement bidirectional
transmission by having 2 connections between each Network Node, therefore also known
as “Dual Ring Topology”.
3. In the case of Dual Ring Topology, two ring networks are created, and data flow is in the
opposite direction. Hence, if the ring in one direction fails, the second ring can work as a
backup, to keep the network working.
4. Data is transmitted in a sequential manner that is bit by bit. Data transmitted, has to go
through each node linked in the network, till the final node.
Advantage of RING Topology
1. Transmitting network is not affected by huge traffic or by the addition of more nodes, as
only the nodes having tokens(short message) are allowed to transmit data.
2. Low cost to install and expand.
The Disadvantage of RING Topology
1. Troubleshooting is not simple in a ring topology.
2. The addition or removal of the computers interferes with the other nodes and network
activity.
3. The crashing of one node affects the whole network.
4. Initial installation cost is high therefore not applied at low-density traffic.
TREE Topology
It has a root node and all other nodes are linked to it creating a hierarchy. It is also called
“hierarchical topology”. It must have a minimum of three levels to the hierarchy.

Features of TREE Topology


1. Ideal if workstations are situated in groups.
2. Useful in Wide Area Network.
Advantage of TREE Topology
1. Extension of bus and star topologies.
2. Expansion of nodes is possible and easy.
3. Easily managed and maintained.
4. Error detection is easily done.
The Disadvantage of TREE Topology
1. Heavily cabled.
2. Costly.
3. If additional nodes are introduced, maintenance is difficult.
4. If the central hub fails, the network fails.
HYBRID Topology
It is two different kinds of topologies, which is a combination of two or more topologies. For
example, if in an office in some department ring topology is used and in another department in
the same place, star topology is used, connecting these topologies will form a Hybrid Topology
(ring topology and star topology).

Features of HYBRID Topology


1. It is an encapsulation of two or topologies
2. Inherits the benefits and disadvantages of the topologies included.
Advantage of HYBRID Topology
1. Reliable because Error detecting and troubleshooting are easy.
2. Effective.
3. Scalable as size can be increased easily.
4. Flexible.
Learn about the Types of Computers here.
The Disadvantage of HYBRID Topology
1. Complex in design.
2. Costly.
Types of Computer Networks
The computer networks can be categorized into four categories.
1. Based on Geographical Area
2. Based on Transmission Medium
3. Based on Communication Type
4. Based on Ownership
Networks Based on Geographical Area:
Computer networks can be categorized by the physical
area they cover. From short-range personal use to global communication infrastructure, there are
4 types of computer networks based on their size.

Personal Area Network (PAN):


A Personal Area Network (PAN) is the smallest type of
network, used for connecting personal devices over a short range, typically a few meters around
a single user. Devices like smartphones, tablets, smartwatches, and wireless headsets
communicate using technologies such as Bluetooth, infrared, or NFC.
Local Area Network (LAN):
A Local Area Network (LAN) connects computers and devices within a
confined (limited or restricted) area like a building, office, school, or hospital. LANs are
privately owned, easy to manage, and offer high-speed connectivity for sharing files, printers,
and applications.
Example: A school’s computer lab or a home Wi-Fi setup.

Example: A small office where many connected computers with a central router for files and
printing is exemplified by a LAN. The devices are interconnected through
preferably Ethernet cables or wirelessly through wireless networks.
Advantages Disadvantages
Transmission of data and services is relatively Need constant administration of
higher than other network connections. experienced engineers for functioning.
The Network Server acts as a central unit for the Probability of leak of sensitive data by
whole network. LAN administration.
Metropolitan Area Network (MAN):
A Metropolitan Area Network (MAN) spans a city or large
campus, linking multiple LANs for unified communication. Commonly used by universities,
governments, or large enterprises, MANs support high-bandwidth applications like video
conferencing across a metropolitan region.
Example: A city’s municipal network connects various public departments.
Example: A university, for instance, has many buildings linked with each other using a high-
speed fiber-optic cable, known as a MAN. The network enables students and faculty to use
resources and communicate in the space across buildings on campus.
Advantages Disadvantages
Provides Full-Duplex data transmission in the High probability of attack from hackers and
network channel for devices. cybercriminals due to large networks.
The network connection area covers an entire The need for good quality hardware and the
city or some parts using the optic cables. installation cost is very high.
Wide Area Network (WAN):
A Wide Area Network (WAN) covers large geographic areas, from
cities to countries and continents. WANs often use leased lines, satellite links, or the Internet for
connectivity. They allow remote offices or data centers to stay connected. SD-WAN improves
WAN efficiency through centralized, software-based management.
Example: A global corporation’s network linking offices in different countries.

Advantages Disadvantages
This network covers a high geographical High cost to set up the network and the Support of
area and is used for large-distance experienced technicians is needed to maintain the
connections. network.
They also use radio towers and connect It is difficult to prevent hacking and debug a large
channels for users. network.
Based on Transmission Medium:
Computer networks can also be classified based on the transmission
medium they use for sending and receiving data. There are two types of computer networks in
this category:
1. Wired Networks
In a wired network, devices are physically connected using cables, such as
copper wires (Ethernet, twisted pair, coaxial) or fiber optic cables for higher speeds and longer
distances. Wired networks are generally more stable and secure than wireless alternatives
because they are less susceptible to interference and eavesdropping.
The choice of cabling depends on network size, required bandwidth, and installation budget.
Wired connections are common in enterprise offices, data centers, and anywhere a reliable, high-
speed link is essential.
2. Wireless Networks
Wireless networks eliminate the need for physical cables by transmitting
data through electromagnetic signals such as radio waves or infrared light. Devices communicate
using built-in antennas and sensors.
Popular wireless network types include Wi-Fi for local connectivity, Bluetooth for short-range
device pairing, and cellular networks for wide-area wireless access.
Wireless networks offer flexibility and convenience, making it easy to connect mobile devices
and expand coverage without running new cables, but they may face signal interference and
require robust security measures.
Based on Communication
This category looks at the way devices share information over the
network. There are three types of computer networks based on how they communicate:
Point-to-Point Networks
A point-to-point network establishes a direct connection between
exactly two devices or nodes. This simple setup creates a dedicated communication path that
ensures reliable and secure data transfer between the two endpoints.
Point-to-point connections are used in many scenarios, such as connecting a computer to a
printer with a cable or setting up a dedicated leased line between two branch offices. Because no
other devices share the link, data collisions are eliminated and privacy is enhanced.

Multipoint Networks
In a multipoint network, multiple devices share a single communication
channel or link. Instead of creating a separate connection for each pair of devices, all nodes use
the same medium to send and receive data. This setup reduces the amount of cabling needed and
is cost-effective for networks where devices don’t need constant dedicated bandwidth.
However, since bandwidth is shared, performance can drop if many devices transmit data at the
same time. Multipoint configurations are suitable for environments like classrooms or small
office networks where users can share network resources efficiently.

Broadcast Networks:
Broadcast networks operate on a one-to-many principle. A single device
(the broadcaster) sends data to all other devices on the network simultaneously. Every receiving
device checks the broadcast data and processes it if it is relevant.
This method is ideal for distributing the same information to multiple recipients quickly and
efficiently. Examples include traditional TV and radio broadcasts, as well as some types of local
network protocols where data packets are sent to all nodes within a segment.
4. Virtual Private Networks (VPNs):
A Virtual Private Network (VPN) is not a physical
network but a secure method to create a private, encrypted connection over a public network,
such as the internet. VPNs establish a protected tunnel between a user’s device and a VPN
server, masking the user’s identity and encrypting all transmitted data.
This prevents hackers and unauthorized parties from accessing sensitive information. VPNs are
widely used by organizations to allow employees secure remote access to internal systems and
by individuals to protect their online privacy and bypass geographic restrictions.

Example: An example of this type of network is an employee who is working from home via
a Virtual Private Network, VPN, to access their employer’s secure network. The VPN makes sure
that the particular company resource the employee needs to access is available and can be
accessed safely as if the employee is still within the company’s LAN.
Based on Ownership
Computer networks can also be categorized by the types of ownership.
There are three types of computer networks based on ownership:
1. Private Network: A private network can be used by a specific organization or group. It
ensures secure and controlled access to data and resources, often through the use
of firewalls, encryption, and other security measures. Private networks are commonly used in
businesses, schools, and government agencies to protect sensitive information and maintain
internal communications.
2. Public Network: A public network is accessible to anyone and is typically exemplified by the
Internet. It allows widespread connectivity and information sharing but lacks security features
compared to private networks. Public networks are ideal for general communication, accessing
public information, and connecting with a broad audience.
3. Hybrid Network: A hybrid network combines elements of both private and public networks,
offering a balance of security and accessibility. This type of network allows organizations to
maintain secure, internal communications while also leveraging the benefits of public networks
for broader connectivity. Hybrid networks are flexible and can be tailored to meet specific needs,
such as using a private network for sensitive data and a public network for less critical
operations.
Applications of Computer Networks
Some of the main applications of computer networks are:
 Communication: Send emails in a flash. Make video calls to anyone, anywhere. Chat
with ten people at once—no more waiting for letters.
 Resource Sharing: Use one printer for the whole office. Share expensive software
among many users: access scanners and storage from any desk.
 Data Sharing: Share files between computers instantly. Work on the same document
together. Keep everyone updated with the latest version.
 Information Access: Search millions of websites in seconds. Read the news as it
happens. Find answers to any question right away.
 Remote Work: Do your job from home or a beach. Connect to office computers from
anywhere. Attend meetings without driving there.
 Education: Take classes from top teachers worldwide. Submit homework online. Learn
new skills through video lessons.
Advantages of Computer Networks
Some of the main advantages of computer networks are:
 Resource Sharing Capabilities: You can send files to anyone on the network—no need
for USB drives or emails. Just drag and drop.
 Hardware Cost Reduction: One printer works for everyone. The same goes for scanners
and storage drives. Why buy ten when one does the job?
 Remote Access Flexibility: Connect to your office computer from home. Access your
files from the coffee shop. Pretty handy, right?
 Enhanced Collaboration: Many people can work on the same project together. Changes
show up instantly for everyone.
 Data Backup Solutions: Store essential files in one secure place. Set up automatic
backups so nothing gets lost.
 Real-time Communication: Send messages instantly. Video chat with teammates. Share
screens to solve problems quickly.
 Centralized Management: IT personnel can update all computers simultaneously. They
can fix issues remotely, too. Saves tons of time.
 Internet Connectivity Sharing: One internet line serves the whole office. Everyone gets
online without separate connections.
Disadvantages of Computer Networks
Here are the main disadvantages of computer networks:
 Security risks: Hackers can attack from anywhere. One weak password puts everyone at
risk. Viruses spread fast through connected computers.
 Infrastructure Expenses: Setting up networks isn’t cheap. You need cables, routers, and
switches. Plus, you’ll pay experts to install everything.
 System Downtime Impact: If the main server crashes, nobody can work. One bad cable
can bring the whole office to a standstill.
 Regular Maintenance: Someone must watch the network all day. Updates, backups, and
fixes never end. That means hiring IT staff.
 Technical Complexity: More computers mean more problems. Finding issues becomes
like solving puzzles. Training people takes forever.
 Bandwidth Limitations: Too many people online? Everything crawls—videos buffer.
Files take ages to download.
 Compatibility Issues: Not all machines play nice together. Different systems create
compatibility nightmares.
Legend (Symbols in the diagram)
 Host (PC) → Any type of device (computer, laptop, printer).
 Switch → Central device used in modern LANs.
 Cable Tap → Connection point used in the old common cable LAN.
 Cable End → Terminator at both ends of the common cable (to prevent signal
reflection).
 Common Cable → Shared cable (used in past LANs).
 Connection → Dedicated links between switch and hosts (used today).
LAN with a common cable (Past)
 In the early days, all computers (hosts) in a LAN were connected to one common cable
(like a bus topology).
 This cable acted as the main communication line.
 Every device was "tapped" into the same cable.
 Drawback:
o If the cable failed, the entire network would stop working.
o Data collisions were common (when two computers tried to send data at the same
time).
o Limited scalability (only a small number of computers could be connected).
b. LAN with a switch (Today)
 In modern LANs, a switch is used.
 Each computer is connected to the switch with its own dedicated link.
 The switch acts as the central device that manages communication between hosts.
 Advantages:
o No collisions (switch sends data directly to the destination).
o More reliable (failure of one cable affects only one computer, not the whole
LAN).
o Easier to expand by adding more devices to the switch.
o Much faster and efficient than the old common cable method.
Internetwork:
An internetwork is formed when two or more computer networks (such as LANs or WANs) are
connected together so that devices in one network can communicate with devices in another.
 It is not just one single network but a combination of multiple networks linked by
networking devices (mainly routers).
 The purpose of an internetwork is to enable communication, resource sharing, and data
exchange between different networks.
Examples
1. A company with offices in two cities connects their LANs using a leased WAN line →
private internetwork.
2. Two universities interconnect their campus networks through high-speed fiber →
internetwork.
3. The Internet (uppercase I) is the largest internetwork in the world, made up of thousands of
interconnected smaller networks.

Figure 1.11: An internetwork made of two LANs and one point-to-point WAN
Explanation
 On the left side, we see a LAN (Local Area Network) in the West Coast office.
 On the right side, there’s another LAN in the East Coast office.
 Each LAN allows employees in the same office to communicate with each other.
To connect these two distant offices:
1. Routers (R1 & R2) are placed at each office.
o R1 connects the West Coast LAN to the WAN.
o R2 connects the East Coast LAN to the WAN.
2. The company leases a point-to-point WAN link (e.g., from a telephone company).
3. This WAN acts as a bridge between the two LANs.
Key Idea
 After interconnecting the two LANs using a WAN, the company now has an
internetwork (or private internet with lowercase “i”).
 This allows communication between employees at both offices, even though they are far
apart geographically.
Explanation of Figure 1.12
This figure shows a heterogeneous internetwork — meaning it is built using a mix of different
network types (LANs and WANs).

🔎 Components in the Diagram


1. Switched WAN (middle left):
o A switched network (like a telephone system or MPLS backbone).
o Provides connectivity among multiple routers.
2. Point-to-Point WAN links (dotted lines):
o Dedicated links connecting two devices directly (e.g., between routers or between
a modem and a provider).
o Example: The connection from a resident’s computer to the provider’s modem.
3. LANs (bottom left & bottom right):
o Groups of computers connected in offices, campuses, or homes.
o Connected to the WAN using routers.
4. Resident Connection (top right):
o A single computer at home connects through a modem and a point-to-point WAN
to the provider’s network.
5. Routers (throughout):
o Devices that interconnect different LANs and WANs.
o Enable communication between heterogeneous networks.
Key Idea of the Figure
 This internetwork combines:
o Switched WAN (core network).
o Point-to-Point WANs (direct dedicated lines).
o Two LANs (local office/home networks).
o Individual residential connection via a modem.
 Together, these form a heterogeneous internetwork that allows all devices (home users,
office LANs, and remote networks) to communicate.
Types of Internetworks
1. Private Internetworks
o Built within organizations (e.g., connecting different office LANs using a WAN).
o Used for internal communication.
2. Public Internetwork (The Internet)
o The global system of interconnected networks.
o Uses standard protocols (like TCP/IP) to allow worldwide communication.
1.3.3 The Internet
An internet (with a lowercase i) refers to the interconnection of two or more separate
networks that are able to communicate with each other using a standard set of protocols. In other
words, whenever multiple independent networks are linked together and can exchange data, they
form an internet.
The most important and well-known example is the Internet (with an uppercase I), which is a
global system of interconnected networks. It connects millions of private, public, academic,
business, and government networks worldwide, allowing them to communicate seamlessly.
 The Internet is composed of thousands of smaller internetworks, including local area
networks (LANs), metropolitan area networks (MANs), and wide area networks
(WANs).
 These networks are tied together through Internet Service Providers (ISPs), backbone
networks, and peering points.
 The Internet uses the TCP/IP protocol suite as the universal standard for
communication.
Figure 1.13 shows a conceptual (not geographical) view of the Internet.
Explanation of Components
1. Customer Networks (end-users):
o These are the networks of individuals, small businesses, or organizations (like
homes, offices, or universities).
o They connect to the Internet through an Internet Service Provider (ISP),
which is represented here as a provider network.
2. Provider Networks (ISPs):
o Internet Service Providers form the middle layer of the Internet structure.
o They connect customer networks to the larger Internet backbone.
o Examples: Airtel, Jio, AT&T, Comcast, etc.
3. Backbones:
o The core of the Internet.
o Composed of very high-speed fiber-optic lines owned by major telecom
companies or consortiums.
o Backbones interconnect different ISPs worldwide and allow data to flow across
continents and countries.
4. Peering Points:
o Special connection points where different provider networks exchange data.
o These points reduce congestion, improve speed, and make sure that data from one
ISP can reach another.
o Example: If you use ISP-A and your friend uses ISP-B, data passes through a
peering point if their networks are different.
How the Internet Works (Flow in the Diagram)
 Customer network → Provider network → Backbone → Provider network →
Customer network
 When you send a request (e.g., opening Google), your data leaves your customer
network, travels through your ISP’s provider network, possibly crosses multiple
backbones and peering points, and then reaches Google’s servers (another customer
network connected to a different provider).
 The process is reversed when the server responds.

Accessing the Internet:


The Internet is an internetwork that allows anyone to connect and
communicate globally. To access the Internet, a user must be physically connected to an
Internet Service Provider (ISP). This connection can be established in different ways:
1. Using Telephone Networks:
Most residences and small businesses already have telephone
connections. Since telephone networks are connected to the Internet, they can be used to access
it.
a) Dial-up Service
 Uses a modem to convert digital data into voice signals over a telephone line.
 The computer dials the ISP like making a phone call.
 Disadvantages:
o Very slow speed (56 Kbps max)
o Telephone line cannot be used for voice calls during Internet use.
o Suitable only for limited / occasional Internet use.
b) DSL (Digital Subscriber Line) Service
 An upgrade to normal telephone lines for higher Internet speeds.
 Allows simultaneous use of voice (telephone) and data (Internet).
 Widely used for home and small business Internet access.
2. Using Cable Networks
 Many homes use cable TV connections.
 Cable companies have upgraded their networks to provide Internet access.
 Advantages:
o Higher speed compared to dial-up and DSL.
o Very popular in urban and residential areas.

 Disadvantage:
o Speed depends on the number of users sharing the same cable in the
neighbourhood.
3. Using Wireless Networks
 Wireless networks have become increasingly popular for Internet access in both homes
and businesses because of their convenience and flexibility.
Technology Used:
 Wi-Fi (Wireless LAN): Provides local wireless connectivity within a limited area such as
homes, offices, or campuses.
 Wireless WAN: Extends Internet access over a wider geographical area using cellular
technologies.
Flexibility:
 Supports a combination of wired and wireless connections, allowing multiple devices to
access the Internet simultaneously without physical cables.
Examples:
 Mobile broadband, 4G, and 5G networks are widely used forms of wireless WAN that
provide high-speed Internet access on the go.
Direct Connection to the Internet:
Large organizations, such as universities, research institutions,
and corporations, often require high-speed, reliable, and continuous Internet access to
support their large number of users and services. Instead of relying on standard residential
connections, they establish a direct connection to the Internet.
 Method:
o The organization leases a high-speed Wide Area Network (WAN) line from a carrier
(such as a telecom provider).
o This line connects the organization’s internal network directly to a regional Internet
Service Provider (ISP).
 Advantages:
o Provides dedicated bandwidth and high reliability.
o Supports large-scale networking requirements, such as multiple servers, databases, and
communication systems.
o Ensures faster and more secure Internet access for thousands of users simultaneously.
 Example:
o A large university with several campuses can create its own private internetwork and
then connect it directly to the Internet through a leased high-speed line.

1.4 PROTOCOL LAYERING:


In Computer Networking, a protocol is like a set of rules and standards that devices follow to
communicate with each other.
For example, if two people to talk need a common language (English, Hindi, etc.) and
grammar rules, computers need protocols to understand and communicate.
Key Functions of Protocols
 Data formatting → how the data is structured.
 Addressing → identifying the sender and receiver.
 Error detection/correction → making sure data arrives correctly.
 Flow control → avoiding congestion when sending large amounts of data.
 Security → encrypting and authenticating data.
Examples of Networking Protocols
 HTTP/HTTPS → Rules for web browsing.
 FTP → Rules for file transfer.
 SMTP/IMAP/POP3 → Rules for email.
 TCP/IP → Foundation rules for the internet.
 Ethernet / Wi-Fi → Rules for local network communication.

1.4 PROTOCOL LAYERING:


What is Protocol?
Elements of a Protocol
1. Syntax (Format/Structure of Data)
Syntax means the structure or format of the data. It defines how the data is arranged
(looked), so that both sender and receiver understand it.

Example: Imagine Maria sends a message to Ann:


10101011 11001100
If Ann doesn’t know where one field ends and the next begins, she can’t interpret it.
o Syntax tells Ann: “The first 8 bits = Sender’s ID, the next 8 bits = Message code.”
Real-life analogy: In English, if you write:
“Hello, Ann!” → Syntax is the grammar and punctuation that tells Ann how to read the message.
2. Semantics (Meaning of the Data)
Semantics deals with the meaning of each field in the data. It specifies what action to take
based on the data received.
Example: If the message code = 11001100, the semantics might mean: “Start communication.”
o Ann reads the code and knows that Maria is requesting a chat.
 Real-life analogy: If Maria says:
“Can I borrow your book?” → The meaning is a request for action (not just random
words).
3. Timing (When and How Fast to Send Data)
Timing specifies when data should be sent and how fast it should be sent or received.
 Example:
o If Maria talks too fast, Ann won’t catch the words.
o If Maria and Ann both talk at the same time, the message collides.
o Timing ensures that Maria talks → Ann listens, then Ann replies → Maria listens.
Real-life analogy: In a phone call, if both people talk at the same time, it causes confusion.
Timing rules help avoid this.
Why is a Protocol Important?
Without protocols, networking would be impossible, because:
1. Ensures Understanding
o Sender and receiver interpret data in the same way.
o Example: HTTP ensures your browser and the web server both understand “GET /page”.
2. Interoperability
o Devices from different vendors (Cisco, HP, Dell, Apple) can talk to each other because
they all follow the same protocols.
3. Error Detection and Correction
o Protocols like TCP handle retransmission if data is lost.
4. Efficient Communication
o Defines how data is broken into packets, addressed, routed, and reassembled.
5. Security
o Protocols like HTTPS, SSL/TLS ensure data privacy and encryption.
Analogy: Imagine playing cricket without rules—everyone would do things differently.
Networking without protocols would be the same chaos—no device would know how to send,
receive, or interpret data.
What is protocol layering?
Protocol layering is a way (method) of dividing the communication
task into smaller, manageable parts (layers), where each layer uses its own rules (protocol)
to perform specific functions, and all layers work together to enable successful communication
between two systems.
Key points inside the definition:
 Divide & Conquer: Splits a big communication task into small, manageable layers.
 Own Rules: Each layer uses its own protocols (set of rules).
 Work Together: Lower layers provide services to upper layers.
 End-to-End Communication: The combination of all layers allows devices to
communicate correctly.
Protocol layering example:
Think about sending a package:
o Sender writes the message (application layer).
o Transport = pack it in a box with sender & receiver details.
o Network = find out the correct destination address and decide the best route to deliver it.
o Link = delivery truck/van takes it hop by hop.
o Physical = roads carrying the truck.
First Scenario:

Understanding the Diagram


1. Maria and Ann
o Two people (like two computers) who want to communicate.
2. Layer 1 (Listen/Talk box)
o Each has only one communication layer.
o They can either listen or talk, but not both at the same time.
o This layer is the only "protocol" they follow.
3. Air (medium)
o The channel that carries their voices.
o In networking, this is similar to the physical medium (like a wire, fiber, or
wireless channel).
How Communication Happens Step by Step
1. Initialization:
o Maria sees Ann. Both are in the "listen" state.
2. Start Communication:
o Maria says, “Hello Ann!” (Maria → Talk, Ann → Listen).
3. Response:
o Ann replies, “Hi Maria!” (Ann → Talk, Maria → Listen).
4. Exchange Ideas:
o They take turns speaking and listening:
 Maria: “Did you complete the project?”
 Ann: “Yes, I did.”
5. Rules Applied (Protocol Rules):
o They must greet first.
o Only one speaks at a time (no collision).
o They keep vocabulary simple, within their mutual understanding.
6. End Conversation:
o Maria: “Okay, see you later.”
o Ann: “Bye!”
o Both stop talking, return to the listening state.
Second Scenario:
Step-by-Step Explanation of the Second Scenario
1. Situation
 Ann gets promoted and moves to a faraway city.
 Maria and Ann still want to share their ideas (like starting a business together).
 They can’t meet face-to-face anymore → they must use letters (mail) for communication.
2. Problem
 If they just send plain letters, others might intercept and read them.
 To protect their ideas, they decide to use encryption and decryption.
3. Solution: Encryption/Decryption
 Maria (sender): Before mailing the letter, she encrypts the message into secret code.
 Post office (medium): Carries the encrypted letter.
 Ann (receiver): On receiving the letter, she decrypts it back into the original message.
This makes the letter unreadable to outsiders but understandable to Ann.
4. Introduction of Layers
Unlike the first scenario (single-layer, face-to-face), now they need three layers to handle
communication:
1. Layer 3 – Application Layer (Maria and Ann’s Ideas)
o Maria writes her thoughts in plain language.
o Ann reads them after decryption. (This is the “what” they want to say.)
2. Layer 2 – Encryption/Decryption Layer
o Maria encrypts the letter before sending.
o Ann decrypts the letter after receiving. (This is “how to keep it secret.”)
3. Layer 1 – Physical Layer (Mail Delivery System)
o The post office transports the encrypted letter from Maria’s city to Ann’s city.
(This is “how to physically send it.”)
5. Analogy to Networking
 In real computer networks:
o Application Layer = the actual message (e.g., email content).
o Encryption Layer (Presentation Layer) = converting the message into secure form
(encryption, compression).
o Physical Layer = sending bits through cables/wireless signals.
6. Example Walkthrough
Let’s say Maria wants to tell Ann: “Let’s meet at 5 PM.”
 Step 1 (Application Layer): Maria writes: “Let’s meet at 5 PM.”
 Step 2 (Encryption Layer): Maria encrypts it → “X9@#%$!”
 Step 3 (Physical Layer): The post office carries the sealed envelope.
On Ann’s side:
 Step 1 (Physical Layer): Ann receives the envelope.
 Step 2 (Decryption Layer): Ann decrypts → “Let’s meet at 5 PM.”
 Step 3 (Application Layer): Ann understands the real message.
1.4.2 Principles of Protocol Layering:
First Principle: Bidirectional Communication
 Definition: Each layer must be able to do two opposite tasks. one for sending and one
for receiving.
 Examples in Maria & Ann’s case:
o Layer 3 (Application):
 Maria writes a letter (send).
 Ann reads a letter (receive).
o Layer 2 (Encryption/Decryption):
 Maria encrypts before sending.
 Ann decrypts after receiving.
o Layer 1 (Mail Delivery):
 Maria puts the letter into the post system (send).
 Ann receives the delivered letter (receive).
So, each layer always supports both directions.
Second Principle: Identical Objects at Both Ends
 Definition: The objects exchanged at each layer must look the same at both sides (sender
and receiver).
 Examples in Maria & Ann’s case:
o Layer 3 (Application):
 At both sides: A plaintext letter (the actual message).
o Layer 2 (Encryption/Decryption):
 At both sides: An encrypted letter (ciphertext).
o Layer 1 (Mail Delivery):
 At both sides: A physical mail piece (envelope).
So, communication works only if both ends agree on the same object type at each layer.
Why These Principles Matter in Networking
 In computer networks:
o First Principle → Every layer must support both send & receive (e.g., TCP must send and
also acknowledge).
o Second Principle → Sender and receiver must agree on what data looks like at each layer
(e.g., both must follow the same encryption method, same packet structure, same signal
format).
1.4.3 Logical Connections:
What are Logical Connections?
 A logical connection is not a physical wire or channel — it’s an imaginary link that
connects corresponding layers on two communicating systems.
 It helps us think as if each layer is directly talking to its peer layer on the other side.
How it Works
When Maria sends a message to Ann through three layers:
1. Application Layer (Plaintext):
o Maria writes: “Let’s meet at 5 PM.”
o Ann eventually reads “Let’s meet at 5 PM.”
o Logical connection → Maria’s Application layer ↔ Ann’s Application layer.
2. Encryption Layer (Ciphertext):
o Maria’s system encrypts → “X9@#%$!”
o Ann’s system decrypts → back to plain text.
o Logical connection → Maria’s Encryption layer ↔ Ann’s Decryption layer.
3. Physical Layer (Mail piece):
o Maria posts an envelope.
o Ann receives the envelope.
o Logical connection → Maria’s Physical layer ↔ Ann’s Physical layer.
Networking Analogy
 In computer networks:
o Application layer (e.g., Email App) on your computer ↔ Application layer (Email
App) on your friend’s computer.
o Transport layer (e.g., TCP) on your computer ↔ Transport layer (TCP) on your
friend’s computer.
o Network layer (e.g., IP) ↔ Network layer (IP).
Even though the message passes through many intermediate devices, we think as if each layer
directly communicates with its peer.
In short: Logical connections = imaginary “peer-to-peer” links between the same layers on
sender and receiver.

Figure 1.16: Logical connections between peer layers. Let’s carefully explain what’s happening
in this diagram step by step.

Introduction to TCP/IP Protocol Suite


Introduction:
The TCP/IP (Transmission Control Protocol/Internet Protocol) suite is the
fundamental set (or core collection) protocol suite, that define how data is transmitted over the
internet and other networks. It provides the rules, standards, and procedures that allow computers
and devices to communicate reliably, regardless of their underlying hardware or operating
systems. Serving as the backbone of the Internet, TCP/IP specifies how data is formatted,
addressed, transmitted, routed, and received across interconnected networks.
The TCP/IP protocol suite is divided into four layers:
1. Application Layer
2. Transport Layer
3. Internet Layer
4. Network Access (or Link) Layer
Each layer performs a specific task on the data that is being transmitted over the network
channel, and data moves from one layer to another in a preset pattern as mentioned below:

The OSI model has seven layers, while the TCP/IP model is organized into four layers, making it
a more practical and simplified approach to network communication

Historically, the origins of TCP/IP date back to the early 1970s (in 1960s), when the U.S.
Department of Defense’s Advanced Research Projects Agency (DARPA) initiated research to
design a robust and fault-tolerant networking protocol for ARPANET, the precursor to the
Internet. In 1983, ARPANET officially adopted TCP/IP as its standard protocol, marking the
first successful large-scale implementation and the beginning of the Internet era. Since then,
TCP/IP has developed into the universal networking standard, serving as the backbone of global
communication and enabling a wide variety of applications such as web browsing, email, file
transfer, cloud computing, and multimedia streaming.
Layered Architecture in TCP/IP
In TCP/IP, communication between two computers is
organized into layers, with each layer performing a specific role. The five layers are
Application, Transport, Network, Data Link, and Physical. This layered structure makes
communication easier to design, manage, and troubleshoot.

Example Scenario: Communication Setup


Suppose Computer A wants to send a message to Computer B. Between them; there are two
switches (one in each LAN) and one router connecting the LANs. In total, five devices are
involved:
1. Source Host (Computer A)
2. Switch 1 (Link 1)
3. Router
4. Switch 2 (Link 2)
5. Destination Host (Computer B)
How Each Device Uses Layers:
 Hosts (Computer A & B): Use all five layers (Application → Transport → Network →
Data Link → Physical). For example, Computer A creates a message in the Application Layer
and sends it down the stack. Computer B receives it at the Physical Layer and passes it up
through the layers until the Application Layer displays the message.
 Switches (Link 1 & Link 2): Use only the Data Link and Physical layers. Switches
forward frames within a LAN based on MAC addresses; they do not understand IP
addresses.
 Router: Uses the Network, Data Link, and Physical layers. The router reads (checks) the
IP address in the packet, decides the best path, and forwards it to the next network (link). If
the router has n links, it maintains n pairs of Data Link + Physical layers since each link
may use a different protocol (e.g., Ethernet on one side, Wi-Fi on the other).
Step-by-Step Message Journey
1. Computer A (Sender): Creates the message in the Application Layer (e.g., writing an
email). The message moves down A’s protocol stack:
Application → Transport → Network → Data Link → Physical → sent out onto the
medium.
2. Switch 1: It simply forwards the frame to the next device inside the LAN.
3. Router: It receives the frame, removes the Data Link header, examines the IP address in the
packet, determines the correct outgoing path, and forwards it using the appropriate Data Link
+ Physical protocol for the next link.
4. Switch 2: It forwards the frame within the LAN to Computer B.
5. Computer B (Receiver): Receives the signal at the Physical Layer and passes it upward:
Physical → Data Link → Network → Transport → Application.
Finally, at the Application Layer, the email is delivered to the user, allowing Computer B’s
owner to read the message.
1.5.2 Brief Description of Layers:
Working of the TCP/IP Model:
Application Layer:
In the Application Layer, the actual message is created, such as an email, a
WhatsApp text, or a website request. Applications like Gmail, WhatsApp, Chrome, or Zoom
operate here. Communication at this layer is end-to-end, meaning the source application
communicates directly with the destination application. For example, when you type “Hello” in
Gmail, the message creates in the Application Layer.
Transport Layer
The Transport Layer then breaks this message into smaller chunks called
segments. It ensures the message is delivered correctly, either with reliability using TCP (through
acknowledgments and retransmissions) or with speed using UDP (without reliability). At this
stage, port numbers are added to identify which application should receive the data—for
example, Gmail uses ports 25 or 587 for email. Here, communication is also end-to-end, with the
Transport Layer at the source directly communicating with the Transport Layer at the
destination. For instance, Gmail on your computer interacts directly with the Gmail service on
your friend’s device.
Network Layer:
The Network Layer takes each segment and adds IP addresses (source and
destination) to create packets. This layer is responsible for addressing and routing, ensuring that
the packet finds the best path across multiple networks. Routers operate at this layer, forwarding
packets closer to their destination.
Example, writing a complete postal address on a letter, the IP address ensures the data reaches
the correct destination computer.
Data Link Layer:
The Data Link Layer then prepares each packet for travel across a single
physical link by wrapping it into a frame. It adds the MAC address of the next device (such as
host ↔ switch, switch ↔ router, etc) to ensure delivery within the local network segment. This
communication is hop-to-hop, meaning it only covers delivery between directly connected
devices.
Example, A good analogy is the name tag on a letter within a local post office, ensuring it gets to
the right office before being forwarded further.
Physical Layer:
The Physical Layer converts frames into bits (0s and 1s) and then into physical
signals such as electrical pulses, radio waves, or light signals, depending on the medium. This
layer defines the hardware aspects, including cables, Wi-Fi frequencies, voltages, and timings.
Example, A truck carrying letters on the road, the Physical Layer ensures the actual movement of
data across the medium, working hop-to-hop between devices.
👉 Key Point:
An important principle of TCP/IP is that the top three layers (Application,
Transport, and Network) provide end-to-end communication between the source and destination
hosts, while the bottom two layers (Data Link and Physical) provide hop-to-hop communication
between intermediate devices such as switches and routers (Host → Switch → Router → Switch
→ Host).
For example, suppose you (the source host) send an email to your friend (the destination host).
At the Application Layer, you type your message. The Transport Layer breaks it into smaller
parts (called as segments), and the Network Layer adds the destination’s IP address. The Data
Link Layer then encapsulates the packet into a frame with a MAC address, and the Physical
Layer transmits it as signals over the medium. At the receiving end, the process is reversed:
signals are converted back into bits, frames, packets, and segments, until finally, the complete
message appears in your friend’s Gmail inbox exactly as you typed it.
Identical Objects (based on Figure 1.20):
In TCP/IP communication, each layer of the protocol
stack creates its own Protocol Data Unit (PDU). At the Application Layer, the PDU is called a
Message. The Transport Layer converts it into a Segment (when using TCP) or a User Datagram
(when using UDP). The Network Layer encapsulates this into a Packet (or Datagram) by adding
IP addresses. At the Data Link Layer, the data becomes a Frame with MAC addresses for local
delivery, and finally, the Physical Layer converts it into Bits (0s and 1s) for transmission through
the medium.
A key rule is that the top three PDUs like Message, Segment, and Packet—must remain
unchanged end-to-end between the source and destination. In contrast, the bottom two PDUs like
Frame and Bits are modified (changed) at each hop because they depend on the local network
and physical medium.
For example, a message created in the Application Layer of Host A should be delivered exactly
the same at the Application Layer of Host B. Similarly, a TCP segment must remain unchanged
until it reaches the correct application process on the destination host.
Why does this happen?
This happens because of the roles of intermediate devices. Routers work
at the Network Layer and can alter (change) packets. For example, by fragmenting them if they
are too large for a link. Switches work at the Data Link Layer and do not modify frames; they
only forward them within the same LAN. The Physical Layer always changes the bits into
signals depending on the medium, such as electrical pulses in cables or radio signals in Wi-Fi.
Example (Figure 1.20):
Imagine sending a WhatsApp message, at the Application Layer, you type “Hi”. The Transport
Layer breaks it into a TCP segment, the Network Layer adds your friend’s IP address, the Data
Link Layer adds the MAC address of the next device (such as a router), and finally, the Physical
Layer transmits it as electrical or radio signals.
As the message travels, switches forward frames without changing them, routers may split large
packets, and the medium converts bits into different signal forms. Still, when your friend
receives the message, the Application Layer delivers the exact same “Hi” you typed.
1.5.3 Description of Each Layer:
After understanding the concept of logical communication, we
are ready to briefly discuss the duty of each layer.
Physical Layer:
The Physical Layer is the lowest layer in the TCP/IP protocol suite, and its
primary duty is to transfer raw bits (0s and 1s) across the physical medium. This medium may
include cables, fiber optics, or wireless signals, which enable bit-to-bit communication between
devices.
Although it appears as if data travels directly from one device to another, the actual transfer
happens through the underlying transmission medium, such as wires, air, or optical fibers. At this
layer, data is converted into physical signals.
for example, electrical pulses transmitted over Ethernet cables or radio signals carrying bits
between a laptop and a Wi-Fi router.
Data-Link Layer:
The Data Link Layer is responsible for moving data packets, called frames,
across a single physical link such as a LAN or WAN connection. Its function is often described
as hop-to-hop delivery, meaning it ensures that data successfully travels from one device to the
next along the path. For example, from a host to a switch, or from a switch to a router. Each link
in the Internet may use its own set of rules or protocols to manage communication. At this layer,
MAC (Media Access Control) addresses are added to ensure proper local delivery within a
network segment.
A simple analogy is delivering a courier within a single office building: the Data Link Layer
decides the correct office room for the package, just as it determines the correct device within a
local network.
Network Layer:
The Network Layer is responsible for establishing communication (connection)
between the source and destination computers, providing host-to-host delivery across different
networks. It identifies devices using IP addresses and ensures that data can travel from one host
to another, even across multiple networks. Since there may be several routers between the source
and destination, the Network Layer determines the best path for data packets through a process
called routing. Each router along the path examines the packet’s IP address and makes a
forwarding decision to move it closer to the destination.
Example: A useful analogy is writing a full postal address (city, street, and house number) on a
letter: even if the letter passes through multiple post offices (routers), the address guarantees that
it reaches the correct house (destination host).
Transport Layer:
The Transport Layer provides end-to-end communication between
applications running on two hosts. At the sender’s side, it takes messages from the Application
Layer and divides large messages into smaller units called segments when using TCP
(Transmission Control Protocol) or datagrams when using UDP (User Datagram Protocol). TCP
ensures reliability through acknowledgments, retransmission, and error checking, while UDP
focuses on faster delivery without reliability guarantees. At the receiver’s side, the Transport
Layer delivers the data to the correct application process. This is achieved using port numbers,
which act as identifiers for different applications (for example, port 80 for web traffic and port
25 for email).
Example: A helpful analogy is a letter delivered to a house: while the Network Layer ensures it
reaches the correct house (IP address), the Transport Layer ensures it is handed to the right
person or room inside the house (application process).
Application Layer:

The Application Layer enables communication between processes or


programs running on different computers, providing end-to-end, (or process-to-process)
communication at the application level. To the applications, it appears as though they are directly
connected by a bridge, even though the data actually travels through all the lower layers of the
protocol stack. This layer supports a wide range of protocols, such as HTTP for web browsing,
SMTP for email, FTP for file transfer, and DNS for domain name resolution. It provides essential
services including web access, email exchange, file sharing, messaging, and multimedia
streaming.
Example: A useful analogy is a video call between two friends: when one user says “Hello” in
their Gmail application, the same message instantly appears in the friend’s Gmail app, even
though it has passed through all the intermediate layers behind the scenes.
Quick Summary Table
Layer Duty Communication Data Unit Example
Type (Analogy)

Application Provides services to End-to-End Message Two people


users (process-to- talking (apps).
process).

Transport Breaks message, End-to-End Segment/ Correct person


ensures reliability Datagram in a house.
(port-to-port).

Network Chooses route using Host-to-Host Packet/Datagram Postal address


IP addresses. on letter.

Data-Link Transfers frames Hop-to-Hop Frame Room number


across a link. inside building.

Physical Sends bits as signals. Hop-to-Hop Bits Electrical pulses


/ Wi-Fi waves.

THE OSI MODEL:


Understanding computer network communication is a highly complex
process, so, and to make it more systematic and easier to understand, experts divide it into
multiple layers. For this purpose, two standard reference models are widely recognized:
1. The OSI (Open Systems Interconnection) Model
2. The TCP/IP Model
While both models describe layered approaches to data communication, they differ in structure
and methodology.
What is OSI model?
The Open Systems Interconnection (OSI) model is a conceptual
framework and the first standardized model for network communications, developed by the
International Organization for Standardization (ISO) in 1984. Its purpose is to standardize
how computer systems communicate across networks by providing a universal set of rules and
guidelines. The OSI Model defines how data is transmitted from a sender to a receiver, ensuring
interoperability among diverse hardware and software technologies.
The OSI Model consists of seven distinct layers, each with a specific role in the communication
process, whereas the TCP/IP Model is typically described with four or five layers, depending on
interpretation. In this discussion, the emphasis will be placed on understanding the seven layers
of the OSI Model.
Types of OSI layers:
The OSI (Open Systems Interconnection) Model divides computer
network communication into seven distinct layers. Each layer has a specific function and
interacts with the layers directly above and below it.
1. Physical Layer
2. Data Link Layer
3. Network Layer
4. Transport Layer
5. Session Layer
6. Presentation Layer
7. Application Layer

Application Layer:
The Application Layer is the topmost layer of the OSI model and is the
closest to the end user. It acts as the interface between user applications and the underlying
network services, enabling tasks such as web browsing, email communication, file transfers,
and remote access. While the software applications (e.g., browsers, email clients) themselves do
not reside in this layer, the protocols and services that allow them to communicate across
networks operate here.
This layer ensures that data is properly formatted, transmitted, and displayed in a meaningful
way to the user. It also manages application-specific networking requirements such as
authentication, privacy, quality of service, data syntax, and network resource availability.
By coordinating with the lower layers, it allows seamless communication between applications
across different systems and networks.
Key Functions of the Application Layer:
 Identifying communication partners – Determines and verifies the availability of parties
involved in the communication process.
 Determining resource availability – Ensures required network resources are accessible
before initiating communication.
 Synchronizing communication – Manages and coordinates data exchange between
applications to maintain smooth interaction.
 Supporting application services – Provides essential services such as authentication, data
formatting, error handling, and session management.
Common Application Layer Protocols:
 HTTP/HTTPS (Hypertext Transfer Protocol / Secure) – Used for web browsing and
secure communication.
 FTP (File Transfer Protocol) – Supports file transfers between systems.
 SMTP/POP/IMAP (Simple Mail Transfer Protocol / Post Office Protocol / Internet
Message Access Protocol) – Enable email communication.
 DNS (Domain Name System) – Resolves domain names into IP addresses.
 Telnet – Provides remote login and command execution.
 DHCP (Dynamic Host Configuration Protocol) – Assigns IP addresses dynamically to
devices.
 SNMP (Simple Network Management Protocol) – Used for monitoring and managing
network devices.
Examples:
 HTTP/HTTPS → Accessing websites via browsers (Chrome, Firefox, Safari).
 FTP → Uploading/downloading files from a server.
 SMTP/POP → Sending and receiving emails.
 DNS → Converting www.example.com into its corresponding IP address.
 Telnet/SSH → Logging into a remote machine for administrative tasks.
Presentation Layer:
The Presentation Layer, also known as the syntax layer, is the sixth layer
of the OSI model. Its primary role is to act as a translator between the Application Layer
(Layer 7) and the lower layers, ensuring that data from one system can be understood by
another, regardless of differences in data formats, encoding methods, or syntax.

This layer prepares data for the application layer by handling translation, compression, and
encryption. It ensures that information is presented in a usable format at the receiving end, much
like converting one language into another.
Key Functions of the Presentation Layer:
 Data Translation – Converts data into a standard, compatible format for communication.
For example, converting between ASCII and EBCDIC character codes.
 Data Compression – Reduces the size of data before transmission, saving bandwidth and
speeding up communication.
 Data Encryption & Decryption – Provides security by encrypting data before transmission
and decrypting it upon reception. For example, HTTPS encryption and decryption processes
occur here.
 Data Formatting – Ensures that multimedia elements such as images, text, and videos are
properly formatted so that the receiving system can interpret them correctly.
Examples in Action:
 Encryption/Decryption – HTTPS secures web traffic by encrypting data at the sender side
and decrypting it at the receiver side.
 Character Code Translation – Text encoded in ASCII on one machine may need to be
converted to EBCDIC for another system.
 Compression – Video streaming services compress data before transmission to reduce
buffering and improve efficiency.
Session Layer:
The Session Layer is the fifth layer of the OSI model and is responsible for
establishing, managing, and terminating communication sessions (links) between devices or
applications. A session refers to the period of interaction that begins when a connection is
opened and ends when it is closed.

This layer acts like a coordinator or manager of communication, ensuring that communication
between applications is continuous, organized, and reliable. It also supports recovery by allowing
interrupted sessions to resume from the last checkpoint rather than starting over.
Key Functions of the Session Layer:
1. Session Establishment
o Creates and initializes communication sessions by exchanging control information (such
as usernames, passwords, and session IDs).
o Ensures both parties are authenticated and authorized before data transfer begins.
2. Session Maintenance
o Keeps communication active for the required duration, avoiding premature
disconnections (active for as long as required)
o manages acknowledgements, timeouts, and checkpoints to monitor progress. (e.g.,
deciding who sends data at what time).
o Uses checkpoints to divide long transmissions into smaller units, allowing recovery in
case of interruptions.
3. Session Termination – Closes the session after communication is complete, releasing
network resources to avoid waste.
4. Synchronization and Recovery – Inserts checkpoints (synchronization points) in large data
transfers. If a transmission fails, it can resume from the last checkpoint instead of restarting.
Example: If a 100 MB file transfer is interrupted at 52 MB, the session layer ensures
resumption from the last checkpoint (e.g., 50 MB) instead of restarting from zero.
Common Session Layer Protocols:
 Remote Procedure Call (RPC) – Allows programs to request services from software on
another device.
 NetBIOS (Network Basic Input/Output System) – Manages communication between
applications on a LAN.
 PPTP (Point-to-Point Tunneling Protocol) – Used in VPNs to establish secure sessions.
 SCP (Session Control Protocol) – Manages multimedia sessions.
 SDP (Session Description Protocol) – Defines multimedia communication sessions such as
video calls.
 SQL Session Management – Maintains database sessions.
Real-World Examples:
 Web browsing session → When you log in to a website, the session keeps track of your
authentication and activity until you log out or close the browser.
 File transfer → Ensuring that only missing portions of a file are retransmitted after an
interruption. During a 100 MB file transfer, checkpoints (e.g., every 5 MB) ensure that if the
transfer is interrupted at 52 MB, only the remaining 48 MB needs to be resent.
 Video conferencing → Maintaining synchronization of audio and video streams during a
call.
 Database Sessions – SQL session management ensures that queries and transactions between
a client and a server run smoothly within a defined session.
Transport Layer:
The Transport Layer is the fourth layer of the OSI model and is responsible
for end-to-end communication between applications running on different devices. It ensures
that data is delivered reliably, in sequence, and without errors, providing a bridge between the
upper layers (Session, Presentation, Application) and the lower layers (Network, Data Link,
Physical).
This layer divides large data from the session layer into smaller segments for efficient
transmission and reassembles them at the destination. It also manages flow control, error
detection and recovery, and congestion control, ensuring smooth and accurate data transfer
across networks.
Key Functions of the Transport Layer:
1. Segmentation and Reassembly – Breaks large messages into smaller segments for
transmission and reassembles them at the receiving end.
2. Error Control – Detects transmission errors using checksums, acknowledgements, and
retransmissions to ensure data integrity.
3. Flow Control – Regulates the rate of data transmission to prevent overwhelming slower
devices, using techniques like windowing and buffering.
4. End-to-End Communication – Provides a reliable connection between source and
destination applications, ensuring complete delivery of messages.
5. Service-Point Addressing – Directs data to the correct application using port numbers,
distinguishing multiple simultaneous data streams on a device.
Key Protocols:
Protocol Type Characteristics Common Use
Reliable, error-checked,
TCP (Transmission Connection- Web browsing,
sequenced delivery, flow
Control Protocol) oriented email, file transfers
control
UDP (User Datagram Faster, minimal overhead, less Video streaming,
Connectionless
Protocol) reliable online gaming, VoIP

Examples in Action:
 File Transfer – TCP divides a large file into segments, sends them, and ensures all segments
arrive intact; missing segments are retransmitted.
 Video Streaming – UDP allows continuous, fast delivery of video/audio data with minimal
delay, tolerating some packet loss.
 Multiple Application Streams – TCP/UDP port numbers distinguish streams from different
applications (e.g., browser, music, chat) on the same device.
Network Layer:
The Network Layer is the third layer of the OSI model, responsible for
routing and forwarding data packets between devices across multiple networks. It
determines the best path for data to travel from the source to the destination, even when multiple
intermediate networks or routers are involved.

This layer provides logical addressing using IP addresses, allowing devices on different
networks to identify each other, and it ensures that data is delivered efficiently and accurately
across complex network topologies.
Key Functions of the Network Layer
1. Logical Addressing – Assigns logical addresses (e.g., IPv4 or IPv6) to devices and maps
them to physical addresses (MAC) using protocols such as ARP (Address Resolution
Protocol) and RARP (Reverse ARP).
2. Routing – Determines the optimal path for data packets to travel across networks using
routing algorithms such as Dijkstra’s and Bellman-Ford.
3. Packet Forwarding & Switching – Moves packets from one network segment to
another via routers, gateways, or layer-3 switches.
4. Fragmentation and Reassembly – Splits large packets into smaller fragments to fit the
Maximum Transmission Unit (MTU) of the underlying network and reassembles them at
the destination.
5. Traffic Management & Optimization – Works around network congestion, broken
links, and service priority to ensure efficient data delivery.
Common Protocols
Protocol Function / Use
Provides logical addressing and end-to-end packet
IP (Internet Protocol)
delivery (IPv4, IPv6)
Reports errors and diagnostic functions (e.g., ping,
ICMP (Internet Control Message Protocol)
traceroute)
ARP / RARP (Address Resolution Protocol Maps IP addresses to MAC addresses and vice
/ Reverse ARP) versa
Determine optimal paths and maintain routing
Routing Protocols (RIP, OSPF, BGP)
tables
IGMP (Internet Group Management
Manages multicast group memberships
Protocol)
Examples in Action
 Packet Routing Across Networks – When a device in Boston sends data to a server in
California, routers determine the best path for the packets across multiple networks.
 Fragmentation – A large file is broken into smaller packets to fit the network’s MTU and
reassembled at the destination.
 Error Reporting – ICMP can notify the sender if a packet could not reach its destination.
 Address Mapping – ARP resolves the IP address of a device to its physical MAC address for
local delivery.
Data Link Layer:
The Data Link Layer is the second layer of the OSI model and is
responsible for node-to-node communication within a local network.

It ensures that data is reliably delivered from one device to another on the same network
segment, handling framing, addressing, error detection and correction, and flow control.
This layer is divided into two sublayers:
1. Logical Link Control (LLC) – Manages error detection, flow control, and multiplexing
services for upper layers.
2. Media Access Control (MAC) – Controls how devices access and share the physical
medium (e.g., Ethernet, Wi-Fi, Bluetooth).
Key Functions of the Data Link Layer
 Framing – Divides network layer packets into frames containing a header (with source
and destination MAC addresses, frame type, sequence number), payload, and trailer
(with checksum for error detection).
 Error Detection – Detects errors in frames using methods such as parity check, cyclic
redundancy check (CRC), or checksum.
 Error Correction – Corrects errors using techniques like stop-and-wait, go-back-N, or
selective repeat.
 Flow Control – Ensures that data is sent at a rate the receiving device can handle,
preventing overflow.
 Access Control – Manages which device can use the physical medium at a given time
using protocols such as CSMA/CD, CSMA/CA, or token passing.
Common Technologies and Protocols
Sublayer Function / Use Examples
LLC (Logical Link Provides flow control, error control, and
IEEE 802.2
Control) services to upper layers
MAC (Media Access Controls access to the shared medium, Ethernet, Wi-Fi (IEEE
Control) encapsulates frames 802.11), PPP
Resolves logical addresses to physical ARP (Address Resolution
Address Mapping
addresses Protocol), RARP
Examples in Action
 Ethernet Communication – MAC layer controls which device can transmit data over
the shared cable.
 Wi-Fi Networks – CSMA/CA prevents collisions and manages medium access.
 Error Handling – If a frame is corrupted during transmission, LLC can request a
retransmission.
 Switch Operation – Most switches operate at Layer 2, using MAC addresses to forward
frames to the correct port.

Physical Layer:
The Physical Layer is the first and lowest layer of the OSI (Open Systems
Interconnection) model. It is responsible for the transmission and reception of raw bits (0s
and 1s) between networked devices (physical medium). Unlike the upper layers, this layer does
not interpret the meaning of the data. Instead, it ensures that the binary data is properly converted
into signals and transmitted across a physical medium.

Role and Purpose: The Physical Layer defines the hardware components, transmission media,
and electrical/optical characteristics required for communication. It provides the foundation for
all higher networking layers, since without a medium to carry signals, no communication can
occur.
Its primary role is to convert digital bits into electrical signals, light pulses, or radio waves,
which can travel across copper wires, fiber optic cables, or wireless channels. At the receiving
end, it reconverts these signals back into bits for processing by higher layers.
Importance:
The Physical Layer is essential because it forms the base of the networking
hierarchy. Without this layer, higher-level functions such as addressing, error detection, and data
flow control would not be possible. By standardizing physical characteristics and ensuring
reliable signal transmission, it guarantees smooth communication across diverse devices and
technologies.
Functions of the Physical Layer
o Transmission of Bits: Converts binary data into physical signals (electrical pulses, light
waves, or radio frequencies) suitable for the transmission medium. Receives signals and
converts them back into bits for higher layers.
o Bit Synchronization: Provides synchronization between sender and receiver using clock
signals and ensures that each bit is correctly identified at the receiving end.
o Bit Rate Control: Defines the rate (bits per second) at which data is transmitted and
manages bandwidth utilization efficiently.
o Physical Topology: Determines how devices are physically connected in a network.
Examples: Bus, Star, Ring, Mesh.
o Transmission Modes: supports Simplex: One-way communication (e.g., keyboard →
computer), Half-Duplex: Two-way communication, but only one direction at a time (e.g.,
walkie-talkies) and Full-Duplex: Two-way simultaneous communication (e.g., modern
Ethernet).
o Physical Specifications: Defines voltage levels, timing, connector types, cable lengths, pin
layouts, and frequencies and ensures device compatibility across different hardware vendors.
Components of the Physical Layer
 Transmission Media:
o Wired: Twisted pair cables (Ethernet), coaxial cables, fiber optics.
o Wireless: Wi-Fi, Bluetooth, infrared, satellite links, radio frequencies.
 Networking Devices (Layer 1 devices):
o Hubs – Distribute signals to multiple devices.
o Repeaters – Strengthen weak signals.
o Modems – Convert digital to analog signals and vice versa.
o Antennas – Used in wireless communication.
o Cables & Connectors – Provide the physical pathways.
 Standards & Protocols:
o Ethernet (IEEE 802.3)
o Wi-Fi (IEEE 802.11)
o Bluetooth (IEEE 802.15)
o DSL, ISDN, USB
Examples of the Physical Layer in Action
 Plugging in an Ethernet cable (cat5.cat6) between two computers to establish a connection.
 Using fiber optic cables to transmit large amounts of data over long distances.
 Wireless devices communicating via radio frequencies in a Wi-Fi network.
 A repeater boosting a weak signal to extend network coverage, hubs for data distribution,
antennas for wireless transmission.
How Does Communication Happen in OSI Model?
Let's understand the process of communication in the OSI model, with the help of easy steps.
Step 1: The application layer interacts with software applications to create data that needs to be
sent. For example, when you send an email, the email application generates the data.
Step 2: Presentation layer formats or translates the data for the application layer based on the
syntax or semantics that the application accepts. It also handles encryption and compression.
Step 3: The Session layer establishes, manages, and terminates connections between
applications. It ensures that the data sessions are maintained and synchronized.
Step 4: The Transport Layer is responsible for ensuring complete data transfer. It breaks down
the data into smaller packets, manages error detection and correction, and ensures that packets
are delivered in the correct order.
Step 5: The Network Layer determines the best physical path for the data to travel. It handles
logical addressing and routing, ensuring that data packets reach their destination.
Step 6: The Data Link Layer is responsible for node-to-node data transfer and error detection. It
packages data into frames and adds physical addresses (MAC addresses) to these frames.
Step 7: The Physical Layer deals with the physical connection between devices. It converts data
into electrical, radio, or optical signals and transmits them over the transmission medium (like
cables or wireless).

OSI Layer Layer Number Common Protocols


Application Layer 7 HTTP, HTTPS, FTP, SMTP, POP3, IMAP, DNS
Presentation Layer 6 SSL/TLS, JPEG, MPEG, GIF, ASCII, EBCDIC
Session Layer 5 NetBIOS, RPC, PPTP, SMB
Transport Layer 4 TCP, UDP
Network Layer 3 IP (IPv4/IPv6), ICMP, IPsec, IGMP
Data Link Layer 2 Ethernet, PPP, ARP, HDLC, Frame Relay
Physical Layer 1 USB, Bluetooth, IEEE 802.11 (Wi-Fi), Ethernet
(physical), DSL
Advantages of OSI Model
 It provides a universal structure for network communication, helping different systems and
vendors work together seamlessly.
 By dividing network communication into layers, it allows IT professionals to pinpoint and
resolve issues more efficiently.
 Each layer functions independently, so changes in one layer don’t affect others, making
upgrades and maintenance easier.
 Developers can design protocols for specific layers, ensuring compatibility and an organized
network architecture.
Drawbacks of the OSI Model
 The OSI model is highly theoretical and includes layers that are not always clearly separated
in real-world implementations.
 While the OSI model is excellent for learning and conceptual clarity, most modern networks
use the TCP/IP model, which is better in real-world systems.
 Some functions, like error handling or encryption, may appear in multiple layers, leading to
redundancy and inefficiency.
 The separation of functions into seven layers can introduce latency and reduce performance.
 The rigid structure of the OSI model doesn’t always adapt well to emerging technologies or
hybrid architectures, such as cloud-native or software-defined networking (SDN).
OSI vs TCP/IP Model
The TCP/IP model was launched before the OSI model, and still remains
as the preferred networking model. The table below compares the OSI and TCP/IP models.
Feature OSI Model TCP/IP Model
Layers Consists of seven layers: Physical, Comprises four layers: Network
Data Link, Network, Transport, Interface, Internet, Transport, and
Session, Presentation, and Application. Application.
Approach The theoretical model focused on A practical model designed for real-
standardization and interoperability world implementation and specific
among different systems. protocols.
Protocol Protocol-independent; does not dictate Protocol-dependent; defines specific
Dependency specific protocols for each layer. protocols like TCP and IP for
communication.
Functionality Each layer has distinct functions, Layers are more integrated, with
providing a clear separation of some overlapping functionalities
responsibilities. between them.
Development Developed by ISO (International Developed by ARPANET for the
Organization for Standardization) as a internet, focusing on robustness and
universal networking framework. flexibility in communication.
Usage Primarily used as a teaching tool and Widely used in practice, it forms the
reference model for understanding basis of internet architecture and
networking concepts. protocols today.

You might also like