Basics of Computer Networking
Basics of Computer Networking
Prepared by P. Prasanna
1.Computer Networking basics
A computer network is a collection of interconnected devices that share
resources and information. These devices can include computers, servers,
printers, and other hardware. Networks allow for the efficient exchange of data,
enabling various applications such as email, file sharing, and internet browsing.
Basic Terminologies of Computer Networks
Network: A group of connected computers and devices that can
communicate and share data with each other.
Node: Any device that can send, receive, or forward data in a network.
This includes laptops, mobiles, printers, earbuds, servers, etc.
Networking Devices: Devices that manage and support networking
functions. This includes routers, switches, hubs, and access points.
Transmission Media: The physical or wireless medium through which
data travels between devices. Wired media: Ethernet cables, optical fiber.
Wireless media: Wi-Fi, Bluetooth, infrared
Service Provider Networks: Networks offered by external providers that
allow users or organizations to lease network access and capabilities. This
includes internet providers, mobile carriers, etc.
We will be discussing more terms like Protocol, IP Address, DNS, etc below in
this article.
How Does a Computer Network Work?
Basics building blocks of a Computer network are Nodes and Links. A Network
Node can be illustrated as Equipment for Data Communication like a Modem,
Router, etc., or Equipment of a Data Terminal like connecting two computers or
more. Link in Computer Networks can be defined as wires or cables or free
space of wireless networks.
The working of Computer Networks can be simply defined as rules or protocols
which help in sending and receiving data via the links which allow Computer
networks to communicate. Each device has an IP Address, that helps in
identifying a device.
Types of Computer Network Architecture
Computer Network falls under these broad Categories:
Client-Server Architecture: Client-Server Architecture is a type of
Computer Network Architecture in which Nodes can be Servers or
Clients. Here, the server node can manage the Client Node Behaviour.
Peer-to-Peer Architecture: In P2P (Peer-to-Peer) Architecture, there is not
any concept of a Central Server. Each device is free for working as either
client or server.
Network Devices
An interconnection of multiple devices, also known as hosts, that are connected
using multiple paths for the purpose of sending/receiving data or media.
Computer networks can also include multiple devices/mediums which help in
the communication between two different devices; these are known as Network
devices and include things such as routers, switches, hubs, and bridges.
Network Devices
Network Topology
The Network Topology is the layout arrangement of the different devices in a
network. Some types of network topologies are,
Bus Topology: In bus topology all devices are connected to a single
central cable called a bus.
Star Topology: In star topology all devices are connected to a central
node called hub or switch.
Ring Topology: In ring topology devices are connected in a circular loop
with each device connected to two others. Data travels in one direction
(or sometimes both) passing through each device until it reaches its
destination.
Mesh Topology: In mesh topology every device is connected to every
other device in the network.
Tree Topology: Tree topology is the combination of star and bus
topology. Tree topology is good for organizing large networks and allows
for easy expansion.
Hybrid Topology: Hybrid topology is the combination of two or more
different topologies (like star and mesh).
Network Topology
OSI Model
OSI stands for Open Systems Interconnection. It is a reference model that
specifies standards for communications protocols and also the functionalities of
each layer. The OSI has been developed by the International Organization For
Standardization and it is 7 layer architecture. Each layer of OSI has different
functions and each layer has to follow different protocols. The 7 layers are as
follows:
Physical Layer
Data link Layer
Network Layer
Transport Layer
Session Layer
Presentation Layer
Application Layer
Network Protocols
A protocol is a set of rules or algorithms which define the way how two entities
can communicate across the network and there exists a different protocol
defined at each layer of the OSI model. A few such protocols are TCP, IP, UDP,
ARP, DHCP, FTP, and so on.
Transmission Control Protocol/Internet Protocol (TCP/IP): TCP/IP is the
foundational protocol suite of the internet, enabling reliable
communication. TCP Ensures data is delivered reliably and in order and
IP routes data packets to their destination based on IP addresses.
Hypertext Transfer Protocol (HTTP) and HTTPS: HTTP
and HTTPS protocols used for transmitting web pages. In
HTTP communication is unsecured and in HTTPS secured
communication using SSL/TLS encryption.
Simple Mail Transfer Protocol (SMTP): SMTP protocol used to send
email. SMTP protocol works with other protocols like POP3 and IMAP
for email retrieval.
File Transfer Protocol (FTP): FTP protocol used for transferring files
between computers. Includes commands for uploading, downloading, and
managing files on a remote server.
Dynamic Host Configuration Protocol
(DHCP): DHCP protocol automatically assigns IP addresses to devices on
a network. Reduces manual configuration and IP address conflicts.
Domain Name System (DNS): DNS Translates human-friendly domain
names into IP addresses. Ensures seamless navigation on the internet.
Unique Identifiers of Network
Hostname: Each device in the network is associated with a unique device name
known as Hostname. Type “hostname” in the command prompt(Administrator
Mode) and press ‘Enter’, this displays the hostname of your machine.
HostName
IP Address (Internet Protocol address): Also known as the Logical Address, the
IP Address is the network address of the system across the network. To identify
each device in the world-wide-web, the Internet Assigned Numbers Authority
(IANA) assigns an IPV4 (Version 4) address as a unique identifier to each
device on the Internet. The length of an IPv4 address is 32 bits, hence, we have
232 IP addresses available. The length of an IPv6 address is 128 bits.
In Windows Type “ipconfig” in the command prompt and press ‘Enter’, this
gives us the IP address of the device. For Linux, Type “ifconfig” in the terminal
and press ‘Enter’ this gives us the IP address of the device.
Port: A port can be referred to as a logical channel through which data can be
sent/received to an application. Any host may have multiple applications
running, and each of these applications is identified using the port number on
which they are running.
A port number is a 16-bit integer, hence, we have 216 ports available which are
categorized as shown below:
Port Types Range
Well known
0 – 1023
Ports
List of Ports
Socket: The unique combination of IP address and Port number together is
termed a Socket.
Other Related Concepts
DNS Server: DNS stands for Domain Name System. DNS is basically a server
that translates web addresses or URLs (ex: www.google.com) into their
corresponding IP addresses. We don’t have to remember all the IP addresses of
each and every website. The command ‘nslookup’ gives you the IP address of
the domain you are looking for. This also provides information on our DNS
Server. \
Domain IP Address
ARP: ARP stands for Address Resolution Protocol. It is used to convert an IP
address to its corresponding physical address(i.e., MAC Address). ARP is used
by the Data Link Layer to identify the MAC address of the Receiver’s machine.
RARP: RARP stands for Reverse Address Resolution Protocol. As the name
suggests, it provides the IP address of the device given a physical address as
input. But RARP has become obsolete since the time DHCP has come into the
picture.
The Domain Name System (DNS) is a critical component of computer
networking. It converts easily recognizable domain names, such as
www.example.com, into numerical IP addresses that computers use to identify
each other on the network.
How DNS Works?
DNS works efficiently, translating user-friendly domain names into IP
addresses, allowing seamless navigation on the internet. Below step by step
working of DNS:
User Input: When a user enters a domain name in a browser, the system
needs to find its IP address.
DNS Query: The user's device sends a DNS query to the DNS resolver.
Resolver Request: The DNS resolver checks its cache for the IP address.
If not found, it forwards the request to the root DNS server.
Root DNS Server: The root DNS server provides the address of the TLD
(Top-Level Domain) server for the specific domain extension (e.g., .com).
TLD DNS Server: The TLD server directs the resolver to the
authoritative DNS server for the actual domain.
Authoritative DNS Server: The authoritative DNS server knows the IP
address for the domain and provides it to the resolver.
Response to User: The resolver stores the IP address in its cache and
sends it to the user's device.
Access Website: With the IP address, the user's device can access the
desired website.
Please refer How DNS works for more details.
Network Security
Ensuring the security of a network is crucial to protect data and resources from
unauthorized access and attacks. Key aspects of network security include:
Firewalls: Devices or software that monitor and control incoming and
outgoing network traffic based on security rules.
Encryption: The process of encoding data to prevent unauthorized access.
Commonly used in VPNs, HTTPS, and secure email.
Intrusion Detection Systems (IDS): Tools that monitor network traffic for
suspicious activity and potential threats.
Access Control: Mechanisms that restrict access to network resources
based on user identity and role.
Regular Updates and Patching: Keeping software and hardware up to date
to protect against vulnerabilities.
Characteristics of Computer Networks
Computer networks are systems that connect multiple devices to facilitate
communication, resource sharing, and data transfer. They possess several key
characteristics that ensure efficient and secure operations. These characteristics
include Security, Reliability, Scalability, Performance, Fault Tolerance, and
hardware and software support. Please refer Characteristics of Computer
Networks for more details.
Types of Network Topology
Network topology refers to the arrangement of different elements like nodes,
links, or devices in a computer network. Common types of network topology
include bus, star, ring, mesh, and tree topologies, each with its advantages and
disadvantages. In this article, we will discuss different types of network
topology in detail.
There are two major categories of Network Topology i.e. Physical Network
topology and Logical Network Topology. Physical Network Topology refers to
the actual structure of the physical medium for the transmission of data. Logical
network Topology refers to the transmission of data between devices present in
the network irrespective of the way devices are connected. The structure of the
network is important for the proper functioning of the network. one must choose
the most suitable topology as per their requirement.
Types of Network Topology
Below mentioned are the types of Network Topology
Point to Point Topology
Point-to-point topology is a type of topology that works on the functionality of
the sender and receiver. It is the simplest communication between two nodes, in
which one is the sender and the other one is the receiver. Point-to-Point provides
high bandwidth.
Point to
Point Topology
Mesh Topology
In a mesh topology, every device is connected to another device via a particular
channel. Every device is connected to another via dedicated channels. These
channels are known as links. In Mesh Topology, the protocols used are AHCP
(Ad Hoc Configuration Protocols), DHCP (Dynamic Host Configuration
Protocol), etc.
Mesh Topology
Suppose, the N number of devices are connected with each other in a
mesh topology, the total number of ports that are required by each device
is N-1. In Figure , there are 6 devices connected to each other, hence the
total number of ports required by each device is 5. The total number of
ports required = N * (N-1).
Suppose, N number of devices are connected with each other in a mesh
topology, then the total number of dedicated links required to connect
them is N C 2 i.e. N(N-1)/2. In Figure, there are 6 devices connected to
each other, hence the total number of links required is 6*5/2 = 15.
Advantages of Mesh Topology
Communication is very fast between the nodes.
Mesh Topology is robust.
The fault is diagnosed easily. Data is reliable because data is transferred
among the devices through dedicated channels or links.
Provides security and privacy.
Disadvantages of Mesh Topology
Installation and configuration are difficult.
The cost of cables is high as bulk wiring is required, hence suitable for
less number of devices.
The cost of maintenance is high.
A common example of mesh topology is the internet backbone, where various
internet service providers are connected to each other via dedicated channels.
This topology is also used in military communication systems and aircraft
navigation systems.
Star Topology
In Star Topology, all the devices are connected to a single hub through a cable.
This hub is the central node and all other nodes are connected to the central
node. The hub can be passive in nature i.e., not an intelligent hub such as
broadcasting devices, at the same time the hub can be intelligent known as an
active hub. Active hubs have repeaters in them. Coaxial cables or RJ-45 cables
are used to connect the computers. In Star Topology, many
popular Ethernet LAN protocols are used as CD(Collision
Detection), CSMA (Carrier Sense Multiple Access), etc.
Star Topology
Bus
Topology
Advantages of Bus Topology
If N devices are connected to each other in a bus topology, then the
number of cables required to connect them is 1, known as backbone
cable, and N drop lines are required.
Coaxial or twisted pair cables are mainly used in bus-based networks that
support up to 10 Mbps.
The cost of the cable is less compared to other topologies, but it is used to
build small networks.
Bus topology is familiar technology as installation and troubleshooting
techniques are well known.
CSMA is the most common method for this type of topology.
Disadvantages of Bus Topology
A bus topology is quite simpler, but still, it requires a lot of cabling.
If the common cable fails, then the whole system will crash down.
If the network traffic is heavy, it increases collisions in the network. To
avoid this, various protocols are used in the MAC layer known as Pure
Aloha, Slotted Aloha, CSMA/CD, etc.
Adding new devices to the network would slow down networks.
Security is very low.
A common example of bus topology is the Ethernet LAN, where all devices are
connected to a single coaxial cable or twisted pair cable. This topology is also
used in cable television networks.
Ring Topology
In a Ring Topology, it forms a ring connecting devices with exactly two
neighboring devices. A number of repeaters are used for Ring topology with a
large number of nodes, because if someone wants to send some data to the last
node in the ring topology with 100 nodes, then the data will have to pass
through 99 nodes to reach the 100th node. Hence to prevent data loss repeaters
are used in the network.
The data flows in one direction, i.e. it is unidirectional, but it can be made
bidirectional by having 2 connections between each Network Node, it is
called Dual Ring Topology. In-Ring Topology, the Token Ring Passing protocol
is used by the workstations to transmit the data.
Ring Topology
The most common access method of ring topology is token passing.
Token passing: It is a network access method in which a token is passed
from one node to another node.
Token: It is a frame that circulates around the network.
Operations of Ring Topology
One station is known as a monitor station which takes all the
responsibility for performing the operations.
To transmit the data, the station has to hold the token. After the
transmission is done, the token is to be released for other stations to use.
When no station is transmitting the data, then the token will circulate in
the ring.
There are two types of token release techniques: Early token
release releases the token just after transmitting the data and Delayed
token release releases the token after the acknowledgment is received
from the receiver.
Advantages of Ring Topology
The data transmission is high-speed.
The possibility of collision is minimum in this type of topology.
Cheap to install and expand.
It is less costly than a star topology.
Disadvantages of Ring Topology
The failure of a single node in the network can cause the entire network
to fail.
Troubleshooting is difficult in this topology.
The addition of stations in between or the removal of stations can disturb
the whole topology.
Less secure.
Tree Topology
Tree topology is the variation of the Star topology. This topology has a
hierarchical flow of data. In Tree Topology, protocols like DHCP and SAC
(Standard Automatic Configuration) are used.
Tree Topology
In tree topology, the various secondary hubs are connected to the central hub
which contains the repeater. This data flow from top to bottom i.e. from the
central hub to the secondary and then to the devices or from bottom to top i.e.
devices to the secondary hub and then to the central hub. It is a multi-point
connection and a non-robust topology because if the backbone fails the
topology crashes.
Advantages of Tree Topology
It allows more devices to be attached to a single central hub thus it
decreases the distance that is traveled by the signal to come to the
devices.
It allows the network to get isolated and also prioritize from different
computers.
We can add new devices to the existing network.
Error detection and error correction are very easy in a tree topology.
Disadvantages of Tree Topology
If the central hub gets fails the entire system
fails.
The cost is high because of the cabling.
If new devices are added, it becomes difficult
to reconfigure.
A common example of a tree topology is the hierarchy in a large organization.
At the top of the tree is the CEO, who is connected to the different departments
or divisions (child nodes) of the company. Each department has its own
hierarchy, with managers overseeing different teams (grandchild nodes). The
team members (leaf nodes) are at the bottom of the hierarchy, connected to their
respective managers and departments.
Hybrid Topology
Hybrid Topology is the combination of all the various types of topologies we
have studied above. Hybrid Topology is used when the nodes are free to take
any form. It means these can be individuals such as Ring or Star topology or can
be a combination of various types of topologies seen above. Each individual
topology uses the protocol that has been discussed earlier.
Hybrid Topology
The above figure shows the structure of the Hybrid topology. As seen it contains
a combination of all different types of networks.
Advantages of Hybrid Topology
This topology is very flexible .
The size of the network can be easily expanded by adding new devices.
Disadvantages of Hybrid Topology
It is challenging to design the architecture of the Hybrid Network.
Hubs used in this topology are very expensive.
The infrastructure cost is very high as a hybrid network requires a lot of
cabling and network devices .
A common example of a hybrid topology is a university campus network. The
network may have a backbone of a star topology, with each building connected
to the backbone through a switch or router. Within each building, there may be a
bus or ring topology connecting the different rooms and offices. The wireless
access points also create a mesh topology for wireless devices. This hybrid
topology allows for efficient communication between different buildings while
providing flexibility and redundancy within each building.
Why is Network Topology Important?
Network Topology is important because it defines how devices are connected
and how they communicate in the network. Here are some points that defines
why network topology is important.
Network Performance: Upon choosing the appropriate topology as per
requirement, it helps in running the network easily and hence increases
network performance.
Network Reliability: Some topologies like Star, Mesh are reliable as if
one connection fails, they provide an alternative for that connection,
hence it works as a backup.
Network Expansion : Chosing correct topology helps in easier expansion
of Network as it helps in adding more devices to the network without
disrupting the actual network.
Network Security: Network Topology helps in understanding how
devices are connected and hence provides a better security to the network.
Network Devices (Hub, Repeater, Bridge, Switch, Router, Gateways and
Brouter):-
Network devices are physical devices that allow hardware on a computer
network to communicate and interact with each other. Network devices like
hubs, repeaters, bridges, switches, routers, gateways, and brouter help manage
and direct data flow in a network. They ensure efficient communication between
connected devices by controlling data transfer, boosting signals, and linking
different networks. Each device serves a specific role, from simple data
forwarding to complex routing between networks. In this article, we are going
to discuss different types of network devices in detail.
Types of Network
Devices
Functions of Network Devices
Network devices help to send and receive data between different devices.
Network devices allow devices to connect to the network efficiently and
securely.
Network devices improves network speed and manage data flow better.
It protects the network by controlling access and preventing threats.
Expand the network range and solve signal problems.
Common Types of Networking Devices and Their Uses
Network devices work as a mediator between two devices for transmission of
data, and thus play a very important role in the functioning of a computer
network. Below are some common network devices used in modern networks:
Access Point
Modems
Firewalls
Repeater
Hub
Bridge
Switch
Routers
Gateway
Brouter
NIC
Access Point
An access point in networking is a device that allows wireless devices, like
smartphones and laptops, to connect to a wired network. It creates a Wi-Fi
network that lets wireless devices communicate with the internet or other
devices on the network. Access points are used to extend the range of a network
or provide Wi-Fi in areas that do not have it. They are commonly found in
homes, offices, and public places to provide wireless internet access.
Modems
Modem is also known as modulator/demodulator is a network device that is
used to convert digital signal into analog signals of different frequencies and
transmits these signals to a modem at the receiving location. These converted
signals can be transmitted over the cable systems, telephone lines, and other
communication mediums. A modem is also used to convert an analog signal
back into digital signal. Modems are generally used to access the internet by
customers of an Internet Service Provider (ISP).
Types of Modems
There are four main types of modems:
DSL Modem: Uses regular phone lines to connect to the internet but it is
slower compared to other types.
Cable Modem: Sends data through TV cables, providing faster internet
than DSL.
Wireless Modem: Connects devices to the internet using Wi-Fi relying on
nearby Wi-Fi signals.
Cellular Modem: Connects to the internet using mobile data from a
cellular network not Wi-Fi or fixed cables.
Firewalls
A firewall is a network security device that monitors and controls the flow of
data between your computer or network and the internet. It acts as a barrier,
blocking unauthorized access while allowing trusted data to pass through.
Firewalls help protect your network from hackers, viruses, and other
online threats by filtering traffic based on security rules. Firewalls can be
physical devices (hardware), programs (software), or even cloud-based services,
which can be offered as SaaS, through public clouds, or private virtual clouds.
Repeater
A repeater operates at the physical layer. Its main function is to amplify (i.e.,
regenerate) the signal over the same network before the signal becomes too
weak or corrupted to extend the length to which the signal can be transmitted
over the same network. When the signal becomes weak, they copy it bit by bit
and regenerate it at its star topology connectors connecting following the
original strength. It is a 2-port device.
Hub
A hub is a multiport repeater. A hub connects multiple wires coming from
different branches, for example, the connector in star topology which connects
different stations. Hubs cannot filter data, so data packets are sent to all
connected devices. In other words, the collision domain of all hosts connected
through Hub remains one. Also, they do not have the intelligence to find out the
best path for data packets which leads to inefficiencies and wastage.
Types of Hub
Active Hub: These are the hubs that have their power supply and can
clean, boost, and relay the signal along with the network. It serves both as
a repeater as well as a wiring center. These are used to extend the
maximum distance between nodes.
Passive Hub: These are the hubs that collect wiring from nodes and
power supply from the active hub. These hubs relay signals onto the
network without cleaning and boosting them and can't be used to extend
the distance between nodes.
Intelligent Hub: It works like an active hub and includes remote
management capabilities. They also provide flexible data rates to network
devices. It also enables an administrator to monitor the traffic passing
through the hub and to configure each port in the hub.
Bridge
A bridge operates at the data link layer. A bridge is a repeater, with add on the
functionality of filtering content by reading the MAC addresses of the source
and destination. It is also used for interconnecting two LANs working on the
same protocol. It typically connects multiple network segments and each port is
connected to different segment. A bridge is not strictly limited to two ports, it
can have multiple ports to connect and manage multiple network segments.
Modern multi-port bridges are often called Layer 2 switches because they
perform similar functions.
Types of Bridges
Transparent Bridges: These are the bridge in which the stations are
completely unaware of the bridge's existence i.e. whether or not a bridge
is added or deleted from the network, reconfiguration of the stations is
unnecessary. These bridges make use of two processes i.e. bridge
forwarding and bridge learning.
Source Routing Bridges: In these bridges, routing operations is performed
by the source station and the frame specifies which route to follow. The
host can discover the frame by sending a special frame called the
discovery frame, which spreads through the entire network using all
possible paths to the destination.
Switch
A switch is a multiport bridge with a buffer designed that can boost its
efficiency(a large number of ports imply less traffic) and performance. A switch
is a data link layer device. The switch can perform error checking before
forwarding data, which makes it very efficient as it does not forward packets
that have errors and forward good packets selectively to the correct port only.
In other words, the switch divides the collision domain of hosts, but
the broadcast domain remains the same.
Types of Switch
Unmanaged Switches: These switches have a simple plug-and-play
design and do not offer advanced configuration options. They are suitable
for small networks or for use as an expansion to a larger network.
Managed Switches: These switches offer advanced configuration options
such as VLANs, QoS, and link aggregation. They are suitable for larger,
more complex networks and allow for centralized management.
Smart Switches: These switches have features similar to managed
switches but are typically easier to set up and manage. They are suitable
for small- to medium-sized networks.
Layer 2 Switches: These switches operate at the Data Link layer of
the OSI model and are responsible for forwarding data between devices
on the same network segment.
Layer 3 switches: These switches operate at the Network layer of the OSI
model and can route data between different network segments. They are
more advanced than Layer 2 switches and are often used in larger, more
complex networks.
PoE Switches: These switches have Power over Ethernet capabilities,
which allows them to supply power to network devices over the same
cable that carries data.
Gigabit switches: These switches support Gigabit Ethernet speeds, which
are faster than traditional Ethernet speeds.
Rack-Mounted Switches: These switches are designed to be mounted in a
server rack and are suitable for use in data centers or other large
networks.
Desktop Switches: These switches are designed for use on a desktop or in
a small office environment and are typically smaller in size than rack-
mounted switches.
Modular Switches: These switches have modular design that allows for
easy expansion or customization. They are suitable for large networks and
data centers.
Router
A router is a device like a switch that routes data packets based on their IP
addresses. The router is mainly a Network Layer device. Routers normally
connect LANs and WANs and have a dynamically updating routing table based
on which they make decisions on routing the data packets. The router divides
the broadcast domains of hosts connected through it.
Gateway
A gateway, as the name suggests, is a passage to connect two networks that may
work upon different networking models. They work as messenger agents that
take data from one system, interpret it, and transfer it to another system.
Gateways are also called protocol converters and can operate at any network
layer. Gateways are generally more complex than switches or routers.
Brouter
It is also known as the bridging router is a device that combines features of both
bridge and router. It can work either at the data link layer or a network layer.
Working as a router, it is capable of routing packets across networks and
working as a bridge, it is capable of filtering local area network traffic.
NIC
NIC or network interface card is a network adapter that is used to connect the
computer to the network. It is installed in the computer to establish a LAN. It
has a unique ID that is written on the chip, and it has a connector to connect the
cable to it. The cable acts as an interface between the computer and the router or
modem. NIC is a layer 2 device which means that it works on both the physical
and data link layers of the network model.
What is OSI Model? - Layers of OSI Model
The OSI (Open Systems Interconnection) Model is a set of rules that explains
how different computer systems communicate over a network. OSI Model was
developed by the International Organization for Standardization (ISO). The OSI
Model consists of 7 layers and each layer has specific functions and
responsibilities. This layered approach makes it easier for different devices and
technologies to work together. OSI Model provides a clear structure for data
transmission and managing network issues. The OSI Model is widely used as a
reference to understand how network systems function.
There are 7 layers in the OSI Model and each layer has its specific role in
handling data. All the layers are mentioned below:
Physical Layer
Data Link Layer
Network Layer
Transport Layer
Session Layer
Presentation Layer
Application Layer
Layer 1: Physical Layer
The lowest layer of the OSI reference model is the Physical Layer. It is
responsible for the actual physical connection between the devices. The physical
layer contains information in the form of bits. Physical Layer is responsible for
transmitting individual bits from one node to the next. When receiving data, this
layer will get the signal received and convert it into 0s and 1s and send them to
the Data Link layer, which will put the frame back together. Common physical
layer devices are Hub, Repeater, Modem, and Cables.
Physical Layer
Functions of the Physical Layer
Bit Synchronization: The physical layer provides the synchronization of
the bits by providing a clock. This clock controls both sender and receiver
thus providing synchronization at the bit level.
Bit Rate Control: The Physical layer also defines the transmission rate i.e.
the number of bits sent per second.
Physical Topologies: Physical layer specifies how the different,
devices/nodes are arranged in a network i.e. bus topology, star topology,
or mesh topology.
Transmission Mode: Physical layer also defines how the data flows
between the two connected devices. The various transmission modes
possible are Simplex, half-duplex and full duplex.
Layer 2: Data Link Layer (DLL)
The data link layer is responsible for the node-to-node delivery of the message.
The main function of this layer is to make sure data transfer is error-free from
one node to another, over the physical layer. When a packet arrives in a
network, it is the responsibility of the DLL to transmit it to the Host using
its MAC address. Packet in the Data Link layer is referred to as
Frame. Switches and Bridges are common Data Link Layer devices.
The Data Link Layer is divided into two sublayers:
Logical Link Control (LLC)
Media Access Control (MAC)
The packet received from the Network layer is further divided into frames
depending on the frame size of the NIC (Network Interface Card). DLL also
encapsulates Sender and Receiver’s MAC address in the header.
The Receiver’s MAC address is obtained by placing an ARP (Address
Resolution Protocol) request onto the wire asking, "Who has that IP address?"
and the destination host will reply with its MAC address.
Functions of the Data Link Layer
Framing: Framing is a function of the data link layer. It provides a way
for a sender to transmit a set of bits that are meaningful to the receiver.
This can be accomplished by attaching special bit patterns to the
beginning and end of the frame.
Physical Addressing: After creating frames, the Data link layer adds
physical addresses (MAC addresses) of the sender and/or receiver in the
header of each frame.
Error Control: The data link layer provides the mechanism of error
control in which it detects and retransmits damaged or lost frames.
Flow Control: The data rate must be constant on both sides else the data
may get corrupted thus, flow control coordinates the amount of data that
can be sent before receiving an acknowledgment.
Access Control: When a single communication channel is shared by
multiple devices, the MAC sub-layer of the data link layer helps to
determine which device has control over the channel at a given time.
Layer 3: Network Layer
The network layer works for the transmission of data from one host to the other
located in different networks. It also takes care of packet routing i.e. selection of
the shortest path to transmit the packet, from the number of routes available.
The sender and receiver's IP address are placed in the header by the network
layer. Segment in the Network layer is referred to as Packet. Network layer is
implemented by networking devices such as routers and switches.
Functions of the Network Layer
Routing: The network layer protocols determine which route is suitable
from source to destination. This function of the network layer is known as
routing.
Logical Addressing: To identify each device inter-network uniquely, the
network layer defines an addressing scheme. The sender and receiver’s IP
addresses are placed in the header by the network layer. Such an address
distinguishes each device uniquely and universally.
Layer 4: Transport Layer
The transport layer provides services to the application layer and takes services
from the network layer. The data in the transport layer is referred to
as Segments. It is responsible for the end-to-end delivery of the complete
message. The transport layer also provides the acknowledgment of the
successful data transmission and re-transmits the data if an error is found.
Protocols used in Transport Layer are TCP, UDP NetBIOS, PPTP.
At the sender's side, the transport layer receives the formatted data from the
upper layers, performs Segmentation, and also implements Flow and error
control to ensure proper data transmission. It also adds Source and
Destination port number in its header and forwards the segmented data to the
Network Layer.
Generally, this destination port number is configured, either by default or
manually. For example, when a web application requests a web server, it
typically uses port number 80, because this is the default port assigned to
web applications. Many applications have default ports assigned.
At the Receiver’s side, Transport Layer reads the port number from its header
and forwards the Data which it has received to the respective application. It also
performs sequencing and reassembling of the segmented data.
Functions of the Transport Layer
Segmentation and Reassembly: This layer accepts the message from the
(session) layer and breaks the message into smaller units. Each of the
segments produced has a header associated with it. The transport layer at
the destination station reassembles the message.
Service Point Addressing: To deliver the message to the correct process,
the transport layer header includes a type of address called service point
address or port address. Thus, by specifying this address, the transport
layer makes sure that the message is delivered to the correct process.
Services Provided by Transport Layer
Connection-Oriented Service
Connectionless Service
Layer 5: Session Layer
Session Layer in the OSI Model is responsible for the establishment of
connections, management of connections, terminations of sessions between two
devices. It also provides authentication and security. Protocols used in the
Session Layer are NetBIOS, PPTP.
Functions of the Session Layer
Session Establishment, Maintenance, and Termination: The layer allows
the two processes to establish, use, and terminate a connection.
Synchronization: This layer allows a process to add checkpoints that are
considered synchronization points in the data. These synchronization
points help to identify the error so that the data is re-synchronized
properly, and ends of the messages are not cut prematurely, and data loss
is avoided.
Dialog Controller: The session layer allows two systems to start
communication with each other in half-duplex or full duplex.
Example
Let us consider a scenario where a user wants to send a message through some
Messenger application running in their browser. The “Messenger” here acts as
the application layer which provides the user with an interface to create the data.
This message or so-called Data is compressed, optionally encrypted (if the data
is sensitive), and converted into bits (0’s and 1’s) so that it can be transmitted.
Application Layer
Functions of the Application Layer
The main functions of the application layer are given below.
Network Virtual Terminal (NVT): It allows a user to log on to a remote
host.
File Transfer Access and Management (FTAM): This application allows a
user to access files in a remote host, retrieve files in a remote host, and
manage or control files from a remote computer.
Mail Services: Provide email service.
Directory Services: This application provides distributed database sources
and access for global information about various objects and services.
How Data Flows in the OSI Model?
When we transfer information from one device to another, it travels through 7
layers of OSI model. First data travels down through 7 layers from the sender's
end and then climbs back 7 layers on the receiver's end.
Data flows through the OSI model in a step-by-step process:
Application Layer: Applications create the data.
Presentation Layer: Data is formatted and encrypted.
Session Layer: Connections are established and managed.
Transport Layer: Data is broken into segments for reliable delivery.
Network Layer: Segments are packaged into packets and routed.
Data Link Layer: Packets are framed and sent to the next device.
Physical Layer: Frames are converted into bits and transmitted physically.
Each layer adds specific information to ensure the data reaches its destination
correctly, and these steps are reversed upon arrival.
We can understand how data flows through OSI Model with the help of an
example mentioned below.
Let us suppose, Person A sends an e-mail to his friend Person B.
Step 1: Person A interacts with e-mail application like Gmail, outlook, etc.
Writes his email to send. (This happens at Application Layer).
Step 2: At Presentation Layer, Mail application prepares for data transmission
like encrypting data and formatting it for transmission.
Step 3: At Session Layer, there is a connection established between the sender
and receiver on the internet.
Step 4: At Transport Layer, Email data is broken into smaller segments. It adds
sequence number and error-checking information to maintain the reliability of
the information.
Step 5: At Network Layer, addressing of packets is done in order to find the best
route for transfer.
Step 6: At Data Link Layer, data packets are encapsulated into frames, then
MAC address is added for local devices and then it checks for error using error
detection.
Step 7: At Physical Layer, Frames are transmitted in the form of electrical/
optical signals over a physical network medium like ethernet cable or WiFi.
After the email reaches the receiver i.e. Person B, the process will reverse and
decrypt the e-mail content. At last, the email will be shown on Person B email
client.
Protocols Used in the OSI Layers
Protocol
Layer Working Data Unit Protocols
Establishing
1: Physical Physical
Bits USB, SONET/SDH, etc.
Layer Connections
between Devices.
Node to Node
2: Data Link
Delivery of Frames Ethernet, PPP, etc.
Layer
Message.
Transmission of
data from one host
3: Network IP, ICMP, IGMP, OSPF,
to another, located Packets
Layer etc.
in different
networks.
Establishes
Connection,
Maintenance,
5: Session NetBIOS, RPC, PPTP,
Ensures Data
Layer etc.
Authentication
and Ensures
security.
Protocol
Layer Working Data Unit Protocols
Helps in
7: identifying the
FTP, SMTP, DNS, DHC
Application client and Data
P, etc.
Layer synchronizing
communication.
OSI vs TCP/IP
Advantages of OSI Model
The OSI Model defines the communication of a computing system into 7
different layers. Its advantages include:
It divides network communication into 7 layers which makes it easier to
understand and troubleshoot.
It standardizes network communications, as each layer has fixed
functions and protocols.
Diagnosing network problems is easier with the OSI model.
It is easier to improve with advancements as each layer can get updates
separately.
Disadvantages of OSI Model
The OSI Model has seven layers, which can be complicated and hard to
understand for beginners.
In real-life networking, most systems use a simpler model called the
Internet protocol suite (TCP/IP), so the OSI Model is not always directly
applicable.
Each layer in the OSI Model adds its own set of rules and operations,
which can make the process more time-consuming and less efficient.
The OSI Model is more of a theoretical framework, meaning it's great for
understanding concepts but not always practical for implementation.
TCP/IP Model
The TCP/IP model is a framework that is used to model the
communication in a network. It is mainly a collection of network
protocols and organization of these protocols in different layers for
modeling the network.
It has four layers, Application, Transport, Network/Internet and Network
Access.
While the OSI model has seven layers, the 4 layer TCP/IP model is
simpler and commonly used in today’s Internet and networking systems.
Role of TCP/IP
One of its main goals is to make sure that the data sent by the sender
arrives safely and correctly at the receiver’s end. To do this, the data is
broken down into smaller parts called packets before being sent. These
packets travel separately and are reassembled in the correct order when
they reach the destination. This helps prevent errors and makes sure the
message is complete and accurate.
Layers of TCP/IP Model
1. Application Layer
The Application Layer is the top layer of the TCP/IP model and the
one closest to the user. This is where all the apps you use like web
browsers, email clients, or file sharing tools connect to the network. It
acts like a bridge between your software (like Chrome, Gmail, or
WhatsApp) and the lower layers of the network that actually send and
receive data.
It supports different protocols like HTTP (for websites), FTP (for file
transfers), SMTP (for emails), and DNS (for finding website addresses).
It also manages things like data formatting, so both sender and receiver
understand the data, encryption to keep data safe, and session
management to keep track of ongoing connections.
2. Transport Layer
The Transport Layer is responsible for making sure that data is
sent reliably and in the correct order between devices. It checks that the
data you send like a message, file, or video arrives safely and completely.
This layer uses two main protocols: TCP and UDP, depending on whether
the communication needs to be reliable or faster.
TCP is used when data must be correct and complete, like when loading a
web page or downloading a file. It checks for errors, resends missing
pieces, and keeps everything in order. On the other hand, UDP (User
Datagram Protocol) is faster but doesn’t guarantee delivery useful for
things like live video or online games where speed matters more than
perfect accuracy.
3. Internet Layer
The Internet Layer is used for finding the best path for data to travel
across different networks so it can reach the right destination. It works
like a traffic controller, helping data packets move from one network to
another until they reach the correct device. This layer uses the Internet
Protocol (IP) to give every device a unique IP address, which helps
identify where data should go.
The main job of this layer is routing deciding the best way for data to
travel. It also takes care of packet forwarding (moving data from one
point to another), fragmentation (breaking large data into smaller parts),
and addressing.
4. Network Access Layer
The Network Access Layer is the bottom layer of the TCP/IP model. It
deals with the actual physical connection between devices on the same
local network like computers connected by cables or communicating
through Wi-Fi. This layer makes sure that data can travel over the
hardware, such as wires, switches, or wireless signals.
It also handles important tasks like using MAC addresses to identify
devices, creating frames (the format used to send data over the physical
link), and checking for basic errors during transmission.
Working of TCP/IP Model
The working of TCP/IP can be explained with the help of the diagram
given below and explained :
TCP/IP WORKING MODEL
When Sending Data (From Sender to Receiver)
Application Layer: Prepares user data using protocols like HTTP, FTP, or
SMTP.
Transport Layer (TCP/UDP): Breaks data into segments and ensures
reliable (TCP) or fast (UDP) delivery.
Internet Layer (IP): Adds IP addresses and decides the best route for each
packet.
Link Layer (Network Access Layer): Converts packets into frames and
sends them over the physical network.
When Receiving Data (At the Destination)
Link Layer: Receives bits from the network and rebuilds frames to pass to
the next layer.
Internet Layer: Checks the IP address, removes the IP header, and
forwards data to the Transport Layer.
Transport Layer: Reassembles segments, checks for errors, and ensures
data is complete.
Application Layer: Delivers the final data to the correct application (e.g.,
displays a web page in the browser).
Why TCP/IP is Used Over the OSI Model
TCP/IP is used over the OSI model because it is simpler, practical, and
widely adopted for real-world networking and the internet. The diagram
below shows the comparison of OSI layer with the TCP :
Reason Explanation
2. Physical Layer :-
Physical Layer in OSI Model
The physical Layer is the bottom-most layer in the Open System
Interconnection (OSI) Model which is a physical and electrical
representation of the system. It consists of various network components
such as power plugs, connectors, receivers, cable types, etc. The physical
layer sends data bits from one device(s) (like a computer) to another
device(s).
The physical Layer defines the types of encoding (that is how the 0's and
1's are encoded in a signal). It is responsible for the communication of the
unstructured raw data streams over a physical medium.
Functions Performed by Physical Layer
The Physical Layer is responsible for sending raw data as bits over a
physical medium. It converts data into signals that can travel through
wires, fiber optics, or wireless channels (encoding) and turns these
signals back into data at the receiver (decoding). It ensures signals are
transmitted correctly and uses techniques like modulation to prepare the
data for transmission and demodulation to retrieve it at the other end.
This layer also decides how data flows (one-way, two-way alternately, or
simultaneously) through transmission modes and controls the speed and
timing of data transmission to keep everything running smoothly.
To read in detail about services offered by this layer, refer to Physical
Layer Services.
Physical Topologies
Physical topologies describe the physical arrangement of devices and
cables in a network. Let's take a look into different types of physical
topologies :
Line Configuration
Point-to-Point configuration: In Point-to-Point configuration, there is a
line (link) that is fully dedicated to carrying the data between two
devices.
Multi-Point configuration: In a Multi-Point configuration, there is a line
(link) through which multiple devices are connected.
Modes of Transmission Medium
Simplex mode: In this mode, out of two devices, only one device can
transmit the data, and the other device can only receive the data.
o Example- Input from keyboards, monitors, TV broadcasting, Radio
broadcasting, etc.
Half Duplex mode: In this mode, out of two devices, both devices can
send and receive the data but only one at a time not simultaneously.
o Examples- Walkie-Talkie, Railway Track, etc.
Full-Duplex mode: In this mode, both devices can send and receive the
data simultaneously.
o Examples- Telephone Systems, Chatting applications, etc.
Simplex Mode
In Simplex mode, the communication is unidirectional, as on a one-way street.
Only one of the two devices on a link can transmit, the other can only receive.
The simplex mode can use the entire capacity of the channel to send data in one
direction.
Example: Keyboard and traditional monitors. The keyboard can only introduce
input, the monitor can only give the output.
Advantages of Simplex Mode
Simplex mode is the easiest and most reliable mode of communication.
It is the most cost-effective mode, as it only requires one communication
channel.
There is no need for coordination between the transmitting and receiving
devices, which simplifies the communication process.
Simplex mode is particularly useful in situations where feedback or
response is not required, such as broadcasting or surveillance.
Disadvantages of Simplex Mode
Only one-way communication is possible.
There is no way to verify if the transmitted data has been received
correctly.
Simplex mode is not suitable for applications that require bidirectional
communication.
Half-Duplex Mode
In half-duplex mode, each station can both transmit and receive, but not at the
same time. When one device is sending, the other can only receive, and vice
versa. The half-duplex mode is used in cases where there is no need for
communication in both directions at the same time. The entire capacity of the
channel can be utilized for each direction.
Example: Walkie-talkie in which message is sent one at a time and messages are
sent in both directions.
Channel capacity=Bandwidth * Propagation Delay
Advantages of Half Duplex Mode
Half-duplex mode allows for bidirectional communication, which is
useful in situations where devices need to send and receive data.
It is a more efficient mode of communication than simplex mode, as the
channel can be used for both transmission and reception.
Half-duplex mode is less expensive than full-duplex mode, as it only
requires one communication channel.
Disadvantages of Half Duplex Mode
Half-duplex mode is less reliable than Full-Duplex mode, as both devices
cannot transmit at the same time.
There is a delay between transmission and reception, which can cause
problems in some applications.
There is a need for coordination between the transmitting and receiving
devices, which can complicate the communication process.
Full-Duplex Mode
In full-duplex mode, both stations can transmit and receive simultaneously. In
full_duplex mode, signals going in one direction share the capacity of the link
with signals going in another direction, this sharing can occur in two ways:
Either the link must contain two physically separate transmission paths,
one for sending and the other for receiving.
Or the capacity is divided between signals traveling in both directions.
Full-duplex mode is used when communication in both directions is required all
the time. The capacity of the channel, however, must be divided between the
two directions.
Example: Telephone Network in which there is communication between two
persons by a telephone line, through which both can talk and listen at the same
time.
Channel Capacity=2* Bandwidth*propagation Delay
The direction of Simplex mode is a Half Duplex mode is Full Duplex mode is
Parameters Simplex Half Duplex Full Duplex
a two-way a two-way
uni-directional directional directional
communication
communication. communication but communication
one at a time. simultaneously.
In Half Duplex
In simplex mode, In Full Duplex mode,
mode, Sender can
Sender can send the Sender can send the
Sender and send the data and
data but that sender data and also can
Receiver also can receive the
can’t receive the receive the data
data but one at a
data. simultaneously.
time.
Types of Transmission
Media
1. Guided Media
Guided Media is also referred to as Wired or Bounded transmission media.
Signals being transmitted are directed and confined in a narrow pathway by
using physical links.
Features:
High Speed
Secure
Used for comparatively shorter distances
There are 3 major types of Guided Media:
Twisted Pair Cable
It consists of 2 separately insulated conductor wires twisted about each other.
Generally, several such pairs are bundled together in a protective sheath. They
are the most widely used Transmission Media. Twisted Pair is of two types:
Unshielded Twisted Pair (UTP):UTP consists of two insulated copper
wires twisted around one another. This type of cable has the ability to
block interference and does not depend on a physical shield for this
purpose. It is used for telephonic applications.
Radiowave
Microwaves
It is a line of sight transmission i.e. the sending and receiving antennas need to
be properly aligned with each other. The distance covered by the signal is
directly proportional to the height of the antenna. Frequency Range:1GHz -
300GHz. Micro waves are majorly used for mobile phone communication and
television distribution.
Advantages:
Cheaper than using cables
Freedom from land acquisition
Ease of communication in difficult terrains
Communication over oceans
Disadvantages:
Insecure communication.
Out of phase signal.
Susceptible to weather conditions.
Bandwidth is limited.
High cost of design, implementation, and maintenance.
Infrared
Infrared waves are used for very short distance communication. They cannot
penetrate through obstacles. This prevents interference between systems.
Frequency Range:300GHz - 400THz. It is used in TV remotes, wireless mouse,
keyboard, printer, etc.
At low frequency,
At low frequency,
they can penetrate
they can penetrate They cannot
through solid
through solid penetrate
objects and walls
objects and walls. through any
but high
at high frequency, solid object and
frequency they
they cannot walls.
bounce off the
penetrate.
Penetration obstacle.
Communication These are used in These are used in These are not
Basis Radiowave Microwave Infrared wave
used in long
long distance long distance
distance
communication. communication.
communication.
Transmission
Impairment
Attenuation: It means loss of energy. The strength of signal decreases
with increasing distance which causes loss of energy in overcoming
resistance of medium. This is also known as attenuated
signal. Amplifiers are used to amplify the attenuated signal which gives
the original signal back and compensate for this loss.
Distortion: It means changes in the form or shape of the signal. This is
generally seen in composite signals made up with different frequencies.
Each frequency component has its own propagation speed travelling
through a medium. And thats why it delay in arriving at the final
destination Every component arrive at different time which leads to
distortion. Therefore, they have different phases at receiver end from
what they had at senders end.
Noise: The random or unwanted signal that mixes up with the original
signal is called noise. There are several types of noise such as induced
noise, crosstalk noise, thermal noise and impulse noise which may
corrupt the signal.
Factors Considered for Designing the Transmission Media
Bandwidth: Assuming all other conditions remain constant, the greater a
medium's bandwidth, the faster a signal's data transmission rate.
Transmission Impairment : Transmission Impairment occurs when the
received signal differs from the transmitted signal. Signal quality will be
impacted as a result of transmission impairment.
Interference: Interference is defined as the process of disturbing a signal
as it travels over a communication media with the addition of an
undesired signal.
Applications of Transmission Media in Computer Networks
Transmission media in computer networks are used to connect devices and
transfer data. Here are some common applications:
Switch(config)#int fa0/1
Switch(config-if)#switchport mode access
Switch(config-if) #switchport access Vlan 3
Switch(config)#int fa0/2
Switch(config-if)#switchport mode access
Switch(config-if) #switchport access Vlan 2
As seen, we have assigned Vlan 2 to fa0/0, fa0/2, and Vlan 3 to fa0/1.
VLANs offer several features and benefits, including:
Improved network security: VLANs can be used to separate network
traffic and limit access to specific network resources. This improves
security by preventing unauthorized access to sensitive data and network
resources.
Better network performance: By segregating network traffic into
smaller logical networks, VLANs can reduce the amount of broadcast
traffic and improve network performance.
Simplified network management: VLANs allow network administrators
to group devices together logically, rather than physically, which can
simplify network management tasks such as configuration,
troubleshooting, and maintenance.
Flexibility: VLANs can be configured dynamically, allowing network
administrators to quickly and easily adjust network configurations as
needed.
Cost savings: VLANs can help reduce hardware costs by allowing
multiple virtual networks to share a single physical network
infrastructure.
Scalability: VLANs can be used to segment a network into smaller, more
manageable groups as the network grows in size and complexity.
Some of the key features of VLANs include:
VLAN tagging: VLAN tagging is a way to identify and distinguish
VLAN traffic from other network traffic. This is typically done by adding
a VLAN tag to the Ethernet frame header.
VLAN membership: VLAN membership determines which devices are
assigned to which VLANs. Devices can be assigned to VLANs based on
port, MAC address, or other criteria.
VLAN trunking: VLAN trunking allows multiple VLANs to be carried
over a single physical link. This is typically done using a protocol such as
IEEE 802.1Q.
VLAN management: VLAN management involves configuring and
managing VLANs, including assigning devices to VLANs, configuring
VLAN tags, and configuring VLAN trunking.
Types of connections in VLAN -
There are three ways to connect devices on a VLAN, the type of connections are
based on the connected devices i.e. whether they are VLAN-aware(A device
that understands VLAN formats and VLAN membership) or VLAN-unaware(A
device that doesn't understand VLAN format and VLAN membership).
1. Trunk Link -
All connected devices to a trunk link must be VLAN-aware. All frames
on this should have a special header attached to it called tagged frames.
2. Access link -
It connects VLAN-unaware devices to a VLAN-aware bridge. All frames
on the access link must be untagged.
3. Hybrid link -
It is a combination of the Trunk link and Access link. Here both VLAN-
unaware and VLAN-aware devices are attached and it can have both
tagged and untagged frames.
Advantages -
Performance -
The network traffic is full of broadcast and multicast. VLAN reduces the
need to send such traffic to unnecessary destinations. e.g.-If the traffic is
intended for 2 users but as 10 devices are present in the same broadcast
domain, therefore, all will receive the traffic i.e. wastage of bandwidth
but if we make VLANs, then the broadcast or multicast packet will go to
the intended users only.
Formation of virtual groups -
As there are different departments in every organization namely sales,
finance etc., VLANs can be very useful in order to group the devices
logically according to their departments.
Security -
In the same network, sensitive data can be broadcast which can be
accessed by the outsider but by creating VLAN, we can control broadcast
domains, set up firewalls, restrict access. Also, VLANs can be used to
inform the network manager of an intrusion. Hence, VLANs greatly
enhance network security.
Flexibility -
VLAN provide flexibility to add, remove the number of host we want.
Cost reduction -
VLANs can be used to create broadcast domains which eliminate the
need for expensive routers.
By using Vlan, the number of small size broadcast domain can be
increased which are easy to handle as compared to a bigger broadcast
domain.
Disadvantages of VLAN
1. Complexity: VLANs can be complex to configure and manage,
particularly in large or dynamic cloud computing environments.
2. Limited scalability: VLANs are limited by the number of available
VLAN IDs, which can be a constraint in larger cloud computing
environments.
3. Limited security: VLANs do not provide complete security and can be
compromised by malicious actors who are able to gain access to the
network.
4. Limited interoperability: VLANs may not be fully compatible with all
types of network devices and protocols, which can limit their usefulness
in cloud computing environments.
5. Limited mobility: VLANs may not support the movement of devices or
users between different network segments, which can limit their
usefulness in mobile or remote cloud computing environments.
6. Cost: Implementing and maintaining VLANs can be costly, especially if
specialized hardware or software is required.
7. Limited visibility: VLANs can make it more difficult to monitor and
troubleshoot network issues, as traffic is isolated in different segments.
Real-Time Applications of VLAN
Virtual LANs (VLANs) are widely used in cloud computing environments to
improve network performance and security. Here are a few examples of real-
time applications of VLANs:
1. Voice over IP (VoIP) : VLANs can be used to isolate voice traffic from
data traffic, which improves the quality of VoIP calls and reduces the risk
of network congestion.
2. Video Conferencing : VLANs can be used to prioritize video traffic and
ensure that it receives the bandwidth and resources it needs for high-
quality video conferencing.
3. Remote Access : VLANs can be used to provide secure remote access to
cloud-based applications and resources, by isolating remote users from
the rest of the network.
4. Cloud Backup and Recovery : VLANs can be used to isolate backup
and recovery traffic, which reduces the risk of network congestion and
improves the performance of backup and recovery operations.
5. Gaming : VLANs can be used to prioritize gaming traffic, which ensures
that gamers receive the bandwidth and resources they need for a smooth
gaming experience.
6. IoT : VLANs can be used to isolate Internet of Things (IoT) devices from
the rest of the network, which improves security and reduces the risk of
network congestion.
Framing in Data Link Layer:-
Frames are the units of digital transmission, particularly in computer networks
and telecommunications. Frames are comparable to the packets of energy called
photons in the case of light energy. Frame is continuously used in Time Division
Multiplexing process.
Framing is a point-to-point connection between two computers or devices
consisting of a wire in which data is transmitted as a stream of bits. However,
these bits must be framed into discernible blocks of information. Framing is a
function of the data link layer. It provides a way for a sender to transmit a set of
bits that are meaningful to the receiver. Ethernet, token ring, frame relay, and
other data link layer technologies have their own frame structures. Frames have
headers that contain information such as error-checking codes.
At the data link layer, it extracts the message from the sender and provides it to
the receiver by providing the sender's and receiver's addresses. The advantage of
using frames is that data is broken up into recoverable chunks that can easily be
checked for corruption.
The process of dividing the data into frames and reassembling it is transparent
to the user and is handled by the data link layer.
Framing is an important aspect of data link layer protocol design because it
allows the transmission of data to be organized and controlled, ensuring that the
data is delivered accurately and efficiently.
Problems in Framing
Detecting start of the frame: When a frame is transmitted, every station
must be able to detect it. Station detects frames by looking out for a
special sequence of bits that marks the beginning of the frame i.e. SFD
(Starting Frame Delimiter).
How does the station detect a frame: Every station listens to link for
SFD pattern through a sequential circuit. If SFD is detected, sequential
circuit alerts station. Station checks destination address to accept or reject
frame.
Detecting end of frame: When to stop reading the frame.
Handling errors: Framing errors may occur due to noise or other
transmission errors, which can cause a station to misinterpret the frame.
Therefore, error detection and correction mechanisms, such as cyclic
redundancy check (CRC), are used to ensure the integrity of the frame.
Framing overhead: Every frame has a header and a trailer that contains
control information such as source and destination address, error
detection code, and other protocol-related information. This overhead
reduces the available bandwidth for data transmission, especially for
small-sized frames.
Framing incompatibility: Different networking devices and protocols
may use different framing methods, which can lead to framing
incompatibility issues. For example, if a device using one framing
method sends data to a device using a different framing method, the
receiving device may not be able to correctly interpret the frame.
Framing synchronization: Stations must be synchronized with each
other to avoid collisions and ensure reliable communication.
Synchronization requires that all stations agree on the frame boundaries
and timing, which can be challenging in complex networks with many
devices and varying traffic loads.
Framing efficiency: Framing should be designed to minimize the
amount of data overhead while maximizing the available bandwidth for
data transmission. Inefficient framing methods can lead to lower network
performance and higher latency.
Types of framing
There are two types of framing:
Let ED = "$" --> if data contains '$' anywhere, it can be escaped using '\
O' character.
--> if data contains '\O$' then, use '\O\O\O$'($ is escaped using \O and \O
is escaped using \O).
Techniques of Flow Control in Data Link Layer : There are basically two
types of techniques being developed to control the flow of data
Authentication Authorization
Authentication determines
While it determines What permission does
whether the person is user or
the user have?
not.
May give the shortest path. Always gives the shortest path.
Classful Addressing
Note:
IP addresses are globally managed by Internet Assigned Numbers
Authority (IANA) and Regional Internet Registries (RIR).
While finding the total number of host IP addresses, 2 IP addresses are
not counted and are therefore, decreased from the total count because the
first IP address of any network is the network number and whereas the
last IP address is reserved for broadcast IP.
Class A
Class B
IP address belonging to class B is assigned to networks that range from
medium-sized to large-sized networks.
The network ID is 16 bits long.
The host ID is 16 bits long.
The higher-order bits of the first octet of IP addresses of class B are always set
to 10. The remaining 14 bits are used to determine the network ID. The 16 bits
of host ID are used to determine the host in any network. The default subnet
mask for class B is 255.255.x.x. Class B has a total of:
214 = 16384 network address
216 - 2 = 65534 host address
IP addresses belonging to class B ranges from 128.0.0.0 – 191.255.255.255.
Class B
Class C
IP addresses belonging to class C are assigned to small-sized networks.
The network ID is 24 bits long.
The host ID is 8 bits long.
The higher-order bits of the first octet of IP addresses of class C is always set to
110. The remaining 21 bits are used to determine the network ID. The 8 bits of
host ID are used to determine the host in any network. The default subnet
mask for class C is 255.255.255.x. Class C has a total of:
221 = 2097152 network address
28 – 2 = 254 host address
IP addresses belonging to class C range from 192.0.0.0 – 223.255.255.255.
Class C
Class D
IP address belonging to class D is reserved for multi-casting. The higher-order
bits of the first octet of IP addresses belonging to class D is always set to 1110.
The remaining bits are for the address that interested hosts recognize.
Class D does not possess any subnet mask. IP addresses belonging to class D
range from 224.0.0.0 – 239.255.255.255.
Class D
Class E
IP addresses belonging to class E are reserved for experimental and research
purposes. IP addresses of class E range from 240.0.0.0 – 255.255.255.255. This
class doesn’t have any subnet mask. The higher-order bits of the first octet of
class E are always set to 1111.
Class E
Range of Special IP Addresses
169.254.0.0 – 169.254.0.16 : Link-local addresses
127.0.0.0 – 127.255.255.255 : Loop-back addresses
0.0.0.0 – 0.0.0.8: used to communicate within the current network.
Rules for Assigning Host ID
Host IDs are used to identify a host within a network. The host ID is assigned
based on the following rules:
Within any network, the host ID must be unique to that network.
A host ID in which all bits are set to 0 cannot be assigned because this
host ID is used to represent the network ID of the IP address.
Host ID in which all bits are set to 1 cannot be assigned because this host
ID is reserved as a broadcast address to send packets to all the hosts
present on that particular network.
Rules for Assigning Network ID
Hosts that are located on the same physical network are identified by the
network ID, as all host on the same physical network is assigned the same
network ID. The network ID is assigned based on the following rules:
The network ID cannot start with 127 because 127 belongs to the class A
address and is reserved for internal loopback functions.
All bits of network ID set to 1 are reserved for use as an IP broadcast
address and therefore, cannot be used.
All bits of network ID set to 0 are used to denote a specific host on the
local network and are not routed and therefore, aren’t used.
Structure of Classful Addressing
In the above table No. of networks for class A should be 127. (Network ID with
all 0 s is not considered)
Problems With Classful Addressing
The problem with this classful addressing method is that millions of class A
addresses are wasted, many of the class B addresses are wasted, whereas, the
number of addresses available in class C is so small that it cannot cater to the
needs of organizations. Class D addresses are used for multicast routing and are
therefore available as a single block only. Class E addresses are reserved.
Since there are these problems, Classful networking was replaced by Classless
Inter-Domain Routing (CIDR) in 1993. We will be discussing Classless
addressing in the next post.
The network ID is 24 bits long.
The host ID is 8 bits long.
221 = 2097152 network address
28 - 2 = 254 host address
Within any network, the host ID must be unique to that network.
Host ID in which all bits are set to 0 cannot be assigned because this host
ID is used to represent the network ID of the IP address.
Host ID in which all bits are set to 1 cannot be assigned because this host
ID is reserved as a broadcast address to send packets to all the hosts
present on that particular network.
The network ID cannot start with 127 because 127 belongs to the class A
address and is reserved for internal loopback functions.
All bits of network ID set to 1 are reserved for use as an IP broadcast
address and therefore, cannot be used.
All bits of network ID set to 0 are used to denote a specific host on the
local network and are not routed and therefore, aren't used.
Classful and Classless Addressing
Here is the main difference between Classful and Classless Addressing:
Classless addressing
In Classful addressing IP came to replace the
addresses are allocated classful addressing and
Basics
according to the classes- A to to handle the issue of
E. rapid exhaustion of IP
addresses.
(CIDR). (CIDR).
Troubleshooting and
problem detection are easy
Troubleshooting It is not as easy
than classless addressing
and Problem compared to classful
because of the division of
detection addressing.
network, host and subnet
parts in the address.
Network
Division of Host
Host
Address Subnet
Subnet
Class
224-239 Reserve for multitasking
D
Special IP Addresses
There are also some special-purpose IP addresses that don't follow the usual
structure:
Loopback Address:
o The loopback address 127.0.0.1 is used to test network
connectivity within the same device (i.e., sending data to yourself).
o Often called "localhost."
Broadcast Address:
o The broadcast address allows data to be sent to all devices in a
network. For a typical network with the IP range 192.168.1.0/24,
the broadcast address would be 192.168.1.255.
Multicast Address:
o Used to send data to a group of devices (multicast). For
example, 233.0.0.1 is a multicast address.
How to Look Up IP Addresses?
In Windows
1. Open the Command Prompt.
2. Type ipconfig and press Enter.
3. Look for your IP under your network connection.
On Mac
1. Open System Preferences > Network.
2. Select your active connection.
3. You’ll see your IP address in the connection details.
On iPhone
1. Go to Settings > Wi-Fi.
2. Tap the (i) icon next to your network.
3. Find your IP under "IP Address."
IP Address Security Threats
IP addresses are essential for connecting devices on the internet, but they also
come with various security risks. Understanding these threats can help you
protect your network and personal information more effectively. Here are some
common IP address security threats:
IP Spoofing: Hackers use this technique to bypass security measures,
launch attacks, or gain unauthorized access to systems. By pretending to
be a trusted IP address, attackers can trick networks into granting them
access or allowing malicious activities.
Distributed Denial of Service (DDoS) Attacks: This happens by
overloading a website or service with too much traffic. Many hacked
devices send lots of requests to a target all at once, making the website or
service crash. This means real users can’t access it which can cause
crashing of site, businesses to lose money and many more.
Man-in-the-Middle (MitM) Attacks: Eavesdropping or altering
messages between two people without letting them know is MitM attack.
Attackers intercept the communication between two parties and can steal
sensitive information like passwords or credit card details by targeting the
IP addresses involved.
Port Scanning: It is a technique used to identify open ports and services
running on a device's IP address. Hackers use port scanners to find
vulnerabilities in network services, which they can then exploit to gain
unauthorized access or deploy malware. Regularly monitoring and
securing open ports is essential to prevent such attacks.
How to Protect and Hide Your IP Address?
VPN (Virtual Private Network): A VPN hides your IP by masking it
with the VPN server’s IP, giving you privacy. Your internet traffic passes
through the VPN server, masking your real IP address with the server’s
IP. This makes it difficult for others to track your online activities or
identify your location.
Proxy Server: Routes your data through a different server, hiding your
real IP. When you use a proxy, your requests go through the proxy server,
which hides your real IP address by replacing it with its own.
Tor Browser: Encrypts and bounces your data around multiple servers
for anonymity. This multi-layered routing makes it extremely difficult to
trace your IP address or monitor your online activities.
Enable Your Firewall: A firewall is a security system that monitors and
controls incoming and outgoing network traffic. It can block unauthorized
access to your device, making it harder for attackers to target your IP
address.
IPv4 Datagram Header:-
IP stands for Internet Protocol and v4 stands for Version Four (IPv4). IPv4
was the primary version brought into action for production within the
ARPANET in 1983. IP version four addresses are 32-bit integers which will
be expressed in decimal notation. In this article, we will discuss about IPv4
datagram header.
IPv4 is a connectionless protocol used for packet-switched
networks. Internet Protocol Version 4 (IPv4) is the fourth revision of the
Internet Protocol and a widely used protocol in data communication over
different kinds of networks. IPv4 is a connectionless protocol used in packet-
switched layer networks, such as Ethernet. It provides a logical connection
between network devices by providing identification for each device. There
are many ways to configure IPv4 with all kinds of devices – including
manual and automatic configurations – depending on the network type. IPv4
uses 32-bit addresses for Ethernet communication in five classes: A, B, C, D
and E. Classes A, B, and C have a different bit length for addressing the
network host. Class D addresses are reserved for multicasting, while class E
addresses are reserved for military purposes. IPv4 uses 32-bit (4-byte)
addressing, which gives 232 addresses. IPv4 addresses are written in the dot-
decimal notation, which comprises four octets of the address expressed
individually in decimal and separated by periods, for instance, 192.168.1.5.
Characteristics of IPv4
IPv4 could be a 32-Bit IP Address.
IPv4 could be a numeric address, and its bits are separated by a dot.
The number of header fields is twelve and the length of the header field is
twenty.
It has Unicast, broadcast, and multicast style of addresses.
IPv4 supports VLSM (Virtual Length Subnet Mask).
IPv4 uses the Post Address Resolution Protocol to map to the MAC
address.
RIP may be a routing protocol supported by the routed daemon.
Networks ought to be designed either manually or with DHCP.
Packet fragmentation permits from routers and causing host.
IPv4 Datagram Header
VERSION: Version of the IP protocol (4 bits), which is 4 for IPv4
HLEN: IP header length (4 bits), which is the number of 32 bit words in
the header. The minimum value for this field is 5 and the maximum is
15.
Type of service: Low Delay, High Throughput, Reliability (8 bits)
Total Length: Length of header + Data (16 bits), which has a minimum
value 20 bytes and the maximum is 65,535 bytes.
Identification: Unique Packet Id for identifying the group of fragments
of a single IP datagram (16 bits)
Flags: 3 flags of 1 bit each : reserved bit (must be zero), do not fragment
flag, more fragments flag (same order)
Fragment Offset: Represents the number of Data Bytes ahead of the
particular fragment in the particular Datagram. Specified in terms of
number of 8 bytes, which has the maximum value of 65,528 bytes.
Time to live: Datagram’s lifetime (8 bits), It prevents the datagram to
loop through the network by restricting the number of Hops taken by a
Packet before delivering to the Destination.
Protocol: Name of the protocol to which the data is to be passed (8 bits)
Header Checksum: 16 bits header checksum for checking errors in the
datagram header
Source IP address: 32 bits IP address of the sender
Destination IP address: 32 bits IP address of the receiver
Option: Optional information such as source route, record route. Used by
the Network administrator to check whether a path is working or not.
Address
32-bit address 128-bit address
Length
Decimal format
Address (e.g., Hexadecimal format (e.g., 2001:0db8::1)
Format 192.168.0.1)
Manual and
DHCP Auto-configuration and renumbering supported
Configuration configuration
Feature IPv4 IPv6
End-to-end
Connection integrity is End-to-end integrity is achievable
Integrity unachievable
No built-in
security;
IPSec is built-in for encryption and
external tools
authentication
like IPSec
Security needed
Performed by
sender and Performed only by the sender
Fragmentation routers
Checksum
Present Not present
Field
Transmission Supports
Uses multicast and anycast; no broadcast
Scheme broadcast
Variable: 20–60
Fixed: 40 bytes
Header Size bytes
Can be
converted to Not all IPv6 addresses can be converted to IPv4
Conversion IPv6
4 fields
separated by 8 fields separated by colons (:)
Field Structure dots (.)
D, E)
Supports
Variable Length
Does not support VLSM
Subnet Mask
VLSM Support (VLSM)
Difference Between
Private and Public IP Addresses
Difference Between Private and Public IP Addresses
Range:
10.0.0.0 – 10.255.255.255, Range: Besides private IP
172.16.0.0 – 172.31.255.255, addresses, the rest are public.
192.168.0.0 – 192.168.255.255
What is Routing?:-
The process of choosing a path across one or more networks is known as
Network Routing. Nowadays, individuals are more connected on the internet
and hence, the need to use Routing Communication is essential.
Routing chooses the routes along which Internet Protocol (IP) packets get from
their source to their destination in packet-switching networks. This article will
discuss the details of the Routing Process along with its different types and
working principles.
What is a Router?
Routers are specialized pieces of network hardware that make these judgments
about Internet routing. It is a networking device that forwards data packets
between computer networks. Also, it helps to direct traffic based on the
destination IP address. It ensures that data reaches its intended destination.
As the router connects different networks, it manages data traffic between them.
The Router operates at Layer 3 (the network layer) of the OSI Model. It is also
responsible for determining the best path for data to travel from one network to
another.
What is Routing?
Routing refers to the process of directing a data packet from one node to
another. It is an autonomous process handled by the network devices to direct a
data packet to its intended destination. Note that, the node here refers to
a network device called - 'Router'.
Routing is a crucial mechanism that transmits data from one location to another
across a network (Network type could be any like LAN, WAN, or MAN). The
process of routing involves making various routing decisions to ensure reliable
& efficient delivery of the data packet by finding the shortest path using various
routing metrics which we will be discussing in this article.
Routing of a data packet is done by analyzing the destination IP Address of the
packet. Look at the below image:
Routing of packets
The Source Node (Sender) sends the data packet on the network,
embedding the IP in the header of the data packet.
The nearest router receives the data packet, and based on some metrics,
further routes the data packet to other routers.
Step 2 occurs recursively till the data packet reaches its intended
destination.
Note: There are limits to how many hop counts a packet can do if it is
exceeded, the packet is considered to be lost.
What are Different Types of Routing?
Routing is typically of 3 types, each serving its purpose and offering different
functionalities.
Types of Routing
1. Static Routing
Static routing is also called as "non-adaptive routing". In this, routing
configuration is done manually by the network administrator. Let's say for
example, we have 5 different routes to transmit data from one node to another,
so the network administrator will have to manually enter the routing
information by assessing all the routes.
A network administrator has full control over the network, routing the
data packets to their concerned destinations
Routers will route packets to the destination configured manually by the
network administrator.
Although this type of routing gives fine-grained control over the routes, it
may not be suitable for large-scale enterprise networks.
2. Dynamic Routing
Dynamic Routing is another type of routing in which routing is an autonomous
procedure without any human intervention. Packets are transmitted over a
network using various shortest-path algorithms and pre-determined metrics.
This type of routing is majorly preferred in modern networks as it offers more
flexibility and versatile functionality.
It is also known as adaptive routing.
In this, the router adds new routes to the routing table based on any
changes made in the topology of the network.
The autonomous procedure of routing helps in automating every routing
operation from adding to removing a route upon updates or any changes
made to the network.
3. Default Routing
Default Routing is a routing technique in which a router is configured to
transmit packets to a default route that is, a gateway or next-hop device if no
specific path is defined or found. It is commonly used when the network has a
single exit point. The IP Router has the following address as the default route:
0.0.0.0/0.
What is the Working Principle of Routing?
Routing works by finding the shortest path from the source node to the
destination node across a network. Here's the step-by-step working of routing:
Step 1: Communication initiation
The first step that typically happens is, one node (client or server) initiates a
communication across a network using HTTP protocols.
Step 2: Data Packets
The source device now breaks a big chunk of information into small data
packets for reliable and efficient transmission. This process is called de-
assembling and encapsulating the data payload. Then each data packet is labeled
with the destination node's IP address.
Step 3: Routing Table
The Routing table is a logical data structure used to store the IP addresses and
relevant information regarding the nearest routers. The source node then looks
up the IP addresses of all the nodes that can transmit the packet to its destination
selects the shortest path using the shortest path algorithm and then routes
accordingly.
The Routing Table is stored in a router, a network device that determines the
shortest path and routes the data packet.
Step 4: Hopping procedure
In the procedure or routing, the data packet will undergo many hops across
various nodes in a network till it reaches its final destination node. Hop count is
defined as the number of nodes required to traverse through to finally reach the
intended destination node.
This hopping procedure has certain criteria defined for every data packet, there's
a limited number of hops a packet can take if the packet exceeds that, then it's
considered to be lost and is retransmitted.
Step 5: Reaching the destination node
Once all the data packets reach their intended destination node, they re-
assemble and transform into complete information that was sent by the sender
(source node). The receiver will perform various error-checking mechanisms to
verify the authenticity of the data packets.
Overall, the data packet will be transmitted over the least hop-count path as well
as the path on which there is less traffic to prevent packet loss.
Working of Routing
In the above image, we have 3 major components
Sender
Receiver
Routers
The shortest path is highlighted in red, the path with the least hop count. As we
can see, there are multiple paths from source to node but if all the appropriate
metrics are satisfied, the data packets will be transmitted through the shortest
path (highlighted in red).
What are the Main Routing Protocols?
RIP (Routing Information Protocol): It is a distance-vector protocol
that uses hop count as a metric.
OSPF (Open Shortest Path First): OSPF is a link-state protocol that
finds the shortest path using the Dijkstra algorithm.
EIGRP (Enhanced Interior Gateway Routing Protocol): It is a hybrid
protocol that combines features of distance-vector and link-state.
BGP (Border Gateway Protocol): It is a path-vector protocol that is
used for routing between different autonomous systems on the internet.
IS-IS (Intermediate System to Intermediate System): It is a link-state
protocol that is primarily used in large networks like ISPs.
What are Different Routing Metrics?
The purpose of routing protocols is to learn about all the available paths to route
data packets, build routing tables, and make routing decisions based on
specified metrics. There are two primary types of routing protocols rest of them
ideate from these two only.
1. Distance Vector Routing
In this type of routing protocol, all the nodes that are a part of the network
advertise their routing table to their adjacent nodes (nodes that are directly
connected) at regular intervals. With each router getting updated at regular
intervals, it may take time for all the nodes to have the same accurate network
view.
Uses fixed length sub-net, not suitable for scaling.
Algorithm used: Bellman Ford Algorithm to find the shortest path.
2. Link State Routing
Link State Routing is another type of dynamic routing protocol in which routes
advertise their updated routing tables only when some new updates are added.
This results in the effective use of bandwidth. All the routers keep exchanging
information dynamically regarding different links such as cost and hop count to
find the best possible path.
Uses a variable length subnet mask, which is scalable and uses addressing
more effectively.
The algorithm used: Dijkstra's Algorithm to find the shortest path.
Let's look at the metrics used to measure the cost of travel from one node to
another:-
1. Hop Count: Hop count refers to the number of nodes a data packet has to
traverse to reach its intended destination. Transmitting from one node to
another node counts as 1 - hop count. The goal is to minimize the hop
count and find the shortest path.
2. Bandwidth Consumption: Bandwidth is the ability of a network to
transmit data typically measured in Kbps (Kilobits per second), Mbps
(Megabits per second), or Gbps (Gigabits per second). The bandwidth
depends on several factors such as - the volume of data, traffic on a
network, network speed, etc. Routing decision is made in a way to ensure
efficient bandwidth consumption.
3. Delay: Delay is the time it takes for a data packet to travel from the
source node to its destination node. There are different types of delay
such as - propagation delay, transmission delay, and queuing delay.
4. Load: Load refers to the network traffic on a certain path in the context
of routing. A data packet will be routed to the path with a lesser load so
that it reaches its destination in the specified time.
5. Reliability: Reliability refers to the assured delivery of the data packet to
its intended destination although there are certain other factors, the data
packet is routed in such a way that it reaches its destination. The stability
and availability of the link in the network are looked over before routing
the data packet from a specific path.
What are the Advantages of Routing?
Overall routing can be done in various ways its important to know the
requirements and use the one that fits right for our specific needs, hence
automated routing is typically preferred as the routing of packets is done
by the algorithms defined and the manually configurable routing can give
us a fine-grained control over the network.
Routing is a highly scalable operation for transmitting data that is, in a
large-scale enterprise network it becomes crucial to manage information
related to all the nodes that may be sharing sensitive and confidential
information regarding the organization.
Load Balancing is also one of the crucial aspects taken care of by routing
data packets off the routes that are generally busy as sending data through
those routes will only put our data at risk of getting lost.
What are the Disadvantages of Routing?
Every type of routing comes with some pros and cons here are some of the
disadvantages for specific types of routing :
Static Routing: This type of routing is appropriate only for smaller
networks where the network administrator has an accurate view of the
network & good knowledge of topology else it might raise some security
concerns and complex configuration issues.
Dynamic Routing: Everything is done automatically by the algorithms,
providing less control over the network that may not be suitable for every
kind of network. It is also computationally expensive and consumes more
bandwidth.
Default Routing: The path on which the packets are to be transmitted by
default is configurable but can be a complex procedure if not defined
clearly.
Network Layer Protocols:-
Network Layer is responsible for the transmission of data or communication
from one host to another host connected in a network. Rather than describing
how data is transferred, it implements the technique for efficient transmission.
In order to provide efficient communication protocols are used at the network
layer. The data is being grouped into packets or in the case of extremely large
data it is divided into smaller sub packets. Each protocol used has specific
features and advantages. The below article covers in detail the protocols used at
the network layer.
Functions of Network Layer
The network layer is responsible for providing the below-given tasks:
Logical Addressing: Each device on the network needs to be identified
uniquely. Therefore network layer provides an addressing scheme to
identify the device. It places the IP address of every sender and the
receiver in the header. This header consists of the network ID and host ID
of the network.
Host-to-host Delivery of Data: The network layer ensures that the
packet is being delivered successfully from the sender to the receiver.
This layer makes sure that the packet reaches the intended recipient only.
Fragmentation: In order to transmit the larger data from sender to
receiver, the network layer fragments it into smaller packets.
Fragmentation is required because every node has its own fixed capacity
for receiving data.
Congestion Control: Congestion is defined as a situation where the
router is not able to route the packets property which results in
aggregation of packets in the network. Congestion occurs when a large
amount of packets are flooded in the network. Therefore network layer
controls the congestion of data packets in the network.
Routing and Forwarding: Routing is the process that decides the route
for transmission of packets from sender to receiver. It mostly chooses the
shortest path between the sender and the receiver. Routing protocols that
are mostly used are path vector, distance vector routing, link state routing,
etc.
Network Layer Protocols
There are various protocols used in the network layer. Each protocol is used for
a different task. Below are the protocols used in the network layer:
Protocols at
each Layer
1. IP (Internet Protocol)
IP stands for Internet Protocol. Internet Protocol helps to uniquely identify each
device on the network. Internet protocol is responsible for transferring the data
from one node to another node in the network. Internet protocol is a
connectionless protocol therefore it does not guarantee the delivery of data. For
the successful delivery higher level protocols such as TCP are used to guarantee
the data transmission. The Internet Protocol is divided in two types. They are:
IPv4: IPv4 provides with the 32 bit address scheme. IPv4 addressing has
four numeric fields and are separated by dot. IPv4 can be configured
either using DHCP or manually. IPv4 does not provide with more security
features as it does not support authentication or encryption techniques.
IPv4 is further divided into five classes as Class A, Class B, Class C,
Class D and Class E.
IPv6: IPv6 is the most recent version of IP. If provided with a 128 bit
addressing scheme. IP address has eight fields that are separated by colon,
and these fields are alphanumeric. The IPv6 address is represented in
hexadecimal. IPv6 provides with more security features such as
authentication and encryption. IPv6 supports end-to-end connection
integrity. IPv6 provides with more range of IP address as compared to
IPv4.
ARP
RARP
4. ICMP
ICMP stands for Internet Control Message Protocol. ICMP is a part of IP
protocol suite. ICMP is an error reporting and network diagnostic protocol.
Feedback in the network is reported to the designated host. Meanwhile, if any
kind of error occur it is then reported to ICMP. ICMP protocol consists of many
error reporting and diagnostic messages. ICMP protocol handles various kinds
of errors such as time exceeded, redirection, source quench, destination
unreachable, parameter problems etc. The messages in ICMP are divided into
two types. They are given below:
Error Message: Error message states about the issues or problems that are
faced by the host or routers during processing of IP packet.
Query Message: Query messages are used by the host in order to get
information from a router or another host.
How Does ICMP Work?
The main and most significant protocol in the IP suite is called ICMP.
However, unlike TCP and UDP, ICMP is a connectionless protocol,
meaning it doesn't require a connection to be established with the target
device in order to transmit a message.
TCP and ICMP operate differently from one another; TCP is a
connection-oriented protocol, while ICMP operates without a connection.
Every time a connection is made prior to a message being sent, a TCP
Handshake is required of both devices.
Datagrams including an IP header containing ICMP data are used to
transmit ICMP packets. An independent data item like a packet is
comparable to an ICMP datagram.
ICMP
5. IGMP
IGMP stands for Internet Group Message Protocol. IGMP is a multicasting
communication protocol. It utilizes the resources efficiently while broadcasting
the messages and data packets. IGMP is also a protocol used by TCP/IP. Other
hosts connected in the network and routers makes use of IGMP for multicasting
communication that have IP networks. In many networks multicast routers are
used in order to transmit the messages to all the nodes. Multicast routers
therefore receives large number of packets that needs to be sent. But to
broadcast this packets is difficult as it would increase the overall network load.
Therefore IGMP helps the multicast routers by addressing them while
broadcasting. As multicast communication consists of more than one senders
and receivers the Internet Group Message Protocol is majorly used in various
applications such as streaming media, web conference tools, games, etc.
How Does IGMP Work?
Devices that can support dynamic multicasting and multicast groups can
use IGMP.
The host has the ability to join or exit the multicast group using these
devices. It is also possible to add and remove customers from the group
using these devices.
The host and local multicast router use this communication protocol.
Upon creation of a multicast group, the packet's destination IP address is
changed to the multicast group address, which falls inside the class D IP
address range.
6. Transport Layer:-
Transport Layer in OSI Model
The transport layer, or layer 4 of the OSI model, controls network traffic
between hosts and end systems to guarantee full data flows.
It is positioned between the network and session layers in the OSI paradigm.
The data packets must be taken and sent to the appropriate machine by the
network layer. After that, the transport layer receives the packets, sorts them,
and looks for faults. Subsequently, it directs them to the session layer of the
appropriate computer program. Now, the properly structured packets are
used by the session layer to hold the data for the application.
Functions of Transport Layer
The Transport Layer is responsible for end-to-end communication of data
packets. It provides a number of important functions that are responsible for
reliable, efficient, and organized data transfer between host systems in a
networked environment.
The primary functions of the Transport Layer are:
Working of Transport Layer
Communication between end systems is dependable and effective thanks to
the Transport Layer. Apart from regulating flow and accommodating
numerous applications concurrently, it guarantees data delivery in a manner
that guarantees accuracy and minimises mistakes. It accomplishes this by
utilising a collection of methods and protocols that provide data transport.
TCP UDP
An acknowledgment segment is
No acknowledgment segment.
present.
UDP Segment
While the TCP header can range from 20 to 60 bytes, the UDP header is a fixed,
basic 8 bytes. All required header information is contained in the first 8 bytes,
with data making up the remaining portion. Because UDP port number fields
are 16 bits long, the range of possible port numbers is defined as 0 to 65535,
with port 0 being reserved.
UDP
Source Port: Source Port is a 2 Byte long field used to identify the port
number of the source.
Destination Port: This 2-byte element is used to specify the packet's
destination port.
Length: The whole length of a UDP packet, including the data and
header. The field has sixteen bits.
Cheksum: The checksum field is two bytes long. The data is padded with
zero octets at the end (if needed) to create a multiple of two octets. It is
the 16-bit one's complement of the one's complement sum of the UDP
header, the pseudo-header containing information from the IP header, and
the data.
Advantages of UDP
UDP also provides multicast and broadcast transmission of data.
UDP protocol is preferred more for small transactions such as DNS
lookup.
It is a connectionless protocol, therefore there is no compulsion to have a
connection-oriented network.
UDP provides fast delivery of messages.
Disadvantages of UDP
In UDP protocol there is no guarantee that the packet is delivered.
UDP protocol suffers from worse packet loss.
UDP protocol has no congestion control mechanism.
UDP protocol does not provide the sequential transmission of data.
2. TCP
TCP stands for Transmission Control Protocol. TCP protocol provides transport
layer services to applications. TCP protocol is a connection-oriented protocol. A
secured connection is being established between the sender and the receiver. For
a generation of a secured connection, a virtual circuit is generated between the
sender and the receiver. The data transmitted by TCP protocol is in the form of
continuous byte streams. A unique sequence number is assigned to each byte.
With the help of this unique number, a positive acknowledgment is received
from receipt. If the acknowledgment is not received within a specific period the
data is retransmitted to the specified destination.
TCP Segment
A TCP segment's header may have 20–60 bytes. The options take about 40
bytes. A header consists of 20 bytes by default, although it can contain up to 60
bytes.
Source Port Address: The port address of the programme sending the
data segment is stored in the 16-bit field known as the source port
address.
Destination Port Address: The port address of the application running
on the host receiving the data segment is stored in the destination port
address, a 16-bit field.
Sequence Number: The sequence number, or the byte number of the first
byte sent in that specific segment, is stored in a 32-bit field. At the
receiving end, it is used to put the message back together once it has been
received out of sequence.
Acknowledgement Number : The acknowledgement number, or the byte
number that the recipient anticipates receiving next, is stored in a 32-bit
field called the acknowledgement number. It serves as a confirmation that
the earlier bytes were successfully received.
Header Length (HLEN): This 4-bit field stores the number of 4-byte
words in the TCP header, indicating how long the header is. For example,
if the header is 20 bytes (the minimum length of the TCP header), this
field will store 5 because 5 x 4 = 20, and if the header is 60 bytes (the
maximum length), it will store 15 because 15 x 4 = 60. As a result, this
field's value is always between 5 and 15.
Control flags: These are six 1-bit control bits that regulate flow control,
method of transfer, connection abortion, termination, and establishment.
They serve the following purposes:
o Urgent: This pointer is legitimate
o ACK: The acknowledgement number (used in cumulative
acknowledgement cases) is valid.
o PSH: Push request
o RST: Restart the link.
o SYN: Sequence number synchronisation
o FIN: Cut off the communication
o Window size: This parameter provides the sender TCP's window
size in bytes.
Checksum: The checksum for error control is stored in this field. Unlike
UDP, it is required for TCP.
Urgent pointer: This field is used to point to data that must urgently
reach the receiving process as soon as possible. It is only valid if the
URG control flag is set. To obtain the byte number of the final urgent
byte, the value of this field is appended to the sequence number.
Advantages of TCP
TCP supports multiple routing protocols.
TCP protocol operates independently of that of the operating system.
TCP protocol provides the features of error control and flow control.
TCP provides a connection-oriented protocol and provides the delivery of
data.
Disadvantages of TCP
TCP protocol cannot be used for broadcast or multicast transmission.
TCP protocol has no block boundaries.
No clear separation is being offered by TCP protocol between its
interface, services, and protocols.
In TCP/IP replacement of protocol is difficult.
3. SCTP
SCTP stands for Stream Control Transmission Protocol. SCTP is a connection-
oriented protocol. Stream Control Transmission Protocol transmits the data from
sender to receiver in full duplex mode. SCTP is a unicast protocol that provides
with point to point-to-point connection and uses different hosts for reaching the
destination. SCTP protocol provides a simpler way to build a connection over a
wireless network. SCTP protocol provides a reliable transmission of data. SCTP
provides a reliable and easier telephone conversation over the internet. SCTP
protocol supports the feature of multihoming ie. it can establish more than one
connection path between the two points of communication and does not depend
on the IP layer. SCTP protocol also ensures security by not allowing the half-
open connections.
Advantages of SCTP
SCTP provides a full duplex connection. It can send and receive the data
simultaneously.
SCTP protocol possesses the properties of both TCP and UDP protocol.
SCTP protocol does not depend on the IP layer.
SCTP is a secure protocol.
Disadvantages of SCTP
To handle multiple streams simultaneously the applications need to be
modified accordingly.
The transport stack on the node needs to be changed for the SCTP
protocol.
Modification is required in applications if SCTP is used instead of TCP or
UDP protocol.
What is TCP (Transmission Control Protocol)?:-
Transmission Control Protocol (TCP) is a connection-oriented
protocol for communications that helps in the exchange of messages
between different devices over a network. It is one of the main protocols
of the TCP/IP suite. In OSI model, it operates at the transport layer(Layer
4). It lies between the Application and Network Layers which are used in
providing reliable delivery services. The Internet Protocol (IP), which
establishes the technique for sending data packets between computers,
works with TCP.
TCP establishes a reliable connection between sender and receiver using
the three-way handshake (SYN, SYN-ACK, ACK) and it uses a four-
step handshake (FIN, ACK, FIN, ACK) to close connections properly.
It ensures error-free, in-order delivery of data packets.
It uses acknowledgments (ACKs) to confirm receipt.
It prevents data overflow by adjusting the data transmission rate
according to the receiver’s buffer size.
It prevents network congestion using algorithms like Slow Start,
Congestion Avoidance, Fast Retransmit, and Fast Recovery.
TCP header uses checksum to detect corrupted data and requests
retransmission if needed.
It is used in applications requiring reliable and ordered data transfer,
such as web browsing, email, and remote login.
Internet Protocol (IP)
Internet Protocol (IP) is a method that is useful for sending data from one
device to another from all over the internet. It is a set of rules governing
how data is sent and received over the internet. It is responsible for
addressing and routing packets of data so they can travel from the sender
to the correct destination across multiple networks. Every device contains
a unique IP Address that helps it communicate and exchange data across
other devices present on the internet.
Working of Transmission Control Protocol (TCP)
Transmission Control Protocol (TCP) model breaks down the data into
small bundles and afterward reassembles the bundles into the original
message on the opposite end to make sure that each message reaches its
target location intact. Sending the information in little bundles of
information makes it simpler to maintain efficiency as opposed to sending
everything in one go.
After a particular message is broken down into bundles, these bundles
may travel along multiple routes if one route is jammed but the
destination remains the same.
TCP
For Example: When a user requests a web page on the internet,
somewhere in the world, the server processes that request and sends back
an HTML Page to that user. The server makes use of a protocol called the
HTTP Protocol. The HTTP then requests the TCP layer to set the required
connection and send the HTML file.
Now, the TCP breaks the data into small packets and forwards it toward
the Internet Protocol (IP) layer. The packets are then sent to the
destination through different routes.
The TCP layer in the user's system waits for the transmission to get
finished and acknowledges once all packets have been received.
Features of TCP
Some of the most prominent features of Transmission control protocol are
mentioned below.
Segment Numbering System: TCP keeps track of the segments being
transmitted or received by assigning numbers to each and every single
one of them. A specific Byte Number is assigned to data bytes that are to
be transferred while segments are assigned sequence numbers.
Acknowledgment Numbers are assigned to received segments.
Connection Oriented: It means sender and receiver are connected to
each other till the completion of the process. The order of the data is
maintained i.e. order remains same before and after transmission.
Full Duplex: In TCP data can be transmitted from receiver to the sender
or vice - versa at the same time. It increases efficiency of data flow
between sender and receiver.
Flow Control: Flow control limits the rate at which a sender transfers
data. This is done to ensure reliable delivery. The receiver continually
hints to the sender on how much data can be received (using a sliding
window).
Error Control: TCP implements an error control mechanism for reliable
data transfer. Error control is byte-oriented. Segments are checked for
error detection. Error Control includes - Corrupted Segment & Lost
Segment Management, Out-of-order segments, Duplicate segments, etc.
Congestion Control: TCP takes into account the level of congestion in
the network. Congestion level is determined by the amount of data sent
by a sender.
Advantages of TCP
It is a reliable protocol.
It provides an error-checking mechanism as well as one for recovery.
It gives flow control.
It makes sure that the data reaches the proper destination in the exact
order that it was sent.
It is a well-documented and widely implemented protocol, maintained by
standards organizations like the IETF (Internet Engineering Task Force).
It works in conjunction with IP (Internet Protocol) to establish
connections between devices on a network.
Disadvantages of TCP
TCP is made for Wide Area Networks, thus its size can become an issue
for small networks with low resources.
TCP runs several layers so it can slow down the speed of the network.
It is not generic in nature. It cannot represent any protocol stack other
than the TCP/IP suite. E.g., it cannot work with a Bluetooth connection.
No modifications since their development around 30 years ago.
User Datagram Protocol (UDP):-
User Datagram Protocol (UDP) is a Transport Layer protocol. UDP is a part of
the Internet Protocol suite, referred to as UDP/IP suite. Unlike TCP, it is
an unreliable and connectionless protocol. So, there is no need to establish a
connection before data transfer. The UDP helps to establish low-latency and
loss-tolerating connections over the network. The UDP enables process-to-
process communication.
What is User Datagram Protocol?
User Datagram Protocol (UDP) is one of the core protocols of the Internet
Protocol (IP) suite. It is a communication protocol used across the internet for
time-sensitive transmissions such as video playback or DNS lookups . Unlike
Transmission Control Protocol (TCP), UDP is connectionless and does not
guarantee delivery, order, or error checking, making it a lightweight and
efficient option for certain types of data transmission.
UDP Header
UDP header is an 8-byte fixed and simple header, while for TCP it may vary
from 20 bytes to 60 bytes. The first 8 Bytes contain all necessary header
information and the remaining part consists of data. UDP port number fields are
each 16 bits long, therefore the range for port numbers is defined from 0 to
65535; port number 0 is reserved. Port numbers help to distinguish different
user requests or processes.
UDP Header
Source Port: Source Port is a 2 Byte long field used to identify the port
number of the source.
Destination Port: It is a 2 Byte long field, used to identify the port of the
destined packet.
Length: Length is the length of UDP including the header and the data. It
is a 16-bits field.
Checksum: Checksum is 2 Bytes long field. It is the 16-bit one's
complement of the one's complement sum of the UDP header, the pseudo-
header of information from the IP header, and the data, padded with zero
octets at the end (if necessary) to make a multiple of two octets.
Notes - Unlike TCP, the Checksum calculation is not mandatory in UDP. No
Error control or flow control is provided by UDP. Hence UDP depends on IP
and ICMP for error reporting. Also UDP provides port numbers so that is can
differentiate between users requests.
Applications of UDP
Used for simple request-response communication when the size of data is
less and hence there is lesser concern about flow and error control.
It is a suitable protocol for multicasting as UDP supports packet
switching.
UDP is used for some routing update protocols like RIP(Routing
Information Protocol).
Normally used for real-time applications which can not tolerate uneven
delays between sections of a received message.
VoIP (Voice over Internet Protocol) services, such as Skype and
WhatsApp, use UDP for real-time voice communication. The delay in
voice communication can be noticeable if packets are delayed due to
congestion control, so UDP is used to ensure fast and efficient data
transmission.
DNS (Domain Name System) also uses UDP for its query/response
messages. DNS queries are typically small and require a quick response
time, making UDP a suitable protocol for this application.
DHCP (Dynamic Host Configuration Protocol) uses UDP to dynamically
assign IP addresses to devices on a network. DHCP messages are
typically small, and the delay caused by packet loss or retransmission is
generally not critical for this application.
Following implementations uses UDP as a transport layer protocol:
o Trace Route
o Record Route
o Timestamp
UDP takes a datagram from Network Layer , attaches its header, and
sends it to the user. So, it works fast.
TCP vs UDP
UDP is the
Datagram-oriented
protocol. This is
because there is no
TCP is a connection-oriented overhead for opening
protocol. Connection orientation a connection,
means that the communicating maintaining a
devices should establish a connection, or
connection before transmitting data terminating a
and should close the connection connection. UDP is
after transmitting the data. efficient for
broadcast and
multicast types of
network
Type of Service transmission.
Error checking TCP provides extensive error- UDP has only the
mechanism checking mechanisms. It is because basic error-checking
Transmission Control Protocol User Datagram
Basis (TCP) Protocol (UDP)
There is no
Sequencing of data is a feature of sequencing of data in
Transmission Control Protocol UDP. If the order is
(TCP). this means that packets required, it has to be
arrive in order at the receiver. managed by the
Sequence application layer.
UDP is faster,
TCP is comparatively slower than
simpler, and more
UDP.
Speed efficient than TCP.
There is no
retransmission of lost
Retransmission of lost packets is
packets in the User
possible in TCP, but not in UDP.
Datagram Protocol
Retransmission (UDP).
handshake
UDP supports
TCP doesn’t support Broadcasting.
Broadcasting Broadcasting.
UDP is used
TCP is used by HTTP, by DNS, DHCP,
HTTPs , FTP , SMTP and Telnet . TFTP, SNMP , RIP,
Protocols and VoIP.
Advantages of UDP
Speed: UDP is faster than TCP because it does not have the overhead of
establishing a connection and ensuring reliable data delivery.
Lower latency: Since there is no connection establishment, there is lower
latency and faster response time.
Simplicity: UDP has a simpler protocol design than TCP, making it
easier to implement and manage.
Broadcast support: UDP supports broadcasting to multiple recipients,
making it useful for applications such as video streaming and online
gaming.
Smaller packet size: UDP uses smaller packet sizes than TCP, which can
reduce network congestion and improve overall network performance.
User Datagram Protocol (UDP) is more efficient in terms of both latency
and bandwidth.
Disadvantages of UDP
No reliability: UDP does not guarantee delivery of packets or order of
delivery, which can lead to missing or duplicate data.
No congestion control: UDP does not have congestion control, which
means that it can send packets at a rate that can cause network
congestion.
Vulnerable to attacks: UDP is vulnerable to denial-of-service attacks ,
where an attacker can flood a network with UDP packets, overwhelming
the network and causing it to crash.
Limited use cases: UDP is not suitable for applications that require
reliable data delivery, such as email or file transfers, and is better suited
for applications that can tolerate some data loss, such as video streaming
or online gaming.
How is UDP used in DDoS attacks?
A UDP flood attack is a type of Distributed Denial of Service (DDoS) attack
where an attacker sends a large number of User Datagram Protocol
(UDP) packets to a target port.
UDP Protocol : Unlike TCP, UDP is connectionless and doesn’t require a
handshake before data transfer. When a UDP packet arrives at a server, it
checks the specified port for listening applications. If no app is found, the
server sends an ICMP “destination unreachable” packet to the
supposed sender (usually a random bystander due to spoofed IP
addresses).
Attack Process :
o The attacker sends UDP packets with spoofed IP sender addresses
to random ports on the target system.
o The server checks each incoming packet’s port for a listening
application (usually not found due to random port selection).
o The server sends ICMP “destination unreachable” packets to the
spoofed sender (random bystanders).
o The attacker floods the victim with UDP data packets,
overwhelming its resources.
Mitigation : To protect against UDP flood attacks, monitoring network
traffic for sudden spikes and implementing security measures are crucial.
Organizations often use specialized tools and services to detect and
mitigate such attacks effectively.
UDP Pseudo Header
The purpose of using a pseudo-header is to verify that the UDP packet
has reached its correct destination
The correct destination consist of a specific machine and a specific
protocol port number within that machine
Handshake Protocol
Handshake Protocol is used to establish sessions. This protocol allows the client
and server to authenticate each other by sending a series of messages to each
other. Handshake protocol uses four phases to complete its cycle.
Phase-1: In Phase-1 both Client and Server send hello-packets to each
other. In this IP session, cipher suite and protocol version are exchanged
for security purposes.
Phase-2: Server sends it certificate and Server-key-exchange. The server
end phase-2 by sending the Server-hello-end packet.
Phase-3: In this phase, Client replies to the server by sending it
certificate and Client-exchange-key.
Phase-4: In Phase-4 Change Cipher Spec occurs and after this the
Handshake Protocol ends.
Alert Protocol
This protocol is used to convey SSL-related alerts to the peer entity. Each
message in this protocol contains 2 bytes.
MIME working
Content-Type Header: MIME introduces the Content-Type header, which
tells the receiving email client what kind of data is being sent (e.g., text,
image, audio).
Encoding: Non-textual data (e.g., images or files) is encoded into ASCII
text format using base64 or other encoding schemes. This ensures that
binary data can be sent over a text-based protocol.
Multipart Messages: If the message contains more than one part (such
as a mix of text and attachments), MIME can structure the email as
multipart with a boundary separator to distinguish between different
parts.
MIME Header Key Fields and Their Functions
MIME-Version: Defines the version of the MIME protocol. Must be 1.0,
indicating the message uses MIME formatting.
Content-Type: Specifies the type of data in the message body, such
as text/plain, text/html, image/jpeg, or audio/mpeg.
Content-Transfer-Encoding: Indicates the encoding method used to
transmit the message safely such as 7bit, 8bit, base64, or quoted-
printable.
Content-ID: Provides a unique identifier for each MIME part, useful for
referencing embedded objects like inline images.
Content-Description: Describes the nature of the content (e.g., “Image
file”, “Video clip”, or “PDF Document”) to understand what’s included.
Advantages of MIME
Supports Multiple Data Types : MIME enables the transfer of diverse
data formats such as text, audio, video, images, and application files in
email messages.
Multilingual Compatibility : Emails can be composed and read in various
languages including Hindi, French, Japanese, Chinese, and more.
Rich Formatting with HTML/CSS : Allows users to attach HTML and CSS,
making it possible to customize and stylize emails with enhanced
formatting.
Handles Long Messages : Capable of delivering large or lengthy email
content without loss of data or formatting.
Unique Identification : Assigns a unique Content-ID to each message or
attachment, helpful in managing embedded media.
Disadvantages of MIME
Inconsistent Interpretation : The receiver’s system may not interpret
MIME types correctly, potentially affecting content display or behavior.
Increased Overhead : MIME adds extra headers and encoding,
increasing the size of the email and possibly slowing down transmission.
Complexity for Users : Most users are unfamiliar with MIME types, and
multiple media types can make the message harder to understand.
Compatibility Issues : Some older or limited systems may not support
MIME, leading to errors or loss of content during transmission.
7. Application Layer:-
Application Layer in OSI Model:-
The Application Layer of OSI (Open System Interconnection) model, is the
top layer in this model and takes care of network communication. The
application layer provides the functionality to send and receive data from
users. It acts as the interface between the user and the application. The
application provides services like file transmission, mail service, and many
more.
Functions of Application Layer
The Application Layer, being topmost layer in OSI model, performs functions
required in any kind of application or communication process. Let's have a
look into the functions:
Client-Server Model:-
The Client-Server Model is a distributed application architecture that
divides tasks or workloads between servers (providers of resources or
services) and clients (requesters of those services). In this model,
a client sends a request to a server for data, which is typically processed on
the server side. The server then returns the requested data to the client.
Clients generally do not share resources with each other, but instead rely on
the server to provide the resources or services requested. Common
examples of the client-server model include email systems and the World
Wide Web (WWW), where email clients interact with mail servers, and web
browsers request resources from web servers.
How Does the Client-Server Model Work?
In this article, we are going to take a dive into the Client-Server model and
have a look at how the Internet works via, web browsers. This article will
help us have a solid WEB foundation and help us easily work with WEB
technologies.
Client
When we talk about a "Client," it refers to a device (usually a computer,
smartphone, or application) that requests and receives services from a
server. The client is the entity that initiates communication, asking for data
or resources from the server. For instance, web browsers like Google
Chrome, Mozilla Firefox, or Safari are common client applications that
request data from a server to render web pages.
Server
A Server, on the other hand, is a remote computer or system that provides
data, resources, or services to clients. It listens to incoming client requests,
processes them, and sends the required information back. A server can
handle multiple client requests simultaneously.
For example, Web servers host websites, and database servers store and
serve databases for applications. In simple terms, the client sends a request
to the server, and the server serves the request as long as the data or
service is available in its system.
Client Server Model
How the Browser Interacts With the Servers?
The process of interacting with servers through a browser involves several
steps. Here's a breakdown of the steps taken when you enter a URL in a
browser and receive the website data:
1. User Enters the URL (Uniform Resource Locator): The user types a
website address (e.g., www.example.com) into the browser's address bar.
2. DNS (Domain Name System) Lookup: The browser sends a request to
the DNS server to resolve the human-readable URL into an IP address (since
computers use IP addresses to identify and connect to each other).
3. DNS Server Resolves the Address: The DNS server looks up the domain
name and returns the IP address of the web server hosting the requested
website.
4. Browser Sends HTTP/HTTPS Request: The browser sends an HTTP/HTTPS
request to the IP address of the web server to fetch the website’s data.
HTTP (HyperText Transfer Protocol) or HTTPS (the secure version) is the
protocol used for communication between the browser (client) and the web
server (server).
5. Server Sends Website Files: The server processes the request and sends
the necessary website files (HTML, CSS, JavaScript, images, etc.) back to the
browser.
6. Rendering the Website: The browser renders the files and displays the
website to the user. This rendering process involves several
components:Together, these components, known as Just-In-Time (JIT)
Compilers, allow the browser to convert raw data into a visual webpage.
DOM (Document Object Model) Interpreter: Processes the HTML
structure.
CSS Interpreter: Applies styles to the HTML elements.
JS Engine: Executes JavaScript code for interactivity.
Together, these components, known as Just-In-Time (JIT) Compilers, allow
the browser to convert raw data into a visual webpage.
browser.
Sending an email or
Visiting a website like Wikipedia.
Example streaming a video.
Note: In short, the Web is just one part of the Internet, like a library is one part
of a city.
Challenges of the Web
The Web is amazing, but it has some problems that you should know about:
Privacy: Some websites collect information about you, like what you
search for, and might share it without asking.
Safety: Hackers can try to steal your information or send viruses through
fake links or ads.
False Information: Not everything on the Web is true, so you need to
check if a website is trustworthy.
Bullying: Some people use the Web to be mean or bully others, which
can hurt feelings.
Too Much Screen Time: Spending too much time online can make it hard
to focus on school or sleep well.
Access Issues: Not everyone has fast Internet, especially in some
countries, which makes it harder to use the Web.
History of the WWW
It is a project created, by Tim Berner Lee in 1989, for researchers to work
together effectively at CERN. It is an organization, named the World Wide Web
Consortium (W3C), which was developed for further development of the web.
This organization is directed by Tim Berner's Lee, aka the father of the web.
CERN, where Tim Berners worked, is a community of more than 1700
researchers from more than 100 countries. These researchers spend a little
time on CERN and the rest of the time they work at their colleges and national
research facilities in their home country, so there was a requirement for solid
communication so that they can exchange data.
How Web Evolves?
Web Evolution
World Wide Web(WWW) Evolved so much from web 1.0 to web 4.0 (Future of
WWW) as follows:
Web 1.0 (1990–2000) Introduced static websites,
while Web 2.0 (2000–2010) brought interactive and social platforms.
Web 3.0 (2010–2020) focused on the semantic web, enabling machines
to understand data and offer personalized experiences.
Looking ahead, Web 4.0 (2020–2030) is expected to be a fully intelligent
web ecosystem powered by AI and integrated web operating systems.
Some Facts About the Web
The first website ever is still online! You can visit it at
"http://info.cern.ch/"
There are over 1.5 billion websites in the world, and that number grows
every day.
Google Chrome is used by more than 60% of people browsing the Web.
The Web is available in over 150 languages, so you can explore in your
language or learn a new one!
To send an email:
1. Compose a new message in your email client.
2. Enter the recipient's email address in the "To" field.
3. Add a subject line to summarize the content of the message.
4. Write the body of the message.
5. Attach any relevant files if needed.
6. Click "Send" to deliver the message to the recipient's email server.
7. Emails can also include features such as cc (carbon copy) and bcc (blind
carbon copy) to send copies of the message to multiple recipients, and
reply, reply all, and forward options to manage the conversation.
Electronic Mail (e-mail) is one of most widely used services of Internet. This
service allows an Internet user to send a message in formatted manner
(mail) to the other Internet user in any part of world. Message in mail not only
contain text, but it also contains images, audio and videos data. The person
who is sending mail is called sender and person who receives mail is
called recipient. It is just like postal mail service. Components of E-Mail System
: The basic components of an email system are : User Agent (UA), Message
Transfer Agent (MTA), Mail Box, and Spool file. These are explained as following
below.
1. User Agent (UA) : The UA is normally a program which is used to send
and receive mail. Sometimes, it is called as mail reader. It accepts variety
of commands for composing, receiving and replying to messages as well
as for manipulation of the mailboxes.
2. Message Transfer Agent (MTA) : MTA is actually responsible for transfer
of mail from one system to another. To send a mail, a system must have
client MTA and system MTA. It transfer mail to mailboxes of recipients if
they are connected in the same machine. It delivers mail to peer MTA if
destination mailbox is in another machine. The delivery from one MTA to
another MTA is done by Simple Mail Transfer Protocol.
Disadvantages of email:
1. Risk of spam and phishing attacks.
2. Overwhelming amount of emails can lead to information overload.
3. Can lead to decreased face-to-face communication and loss of personal
touch.
4. Potential for miscommunication due to lack of tone and body language
in written messages.
5. Technical issues, such as server outages, can disrupt email service.
6. It is important to use email responsibly and effectively, for example, by
keeping the subject line clear and concise, using proper etiquette, and
protecting against security threats.
Following Image
depicts the difference between how a request is handled with and without a
CDN respectively: WITH CDN(2 SECONDS)
WITHOUT CDN(5 SECONDS)
Benefits of CDN
Security improvement- The DDOS mitigation improves the security as it
contains some security certificates and optimizations.
Increase in content availability and redundancy- Hardware failures and
more traffic can lead to the website’s dysfunction. CDN can handle traffic
and can withstand hardware disfunction better than many servers.
Better load times- The visitor has a fast page loading because a nearby
CDN server is used whenever a client search for a webpage. CDN also
reduces the slow loading times by reducing the bounce rates and
increasing the amount of time people spend on site.
Low bandwidth cost- The direct cost for hosting a website is bandwidth
consumption cost. With the help of caching and other optimizations, it
minimizes the amount of data an origin server must provide, thus
reducing the hosting costs.
Protocols in Application Layer:-
The Application Layer is the topmost layer in the Open System Interconnection
(OSI) model. This layer provides several ways for manipulating the data which
enables any type of user to access the network with ease. The Application
Layer interface directly interacts with the application and provides common
web application services. The application layer performs several kinds of
functions that are required in any kind of application or communication
process. In this article, we will discuss various application layer protocols.
What are Application Layer Protocols?
Application layer protocols are those protocols utilized at the application layer
of the OSI (Open Systems Interconnection) and TCP/IP models. They facilitate
communication and data sharing between software applications on various
network devices. These protocols define the rules and standards that allow
applications to interact and communicate quickly and effectively over a
network.
Application Layer Protocol in Computer Network
1. TELNET
Telnet stands for the TELetype NETwork. It helps in terminal emulation. It
allows Telnet clients to access the resources of the Telnet server. It is used for
managing files on the Internet. It is used for the initial setup of devices like
switches. The telnet command is a command that uses the Telnet protocol to
communicate with a remote device or system. The port number of the telnet is
23.
Command
telnet [\\RemoteServer]
\\RemoteServer
: Specifies the name of the server
to which you want to connect
2. FTP
FTP stands for File Transfer Protocol. It is the protocol that actually lets us
transfer files. It can facilitate this between any two machines using it. But FTP is
not just a protocol but it is also a program.FTP promotes sharing of files via
remote computers with reliable and efficient data transfer. The Port number for
FTP is 20 for data and 21 for control.
Command
ftp machinename
3. TFTP
The Trivial File Transfer Protocol (TFTP) is the stripped-down, stock version of
FTP, but it’s the protocol of choice if you know exactly what you want and
where to find it. It's a technology for transferring files between network
devices and is a simplified version of FTP. The Port number for TFTP is 69.
Command
tftp [ options... ] [host [port]] [-c command]
4. NFS
It stands for a Network File System. It allows remote hosts to mount file
systems over a network and interact with those file systems as though they are
mounted locally. This enables system administrators to consolidate resources
onto centralized servers on the network. The Port number for NFS is 2049.
Command
service nfs start
5. SMTP
It stands for Simple Mail Transfer Protocol. It is a part of the TCP/IP protocol.
Using a process called "store and forward," SMTP moves your email on and
across networks. It works closely with something called the Mail Transfer Agent
(MTA) to send your communication to the right computer and email inbox. The
Port number for SMTP is 25.
Command
MAIL FROM:<mail@abc.com?
6. LPD
It stands for Line Printer Daemon. It is designed for printer sharing. It is the part
that receives and processes the request. A "daemon" is a server or agent. The
Port number for LPD is 515.
Command
lpd [ -d ] [ -l ] [ -D DebugOutputFile]
7. X window
It defines a protocol for the writing of graphical user interface–based
client/server applications. The idea is to allow a program, called a client, to run
on one computer. It is primarily used in networks of interconnected
mainframes. Port number for X window starts from 6000 and increases by 1 for
each server.
Command
Run xdm in runlevel 5
8. SNMP
It stands for Simple Network Management Protocol. It gathers data by polling
the devices on the network from a management station at fixed or random
intervals, requiring them to disclose certain information. It is a way that servers
can share information about their current state, and also a channel through
which an administrate can modify pre-defined values. The Port number of
SNMP is 161(TCP) and 162(UDP).
Command
snmpget -mALL -v1 -cpublic snmp_agent_Ip_address sysName.0
9. DNS
It stands for Domain Name System. Every time you use a domain name,
therefore, a DNS service must translate the name into the corresponding IP
address. For example, the domain name www.abc.com might translate to
198.105.232.4.
The Port number for DNS is 53.
Command
ipconfig /flushdns
10. DHCP
It stands for Dynamic Host Configuration Protocol (DHCP). It gives IP addresses
to hosts. There is a lot of information a DHCP server can provide to a host when
the host is registering for an IP address with the DHCP server. Port number for
DHCP is 67, 68.
Command
clear ip dhcp binding {address | * }
11. HTTP/HTTPS
HTTP stands for Hypertext Transfer Protocol and HTTPS is the more secured
version of HTTP, that's why HTTPS stands for Hypertext Transfer Protocol
Secure. This protocol is used to access data from the World Wide Web. The
Hypertext is the well-organized documentation system that is used to link
pages in the text document.
HTTP is based on the client-server model.
It uses TCP for establishing connections.
HTTP is a stateless protocol, which means the server doesn't maintain
any information about the previous request from the client.
HTTP uses port number 80 for establishing the connection.
12. POP
POP stands for Post Office Protocol and the latest version is known as POP3
(Post Office Protocol version 3). This is a simple protocol used by User agents
for message retrieval from mail servers.
POP protocol work with Port number 110.
It uses TCP for establishing connections.
POP works in dual mode- Delete mode, Keep Mode.
In Delete mode, it deletes the message from the mail server once they are
downloaded to the local system.
In Keep mode, it doesn't delete the message from the mail server and also
facilitates the users to access the mails later from the mail server.
13. IRC
IRC stands for Internet Relay Chat. It is a text-based instant messaging/chatting
system. IRC is used for group or one-to-one communication. It also supports
file, media, data sharing within the chat. It works upon the client-server model.
Where users connect to IRC server or IRC network via some web/ standalone
application program.
It uses TCP or TLS for connection establishment.
It makes use of port number 6667.
14. MIME
MIME stands for Multipurpose Internet Mail Extension. This protocol is
designed to extend the capabilities of the existing Internet email protocol like
SMTP. MIME allows non-ASCII data to be sent via SMTP. It allows users to
send/receive various kinds of files over the Internet like audio, video, programs,
etc. MIME is not a standalone protocol it works in collaboration with other
protocols to extend their capabilities.