CN 2
CN 2
CN 2
(Faculty E-Notes)
1
UNIT - 2 – COMPUTER NETWORK MODELS AND PROTOCOLS
2
COMPUTER NETWORK MODELS
A communication subsystem is a complex piece of Hardware and software. Early attempts for
implementing the software for such subsystems were based on a single, complex, unstructured program
with many interacting components. The resultant software was very difficult to test and modify. To
overcome such problem, the ISO has developed a layered approach. In a layered approach, networking
concept is divided into several layers, and each layer is assigned a particular task. Therefore, we can say
that networking tasks depend upon the layers.
LAYERED ARCHITECTURE
The main aim of the layered architecture is to divide the design into small pieces.
Each lower layer adds its services to the higher layer to provide a full set of services to manage
communications and run the applications.
It provides modularity and clear interfaces, i.e., provides interaction between subsystems.
It ensures the independence between layers by providing the services from lower to higher layer
without defining how the services are implemented. Therefore, any modification in a layer will not
affect the other layers.
The number of layers, functions, contents of each layer will vary from network to network. However,
the purpose of each layer is to provide the service from lower to a higher layer and hiding the details
from the layers of how the services are implemented.
The basic elements of layered architecture are services, protocols, and interfaces.
o Service: It is a set of actions that a layer provides to the higher layer.
o Protocol: It defines a set of rules that a layer uses to exchange the information with peer entity.
These rules mainly concern about both the contents and order of the messages used.
o Interface: It is a way through which the message is transferred from one layer to another layer.
In a layer n architecture, layer n on one machine will have a communication with the layer n on
another machine and the rules used in a conversation are known as a layer-n protocol.
Let's take an example of the five-layered architecture.
3
In case of layered architecture, no data is transferred from layer n of one machine to layer n of
another machine. Instead, each layer passes the data to the layer immediately just below it, until the
lowest layer is reached.
Below layer 1 is the physical medium through which the actual communication takes place.
In a layered architecture, unmanageable tasks are divided into several small and manageable tasks.
The data is passed from the upper layer to lower layer through an interface. A Layered architecture
provides a clean-cut interface so that minimum information is shared among different layers. It also
ensures that the implementation of one layer can be easily replaced by another implementation.
A set of layers and protocols is known as network architecture.
Why do we require Layered architecture?
Divide-and-conquer approach: Divide-and-conquer approach makes a design process in such a way
that the unmanageable tasks are divided into small and manageable tasks. In short, we can say that
this approach reduces the complexity of the design.
Modularity: Layered architecture is more modular. Modularity provides the independence of layers,
which is easier to understand and implement.
Easy to modify: It ensures the independence of layers so that implementation in one layer can be
changed without affecting other layers.
Easy to test: Each layer of the layered architecture can be analyzed and tested individually.
OSI Model
OSI stands for Open System Interconnection is a reference model that describes how information
from a software application in one computer moves through a physical medium to the software
application in another computer.
OSI consists of seven layers, and each layer performs a particular network function.
OSI model was developed by the International Organization for Standardization (ISO) in 1984, and it
is now considered as an architectural model for the inter-computer communications.
OSI model divides the whole task into seven smaller and manageable tasks. Each layer is assigned a
particular task.
Each layer is self-contained, so that task assigned to each layer can be performed independently.
Characteristics of OSI Model:
4
The OSI model is divided into two layers: upper layers and lower layers.
The upper layer of the OSI model mainly deals with the application related issues, and they are
implemented only in the software. The application layer is closest to the end user. Both the end user
and the application layer interact with the software applications. An upper layer refers to the layer just
above another layer.
The lower layer of the OSI model deals with the data transport issues. The data link layer and the
physical layer are implemented in hardware and software. The physical layer is the lowest layer of the
OSI model and is closest to the physical medium. The physical layer is mainly responsible for placing
the information on the physical medium.
5
1. Physical layer
The main functionality of the physical layer is to transmit the individual bits from one node to another
node.
It is the lowest layer of the OSI model.
It establishes, maintains and deactivates the physical connection.
It specifies the mechanical, electrical and procedural network interface specifications.
2. Data-Link Layer
6
This layer is responsible for the error-free transfer of data frames.
It defines the format of the data on the network.
It provides a reliable and efficient communication between two or more devices.
It is mainly responsible for the unique identification of each device that resides on a local network.
It contains two sub-layers:
o Logical Link Control Layer
It is responsible for transferring the packets to the Network layer of the receiver that is
receiving.
It identifies the address of the network layer protocol from the header.
It also provides flow control.
o Media Access Control Layer
A Media access control layer is a link between the Logical Link Control layer and the
network's physical layer.
It is used for transferring the packets over the network.
Physical Addressing: The Data link layer adds a header to the frame that contains a destination
address. The frame is transmitted to the destination address mentioned in the header.
Flow Control: Flow control is the main functionality of the Data-link layer. It is the technique
through which the constant data rate is maintained on both the sides so that no data get corrupted. It
ensures that the transmitting station such as a server with higher processing speed does not exceed the
receiving station, with lower processing speed.
Error Control: Error control is achieved by adding a calculated value CRC (Cyclic Redundancy
Check) that is placed to the Data link layer's trailer which is added to the message frame before it is
sent to the physical layer. If any error seems to occurr, then the receiver sends the acknowledgment
for the retransmission of the corrupted frames.
Access Control: When two or more devices are connected to the same communication channel, then
the data link layer protocols are used to determine which device has control over the link at a given
time.
7
3. Network Layer
It is a layer 3 that manages device addressing, tracks the location of devices on the network.
It determines the best path to move data from source to the destination based on the network
conditions, the priority of service, and other factors.
The Data link layer is responsible for routing and forwarding the packets.
Routers are the layer 3 devices, they are specified in this layer and used to provide the routing
services within an internetwork.
The protocols used to route the network traffic are known as Network layer protocols. Examples of
protocols are IP and Ipv6.
8
4. Transport Layer
The Transport layer is a Layer 4 ensures that messages are transmitted in the order in which they are
sent and there is no duplication of data.
The main responsibility of the transport layer is to transfer the data completely.
It receives the data from the upper layer and converts them into smaller units known as segments.
This layer can be termed as an end-to-end layer as it provides a point-to-point connection between
source and destination to deliver the data reliably.
5. Session Layer
10
6. Presentation Layer
A Presentation layer is mainly concerned with the syntax and semantics of the information exchanged
between the two systems.
It acts as a data translator for a network.
This layer is a part of the operating system that converts the data from one presentation format to
another format.
The Presentation layer is also known as the syntax layer.
11
7. Application Layer
An application layer serves as a window for users and application processes to access network
service.
It handles issues such as network transparency, resource allocation, etc.
An application layer is not an application, but it performs the application layer functions.
This layer provides the network services to the end-users.
Functions of Application layer:
File transfer, access, and management (FTAM): An application layer allows a user to access the
files in a remote computer, to retrieve the files from a computer and to manage the files in a remote
computer.
Mail services: An application layer provides the facility for email forwarding and storage.
Directory services: An application provides the distributed database sources and is used to provide
that global information about various objects.
TCP/IP model
The TCP/IP model was developed prior to the OSI model.
The TCP/IP model is not exactly similar to the OSI model.
The TCP/IP model consists of five layers: the application layer, transport layer, network layer, data
link layer and physical layer.
The first four layers provide physical standards, network interface, internetworking, and transport
functions that correspond to the first four layers of the OSI model and these four layers are
represented in TCP/IP model by a single layer called the application layer.
TCP/IP is a hierarchical protocol made up of interactive modules, and each of them provides specific
functionality.
Here, hierarchical means that each upper-layer protocol is supported by two or more lower-level
protocols.
12
Functions of TCP/IP layers:
Internet Layer
An internet layer is the second layer of the TCP/IP model.
An internet layer is also known as the network layer.
The main responsibility of the internet layer is to send the packets from any network, and they arrive
at the destination irrespective of the route they take.
13
Data Encapsulation and Formatting: An IP protocol accepts the data from the transport layer
protocol. An IP protocol ensures that the data is sent and received securely, it encapsulates the data
into message known as IP datagram.
Fragmentation and Reassembly: The limit imposed on the size of the IP datagram by data link
layer protocol is known as Maximum Transmission unit (MTU). If the size of IP datagram is greater
than the MTU unit, then the IP protocol splits the datagram into smaller units so that they can travel
over the local network. Fragmentation can be done by the sender or intermediate router. At the
receiver side, all the fragments are reassembled to form an original message.
Routing: When IP datagram is sent over the same local network such as LAN, MAN, WAN, it is
known as direct delivery. When source and destination are on the distant network, then the IP
datagram is sent indirectly. This can be accomplished by routing the IP datagram through various
devices such as routers.
ARP Protocol
ARP stands for Address Resolution Protocol.
ARP is a network layer protocol which is used to find the physical address from the IP address.
The two terms are mainly associated with the ARP Protocol:
o ARP request: When a sender wants to know the physical address of the device, it broadcasts the
ARP request to the network.
o ARP reply: Every device attached to the network will accept the ARP request and process the
request, but only recipient recognize the IP address and sends back its physical address in the
form of ARP reply. The recipient adds the physical address both to its cache memory and to the
datagram header
ICMP Protocol
ICMP stands for Internet Control Message Protocol.
It is a mechanism used by the hosts or routers to send notifications regarding datagram problems back
to the sender.
A datagram travels from router-to-router until it reaches its destination. If a router is unable to route
the data because of some unusual conditions such as disabled links, a device is on fire or network
congestion, then the ICMP protocol is used to inform the sender that the datagram is undeliverable.
An ICMP protocol mainly uses two terms:
o ICMP Test: ICMP Test is used to test whether the destination is reachable or not.
o ICMP Reply: ICMP Reply is used to check whether the destination device is responding or not.
The core responsibility of the ICMP protocol is to report the problems, not correct them. The
responsibility of the correction lies with the sender.
ICMP can send the messages only to the source, but not to the intermediate routers because the IP
datagram carries the addresses of the source and destination but not of the router that it is passed to.
14
Transport Layer
The transport layer is responsible for the reliability, flow control, and correction of data which is being
sent over the network.
The two protocols used in the transport layer are User Datagram protocol and Transmission control
protocol.
User Datagram Protocol (UDP)
o It provides connectionless service and end-to-end delivery of transmission.
o It is an unreliable protocol as it discovers the errors but not specify the error.
o User Datagram Protocol discovers the error, and ICMP protocol reports the error to the sender
that user datagram has been damaged.
o UDP consists of the following fields:
Source port address: The source port address is the address of the application program that has
created the message.
Destination port address: The destination port address is the address of the application program
that receives the message.
Total length: It defines the total number of bytes of the user datagram in bytes.
Checksum: The checksum is a 16-bit field used in error detection.
o UDP does not specify which packet is lost. UDP contains only checksum; it does not contain any
ID of a data segment.
15
o At the sending end, TCP divides the whole message into smaller units known as segment, and
each segment contains a sequence number which is required for reordering the frames to form
an original message.
o At the receiving end, TCP collects all the segments and reorders them based on sequence
numbers.
Application Layer
An application layer is the topmost layer in the TCP/IP model.
It is responsible for handling high-level protocols, issues of representation.
This layer allows the user to interact with the application.
When one application layer protocol wants to communicate with another application layer, it
forwards its data to the transport layer.
There is an ambiguity occurs in the application layer. Every application cannot be placed inside the
application layer except those who interact with the communication system. For example: text editor
cannot be considered in application layer while web browser using HTTP protocol to interact with
the network where HTTP protocol is an application layer protocol.
16
Data Link Controls
Data Link Control is the service provided by the Data Link Layer to provide reliable data transfer over
the physical medium. For example, In the half-duplex transmission mode, one device can only transmit
the data at a time. If both the devices at the end of the links transmit the data simultaneously, they will
collide and leads to the loss of the information. The Data link layer provides the coordination among the
devices so that no collision occurs.
The Data link layer provides three functions:
Line discipline
Flow Control
Error Control
Line Discipline
Line Discipline is a functionality of the Data link layer that provides the coordination among the link
systems. It determines which device can send, and when it can send the data.
Line Discipline can be achieved in two ways:
ENQ/ACK
Poll/select
END/ACK
END/ACK stands for Enquiry/Acknowledgement is used when there is no wrong receiver available on
the link and having a dedicated path between the two devices so that the device capable of receiving the
transmission is the intended one.
END/ACK coordinates which device will start the transmission and whether the recipient is ready or not.
Working of END/ACK
The transmitter transmits the frame called an Enquiry (ENQ) asking whether the receiver is available to
receive the data or not.
The receiver responses either with the positive acknowledgement (ACK) or with the negative
acknowledgement (NACK) where positive acknowledgement means that the receiver is ready to receive
17
the transmission and negative acknowledgement means that the receiver is unable to accept the
transmission.
18
Poll/Select
The Poll/Select method of line discipline works with those topologies where one device is designated as a
primary station, and other devices are secondary stations.
Working of Poll/Select
In this, the primary device and multiple secondary devices consist of a single transmission line, and
all the exchanges are made through the primary device even though the destination is a secondary
device.
The primary device has control over the communication link, and the secondary device follows the
instructions of the primary device.
The primary device determines which device is allowed to use the communication channel.
Therefore, we can say that it is an initiator of the session.
If the primary device wants to receive the data from the secondary device, it asks the secondary
device that they anything to send, this process is known as polling.
If the primary device wants to send some data to the secondary device, then it tells the target
secondary to get ready to receive the data, this process is known as selecting.
Select
The select mode is used when the primary device has something to send.
When the primary device wants to send some data, then it alerts the secondary device for the
upcoming transmission by transmitting a Select (SEL) frame, one field of the frame includes the
address of the intended secondary device.
When the secondary device receives the SEL frame, it sends an acknowledgement that indicates the
secondary ready status.
If the secondary device is ready to accept the data, then the primary device sends two or more data
frames to the intended secondary device. Once the data has been transmitted, the secondary sends an
acknowledgement specifies that the data has been received.
19
Poll
The Poll mode is used when the primary device wants to receive some data from the secondary
device.
When a primary device wants to receive the data, then it asks each device whether it has anything to
send.
Firstly, the primary asks (poll) the first secondary device, if it responds with the NACK (Negative
Acknowledgement) means that it has nothing to send. Now, it approaches the second secondary
device, it responds with the ACK means that it has the data to send. The secondary device can send
more than one frame one after another or sometimes it may be required to send ACK before sending
each one, depending on the type of the protocol being used.
Flow Control
It is a set of procedures that tells the sender how much data it can transmit before the data
overwhelms the receiver.
The receiving device has limited speed and limited memory to store the data. Therefore, the receiving
device must be able to inform the sending device to stop the transmission temporarily before the
limits are reached.
It requires a buffer, a block of memory for storing the information until they are processed.
20
Two methods have been developed to control the flow of data:
Stop-and-wait
Sliding window
Stop-and-wait
In the Stop-and-wait method, the sender waits for an acknowledgement after every frame it sends.
When acknowledgement is received, then only next frame is sent. The process of alternately sending
and waiting of a frame continues until the sender transmits the EOT (End of transmission) frame.
Advantage of Stop-and-wait
The Stop-and-wait method is simple as each frame is checked and acknowledged before the next frame is
sent.
Disadvantage of Stop-and-wait
Stop-and-wait technique is inefficient to use as each frame must travel across all the way to the receiver,
and an acknowledgement travels all the way before the next frame is sent. Each frame sent and received
uses the entire time needed to traverse the link.
Sliding Window
The Sliding Window is a method of flow control in which a sender can transmit the several frames
before getting an acknowledgement.
In Sliding Window Control, multiple frames can be sent one after the another due to which capacity
of the communication channel can be utilized efficiently.
A single ACK acknowledge multiple frames.
Sliding Window refers to imaginary boxes at both the sender and receiver end.
The window can hold the frames at either end, and it provides the upper limit on the number of
frames that can be transmitted before the acknowledgement.
Frames can be acknowledged even when the window is not completely filled.
The window has a specific size in which they are numbered as modulo-n means that they are
numbered from 0 to n-1. For example, if n = 8, the frames are numbered from
0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7,0,1........
The size of the window is represented as n-1. Therefore, maximum n-1 frames can be sent before
acknowledgement.
When the receiver sends the ACK, it includes the number of the next frame that it wants to receive.
For example, to acknowledge the string of frames ending with frame number 4, the receiver will send
the ACK containing the number 5. When the sender sees the ACK with the number 5, it got to know
that the frames from 0 through 4 have been received.
Sender Window
At the beginning of a transmission, the sender window contains n-1 frames, and when they are sent
out, the left boundary moves inward shrinking the size of the window. For example, if the size of the
window is w if three frames are sent out, then the number of frames left out in the sender window is
w-3.
21
Once the ACK has arrived, then the sender window expands to the number which will be equal to the
number of frames acknowledged by ACK.
For example, the size of the window is 7, and if frames 0 through 4 have been sent out and no
acknowledgement has arrived, then the sender window contains only two frames, i.e., 5 and 6. Now,
if ACK has arrived with a number 4 which means that 0 through 3 frames have arrived undamaged
and the sender window is expanded to include the next four frames. Therefore, the sender window
contains six frames (5,6,7,0,1,2).
Receiver Window
At the beginning of transmission, the receiver window does not contain n frames, but it contains n-1
spaces for frames.
When the new frame arrives, the size of the window shrinks.
The receiver window does not represent the number of frames received, but it represents the number
of frames that can be received before an ACK is sent. For example, the size of the window is w, if
three frames are received then the number of spaces available in the window is (w-3).
Once the acknowledgement is sent, the receiver window expands by the number equal to the number
of frames acknowledged.
Suppose the size of the window is 7 means that the receiver window contains seven spaces for seven
frames. If the one frame is received, then the receiver window shrinks and moving the boundary from
0 to 1. In this way, window shrinks one by one, so window now contains the six spaces. If frames
from 0 through 4 have sent, then the window contains two spaces before an acknowledgement is sent.
22
Error Control
Error Control is a technique of error detection and retransmission.
Stop-and-wait ARQ
Stop-and-wait ARQ is a technique used to retransmit the data in case of damaged or lost frames.
This technique works on the principle that the sender will not transmit the next frame until it receives the
acknowledgement of the last transmitted frame.
23
Lost Frame: Sender is equipped with the timer and starts when the frame is transmitted. Sometimes
the frame has not arrived at the receiving end so that it can be acknowledged neither positively nor
negatively. The sender waits for acknowledgement until the timer goes off. If the timer goes off, it
retransmits the last transmitted frame.
24
In the above figure, three frames have been transmitted before an error discovered in the third frame. In
this case, ACK 2 has been returned telling that the frames 0,1 have been received successfully without
any error. The receiver discovers the error in data 2 frame, so it returns the NAK 2 frame. The frame 3 is
also discarded as it is transmitted after the damaged frame. Therefore, the sender retransmits the frames
2,3.
Lost Data Frame: In Sliding window protocols, data frames are sent sequentially. If any of the
frames is lost, then the next frame arrive at the receiver is out of sequence. The receiver checks the
sequence number of each of the frame, discovers the frame that has been skipped, and returns the
NAK for the missing frame. The sending device retransmits the frame indicated by NAK as well as
the frames transmitted after the lost frame.
Lost Acknowledgement: The sender can send as many frames as the windows allow before waiting
for any acknowledgement. Once the limit of the window is reached, the sender has no more frames to
send; it must wait for the acknowledgement. If the acknowledgement is lost, then the sender could
wait forever. To avoid such situation, the sender is equipped with the timer that starts counting
whenever the window capacity is reached. If the acknowledgement has not been received within the
time limit, then the sender retransmits the frame since the last ACK.
Selective-Reject ARQ
Selective-Reject ARQ technique is more efficient than Go-Back-n ARQ.
In this technique, only those frames are retransmitted for which negative acknowledgement (NAK)
has been received.
The receiver storage buffer keeps all the damaged frames on hold until the frame in error is correctly
received.
The receiver must have an appropriate logic for reinserting the frames in a correct order.
The sender must consist of a searching mechanism that selects only the requested frame for
retransmission.
25
CRYPTOGRAPHY IN COMPUTER NETWORK
Cryptography refers to the science and art of transforming messages to make them secure and immune to
attacks. It is a method of storing and transmitting data in a particular form so that only those for whom it
is intended can read and process it. Cryptography not only protects data from theft or alteration but can
also be used for user authentication.
Components
There are various components of cryptography which are as follows −
Cipher
We refer to encryption and decryption algorithms as ciphers. The term cipher is also used to refer to
different categories of algorithms in cryptography. This is not to say that every sender-receiver pair
needs their very own unique cipher for secure communication. On the contrary, one cipher can serve
millions of communicating pairs.
Key
A key is a number (or a set of numbers) that the cipher, as an algorithm, operates on. To encrypt a
message, we need an encryption algorithm, an encryption key, and plaintext. These create the ciphertext.
26
To decrypt a message, we need a decryption algorithm, a decryption key, and the ciphertext. These
reveal the original plaintext.
Types
There are two types of cryptography which are as follows −
Features of Cryptography
These are the features of cryptography:
Confidentiality: Hides the contents of a message from unauthorized parties.
Integrity: Ensures that a message has not been altered during transmission.
Authentication: Verifies the identity of the sender and receiver of a message.
Non-repudiation: Prevents the sender from denying having sent a message.
Availability: Ensures that authorized users have access to the information they need when they need
it.
Key Management: The process of generating, distributing, storing, and replacing cryptographic
keys.
Algorithm: The mathematical formula used to encrypt and decrypt messages.
Encryption/Decryption: The process of converting plaintext to ciphertext and vice versa.
Symmetric/Asymmetric Key Encryption: The use of a single shared key for encryption and
decryption or the use of a public and private key pair.
Hash Functions: A one-way mathematical transformation of an input (message) into a fixed-size
output (message digest).
Digital Signatures: A signature that can be used to authenticate the identity of the sender of a
message and ensure the integrity of the message.
27
Types of Cryptography
There are Three Types of Cryptography
Symmetric Key
The symmetric key is a types of cryptography which also known as private key cryptography or secret
key cryptography. Both the information receiver and the sender use a single key to encrypt and decrypt
the message in this case. it is a method of encryption and decryption that uses a single shared key for both
operations. The same key is used to encrypt the plaintext into ciphertext and to decrypt the ciphertext
back into plaintext.
AES is the most commonly used type of cryptography in this method (Advanced Encryption System).
The approaches used in this type are completely streamlined and faster as well.
28
Asymmetric Key
The asymmetric key is types of cryptography which also known as public-key cryptography. It employs a
diverse and secure method of information transmission. The most common type of cryptography used in
this method is RSA. An asymmetric key refers to a cryptographic method that uses two different keys for
encryption and decryption. The two keys are called the public key and the private key. The public key is
used to encrypt the data and the private key is used to decrypt it. The security of this method is based on
the fact that it is computationally infeasible to derive the private key from the public key. Asymmetric
key cryptography is commonly used for secure communication, digital signatures, and public key
infrastructure (PKI).
29
Advantages of Asymmetric Key Cryptography:
Increased security: The use of two different keys makes it more secure than symmetric key
cryptography.
Non-repudiation: The digital signature created using the private key provides proof of the
authenticity of the sender.
Scalability: Asymmetric key cryptography can support a large number of users.
Public key distribution: The public key can be freely distributed without any security risk, allowing
for easy encryption of messages.
30
Ranking
Ranking objects in a network may refer to sorting the objects according to importance, popularity,
influence, authority, relevance, similarity, and proximity, by utilizing link information in the network
We introduce the ranking methods developed for networks. Different from other ranking methods
defined in text or database systems, links or the structure information of the network are significantly
explored. For most of the ranking methods in networks, ranking scores are defined in a way that can be
propagated in the network. Therefore, the rank score of an object is determined by other objects in the
network, usually with stronger influence from closer objects and weaker influence from more remote
ones.
Methods for ranking in networks can be categorized according to several aspects, such as global ranking
vs. query-dependent ranking, based on whether the ranking result is dependent on a query; ranking in
homogeneous information networks vs. ranking in heterogeneous information networks, based on the
type of the underlying networks; importance-based ranking vs. proximity-based ranking, based on
whether the semantic meaning of the ranking is importance related or similarity/promximity related; and
unsupervised vs. supervised or semi-supervised, based on whether training is needed.
Historical Background
The earliest ranking problem for objects in a network was proposed by sociologists, who introduced
various kinds of centrality to define the importance of a node (or actor) in a social network. With the
advent of the World-Wide Web and the rising necessity of Web search, ranking methods for Web page
networks are flourishing, including the well-known ranking methods, PageRank [Brin and Page(1998)]
and HITS [Kleinberg(1999)]. Later, in order to better support entity search instead of Web page ranking,
object ranking algorithms are proposed, which usually consider more complex structural information of
the network, such as heterogeneous information networks. Moreover, in order to better personalize search
quality, ranking methods that can integrate user guidance are proposed. Learning to rank techniques are
used in such tasks, and not only the link information but the attributes associated with nodes and edges
are commonly used.
Firewall
Nowadays, it is a big challenge to protect our sensitive data from unwanted and unauthorized sources.
There are various tools and devices that can provide different security levels and help keep our private
data secure. One such tool is a 'firewall' that prevents unauthorized access and keeps our computers and
data safe and secure.
In this article, we have talked about firewalls as well as other related topics, such as why we need
firewalls, functions of firewalls, limitations of firewalls, working of firewalls, etc.
What is a Firewall?
A firewall can be defined as a special type of network security device or a software program that
monitors and filters incoming and outgoing network traffic based on a defined set of security rules. It acts
as a barrier between internal private networks and external sources (such as the public Internet).
The primary purpose of a firewall is to allow non-threatening traffic and prevent malicious or unwanted
data traffic for protecting the computer from viruses and attacks. A firewall is a cybersecurity tool that
31
filters network traffic and helps users block malicious software from accessing the Internet in infected
computers.
32
Why Firewall
Firewalls are primarily used to prevent malware and network-based attacks. Additionally, they can help
in blocking application-layer attacks. These firewalls act as a gatekeeper or a barrier. They monitor every
attempt between our computer and another network. They do not allow data packets to be transferred
through them unless the data is coming or going from a user-specified trusted source.
Firewalls are designed in such a way that they can react quickly to detect and counter-attacks throughout
the network. They can work with rules configured to protect the network and perform quick assessments
to find any suspicious activity. In short, we can point to the firewall as a traffic controller.
Some of the important risks of not having a firewall are:
Open Access
If a computer is running without a firewall, it is giving open access to other networks. This means that it
is accepting every kind of connection that comes through someone. In this case, it is not possible to
detect threats or attacks coming through our network. Without a firewall, we make our devices vulnerable
to malicious users and other unwanted sources.
Network Crashes
In the absence of a firewall, anyone could access our network and shut it down. It may lead us to invest
our valuable time and money to get our network working again.
Therefore, it is essential to use firewalls and keep our network, computer, and data safe and secure from
unwanted sources.
33
features as part of continuous development. They are considered the first line of defense when it comes to
network security.
Functions of Firewall
As stated above, the firewall works as a gatekeeper. It analyzes every attempt coming to gain access to
our operating system and prevents traffic from unwanted or non-recognized sources.
Since the firewall acts as a barrier or filter between the computer system and other networks (i.e., the
public Internet), we can consider it as a traffic controller. Therefore, a firewall's primary function is to
secure our network and information by controlling network traffic, preventing unwanted incoming
network traffic, and validating access by assessing network traffic for malicious things such as hackers
and malware.
Generally, most operating systems (for example - Windows OS) and security software come with built-in
firewall support. Therefore, it is a good idea to ensure that those options are turned on. Additionally, we
can configure the security settings of the system to be automatically updated whenever available.
34
Firewalls have become so powerful, and include a variety of functions and capabilities with built-in
features:
Network Threat Prevention
Application and Identity-Based Control
Hybrid Cloud Support
Scalable Performance
Network Traffic Management and Control
Access Validation
Record and Report on Events
Limitations of Firewall
When it comes to network security, firewalls are considered the first line of defense. But the question is
whether these firewalls are strong enough to make our devices safe from cyber-attacks. The answer may
be "no". The best practice is to use a firewall system when using the Internet. However, it is important to
use other defense systems to help protect the network and data stored on the computer. Because cyber
threats are continually evolving, a firewall should not be the only consideration for protecting the home
network.
The importance of using firewalls as a security system is obvious; however, firewalls have some
limitations:
Firewalls cannot stop users from accessing malicious websites, making it vulnerable to internal
threats or attacks.
Firewalls cannot protect against the transfer of virus-infected files or software.
Firewalls cannot prevent misuse of passwords.
Firewalls cannot protect if security rules are misconfigured.
Firewalls cannot protect against non-technical security risks, such as social engineering.
Firewalls cannot stop or prevent attackers with modems from dialing in to or out of the internal
network.
Firewalls cannot secure the system which is already infected.
Therefore, it is recommended to keep all Internet-enabled devices updated. This includes the latest
operating systems, web browsers, applications, and other security software (such as anti-virus). Besides,
the security of wireless routers should be another practice. The process of protecting a router may include
options such as repeatedly changing the router's name and password, reviewing security settings, and
creating a guest network for visitors.
Types of Firewall
Depending on their structure and functionality, there are different types of firewalls. The following is a
list of some common types of firewalls:
Proxy Firewall
Packet-filtering firewalls
Stateful Multi-layer Inspection (SMLI) Firewall
Unified threat management (UTM) firewall
Next-generation firewall (NGFW)
35
Network address translation (NAT) firewalls
Difference between a Firewall and Anti-virus
Firewalls and anti-viruses are systems to protect devices from viruses and other types of Trojans, but
there are significant differences between them. Based on the vulnerabilities, the main differences between
firewalls and anti-viruses are tabulated below:
ATTRIBUTES FIREWALL ANTI-VIRUS
Definition A firewall is defined as the system Anti-virus is defined as the special type of
which analyzes and filters incoming or software that acts as a cyber-security
outgoing data packets based on pre- mechanism. The primary function of Anti-
defined rules. virus is to monitor, detect, and remove any
apprehensive or distrustful file or software
from the device.
Structure Firewalls can be hardware and Anti-virus can only be used as software.
software both. The router is an Anti-virus is a program that is installed on
example of a physical firewall, and a the device, just like the other programs.
simple firewall program on the system
is an example of a software firewall.
Implementation Because firewalls come in the form of Because Anti-virus comes in the form of
hardware and software, a firewall can software, therefore, Anti-virus can be
be implemented either way. implemented only at the software level.
There is no possibility of implementing Anti-
virus at the hardware level.
Responsibility A firewall is usually defined as a Anti-viruses are primarily responsible for
network controlling system. It means detecting and removing viruses from
that firewalls are primarily responsible computer systems or other devices. These
for monitoring and filtering network viruses can be in the form of infected files or
traffic. software.
Scalability Because the firewall supports both Anti-viruses are generally considered less-
types of implementations, hardware, scalable than firewalls. This is because anti-
and software, therefore, it is more virus can only be implemented at the
scalable than anti-virus. software level. They don't support hardware-
level implementation.
Threats A firewall is mainly used to prevent Anti-virus is mainly used to scan, find, and
network related attacks. It mainly remove viruses, malware, and Trojans, which
includes external network threats?for can harm system files and software and share
example- Routing attacks and IP personal information (such as login
Spoofing. credentials, credit card details, etc.) with
hackers.
36
Types of Firewall
There are mainly three types of firewalls, such as software firewalls, hardware firewalls, or both,
depending on their structure. Each type of firewall has different functionality but the same purpose.
However, it is best practice to have both to achieve maximum possible protection.
A hardware firewall is a physical device that attaches between a computer network and a gateway. For
example- a broadband router. A hardware firewall is sometimes referred to as an Appliance Firewall. On
the other hand, a software firewall is a simple program installed on a computer that works through port
numbers and other installed software. This type of firewall is also called a Host Firewall.
Besides, there are many other types of firewalls depending on their features and the level of security they
provide. The following are types of firewall techniques that can be implemented as software or hardware:
Packet-filtering Firewalls
Circuit-level Gateways
Application-level Gateways (Proxy Firewalls)
Stateful Multi-layer Inspection (SMLI) Firewalls
Next-generation Firewalls (NGFW)
Threat-focused NGFW
Network Address Translation (NAT) Firewalls
Cloud Firewalls
Unified Threat Management (UTM) Firewalls
37
Packet-filtering Firewalls
A packet filtering firewall is the most basic type of firewall. It acts like a management program that
monitors network traffic and filters incoming packets based on configured security rules. These firewalls
are designed to block network traffic IP protocols, an IP address, and a port number if a data packet does
not match the established rule-set.
While packet-filtering firewalls can be considered a fast solution without many resource requirements,
they also have some limitations. Because these types of firewalls do not prevent web-based attacks, they
are not the safest.
Circuit-level Gateways
Circuit-level gateways are another simplified type of firewall that can be easily configured to allow or
block traffic without consuming significant computing resources. These types of firewalls typically
operate at the session-level of the OSI model by verifying TCP (Transmission Control
Protocol) connections and sessions. Circuit-level gateways are designed to ensure that the established
sessions are protected.
Typically, circuit-level firewalls are implemented as security software or pre-existing firewalls. Like
packet-filtering firewalls, these firewalls do not check for actual data, although they inspect information
about transactions. Therefore, if a data contains malware, but follows the correct TCP connection, it will
pass through the gateway. That is why circuit-level gateways are not considered safe enough to protect
our systems.
38
In most cases, SMLI firewalls are implemented as additional security levels. These types of firewalls
implement more checks and are considered more secure than stateless firewalls. This is why stateful
packet inspection is implemented along with many other firewalls to track statistics for all internal traffic.
Doing so increases the load and puts more pressure on computing resources. This can give rise to a
slower transfer rate for data packets than other solutions.
Threat-focused NGFW
Threat-focused NGFW includes all the features of a traditional NGFW. Additionally, they also provide
advanced threat detection and remediation. These types of firewalls are capable of reacting against
attacks quickly. With intelligent security automation, threat-focused NGFW set security rules and
policies, further increasing the security of the overall defense system.
In addition, these firewalls use retrospective security systems to monitor suspicious activities
continuously. They keep analyzing the behavior of every activity even after the initial inspection. Due to
this functionality, threat-focus NGFW dramatically reduces the overall time taken from threat detection
to cleanup.
Cloud Firewalls
Whenever a firewall is designed using a cloud solution, it is known as a cloud firewall or FaaS (firewall-
as-service). Cloud firewalls are typically maintained and run on the Internet by third-party vendors. This
type of firewall is considered similar to a proxy firewall. The reason for this is the use of cloud firewalls
as proxy servers. However, they are configured based on requirements.
39
The most significant advantage of cloud firewalls is scalability. Because cloud firewalls have no physical
resources, they are easy to scale according to the organization's demand or traffic-load. If demand
increases, additional capacity can be added to the cloud server to filter out the additional traffic load.
Most organizations use cloud firewalls to secure their internal networks or entire cloud infrastructure.
40
Step 2: After that, we are required to click on the Control Panel to open its settings. The control panel
contains the following options:
41
Here, we need to click on 'System and Security'. This option is only visible if the 'view by:' option is set
as 'Category'.
Step 3: Next, we need to click on 'Windows Defender Firewall', as shown below:
Note: In some computers, the option of 'Windows Defender Firewall' might instead be displayed as
'Windows Firewall'.
Step 4: We are then required to click on 'Turn Windows Defender Firewall on or off'. This option is
shown in the left side panel of the screen:
42
Step 5: On the next screen, we need to click on the circle radio button next to 'Turn off Windows
Defender Firewall (not recommended)'.
43
Here, we can select the firewall settings for different types of networks. Using this screen, we can turn off
or disable the firewall for private networks, public networks, or both. We need to select the circle radio
button next to 'Turn off Windows Defender Firewall (not recommended)' under both the private and the
public network settings.
Step 6: After selecting the radio buttons, we are required to click on the 'OK' button to keep the changes.
These are the steps to disable Windows Firewall. Here, we have used Windows 10 to describe the
complete step by step tutorial. The processes will be the same on Windows 7/8/8.1; however, the user
interface may be slightly different.
Caution
Suppose there is any program that is unable to access the Internet. In that case, it is better to allow that
specific program through the firewall rather than disabling the entire firewall system. Here are the steps
to allow any program through Windows Firewall:
Step 1: First, we need to open a Control Panel.
Step 2: On the next screen, we need to click on 'System and Security'.
Step 3: After that, we are required to click on 'Allow an app through Windows Firewall'. This option
is displayed under 'Windows Defender Firewall' option, as shown below:
44
Step 4: After completing the above step, we will get the following screen:
45
Here, we need to click on the 'Change settings' button. This will allow us to access the list and modify
its settings.
Step 5: Under the list of 'allowed apps and features', we can find a specific program to which we want
to grant access through the Windows Firewall. After that, we need to select the checkboxes next to that
particular program.
Here, we also get options to manage firewall settings for the private network and public network
separately. The private box is mostly used for games based on a local area network, while the public box
is used to allow the program to access the Internet. Besides, if we don't see a required program in the list,
we can use the 'Allow another app' button to add it manually.
Step 6: Next, we need to click on the 'OK' button to keep the changes.
46
By using this method, we can enable or disable Windows Firewall for specific software. In simple words,
the method helps us specify rules for individual programs to allow access to the Internet.
47