Computer Networking Notes
Computer Networking Notes
Day 1:
1. DATA COMMUNICATIONS
Data communication is the exchange of data between devices through a transmission medium
(such as a wire cable or wireless).
2. Communication Tasks
In any communication system, several tasks are performed:
3. Data Representation
Information can exist in different forms. Computers must represent and process all forms of data.
1. Text
o Represented by ASCII (American Standard Code for Information Interchange) →
7 bits.
o Unicode → 16-bit or 32-bit, supports multiple languages.
2. Numbers
o Represented in binary system (0 and 1).
o Decimal numbers are converted into binary for processing.
3. Images
o Stored as a combination of pixels (picture elements).
o Represented using bitmap or vector graphics.
o Each pixel assigned a binary code according to color scheme (e.g., RGB).
4. Audio
o Represented by sampling (converting sound waves to digital signals).
o Common standards → MP3, WAV.
5. Video
o A series of images (frames) shown in sequence.
o Represented digitally using compression methods → MPEG, MP4.
1. Simplex
o Communication in one direction only.
o Example: Keyboard → Computer, TV broadcast.
2. Half Duplex
o Communication in both directions, but only one direction at a time.
o Example: Walkie-talkie, CB radio.
3. Full Duplex
o Communication in both directions simultaneously.
o Example: Telephone, Internet video call.
5. Impact of Networks on Daily Life
Computer networks and data communication have a huge impact on modern society:
1. Business
o Online transactions, e-commerce, remote work, cloud services.
2. Education
o Online classes, digital libraries, e-learning platforms.
3. Communication
o Email, social media, instant messaging, video conferencing.
4. Entertainment
o Online gaming, streaming (YouTube, Netflix), music downloads.
5. Healthcare
o Telemedicine, patient data sharing, online health monitoring.
6. Government & Public Services
o Online portals for taxes, IDs, e-governance services.
7. Globalization
o Networking connects people across the world, making information and resources
accessible.
Examples of protocols are HTTP (for web pages), SMTP (for emails), and TCP/IP (for Internet
communication).
In simple words:
Both are necessary: protocols make communication possible, and standards make sure it works
everywhere.
Other on folders
DAY 4
PROTOCOL LAYERING:
Principles of Protocol Layering
In computer networks, communication between two systems is divided into layers. Each layer
performs a part of the task and then passes the result to the next layer. This idea is called
protocol layering.
2. Functions must be organized so that each layer serves the layer above it and is
served by the layer below it.
If technology of one layer changes (e.g., Ethernet replaced by Wi-Fi in Physical layer),
other layers should continue to work without modification.
5. Layer boundaries should be chosen carefully.
✅ In Short:
Protocol layering means dividing the communication process into layers. Each layer does one
job, communicates only with its upper and lower layer, and changes in one layer do not disturb
the rest
1. Each layer performs a specific function → A task is divided into small independent
parts, and each part is assigned to one layer only.
2. Service to upper layer → Each layer provides services to the layer above it and uses the
services of the layer below.
3. Independence of layers → Layers should not depend on internal details of other layers.
4. Change in one layer should not disturb others → For example, changing Ethernet to
Wi-Fi should not affect upper layers.
5. Clear boundaries → Functions must be grouped logically so that there is no overlap.
Logical Connections
In a layered model, communication seems to happen directly between the same layer of
two devices, but in reality, it happens through lower layers and the physical medium.
This imagined direct communication is called a logical connection.
Example: The transport layer on one computer logically communicates with the transport
layer on another computer, even though the actual data passes through all layers and the
physical medium.
Layered Architecture
Layered architecture is the design in which the communication task is divided into
different layers, and each layer has well-defined responsibilities.
Each layer talks only to:
o its peer layer on the other device (logical communication), and
o the layers directly above and below it in the same device.
Benefits:
o Simplifies design and implementation.
o Allows interoperability between different vendors.
o Easy to update or replace a layer without affecting the rest.
✅ In Simple Words:
DAY 5
TCP/IP PROTOCOL SUITE:
1. Physical Layer
o Deals with the physical transmission of bits.
o Concerned with cables, signals, and hardware devices.
2. Data Link Layer
o Organizes bits into frames.
oProvides error detection and flow control.
oExample protocols: Ethernet, Wi-Fi.
3. Network Layer
o Responsible for host-to-host delivery across multiple networks.
o Provides logical addressing.
o Example protocol: IP (IPv4, IPv6).
4. Transport Layer
o Provides process-to-process delivery (application-to-application).
o Ensures reliability, sequencing, and error control.
o Example protocols: TCP (reliable), UDP (unreliable).
5. Application Layer
o Provides services directly to the user.
o Examples: HTTP (web), SMTP (email), FTP (file transfer), DNS (name
resolution).
✅ In short: TCP/IP suite ensures communication from physical bits up to user applications.
2. Addressing in TCP/IP
For communication, different types of addresses are used at different layers:
3. Summary
TCP/IP Suite has 5 layers: Physical, Data Link, Network, Transport, Application.
Addressing is used at each layer:
o MAC (physical)
o IP (logical)
o Port (transport)
o URL/Email (application).
DAY 6
FUNDAMENTALS OF DATA AND
SIGNALS:
Analog and Digital Data
Analog data is continuous in nature, meaning it changes smoothly over time without breaks.
Examples include human speech, sound waves, and temperature. Digital data, on the other hand,
is discrete and represented in the form of binary numbers (0s and 1s). Examples include
computer text, images, and video.
👉 In short, analog data is continuous and natural, while digital data is discrete and machine-
readable.
Analog Signals
An analog signal is a continuous signal that changes smoothly over time and represents data such
as sound, light, or temperature. It can have an infinite number of values within a given range.
Example: human voice or radio waves.
Sine Wave
The sine wave is the most fundamental form of an analog signal. It represents a smooth periodic
oscillation and is defined mathematically as:
where AAA is amplitude, fff is frequency, and ϕ\phiϕ is phase. Almost all other complex signals
can be represented as a combination of sine waves.
Peak Amplitude
Peak amplitude is the maximum strength or value of a signal measured from the average (zero)
level. It shows how strong or powerful the signal is. For example, a louder sound has a higher
peak amplitude compared to a soft sound.
Period and Frequency
The period (T) of a signal is the amount of time it takes to complete one full cycle. Frequency (f)
is the number of cycles the signal completes in one second. The relationship is:
f=1Tf = \frac{1}{T}f=T1
👉 Example: If a signal has a period of 0.01 seconds, its frequency is 100 Hz.
Phase
Phase represents the position of a signal cycle at a specific point in time. It shows whether the
signal starts from zero, maximum, or some other value. Phase is measured in degrees or radians.
👉 Example: A sine wave shifted by 90° is said to have a phase difference of 90° from the
original.
Time Domain: Shows how the signal changes with time (x-axis = time, y-axis =
amplitude).
Frequency Domain: Shows how much of the signal lies within each frequency band (x-
axis = frequency, y-axis = amplitude).
👉 Time domain is for analyzing signal shape, while frequency domain is for analyzing
the signal components.
Composite Signals
A composite signal is made up of more than one sine wave. According to Fourier analysis, any
complex signal can be represented as the sum of multiple sine waves of different frequencies,
amplitudes, and phases.
👉 Example: Human voice or music is a composite signal formed by combining different
frequencies.
DAY 7
DIGITAL SIGNALS:
Digital Signals
A digital signal is a signal that represents information using a set of discrete values. The most
common digital signals are binary, using two levels: 0 and 1. These signals are not continuous
like analog signals, but instead jump from one level to another. Digital signals are widely used in
computers, data networks, and communication systems because they are less affected by noise,
can be easily compressed, and allow error detection and correction.
👉 Example: Text messages, computer files, and images are transmitted using digital signals.
👉 Example: If the bit interval is 0.001 seconds (1 ms), the bit rate is 1000 bits per second (1
kbps). A higher bit rate means more data can be transmitted per second.
When a signal travels through a communication medium such as cables, air, or optical fiber, it
often suffers from problems like attenuation (loss of strength), distortion (change in shape),
and noise (unwanted interference). To ensure that the transmitted information reaches the
receiver correctly, different methods of signal treatment are applied.
1. Amplification:
o Analog signals lose their strength over long distances. Amplifiers are used to
boost the amplitude of weak signals.
o Example: In radio transmission, amplifiers strengthen weak radio waves so they
can travel further.
2. Regeneration:
o In digital communication, instead of simply amplifying the noise along with the
signal, repeaters regenerate the signal.
o This means the distorted digital signal is reshaped back into its original 0s and 1s.
o Example: In optical fiber communication, repeaters regenerate weak light pulses
to maintain accuracy.
3. Filtering:
o Filters are used to remove unwanted frequencies or noise from signals.
o Example: In telephone systems, filters remove high-frequency noise to improve
voice clarity.
4. Modulation and Demodulation:
o For long-distance communication, analog signals are modulated (shifted to higher
frequency) for efficient transmission. At the receiver end, they are demodulated
back.
o Example: In FM radio, voice signals are modulated before transmission.
👉 In short, treatment of signals ensures that despite noise, attenuation, and distortion, the
message is delivered with high quality and accuracy.
Conclusion
Both analog and digital signals are important in data communication. Analog signals are
commonly found in natural forms like sound and light, while digital signals are preferred in
modern computer networks due to their reliability, high speed, and resistance to noise. With
proper treatment of signals (amplification, regeneration, filtering, and modulation),
communication systems can ensure efficient and accurate transmission over any medium.
DAY 8
TRANSMISSION IMPAIRMENTS:
Transmission Impairments – Attenuation,
Distortion, Noise and its Types
Introduction
When signals are transmitted over a communication channel (cables, wireless, or optical fiber),
they face many problems that reduce the quality of transmission. These problems are called
transmission impairments. Impairments affect the strength, shape, and clarity of the signal, and
if not treated properly, the receiver may get incorrect data. The three main types of impairments
are attenuation, distortion, and noise.
1. Attenuation
Definition: Attenuation means the loss of signal strength as it travels through the
transmission medium.
The longer the distance, the weaker the signal becomes.
Attenuation is measured in decibels (dB).
Formula:
dB=10log10(PreceivedPsent)\text{dB} = 10 \log_{10}\left(\frac{P_{received}}{P_{sent}}\right)dB=10log10
(PsentPreceived)
Example: If a voice signal travels through a copper wire over a long distance, its
amplitude decreases and becomes difficult to understand.
👉 Solution: To overcome attenuation, amplifiers (for analog signals) and repeaters (for digital
signals) are used.
2. Distortion
Definition: Distortion occurs when the shape of the signal changes during transmission.
In data communication, a composite signal is made of different frequency components. If
these components travel at different speeds, they arrive at different times, and the original
signal gets distorted.
Example: In a telephone line, if higher frequencies are delayed more than lower
frequencies, the received voice may sound unclear.
3. Noise
Definition: Noise is an unwanted signal that mixes with the transmitted signal and
interferes with communication. It reduces the clarity and accuracy of data.
Noise is random and unpredictable, and it can never be completely eliminated.
Types of Noise
👉 Solution: Shielding, filtering, error detection, and correction techniques are used to minimize
the effect of noise.
Conclusion
In data communication, the channel capacity refers to the maximum rate at which data can be
transmitted over a communication channel without errors. It depends on factors such as
bandwidth, signal levels, and noise in the medium. To calculate channel capacity, scientists
Nyquist and Shannon proposed two important formulas.
1. Channel Capacity
Definition: Channel capacity is the maximum data rate (bits per second) that a channel
can support under given conditions of bandwidth and noise.
It provides a theoretical limit; in practice, actual rates are usually lower.
Where:
👉 Explanation:
If only two levels (binary 0 and 1) are used, then M=2M = 2M=2.
Increasing the number of signal levels increases capacity.
👉 Example:
If a noiseless channel has a bandwidth of 3 kHz and 2 signal levels,
Where:
👉 Example:
If a channel has a bandwidth of 3 kHz and an SNR of 1000 (30 dB),
👉 Therefore, actual data rate is always less than or equal to the channel capacity given by
Nyquist or Shannon.
5. Performance
1. Bandwidth: Maximum frequency range of the channel; wider bandwidth means more
data can be sent.
2. Throughput: Actual rate at which data is transmitted successfully.
3. Latency (Delay): Time taken by data to travel from sender to receiver.
4. Error Rate: The number of corrupted bits divided by the total transmitted bits.
5. Quality of Service (QoS): Measured by how reliably and quickly data is delivered.
👉 Example: In high-speed internet, performance improves with higher bandwidth, low delay,
and low error rate.
Conclusion
Channel capacity defines the ultimate limit of data transmission. Nyquist’s formula applies to
noiseless channels, while Shannon’s formula applies to noisy channels. Data rate limits are
determined by bandwidth, noise, and signal levels, while performance depends on throughput,
delay, error rate, and quality of service. Together, these concepts help engineers design efficient
and reliable communication networks.
DAY 9
GUIDED TRANSMISSION MEDIA:
Twisted Pair, Coaxial Cable, Physical Structure topics are on first year book
1. Connector Types
Connector is a device that joins the transmission medium with a device or another medium.
Common connector types are:
2. Applications
Twisted pair cables are used in LAN, telephone networks and DSL.
Coaxial cable is used in cable TV, broadband internet and CCTV.
Fiber optic cable is used in high-speed internet, undersea cables, backbone networks, long-
distance communication, and also in medical imaging.
Single Mode Fiber (SMF): Small core (around 9 µm), long distance, very high
bandwidth.
Multimode Fiber (MMF): Large core (50–62.5 µm), short distance, cheaper cost.
Fiber optic provides extremely high bandwidth, long distance transmission with low signal loss,
complete immunity to electromagnetic interference, it is lightweight, and ensures secure
communication.
DAY 10
GUIDED AND UNGUIDED
TRANSMISSION MEDIA:
Fiber Optic Propagation Modes, Connector
Types and Applications
Propagation mode means the way light signals travel inside the fiber optic cable. There are
mainly two types:
Single Mode Propagation:
In this mode, the fiber has a very small core (about 9 µm). Light travels in only one
straight path. It is used for long-distance communication because it has very low signal
loss and very high bandwidth.
Multimode Propagation:
In this mode, the fiber core is larger (50–62.5 µm). Light can travel in multiple paths
inside the core. It is cheaper but causes more distortion and is suitable for short distances
like LAN and campus networks.
2. Connector Types
Connectors are devices that join optical fiber cables with each other or with network devices.
The most common fiber optic connectors are:
ST (Straight Tip): Older type with bayonet-style locking, used in early LANs.
SC (Subscriber Connector): Push–pull type, widely used in LANs and fiber optic
networks.
LC (Lucent Connector): Small form factor connector, commonly used in modern high-
density networks.
Fiber optic is used where high speed, long distance, and reliability are required. Its main
applications are:
1. Ground Propagation
In ground propagation, radio waves travel along the surface of the earth. The waves follow the
curvature of the earth and can cover long distances. This type of propagation is usually used for
low-frequency signals (below 2 MHz), such as AM radio broadcasting. Ground waves are
affected by the earth’s surface and lose strength as they move further.
2. Unguided Propagation
Unguided propagation means that the signal is transmitted through the open air or space without
using any physical medium such as cables or optical fibers. The electromagnetic waves travel
freely and can be received by antennas. Examples of unguided propagation include radio,
television, mobile communication, Wi-Fi, and satellite communication.
In line of sight propagation, the transmitter and receiver must be in a straight visible path of each
other. The signal travels in a straight line and cannot bend around obstacles. It is mainly used for
high-frequency signals such as VHF, UHF, microwaves, and satellite communication. For better
communication, antennas are usually placed on tall towers or buildings.
Wireless transmission means sending signals through the air without using physical media like
cables. The signals travel in the form of electromagnetic waves. These waves can have different
frequencies and each frequency range is used for a specific purpose. Wireless waves are affected
by distance, obstacles, and atmospheric conditions, but they make communication possible over
short as well as long ranges.
2. Radio Waves
Radio waves are one of the most common types of wireless transmission waves. They have a
frequency range from 3 kHz to 1 GHz. Radio waves can travel through walls and buildings, and
they are widely used for long-distance communication. They can propagate in different ways
such as ground propagation, sky propagation, and line-of-sight propagation.
Applications of Radio Waves:
DAY 11
UNGUIDED TRANSMISSION MEDIA:
Microwaves and Infrared Waves
1. Microwaves
Microwaves are electromagnetic waves with frequencies ranging from 1 GHz to 300 GHz.
These waves travel in a straight line and are mostly used in line-of-sight communication.
Microwaves cannot easily penetrate buildings or mountains, so antennas are often placed on tall
towers for effective transmission.
Applications of Microwaves:
Satellite communication.
Wireless LANs and Wi-Fi.
Bluetooth technology.
Cellular phones (4G/5G networks).
Radar systems for weather forecasting and air traffic control.
2. Infrared Waves
Infrared waves are electromagnetic waves with frequencies ranging from 300 GHz to 400 THz.
Infrared waves cannot pass through walls and are mostly used for short-range communication.
They require line-of-sight between transmitter and receiver and are less affected by interference
from other signals.
TV remote controls.
Wireless mouse and keyboard.
Short-range communication between devices.
Infrared cameras and night vision equipment.
Data transfer in some portable devices.
1. Omnidirectional Antenna
2. Unidirectional Antenna
A unidirectional antenna is an antenna that focuses the signal in one particular direction. It
provides higher power and range in that direction but does not cover all sides. This makes it
suitable for point-to-point communication where both sender and receiver are in line of sight.
DAY 12 \
TRANSMISSION MODES:
1. Parallel Transmission
In parallel transmission, multiple bits are sent simultaneously through separate channels or
wires. For example, if 8 bits are to be transmitted, 8 separate lines are used to send all bits at the
same time. This makes the transmission very fast but it also increases cost because more wires
are needed and signals may face synchronization problems over long distances.
Applications: Parallel transmission is mostly used inside computers for transferring data
between CPU, memory, and other components, such as buses and printers.
2. Serial Transmission
In serial transmission, bits are sent one after another through a single channel or wire. Only
one line is needed, so it is cheaper and suitable for long-distance communication. Although it is
slower than parallel for short distances, modern technology makes serial communication reliable
and fast for most networks.
1. Asynchronous Transmission
In asynchronous transmission, data is sent one byte (or character) at a time. Each byte is
framed with a start bit at the beginning and a stop bit at the end, so that the receiver can identify
when the data starts and ends. Since gaps can exist between bytes, the transmission is slower but
simple and inexpensive.
Applications: Asynchronous transmission is used in computer keyboards, mouse, and other low-
speed communication devices where small amounts of data are transferred irregularly.
2. Synchronous Transmission
In synchronous transmission, data is sent as a continuous stream of bits without start and stop
bits for each character. Both sender and receiver are synchronized by using a common clock
signal. This makes transmission very fast and efficient for large amounts of data, but it requires
complex hardware and precise timing.
An Internet address, also called an IP Address, is a unique numerical label assigned to each
device on a network that uses the Internet Protocol for communication. It performs two main
functions:
IP addresses are written in dotted decimal notation, where 32 bits are divided into four 8-bit
octets, each written in decimal and separated by dots (for example, [Link]).
In IPv4, the IP address has 32 bits, and it is divided into two parts:
Network ID: Identifies the specific network to which the device belongs.
Host ID: Identifies the particular device (host) within that network.
Example: In the IP address [Link], the first three octets (192.168.1) represent the network
ID, and the last octet (25) represents the host ID.
2. Classful Addressing
Classful addressing was the original scheme of IPv4 addressing used before CIDR (Classless
Inter-Domain Routing). In this method, the 32-bit IP address is divided into five classes (A, B,
C, D, and E). The class is determined by the first few bits of the address. Each class has a fixed
division between the network part and the host part.
Class A
Class B
Class C
Class D
Class E
1. Classes of IP Address
IP addresses in IPv4 are divided into five main classes: A, B, C, D, and E. Each class is
identified by the first few bits of the address and is used for different purposes. Classes help in
allocating addresses efficiently depending on the size of the network.
Class A: First bit = 0, range [Link] to [Link], used for very large networks.
Network portion = 8 bits, Host portion = 24 bits. Example: [Link]
Class B: First two bits = 10, range [Link] to [Link], used for medium-sized
networks. Network portion = 16 bits, Host portion = 16 bits. Example: [Link]
Class C: First three bits = 110, range [Link] to [Link], used for small
networks. Network portion = 24 bits, Host portion = 8 bits. Example: [Link]
Class D: First four bits = 1110, range [Link] to [Link], reserved for
multicasting.
Class E: First four bits = 1111, range [Link] to [Link], reserved for
experimental use.
2. Blocks
Each class is divided into blocks, which are ranges of addresses allocated to
organizations.
Purpose of blocks: To assign IP addresses according to network size, avoid conflicts,
and manage networks efficiently.
Examples:
Blocks make allocation easy and systematic for large, medium, and small networks.
Masking is used to identify the network portion and host portion of an IP address. A subnet
mask is a 32-bit number that “masks” the IP address to separate the network and host.
Example:
IP Address: [Link]
Subnet Mask: [Link]
Network portion: 192.168.1
Host portion: 25
Masking helps in routing, dividing networks into subnets, and efficient utilization of IP
addresses.
4. Importance
DAY 14
SUBNETTING:
Subnetting, Classless Addressing, Variable
Length Blocks
1. Subnetting
Subnetting is the process of dividing a large IP network into smaller sub-networks (subnets)
by modifying the subnet mask. It allows efficient use of IP addresses and better management of
networks.
In subnetting, some bits from the host portion are borrowed and used as network bits.
This creates multiple smaller networks inside one large network.
Formula:
o Number of Subnets = 2ⁿ (n = number of borrowed bits)
o Number of Hosts per Subnet = 2ʰ – 2 (h = host bits left)
Example:
Importance of Subnetting:
Classless Addressing, also called CIDR (Classless Inter-Domain Routing), removes the
restriction of fixed classes (A, B, C). Instead, IP addresses are assigned based on prefix length.
Advantages:
VLSM (Variable Length Subnet Mask) is an extension of classless addressing. It allows using
different subnet masks within the same network, so that networks of different sizes can be
created as per requirement.
With VLSM, larger subnets can be given to networks with more hosts, and smaller
subnets can be given to networks with fewer hosts.
It avoids wastage of IP addresses.
Example:
Network: [Link]/24
Requirement: One subnet with 100 hosts, two subnets with 50 hosts each.
Solution:
o For 100 hosts → /25 (128 addresses, 126 usable)
o For 50 hosts each → /26 (64 addresses, 62 usable each)
Thus, one network is divided into multiple variable blocks.
DAY 15
INTERNETWORKING DEVICES:
Hubs, Bridges, Switches, Routers are in first year book
DAY 16
INTERNETWORKING DEVICES:
Routers
Definition:
Router ek intelligent networking device hai jo multiple networks ko connect karta hai aur data
packets ko IP address ke basis par forward karta hai. Ye Layer 3 device hai (OSI Model ke
Network Layer pe kaam karta hai).
Main Functions:
1. Routing:
o Packet ke liye best path choose karna using routing algorithms (like RIP, OSPF,
BGP).
2. Forwarding:
o Packet ko correct interface (exit port) se bhejna.
3. Inter-network Communication:
o Alag-alag LANs aur WANs ko connect karke communication allow karta hai.
4. Packet Filtering & Security:
o Firewalls aur Access Control Lists (ACLs) ke through unauthorized traffic rokta
hai.
5. Traffic Management:
o Network congestion ko reduce karta hai by controlling data flow.
Advantages of Routers:
Types of Routers:
TCP/IP Overview
Definition:
TCP/IP (Transmission Control Protocol / Internet Protocol) ek protocol suite hai jo Internet aur
network communication ke liye design kiya gaya hai.
1. Application Layer
2. Transport Layer
3. Internet Layer
Advantages of TCP/IP: