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

Data Communication and Computer Networking

The document provides an overview of computer networks, defining them as systems that connect independent computers for data and peripheral sharing. It discusses the advantages and disadvantages of different network types, including Local Area Networks (LANs), Metropolitan Area Networks (MANs), and Wide Area Networks (WANs), as well as peer-to-peer and server-based networks. Additionally, it covers network topologies such as bus, star, ring, and mesh, highlighting their characteristics and implications for network performance and reliability.

Uploaded by

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

Data Communication and Computer Networking

The document provides an overview of computer networks, defining them as systems that connect independent computers for data and peripheral sharing. It discusses the advantages and disadvantages of different network types, including Local Area Networks (LANs), Metropolitan Area Networks (MANs), and Wide Area Networks (WANs), as well as peer-to-peer and server-based networks. Additionally, it covers network topologies such as bus, star, ring, and mesh, highlighting their characteristics and implications for network performance and reliability.

Uploaded by

kiracherub866
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 54

DATA COMMUNICATION AND COMPUTER NETWORKING

CHAPTER ONE–INTRODUCTION TO COMPUTER However , with these advantages come a number


NETWORKS of potential disadvantages. Making important and
sensitive information available to every user of
What is a computer network ? the network is not normally desirable. For
example information about employees salaries
A computer network is a system in which a should not be freely available for any body to
number of independent computers are linked look at.
together to share data and peripherals , such as
files and printers. Security is therefore an important concern in a
network environment , secondly the danger of
Advantages and Disadvantages of Computer computer viruses entering the network is greatly
Networks increased. A virus can infect any of the
computers on the network , and can quickly
The reason for the popularity of computer spread throughout the network causing significant
networks is that they offer many advantages. damage.
Information such as important files, video and
audio , and email can be easily shared between COMPUTER NETWORK TYPES :-
users. Peripherals such as printers and modems
can also be shared over the network. For example
:- the figure below shows a printer being used in Local Area Networks :-
a stand alone environment and in a network
environment. By connecting many computers to a A local area network (LAN) is a computer
print server any of them may make use of the network that connects devices with in a limited
printer directly , instead of the single computer area such as a home , office or building. It
in the stand – alone environment. Also , software allows devices to communicate with each other
such as word processors and spreadsheets can be and share resources such as printers , files and
made available to all computers on the network internet connections.
from a single central server.
LAN can be set up in a variety of ways ,
This type of set up is known as a client – server including using Ethernet cables to connect devices
model. In this model, there is a central server directly to a router or switch , using wireless
that provides access to various resources , such technologies such as wifi to connect devices to a
as software applications and files , to multiple central access point , or using power line
client devices on the network. The client devices networking to transmit data over electrical
can use these resources remotely , without the wiring.
need for installing the software or storing the
files locally on their own devices , This approach LANs are often used in business to connect
can provide various benefits such as improved computers and other devices in an office or
resource utilization , centralized management , building , allowing employees to share resources
and enhanced security. and work collaboratively. They are also
commonly used In homes to connect devices
such as computers , printers , and smart devices.

LANs are typically faster and more secure than


wide area networks (WANs) because they are
confined to a smaller physical area and can be
more easily managed and secured.

Wired LANs use a range of different transmission


technologies , most of them use copper wires ,
but some use optical fiber. LANs are restricted in
size , which means that the worst case
transmission time is bounded and known in 2) Scope :- LANs and MANs are typically owned
advance. and operated by a single organization or service
provider , where as WANs may be operated by
Metropolitan Area Networks :- multiple organizations or service providers.

A metropolitan area network (MAN) is a 3) Technologies :- LANs and WANs can use a
computer network that covers a larger variety of wired and wireless technologies to
geographical area than a local area network connect devices , including Ethernet , WiFi , and
(LAN) but smaller than a wide area network fiber – optic cables. WANs typically use
(WAN). A MAN typically spans a city or a region specialized technologies such as leased lines ,
and connects multiple LANs with in that area. A satellite links and VPNs to connect and remote
MAN is typically owned by a single organization locations.
or service provider , such as a government
agency or tele-communicatios company , and is 4) performance :- LANS and MANs typically offer
used to connect multiple sites or buildings in a higher performance and lower latency (latency
metropolitan area. refers to the delay that occurs when data is
transmitted between devices over a network) than
MANs can be set up using a variety of WANs due to their smaller geographic area and
technologies including Ethernet , fiber-optic more direct connections. WANs may experience
cables , microwave links , and wireless greater latency and slower speeds due to the
technologies such as Wifi. They are typically longer distances and more complex routing
faster and more reliable than WANs , which involved in connecting remote locations.
cover larger geographic areas and may require
leased lines or other technologies to connect NETWORK CONFIGURATION :-
remote locations.
All networks have certain components , functions
MANS are commonly used by business and and features In common , these include :-
organizations that have multiple sites or branches
in a metropolitan area , such as universities , Servers – computers that provide shared resources
hospitals , government agencies and large for network users
corporations. They allow these organizations to
share resources and data across multiple locations Clients – computers that access shared resources
, improving collaboration and productivity. provided by servers

Wide Area Networks :- Shared data :- files provided to clients by servers


across the network
A wide area networks (WAN) is a computer
network that spans a large geographical area , Shared peripherals :- additional hardware
such as a country or even the world. WAN resources provided by servers
typically connect multiple LANs and MANs ,
allowing devices and users in different locations Even with these similarities , networks are
to communicate and share resources. divided in to two broad categories

The main difference between LANs , MANs , and ➔ peer to peer networks
WANs are their size , scope and the technologies ➔ server based networks
used to connect devices. Here are some of the
key differences and similarities. Factors that must be evaluated to configure a
network as peer to peer or server based
1) Size :- LANs are the smallest of the three
networks , typically covering a single building or The type of network you choose to implement
campus. MANs cover a larger geographic area will depend on factors such as the
such as a city or region , and WANs can span
countries or even the world. ➔ Size of the organization
➔ Level of security required
➔ Types of business A network may have separate servers for file
➔ Level of administrative support available storage , printing , email and for storing and
➔ Amount of network traffic running application software.
➔ Needs of the network users
➔ Network budget 1) File and Print servers
2) Application servers
Peer – to – Peer Networks 3) Mail servers
4) Fax servers
In a peer to peer network , there is no dedicated 5) Communication servers
servers , and there is no hierarchy among the 6) Directory services
computers. All the computers are equal and
therefore are known as peers. Each computer Although it is more complex to install , configure
functions as both a client and a server , and ,and manage , a server - based network has
there is no administrator responsible for the many advantages over a simple peer to peer
entire network. The user at each computer network.
determines what data on that computer is shared
on the network. Number of users :- It supports large number of
users
Peer to peer networks are relatively simple ,
because each computer functions as a client and Server–based data sharing can be centrally
as a server , there is no need for a powerful administered and controlled :-, because these
central server or for other components required shared resources are centrally located , they are
for a high capacity network. Peer to peer easier to find and support than resources on
networks can be less expensive than server-based individual computers.
networks.
Security :- is often the primary reason for
Peer to peer networks are good choices for choosing a server – based approach to
environments where :- networking. In server-based environment , one
administrator who sets the policy and applies it
➢ There are 10 users or fewer to every user on the network can manage
➢ Users share resources , such as printers security.
but no specialized servers exist
➢ Security is not an issue Backups can be scheduled several times a day or
once a week depending on the importance and
value of the data. Server back ups can be
Server Based Networks :- scheduled to occur automatically , according to a
predetermined schedule , even if the servers are
In an environment with more than 10 users , a located on different parts of the network.
peer-to-peer network – with computers acting as
both servers and clients will probably not be A server – based network can support thousands
adequate. Therefore , most networks have a of users. This type of network would be
dedicated servers. A dedicated server is one that impossible to manage as a peer to peer network.
functions only as a server and is not used as a
client.

As networks increase in size ( as the number of


connected computers and the physical distance
and traffic between them , grows ) more than
one server is usually needed. Spreading the
networking tasks among several servers ensures
that each task will be performed as efficiently as
possible.
ADVANTAGE AND DISADVANTAGE OF PEER TO Different topologies require different
PEER NETWORK communication methods and these methods have
a great influence on the network.
ADVANTAGE :-
There are four basic types of computer topology :
 Allows simple sharing of data and bus , star , ring , mesh , hybrid.
hardware
1) Bus Topology :-
 Not expensive
Bus Topology is a type of network topology in
 Easy to set up computer networking where all the nodes in a
network are connected to a common linear
DISADVANTAGE :- transmission medium , which is typically a
coaxial cable or twisted pair cable. In a bus
 Poor security of data and resources topology , the cable acts as back bone for the
network , and all the nodes are attached to the
 Not suitable for large number of PCs cable via a drop or a T-connector.

ADVANTAGES OF CLIENT / SERVER NETWORK

Sharing Resources :- because shared resources are


centrally located , they are easier to find ,
administer and control

Security :- Security is often the primary reason


for choosing this network model , it has got good
security data and other resources

Backup :- Backups can be scheduled several times


a day or a week depending on the importance
and value of the data
The bus topology is known for its simplicity and
Number of users :- It supports large number of ease of installation , as it does not require any
users central point of control or complex network
management. It is also cost – effective , as it
Computer Network Topologies requires less cabling than other topologies ,
making it suitable for small networks.
The term topology or more specifically , network
However , the bus topology has some drawbacks.
topology refers to the arrangement or physical
One of the main disadvantage is that the entire
layout of computers , cables and other
network is reliant on a single cable , which
components on the network. A network’s
makes the network vulnerable to a single point of
topology affects its capabilities. The choice of one
failure. If the cable is damaged or breaks , the
topology over another will have an impact on the
entire network will be down. Additionally , the
:-
performance of the network may be affected if
there are too many nodes connected to the
- Type of equipment that the network needs
network , as the band width of the cable is
shared among all of the nodes. Bus topology is a
- Capabilities of the network
simple and cost-effective way to connect nodes in
- Growth of the network
a network , but it may be the most reliable or
- Way of the network managed
scalable option for a larger networks.
2) Star Topology Ring Topology

In the star topology , cable segments from each The ring topology connects computers on a single
computer are connected to a centralized circle of cable. Unlike the bus topology , there
component called a hub. Figure 2 shows four are no terminated ends. The signals travel around
computers and a hub connected in a star the loop in one directions and pass through each
topology. Signals are transmitted from sending computer , which can act as a repeater to boost
computer through the hub to all computers on the signal and send it on the next computer.
the network. Figure 3 shows a typical ring topology with one
server and four work stations. The failure of one
computer can have an impact on the entire
network.

Because each computer is connected to a central


point , this topology requires a great deal of
cable in a large network installation. Also , if the
Each computer acts as a repeater , regenerating
central point fails , the entire network goes
the signal and sending it on to the next computer
down. If one computer or the cable that connects
, there by preserving signal strength. One
it to the hub fails on a star network only the
disadvantage is that if there is an interruption at
failed computer will not be able to send or
some point , the whole network will go down.
receive network data. The rest of the network
continues to function normally.
Mesh Topology

Advantage of star topologies :-


A mesh topology network offers superior
redundancy and reliability. In a mesh topology ,
➢ Like a bus topology , networks are easy
each computer is connected to every other
to install and maintain
computer by separate cabling. This configuration
➢ If there is any interruption between any
provides redundant paths through out the
of the clients and the hub , the other
network so that if one cable fails , another will
clients will normally work
take over the traffic. While ease of
➢ Since there is a dedicated controller , the
troubleshooting and increased reliability is
hub , collision is much reduced
definite benefits , these networks are expensive to
➢ Nodes can be added to and removed from
install because they use a lot of cabling. Often a
the network with little or no disruption to
mesh topology will be used in conjunction with
the network.
other topologies to form a hybrid topology.

Disadvantage of star topologies


An advantage of this topology is its back up
capabilities by providing multiple paths through
➢ We need to use more cable
the network , because redundant paths require
➢ If the hub fails , then the whole network
more cable than needed in other topologies , a
will fail , so the entire network will
mesh topology can be expensive.
depend on hub.
digits from 0 to 9 and letters from A to
F. They are commonly used in computer
programming and data representation, as
they provide a more compact and
convenient way to represent binary data.
Hexadecimal numbers are often used to
represent memory addresses, color codes,
and machine instructions.

Hybrid Topology :- Many working topologies are 4. Text: Text data represents characters and
hybrid combinations of the bus , star , ring and symbols using a standardized encoding
mesh topologies. Two of the common are system, such as ASCII (American Standard
described below. Code for Information Interchange) or
Unicode. Each character is assigned a
Start bus topology :- The star bus is a
unique numeric value, allowing computers
combination of the bus and star topologies ,
several start topology networks are linked to store, process, and display text-based
together with linear bus trunks. information. Text data can include letters,
numbers, punctuation marks, and special
characters. For example, the uppercase
DATA REPRESENTATION TECHNIQUES letter 'A' is assigned the code 65, the
lowercase letter 'a' is assigned the code
Data representation refers to the methods used to
97, and so on.
represent different types of information in a
computer system. Computers store and process 5. Graphics: Graphics data represents visual
data in various formats, including numeric data, images, such as drawings, photographs,
text, executable files, images, audio, video, and icons, and animations. Graphics are
more. However, these different types of data typically stored in formats like JPEG,
appear distinct to us as humans. PNG, GIF, or BMP. These formats use
various techniques to encode and
Here are some common methods of data
compress visual information, allowing it
representation in data communication:
to be stored and displayed on computer
1. Decimal Numbers: Decimal numbers are screens.
the numbers we are most familiar with in
Each method of data representation has its own
our everyday lives. They use a base-10
advantages and use cases. The appropriate
system, meaning they consist of ten digits
representation depends on the type of data being
(0-9). Decimal numbers represent
handled and the specific requirements of the
quantities in terms of units, tens,
application or system. Effective data
hundreds, and so on.
representation is essential for accurate
2. Binary Numbers: Binary numbers use a communication and efficient processing of
base-2 system and consist of only two information in computer systems.
digits, 0 and 1. Computers internally
represent and process data in binary
format. Each digit in a binary number is
called a bit, and a sequence of bits forms
bytes, which are the basic units of storage
in computers.

3. Hexadecimal Numbers: Hexadecimal


numbers use a base-16 system, combining
Data Transmission formats Digital transmission is different from analog
transmission in several ways. Digital signals are
Data transmission refers to the process of sending simpler and consist of a series of discrete pulses
digital or analog data from one device to another that represent 0s and 1s (bits). Each computer
over a communication medium. It allows devices uses a coding scheme to define how different
to communicate with each other by transferring combinations of 0s and 1s represent characters in
data in the form of signals. Data transmission can a character set, such as letters, numbers,
occur between devices in various ways, such as punctuation marks, and control functions. Digital
point-to-point (between two devices), point-to- transmission allows for more reliable and accurate
multipoint (from one device to multiple devices), data transfer compared to analog transmission.
or multipoint-to-multipoint (between multiple
Data transmission is a crucial process that enables
devices).
devices to communicate and share information,
whether in digital or analog form, using various
methods and transmission media.

TRANSMISSION IMPAIRMENTS
When we transmit signals over a communication
link, there can be some problems that affect the
quality of the signal. These problems are known
as transmission impairments and can occur in
both analog and digital signals. There are three
main types of transmission impairments:
Digital data transmission involves sending attenuation, delay distortion, and noise.
and receiving digital data, which is represented 1. Attenuation: Attenuation happens when
by discrete signals or digital bit streams. The the strength of the signal decreases as it
data originates from a source device and is travels over a distance. This can make the
transmitted over a communication medium, such signal weaker and harder to understand.
as copper wires, wireless carriers, or optical fiber,
to reach the destination device. The digital data • We need the received signal to be
is composed of binary digits (bits), which can be strong enough for the receiver to
either 0 or 1. These bits are combined to understand it. We can use
represent different types of information, such as amplifiers or repeaters to boost
text, images, audio, or video. the signal strength.

Analog transmission, on the other hand, 2. Delay Distortion: Delay distortion occurs
involves conveying voice, data, images, signals, because different frequencies in a signal
or video information using continuous signals that can travel at slightly different speeds
vary in amplitude, phase, or another property. through a transmission medium. This can
An analog signal is characterized by its cause the signal to become distorted or
continuous variation along amplitude and arrive at different times. To fix this, we
frequency. For example, in telephony, when you can use equalization techniques to smooth
speak into a handset, the changes in air pressure out the distortion.
are converted into electrical signals that represent
3. Noise: Noise refers to unwanted signals
the voice pattern. These signals are analog in
that interfere with the transmission and
nature because they continuously vary.
reception of the intended signal. There
are different types of noise:
• Thermal noise: This noise is There are three main data transmission modes
caused by the random motion of based on the direction of information exchange:
electrons due to temperature. It
1. Simplex: In simplex mode, data can only
cannot be eliminated completely
flow in one direction, which means the
and is directly related to the
communication is unidirectional. The
temperature and bandwidth of the
sender can only send data, while the
system.
receiver can only receive it. Two-way
communication is not possible in this
• Crosstalk: Crosstalk occurs when
mode. Simplex mode is commonly used in
signals from one communication
situations where there is no need for a
channel leak into another nearby
corresponding reply. Examples include
channel. This can happen in
radio and TV transmissions, keyboards,
twisted pair cables or microwave
and mice.
antennas and can cause
interference or overlap of signals. Keyboards and mice generally use simplex
communication, which is a type of data
transmission mode where data only travels in one
Impairments can affect the quality and reliability
direction - from the device (keyboard or mouse)
of data transmission. To mitigate their effects,
to the computer.
various techniques and technologies are used,
such as amplifiers, equalizers, and error- In a typical computer setup, the mouse and
correcting codes. By understanding these keyboard don't need to receive data from the
impairments and implementing appropriate computer under normal operation - they only
solutions, we can improve the performance of need to send signals to it. For example, when
communication systems. you press a key on your keyboard, it sends a
signal to your computer indicating which key was
DATA TRANSMISSION MODES pressed. The computer then interprets this signal
and carries out the appropriate action (well it
Data transmission mode refers to the direction in will do some operation but it does not reply back
which information flows between two to the keyboard). The same thing happens when
communication devices. It determines how data is you move your mouse or click one of its buttons.
exchanged and synchronized in a computer
network. However, in some more advanced or specialized
situations, a keyboard or mouse might also
receive data from the computer, such as for
configuration purposes or to control lighting on
RGB keyboards and mice. In these cases, the
communication would be duplex, not simplex.
Still, for the majority of usage, keyboards and
mice operate using simplex communication.

2. Half-Duplex: In half-duplex mode, data


can flow in both directions, but only in
one direction at a time. Also known as
semi-duplex, each station can both
transmit and receive data, but not
simultaneously. When one device is
sending data, the other can only receive,
and vice versa. The entire channel In synchronous transmission, data is sent
capacity is utilized for each direction of continuously without any breaks or pauses. It's
communication. This mode is suitable like a synchronized dance where both the sender
when communication in both directions is and receiver follow the same rhythm or timing.
not required simultaneously. Examples They are always in sync with each other, so they
include police radios and internet know exactly when the data is being transmitted.
browsers.
In asynchronous transmission, data is sent in
3. Full-Duplex: Full-duplex mode enables smaller chunks with specific start and stop points.
data to flow in both directions It's like sending messages with clear beginnings
simultaneously, allowing for bi-directional and endings. The sender adds a start bit at the
communication. Both stations can transmit beginning and a stop bit at the end of each
and receive data at the same time. Full- chunk of data to indicate when the transmission
duplex mode provides double the starts and ends.
bandwidth compared to half-duplex mode.
To simplify further, synchronous transmission is
The channel capacity is divided between
like a smooth and continuous flow of data, while
the two directions of communication. This
asynchronous transmission is like sending separate
mode is used when simultaneous
messages with clear markers to indicate the start
communication in both directions is
and end of each message.
required. An example is a telephone
network, where two people can talk and SERIAL AND PARALLEL TRANSMISSION
listen to each other simultaneously.

The choice of data transmission mode depends on


the specific communication requirements of a
system. Simplex mode is used for one-way
communication, while half-duplex mode suits
situations where bidirectional communication is
not needed simultaneously. Full-duplex mode is
ideal for scenarios where simultaneous two-way
communication is required.

Synchronization and Asynchronous Transmission Serial transmission: In this mode, data is sent one
bit at a time over a single transmission line. It's
like sending a series of letters, one after the
other, through a narrow tunnel. The sender and
receiver need to be synchronized to ensure the
data is received correctly. This mode is used for
long-distance communication or when the amount
of data being sent is small.

Parallel transmission: In this mode, multiple bits


are sent at the same time using multiple
transmission lines. It's like sending a group of
letters together through separate tunnels. Parallel
transmission allows for faster data transfer
because more bits can be transmitted
simultaneously. However, it requires more
transmission lines and can be affected by
interference if the lines are too close together. It microwaves). Examples of transmission media
is used for short-distance communication or when include twisted pair cables, fiber optic cables,
a large amount of data needs to be sent quickly. and wireless communication channels.

When selecting a data transmission mode, several Set of Rules (Protocol): In order for communication
factors need to be considered: to take place successfully, a set of rules and
procedures called a protocol needs to be
• Transmission rate: How quickly data can
established. Protocols define how the sender and
be sent and received.
receiver should communicate, including the
format of the message, error handling, data flow
• Distance: The maximum distance over
control, and other aspects of the communication
which data can be reliably transmitted.
process. Without a protocol, devices may not be
able to understand each other and communication
• Cost and ease of installation: The expense
would not be possible.
and difficulty involved in setting up the
transmission system. The elements mentioned above work together to
enable effective data communication between
• Resistance to environmental conditions: devices. For example, when sending an email, the
The ability of the transmission system to sender acts as the source, the message is the
withstand and perform well in different content of the email, the receiver is the intended
environments. recipient, the internet connection serves as the
transmission medium, and protocols like SMTP
By considering these factors, the most appropriate
(Simple Mail Transfer Protocol) govern the rules
transmission mode can be chosen for a specific
for sending and receiving emails.
network communication requirement.
In computer networks, protocols are essential to
ELEMENTS OF A DATA COMMUNICATION
ensure reliable and standardized communication
Message: The message is the information or data between devices, allowing for seamless data
that needs to be communicated. It can be in exchange and interoperability.
various forms such as text, audio, video, or any
other type of data. TYPES OF STANDARDS

Sender: The sender is the device or entity that De Facto Standard: These are standards that have
initiates the communication by transmitting the not been officially approved by any organization
message. It can be a computer, mobile phone, but are widely adopted due to their widespread
workstation, or any other device capable of use or industry acceptance. They are often
sending data. established by manufacturers or companies as
Receiver: The receiver is the device or entity that their own rules or conventions.
receives the message sent by the sender. It is the
destination where the message is intended to be De Jure Standard: These are standards that have
received. Similar to the sender, the receiver can been officially approved by recognized bodies or
be a computer, mobile phone, workstation, or organizations such as ANSI (American National
any other device capable of receiving data. Standards Institute), ISO (International
Organization for Standardization), IEEE (Institute
Transmission Medium: The transmission medium
of Electrical and Electronics Engineers), etc. They
is the physical path or channel through which the
are important to follow when required or needed,
data or message travels from the sender to the
especially in data communication protocols.
receiver. It can be either guided (using wired
connections like cables) or unguided (using
wireless connections like radio waves or
Circuit Switching and Packet Switching Packet Switching:

Packet switching is a communication method


where data is divided into smaller units called
packets and transmitted over the network.

Advantages:

Efficient use of bandwidth: Bandwidth is shared


among multiple users, and resources are allocated
Circuit switching is a communication method
only when data needs to be transmitted, resulting
where a dedicated communication path or circuit
in efficient utilization.
is established between two devices before data
transmission begins.
Flexible: Packet switching can handle a wide
range of data rates and packet sizes.
Advantages:

Scalable: It can handle large amounts of traffic on


Guaranteed bandwidth: The dedicated path
a network, making it highly scalable.
ensures a specific amount of bandwidth for the
duration of the communication.
Lower cost: Resources are shared among multiple
users, reducing overall costs.
Low latency: Since the path is predetermined,
there is no need to establish a connection for
Disadvantages:
each data packet, resulting in low latency.

Higher latency: Due to the need for packet


Predictable performance: The reserved bandwidth
routing through multiple nodes, packet switching
ensures predictable performance without resource
has higher latency compared to circuit switching.
competition.

Packet loss: Congestion or transmission errors can


Suitable for real-time communication: Circuit
result in packet loss during transmission.
switching is suitable for real-time applications
like voice and video due to low latency and
Unsuitable for real-time communication: Packet
guaranteed bandwidth.
switching may not be suitable for real-time
applications like voice and video due to potential
Disadvantages:
latency and packet loss.

Inefficient use of bandwidth: The dedicated circuit


Similarities:
reserves bandwidth even when there is no data
transmission, resulting in inefficient utilization. ➔ Both circuit switching and packet
switching involve the transmission of data
Limited scalability: The number of circuits that over a network.
can be established is finite, which limits the
number of simultaneous calls that can be made. ➔ Both methods use the physical layer of
the OSI model for data transmission.
High cost: Circuit switching requires dedicated
resources, making it more expensive compared to ➔ Both methods can be used to transmit
other methods. voice, video, and data.
➔ Both methods can be used within the signals. An active hub , on the other hand ,
same network infrastructure. includes electronics that amplify and regenerate
➔ Both methods can be used for both wired the signals to boost the strength and quality of
the transmission.
and wireless networks.

These concepts are important in understanding


the different modes of data communication and
the trade-offs associated with each method.

Computer Network Components

Computer Network Components Repeaters

A computer network repeater is a device used


to boost or regenerate digital signals on a Hubs have largely been replaced by switches ,
network. It receives a signal on one port and which are more efficient and intelligent in
amplifies it before retransmitting it on one or handling network traffic , switches are able to
more output ports. The primary function of a send data only to the device that it is intended
repeater is to extend the range of a network by for , which reduces network congestion and
improves network performance.
amplifying the signal so that it can travel
further along the network’s physical medium ,
Because hubs broadcast all data packets to all
such as a copper wire or fiber optic cable.
connected devices , they can cause network
congestion and reduce network performance ,
It is important to note that repeaters do not particularly in larger networks.
improve the quality of the signal , and they
can not correct errors or noise that may Bridges
present in the original signal , instead they
simply regenerate the signal and forward it A bridge is a networking device that connects
along the network. two separate network segments to create a
single , larger network. Bridges work by
Hubs examining the source and destination MAC
addresses of data packets and forwarding them
A hub is a networking device that serves as a only to the segment where the destination MAC
central connection point for multiple devices on a address is located. This helps to reduce network
network. It receives data packets from one device congestion and improve network performance by
and broadcasts them to all the devices connected limiting the amount of unnecessary traffic that is
to it , regardless of whether the data is intended sent across the network.
for a specific device or not.
Bridges are particularly useful in large networks
Hubs work by receiving data packets on one port that are divided in to multiple segments as they
and then broadcasting them to all other ports on can help to improve the efficiency of the network
the hub , regardless of whether the data is by reducing the amount of broadcast traffic that
intended for specific device or not. This is called Is sent across the entire network.
a “broadcast” or “collision” domain. As a
result , all devices connected to the hub receive When a device on one segment of a network
the same data packets , and each device must wants to send data to a device on another
determine whether the packet is intended for it segment of the same network , it sends a data
or not. packet containing the source and destination MAC
addresses involved. The bridge examines the
There are two types of hubs : passive and active source and destination MAC addresses in the data
e, A passive hub simply acts as a connector for packet and compares them to its internal table of
devices and does not amplify or regenerate the
MAC addresses and corresponding segments. This unnecessary traffic that is sent across the
table is called a forwarding table or a MAC table. network.

Switches work by examining the source and


destination MAC address of data packets and
forwarding them only to the port where the
destination MAC address is located. This process
is called switching and it helps to ensure that
data packets are sent only to the device that
needs them.

Switches are particularly useful in large networks


where there are many devices that need to
communicate with each other. They can help to
improve the efficiency of the network by reducing
If the destination MAC addresses is not found in the amount of broadcast traffic that Is sent across
the forwarding table , the bridge assumes that the entire network.
the destination device is on a different segment
of the network and forwards the data packet to Routers
all segments except the one it was received on.

When the destination device responds to the


original data packet , the bridge updates its
forwarding table with the MAC address and
corresponding segment of the device. From that
point on , any data packets destined for that
device are forwarded only to the segment where
the device is located , reducing the amount of
unnecessary traffic sent across the network.

By limiting the amount of unnecessary traffic ,


bridges help to reduce network congestion and A router is a networking device that connects
improve network performance. This is particularly multiple networks together and enables devices
useful in large networks with many devices , on those networks to communicate with each
where broadcast traffic can quickly overwhelm other.
the network and cause performance issues.
Routers work by examining the destination IP
Switches address of data packets and forwarding them to
the correct network. They maintain a routing
A switch is a networking device that connects table , which contains information about the
multiple devices on a network and enables them different networks that the router is connected to
to communicate with each other. Unlike hubs , and the best path for sending data to each
which broadcast data packets to all devices on a network.
network , switches are able to send data only to
the device that is intended for. This helps to Routers are particularly useful in large networks
reduce network congestion and improve network where there are multiple subnets or networks that
performance by limiting the amount of need to communicate with each other. They can
help to improve the efficiency of the network by
directing traffic along the shortest and fastest
path to its destination.

What makes routers differ from the switches.


multiple networks together and enable devices on
Switches are networking devices that connect those networks to communicate with each other.
multiple devices on a network and enable them
to communicate with each other. Switches work Routers work by examining the destination IP
by examining the source and the destination MAC address of data packets and forwarding them to
addresses of the data packets and forwarding the correct network. They maintain a routing
them only to the port where the destination MAC table, which contains information about the
address is located. This process is called
different networks that the router is connected to
switching and it helps to ensure that data packets
and the best path for sending data to each
are sent only to the device that needs them.
network. Routers can perform various functions
Routers on the other hand , connect multiple such as filtering, NAT, and VPN capabilities to
networks together and enable devices on those secure and manage network traffic.
networks to communicate with each other.
Routers work by examining the destination IP Gateways
address of data packets and forwarding them to
the correct network. They maintain a routing
table , which contains information about the
different networks that the router is connected to
an the best path for sending data to each
network.

The main difference between routers and switches


is their functionality , switches are designed to
connect devices on the same network and direct
data packets to the appropriate device , while
routers are designed to connect multiple networks
together and direct data packers between them.
As a result routers are more intelligent and
capable than switches and they can make
decisions about how to forward data packets A gateway Is a networking device that connects
based on their destination address and network two or more different networks that may use
topology. different protocols , topologies , or architectures.
Its main purpose is to facilitate communication
Switches are designed to connect devices on the and data exchange between these networks.
same network or subnet, such as devices on a
local area network (LAN). They are able to direct In order for data to be transmitted between
data packets to the appropriate device by looking networks , it must be in a format that can be
understood by both networks. A gateway is
up the destination MAC address in their
responsible for converting data from one network
forwarding table, which contains a list of MAC
format to another. For example , if one network
addresses and the ports they are connected to. uses the Internet Protocol (IP) and another uses
X.25 protocol , a gateway can translate data
When a data packet is received on a switch port,
between the two protocols so that data can be
the switch checks the forwarding table to
transmitted between the two networks.
determine which port the packet should be sent
to in order to reach the destination device. This Gateways are often used to connect different
helps to reduce network congestion and improve types of networks , such as LAN and WAN or a
network performance by directing traffic only to wireless and a wired network. They can also be
the devices that need it. used connect different types of devices such as a
computer and a printer or a phone and a
Routers, on the other hand, are more complex computer.
networking devices that operate at the network
layer (Layer 3) of the OSI model. They connect
Gateways are critical for enabling communication
between different networks or devices that use
different protocols , topologies , or architectures.
They provide a bridge between these networks ,
allowing data to be transmitted and received
across the different networks.
CHAPTER FOUR :- NETWORK MODELS layer has a specific function that contributes to
the over all transmission of data between devices
A network model is a conceptual framework that on a network. By breaking down the network
describes how data flows with in a network and communication process in to smaller parts , the
how network devices interact with each other. It OSI model simplifies the design , implementation
provides a structured approach to designing , and troubleshooting of computer networks.
building and troubleshooting computer networks.
OSI is a standard description or “reference
There are several network models that have been model” for how messages should be transmitted
developed over time , including the open systems between any two points in a telecommunication
interconnection (OSI) model and the Transmission network. Its purpose is to guide product
Control Protocol / Internet Protocol (TCP/IP) implementers so that their products will
model. These models divide the networking consistently work with other products.
process in to layers , with each responsible for a
specific set of tasks or functions. The OSI model is designed to prompt
interoperability by creating a guide line for
The OSI model , for example has seven layers , network transmission between computer that has
ranging from the physical layer (Layer 1) to the different vendors , SW , operating systems and
application layer (Layer 7). Each layer performs protocols.
specific functions , such as data transmission
(Layer 1) , error correction (Layer 2) , routing The OSI reference model is the best-known and
(Layer 3) , and application services (Layer 7). The most widely used guide for visualizing networking
TCP/IP model , on the other hand has four layers environments. Manufacturers adhere to the OSI
, the network interface layer , the internet layer , reference model when they designed the network
the transport layer , and the application layer. products. It provides a description of how
network hard ware and software work together in
The purpose of a network model is to provide a a layered fashion to make communication
standard framework for communication between possible.
network devices , regardless of the manufacture
or type of device. This allows devices from A reference model is a conceptual blue print of
different vendors to interpolate with each other , how communications should take place. It
and amplifies the process of designing , building addresses all the processes required for effective
and maintaining networks. communication and divides these processes in to
logical grouping called layers. The OSI model is
Network model are used extensively in computer the primary architectural model for networks. It
networking , and are a key concept for network describes how data and network information are
engineers and administrators. They provide a communicated from application on one
common language and framework for discussing computer , through the network media , to an
networking concepts and issues and are essential application on another computer. The OSI
for troubleshooting network problems. reference model breaks this approach in to layers.

TYPES OF NETWORK MODELS IN DATA Major benefits of OSI reference model :-


COMMUNICATION
➢ Reduce complexity
The open systems interconnection (OSI) model is ➢ Standardizes interfaces
a conceptual framework that describes how data ➢ Facilitate-modular/modification
moves through a network. It is a seven layer engineering
model that breaks down the network ➢ Ensure Interoperability Technologies
communication process in to smaller and more ➢ Accelerate Evolutions
manageable parts. ➢ Allow various types of network hardware
and software to communicate
The OSI model provides a framework for
understanding how network devices and
applications communicate with each other. Each
The OSI reference model defines how each layer
communicates and works with the layers ➢ Also defines how the data actually travels
immediately above and below it. across the network

Each of the seven layers may differ in terms of :- ➢ Define the voltage used on the cable and
the frequency at which the signals that
Purpose / Function :- Each of these layers carry the data are transitioned from one
performs a specific function that plays an state to another.
important part in the end to end communication
between two devices. ➢ Defines the physical topology of the
network.
Network Device :- Hubs , Switches , Bridges ,
Routers , NICs
Layer 2 :- Data Link Layer
Protocols :- TCP , IP , FTP , UDP , SMTP
The data link layer is the second layer of the OSI
Data handling and encryption process :- Name of model and is responsible for error-free data
the data as data , segment , Datagram , pact , transmission over a physical layer such as
frame , Bit. between network card and a switch. Its main
objective is to provide a reliable and error free
The seven layers of OSI are :- connection between two devices on a network.

✔ 1) Application Layer The data link layer divides data in to frames and
✔ 2) Presentation Layer adds error detection and correction codes to
✔ 3) Session Layer ensure that data is transmitted without errors. It
✔ 4) Transport Layer also manages data flow control between devices
✔ 5) Network Layer to prevent data loss and congestion on the
✔ 6) Data Link Layer network.
✔ 7) Physical Layer
The data link layer is responsible for tasks such
as addressing , framing , error detection and
Layer 1 :- Physical Layer correction , and flow control. It uses physical
addresses , such Media Access Control (MAC)
The physical layer is the first layer of the OSI addresses , to identify devices on a network ,
model and is responsible for transmitting raw and is responsible for directing data frames to
data bits over a physical medium , such as their intended recipients.
copper or fiber optic cables. It defines the
physical characteristics of the network , such as The data link layer is critical for ensuring that
voltage levels , cable specifications , and data data is transmitted reliably and efficiently
transmission rates. between devices on a network. It works closely
with the physical layer to establish and maintain
The physical layer is concerned with the a reliable physical connection between devices ,
mechanical , electrical and physical aspects of the and is essential component of any computer
data transmission , and its main objective is to network.
provide a reliable and efficient means of
transmitting raw data between devices on a The data link layer uses physical addresses such
network. as Media Access Control (MAC) addresses , to
identify devices on a network. A MAC address is
The Physical Layer defines the physical a unique identifier card (NIC) on a device. These
characteristics of the network :- addresses are typically assigned by the
manufacturer and can not be changed.
➢ Physical characteristics can include the
cable and connector type , the format for When data is transmitted between devices on a
pin outs for cables and so on. network , it is divided in to frames at the data
link layer. Each frame includes a source MAC for directing data packets to their intended
address and a destination MAC address, which recipients.
are used to identify the devices that are sending
and receiving the data. The data link layer is The network layer uses a variety of routing
responsible for directing data frames to their protocols , such as Border Gateway and Open
intended recipients based on their destination shortest path first , to select the best path for
MAC addresses. data transmission based on factors such as
network congestion , distance and cost. It also
The data link layer uses a technique called MAC performs fragmentation and reassembly of data
address filtering to ensure that data is only sent packets when the data is too large to be
to the devices that need it. When a device transmitted in a single packet.
receives a data frame , it checks the destination
MAC address to determine if it matches its own In addition , the network layer is responsible for
MAC address. If the destination MAC address QoS management , which involves managing
matches the MAC address of the device , the data network traffic to ensure that critical data is
frame is accepted and processed. If the transmitted with priority over non-critical data.
destination MAC address does not match , the This helps to ensure that important data such as
data frame discarded and not processed. voice and video traffic , is delivered in a timely
and reliable manner.
The use of MAC addresses at the data link layer
is critical for ensuring that data is transmitted Layer 4 :- Transport Layer
efficiently and securely between devices on a
network. By using MAC addresses to identify The transport layer is the fourth layer of the OSI
devices and direct data frames to their intended model and is responsible for providing end to end
recipients , the data link layer helps to prevent data transport services , such as reliable data
unnecessary network recipients , the data link delivery and flow control. Its main objective is to
layer helps to prevent unnecessary network ensure that data is transmitted without errors and
congestion and improves over all network in the correct order between the source and
performance. destination devices.

Layer 3 :- Network Layer The transport layer establishes a logical


connection between the source and destination
The network layer is a third layer of the OSI devices and provides a reliable end to end
model and is responsible for routing data between communication channel. It is responsible for tasks
different networks such as internet. Its main such as error detection and correction flow
objective is to provide end to end data transport control , and congestion control.
services and ensure that data is delivered to the
correct destination device. The transport layer uses transport protocols ,
such as Transmission Control Protocol (TCP) , to
The network layer adds routing information to provide end to end data transport services. TCP is
data packets and selects the best path for data a reliable transport protocol that provides error
transmission based on factors such as network detection and correction , flow control and
congestion , distance , and cost. It also performs congestion control to ensure that data is
functions such as fragmentation and reassembly of transmitted without errors and in the correct
data packets and provides logical addressing order.
through the use of internet protocol (IP)
addresses. The transport layer is also responsible for
managing data flow control between devices. It
The network layer is responsible for tasks such as ensures that data is transmitted at an appropriate
addressing , routing , fragmentation , reassembly rate prevents data loss and congestion on the
and quality of service (QoS) management. It uses network. This helps to ensure that data is
logical addresses such as IP addresses , to transmitted reliably and efficiently between
identify devices on a network , and is responsible devices on a network.
Layer 5 :- Session Layer Check pointing and recovery are critical services
provided by the session layer to ensure reliable
The session layer is the fifth layer of the OSI communication between applications running on
model and is responsible for establishing , different devices. They work together to ensure
maintaining and ending communication sessions that communications sessions that can be resumed
between applications running on different devices. quickly and efficiently , and are essential
Its main objective is to manage the flow of data components of any computer network.
between applications and provide services such as
check pointing and recovery. Layer 6 :- Presentation Layer

The session layer also provides services such as The presentation layer is the sixth layer of the
check pointing and recovery. Check pointing OSI model and is responsible for ensuring that
involves saving the state of communication data is presented in a format that can be
session at regular intervals , so that if the session understood by the receiving device. Its main
is interrupted or terminated unexpectedly , it can objective is to manage the syntax and semantics
restarted from the last saved checkpoint. of the information exchanged between
Recovery involves resuming a communication applications.
session from the last saved check point after an
interruption or termination. The presentation layer provides services such as
data compression , data encryption , and data
Check pointing involves saving the state of translation. Data compression involves reducing
communication session at regular intervals , the size of the data to reduce transmission time
usually at predetermined points called check and network band width usage. Data encryption
points. The session layer saves important involves encoding data to protect it from
information about the session , such as the unauthorized access or tampering. Data
current state of the communication , the data translation involves converting data between
transmitted , and the point at which the last different formats such as from ASCII to EBCDIC ,
checkpoint was taken. If the session is interrupted to ensure that data can be understood by the
or terminated unexpectedly , the session layer receiving device.
can use the last saved check point to restart the
session from the point at which the interruption The presentation layer is also responsible for data
occurred. formatting and syntax control. It ensures that
data is presented in a format that can be
Recovery involves resuming a communication understood by the receiving device , such as by
session from the last saved check point after an converting data in to a standard format or using
interruption or termination. When a a common coding scheme.
communication session is interrupted or
terminated , the session layer uses the last saved The presentation layer is critical for ensuring that
check point to resume the session from the point data is presented in a format that can be
at which interruption occurred. This allows the understood by the receiving device . It works
communication session to be resumed with out closely with the application layer to manage the
losing any important data or information. syntax and semantics of the information
Check pointing and recovery are important exchanged between applications , and is essential
services for applications that require reliable and component of any computer network.
continuous communication such as file transfer or
video conferencing applications. By saving the Layer 7 :- Application Layer
state of a communication session at regular
intervals and resuming the session from the last The application layer is the seventh and top most
saved checkpoint , these services ensure that layer of the OSI model and is responsible for
communication sessions can be resumed quickly providing communication services directly to
and efficiently in the event of an interruption or applications running on different devices. Its main
termination. objective is to enable communication between
different types of applications such as web
browsers , email clients and file transfer devices. It includes protocols such as TCP and
programs. UDP , which are used for reliable and connection
less data transport layer respectively.
The application layer provides services such as
email , file transfer , remote login and web Internet Layer :- The internet layer is responsible
browsing. Email services allow users to send and for routing different networks , it includes the
receive emails , file transfer services enable users internet protocol (IP) , which is used to provide
to transfer files between devices , remote login logical addressing and routing of data packets
services allow users to remotely access a device , between devices on different networks.
and a web browsing services enable users to
access and navigate websites on the internet. Network Access Layer: The network access layer
is responsible for providing physical access to the
The application layer is responsible for managing network and transmitting data between devices
application level protocols such as HTTP , SMTP on the same network. It includes protocols such
and FTP , which are used to enable as Ethernet, Wi-Fi, and DSL, which are used for
communication between applications. It also different types of network connections
provides services such as authentication and
authorization to ensure that only authorized users DIFFERENCE BETWEEN OSI AND TCP/IP
can access and use the application.
Imagine you want to send a letter to your friend
The application layer is the layer closest to the who lives far away. There are certain steps you
end user and its services are directly accessed by
need to follow to make sure the letter reaches
the end user. It works closely with the other
your friend correctly. In computer networks, we
layers of the OSI model to ensure that
communication between applications is reliable , use a similar concept called protocols to send
efficient , and secure. information between devices.

The OSI (Open Systems Interconnection) model


TCP/IP reference models
and the TCP/IP (Transmission Control
Imagine you have a set of instructions to play a Protocol/Internet Protocol) model are two
game with your friends. To make sure everyone different ways of organizing these protocols. They
understands each other, you need a common way both help us make sure information travels
of communicating. That's where TCP/IP comes in. smoothly across networks.

TCP/IP is like a special rulebook for Let's compare them to building a tower with
communication between computers and devices different floors:
connected to the internet. It helps them talk to 1. OSI Layer: Think of a tall building with
each other and play nicely together. seven floors. Each floor has a specific job
to do, and each floor depends on the one
It consists of the four layers : the application below it. The lower floors handle more
layer , transport layer , internet layer and basic tasks, while the higher floors handle
network access layer. more complex tasks. These floors are
called layers. Each layer has a particular
Application Layer :- The application layer is
responsibility in the communication
responsible for providing communication services
directly to applications running on different process.
devices. It includes protocols such as HTTP , FTP 2. TCP/IP: Now, imagine another building
, SMTP , which are used for services such as web
with just four floors. The first floor is like
browsing , email and remote login.
the foundation of the building, and the
Transport Layer :- The transport layer Is upper floors build upon it. These floors
responsible for providing reliable data transport are called protocols. Each floor in this
services between applications running on different building has multiple functions and
responsibilities, and they work together to 3. Simple Mail Transfer Protocol (SMTP):
make sure the communication works SMTP is like a postal service for emails.
properly. It's the protocol that helps your email get
sent from your computer or phone to the
So, the main difference between the OSI model
recipient's email server. SMTP ensures
and the TCP/IP model is the number of layers
that your email message is properly
and how they are organized. The OSI model has
addressed, packaged, and delivered to the
more layers, which helps us understand the
right inbox so that the recipient can read
different tasks involved in communication more
it.
precisely. On the other hand, the TCP/IP model
has fewer layers, which simplifies the process but 4. Domain Name System (DNS): When you
still covers all the necessary functions. type a website address in your web
browser, DNS helps translate that address
Both models help us understand how data moves
into the actual numerical address (IP
across a network and ensure that information
address) of the server where the website
reaches its destination accurately, just like
is located. It's like looking up a phone
following steps to send a letter to your friend.
number in a directory. DNS helps your
While both models serve the same purpose of computer find the right server so that you
organizing protocols for network communication, can access the website you want.
they were developed by different organizations at
different times. The OSI model was created by In simpler terms, these protocols enable you to
the International Organization for Standardization transfer files, view websites, send emails, and
(ISO) in the late 1970s, while the TCP/IP model navigate the internet more easily. They provide
was developed by the U.S. Department of Defense the necessary rules and methods for different
in the 1970s.
types of communication and interactions on the
APPLICATION LAYER PROTOCOLS internet.

TRANSPORT LAYER PROTOCOLS


Let's define these commonly used application
layer protocols in simpler terms: Let's explain the transport layer protocols, TCP
and UDP, in simpler terms:
1. File Transfer Protocol (FTP): Think of FTP
as a way to send and receive files over Transport Control Protocol (TCP): Imagine you
the internet. It's like having a special want to send a special toy car to your friend who
mailbox where you can put files and lives far away. TCP is like a reliable delivery
someone else can pick them up from service that ensures the toy car reaches your
there. You can use FTP to share friend safely and in the right order.
documents, pictures, or any other files
TCP breaks down the toy car into small pieces
with others easily.
and puts them in separate boxes. It then numbers
2. Hypertext Transfer Protocol (HTTP): each box so that your friend can put them back
Whenever you visit a website, your web together correctly. TCP also keeps track of the
browser uses HTTP to communicate with boxes, making sure they all arrive and none of
the server where the website is stored. It's them are lost.
like a language that allows your browser
Once all the boxes with the toy car pieces arrive,
to ask for web pages and receive them in
TCP helps your friend assemble them in the right
return. HTTP is responsible for loading
order, just like putting a puzzle together. This
and displaying web pages on your
way, your friend receives the complete toy car
computer or device.
exactly as you sent it.
User Datagram Protocol (UDP): UDP is like a connection before sending data and does not
faster delivery service, but it doesn't offer the require ongoing communication or confirmation
same level of reliability as TCP. It's more like of receipt.
sending a postcard to your friend instead of a
In contrast , Transmission Control Protocol (TCP):
package.
TCP is like a conversation between two people
With UDP, you write your message or draw a where they make sure they understand each other
picture on a postcard and send it to your friend. by acknowledging and confirming every message
However, there is no guarantee that the postcard they exchange.
will arrive or that it will arrive in order. Some
Imagine you and your friend are playing a game
postcards might get lost along the way, and your
where you send instructions to build a tower
friend may receive them out of order.
using blocks. With TCP, every time you send an
UDP is useful when speed is more important than instruction, your friend will confirm that they
ensuring every piece of information arrives received it by saying, "Got it!" Then, once they
perfectly. It's like sending a quick message to have completed the step, they will let you know
your friend, knowing that if a few postcards go by saying, "Done!"
missing or arrive in the wrong order, it's not a
If any instruction or message gets lost along the
big problem.
way, you will ask your friend to repeat it until
We call UDP a "connectionless protocol" because you both are sure that the message was received
it does not establish a dedicated and continuous and the tower is being built correctly.
communication channel between the sender and
TCP ensures that all the information you send,
receiver before sending data.
like the instructions for the tower, arrives in the
When you send data using UDP, it does not set right order and without any missing pieces. It's
up a direct and persistent connection between the like having a reliable communication channel
sender and receiver. The data is sent as where you and your friend double-check
individual packets, like separate messages, everything to make sure there are no mistakes.
without any requirement for establishing or
In simpler terms, TCP is like a careful and
maintaining a connection.
reliable delivery service that ensures all the
UDP packets are sent to the destination without pieces of a toy car reach your friend and are
any confirmation or acknowledgement of receipt. assembled correctly. UDP is like a faster but less
The receiver will either receive the packets or reliable service where you can send messages or
they may be lost in transit. There is no built-in pictures quickly, but some pieces might be lost or
mechanism in UDP to guarantee that all packets arrive out of order.
arrive, arrive in order, or that there are no
These transport layer protocols help in sending
duplications.
and receiving data over the internet, making sure
This connectionless nature of UDP allows for fast it arrives accurately (TCP) or quickly (UDP)
and lightweight communication, as there is less depending on the needs of the communication.
overhead involved in establishing and maintaining
NETWORK LAYER PROTOCOL
a connection. However, it also means that UDP
does not provide the same level of reliability and
Internet Protocol (IP): IP is the foundational
error correction as protocols like TCP, which
protocol of the internet and is responsible for
establish a connection and ensure the orderly addressing and routing data packets across
delivery of data. networks. It assigns a unique IP address to each
device connected to a network and ensures that
So, UDP is called a connectionless protocol
packets are correctly delivered to their intended
because it does not establish a dedicated destinations.
Imagine you have a bunch of letters that you
want to send to your friends who live in different CHAPTER Three
houses. You need a system to ensure that each
letter reaches the correct friend's house. That's
TRANSMISSION MEDIA
where the Internet Protocol (IP) comes in.

Transmission Medium is the physical path


IP is like a special system that assigns a unique
between transmitter and receiver in a data
address to each device connected to a network,
communication. The characteristics and quality of
just like each house has its own address. This data transmission are determined both by the
address is called an IP address, and it's like the characteristics of the medium and characteristics
friend's house number. of the signal.

When you send a letter or any other data over Medium of data transmission :-
the internet, IP makes sure that it's put in the
right "envelope" with the correct IP address of 1) Guided Transmission Media :- Data
the destination device. It's like writing your transmission is through solid medium
friend's address on the envelope so that the 2) Unguided Transmission Media :- Data
transmission is through air (that is wireless
postman knows where to deliver the letter.
system)
Once the letter is ready, IP takes care of sending
it across different networks to reach the GUIDED TRANSMISSION MEDIA :-
destination. It's like the postman finding the best
Transmission capacity of guided media is
route to deliver the letter, using roads and
dependent on :-
intersections.

The job of IP is to make sure that all the letters Bandwidth :- Bandwidth is the context of
computer networking , refers to the amount of
(data packets) are correctly delivered to the right
data that can be transmitted over a network
devices (friends' houses) based on their unique IP connection in a given amount of time. Bandwidth
addresses. It ensures that the data packets are is an important consideration in computer
routed through the internet and reach their networking because it can affect the speed and
intended destinations accurately. efficiency on a network. A network with a higher
bandwidth will generally be able to transfer data
In simpler terms, IP is like a system that gives more quickly and efficiently than a network with
every device connected to the internet its own a lower bandwidth.
special address. It then takes care of putting data
in the right envelopes and delivering them to the
correct devices, just like sending letters to your
friends' houses.

Distance :- Distance is an important factor to


consider when using guided transmission media ,
which refers to network transmission media that
use physical cables or wires to transmit data The three guided media commonly used for data
signals. The maximum distance that data can be transmission are :-
transmitted over a guided media depends on
several factors including :- a) Twisted pair
b) Coaxial cable
1) Type of cable :- Different types of cables have c) Optical fiber
different transmission distances , for example ,
twisted pair cables typically have shorter A ) TWISTED PAIR :- is a type of cabling that
transmission distances than fiber optic cables. consists of two copper wires twisted together to
reduce electromagnetic interference. It is
2) Signal strength :-The strength of the signal commonly used in LANs (Local Area Networks)
being transmitted can affect the distance it can for connecting computers and other network
travel. A stronger signal can travel farther than a devices. Twisted pair cables come in two
weaker signal. varieties : unshielded twisted pair (UTP) and
shielded twisted pair (STP). UTP cables are the
3) Attenuation :- Refers to the loss of signal most common and are used for general-purpose
strength as it travels through cable. Attenuation networking , while STP cables are used in
increases with distance it can travel , so the environments with high levels of electromagnetic
farther the signal has to travel , the weaker it interference.
will become.

4)Interference :- Interference from other electronic


devices or electromagnetic fields can also affect
the distance that a signal can travel. The greater
the distance , the more likely it is that the signal
will be affected by interference.

TYPES OF CONNECTION (POINT TO POINT OR


MULTI POINT)

POINT TO POINT CONNECTION :- A point to


point connection is a type of network connection UNSHIELDED TWISTED PAIR (UTP) CABLE :-
In which two devices are directly connected to
each other over a dedicated communication UTP cable is the most common type of twisted
channel. This channel can be a physical cable , pair cable used in networking applications. It
such as a twisted pair or a fiber optic cable or a consists of two copper wires twisted together ,
wireless link such as a mirco-wave link or a with no additional shielding or insulation. UTP
satellite link. In a point to point connection , the cable is relatively in-expensive and easy to install
devices can communicate with each other without , and it is suitable for most LAN applications.
the need for any intermediate devices or network However , it is more susceptible to
components. They can be used in computer electromagnetic interference (EMI) and cross talk
networking to connect two devices , such as a than shielded cable.
computer and a printer or a computer and a
server. Advantages of UTP:

Multi point connection :- A multi point is a type 1. Large installed base and familiarity: UTP
of network connection in which multiple devices has been widely used in networks for
are connected to a single communication channel. many years, so there is a large number of
In a multi point connection , the devices share
existing installations and expertise
the same communication medium , such as a
available.
physical cable or a wireless link.
2. Cost-effective and easy installation: UTP
cables are relatively inexpensive compared
to other types of network cables. They are
also easy to install, making it convenient such as industrial settings or areas with high
for setting up network connections. electrical activity.

3. Compatibility with most LAN systems:


UTP is compatible with most Local Area
Network (LAN) systems, which are
commonly used for connecting devices
within a small area like offices or homes.
This means that UTP can work well with
many types of devices and network
equipment.

Disadvantages of UTP: Advantage of STP:

1. Susceptibility to interference: UTP cables 1. Better performance in noisy environments:


can be more vulnerable to external STP cables have a protective metal shield
electromagnetic interference, crosstalk that surrounds each pair of twisted wires.
(interference between adjacent wires), and This shield helps to minimize
signal loss (attenuation) compared to other electromagnetic interference (EMI) and
cable types. This can affect the quality radio frequency interference (RFI) from
and reliability of network connections. external sources. As a result, STP can
provide better signal quality and
2. Limited security: UTP may not be the best
reliability in environments with high
choice for networks that require a high
levels of noise.
level of security. Since UTP cables are not
shielded, they are more susceptible to Disadvantages of STP:
eavesdropping or unauthorized access to
1. More labor-intensive installation:
transmitted data.
Compared to UTP, the installation of STP
3. Limited suitability for long-distance, high- cables is more labor-intensive. This is
speed transmission: UTP may not be because STP cables have an additional
suitable for transmitting data over long metal shield that needs to be properly
distances at high speeds. As the length of terminated and grounded. The shielding
the cable increases, the quality of the requires extra care and attention during
signal may degrade, leading to lower installation to ensure proper performance.
transmission speeds and potential data
2. Compatibility limitations: Not all LAN
errors.
systems are readily compatible with STP.
Some network devices and equipment may
SHIELDED TWISTED PAIR (STP) CABLE not be designed to work specifically with
STP cables. This means that in certain
STB cable is a type of twisted pair cable that has
cases, additional configuration or
an additional layer shielding around the
compatibility checks may be required
individuals pairs of wires. The shielding helps to
reduce electromagnetic interference and cross talk before using STP in a particular network
, resulting in better signal quality and higher setup.
data transmission rates. However , STP cable is
more expensive and difficult to install than UTP
cable due to the added shielding and insulation.
STP cable is commonly used in environments
with high levels of electro magnetic interference ,
B) COAXIAL CABLE :- noise from external electromagnetic
sources. The shield acts as a barrier,
preventing unwanted signals from entering
The term "coaxial" comes from the word
the cable and interfering with the
"coaxiality," which refers to the arrangement of
transmitted signal. It also helps contain
two or more objects with a common axis. In the
and minimize any electromagnetic
case of coaxial cable, it is named so because it
radiation emitted by the inner conductor,
consists of two concentric conductors that share
reducing the potential for signal leakage.
the same axis.
Together, the inner conductor and outer shield
The inner conductor and the outer shield of the
work in tandem to ensure the reliable
cable are aligned along the same centerline, or
transmission of electrical signals. The inner
axis, giving it the name "coaxial." The outer
conductor carries the desired signal, while the
shield surrounds the inner conductor and is
outer shield helps protect it from external
separated from it by an insulating material. This
interference and preserves signal integrity. This
design helps to maintain the integrity and quality
makes coaxial cable suitable for applications that
of the electrical signals being transmitted through
require high-quality signal transmission, such as
the cable.
in television broadcasting, networking, and cable
television systems.

Advantages of Coaxial Cable:

1. Less Susceptible to Interference: Coaxial


cable is better at resisting interference
from external sources compared to
twisted-pair cables. This means that the
signals transmitted through coaxial cable
are less likely to be distorted or weakened
by outside electrical signals.

2. Longer Transmission Distance: Coaxial


cable can transmit data over longer
The inner conductor and the outer shield in a distances compared to less expensive
coaxial cable serve different roles in the cables. This makes it useful for
transmission of electrical signals: applications where data needs to be
transmitted over a significant distance
1. Inner Conductor: The inner conductor,
without loss of quality or signal strength.
typically made of copper or another
conductive material, carries the electrical 3. Supports Voice, Video, and Data: Coaxial
signal. It serves as the primary path for cable is capable of transmitting different
the transmission of the signal from one types of signals, including voice, video,
end of the cable to the other. The inner and data. This versatility makes it suitable
conductor is usually a solid wire or a for applications such as television
stranded wire, depending on the specific broadcasting, internet connectivity, and
type of coaxial cable. telephone services.

2. Outer Shield: The outer shield, which is 4. Reasonable Data Security: Coaxial cable
usually made of metal such as aluminum offers a certain level of data security. Its
or copper, surrounds the inner conductor. design makes it difficult for unauthorized
Its primary function is to provide a layer parties to tap into the cable and access
of protection and minimize interference or the transmitted information.
Disadvantages of Coaxial Cable: The main reason why optical fiber cable is
preferred over other methods like coaxial and
1. Limited Compatibility: There are various
twisted pair cable is because of its superior
types of coaxial cables, and each type is
performance and advantages:
suited for specific types of local area
network (LAN) systems. This means that 1. High Speed and Bandwidth: Optical fiber
not all LAN systems can readily work cable can transmit data at very high
with any type of coaxial cable. It may speeds, allowing for fast and efficient
require careful selection and compatibility communication. It has a much higher
considerations. bandwidth compared to coaxial and
twisted pair cables, meaning it can carry
2. Higher Cost: Coaxial cable tends to be
a larger amount of data simultaneously.
more expensive compared to other cable
types. This is partly due to its higher 2. Long Transmission Distance: Optical fiber
metallic content and the specialized cable can transmit data over very long
manufacturing processes involved in its distances without significant loss of signal
production. quality. It can span hundreds of
kilometers without the need for signal
In simpler terms, coaxial cable has some
boosters or repeaters, making it suitable
advantages over other cables. It is less likely to
for long-distance communication.
be affected by outside interference, can transmit
data over long distances, and supports different 3. Immunity to Electromagnetic Interference:
types of signals. However, there are different Unlike coaxial and twisted pair cables,
types of coaxial cables, and they may not be optical fiber cable is not affected by
compatible with all LAN systems. Additionally, electromagnetic interference. This means it
coaxial cable can be more expensive than other can transmit data without being affected
cables due to its construction and materials. by nearby power lines, electronic devices,
or other sources of electromagnetic
C) Fiber Optics
radiation. It provides a stable and reliable
Optical fiber cable is a type of cable that is used connection.
to transmit information in the form of light
signals. It is made up of a very thin and flexible 4. Security: Optical fiber cable offers a high
strand called an optical fiber. This fiber is usually level of security for data transmission.
made of glass or plastic and is incredibly thin, Since it uses light signals to transmit
even thinner than a single strand of human hair. data, it is very difficult to tap into the
cable and intercept the information being
The light signals that travel through the optical
transmitted. This makes it ideal for
fiber carry information in the form of binary
applications that require secure
code, which is a series of ones and zeros. These
signals can represent various types of data, such communication, such as financial
as voice, video, or internet data. transactions or sensitive data transfer.

5. Lightweight and Space Efficient: Optical


fiber cable is lightweight and takes up
less space compared to other cables. It
can be easily installed and doesn't require
as much physical space. This makes it
suitable for environments where space is
limited, such as in crowded data centers
or underground installations.
6. Future-Proof Technology: Optical fiber bending or breaking, as any damage to
cable is considered a future-proof the fiber can lead to signal loss or
technology, meaning it is designed to degradation. Specialized tools and
meet the demands of future techniques are necessary to splice and
communication needs. It has the potential connect the fibers during installation. This
to support even higher data rates and can means that the installation process may
easily be upgraded as technology be more time-consuming and require
advances. trained professionals.

Optical fiber cable is preferred over coaxial and 4. Limited Flexibility: Optical fiber cables are
twisted pair cables because it offers higher not as flexible as other types of cables,
speeds, longer transmission distances, immunity such as twisted pair or coaxial cables.
to interference, enhanced security, and is more They are more delicate and can be more
space-efficient. These advantages make it the challenging to bend around tight corners
preferred choice for high-speed internet, or in small spaces. This can make
telecommunication networks, and data installation in certain environments or
transmission in various industries. structures more difficult.

While optical fiber cables offer numerous 5. Compatibility: Optical fiber cables are not
advantages, they also have some disadvantages to directly compatible with existing copper-
consider: based infrastructure. In some cases,
organizations may need to invest in
1. Cost: The initial installation cost of optical
additional equipment, such as media
fiber cables can be higher compared to
converters or optical network interfaces,
copper-based systems. This is primarily
to bridge the gap between fiber optics
due to the higher cost of the fiber optic
and traditional copper-based systems. This
cable itself, as well as the specialized
compatibility issue can add complexity
equipment and electronics required for
and cost to the network setup.
transmitting and receiving light signals.
However, the long-term cost savings of It's important to note that while these
optical fiber cables, such as lower disadvantages exist, the benefits of optical fiber
maintenance and higher data transmission cables often outweigh them in many applications
capacity, can outweigh the initial where high-speed, long-distance, and secure data
investment. transmission is essential. The disadvantages can
be mitigated with proper planning, expertise, and
2. Electronics and Equipment: Optical fiber
consideration of the specific requirements of the
cables require specialized electronics for
network infrastructure.
converting light signals to electrical
signals and vice versa. These components, UNGUIDED TRANSMISSION MEDIUM
such as transmitters and receivers, can be (WIRELESS TRANSMISSION )
more expensive than those used in
copper-based systems. Additionally, the Unguided transmission media, also known as
maintenance and replacement of these wireless or wireless communication, refers to a
electronics can also add to the overall type of transmission medium that does not
require physical cables or wires to transmit
cost.
signals. Instead, it utilizes various methods such
3. Specialized Installation: Installing optical as radio waves, microwaves, or infrared signals
fiber cables requires specialized knowledge to carry information through the air or free
space.
and expertise. The cables need to be
carefully handled and protected from
In the context of unguided transmission media,
directional and omnidirectional refer to the
patterns in which the wireless signals are
transmitted or received.

1. Directional-Transmission/Reception:
Directional transmission or reception
involves focusing the wireless signals in a
specific direction or within a narrow
beam. This means that the signals are
concentrated and intended to travel in a
Here are some simple points about radio waves:
particular path or towards a specific
target. Directional transmission/reception 1. Invisible Waves: Radio waves are like
is achieved using specialized antennas, invisible ripples that travel through the
such as parabolic or dish antennas, which air. We can't see them, but they are all
can concentrate the signal energy in a around us, helping us communicate
specific direction. This approach is useful wirelessly.
for long-range communication, point-to-
2. Sending Messages: Just like how we can
point links, and scenarios where the
talk to someone far away using a
signal needs to be focused in a particular
telephone, radio waves help us send
direction to reach a specific receiver.
messages wirelessly. We can use them to
2. Omnidirectional Transmission/Reception: listen to the radio, watch TV, talk on a
Omnidirectional transmission or reception cell phone, or connect to the internet
involves spreading the wireless signals in using Wi-Fi.
all directions, creating a 360-degree
3. Long Distance Travel: Radio waves are
coverage pattern. With omnidirectional
great at traveling long distances. They can
transmission/reception, the signals radiate
go through the air and even outer space
outwards in all directions from the source
to reach faraway places. That's why we
or antenna. This allows the signals to
can listen to radio stations or make phone
reach multiple devices or receivers located
calls to people who are far from us.
in different directions without the need
for precise alignment. Omnidirectional 4. Antennas: To send and receive radio
antennas, such as dipole or whip waves, we use special antennas. Antennas
antennas, are commonly used to achieve are like magic sticks that can catch and
this coverage pattern. This approach is send out these invisible waves. They are
suitable for scenarios where the signal the reason we can listen to music on the
needs to reach multiple devices in radio or watch TV shows on our antennas
different locations, such as in Wi-Fi at home.
networks or cellular networks where
5. Different Channels: Just like we tune our
devices are spread throughout an area.
radio or TV to different channels, radio
waves have different "channels" too. Each
TYPES OF WIRELESS NETWORKS channel carries different types of signals,
like music, news, or TV shows. That's
Radio Waves :- Imagine radio waves as why we can listen to different stations or
invisible waves in the air that can carry messages watch different channels on TV.
from one place to another without using any
6. Interference: Sometimes, there can be too
wires. They are a special kind of energy called
electromagnetic radiation. many signals in the air, and they can mix
up or interfere with each other. It's like or mountains. That's why you might
trying to hear one person talking in a notice that your Wi-Fi signal gets weaker
crowded room. That's why we might if you move to a different room.
sometimes experience static or poor
reception when listening to the radio or
watching TV.

Remember, radio waves are like magical invisible


waves in the air that help us stay connected
wirelessly. They bring us music, TV shows, phone
calls, and so much more, making our lives more
fun and convenient!

Micro Waves
5. High Frequencies: Microwaves have higher
Microwaves are a type of invisible waves that are frequencies than radio waves, which
used for wireless communication, just like radio means they vibrate really fast. This high
waves. They are called microwaves because they frequency allows them to carry a lot of
have a very short wavelength, which means they information and data, making them great
are really tiny and close together. for fast internet connections.

Here are some simple points about microwaves: Applications: Radio waves are commonly used for
broadcasting radio and television signals, as well
1. Tiny Waves: Microwaves are like tiny as for communication in AM/FM radio, shortwave
waves that travel through the air. They radio, and satellite communication. Microwaves,
are smaller than radio waves and can fit on the other hand, are utilized in various
many of them in a small space. Just like technologies, such as microwave ovens, Wi-Fi
how you can see lots of little ripples in a networks, cellular communication (e.g., 4G and
5G), radar systems, and satellite communication.
pond, microwaves are tiny ripples in the
air.
Infrared
2. Fast Communication: Microwaves are
really good at carrying messages and Imagine you have a special kind of light that you
information quickly. They are often used can't see with your eyes, but you can feel it as
for things like cell phones, satellite heat. That's what infrared waves are. They are a
communication, and Wi-Fi. They can send type of energy that is just below the red color
signals from one place to another in the that we can see.
blink of an eye!
Infrared waves have shorter wavelengths than
3. Cooking with Microwaves: You may have radio waves and microwaves, but longer
heard of microwaves being used in wavelengths than visible light. This means they
microwave ovens. These special ovens use have less energy than visible light, but more
microwaves to heat up and cook our energy than radio waves and microwaves.
food. Microwaves can make the water
Infrared waves are interesting because they can
molecules in the food vibrate, which
help us in many ways. Here are a few examples:
creates heat and cooks the food.
1. Remote Controls: Have you ever used a
4. Line of Sight: Unlike radio waves,
remote control to change the TV channel
microwaves need a clear path to travel.
or adjust the volume? Well, remote
They like to move in straight lines and
controls use infrared waves to send
can be blocked by obstacles like buildings
signals to the TV. When you press a CHAPTER FOUR
button on the remote, it sends out a
beam of infrared waves that the TV can
understand. Network Layer Addressing and Routing

Imagine you have a big school with lots of


classrooms and students. Each student has their
own unique student ID number. In a similar way,
every device (like computers, smartphones, or
tablets) connected to a computer network also
needs a unique identification number to
communicate with other devices. This
identification number is called an IP address.

2. Heat Sensing: Infrared waves can also Network Layer Addressing :- The network layer
help us detect heat. Special cameras addressing is like giving each device in the
called infrared cameras can see things network its own address. Just like you have a
that give off heat, even in the dark. This home address, each device has its own IP
can be useful for firefighters to find address. An IP address is a combination of
people inside a smokey building or for numbers (like 192.168.1.1) that helps in
scientists to study how animals stay identifying a specific device on the network.
warm.
Routing: Now, imagine you want to send a
message to your friend who is in a different
classroom. You need to know how to get the
message to your friend's classroom. In a computer
network, routing is the process of figuring out
the best path or route for your message to reach
its destination.

To do this, there are special devices called


routers that help in routing messages. Routers are
like the school's staff members who know the
layout of the school and the best way to reach
3. Cooking: Infrared waves are also used in different classrooms. They receive messages and
cooking. You know when you use a decide where to send them based on the IP
toaster or a grill to cook your food? They addresses of the sender and recipient.
use infrared waves to heat up the food.
When you send a message, the router checks the
These waves can penetrate the food and
recipient's IP address and consults its routing
make it cook faster and more evenly.
table to determine the next router or path the
Infrared waves are a type of energy that we can message should take. Each router looks at the
feel as heat but can't see with our eyes. They destination IP address and decides which way the
have shorter wavelengths than radio waves and message should go until it reaches the correct
microwaves, but longer wavelengths than visible device.
light. Infrared waves have many practical
The routers work together like a team, passing
applications, such as remote controls, heat
the message from one router to another until it
sensing, and cooking.
reaches its destination. They make sure the
message follows the correct path, just like a
teacher guiding you to the right classroom.
So, network layer addressing gives each device its the next router that the packet should be
own IP address, and routing ensures that forwarded to. The process continues until
messages are correctly directed to their the packet reaches its intended
destination based on those addresses. destination.

2. Broadcast Routing: Sometimes, you may


Network Routing want to send a message to everyone in
your neighborhood. In that case, you
Imagine you have a large city with many houses, write the message on a poster and give it
and each house has a unique address. In a to the post office. The post office will
similar way, devices connected to a computer make copies of the poster and deliver
network, like computers or smartphones, also them to every house in the neighborhood.
need unique identification numbers to This is similar to broadcast routing, where
communicate with each other. These a message is sent to all devices on a
identification numbers are called IP addresses. network.
Network Routing: Now, think of a scenario where By default, routers do not forward
you want to send a letter from your house to broadcast packets. Broadcast packets are
your friend's house on the other side of the city. messages sent to all devices on a network.
You know the addresses of both houses, but you Routers create separate broadcast
need to figure out the best route to deliver the domains, meaning that a broadcast packet
letter. This process of finding the best route for is limited to the devices within that
your letter to reach its destination is called domain. However, in certain cases,
routing. routers can be configured to forward
Routing is done by special devices called routers. broadcasts. There are two methods for
Routers are like post offices in our city. They broadcast routing:
receive the letter and decide where to send it • The first method involves the router
based on the address. Routers have a table that creating multiple copies of a single data
helps them determine the next hop, or the next packet, each with a different destination
router, the letter should be forwarded to. address. The router sends these packets to
Types of Routing: each host individually as a unicast
message, creating the illusion of
1. Unicast Routing: When you send a letter broadcasting.
to a specific friend, it's like unicast • The second method, known as flooding,
routing. You know the exact address of involves the router forwarding the
your friend's house, so you simply write broadcast packets out of all its interfaces
the address on the envelope and give it to to reach all devices within the broadcast
the post office. The router looks at the domain. All routers in the network are
destination address and forwards the letter configured in the same way to ensure the
to the next router or directly to your broadcast packets are delivered.
friend's device.
3. Multicast Routing: Let's say you want to
Unicast routing is the most common type invite only a specific group of friends to a
of routing used on the internet and party. You create a list of friends who
intranets. It involves sending data to a should receive the invitation and give it
specific destination. When a device wants to the post office. The post office delivers
to send a packet to a particular the invitation only to the friends on the
destination, it looks up the routing table list. This is like multicast routing, where
on a router to determine the next hop or data is sent only to a specific group of
devices that have expressed interest in IP - ADDRESS
receiving the data.
INTERNET PROTOCOL VERSION 4
Multicast routing is a special case of
broadcast routing, but with a significant
IPv4, or Internet Protocol Version 4, is a
difference. With multicast routing, data is
fundamental communication protocol used in
sent only to those devices that have
computer networks, including the internet. It is
expressed a desire to receive the multicast
the fourth version of the Internet Protocol and
packets. This is different from broadcast
has been widely used since its development in
routing, where packets are sent to all
the 1980s. Let's dive into a detailed explanation
devices regardless of their interest.
of IPv4:
Multicast routing utilizes the spanning
tree protocol to prevent loops in the 1. What is IPv4? IPv4 is a system that
network. It also employs the reverse path provides a way for devices to
forwarding technique to detect and communicate and exchange data over the
discard duplicate packets and avoid internet. It assigns a unique numerical
looping. address to each device connected to a
network. These addresses are called IP
4. Anycast Routing: Anycast routing is a bit
addresses and serve as identification
different. Imagine you have multiple pizza
numbers for devices.
places in the city, and each place offers
the same type of pizza. When someone 2. Why do we need IPv4? The main purpose
orders a pizza, the order is automatically of IPv4 is to enable communication
routed to the nearest pizza place. This is between different devices on a network,
similar to anycast routing. Multiple such as computers, servers, routers, and
devices share the same address, but the smartphones. IP addresses allow devices
data is sent to the nearest device among to find and send data to one another
them based on the routing topology. across the internet. IPv4 is a foundational
technology that allows us to browse
Anycast routing allows multiple hosts to
websites, send emails, stream videos, and
share the same logical address. When a
perform various online activities.
packet is sent to this shared address, it is
forwarded to the host that is nearest in 3. Why is it called "Version 4"? IPv4 is
terms of routing topology. referred to as "Version 4" because it is
the fourth iteration of the Internet
These different types of routing provide
Protocol. The previous versions, IPv1,
mechanisms for efficiently and effectively
IPv2, and IPv3, were experimental and
delivering data within networks based on specific
not widely adopted. IPv4 was developed
requirements. Unicast routing is used for sending
as the first version of IP intended for
data to a specific destination, broadcast routing is
global deployment and widespread use. Its
used for sending data to all devices within a
design and specifications were refined to
network, multicast routing is used for sending
become the most widely used version of
data to a specific group of interested devices, and
IP at that time.
anycast routing is used for directing data to the
nearest host among multiple hosts sharing the 4. Addressing Scheme and Structure: IPv4
same logical address. addresses are 32 bits long, represented as
four sets of numbers ranging from 0 to
255, separated by periods. For example,
an IPv4 address can look like 192.168.0.1.
These addresses are divided into different Each class of address has a specific range
classes: reserved for it and follows a defined structure,
making it easier to allocate and manage IP
IPv4 addresses are divided into different classes,
addresses across different networks.
which determine how the address is structured
and how it is used. The classes are as follows: Understanding the classes of IPv4 addresses helps
in organizing and identifying networks based on
1. Class A:
their size and requirements. It ensures that IP
• In Class A addresses, the first octet (the addresses are used efficiently and allows devices
first set of numbers) is used to identify within a network to communicate with each
the network, while the remaining three other accurately.
octets represent the host address.
Address Exhaustion: Address exhaustion refers to
• The range of the first octet in Class A
the situation where the available pool of unique
addresses is from 1 to 126.
IP addresses within the IPv4 system becomes
• This class is used for large networks, such
depleted. In the early days of the internet, when
as multinational corporations or internet
IPv4 was developed, it was anticipated that the
service providers (ISPs).
32-bit addressing scheme (providing around 4.3
• Class A addresses can support a large
billion addresses) would be sufficient. However,
number of hosts, as the host address
with the rapid growth of the internet and the
portion has 24 bits (three octets).
increasing number of devices connecting to it, the
2. Class B: demand for IP addresses exceeded the available
supply.
• In Class B addresses, the first two octets
are used for network identification, and Transition to IPv6: To overcome the limitation of
the other two octets indicate the host available addresses in IPv4, a newer version of
address. the Internet Protocol called IPv6 (Internet
• The range of the first octet in Class B Protocol Version 6) was developed. IPv6 was
addresses is from 128 to 191. designed to provide a significantly larger address
• Class B addresses are typically used for space to meet the growing demands of internet-
medium-sized networks, such as connected devices.
universities or large organizations.
Here are some key aspects of the transition to
• Class B addresses can support a moderate
IPv6:
number of hosts, as the host address
portion has 16 bits (two octets). 1. Address Space: IPv6 uses 128-bit
addresses, which provide an incredibly
3. Class C:
vast number of unique addresses
• In Class C addresses, the first three octets compared to the 32-bit addresses used in
identify the network, while the last octet IPv4. The larger address space in IPv6
specifies the host address. allows for trillions of devices to be
• The range of the first octet in Class C connected to the internet, ensuring an
addresses is from 192 to 223. abundant supply of addresses for future
• Class C addresses are commonly used for growth.
small networks, such as small businesses
2. Address Format: IPv6 addresses are
or home networks.
represented in a different format
• Class C addresses can support a limited
compared to IPv4. Instead of four sets of
number of hosts, as the host address
numbers separated by periods, IPv6
portion has 8 bits (one octet).
addresses are expressed as eight groups of
four hexadecimal digits separated by
colons. For example, an IPv6 address can 3. New Features: IPv6 brings some new and
look-like improved features. One important feature
2001:0db8:85a3:0000:0000:8a2e:0370:7334. is better security. It helps protect the
communication between devices and keeps
3. Additional Features: IPv6 introduces
data safe. It's like having a special lock
various additional features and
on your phone or computer to prevent
improvements. One notable feature is
others from accessing your information.
built-in support for security and
encryption through IPsec (Internet 4. Auto-Configuration: IPv6 has a cool
Protocol Security). IPv6 also simplifies feature called auto-configuration. This
address assignment through automatic means that devices can give themselves
address configuration, reducing the an IPv6 address without needing anyone's
reliance on servers for assigning help. It's like having a magic ability to
addresses. Furthermore, IPv6 includes know your own special number without
enhancements for better routing and asking anyone else. This makes it easier
network management. to connect devices to the internet and
start using them right away.
The transition to IPv6 is an ongoing process as
the internet gradually adopts the new protocol. It Imagine you have a special device that
aims to address the issue of address exhaustion can connect to the internet, like a tablet
and ensure a sustainable, long-term solution for
or a computer. When you want to
the growing number of devices connected to the
connect it to the internet, you usually
internet.
need to ask for help to get an address,
Internet Protocol Version 6 (IPv6) just like getting your own special number
to join a club. But with IPv6, devices
Internet Protocol Version 6 (IPv6) is a newer and have a cool magic power called auto-
improved version of the Internet Protocol, which configuration. It means that the device
is like a special system that allows devices to can figure out its own special address
communicate with each other on the internet. without asking anyone for help. It's like
Here's what you need to know about IPv6: the device can look in a magic mirror
and know what its special number is.
1. More Addresses: IPv6 was created because
we were running out of addresses with • This magic power makes it really easy to
the older version, IPv4. Think of connect devices to the internet quickly. It
addresses like phone numbers for devices. saves time because the device can start
IPv6 provides a much larger number of using the internet right away without
unique addresses than IPv4, so we can needing someone else to set it up. So,
connect many more devices to the auto-configuration is like having a
internet. It's like having a bigger phone superpower that allows devices to give
book to accommodate everyone. themselves a special internet address, like
their own secret number, without needing
2. Longer Address Format: In IPv6, addresses
anyone else's help.
are longer and look different compared to
IPv4. Instead of four sets of numbers 5. Future-Proofing: IPv6 was designed to
separated by dots, IPv6 addresses are handle the growing number of devices
made up of eight groups of numbers and that will connect to the internet in the
letters separated by colons. It's like having future. It provides a really big address
a longer code or a longer secret password space, so we won't run out of addresses
for devices to identify and talk to each anytime soon. It's like having a super
other. long phone book that can hold everyone's
phone number, even as more people and • Multiple Connections: If a device, like a
devices join the internet. router, has multiple connections to the
internet, it needs multiple IP addresses to
6. Transition: Right now, both IPv4 and IPv6
uniquely identify each connection.
are used together because not everyone
has switched to IPv6 yet. It's like having • Universality: IPv4 addresses are universal,
two different languages spoken on the which means that any device wanting to
internet. But eventually, as more and connect to the internet must follow the
more devices use IPv6, it will become the IPv4 addressing system.
main way of connecting to the internet.
• Address Space: The address space refers to
IPv6 is a newer and better version of the Internet the total number of possible addresses
Protocol that allows more devices to connect to that can be used within a specific
the internet. It has longer addresses, improved addressing scheme.
security, and features like auto-configuration.
• IPv4 Address Space: IPv4 uses 32 bits to
IPv6 was created to handle the future growth of
define its addresses, which gives a total
the internet and will eventually replace the older
address space of 2^32 (2 to the power of
IPv4 system.
32), resulting in more than 4 billion
unique addresses. It's like having a huge
INTERNET PROTOCOL VERSION 4 (IP-4) room with 4 billion chairs, and each chair
IN DETAIL represents a unique address. However,
due to various restrictions and allocations,
An IP address is like a special code that uniquely not all addresses are available for general
identifies a device (such as a computer or a use.
router) on the internet. It's similar to a phone
• Theoretical Device Limit: The vast number
number or an address that helps us find a
of available addresses theoretically allows
specific person or place.
for more than 4 billion devices to be
• IPv4: IPv4 is a type of IP address that connected to the internet. However, in
uses 32 bits to create a unique address. reality, the available pool of IPv4
The address is a series of 32 0s and 1s, addresses has become limited due to the
and it looks something like this: increasing number of devices connected to
11001010.01101100.00010000.00000001. the internet.
Each set of 8 bits is called an octet. The
purpose of an IPv4 address is to define a
device's connection to the internet. Notations of IPV4
• Uniqueness: IPv4 addresses are unique,
IPv4 address can be represented in two notations:
meaning that no two devices can have the
binary and dotted-decimal. Binary notation shows
exact same address at the same time. It's the address as a sequence of 32 bits, while
like each house having a different dotted-decimal notation represents the address as
address, so the mail can be delivered to four decimal numbers separated by dots.
the right place. However, an address can Converting between the notations involves
be assigned to one device for a period of grouping bits into octets and converting between
decimal and binary representations.
time and then taken away and given to
another device. Binary Notation:

• In binary notation, an IPv4 address is


shown as a sequence of 32 bits, which
are either 0s or 1s. These 32 bits are
divided into four groups, each consisting purpose or readability required. Binary notation
of 8 bits, called octets or bytes. shows the address as a sequence of 32 bits, while
• Each bit can be thought of as a switch dotted-decimal notation represents the address as
that is either on (1) or off (0). four decimal numbers separated by dots.
• For example, let's take the binary IPv4 Converting between the notations involves
address "01110101 10010101 00011101 grouping the bits into octets and converting
00000010". It is divided into four octets: between decimal and binary representations.
01110101, 10010101, 00011101, and
00000010.
• Each octet represents a number from 0 to
255. It's like having four switches that
can be turned on or off independently,
and each switch represents a number from
0 to 255.
Example 1: Binary to Dotted-Decimal Conversion
Dotted-Decimal Notation:
Let's convert the binary IPv4 address "11000000
• Dotted-decimal notation is a more human- 10101000 00000001 00000010" to dotted-decimal
friendly way of representing IPv4 notation:
addresses.
Step 1: Group the binary bits into four octets:
• In this notation, the IPv4 address is
11000000 10101000 00000001 00000010
divided into four parts, or octets,
separated by dots. Each octet is Step 2: Convert each octet from binary to
represented by a decimal number ranging decimal:
from 0 to 255.
✗ 11000000 = 192
• For example, let's take the dotted-decimal
IPv4 address "117.149.29.2". It consists of ✗ 10101000 = 168
four decimal numbers: 117, 149, 29, and
✗ 00000001 = 1
2.
• Each decimal number represents the value ✗ 00000010 = 2
of the corresponding octet. It's like having
four numbers written side by side, with Step 3: Combine the decimal values with dots:
dots separating them. 192.168.1.2
Converting between Binary and Dotted-Decimal So, the dotted-decimal representation of the
Notations: binary IPv4 address "11000000 10101000
• To convert an IPv4 address from binary 00000001 00000010" is 192.168.1.2.
to dotted-decimal notation, we group the Example 2: Dotted-Decimal to Binary Conversion
32 bits into four octets and convert each
Now, let's convert the dotted-decimal IPv4
octet from binary to decimal. We then
address "172.16.0.1" to binary notation:
separate the decimal numbers with dots.
• To convert from dotted-decimal to binary Step 1: Separate the decimal numbers: 172 16 0 1
notation, we take each decimal number
Step 2: Convert each decimal number to binary:
and convert it from decimal to binary. We
172 = 10101100 16 = 00010000 0 = 00000000 1
then combine the binary values of the
= 00000001
four octets.
Step 3: Combine the binary values of the octets:
By using these notations, we can represent IPv4
10101100 00010000 00000000 00000001
addresses in different formats depending on the
So, the binary representation of the dotted- 2. Out of range values: Each octet of an
decimal IPv4 address "172.16.0.1" is 10101100 IPv4 address must have a numeric value
00010000 00000000 00000001. between 0 and 255. If any part of the
address has a value outside this range,
the address is invalid.
Valid and Invalid IPV4 Addresses
3. Non-numeric characters: IPv4 addresses
Valid IPv4 Address: An IPv4 address is considered should only consist of numeric values and
valid if it follows the specific rules and format dots. If an address contains non-numeric
defined for IPv4 addresses. Here are the key characters or special symbols (except
characteristics of a valid IPv4 address :- dots), it is considered invalid.

1. Consists of four octets: An IPv4 address is 4. Leading or trailing dots: An IPv4 address
divided into four parts called octets or should not have leading or trailing dots.
bytes. Each octet is represented by a For example, ".192.168.0.1" or
decimal number ranging from 0 to 255. "192.168.0.1." are invalid representations.
The octets are separated by dots in the
Examples of Invalid IPv4 Addresses:
dotted-decimal notation.
• 192.168.0 (missing the last octet)
2. Numeric values within the valid range:
• 10.256.0.1 (invalid value in octet)
Each octet of an IPv4 address must have
• 192.168.0.01 (leading zero in an octet)
a numeric value between 0 and 255,
• 192.168.0.1.1 (extra octet)
inclusive. This means that each part of
the address can be any number from 0 to Remember, a valid IPv4 address follows the
255. defined format, has numeric values within the
valid range for each octet, and does not contain
3. No leading zeros: Leading zeros (zeros at
any invalid characters. An invalid IPv4 address
the beginning of an octet) are not allowed
fails to meet one or more of these criteria.
in IPv4 addresses. For example,
"192.168.001.001" is not a valid
representation because it has leading CLASS FULL IP ADDRESSING
zeros.

Examples of Valid IPv4 Addresses:

• 192.168.0.1
• 10.0.0.255
• 172.16.254.1

Invalid IPv4 Address: An IPv4 address is


considered invalid if it does not meet the
requirements and rules for valid IPv4 addresses.
Here are some common reasons for an IPv4
address to be invalid:

1. Incorrect format: An IPv4 address must Classful IP addressing refers to the original
consist of four octets separated by dots. If method of allocating IP addresses in the early
the address has more or fewer than four days of the internet. In classful addressing, IP
octets or if the octets are not separated addresses were divided into different classes
by dots, it is considered invalid. (Class A, Class B, and Class C) based on the size
of the network they were assigned to. Each class
had a fixed portion of the IP address reserved for
network identification, and the remaining portion • The range of the first octet in Class C
was used for host identification. addresses is from 192 to 223.
• Class C addresses can support a limited
Here is a detailed explanation of classful IP
number of hosts because the host address
addressing :-
portion has 8 bits (one octet).
Class A Addressing :- • Example: 192.168.0.1, where 192.168.0 is
the network address, and 1 is the host
• Class A addresses were assigned to large
address.
networks, such as multinational
corporations or internet service providers 4. Class D and Class E:
(ISPs).
• Class D addresses (starting from 224.0.0.0
• In a Class A address, the first octet (the
to 239.255.255.255) are reserved for
first set of numbers) is used to identify
multicast addressing, which allows a
the network, and the remaining three
single packet to be sent to multiple
octets represent the host address.
destinations simultaneously.
• The range of the first octet in Class A
• Class E addresses (starting from 240.0.0.0
addresses is from 0 to 127.
to 255.255.255.255) are reserved for
• Class A addresses can support a large
experimental or special purposes.
number of hosts because the host address
portion has 24 bits (three octets). It's important to note that classful addressing was
• Example: 10.0.0.1, where 10 is the later replaced by Classless Inter-Domain Routing
network address, and 0.0.1 is the host (CIDR) due to the limitations and inefficiencies of
address. the classful system. CIDR allows for more flexible
allocation of IP addresses by using variable-length
Class B Addressing :-
subnet masks (VLSM) and route aggregation.
• Class B addresses were allocated to
Classful IP addressing involved dividing IP
medium-sized networks, such as
addresses into different classes (Class A, B, C)
universities or large organizations.
based on the size of the network. Each class had
• In a Class B address, the first two octets
a fixed portion for network identification and a
are used for network identification, and
varying portion for host identification. Class ful
the other two octets indicate the host
addressing was eventually replaced by CIDR for
address.
better address allocation and routing efficiency.
• The range of the first octet in Class B
addresses is from 128 to 191.
• Class B addresses can support a moderate WHY DO WE NEED CLASSES FROM THE
number of hosts because the host address FIRST PLACE ?
portion has 16 bits (two octets).
• Example: 172.16.0.1, where 172.16 is the The concept of classes in IP addressing was
network address, and 0.1 is the host introduced in the early days of the internet as a
address. way to allocate IP addresses more efficiently.
Here are some reasons why classes were initially
Class C Addressing:
used:
• Class C addresses were reserved for small
1. Address Space Management: Classful
networks, such as small businesses or
addressing provided a way to divide the
home networks.
available IP address space into distinct
• In a Class C address, the first three octets
blocks or classes. This allowed for easier
identify the network, while the last octet
management and allocation of addresses
specifies the host address.
to different organizations, networks, and divided into smaller subnets, allowing for finer
devices. control over address allocation and improved
routing efficiency.
2. Network Size Differentiation: The classes
(Class A, B, and C) were designed to
cater to networks of different sizes. By
assigning IP addresses based on classes, it What is a Default Mask (Subnet Mask)
was easier to determine the approximate
A default mask, also known as a subnet mask or
number of hosts that could be
network mask, is a fundamental component in IP
accommodated in a particular network.
addressing. It determines how the IP address is
3. Routing Efficiency: Classful addressing divided into network and host portions. The
helped in simplifying the routing process default mask is used to identify which bits in an
by allowing routers to determine the IP address represent the network and which bits
network boundaries based on the class of represent the host.
the IP address. This allowed routers to
In classful IP addressing, each class (Class A, B,
make routing decisions more quickly and
or C) had a predefined default mask associated
efficiently.
with it. Here's a description of the default masks
4. Address Assignment Policies: Each class for each class :-
had specific address assignment policies.
Class A Default Mask:
For example, Class A addresses were
allocated to large organizations, Class B • Class A addresses are designed for large
addresses to medium-sized networks, and networks.
Class C addresses to small networks. • The default mask for Class A addresses is
These policies helped ensure that address 255.0.0.0 or /8 in CIDR notation.
blocks were assigned according to the size • This default mask means that the first
and requirements of the network. octet represents the network portion of
the address, and the remaining three
However, over time, it became evident that
octets represent the host portion.
classful addressing had limitations and
• Example: If an IP address is 10.0.0.1 with
inefficiencies. The main drawback was the rigid
the default mask 255.0.0.0, the network
allocation of address space, resulting in wastage
portion is 10, and the host portion is
of addresses and inefficient use of available
0.0.1.
resources. This led to the introduction of Classless
Inter-Domain Routing (CIDR), which allowed for Class B Default Mask:
more flexible allocation of addresses using
• Class B addresses are meant for medium-
variable-length subnet masks (VLSM).
sized networks.
CIDR replaced the classful system and provided a • The default mask for Class B addresses is
more scalable and efficient approach to IP 255.255.0.0 or /16 in CIDR notation.
addressing. With CIDR, address blocks could be • This default mask means that the first two
octets represent the network portion, and
the remaining two octets represent the
host portion.
• Example :- If an IP address is 172.16.0.1
with the default mask 255.255.0.0, the
network portion is 172.16 , and the host
portion is 0.1.

3. Class C Default Mask:


• Class C addresses are assigned to small Given IP address: 192.168.17.9
networks.
The network address is obtained by setting the
• The default mask for Class C addresses is
host portion to all zeros: Network address:
255.255.255.0 or /24 in CIDR notation.
192.168.17.0
• This default mask means that the first
three octets represent the network The last address is obtained by setting the host
portion, and the last octet represents the portion to all ones: Last address (broadcast
host portion. address): 192.168.17.255
• Example :- If an IP address is 192.168.0.1
Therefore, in the given class C network, there are
with the default mask 255.255.255.0, the
254 addresses in the block (excluding the network
network portion is 192.168.0, and the
and broadcast addresses), the first address is
host portion is 1.
192.168.17.0, and the last address is
192.168.17.255.
Some examples of a class full addressing Question 2 :- An address in a block is given as
185.28.17.9 , find the number of addresses in the
Question :- A host in a class C network has been
block , and find the first and the last addresses ?
assigned an IP-address 192.168.17.9 , find the
number of addresses , the first and the last
Answer :- In a class B network, the first two
addresses ?
octets are used for network identification, while
the last two octet represents the host address.
Answer :- In a class C network, the first three
Let's analyze the given information
octets are used for network identification, while
the last octet represents the host address. Let's
IP address: 185.28.17.9
analyze the given information:
Since the first octet of the IP address (185) falls
IP address: 192.168.17.9 within the range of 128 to 191, it indicates that
the IP address belongs to Class B.
To determine the number of addresses in the
block, we need to consider the class C network In Class B, the first two octets are used for
and its default mask. network identification, and the remaining two
octets represent the host address.
Class C default mask: 255.255.255.0
To determine the number of addresses in the
In class C, the host address portion has 8 bits (1
block, we need to consider the class B network.
octet). This means there are 2^8 = 256 possible
combinations of host addresses within the Class B default mask: 255.255.0.0
network. (Total number of addresses not usable
In Class B, the host address portion has 16 bits
address )
(2 octets). This means there are 2^16 = 65,536
However, in every network, two addresses are possible combinations of host addresses within
reserved: the network.

• The first address represents the network Similarly to Class C, two addresses are reserved:
address.
• The first address represents the network
• The last address represents the broadcast
address.
address.
• The last address represents the broadcast
So, the total number of usable addresses in a address.
class C network is 256 - 2 = 254.
So, the total number of usable addresses in a
Now, let's find the first address and the last class B network is 65,536 - 2 = 65,534.
address :-
Now, let's find the first address and the last Think of it this way: if you want to send a letter
address: to someone in your neighborhood, you only need
to write down the neighborhood name (network
Given IP address: 185.28.17.9
address) and their house number (host address) to
The network address is obtained by setting the ensure the letter reaches the correct house.
host portion to all zeros: Network address:
Broadcast Address: Now, imagine you want to
185.28.0.0
send a message to everyone in your neighborhood
The last address is obtained by setting the host at the same time. You can't individually deliver
portion to all ones: Last address (broadcast the message to each house; instead, you send a
address): 185.28.255.255 broadcast message that reaches every house in
the neighborhood.
Therefore, in the given class B network, there are
65,534 usable addresses in the block (excluding In networking, a broadcast address is like a
the network and broadcast addresses), the first special address that allows you to send a message
address is 185.28.0.0, and the last address is to all devices within a network at once. It
185.28.255.255. ensures that the message is received by every
device within that network.
Example – 3 :-
To do this, the broadcast address uses a special
pattern in the host address part of an IP address.
It sets all the host bits to their maximum value,
which is usually represented as a sequence of 1s.

So, when a device receives a message with the


broadcast address, it understands that the
message is meant for everyone in the network
and processes it accordingly.

Understanding these concepts helps devices in a


network communicate with each other efficiently,
whether it's sending messages to specific devices
using their unique addresses or broadcasting
messages to reach everyone within the network.

CLASS LESS IP ADDRESSING


Network and Broadcast Address
Classless IP addressing, also known as Classless
Network Address: Imagine you live in a big Inter-Domain Routing (CIDR), is an addressing
neighborhood, and each house has a unique scheme that provides a more flexible and efficient
address. In the world of networking, the network way of allocating IP addresses compared to
address is like the address of your entire classful IP addressing. In classless IP addressing,
neighborhood. It identifies the specific network the division of IP addresses into predefined
that your computer or device is connected to. classes (Class A, B, or C) is abandoned, and the
Just like every house in your neighborhood has allocation is based on variable-length subnet
the same neighborhood name, all devices within masks (VLSM).
the same network share the same network
address. It helps devices in the network recognize
and communicate with each other.
Here are some key points about classless IP
addressing and how it solves the problems of Subnetting is the process of dividing a larger
classful IP addressing :- network into smaller subnetworks called subnets.
It involves breaking down a network into more
1. Flexibility in Address Allocation: Classless
manageable and efficient segments to enhance
IP addressing allows for more efficient
network performance, security, and address
utilization of IP address space. Instead of
allocation.
being constrained by fixed class
boundaries, CIDR enables the allocation of Imagine you have a big toy box filled with
IP addresses based on the specific needs different types of toys. You want to keep your
of networks, allowing for custom-sized toys organized, so you decide to divide the box
subnets. into smaller sections. Each section will have a
different type of toy.
2. Variable-Length Subnet Masks (VLSM):
With CIDR, subnet masks can have Subnetting is similar to dividing your toy box.
varying lengths. A subnet mask Instead of toys, we are talking about computer
determines the network and host portions networks. When computers are connected in a
of an IP address. By using longer or network, they have special numbers called IP
shorter subnet masks, network addresses. These IP addresses help computers find
administrators can create subnets of and talk to each other.
different sizes to accommodate varying Subnetting is a way to divide a big computer
numbers of hosts within a network. This network into smaller parts, just like dividing your
results in more efficient allocation of IP toy box. This helps keep things organized and
addresses. makes it easier for computers to communicate
3. Efficient Address Space Allocation: with each other.
Classless IP addressing solves the problem Imagine you have a group of friends, and you
of address space wastage that existed in want to divide them into smaller teams. Each
classful addressing. Classful addressing team will have a different team number.
had predefined address space for each Subnetting works the same way. It divides the
class, resulting in inefficient allocation. big network into smaller parts called subnets.
CIDR enables more precise allocation of Each subnet has its own subnet number.
IP addresses, avoiding large blocks of
unused or unallocated addresses. By using subnetting, we can make sure that
computers in one subnet can talk to each other
For example, consider the following scenario: easily, just like friends on the same team. It also
• In classful addressing, a network requiring helps computers send data more efficiently within
only 50 hosts would be allocated a Class their own subnet without overwhelming the
C address block, which provides 254 whole network.
usable addresses. This results in wastage So, subnetting is like dividing a big computer
of over 200 addresses. network into smaller sections, similar to dividing
• In classless addressing (CIDR), a network toys or friends into groups. It helps computers
needing 50 hosts can be assigned a subnet stay organized and communicate better with each
with a mask of /26, which provides other.
exactly 62 usable addresses. This allows
for more efficient utilization of the Why Subnetting?
address space.
1. Enhanced Network Performance:
Subnetting allows for better network
Subnetting performance by reducing network
congestion and improving overall data By using subnetting, we can make sure that
transmission efficiency. It enables local computers in one subnet can talk to each other
communication within smaller subnets, easily, just like friends on the same team. It also
minimizing unnecessary traffic across the helps computers send data more efficiently within
entire network. their own subnet without overwhelming the
whole network.
2. Improved Security: Subnetting enhances
network security by creating logical So, subnetting is like dividing a big computer
boundaries between different departments network into smaller sections, similar to dividing
or user groups. It enables the toys or friends into groups. It helps computers
implementation of security measures, such stay organized and communicate better with each
as firewalls or access control lists (ACLs), other.
at the subnet level to control and monitor
WHAT ARE SUBNET MASKS
network traffic.
A subnet mask is like set of rules that helps
3. Efficient Address Allocation: Subnetting
computers figure out which part of an address is
optimizes the utilization of IP addresses
for the network and which part is for the
by assigning smaller blocks of addresses
individual computer.
to each subnet. It prevents address
wastage and allows for more efficient Think of the address as a big house with
management of IP address space. different rooms. The subnet mask tells us which
rooms belong to the whole house (the network)
and which rooms belong to each person (the
WHAT ARE SUBNETS ?
individual computer).

Imagine you have a big toy box filled with For example, let's say we have the address
different types of toys. You want to keep your 192.168.0.10 and the subnet mask 255.255.255.0.
toys organized, so you decide to divide the box The subnet mask tells us that the first three
into smaller sections. Each section will have a numbers (192.168.0) are for the network, and the
different type of toy. last number (10) is for the individual computer.

Subnetting is similar to dividing your toy box. It's like having a map that shows which parts of
Instead of toys, we are talking about computer the address are important for finding the right
networks. When computers are connected in a network and computer. The subnet mask helps
network, they have special numbers called IP computers understand where to send information
addresses. These IP addresses help computers find and how to talk to each other within the
and talk to each other. network.

Subnetting is a way to divide a big computer So, a subnet mask is like a special mask or map
network into smaller parts, just like dividing your that helps computers know which part of an
toy box. This helps keep things organized and address is for the network and which part is for
makes it easier for computers to communicate the individual computer. It's like having a secret
with each other. code to open the right doors and find the right
place to send information.
Imagine you have a group of friends, and you
want to divide them into smaller teams. Each EXTENDED NETWORK PREFIX
team will have a different team number.
Subnetting works the same way. It divides the
big network into smaller parts called subnets.
Each subnet has its own subnet number.
In simpler terms, the subnet mask is used to
determine which part of an IP address is the
network address and which part is the host
address. The subnet mask is a series of numbers
that has a one-to-one correspondence with the IP
address. Each bit in the subnet mask is either set
to 1 or 0.

When a bit in the subnet mask is set to 1, it


means that the corresponding bit in the IP
address is part of the network address. When a
Subnetting is a technique used in computer bit is set to 0, it means that the corresponding
networking to divide a single IP network into bit in the IP address is part of the host address.
multiple smaller subnetworks, or subnets. It For example, let's say we have the IP address
allows for more efficient utilization of IP 130.5.0.0 with a subnet mask of 255.255.255.0.
addresses and provides better network In this case, the first three octets (130.5.0)
management and control. represent the network address, and the last octet
In the traditional classful IP addressing scheme, (0) represents the host address. The subnet mask
the IP address space was divided into three helps us determine this division by using 1s for
classes: Class A, Class B, and Class C. Each class the network portion and 0s for the host portion.
had a fixed number of network bits and host bits. This division is important because it allows
This two-level hierarchy provided a limited computers and routers to understand which
number of network addresses and a fixed number devices are on the same network and can directly
of hosts per network. communicate with each other. The subnet mask
To overcome the limitations of the classful helps define the boundaries of the network and
addressing scheme and address the mentioned host parts of an IP address, making it easier for
problems, subnetting was introduced. Subnetting devices to route data packets and manage
adds another level of hierarchy by further network traffic.
dividing the host portion of the IP address into
two parts: the subnet number and the host
number on that subnet.

By allocating a portion of the host bits for the


subnet number, organizations can create smaller
subnets within a larger network. This allows for
more flexibility in network design, efficient
allocation of IP addresses, and improved network
performance.

With subnetting, organizations can create subnets


based on their specific requirements. They can THE PREFIX LENGTH NOTATION
allocate different subnet sizes depending on the
In computer networks, there are special codes
number of hosts required in each subnet. This
called subnet masks and prefix lengths that help
results in better utilization of IP address space, as
us understand and find the right network for
smaller subnets can be assigned where fewer
sending information. These codes are used in
hosts are needed, while larger subnets can be
modern routing protocols, which are like maps
used where more hosts are expected.
for computers to navigate and communicate with
each other.
Now, let's talk about the extended network prefix
length and how it's used in routing protocols. BORROWING BITS FROM THE HOST

The extended network prefix length is a way of When we talk about borrowing bits from the
representing the subnet mask, which tells us host, it means taking some bits that are originally
which part of an IP address belongs to the used for identifying individual hosts and
network. Instead of using the traditional subnet repurposing them to create additional subnets.
mask format, modern routing protocols often use
In computer networks, IP addresses are made up
a shorter and simpler notation called the prefix
of two parts: the network portion and the host
length.
portion. The network portion identifies the
The prefix length is the number of continuous network itself, while the host portion identifies
"one" bits in the subnet mask. It shows us how individual devices within that network.
many bits are important for identifying the
When we need to create more subnets within a
network.
network, we may need to borrow bits from the
For example, let's say we have the network host portion and use them to create additional
address 130.5.5.25 with a subnet mask of subnets. This allows us to divide the network into
255.255.255.0. This means the first 24 bits (the smaller, more manageable parts.
first three numbers) are part of the network, and
By borrowing bits from the host portion, we
the last 8 bits (the last number) are for individual
reduce the number of available host addresses
devices.
because some of those bits are now used for
To make things easier, we can express the same subnetting. This trade-off allows for more
information using the prefix length notation. In flexibility in network design and more efficient
this case, we write the network address followed use of IP address space.
by a slash and the prefix length, which is 24. So,
For example, let's say we have an IP address
130.5.5.25 with a subnet mask of 255.255.255.0
range of 192.168.0.0/24, which means there are
can be written as 130.5.5.25/24.
24 bits reserved for the network and 8 bits for
This notation is more compact and easier to hosts. If we want to create more subnets, we can
understand compared to writing out the long borrow some bits from the host portion, let's say
subnet mask with all the numbers. It helps us 3 bits.
quickly identify the network part of an IP address
By borrowing 3 bits, we increase the number of
and simplifies communication between devices.
subnets we can create, but we decrease the
number of available host addresses within each
subnet. The number of subnets is calculated using
the formula 2^N, where N is the number of
borrowed bits.

So, by borrowing 3 bits, we can create 2^3 = 8


subnets.

However, keep in mind that borrowing bits also


reduces the number of available host addresses
per subnet. The remaining bits in the host
portion will determine the number of hosts per
subnet. The formula 2^M - 2 is used to calculate
the number of usable host addresses, where M is
the number of remaining host bits.
Borrowing bits allows for subnetting and creating 1. To calculate the number of subnets, we
smaller subnetworks within a larger network, use the formula 2^n, where n is the
providing more flexibility and efficient allocation number of borrowed bits. So, 2^2 equals
of resources. 4 subnets.

NUMBER OF SUBNETS AND NUMBER OF HOSTS 2. To calculate the number of hosts per
PER SUBNET subnet, we use the formula 2^n - 2,
where n is the number of bits left for the
The calculation of subnets and the number of
host address. Since we borrowed 2 bits,
hosts per subnet in an IP network involves a
we have 6 bits left for hosts (as there are
solid understanding of the concepts of subnetting
8 bits in total for the last octet of the
and IP addressing. Here is a basic guide:
address). So, 2^6 - 2 equals 62 hosts.
1. Number of Subnets: The number of
Please note, however, that the method of
subnets is determined by the number of
calculation can differ based on whether you're
bits borrowed from the host portion of
using fixed-length or variable-length subnet
the network for subnetting. If you borrow
masking, and whether you're using private or
n bits, you can have 2^n subnets. For
public IP addresses. The "-2" in the host
example, in a Class C network (default
calculation is also a traditional approach that
subnet mask of 255.255.255.0), if you
excludes the network and broadcast addresses,
borrow 2 bits, you can create 2^2 or 4
but in some modern systems, all addresses can
subnets.
potentially be used.
2. Number of Hosts Per Subnet: The number EXAMPLE :- Suppose our IP address is
of valid hosts per subnet is 2^n - 2 192.168.2.64/26 , figure out the usable address ,
where n is the number of bits remaining the start or network address and the end or
for host addressing after subnetting. The broad cast address , find the number of subnets ,
"-2" accounts for the network address and the number of the host per subnet ?
broadcast address which are not usable
The IP address 192.168.2.64/26 means that the
for hosts. For example, if you have 6 bits
network portion is the first 26 bits of the
remaining for host addressing (after
address, and the remaining 6 bits are for host
borrowing 2 bits for subnetting in a Class
addresses within the subnet.
C network), you can have 2^6 - 2 or 62
hosts per subnet. To calculate the details for this address:

Remember that IP version 4 (IPv4) addresses are 1. Subnet Mask: For a /26 CIDR, the subnet
32-bit addresses. A typical IPv4 address looks like mask is 255.255.255.192. The /26 means
this: 192.168.1.1. The subnet mask (e.g., that the first 26 bits are used for the
255.255.255.0) is used to divide the IP address network address and the remaining 6 bits
into the network and host addresses. (32 - 26) are used for the host addresses.
Here's an example with a Class C IP address: 2. Network Address (Start Address): This is
Let's say we have a Class C network with a base the first IP address in the subnet and is
IP address of 192.168.1.0 and a subnet mask of used to identify the subnet itself. It's
255.255.255.0 (or /24 in CIDR notation, meaning typically the IP address where the host
the first 24 bits are used for network addressing). bits are all set to 0. For 192.168.2.64/26,
If we want to create additional subnets, we can the network address is 192.168.2.64.
borrow bits from the host part of the address. 3. Broadcast Address (End Address): This is
If we borrow 2 bits, our subnet mask becomes the last IP address in the subnet and is
255.255.255.192 (or /26 in CIDR notation). used for sending data to all hosts on the
subnet simultaneously. It's the IP address Looking at powers of 2, we find that 2^5 is 32.
where the host bits are all set to 1. For So, we need 5 bits for hosts because that will
192.168.2.64/26, the broadcast address is give us 32 addresses (close to 30). That leaves us
192.168.2.127. with 3 bits for subnetting (8 total bits in an octet
- 5 bits for hosts = 3 bits for subnetting).
4. Usable Addresses: These are the IP
addresses that can be assigned to the Therefore, the subnet mask should be
hosts within the subnet, which are all the 255.255.255.224 (in binary, this last octet is
addresses between the network address 11100000, which is 3 bits for subnetting and 5
and the broadcast address. For bits for hosts).
192.168.2.64/26, the usable addresses
Calculate the number of subnets:
range from 192.168.2.65 to 192.168.2.126.
We borrowed 3 bits for subnetting, so we can
5. Number of Subnets: Since 192 is a class calculate the number of subnets with the formula
network , we first have a /24 network 2^n (where n is the number of subnet bits). So,
and later changed into /26 subnets, you 2^3 equals 8. Therefore, we have 8 subnets.
are effectively borrowing 2 bits (26 - 24)
for subnetting. Therefore, using the Calculate the network address (start address) and
formula 2^n, where n is the number of the broadcast address (end address) for each
borrowed bits, you get 2^2 = 4 subnets. subnet:
Note that this calculation is based on the The subnets would be broken down like this
assumption that you started with a /24 (only showing the last octet for simplicity):
network, which is typically the case for a
Class C IP address like this one. • Subnet 1: Network 0, Usable 1-30,
Broadcast 31
6. Number of Hosts per Subnet: This is • Subnet 2: Network 32, Usable 33-62,
calculated by the formula 2^n - 2, where Broadcast 63
n is the number of bits left for the host • Subnet 3: Network 64, Usable 65-94,
address. Since we have 6 bits for hosts Broadcast 95
(32 total - 26 for network = 6 for hosts), • Subnet 4: Network 96, Usable 97-126,
you get 2^6 - 2 = 62 hosts per subnet. Broadcast 127
• Subnet 5: Network 128, Usable 129-158,
Broadcast 159
• Subnet 6: Network 160, Usable 161-190,
CLASS SUB-NETTING EXAMPLE :- subnet the IP
Broadcast 191
address 216.21.5.0 in to 30 hosts in each
• Subnet 7: Network 192, Usable 193-222,
subnet ?
Broadcast 223
The IP address given is 216.21.5.0, and we want • Subnet 8: Network 224, Usable 225-254,
each subnet to support around 30 hosts. Broadcast 255

Here are the steps: So for example, in the first subnet, you could
assign host IP addresses from 216.21.5.1 to
Find the appropriate subnet mask:
216.21.5.30. The network address would be
First, we need to determine how many bits are 216.21.5.0, and the broadcast address would be
needed to support around 30 hosts per subnet. 216.21.5.31.
The formula to calculate the number of hosts is
And in the second subnet, you could assign host
2^n - 2 (where n is the number of host bits),
IP addresses from 216.21.5.33 to 216.21.5.62, and
but we'll simplify it to 2^n for an easier
so on for the remaining subnets.
approximation.
Remember that the network and broadcast The subnets would be broken down like this
addresses are traditionally not assigned to hosts. (only showing the last octet for simplicity):
However, in some modern systems, all addresses
• Subnet 1: Network 0, Usable 1-62,
can potentially be used.
Broadcast 63
Also note that the exact ranges may depend on • Subnet 2: Network 64, Usable 65-126,
the specifics of your network architecture and the Broadcast 127
equipment you're using. Always refer to the • Subnet 3: Network 128, Usable 129-190,
documentation and specifications of your specific Broadcast 191
networking equipment when configuring subnets. • Subnet 4: Network 192, Usable 193-254,
Broadcast 255
CLASS C SUB-NETTING EXAMPLE :- subnet the
IP address 196.10.20.0 in to 52 hosts in each So for example, in the first subnet, you could
subnet ? assign host IP addresses from 196.10.20.1 to
196.10.20.62. The network address would be
let's subnet the IP address 196.10.20.0 so that
196.10.20.0, and the broadcast address would be
there are approximately 52 hosts in each subnet.
196.10.20.63.
We'll do this in a simple way:
And in the second subnet, you could assign host
Find the appropriate subnet mask:
IP addresses from 196.10.20.65 to 196.10.20.126,
First, we need to determine how many bits are and so on for the remaining subnets.
needed to support approximately 52 hosts per
Remember that the network and broadcast
subnet. The formula to calculate the number of
addresses are traditionally not assigned to hosts.
hosts is 2^n - 2, where n is the number of host
However, in some modern systems, all addresses
bits, but to keep it simple, we'll use 2^n for a
can potentially be used.
rough approximation.
Also note that the exact ranges may depend on
Looking at powers of 2, we find that 2^6 is 64,
the specifics of your network architecture and the
which is the next number that can accommodate
equipment you're using. Always refer to the
at least 52 hosts. So, we need 6 bits for hosts,
documentation and specifications of your specific
because that will give us 64 addresses, which is
networking equipment when configuring subnets.
more than enough for our needs. That leaves us
with 2 bits for subnetting (8 total bits in an octet
- 6 bits for hosts = 2 bits for subnetting).
CLASS B SUB-NETTING EXAMPLE :-
Therefore, the subnet mask should be
255.255.255.192 (in binary, this last octet is let's subnet the IP address 150.15.0.0 to
11000000, which is 2 bits for subnetting and 6 accommodate approximately 500 hosts in each
bits for hosts). subnet, and we'll do this in a simple way:

Calculate the number of subnets: Find the appropriate subnet mask:

We borrowed 2 bits for subnetting, so we can We first need to figure out how many bits are
calculate the number of subnets with the formula needed to support approximately 500 hosts per
2^n (where n is the number of subnet bits). So, subnet. We could use the formula 2^n - 2
2^2 equals 4. Therefore, we have 4 subnets. (where n is the number of host bits), but let's
keep it simple and use 2^n for an easy
Calculate the network address (start address) and
approximation.
the broadcast address (end address) for each
subnet: Looking at powers of 2, we find that 2^9 is 512.
This is the smallest power of 2 that's greater than
500. So, we need 9 bits for hosts because that
will give us 512 addresses which is more than CLASS A SUB-NETTING EXAMPLE
our requirement of 500. That leaves us with 7
bits for subnetting (16 total bits in the last two Let's use a Class A network of 10.0.0.0 and
octets - 9 bits for hosts = 7 bits for subnetting). subnet it to accommodate around 2000 hosts in
each subnet.
Therefore, the subnet mask should be
255.255.254.0 (in binary, the last two octets are Default Subnet Mask:
11111110 00000000, which is 7 bits for For a Class A network, the default subnet mask is
subnetting and 9 bits for hosts). 255.0.0.0. This means that by default, the first 8
Calculate the number of subnets: bits (1 octet) are used for the network portion of
the address, and the remaining 24 bits (3 octets)
We borrowed 7 bits for subnetting, so we can
are available for host addresses.
calculate the number of subnets with the formula
2^n (where n is the number of subnet bits). So, Find the appropriate subnet mask:
2^7 equals 128. Therefore, we have 128 subnets. If we want to support approximately 2000 hosts
Calculate the network address (start address) and per subnet, we need to determine how many host
the broadcast address (end address) for each bits are required. Looking at powers of 2, we
subnet: find that 2^11 is 2048, which is the smallest
power of 2 that's greater than 2000. So, we need
The subnets would be broken down like this
11 bits for hosts because that will give us 2048
(only showing the last two octets for simplicity):
addresses, which is more than our requirement of
• Subnet 1: Network 0.0, Usable 0.1-1.254, 2000. That leaves us with 13 bits for subnetting
Broadcast 1.255 (24 total bits in the last three octets - 11 bits for
• Subnet 2: Network 2.0, Usable 2.1-3.254, hosts = 13 bits for subnetting).
Broadcast 3.255
Therefore, the subnet mask should be 255.248.0.0
• Subnet 3: Network 4.0, Usable 4.1-5.254,
(in binary, the last three octets are 11111000
Broadcast 5.255
00000000 00000000, which is 13 bits for
• And so on until Subnet 128.
subnetting and 11 bits for hosts).
So for example, in the first subnet, you could
Calculate the number of subnets:
assign host IP addresses from 150.15.0.1 to
150.15.1.254. The network address would be We borrowed 13 bits for subnetting, so we can
150.15.0.0, and the broadcast address would be calculate the number of subnets with the formula
150.15.1.255. 2^n (where n is the number of subnet bits). So,
2^13 equals 8192. Therefore, we have 8192
And in the second subnet, you could assign host
subnets.
IP addresses from 150.15.2.1 to 150.15.3.254, and
so on for the remaining subnets. Calculate the network address (start address) and
the broadcast address (end address) for each
Remember that the network and broadcast
subnet:
addresses are traditionally not assigned to hosts.
However, in some modern systems, all addresses Each subnet has 2^11 or 2048 addresses. Out of
can potentially be used. these, one is used as the network address and
another one is used as the broadcast address. The
Also note that the exact ranges may depend on
rest (2046 addresses) are available for hosts.
the specifics of your network architecture and the
equipment you're using. Always refer to the The network addresses of the first few subnets
documentation and specifications of your specific would look something like this:
networking equipment when configuring subnets.
• Subnet 1: Network 10.0.0.0, Usable
10.0.0.1 to 10.0.7.254, Broadcast
10.0.7.255
• Subnet 2: Network 10.0.8.0, Usable
10.0.8.1 to 10.0.15.254, Broadcast
10.0.15.255
• Subnet 3: Network 10.0.16.0, Usable
10.0.16.1 to 10.0.23.254, Broadcast
10.0.23.255
• And so on until Subnet 8192.

Remember that the network and broadcast


addresses are traditionally not assigned to hosts.
However, in some modern systems, all addresses
can potentially be used.

Also note that the exact ranges may depend on


the specifics of your network architecture and the
equipment you're using. Always refer to the
documentation and specifications of your specific
networking equipment when configuring subnets.

You might also like