Unit 3
Infrastructure Network
Infrastructure networks are networks with pre-defined infrastructure and it is
made from fixed-size of nodes. Here network services are delivered through
pre-constructed infrastructures. In this network Access point is the central
controller for each device. Access points are nothing but fixed base stations
that are connected by wires. It is impossible for remote localities to install
such a network as it is too expensive. All devices on a wireless network are
communicated through a router i.e. access point. Examples are
Wireless LAN, satellite networks, etc.
Infrastructure-less Network (Ad hoc Networks)
This type of network is a group of independent terminals that communicate
with each other by forming a radio network. The links in wireless
networks have less bandwidth as compared to the wired networks. In this
network, each node is act as a router, and network connection is distributed
among nodes. In an ad-hoc network, the formation of networks takes place
dynamically with the help of a collaboration of random nodes. Examples of
infrastructure-less networks are Wireless Sensor Networks(WSN), and Mobile
Ad hoc networks (MANETs).
Concepts and types of MANET (Mobile Ad hoc network)
o A MANET consists of a number of mobile devices that come together to form a
network as needed, without any support from any existing internet
infrastructure or any other kind of fixed stations.
o A MANET can be defined as an autonomous system of nodes or MSs(also
serving as routers) connected by wireless links, the union of which forms a
communication network modelled in the form of an arbitrary communication
graph.
o In a MANET, no such infrastructure exists and network topology may be
changed dynamically in an unpredictable manner since nodes are free to move
and each node has limiting transmitting power, restricting access to the node
only in the neighbouring range.
o MANETs are basically peer-to-peer, multi-hop wireless networks in which
information packets are transmitted in a store and forward manner from a
source to destination, via intermediate nodes as given in the figure:
o As nodes move, the connectivity may change based on relative locations of
other nodes. The resulting change in the network topology known at the local
level must be passed on to other nodes so that old topology information can
be updated.
o For example, as MS2 in the figure changes its point of attachment from MS3 to
MS4, other nodes that are part of the network should use this new route to
forward packets to MS2. In the figure, we assume that it is not possible to have
all nodes within each other's radio range. In case all nodes are closed by within
each other's radio range, there are no routing issues to be addressed.
Dynamic Topologies:
Network topology which is typically multihop may change randomly
and rapidly with time, it can form unidirectional or bi-directional links.
o Bandwidth constrained, variable capacity links:
Wireless links usually have lower reliability, efficiency, stability, and
capacity as compared to a wired network
o Autonomous Behavior:
Each node can act as a host and router, which shows its autonomous
behavior.
o Energy Constrained Operation:
As some or all the nodes rely on batteries or other exhaustible means
for their energy. Mobile nodes are characterized by less memory,
power, and lightweight features.
o Limited Security:
Wireless networks are more prone to security threats. A centralized
firewall is absent due to the distributed nature of the operation for
security, routing, and host configuration.
o Less Human Intervention:
They require minimum human intervention to configure the network,
therefore they are dynamically autonomous in nature.
Pros and Cons of MANET –
Pros:
1. Separation from central network administration.
2. Each node can play both the roles ie. of router and host showing
autonomous nature.
3. Self-configuring and self-healing nodes do not require human
intervention.
4. Highly scalable and suits the expansion of more network hub.
Cons:
1. Lack of authorization facilities.
2. More prone to attacks due to limited physical security.
3. High latency i.e. There is a huge delay in the transfer of data.
Advantages:
Flexibility: MANETs are highly flexible, as they can be easily deployed in
various environments and can be adapted to different applications and
scenarios. This makes them ideal for use in emergency situations or military
operations, where there may not be a pre-existing network infrastructure.
Scalability: MANETs can easily scale to accommodate a large number of
nodes, making them suitable for large-scale deployments. They can also
handle dynamic changes in network topology, such as the addition or
removal of nodes.
Cost-effective: Since MANETs do not require any centralized infrastructure,
they are often more cost-effective than traditional wired or wireless
networks. They can also be used to extend the range of existing networks
without the need for additional infrastructure.
Rapid Deployment: MANETs can be rapidly deployed in areas where
infrastructure is not available, such as disaster zones or rural areas.
Disadvantages:
Security: MANETs are vulnerable to security threats, such as attacks by
malicious nodes and data interception. Since the network is decentralized,
there is no central authority to ensure the security of the network.
Bandwidth: Since MANETs rely on wireless communication, bandwidth can
be limited. This can lead to congestion and delays, particularly when
multiple nodes are competing for the same channel.
Routing: Routing in MANETs can be complex, particularly when dealing with
dynamic network topologies. This can result in inefficient routing and longer
delays in data transmission.
Power Consumption: Since MANETs rely on battery-powered devices, power
consumption can be a significant issue. Nodes may need to conserve power
to extend the life of the battery, which can limit the amount of data that can
be transmitted.
Applications of MANET
o Defense applications: Many defense applications require on the fly
communications set-up, and ad hoc/sensor networks are excellent candidates
for use in battlefield management.
o Crisis management applications: These arise, for example, as a result of
natural disasters in which the entire communication infrastructure is in disarray.
Restoring communications quickly is essential.
o Education via the internet: Educational opportunities available on the internet
or remote areas because of the economic infeasibility of providing expensive
last-mile wire line internet access in these areas to all subscribers.
Mobile Ad Hoc Networks (MANETs) can be categorized into three types:
1. Smart phone ad hoc network
2. Vehicular ad hoc network
3. Internet based mobile ad hoc network
Routing Classification
Routing protocol can be classified as:
1. Proactive Protocol
2. Reactive Protocol
3. Hybrid Protocol
1. Proactive Protocol
Proactive protocols attempt to evaluate continuously the routes within the network. It
means proactive protocol continuously maintain the routing information, so that when
a packet needs to be forwarded, the path is known already and can be immediately
used.
The advantage of the proactive schemes is that whenever a route is needed, there is
negligible delay in determining the route.
2. Reactive Protocols
Reactive protocols do not maintain routes but invoke a route determination procedure
only on demand or we can say reactive protocols build the routes only on demand.
Thus, when a route is required, some sort of global search procedure is initiated.
3. Hybrid Protocols
Hybrid protocols attempt to take advantage of best of reactive and proactive schemes.
VANET (Vehicular Ad hoc Network)
• Vehicular Ad hoc Network (VANET), a subclass of mobile Ad Hoc
networks (MANETs), is a promising approach for future intelligent
transportation system (ITS).
• These networks have no fixed infrastructure and instead rely on the
vehicles themselves to provide network functionality.
• However, due to mobility constraints, driver behaviour, and high
mobility, VANETs exhibit characteristics that are dramatically different
from many generic MANETs.
• It can be defined as an intelligent component of transport system as
vehicle are able to communicate with each other as well as roadside
base station, which are located at critical points of the road. Example
:-Intersection and Construction Sites.
Networking Properties of VANET
VANETs are an subset of a Mobile Ad Hoc networks (MANETs). MANETs have no
fixed infrastructure and instead rely on ordinary nodes to perform routing of
messages and network management functions. However, Vehicular Ad Hoc
networks behave in fundamentally different ways than the models that
predominate MANET research. Driver behaviour, constraints on mobility, and
high speeds create unique Characteristics in IVC networks.
Architecture of VANETs
VANETs adopt similar concepts of connectivity and design as MANETs.
VANET communication can be divided into three major categories:
(1) V2V communication, where vehicles can link immediately to disseminate
messages to each other; (2) V2I communication [, in which the vehicle can
connect with infrastructure-based networks for exchanging data wirelessly; and
(3)infrastructural communication in which if any application wants internet
connection at that time obu can communicate to RSU through which it can get
the internet access.
VANET architecture includes mainly three components :1)onboard unit (OBU) installed on
vehicles 2)the Roadside Unit (RSU), which are mostly static in nature and are installed at the
roadside. 3)Application unit (AU) which is dedicated to the safety application in vehicle and
also decide how to act after getting any information from the OBU.
Figure 2. VANET Architecture.
The Roadside Unit (RSU) and an onboard unit (OBU) are the key elements used for
VANET . Normally, the RSU is static all along the paths, while the OBU is housed
inside the vehicle. All RSUs are interconnected with each other along the route. The
key RSU functions include: (i) Expanding the range of VANET communication by
sending messages to another OBUs and RSUs. (ii) Applications for running protection,
such as traffic situation coverage or accident alerts. (iii) Supplying OBUs with internet
access.
The OBU, on the other hand, handles contact between vehicles and the RSUs on the
network, as shown in Figure 3. An OBU comprises a processor, memory, network
unit, and sensors for resource commands. Later, the OBU observes and collects the
data to create messages delivered via wireless media to nearby vehicles.
Characteristics of VANETs
Since VANETs are used in so many monitoring and safety applications, they have a
number of hardware and communication device characteristics that affect VANET
communication. The following is a list of the most significant characteristics that affect
VANET communication :
• Estimate of movement: The movement of vehicles is limited by the urban
structure, such as sidewalks, crossings, and roads, thereby possible vehicle
activities can be predictable.
• Power constraints: Because every vehicle is fitted with prolonged battery life, the
VANETs do not have any power limitations.
• Variable network density: Network density depends upon the traffic in roadside
scenarios; in rural areas the density is low, whereas in traffic jams and highly
populated urban areas, the density is high.
• Mobility: In VANETs, vehicles usually drive at high velocity. A slight delay in V2V
transmission can also lead to several problems.
• Variable Network Topology: Due to the extreme mobility of vehicles, the topology
of VANETs varies rapidly. This makes VANETs susceptible to attacks and the
detection of malicious vehicles is difficult .
• Real-time restrictions: In VANETs, the communication of data has a fixed time
threshold range. This is intended to provide ample time for the recipient to make
determinations and take necessary actions quickly.
• Wide scale: With several participants, VANETs could span a whole road network.
Its area of coverage can vary from a neighborhood to a whole town.
OSI Model
OSI Model
o 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.
o OSI consists of seven layers, and each layer performs a particular network function.
o 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.
o OSI model divides the whole task into seven smaller and manageable tasks. Each layer
is assigned a particular task.
o Application layer, presentation layer and session layer is also known as software layer.
o Network layer, datalink layer and physical layer is also known as hardware layer.
o And transport layer is the heart of the OSI model.
Pros and cons of the OSI model
The OSI model has a number of advantages, including the following:
• It's considered a standard model in computer networking.
• The model supports connectionless, as well as connection-
oriented, services. Users can take advantage of connectionless
services when they need faster data transmissions over the
internet and the connection-oriented model when they're looking
for reliability.
• It has the flexibility to adapt to many protocols.
• The model is more adaptable and secure than having all services
bundled in one layer.
The disadvantages of the OSI model include the following:
• It doesn't define any particular protocol.
• The session layer, which is used for session management, and
the presentation layer, which deals with user interaction, aren't as
useful as other layers in the OSI model.
• Some services are duplicated at various layers, such as the
transport and data-link layers.
• Layers can't work in parallel; each layer must wait to receive data
from the previous layer.
Layer 1- Physical Layer
The lowest layer of the OSI reference model is the physical layer.
This layer includes the physical equipment involved in the data transfer, such as the cables
and switches.
The physical layer contains information in the form of bits.
It 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.
Data Bits in the Physical Layer
The Functions of the Physical Layer
o Line Configuration: It defines the way how two or more devices can be
connected physically.
o Data Transmission: It defines the transmission mode whether it is simplex,
half-duplex or full-duplex mode between the two devices on the network.
o Topology: It defines the way how network devices are arranged.
o Signals: It determines the type of the signal used for transmitting the
information.
Hub, Repeater, Modem, and Cables are Physical Layer devices.
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.
The data link layer takes packets from the network layer and breaks them into smaller pieces
called frames.
o It is mainly responsible for the unique identification of each device that resides
on a local network.
The Data Link Layer is divided into two sublayers:
1. Logical Link Control (LLC)
2. 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: 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.
• 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 & receiver’s IP addresses are placed in the
header by the network layer.
If the two devices communicating are on the same network, then the network layer is
unnecessary. The network layer breaks up segments from the transport layer into smaller
units, called packets, on the sender’s device, and reassembling these packets on the
receiving device.
Network layer protocols include IP, the Internet Control Message Protocol (ICMP),
the Internet Group Message Protocol (IGMP), and the IPsec suite.
The 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 on Internetwork
uniquely, the network layer defines an addressing scheme. The
sender & 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.
The transport layer is also responsible for flow control and error control. Flow control
determines an optimal speed of transmission to ensure that a sender with a fast connection
does not overwhelm a receiver with a slow connection.
o 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.
o The main responsibility of the transport layer is to transfer the data completely.
o It receives the data from the upper layer and converts them into smaller units
known as segments.
o 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.
The 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
1. Connection-Oriented Service
2. Connectionless Service
1. Connection-Oriented Service: It is a three-phase process that includes
• Connection Establishment
• Data Transfer
• Termination/disconnection
In this type of transmission, the receiving device sends an acknowledgment,
back to the source after a packet or group of packets is received. This type of
transmission is reliable and secure.
2. Connectionless service: It is a one-phase process and includes Data
Transfer. In this type of transmission, the receiver does not acknowledge
receipt of a packet. This approach allows for much faster communication
between devices. Connection-oriented service is more reliable than
connectionless Service.
The two protocols used in this layer are:
o Transmission Control Protocol
o It is a standard protocol that allows the systems to communicate over
the internet.
o It establishes and maintains a connection between hosts.
o When data is sent over the TCP connection, then the TCP protocol
divides the data into smaller units known as segments. Each segment
travels over the internet using multiple routes, and they arrive in different
orders at the destination. The transmission control protocol reorders the
packets in the correct order at the receiving end.
o User Datagram Protocol
o User Datagram Protocol is a transport layer protocol.
o It is an unreliable transport protocol as in this case receiver does not send
any acknowledgment when the packet is received, the sender does not
wait for any acknowledgment. Therefore, this makes a protocol
unreliable.
Layer 5 - Session
This is the layer responsible for opening and closing communication between the
two devices. The time between when the communication is opened and closed is
known as the session. The session layer ensures that the session stays open long
enough to transfer all the data being exchanged, and then promptly closes the
session in order to avoid wasting resources.
The session layer also synchronizes data transfer with checkpoints. For example, if a
100 megabyte file is being transferred, the session layer could set a checkpoint every
5 megabytes. In the case of a disconnect or a crash after 52 megabytes have been
transferred, the session could be resumed from the last checkpoint, meaning only 50
more megabytes of data need to be transferred. Without the checkpoints, the entire
transfer would have to begin again from scratch.
It is responsible for opening sessions, ensuring they remain open
and functional while data is being transferred, and closing them
when communication ends.
Functionality of session layer:
• Create session
• Authention
• Authorisation
• Session restoration(
Unit 4
What is data packets?
A data packet is a unit of data made into a single package that travels along a
given network path. Data packets are used in Internet Protocol (IP) transmissions
for data that navigates the Web, and in other kinds of networks.
Data packets are units of information collected into one set for transmission
through the Internet. Any bit of data that needs to be sent from one system to
another must first be broken into smaller pieces to ease communication. Upon
reaching the endpoint, these pieces get reassembled to become readable.
Data packets are used in Internet Protocol (IP)-based systems that communicate
with one another over the Web. A data packet is also called a “block,” a
“datagram,” or a “frame,” depending on the protocol used for its transmission.
Examples
• A user sends an email, and the email client breaks the message into data
packets before sending them over the internet to the recipient’s email
server.
• A user streams a video, and the video file is broken down into data packets,
which are sent to the user’s device and reassembled to create continuous
video playback.
• An image that you would like to send to a friend via iMessage. The image
would be divided into small pieces before it gets sent, which happens in
the background, of course. Your friend sees only the reassembled image
afterward.
What Is the Structure of a Data Packet?
A data packet commonly has two sections—the header and the payload. The
header contains all information about the packet, including its origin and
destination IP addresses. Packet headers tell receiving devices where they come
from and how to process them.
Payloads contain the actual data being transmitted. When transmitting malware,
the malicious code that a data packet contains is called “malware payload.” It’s
still included in the data packet’s structure, but its purpose is to infect receiving
devices with viruses, worms, and other harmful codes.
Depending on the protocol or method used to transmit data, some data packets
may have a third section called the “packet trailer.” It’s a small piece of
information that tells the receiving device that it has reached the end of the
packet.
How Do Data Packets Work?
• When you send a message, an image, a video, or any form of
communication over a network, they are divided into smaller chunks called
“data packets.” A packet may contain around 1,000–1,500 bytes of data,
so the number of packets that make up a whole piece of data vary
depending on its size.
• A 1GB video, for example, may be broken down into 1,000,000 packets.
Each packet is numbered to make reassembling easy and accurate.
• The packets travel through the Internet, often using different routes.
However, they will all arrive at the same destination since the header
contains the IP address of the receiving device.
• The following diagram shows datagram packets being send by host H1 to
host H2. The four datagram packets labelled as A, B, C and D, all
belonging to same message are being routed separately via separate routes.
The packets in the message arrives in the destination out of order. It is the
responsibility of H2 to reorder the packets in order to retrieve the original
message.
Pros:
• Efficient transmission of data by breaking large files into smaller units.
• Error detection and correction through packet headers and checksums.
• Load balancing and congestion control in networks.
Cons:
• Packet loss or corruption can lead to transmission errors.
• Latency issues may arise from the need to reassemble data packets.
• Overhead from packet headers and other metadata can increase bandwidth
usage.
Data Packets Transmission Elements
Data packet transmission involves several elements that include the following:
1. Bandwidth
Bandwidth refers to the size of the Internet pipeline available to a user. It
dictates how much information that user can transmit at one time. For data
packets, bandwidth refers to how many packets a user can fit in his/her available
pipeline. In essence, the bigger the bandwidth, the more data packets it can fit,
and the more efficient the transmission is.
2. Network Congestion
As the number of data packets passing through an Internet pipeline increases,
the slower the transmission becomes. The slowdown could result from a small
bandwidth or an artificial congestion on the part of an Internet service provider
(ISP). A network congestion is comparable to a traffic jam that occurs when a
considerable number of cars travel through a small road.
3. Packet Loss
A packet loss occurs when data gets lost during transmission. It can result from
network congestion
4. Jitter
Jitters are irregular data packet transmissions over a network. When an
irregularity in transmitting information occurs, confusion on both ends of the
network happens. Network congestion and, eventually, packet loss can result
from the presence of too much jitter.
5. Web Browser
A web browser is responsible for receiving packets and assembling them into web
pages that visitors see. Ideally, a browser can process as much as eight data
packets at one time. Available bandwidth affects how fast a page loads. In
general, the more data packets a system can process, the faster the page loading
time.
Important Terms Are Related to Data Packets
• IP address: An IP address is a unique identifier assigned to each Internet-
connected device.
• Kilobyte: A kilobyte is a data measurement unit equivalent to 1,000 bytes.
• Protocol: This refers to methods or sets of rules used in network
communication. The structure and size of a data packet may depend on the
protocol used. Common protocols include Transmission Control
Protocol/Internet Protocol (TCP/IP) and File Transfer Protocol (FTP).
What is protocol?
• It is a digital language through which we communicate with others on
the Internet. protocol meaning is that it a set of mutually accepted and
implemented rules at both ends of the communications channel for the
proper exchange of information. By adopting these rules, two devices can
communicate with each other and can interchange information.
• A protocol is a set of rules and guidelines for communicating data. Rules
are defined for each step and process during communication between two
or more computers. Networks have to follow these rules to successfully
transmit data.
Layer 6 - Presentation
• This layer is primarily responsible for preparing data so that it can be used
by the application layer; in other words, layer 6 makes the data presentable
for applications to consume. The presentation layer is responsible for
translation, encryption, and compression of data.
• Two communicating devices communicating may be using different
encoding methods, so layer 6 is responsible for translating incoming data
into a syntax that the application layer of the receiving device can
understand.
• If the devices are communicating over an encrypted connection, layer 6 is
responsible for adding the encryption on the sender’s end as well as
decoding the encryption on the receiver's end so that it can present the
application layer with unencrypted, readable data.
• Finally, the presentation layer is also responsible for compressing data it
receives from the application layer before delivering it to layer 5. This
helps improve the speed and efficiency of communication by minimizing
the amount of data that will be transferred.
Functions of the presentation layer:
o Translation:
Data is sent from sender to receiver, but what if the sender device and
receiver device understand different formats of code? For example,
suppose one device understands ASCII code and another device
understands EBCDIC code. In that case, the data must be translated into a
code that the recipient understands to determine what data has been sent.
The presentation layer is responsible for translating ASCII codes to
EBCDIC or vice versa. With the help of the presentation layer, the receiver
understands the data effectively and uses it efficiently.
o Encryption and Decryption:
Whatever data is being transmitted between the sender and the receiver,
that data must be secure because an intruder can hack the data passing
between the sender and the receiver. Hackers can modify the data and send
the modified data to the receiver to create false communication. The
presentation layer is responsible for encrypting and decrypting data to
avoid data leakage and data modification.
The plaintext data at the source is encrypted into ciphertext (unreadable
format), then it is sent to the receiver, where the ciphertext is decrypted
into plaintext. Now, if the hacker tries to hack the data, the hacker receives
an encrypted, unreadable form, and if the hacker tries to send modified
data, the receiver can detect the modification during decryption; thereby,
the data remains safe.
o Compression and Decompression:
If the file size is large, it becomes difficult to transmit the large file over
the network. File size can be decreased by compressing the file for easy
transmission of data. Compression is the method of diminishing the size of
a file to transmit data easily in less time. When the compressed data reaches
the receiver, the data is reconstructed back to the original size, and this
process is called decompression.
Presentation layer protocols and their purpose:
Secure Sockets Layers (SSL)
The Secure Socket Layer protocol provides security to the data that is being
transferred between the web browser and the server. SSL encrypts the link
between a web server and a browser, which ensures that all data passed between
them remains private and free from attacks.
The SSL protocol provides server authentication and client authentication:
• Server authentication is performed when a client connects to the server.
After the initial handshake, the server sends its digital certificate to the
client. The client validates the server certificate or certificate chain.
• Client authentication is performed when a server sends a certificate request
to a client during the handshake. If the client certificate or chain is verified
and the certificate verify message is verified, the handshake proceeds
further.
• An optional additional authentication is performed by checking the
common name in the certificate against the server's fully qualified domain
name from a reverse Domain Name Server (DNS) lookup where the
server's fully qualified domain name can be obtained.
HTTP (Hypertext Transfer Protocol)
o HTTP stands for HyperText Transfer Protocol.
o It is a protocol used to access the data on the World Wide Web (www).
o The HTTP protocol can be used to transfer the data in the form of plain
text, hypertext, audio, video, and so on.
o This protocol is known as HyperText Transfer Protocol because of its
efficiency that allows us to use in a hypertext environment where there are
rapid jumps from one document to another document.
o HTTP is similar to the FTP as it also transfers the files from one host to
another host. But, HTTP is simpler than FTP as HTTP uses only one
connection, i.e., no control connection to transfer the files.
Working of HTTP
First of all, whenever we want to open any website then first open a web browser
after that we will type the URL of that website (e.g., [Link] ). This
URL is now sent to Domain Name Server (DNS). Then DNS first check records
for this URL in their database, then DNS will return the IP address to the web
browser corresponding to this URL. Now the browser is able to send requests
to the actual server.
After the server sends data to the client, the connection will be closed. If we
want something else from the server we should have to re-establish the
connection between the client and the server.
o Connectionless protocol: HTTP is a connectionless protocol. HTTP client
initiates a request and waits for a response from the server. When the server
receives the request, the server processes the request and sends back the
response to the HTTP client after which the client disconnects the
connection. The connection between client and server exist only during the
current request and response time only.
o Media independent: HTTP protocol is a media independent as data can
be sent as long as both the client and server know how to handle the data
content. It is required for both the client and server to specify the content
type in MIME-type header.
o Stateless: HTTP is a stateless protocol as both the client and server know
each other only during the current request. Due to this nature of the
protocol, both the client and server do not retain the information between
various requests of the web pages.
Basic Architecture
The following diagram shows a very basic architecture of a web application and
depicts where HTTP sits:
The HTTP protocol is a request/response protocol based on the client/server
based architecture where web browsers, robots and search engines, etc. act like
HTTP clients, and the Web server acts as a server.
Client
The HTTP client sends a request to the server in the form of a request method,
URI, and protocol version, followed by a MIME-like message containing request
modifiers, client information, and possible body content over a TCP/IP
connection.
Server
The HTTP server responds with a status line, including the message's protocol
version and a success or error code, followed by a MIME-like message containing
server information, entity meta information, and possible entity-body content.
What is HTTPS?
The full form of HTTPS is Hypertext Transfer Protocol Secure.
The HTTP protocol does not provide the security of the data, while HTTP ensures
the security of the data. Therefore, we can say that HTTPS is a secure version of
the HTTP protocol. This protocol allows transferring the data in an encrypted
form. The use of HTTPS protocol is mainly required where we need to enter the
bank account details. The HTTPS protocol is mainly used where we require to
enter the login credentials. In modern browsers such as chrome, both the
protocols, i.e., HTTP and HTTPS, are marked differently. To provide encryption,
HTTPS uses an encryption protocol known as Transport Layer Security, and
officially, it is referred to as a Secure Sockets Layer (SSL). This protocol uses a
mechanism known as asymmetric public key infrastructure, and it uses two
different keys which are given below:
o Private key: This key is available on the web server, which is managed by
the owner of a website.
It decrypts the information which is encrypted by the public key.
o Public key: This key is available to everyone. It converts the data into an
encrypted form.
File Transfer Protocol (FTP)
• FTP stands for File transfer protocol.
• The term file transfer protocol (FTP) refers to a process that involves the
transfer of files between devices over a network. The process works when
one party allows another to send or receive files over the Internet.
Originally used as a way for users to communicate and exchange
information between two physical devices, it is now commonly used to
store files in the cloud, which is usually a secure location that is held
remotely.
• FTP may be used by a business or individual to transfer files from one
computer system to another or by websites to upload or download files
from their servers.
How File Transfer Protocol (FTP) Works
• File transfer protocol allows individuals and businesses to share electronic
files with others without having to be in the same space. This can be done
using an FTP client or through the cloud. Regardless of the option, both
parties require a working Internet connection.
• Most web browsers come with FTP clients that enable users to transfer
files from their computer to a server and vice versa. Some users may want
to use a third-party FTP client because many of them offer extra features.
Examples of FTP clients that are free to download include FileZilla Client,
FTP Voyager, WinSCP, CoffeeCup Free FTP, and Core FTP.
• Many people have used FTP before without even realizing it. If you have
ever downloaded a file from a web page, you've used FTP. The first step
is to log in, which may occur automatically or by manually inputting a
username and password. FTP will also require you to access an FTP server
through a specific port number. Once you access the FTP server through
your FTP client, you can now transfer files. Not all public FTP servers
require you to sign in because some servers enable you to access them
anonymously.
• As noted above, FTP was originally developed as a way to send and
receive files between two physical computers. But with changes in
technology, users can execute file transfers through the cloud. Using the
cloud allows transfers to be done conveniently and safely (which could
protect individuals and companies from data breaches), and at relatively
low cost.
Advantages of FTP
• Speed is one of the advantages of FTP(File Transfer Protocol).
• File sharing also comes in the category of advantages of FTP in this
between two machines files can be shared on the network.
• Efficiency is more in FTP.
Disadvantages of FTP
• File size limit is the drawback of FTP only 2 GB size files can be
transferred.
• Multiple receivers are not supported by the FTP.
• FTP does not encrypt the data this is one of the biggest drawbacks of
FTP.
• FTP is unsecured we use login IDs and passwords making it secure but
they can be attacked by hackers.
TELNET
• TELNET stands for Teletype Network. It is a type of protocol that
enables one computer to connect to the local computer.
• The computer which starts the connection is known as the local
computer.
• The computer which is being connected to i.e. which accepts the
connection known as the remote computer.
• During telnet operation, whatever is being performed on the remote
computer will be displayed by the local computer. Telnet operates on a
client/server principle. The local computer uses a telnet client program
and the remote computers use a telnet server program.
There are two types of login:
Local Login
o When a user logs into a local computer, then it is known as local login.
Remote login
o When the user wants to access an application program on a remote computer,
then the user must perform remote login.
How remote login occurs
At the local site
The user sends the keystrokes to the terminal driver, the characters are then
sent to the TELNET client. The TELNET client which in turn, transforms the
characters to a universal character set known as network virtual terminal
characters and delivers them to the local TCP/IP stack
At the remote site
The commands in NVT forms are transmitted to the TCP/IP at the remote
machine. Here, the characters are delivered to the operating system and then
pass to the TELNET server. The TELNET server transforms the characters which
can be understandable by a remote computer. However, the characters cannot
be directly passed to the operating system as a remote operating system does
not receive the characters from the TELNET server. Therefore it requires some
piece of software that can accept the characters from the TELNET server. The
operating system then passes these characters to the appropriate application
program.
Advantages of Telnet
1. It provides remote access to someone’s computer system.
2. Telnet allows the user for more access with fewer problems in data
transmission.
3. Telnet saves a lot of time.
4. The oldest system can be connected to a newer system with telnet
having different operating systems.
Disadvantages of Telnet
1. As it is somehow complex, it becomes difficult to beginners in
understanding.
2. Data is sent here in form of plain text, that’s why it is not so secured.
3. Some capabilities are disabled because of not proper interlinking of
the remote and local devices.
Layer 7 - Application
The Application Layer is topmost layer in the Open System Interconnection
(OSI) model. This layer provides several ways for manipulating the data
(information) which actually enables any type of user to access network with
ease. This layer also makes a request to its bottom layer, which is presentation
layer for receiving various types of information from it. The Application Layer
interface directly interacts with application and provides common web
application services. This layer is basically highest level of open system,
which provides services directly for application process.
Functions of Application layer:
Functions of the Application Layer
The application layer provides the following functions.
1. The Application Layer provides protocols that allow the software to
communicate and receive data and finally present it to users in a
meaningful way.
2. This layer allows users to log on as a remote host.
3. The Application Layer provides various facilities for users to forward
multiple emails and a storage facility.
4. This layer acts as a window via which users and application processes can
access network resources.
5. This layer provides services such as email, file transfer, results
distribution, directory services, network resources, etc.
6. The application layer communicates with the operating system and
guarantees that data is properly saved.
7. This layer allows users to interact with other software applications.
Services of Application Layers
o Network Virtual terminal: An application layer allows a user to log on to
a remote host. To do so, the application creates a software emulation of a
terminal at the remote host. The user's computer talks to the software
terminal, which in turn, talks to the host. The remote host thinks that it is
communicating with one of its own terminals, so it allows the user to log
on.
o File Transfer, Access, and Management (FTAM): An application allows
a user to access files in a remote computer, to retrieve files from a computer
and to manage files in a remote computer.
o Addressing: To obtain communication between client and server, there is
a need for addressing. When a client made a request to the server, the
request contains the server address and its own address. The server
response to the client request, the request contains the destination address,
i.e., client address. To achieve this kind of addressing, DNS is used.
o Mail Services: An application layer provides Email forwarding and
storage.
o Directory Services: An application contains a distributed database that
provides access for global information about various objects and services.
Authentication: It authenticates the sender or receiver's message or both.
Application architecture is of two types:
o Client-server architecture: An application program running on the local
machine sends a request to another application program is known as a
client, and a program that serves a request is known as a server. For
example, when a web server receives a request from the client host, it
responds to the request to the client host.
Characteristics Of Client-server architecture:
o In Client-server architecture, clients do not directly communicate with each
other. For example, in a web application, two browsers do not directly
communicate with each other.
o A server is fixed, well-known address known as IP address because the
server is always on while the client can always contact the server by
sending a packet to the sender's IP address.
Disadvantage Of Client-server architecture:
It is a single-server based architecture which is incapable of holding all the
requests from the clients. For example, a social networking site can become
overwhelmed when there is only one server exists.
o P2P (peer-to-peer) architecture: It has no dedicated server in a data
center. The peers are the computers which are not owned by the service
provider. Most of the peers reside in the homes, offices, schools, and
universities. The peers communicate with each other without passing the
information through a dedicated server, this architecture is known as peer-
to-peer architecture. The applications based on P2P architecture includes
file sharing and internet telephony.
SMTP (Simple Mail Transfer Protocol)
Email is emerging as one of the most valuable services on the internet today.
Most internet systems use SMTP as a method to transfer mail from one user to
another. SMTP is a push protocol and is used to send the mail whereas POP
(post office protocol) or IMAP (internet message access protocol) is used to
retrieve those emails at the receiver’s side.
o SMTP is a set of communication guidelines that allow software to transmit
an electronic mail over the internet is called Simple Mail Transfer
Protocol.
o It is a program used for sending messages to other computer users based
on e-mail addresses.
o It provides a mail exchange between users on the same or different
computers, and it also supports:
o It can send a single message to one or more recipients.
o Sending message can include text, voice, video or graphics.
o It can also send the messages on networks outside the internet.
o The main purpose of SMTP is used to set up communication rules between
servers. The servers have a way of identifying themselves and announcing
what kind of communication they are trying to perform. They also have a
way of handling the errors such as incorrect email address. For example, if
the recipient address is wrong, then receiving server reply with an error
message of some kind.
Components of SMTP
1. Mail User Agent (MUA)
2. Mail Submission Agent (MSA)
3. Mail Transfer Agent (MTA)
4. Mail Delivery Agent (MDA)
1. Mail User Agent (MUA): It is a computer application that helps you in
sending and retrieving mail. It is responsible for creating email messages for
transfer to the mail transfer agent(MTA).
2. Mail Submission Agent (MSA): It is a computer program that basically
receives mail from a Mail User Agent(MUA) and interacts with the Mail
Transfer Agent(MTA) for the transfer of the mail.
3. Mail Transfer Agent(MTA): It is basically software that has the work to
transfer mail from one system to another with the help of SMTP.
4. Mail Delivery Agent(MDA): A mail Delivery agent or Local Delivery
Agent is basically a system that helps in the delivery of mail to the local system.
Working of SMTP
1. Communication between the sender and the receiver :
The sender’s user agent prepares the message and sends it to the MTA. The
MTA’s responsibility is to transfer the mail across the network to the receiver’s
MTA. To send mail, a system must have a client MTA, and to receive mail, a
system must have a server MTA.
2. Sending Emails:
Mail is sent by a series of request and response messages between the client
and the server. The message which is sent across consists of a header and a
body. A null line is used to terminate the mail header and everything after the
null line is considered the body of the message, which is a sequence of ASCII
characters. The message body contains the actual information read by the
receipt.
3. Receiving Emails:
The user agent on the server-side checks the mailboxes at a particular time of
intervals. If any information is received, it informs the user about the mail.
When the user tries to read the mail it displays a list of emails with a short
description of each mail in the mailbox. By selecting any of the mail users can
view its contents on the terminal.
Domain Name System (DNS)
o DNS is a directory service that provides a mapping between the name of a
host on the network and its numerical address.
o DNS is required for the functioning of the internet.
o DNS is a service that translates the domain name into IP addresses. This
allows the users of networks to utilize user-friendly names when looking
for other hosts instead of remembering the IP addresses.
o For example, suppose the FTP site at EduSoft had an IP address of
[Link], most people would reach this site by specifying
[Link]. Therefore, the domain name is more reliable than IP
address.
DNS is a TCP/IP protocol used on different platforms. The domain name space
is divided into three different sections: generic domains, country domains, and
inverse domain.
What is the Need of DNS?
Every host is identified by the IP address but remembering numbers is very
difficult for people also the IP addresses are not static therefore a mapping is
required to change the domain name to the IP address. So DNS is used to convert
the domain name of the websites to their numerical IP address.
All computers on the Internet, from your smart phone or laptop to the servers
that serve content for massive retail websites, find and communicate with one
another by using numbers. These numbers are known as IP addresses. When
you open a web browser and go to a website, you don't have to remember and
enter a long number. Instead, you can enter a domain name like [Link]
and still end up in the right place.
Working of DNS
o DNS is a client/server network communication protocol. DNS clients send
requests to the. server while DNS servers send responses to the client.
o Client requests contain a name which is converted into an IP address known
as a forward DNS lookups while requests containing an IP address which
is converted into a name known as reverse DNS lookups.
o DNS implements a distributed database to store the name of all the hosts
available on the internet.
o If a client like a web browser sends a request containing a hostname, then
a piece of software such as DNS resolver sends a request to the DNS
server to obtain the IP address of a hostname. If DNS server does not
contain the IP address associated with a hostname, then it forwards the
request to another DNS server. If IP address has arrived at the resolver,
which in turn completes the request over the internet protocol.
POP Protocol
The POP protocol stands for Post Office Protocol(also known as Point of
Presence).
It provides a standard mechanism for retrieving emails from a remote server for
a mail recipient.
How is mail transmitted?
Suppose sender wants to send the mail to receiver. First mail is transmitted to the
sender's mail server. Then, the mail is transmitted from the sender's mail server
to the receiver's mail server over the internet. On receiving the mail at the
receiver's mail server, the mail is then sent to the user. The whole process is done
with the help of Email protocols. The transmission of mail from the sender to the
sender's mail server and then to the receiver's mail server is done with the help of
the SMTP protocol. At the receiver's mail server, the POP or IMAP
protocol takes the data and transmits to the actual user.
Since SMTP is a push protocol so it pushes the message from the client to the
server. As we can observe in the above figure that SMTP pushes the message
from the client to the recipient's mail server. The third stage of email
communication requires a pull protocol, and POP is a pull protocol. When the
mail is transmitted from the recipient mail server to the client which means that
the client is pulling the mail from the server.
Requirement of POP
We know that emails are stored on a centralised e-mail server, the SMTP server.
The SMTP server expects the destination host (i.e., the email recipient) to be
online all the time. Without this, it cannot create a TCP connection with it and,
therefore, cannot forward the email message to the destination host.
As we know, desktop computers are usually powered down when the business
hours are over. Therefore, the solution to this problem is having a POP server,
whereas the SMTP server in an organization receives and stores all the incoming
emails for any user in that organization. It is not used for transporting the emails
to the end destination.
What is an IP Address?
All the computers of the world on the Internet network communicate with each
other with underground or underwater cables or wirelessly. If I want to
download a file from the internet or load a web page or literally do anything
related to the internet, my computer must have an address so that other
computers can find and locate mine in order to deliver that particular file or
webpage that I am requesting.
All the computers of the world on the Internet network communicate with each
other with underground or underwater cables or wirelessly. If I want to
download a file from the internet or load a web page or literally do anything
related to the internet, my computer must have an address so that other
computers can find and locate mine in order to deliver that particular file or
webpage that I am requesting. In technical terms, that address is called IP
Address or Internet Protocol Address.
Let us understand it with another example, like if someone wants to send you a
mail then he/she must have your home address. Similarly, your computer too
needs an address so that other computers on the internet can communicate with
each other without the confusion of delivering information to someone else’s
computer. And that is why each computer in this world has a unique IP Address.
Or in other words, an IP address is a unique address that is used to identify
computers or nodes on the internet. This address is just a string of numbers
written in a certain format. It is generally expressed in a set of numbers for
example [Link]. Here each number in the set is from 0 to 255 range.
The working of IP addresses is similar to other languages. It can also use some
set of rules to send information. Using these protocols we can easily send, and
receive data or files to the connected devices. There are several steps behind the
scenes. Let us look at them
• Your device directly requests your Internet Service Provider which
then grants your device access to the web.
• And an IP Address is assigned to your device from the given range
available.
• Your internet activity goes through your service provider, and they
route it back to you, using your IP address.
• Your IP address can change. For example, turning your router on or
off can change your IP Address.
• When you are out from your home location your home IP address
doesn’t accompany you. It changes as you change the network of your
device.
Types of IP Address
IP Address is of two types:
1. IPv4: Internet Protocol version 4. It consists of 4 numbers separated by the
dots. Each number can be from 0-255 in decimal numbers. But computers do
not understand decimal numbers, they instead change them to binary numbers
which are only 0 and 1. Therefore, in binary, this (0-255) range can be written
as (00000000 – 11111111). Since each number N can be represented by a group
of 8-digit binary digits. So, a whole IPv4 binary address can be represented by
32-bits of binary digits. In IPv4, a unique sequence of bits is assigned to a
computer, so a total of (2^32) devices approximately = 4,294,967,296 can be
assigned with IPv4.
IPv4 can be written as:
[Link]
Classes of IPv4 Address: There are around 4.3 billion IPv4 addresses and
managing all those addresses without any scheme is next to impossible. Let’s
understand it with a simple example. If you have to find a word from a language
dictionary, how long will it take? Usually, you will take less than 5 minutes to
find that word. You are able to do this because words in the dictionary are
organized in alphabetical order. If you have to find out the same word from a
dictionary that doesn’t use any sequence or order to organize the words, it will
take an eternity to find the word. If a dictionary with one billion words without
order can be so disastrous, then you can imagine the pain behind finding an
address from 4.3 billion addresses. For easier management and assignment IP
addresses are organized in numeric order and divided into the following 5
classes :
IP Class Address Range Maximum number of networks
Class A 0-126 126 (27-1)
Class B 128-191 16384
Class C 192-223 2097152
Class D 224-239 Reserve for multitasking
Class E 240-254 Reserved for Research and development
2. IPv6: But, there is a problem with the IPv4 address. With IPv4, we can
connect only the above number of 4 billion devices uniquely, and apparently,
there are much more devices in the world to be connected to the internet. So,
gradually we are making our way to IPv6 Address which is a 128-bit IP
address. In human-friendly form, IPv6 is written as a group of 8 hexadecimal
numbers separated with colons(:). But in the computer-friendly form, it can be
written as 128 bits of 0s and 1s. Since, a unique sequence of binary digits is
given to computers, smartphones, and other devices to be connected to the
internet. So, via IPv6 a total of (2^128) devices can be assigned with unique
addresses which are actually more than enough for upcoming future generations.
IPv6 can be written as:
[Link]
Classification of IP Address
An IP address is classified into the following types:
1. Public IP Address: This address is available publicly and it is assigned by
your network provider to your router, which further divides it to your devices.
Public IP Addresses are of two types,
• Dynamic IP Address: When you connect a smartphone or computer
to the internet, your Internet Service Provider provides you an IP
Address from the range of available IP Addresses. Now, your device
has an IP Address and you can simply connect your device to the
Internet and send and receive data to and from your device. The very
next time when you try to connect to the internet with the same device,
your provider provides you with different IP Addresses to the same
device and also from the same available range. Since IP Address keeps
on changing every time when you connect to the internet, it is called a
Dynamic IP Address.
• Static IP Address: Static address never changes. They serve as a
permanent internet address. These are used by DNS servers. What are
DNS servers? Actually, these are computers that help you to open a
website on your computer. Static IP Address provides information
such as device is located on which continent, which country, which
city, and which Internet Service Provider provides internet connection
to that particular device. Once, we know who is the ISP, we can trace
the location of the device connected to the internet. Static IP Addresses
provide less security than Dynamic IP Addresses because they are
easier to track.
2. Private IP Address: This is an internal address of your device which are not
routed to the internet and no exchange of data can take place between a private
address and the internet.
Main difference between the HTTP and HTTPS
Parameter HTTP HTTPS
It is hypertext transfer protocol with
Protocol It is hypertext transfer protocol.
secure.
It is designed to prevent hackers from
It is less secure as the data can be
Security accessing critical information. It is
vulnerable to hackers.
secure against such attacks.
Port It uses port 80 by default It was use port 443 by default.
Starts with HTTP URLs begin with http:// HTTPs URLs begin with https://
If the website needs to collect the
It’s a good fit for websites
private information such as credit
Used for designed for information
card number, then it is a more secure
consumption like blogs.
protocol.
HTTPS scrambles the data before
HTTP does not scramble the data
transmission. At the receiver end, it
to be transmitted. That’s why
descrambles to recover the original
Scrambling there is a higher chance that
data. Therefore, the transmitted
transmitted information is
information is secure which can’t be
available to hackers.
hacked.
HTTPS does not have any separate
Protocol It operates at TCP/IP level. protocol. It operates using HTTP but
uses encrypted TLS/SSL connection.
Data HTTP website doesn’t use
HTTPS websites use data encryption.
encryption encryption.
Speed Fast Slower than HTTP
Parameter HTTP HTTPS
It Is highly secure as the data is
Vulnerability Vulnerable to hackers encrypted before it is seen across a
network.