0% found this document useful (0 votes)
26 views21 pages

Application Layer CN 3

Uploaded by

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

Application Layer CN 3

Uploaded by

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

application layer

what is it
https://www.javatpoint.com/computer-network-application-layer

Application Layer
The application layer in the OSI model is the closest layer to the end user which means that the application layer and end user can interact directly with the software application. The application layer programs are based on client and servers.

The Application layer includes the following functions:


Identifying communication partners: The application layer identifies the availability of communication partners for an application with data to transmit.

Determining resource availability: The application layer determines whether sufficient network resources are available for the requested communication.

Synchronizing communication: All the communications occur between the applications requires cooperation which is managed by an application layer.

Services of Application Layers


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.

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. FTAM defines a hierarchical virtual file in terms of file structure, file
attributes and the kind of operations performed on the files and their attributes.

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.

Mail Services: An application layer provides Email forwarding and storage.

Directory Services: An application contains a distributed database that provides access for global information about various objects and services.

Network Application Architecture


Application architecture is different from the network architecture. The network architecture is fixed and provides a set of services to applications. The application architecture, on the other hand, is designed by the application developer and defines how the application
should be structured over the various end systems.
Application architecture is of two types:

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:

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.

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.

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.

Features of P2P architecture


Self scalability: In a file sharing system, although each peer generates a workload by requesting the files, each peer also adds a service capacity by distributing the files to the peer.

Cost-effective: It is cost-effective as it does not require significant server infrastructure and server bandwidth.

Client and Server processes


A network application consists of a pair of processes that send the messages to each other over a network.

In P2P file-sharing system, a file is transferred from a process in one peer to a process in another peer. We label one of the two processes as the client and another process as the server.

With P2P file sharing, the peer which is downloading the file is known as a client, and the peer which is uploading the file is known as a server. However, we have observed in some applications such as P2P file sharing; a process can be both as a client and server.
Therefore, we can say that a process can both download and upload the files.

domain name system


https://www.javatpoint.com/computer-network-dns

https://www.geeksforgeeks.org/domain-name-system-dns-in-application-layer/
Domain Name System DNS is a hostname for IP address translation service. DNS is a distributed database implemented in a hierarchy of name servers. It is an application layer protocol for message exchange between clients and servers. It is required for the functioning
of the Internet.

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.

Types of Domain
There are various kinds of domain:

 Generic domains: .com(commercial), .edu(educational), .mil(military), .org(nonprofit organization), .net(similar to commercial) all these are generic domains.

 Country domain: .in India) .us .uk

 Inverse domain: if we want to know what is the domain name of the website. Ip to domain name mapping. So DNS can provide both the mapping for example to find the IP addresses of geeksforgeeks.org then we have to type

nslookup www.geeksforgeeks.org

Types of DNS

Organization of Domain
It is very difficult to find out the IP address associated with a website because there are millions of websites and with all those websites we should be able to generate the IP address immediately, there should not be a lot of delays for that to happen organization of the
database is very important.

application layer 1
Root DNS Server

DNS record: Domain name, IP address what is the validity? what is the time to live? and all the information related to that domain name. These records are stored in a tree-like structure.

Namespace: Set of possible names, flat or hierarchical. The naming system maintains a collection of bindings of names to values – given a name, a resolution mechanism returns the corresponding value.

Name server: It is an implementation of the resolution mechanism.

DNS = Name service in Internet – A zone is an administrative unit, and a domain is a subtree.

Name-to-Address Resolution
The host requests the DNS name server to resolve the domain name. And the name server returns the IP address corresponding to that domain name to the host so that the host can future connect to that IP address.

Name-to-Address Resolution

Hierarchy of Name Servers Root name servers: It is contacted by name servers that can not resolve the name. It contacts the authoritative name server if name mapping is not known. It then gets the mapping and returns the IP address to the host.

Top-level domain TLD server: It is responsible for com, org, edu, etc, and all top-level country domains like uk, fr, ca, in, etc. They have info about authoritative domain servers and know the names and IP addresses of each authoritative name server for the second-
level domains.

Authoritative name servers are the organizationʼs DNS servers, providing authoritative hostnames to IP mapping for organization servers. It can be maintained by an organization or service provider. In order to reach cse.dtu.in we have to ask the root DNS server, then
it will point out to the top-level domain server and then to the authoritative domain name server which actually contains the IP address. So the authoritative domain server will return the associative IP address.

Domain Name Server


The client machine sends a request to the local name server, which, if the root does not find the address in its database, sends a request to the root name server, which in turn, will route the query to a top-level domain TLD or authoritative name server. The root name
server can also contain some hostName to IP address mappings. The Top-level domain TLD server always knows who the authoritative name server is. So finally the IP address is returned to the local name server which in turn returns the IP address to the host.

Domain Name Server

How Does DNS Work?


The working of DNS starts with converting a hostname into an IP Address. A domain name serves as a distinctive identification for a website. It is used in place of an IP address to make it simpler for consumers to visit websites. Domain Name System works by executing
the database whose work is to store the name of hosts which are available on the Internet. The top-level domain server stores address information for top-level domains such as .com and .net, .org, and so on. If the Client sends the request, then the DNS resolver sends a
request to DNS Server to fetch the IP Address. In case, when it does not contain that particular IP Address with a hostname, it forwards the request to another DNS Server. When IP Address has arrived at the resolver, it completes the request over Internet Protocol.

For more, you can refer to Working of DNS Server.

How Does DNS Work?

Authoritative DNS Server Vs Recursive DNS Resolver


Parameters Authoritative DNS Server Recursive DNS Resolver

Function Holds the official DNS records for a domain Resolves DNS queries on behalf of clients

application layer 2
Role Provides answers to specific DNS queries Actively looks up information for clients

Query Handling Responds with authoritative DNS data Queries other DNS servers for DNS data

Client Interaction Doesnʼt directly interact with end-users Serves end-users or client applications

Data Source Stores the DNS records for specific domains Looks up data from other DNS servers

Caching Generally, doesnʼt perform caching Caches DNS responses for faster lookups

Hierarchical Resolution Does not participate in the recursive resolution Actively performs recursive name resolution

IP Address Has a fixed, known IP address IP address may vary depending on ISP

Zone Authority Manages a specific DNS zone (domain) Does not manage any specific DNS zone

What is DNS Lookup?


DNS Lookup or DNS Resolution can be simply termed as the process that helps in allowing devices and applications that translate readable domain names to the corresponding IP Addresses used by the computers for communicating over the web.

DNS Servers Involved in Loading a Webpage


Upon loading the webpage, several DNS Servers are responsible for translating the domain name into the corresponding IP Address of the web server hosting the website. Here is the list of main DNS servers involved in loading a Webpage.

Local DNS Resolver

Root DNS Servers

Top-Level Domain TLD DNS Servers

Authoritative DNS Servers

Web Server

This hierarchical system of DNS servers ensures that when you type a domain name into your web browser, it can be translated into the correct IP address, allowing you to access the desired webpage on the internet.
For more information you can refer DNS Look-Up article.

What is DNS Resolver?


DNS Resolver is simply called a DNS Client and has the functionality for initiating the process of DNS Lookup which is also called DNS Resolution. By using the DNS Resolver, applications can easily access different websites and services present on the Internet by using
domain names that are very much friendly to the user and that also resolves the problem of remembering IP Address.

What Are the Types of DNS Queries?


There are basically three types of DNS Queries that occur in DNS Lookup. These are stated below.

Recursive Query: In this query, if the resolver is unable to find the record, in that case, DNS client wants the DNS Server will respond to the client in any way like with the requested source record or an error message.

Iterative Query: Iterative Query is the query in which DNS Client wants the best answer possible from the DNS Server.

Non-Recursive Query: Non-Recursive Query is the query that occurs when a DNS Resolver queries a DNS Server for some record that has access to it because of the record that exists in its cache.

What is DNS Caching?


DNS Caching can be simply termed as the process used by DNS Resolvers for storing the previously resolved information of DNS that contains domain names, and IP Addresses for some time. The main principle of DNS Caching is to speed up the process of future DNS
lookup and also help in reducing the overall time of DNS Resolution.

answer 2

What is DNS in Computer Networks?


The Domain Name System DNS is a method for mapping alphabetic names to numeric IP addresses on the Internet, similar to how a phone book maps a person's name to a phone number. A DNS query is made when a web address URL is typed into a browser to
obtain the IP address of a web server associated with that name. The DNS directory is distributed worldwide to account for the millions of domain names listed and accessed daily. A domain name can correspond to more than one IP address if various users look for the
same website simultaneously. If 100 people search for scaler.com at the same time, each receives a different IP address from separate servers. If a domain name only had one server and one IP address, all 100 individuals would be waiting in line to access the site.

DNS contains various servers that cover the alphabetic domains to its numeric IP. The resolution process of the DNS can either be iterative or recursive.

1. Recursive DNS Service


In this type, if the DNS resolver only communicates to the root servers and the remaining servers were communicated
recursively

by the root server. The root server sends the output IP in this case) to the DNS resolver.

2. Iterative DNS Service


In this type, the

DNS resolver
can directly communicate and receive input from the servers at different levels.

How Does DNS Work?


DNS is concerned with translating a domain name into an

IP address

. To learn how this process works, look at the following steps.

application layer 3
 If you type scaler.com into a web browser, the query is transmitted over the Internet and received by a DNS resolver.

 The DNS resolver then queries a DNS root nameserver.

 After then, the root server responds to the DNS resolver with the address of a TLD DNS server (such as .com or .net), which keeps the information for the resolver's domains. Our request for scaler.com is directed to the .com top-level domain TLD.

 The DNS resolver then requests the .com TLD after receiving the address of the TLD by the root server.

 The IP address of the domain nameserver, scaler.com, is then returned by the TLD server.

 Finally, the DNS resolver sends a query to the domain's nameserver.

 The nameserver returns the IP address, for scaler.com, to the resolver.

 The DNS resolver then returns the IP address of the domain that was requested originally to the web browser.

 An HTTP request is sent to the IP address by the browser.

 The server returns the webpage to be rendered in the browser at that IP.

 Finally, after all the processes mentioned above, the user can now view the web page on their machine.

DNS Structure
In Request for Comments RFC 1035, the Internet Engineering Task Force IETF lays out the requirements for implementing domain names. In most cases, the domain name is included in the URL. Labels are the components that make up a domain name. Each
segment of the domain hierarchy denotes a subdivision and is read from right to left.

Each label on the TLD's left side designates a different subdomain of the domain to the right. For example, "scaler" is a subdomain of .com, and "www." is a subdomain of techtarget.com in the URL www.scaler.com. Each label can have up to 63 characters, and there
can be up to 127 levels of subdomains. Up to 253 characters can be used in the overall domain character length. Labels do not start with a hyphen and can not have entirely numeric TLD names.

DNS Server Types


To complete a DNS resolution, different types of servers are used. The order in which a query passes through the four name servers is listed below. They can either supply the requested domain name or refer you to alternative name servers.

DNS Resolver
An application, such as a web browser, sends DNS queries to the recursive server. It's the user's first resource, and it either provides the response to the query if it has it cached, or it goes to the next-level server if it doesn't. Before answering the client, this server may
undergo multiple iterations of querying.

Root Name Server


If the recursive server does not have the answer cached, it first sends a query to this server. The root name server is a directory of all the servers that will hold the requested information. The Internet Corporation for Assigned Names and Numbers ICANN, specifically
the Internet Assigned Numbers Authority, is in charge of these servers.

Top-Level Domain Server


A TLD nameserver keeps track of all domain names with the same domain extension, such as .com, .net, or whatever comes after the last dot in a URL. For example, a '.com' TLD nameserver includes information for every website that ends in '.com'. If a user searched
for scaler.com, the DNS resolver would submit a query to a .com TLD nameserver, which would answer by referring to the authoritative nameserver for that domain.

Authoritative name server


A DNS resolver will be directed to an authoritative nameserver when it receives a response from a TLD nameserver. The resolver's final stage in the path for an IP address is usually the authoritative nameserver. The server contains information specific to the domain
name it serves (e.g., scaler.com). If the authoritative name server has access to the requested record, it will return the requested hostname's IP address to the DNS Recursor (the librarian) who initiated the request.

Types of DNS Queries


In DNS resolution, generally, three types of queries occur. Combining these queries results in optimal DNS resolution, which reduces the distance traveled to resolve the domain to its respective IP. These queries are described below.

1. Recursive Query
A DNS client expects a DNS server (usually a DNS resolver) to respond to a recursive query with either the requested resource record or an error message if the resolver is unable to locate it.

2. Iterative Query
It occurs between the DNS resolver and the nonlocal name servers, like the root, TLD, and authoritative name servers. The root server refers to the recursive server to the TLD, which directs it to an authoritative server. If the authoritative server has the domain name, it
passes it on to the recursive server. Iterative requests either result in a response or a referral.

3. Nonrecursive Query
This usually happens when a DNS resolver client requests a record from a DNS server that it has access to, either because it is authorized for the record or because the record is in its cache. DNS servers typically cache DNS records to save unnecessary bandwidth
usage and pressure on upstream systems.

Common DNS Record


DNS records are the data that a query is looking for. Different information is required depending on the query, client, or application. Some recordings, such as the A record, are essential. There are various DNS record kinds, each having its unique function in indicating
how a query should be handled. The following are some examples of DNS records:

A Record stands for address and holds the IP address of a domain.

Ns record stands for name server records that specify which authoritative server is responsible for maintaining all information for a specific domain.

TXT records enable administrators to enter text into DNS.

When there is an alias, canonical name records are utilized instead of an A record. They're used to retry a query with two different domains from the same IP address.

How Does DNS Increase Web Performance?


We live in an era where speed is everything, and everyone wants speed with the maximum possible accuracy. To increase web performance, DNS uses caching to store the set of records or IP addresses received by the DNS queries for a fixed amount of time. Caching
improves efficiency by allowing servers to react fast when receiving a request for the same IP address.

To understand better, let us take an example. Suppose you want to revisit scaler topics to read our fantastic articles after reading this article. The IP address of the scaler topics is cached in your browser, and when you search for it the next day, it will get picked by the
cache instead of searching in various DNS servers. The time to which the record is held in the cache is called TTL. The time to liveTTL of a record is determined by administrators and is based on a variety of variables. More extended periods reduce server burden,
while shorter periods offer the most precise responses.

Domain Name System Caching


DNS caching aims to shorten the time it takes to receive a response to a DNS query. Caching allows DNS to save past answers to requests closer to clients, allowing them to obtain the same information faster the next time they query it. Caching improves efficiency by
allowing servers to react quickly when receiving a request for the same IP address. There are various places where caching is done. Some common ones include the following.

1. Operating System
Many operating systems include stub resolvers, which store DNS data and handle queries before sending them to an external server.

2. Web Browsers
Many web browsers store DNS for a fixed time. Browers allow fast resolution of IP addresses.

3. DNS Resolver
The DNS resolver can also cache the result of a DNS query. Some resolvers may already have some of the records needed to respond, allowing them to skip some steps in the DNS resolution process.

Domain Name System Security


Along with the various features and reliability the DNS provides, it also has some vulnerabilities. Two of the major vulnerabilities are

1. Cache Poisoning
DNS cache poisoning is a misleading assault that diverts traffic away from authorized websites and puts users at risk of malware infestations and data theft. An attacker uses a web server and cache to serve a malicious Hypertext Transfer Protocol HTTP response to
users in web cache poisoning. DNS resolvers cannot validate the data in their caches, which implies that inaccurate data will remain in the cache until the issue is manually fixed or TTL(time to live) expires.

application layer 4
2. Phishing
It is done to get usersʼ data by creating a false website of a well-known website with an utterly unauthorized backend. Phishing causes user privacy and financial status as it is intended to harm the end-user.

Domain Name Space


The name of a host is divided into various pieces called domains. These domains are structured in a hierarchical structure so that top-level domains are listed at the top of the hierarchy and low levels are listed at the bottom. When searching for a host, we start our
searching in ascending order, i.e., from leaf nodes to root nodes.
answer 3

What is DNS?
You may have heard of DNS, or Domain Name System, when you registered your domain or built a website. But what exactly is DNS, and why is it so important? DNS powers the internet by converting alphabetic names into numeric IP addresses—it makes it so you only
need to remember a domain name, like coolexample.com, instead of a numeric IP address. DNS is the backbone of the internet, and without DNS, you wouldn't be able to send an email, scroll through Instagram, or play video games with friends.

So, what is DNS and why is it important?


Back in the old days when you wanted to call someone, you had to memorize their phone number, keep track of their number in a notebook or rolodex, or look it up in the giant paper phonebook. Today, our cell phones can store those phone numbers in the contacts list,
and each number is mapped to a specific person or business. When you want to call your friend Jane, you don't have to remember her phone number—you just need to find her name in your contacts list and place the call.

You can think of DNS as the contacts list of the internet, but instead of mapping people to phone numbers, it maps domain names to IP addresses. And IP addresses are the language of the internet. Computers communicate with each other using Internet Protocol, or IP
addresses, which are specific sets of numbers and letters, such as 50.63.202.40 (an IPv4 address) or 20010db885a3000000006a2e:03717234 (an IPv6 address).

But those long strings of numbers and letters aren't very easy to remember. So, DNS maps IP addresses to human-friendly domain names, like coolexample.com. Remembering a domain name is usually a lot easier than keeping track of all those IP addresses, making it
more enjoyable to surf the web.

Okay, but how does DNS really work?


You may have heard the phrase DNS query or DNS lookup when searching for info on DNS. These are common ways to reference how DNS works and gets you to a particular website. But there are a few steps along the way, so we'll break those out and describe each
step. Heads up—we're about to get a bit technical.

 The query It all starts when you type a domain name, like coolexample.com, in the address bar of your web browser. After entering a domain, a query begins looking for the IP address of coolexample.com so your browser can display the correct content. The query
starts by checking the root server to see where to go next.

 The root servers There are 13 root servers working across the world, and they know all the DNS information of all domains. The root server looks through that DNS info to determine where to look next: the TLD nameserver.

 TLD nameservers The TLD, or top-level domain, is the last part of a domain name, such as .com in coolexample.com. Some of the most common TLDs are .com, .net, and .org, and some of the most popular country-specific TLDs are .uk, .ca, and .au. All TLDs have
a specific TLD nameserver that stores the DNS info for that specific TLD. So, if I want to visit coolexample.com, the original query needs to check the .com TLD nameservers to find the domain nameservers for coolexample.com.

 The domain nameserver This is where you'll find the DNS zone file for coolexample.com, and the zone file is where you'll find individual DNS records. These records, such as A records, MX records, and subdomains, can be added, edited, or deleted in the zone
file. The original query will look in the domain nameserver to find the A record for coolexample.com, which is mapped to a specific IP address. This IP address is what our query will use to retrieve and display the website content for coolexample.com in your web
browser.

Keep in mind that there are a few different stops DNS can take along the way, and sometimes things get stuck or don't work like we expect. And it can take up to 48 hours for DNS changes to show up on the internet globally. If you'd like more detail about how DNS
works, check out this handy guide from Verisign.

A little more about nameservers...


Have you ever heard someone mention "changing nameservers" for your domain? That's because the last step in the query is checking the domain nameservers for that all-important IP address. But you need to have the correct nameservers before the query can find
the correct IP address.

There are always at least two nameservers for a domain, and when nameservers are changed, the place where you manage DNS also changes. For example, if the domain is using default GoDaddy nameservers, the DNS zone file will be in your GoDaddy account. But if
the domain is using nameservers for a different company, the DNS zone file will be with that company instead.

What do I need to do with my DNS?


Now that you know a little about what DNS is and how it works, you're ready to start using DNS in your GoDaddy account. The easiest way to access your DNS is to sign in to your GoDaddy Domain Portfolio, click or tap directly on your domain name and then
select DNS. You should see your DNS zone file now, which is where you'll—you guessed it—manage DNS for that particular domain.
From here, you can take on some of the most common DNS tasks:

Connect your domain to your website by editing your A record, the record that determines what happens when someone enters your domain in their web browser by mapping your domain to an IP address.

If you already built a website somewhere else, or you'd like to connect your domain to your X (formerly Twitter), YouTube, or TikTok account, then domain forwarding might be the best option.

Make sure your emails get delivered to the right account with correct MX records.

Creating a separate online store where folks can shop for your products? Add a subdomain that points to the IP address of your online store, or add a subdomain that points to another domain.

And if you're setting up DNS somewhere else or using advanced DNS functions, change your nameservers to move your zone file to the other company.

Most DNS updates take effect within an hour, but could take up to 48 hours to update globally.
electronic mail
https://www.geeksforgeeks.org/introduction-to-electronic-mail/

Introduction:Electronic mail, commonly known as email, is a method of exchanging messages over the internet. Here are the basics of email:
 An email address: This is a unique identifier for each user, typically in the format of name@domain.com.

 An email client: This is a software program used to send, receive and manage emails, such as Gmail, Outlook, or Apple Mail.

 An email server: This is a computer system responsible for storing and forwarding emails to their intended recipients.

To send an email:
 Compose a new message in your email client.

 Enter the recipientʼs email address in the “Toˮ field.

 Add a subject line to summarize the content of the message.

 Write the body of the message.

 Attach any relevant files if needed.

 Click “Sendˮ to deliver the message to the recipientʼs email server.

 Emails can also include features such as cc (carbon copy) and bcc (blind carbon copy) to send copies of the message to multiple recipients, and reply, reply all, and forward options to manage the conversation.

Electronic Mail (e-mail) is one of most widely used services of Internet. This service allows an Internet user to send a message in formatted manner (mail) to the other Internet user in any part of world. Message in mail not only contain text, but it also contains images,
audio and videos data. The person who is sending mail is called sender and person who receives mail is called recipient. It is just like postal mail service. Components of EMail System : The basic components of an email system are  User Agent UA, Message Transfer
Agent MTA, Mail Box, and Spool file. These are explained as following below.

 User Agent UA  The UA is normally a program which is used to send and receive mail. Sometimes, it is called as mail reader. It accepts variety of commands for composing, receiving and replying to messages as well as for manipulation of the mailboxes.

 Message Transfer Agent MTA  MTA is actually responsible for transfer of mail from one system to another. To send a mail, a system must have client MTA and system MTA. It transfer mail to mailboxes of recipients if they are connected in the same machine. It
delivers mail to peer MTA if destination mailbox is in another machine. The delivery from one MTA to another MTA is done by Simple Mail Transfer Protocol.

 Mailbox : It is a file on local hard drive to collect mails. Delivered mails are present in this file. The user can read it delete it according to his/her requirement. To use e-mail system each user must have a mailbox . Access to mailbox is only to owner of mailbox.

 Spool file : This file contains mails that are to be sent. User agent appends outgoing mails in this file using SMTP. MTA extracts pending mail from spool file for their delivery. E-mail allows one name, an alias, to represent several different e-mail addresses. It is known
as mailing list, Whenever user have to sent a message, system checks recipientʼs name against alias database. If mailing list is present for defined alias, separate messages, one for each entry in the list, must be prepared and handed to MTA. If for defined alias, there
is no such mailing list is present, name itself becomes naming address and a single message is delivered to mail transfer entity.

Services provided by E-mail system :

Composition – The composition refer to process that creates messages and answers. For composition any kind of text editor can be used.

Transfer – Transfer means sending procedure of mail i.e. from the sender to recipient.

Reporting – Reporting refers to confirmation for delivery of mail. It help user to check whether their mail is delivered, lost or rejected.

application layer 5
Displaying – It refers to present mail in form that is understand by the user.

Disposition – This step concern with recipient that what will recipient do after receiving mail i.e save mail, delete before reading or delete after reading.

Advantages Or Disadvantages:Advantages of email:


 Convenient and fast communication with individuals or groups globally.

 Easy to store and search for past messages.

 Ability to send and receive attachments such as documents, images, and videos.

 Cost-effective compared to traditional mail and fax.

 Available 24/7.

Disadvantages of email:
 Risk of spam and phishing attacks.

 Overwhelming amount of emails can lead to information overload.

 Can lead to decreased face-to-face communication and loss of personal touch.

 Potential for miscommunication due to lack of tone and body language in written messages.

 Technical issues, such as server outages, can disrupt email service.

 It is important to use email responsibly and effectively, for example, by keeping the subject line clear and concise, using proper etiquette, and protecting against security threats.

What is email protocol

Email Protocols
Email protocols are a collection of protocols that are used to send and receive emails properly. The email protocols provide the ability for the client to transmit the mail to or from the intended mail server. Email protocols are a set of commands for sharing mails between two
computers. Email protocols establish communication between the sender and receiver for the transmission of email. Email forwarding includes components like two computers sending and receiving emails and the mail server. There are three basic types of email protocols.

Types of Email Protocols:


Three basic types of email protocols involved for sending and receiving mails are:

SMTP

POP3

IMAP

SMTP (Simple Mail Transfer Protocol):


Simple Mail Transfer Protocol is used to send mails over the internet. SMTP is an application layer and connection-oriented protocol. SMTP is efficient and reliable for sending emails. SMTP uses TCP as the transport layer protocol. It handles the sending and receiving of
messages between email servers over a TCP/IP network. This protocol along with sending emails also provides the feature of notification for incoming mails. When a sender sends an email then the senderʼs mail client sends it to the senderʼs mail server and then it is sent
to the receiver mail server through SMTP. SMTP commands are used to identify the sender and receiver email addresses along with the message to be sent.
Some of the SMTP commands are HELLO, MAIL FROM, RCPT TO, DATA, QUIT, VERIFY, SIZE, etc. SMTP sends an error message if the mail is not delivered to the receiver hence, reliable protocol.

For more details please refer to the Simple Mail Transfer Protocol SMTP article.

POP(Post Office Protocol):


Post Office Protocol is used to retrieve email for a single client. POP3 version is the current version of POP used. It is an application layer protocol. It allows to access mail offline and thus, needs less internet time. To access the message it has to be downloaded. POP
allows only a single mailbox to be created on the mail server. POP does not allow search facilities
Some of the POP commands are LOG IN, STAT, LIST, RETR, DELE, RSET, and QUIT. For more details please refer to the POP Full-Form article.

IMAP(Internet Message Access Protocol):


Internet Message Access Protocol is used to retrieve mails for multiple clients. There are several IMAP versions: IMAP, IMAP2, IMAP3, IMAP4, etc. IMAP is an application layer protocol. IMAP allows to access email without downloading them and also supports email
download. The emails are maintained by the remote server. It enables all email operations such as creating, manipulating, delete the email without reading it. IMAP allows you to search emails. It allows multiple mailboxes to be created on multiple mail servers and allows
concurrent access. Some of the IMAP commands are: IMAP_LOGIN, CREATE, DELETE, RENAME, SELECT, EXAMINE, and LOGOUT.
For more details please refer to the Internet Message Access Protocol IMAP article.

MIME(Multipurpose Internet Mail Extension Protocol):


Multipurpose Internet Mail Extension Protocol is an additional email protocol that allows non-ASCII data to be sent through SMTP. It allows users to send and receive different types of data like audio, images, videos and other application programs on the Internet. It allows
to send multiple attachments with single message. It allows to send message of unlimited length.

application layer 6
NEXT ANSWER

Electronic Mail
In this tutorial, we will be covering one of the most popular Internet services that is Electronic Mail(E-mail) in detail.

Electronic mail is often referred to as E-mail and it is a method used for exchanging digital messages.
Powered By

Electronic mail is mainly designed for human use.

It allows a message to includes text, image, audio as well as video.

This service allows one message to be sent to one or more than one recipient.

The E-mail systems are mainly based on the store-and-forward model where the E-mail server system accepts, forwards, deliver and store the messages on behalf of users who only need to connect to the infrastructure of the Email.

The Person who sends the email is referred to as the Sender while the person who receives an email is referred to asthe Recipient.

Need of an Email
By making use of Email, we can send any message at any time to anyone.

We can send the same message to several peoples at the same time.

It is a very fast and efficient way of transferring information.

The email system is very fast as compared to the Postal system.

Information can be easily forwarded to coworkers without retyping it.

Components of E-mail System


The basic Components of an Email system are as follows:

1.User Agent(UA)
It is a program that is mainly used to send and receive an email. It is also known as an email reader. User-Agent is used to compose, send and receive emails.

It is the first component of an Email.

User-agent also handles the mailboxes.

The User-agent mainly provides the services to the user in order to make the sending and receiving process of message easier.

Given below are some services provided by the User-Agent:


1.Reading the Message

2.Replying the Message


3.Composing the Message
4.Forwarding the Message.
5.Handling the Message.

2.Message Transfer Agent


The actual process of transferring the email is done through the Message Transfer Agent(MTA).

In order to send an Email, a system must have an MTA client.

In order to receive an email, a system must have an MTA server.

The protocol that is mainly used to define the MTA client and MTA server on the internet is called SMTPSimple Mail Transfer Protocol).

The SMTP mainly defines how the commands and responses must be sent back and forth

3.Message Access Agent


In the first and second stages of email delivery, we make use of SMTP.

SMTP is basically a Push protocol.

The third stage of the email delivery mainly needs the pull protocol, and at this stage, the message access agent is used.

The two protocols used to access messages are POP and IMAP4.

Architecture of Email
Now its time to take a look at the architecture of e-mail with the help of four scenarios:

First Scenario
When the sender and the receiver of an E-mail are on the same system, then there is the need for only two user agents.

Second Scenario
In this scenario, the sender and receiver of an e-mail are basically users on the two different systems. Also, the message needs to send over the Internet. In this case, we need to make use of User Agents and Message transfer agents(MTA).

Third Scenario
In this scenario, the sender is connected to the system via a point-to-point WAN it can be either a dial-up modem or a cable modem. While the receiver is directly connected to the system like it was connected in the second scenario.
Also in this case sender needs a User agent(UA) in order to prepare the message. After preparing the message the sender sends the message via a pair of MTA through LAN or WAN.

application layer 7
Fourth Scenario
In this scenario, the receiver is also connected to his mail server with the help of WAN or LAN.
When the message arrives the receiver needs to retrieve the message; thus there is a need for another set of client/server agents. The recipient makes use of MAAMessage access agent) client in order to retrieve the message.
In this, the client sends the request to the Mail Access agent(MAA) server and then makes a request for the transfer of messages.
This scenario is most commonly used today.

world wide web


https://www.geeksforgeeks.org/world-wide-web-www/

answer 1

What is World Wide Web?


World Wide Web, which is also known as a Web, is a collection of websites or web pages stored in web servers and connected to local computers through the internet. These websites contain text pages, digital images, audios, videos, etc. Users can access the content
of these sites from any part of the world over the internet using their devices such as computers, laptops, cell phones, etc. The WWW, along with internet, enables the retrieval and display of text and media to your device.

The building blocks of the Web are web pages which are formatted in HTML and connected by links called "hypertext" or hyperlinks and accessed by HTTP. These links are electronic connections that link related pieces of information so that users can access the
desired information quickly. Hypertext offers the advantage to select a word or phrase from text and thus to access other pages that provide additional information related to that word or phrase.
A web page is given an online address called a Uniform Resource Locator URL. A particular collection of web pages that belong to a specific URL is called a website, e.g., www.facebook.com, www.google.com, etc. So, the World Wide Web is like a huge electronic
book whose pages are stored on multiple servers across the world.

Small websites store all of their WebPages on a single server, but big websites or organizations place their WebPages on different servers in different countries so that when users of a country search their site they could get the information quickly from the nearest
server.
So, the web provides a communication platform for users to retrieve and exchange information over the internet. Unlike a book, where we move from one page to another in a sequence, on World Wide Web we follow a web of hypertext links to visit a web page and from
that web page to move to other web pages. You need a browser, which is installed on your computer, to access the Web.

Difference between World Wide Web and Internet:


Some people use the terms 'internet' and 'World Wide Web' interchangeably. They think they are the same thing, but it is not so. Internet is entirely different from WWW. It is a worldwide network of devices like computers, laptops, tablets, etc. It enables users to send
emails to other users and chat with them online. For example, when you send an email or chatting with someone online, you are using the internet.

But, when you have opened a website like google.com for information, you are using the World Wide Web; a network of servers over the internet. You request a webpage from your computer using a browser, and the server renders that page to your browser. Your
computer is called a client who runs a program (web browser), and asks the other computer (server) for the information it needs.

How the World Wide Web Works?


Now, we have understood that WWW is a collection of websites connected to the internet so that people can search and share information. Now, let us understand how it works!

application layer 8
The Web works as per the internet's basic client-server format as shown in the following image. The servers store and transfer web pages or information to user's computers on the network when requested by the users. A web server is a software program which
serves the web pages requested by web users using a browser. The computer of a user who requests documents from a server is known as a client. Browser, which is installed on the user' computer, allows users to view the retrieved documents.

All the websites are stored in web servers. Just as someone lives on rent in a house, a website occupies a space in a server and remains stored in it. The server hosts the website whenever a user requests its WebPages, and the website owner has to pay the hosting
price for the same.

The moment you open the browser and type a URL in the address bar or search something on Google, the WWW starts working. There are three main technologies involved in transferring information (web pages) from servers to clients (computers of users). These
technologies include Hypertext Markup Language HTML, Hypertext Transfer Protocol HTTP and Web browsers.

Hypertext Markup Language (HTML):

HTML is a standard markup language which is used for creating web pages. It describes the structure of web pages through HTML elements or tags. These tags are used to organize the pieces of content such as 'heading,' 'paragraph,' 'table,' 'Image,' and more. You
don't see HTML tags when you open a webpage as browsers don't display the tags and use them only to render the content of a web page. In simple words, HTML is used to display text, images, and other resources through a Web browser.

Web Browser:

A web browser, which is commonly known as a browser, is a program that displays text, data, pictures, videos, animation, and more. It provides a software interface that allows you to click hyperlinked resources on the World Wide Web. When you double click the
Browser icon installed on your computer to launch it, you get connected to the World Wide Web and can search Google or type a URL into the address bar.
In the beginning, browsers were used only for browsing due to their limited potential. Today, they are more advanced; along with browsing you can use them for e-mailing, transferring multimedia files, using social media sites, and participating in online discussion
groups and more. Some of the commonly used browsers include Google Chrome, Mozilla Firefox, Internet Explorer, Safari, and more.

Hypertext Transfer Protocol (HTTP):


Hyper Text Transfer Protocol HTTP is an application layer protocol which enables WWW to work smoothly and effectively. It is based on a client-server model. The client is a web browser which communicates with the web server which hosts the website. This
protocol defines how messages are formatted and transmitted and what actions the Web Server and browser should take in response to different commands. When you enter a URL in the browser, an HTTP command is sent to the Web server, and it transmits the
requested Web Page.

When we open a website using a browser, a connection to the web server is opened, and the browser communicates with the server through HTTP and sends a request. HTTP is carried over TCP/IP to communicate with the server. The server processes the browser's
request and sends a response, and then the connection is closed. Thus, the browser retrieves content from the server for the user.
answer 2
The World Wide Web WWW, often referred to simply as the web, has become an integral part of our daily lives, transforming the way we access information, communicate, and interact with the digital world. But have you ever wondered how this vast network of
interconnected websites, pages, and resources actually works? In this article, we embark on a journey to explore the intricate mechanisms that power the World Wide Web, uncovering the technologies, protocols, and concepts that enable seamless navigation and
information sharing across the global digital landscape.
What is WWW World Wide Web)?
The World Wide Web WWW, commonly referred to as the web, is a vast and interconnected network of digital information that is accessible through the internet. It consists of a collection of web pages, documents, multimedia content, and resources linked together
using hyperlinks. The web allows users to access, share, and interact with a diverse range of content, including text, images, videos, audio, and interactive applications.

Key components and concepts related to the World Wide Web include:
1. Web Pages and Websites: Web pages are individual documents containing information, often presented in HTML format, that can include text, images, multimedia, and links. These web pages are grouped together to form websites, which are hosted on web servers
and accessible via web browsers.
2. Hyperlinks: Hyperlinks, often called links, are clickable elements within web content that connect to other web pages, websites, or resources. Clicking on a hyperlink navigates the user to the linked content, enabling seamless exploration across the web.
3. Uniform Resource Locator URL A URL is a web address that specifies the location of a specific resource on the web. It consists of a protocol (such as HTTP or HTTPS, a domain name (e.g., www.example.com), and a path to the resource.
4. Web Browsers: Web browsers are software applications used to access and view web content. They interpret HTML and other web technologies to render web pages in a readable and interactive format for users.

5. HyperText Transfer Protocol HTTP and HTTPS HTTP is the protocol used for transferring data between a web browser and a web server. HTTPS is a secure version of HTTP that encrypts data to enhance security and privacy during data transmission.
6. Web Servers: Web servers are computers that store web content and respond to user requests by sending the requested web pages and resources back to the userʼs browser. They play a crucial role in delivering web content to users.
7. Web Development Technologies: Technologies such as HTML, CSS, JavaScript, and others are used by web developers to create and enhance web pages. HTML defines the structure of content, CSS styles its appearance, and JavaScript adds interactivity.
8. Search Engines: Search engines index web content, making it searchable and discoverable for users. They use algorithms to rank and present search results based on user queries, enabling efficient access to relevant information.
9. Social Media and Interactive Platforms: The web has evolved to include interactive platforms, social media networks, online communities, and applications that allow users to connect, communicate, and collaborate globally.

10. ECommerce and Online Services: The web serves as a platform for e-commerce, enabling online shopping, transactions, and the delivery of digital products and services.
Letʼs discuss the history of WWW or the World Wide Web.

Working of WWW:
The foundation of the World Wide Web relies on an assortment of distinct technologies, encompassing Web browsers, Hypertext Markup Language HTML, and Hypertext Transfer Protocol HTTP.

application layer 9
A Web browser serves as the gateway to access web pages, functioning as software that renders text, data, images, animations, and videos from the Internet. These programs enable the exploration of hyperlinked resources found on the World Wide Web through the
interfaces they provide. While initially, Web browsers were primarily employed for web browsing, their scope has significantly expanded. They now serve as versatile tools that cater to a variety of tasks, including conducting searches, email communication, file
transfers, and more. Among the widely utilized browsers are Internet Explorer, Opera Mini, and Google Chrome.

Features of WWW:
HyperText Information System

Cross-Platform

Distributed

Open Standards and Open Source

Uses Web Browsers to provide a single interface for many services

Dynamic, Interactive and Evolving.

“Web 2.0ˮ

Components of the Web


The components of the web include:

1. Web Pages: These are individual documents containing content such as text, images, videos, and interactive elements. Web pages are the building blocks of websites and are accessed using web browsers.
2. Websites: Websites are collections of interconnected web pages that are hosted on web servers. They are organized to provide information, services, or resources to users.
3. Hyperlinks: Hyperlinks, or links, are clickable elements within web content that allow users to navigate from one web page to another or to access different types of resources.
4. Uniform Resource Locator URL URLs are web addresses that specify the location of a resource on the web. They consist of a protocol (e.g., http, https), a domain name, and a path to the resource.
5. Web Browsers: Web browsers are software applications that enable users to access and view web pages. They interpret HTML and other web technologies to display content in a user-friendly format.

6. Web Servers: Web servers store and deliver web content to usersʼ browsers when requested. They process HTTP/HTTPS requests and respond with the requested resources.
7. Web Development Technologies: Technologies like HTML, CSS, and JavaScript are used to create and enhance web pages. HTML structures content, CSS styles its appearance, and JavaScript adds interactivity.
8. HyperText Transfer Protocol HTTP and HTTPS HTTP is the protocol for transferring data between web browsers and servers. HTTPS is a secure version that encrypts data to enhance security.
9. Search Engines: Search engines index web content, making it searchable and discoverable. They provide users with relevant search results based on queries.
10. Social Media and Interactive Platforms: The web hosts social media networks and platforms that enable users to connect, communicate, and collaborate.

11. ECommerce and Online Services: E-commerce platforms facilitate online shopping and transactions, while various online services offer resources, tools, and information.
answer 3

World Wide Web


In this tutorial, we will be covering the concept of the World Wide Web in Computer Networks.
The World Wide Web or Web is basically a collection of information that is linked together from points all over the world. It is also abbreviated as WWW.

Powered By

Play

Unmute
Fullscreen

World wide web provides flexibility, portability, and user-friendly features.

It mainly consists of a worldwide collection of electronic documents (i.e, Web Pages).

It is basically a way of exchanging information between computers on the Internet.

The WWW is mainly the network of pages consists of images, text, and sounds on the Internet which can be simply viewed on the browser by using the browser software.

It was invented by Tim Berners-Lee.

Components of WWW
The Components of WWW mainly falls into two categories:

 Structural Components

 Semantic Components

Architecture of WWW
The WWW is mainly a distributed client/server service where a client using the browser can access the service using a server. The Service that is provided is distributed over many different locations commonly known as sites/websites.

Each website holds one or more documents that are generally referred to as web pages.

Where each web page contains a link to other pages on the same site or at other sites.

These pages can be retrieved and viewed by using browsers.

application layer 10
In the above case, the client sends some information that belongs to site A. It generally sends a request through its browser It is a program that is used to fetch the documents on the web).
and also the request generally contains other information like the address of the site, web page(URL).
The server at site A finds the document then sends it to the client. after that when the user or say the client finds the reference to another document that includes the web page at site B.
The reference generally contains the URL of site B. And the client is interested to take a look at this document too. Then after the client sends the request to the new site and then the new page is retrieved.

Now we will cover the components of WWW in detail.

1.Client/Browser
The Client/Web browser is basically a program that is used to communicate with the webserver on the Internet.

Each browser mainly comprises of three components and these are:

Controller

Interpreter

Client Protocols

The Controller mainly receives the input from the input device, after that it uses the client programs in order to access the documents.

After accessing the document, the controller makes use of an interpreter in order to display the document on the screen.

An interpreter can be Java, HTML, javascript mainly depending upon the type of the document.

The Client protocol can be FTP, HTTP, TELNET.

2.Server
The Computer that is mainly available for the network resources and in order to provide services to the other computer upon request is generally known as the server.

The Web pages are mainly stored on the server.

Whenever the request of the client arrives then the corresponding document is sent to the client.

The connection between the client and the server is TCP.

It can become more efficient through multithreading or multiprocessing. Because in this case, the server can answer more than one request at a time.

3.URL
URL is an abbreviation of the Uniform resource locator.

It is basically a standard used for specifying any kind of information on the Internet.

In order to access any page the client generally needs an address.

To facilitate the access of the documents throughout the world HTTP generally makes use of Locators.

URL mainly defines the four things:

Protocol
It is a client/server program that is mainly used to retrieve the document. A commonly used protocol is HTTP.

Host Computer
It is the computer on which the information is located. It is not mandatory because it is the name given to any computer that hosts the web page.

Port
The URL can optionally contain the port number of the server. If the port number is included then it is generally inserted in between the host and path and is generally separated from the host by the colon.

Path
It indicates the pathname of the file where the information is located.

4.HTML
HTML is an abbreviation of Hypertext Markup Language.

It is generally used for creating web pages.

It is mainly used to define the contents, structure, and organization of the web page.

5.XML
XML is an abbreviation of Extensible Markup Language. It mainly helps in order to define the common syntax in the semantic web.

Features of WWW
Given below are some of the features provided by the World Wide Web:

Provides a system for Hypertext information

Open standards and Open source

Distributed.

Mainly makes the use of Web Browser in order to provide a single interface for many services.

Dynamic

Interactive

Cross-Platform

Advantages of WWW
Given below are the benefits offered by WWW

It mainly provides all the information for Free.

Provides rapid Interactive way of Communication.

It is accessible from anywhere.

It has become the Global source of media.

It mainly facilitates the exchange of a huge volume of data.

Disadvantages of WWW
There are some drawbacks of the WWW and these are as follows;

It is difficult to prioritize and filter some information.

There is no guarantee of finding what one person is looking for.

There occurs some danger in case of overload of Information.

There is no quality control over the available data.

There is no regulation.
http
https://www.javatpoint.com/computer-network-http

answer 1

application layer 11
What is HTTP Protocol?
Have you thought about what happens when we enter a URL Uniform Resource Locator) in the browser to visit a website? The browser fetches the IP address corresponding to the entered URL using DNS Domain Name System). Once the browser gets
the IPaddress corresponding to the entered URL, the browser sends a request to the server at the backend (along with the IP address of the website) to fetch the webpage of the website. In return, the browser receives a response from the server and this response
contains the HTML Hypertext Markup Language) information of the webpage.

These requests and responses that are sent follow a protocol which is called HTTP Hypertext Transfer Protocol). Nowadays, everything that we do in our day-to-day life is directly or indirectly related to the internet and the web. For example today, you were in a
mood to read about the Hypertext Transfer Protocol HTTP, so you must have searched on the web about HTTP and you eventually landed on scaler topics.
Let us understand what is HTTP protocol with the help of an example.
Let's say you opened your web browser and in the URL field, you entered "scaler.com". As soon as you press the enter button, your web browser looks for the IP address corresponding to the website "scaler.com" using DNS. After getting the IP address, the browser
sends a request to the web server and asks the webserver to get the webpage information corresponding to the IP address. The web browser in return sends a response to the browser which contains the webpage information corresponding to the given IP address.

These requests and responses that are sent by the browser and the web server follow a protocol called HTTP.
Hence, HTTP is a protocol that is used to transfer hypertext data (example HTML data), plain text data, audio data, video data, etc. over the internet.
HTTP relies on the TCP Transmission Control Protocol) and it works on the PORT number 80. Hence, a connection is first established TCP connection) and then the data is transferred over this connection.

How Does Hypertext Transfer Protocol Work?


Below is a step-by-step discussion of how the Hypertext transfer protocol works.
1. Extracting the IP address of a URL Uniform Resource Locator)
In our browser, we enter the URL address of the website we want to visit. Once we enter the URL address of the website, the browser with the help of the DNS extracts the IP address corresponding to the URL address that is entered.

The DNS contains the mapping of the URLs along with their corresponding IP addresses.

2. Sending request to the server to access the webpage and receiving response
Once we get the IP address of the website, the browser sends an HTTP request to the server to extract the HTML webpage corresponding to the IP address. This request is sent over PORT 80 using TCP. Once the server receives this HTTP request, it responds back
with an HTTP response. This HTTP response consists of the information related to the HTML page corresponding to the IP address of the website.

3. Receiving HTTP response and displaying the webpage

The browser receives the HTML information for the website along with the response and hence, it processes and displays the HTMLpage on the browser. Finally, the users can see an HTML page for the URL that they entered.

What is in an HTTP Request?


In order to fetch the webpage corresponding to a given IP address, the browser sends a request (called as HTTP request) to the web server.
An HTTP request consists of 3 parts i.e. a request line, request headers, and request body.
Given below is the structure of an HTTP request.

Request Line
An HTTP request-line consists of 3 parts which are discussed below.

 Request Method A request method defines what type of request is needed to send to the web server. For example, if we want to fetch something from the web server, we use a GET request method. If we want to send something from the client to the web server,
we use POST request method.

 Request URI It is the the URI of the website/destination we want to reach. For example "http://scaler.com/".

 HTTP Version It states the version of the HTTP we are using. For example HTTP 1.0, HTTP 1.1.

Request Headers
Request headers contain additional information about the resource/data that is to be fetched from the web server.
For example, if we want the data in the plaintext format, we can specify that information in the HTTP headers.
We can also specify the information related to the client using headers like the browser it is using etc.

application layer 12
We can send more than one HTTP header along with an HTTP request to specify the additional information that is to be sent along with an HTTP request.

Request Body
It is an optional part of an HTTP request. If there is a requirement to send some data along with an HTTP request, we send that data along with the HTTP Body.
For example: If we want to send the details of a user which is taken through a form at the client side to the web server, we can send this data in the HTTP body.

What is in an HTTP Request Body?


As discussed above, an HTTP body is an optional part of an HTTP request. If there is a requirement to send some data along with an HTTP request, we send that data along with the HTTP Body.
For example: If we want to send details of the user which is taken through a form at the client side to the web server. We can send this data in the HTTP body.

What is in an HTTP Response?


After the client/browser sends an HTTP request to the web server, the server responds back to the browser with an HTTP response. This response consists of all the data that is requested by the client in the HTTP request.
Below is the structure of an HTTP response.

An HTTPresponse consists of 3 parts:

 Response Status Line

 Response Headers

 Response Body

Response Status Line


An HTTP request line consists of 3 parts which are discussed below.

 HTTP Version It states the version of theHTTPwe are using. For example HTTP 1.0, HTTP 1.1.

 Status Code It is a three-digit code that tells the status of the HTTP response. For example code 200 stands for a successful HTTP response.

 Status Phrase It is a short description of the status code.

Response Headers
The response headers are used to specify the additional information related to the response data and the server.

Response Body
It is an optional part of the HTTP response. The data which is requested by the client using the HTTP request is sent from server to client by keeping it inside the response body.

What is an HTTP Status Code?


An HTTP status code is a three-digit code that specifies the status of the HTTP response. Some of the commonly seen HTTP status codes along with their description are given below.

Status Code Phrase Description

200 OK A successful request.

404 Page not found The requested document is not present.

500 Internal server error An error such as a server crash has occurred.

400 Bad request There is some syntax error in the code.

What are HTTP Response Headers?


As discussed in the above section as well, HTTP response headers are used to specify the information related to the data that is to be sent to the client through the HTTP response.
We can also specify the information related to the server like the server's local clock time, server name, etc. using the response headers.

Features of HTTP
 HTTP is a stateless protocol

HTTP does not store the state/information of the client as well as the server and hence, is a stateless protocol. But with the help of cookies, we can make HTTP protocol as a stateful protocol.

 Connection Oriented Protocol

Since HTTP relies on the TCP Transmission Control Protocol), it is a connection-oriented protocol. Hence, the connection is established and the data is sent over the connection only after the establishment of the connection.

 Compatible with multiple file-formats

HTTP can be used to transfer data in various file formats such as HTML, plaintext file, audio file, video file etc.

Components of HTTP-based Systems


An HTTP-based system consists of 3 parts i.e. a client, a server, and numerous proxies lying in between the client and the server.

 Client A client is the one that sends the HTTP request so as to fetch information from the server at the backend. For example: The web browser you are using to surf the internet is the client that is actually requesting the webpages from the web server.

 Server A server is present at the backend which receives requests from the client. It sends an HTTP response back to the client along with the data which is requested by the client.

 Proxy In order to make the process of the request and response faster, we use proxy servers. Proxy servers are generally smaller servers that contain some of the information that is present in the main server.

The first request from the client is always sent to a proxy server that is actually closest to the web client. If the requested data is present in the proxy server, the proxy server responds back to the client along with the requested data. But if the requested data is not
present in the proxy server, the client sends the HTTP request to the main server.

HTTP Messages
We discussed the parts of the HTTP request Request Line, Request Headers, Request Body) and the parts of the HTTP response Response Status-Line, Response Headers, Response Body) in the above sections. This combined information in the HTTP request and
theHTTPresponse are called a request message and response message respectively.

Below is the structure of a request message and a response message.


Request Message

application layer 13
Response Message

HTTP vs HTTPS
Hypertext Transfer Protocol HTTP Hypertext Transfer Protocol Secure HTTPS

1. HTTP is a protocol used to transfer data over the internet. 1. HTTPS is also used to transfer data over the internet but it is more secure than HTTP.

2. It does not use cryptographic algorithms to encrypt the transmitted data. 2. It uses cryptographic algorithms like SSL Secure Socket Layer) and TLSTransport Layer Security) which makes it more secure than HTTP

3. The connection of HTTP takes place on PORT 80. 3. The connection of HTTP takes place on PORT 443.

4. HTTP is faster than HTTPS since it does not include any additional steps for the cryptographic algorithms. 4. HTTPS is slower than HTTP since it includes additional steps for the cryptographic algorithms.

answer 2
HTTP stands for HyperText Transfer Protocol. Tim Berner invents it. HyperText is the type of text that is specially coded with the help of some standard coding language called HyperText Markup Language HTML. HTTP/2 is the new version of HTTP. HTTP/3 is the
latest version of HTTP, which is published in 2022.

The protocol used to transfer hypertext between two computers is known as HyperText Transfer Protocol.
HTTP provides a standard between a web browser and a web server to establish communication. It is a set of rules for transferring data from one computer to another. Data such as text, images, and other multimedia files are shared on the World Wide Web.
Whenever a web user opens their web browser, the user indirectly uses HTTP. It is an application protocol that is used for distributed, collaborative, hypermedia information systems.

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., www.facebook.com ). This URL is now sent to the 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.

HTTP Connection

HTTP Request
HTTP request is simply termed as the information or data that is needed by Internet browsers for loading a website. This is simply known as HTTP Request.

There is some common information that is generally present in all HTTP requests. These are mentioned below.

HTTP Version

URL

HTTP Method

HTTP Request Headers

HTTP Body

HTTP Request Headers


HTTP Request Headers generally store information in the form of key-value and must be present in each HTTP Request. The use of this Request Header is to provide core information about the clientʼs information, etc.

HTTP Request Body


HTTP Request Body simply contains the information that has to be transferred. HTTP Request has the information or data to be sent to these browsers.

HTTP Method
HTTP Methods are simply HTTP Verb. In spite of being present so many HTTP Methods, the most common HTTP Methods are HTTP GET and HTTP POST. These two are generally used in HTTP cases. In HTTP GET, the information is received in the form of a
website.
For more, refer to the Difference Between HTTP GET and HTTP POST.

HTTP Response
HTTP Response is simply the answer to what a Server gets when the request is raised. There are various things contained in HTTP Response, some of them are listed below.

HTTP Status Code

HTTP Headers

HTTP Body

application layer 14
HTTP Response

HTTP Response Headers


HTTP Response headers are simply like an HTTP Request where it has that work to send some important files and data to the HTTP Response Body.

HTTP Response Body


HTTP Responses are the responses that are received successfully upon the request. Generally, it comes under the requests generated by the web. In most cases, the request is of transferring the HTML data into a webpage.

HTTP Status Code


HTTP Status Codes are the 3Digit codes that tell the message or simply tell us about the HTTP Request whether it has been completed or not. There are simply 5 types of status codes.

Informational

Successful

Re-directional

Client-Error

Server-Error

For more, refer to HTTP Status Codes.

History of HTTP
Tim Berners Lee and his team at CERN get credit for inventing original HTTP and associated technologies.

HTTP version 0.9 This was the first version of HTTP which was introduced in 1991.

HTTP version 1.0 In 1996, RFC 1945 Request For Comments) was introduced in HTTP version 1.0.

HTTP version 1.1 In January 1997, RFC 2068 was introduced in HTTP version 1.1. Improvements and updates to the HTTP version 1.1 standard were released under RFC 2616 in June 1999.

HTTP version 2.0 The HTTP version 2.0 specification was published as RFC 7540 on May 14, 2015.

HTTP version 3.0 HTTP version 3.0 is based on the previous RFC draft. It is renamed as Hyper-Text Transfer Protocol QUIC which is a transport layer network protocol developed by Google.

Characteristics of HTTP
HTTP is IP based communication protocol that is used to deliver data from server to client or vice-versa.

The server processes a request, which is raised by the client, and also server and client know each other only during the current bid and response period.

Any type of content can be exchanged as long as the server and client are compatible with it.

Once data is exchanged, servers and clients are no longer connected.

It is a request and response protocol based on client and server requirements.

It is a connection-less protocol because after the connection is closed, the server does not remember anything about the client and the client does not remember anything about the server.

It is a stateless protocol because both client and server do not expect anything from each other but they are still able to communicate.

Advantages of HTTP
Memory usage and CPU usage are low because of fewer simultaneous connections.

Since there are few TCP connections hence network congestion is less.

Since handshaking is done at the initial connection stage, then latency is reduced because there is no further need for handshaking for subsequent requests.

The error can be reported without closing the connection.

HTTP allows HTTP pipe-lining of requests or responses.

Disadvantages of HTTP
HTTP requires high power to establish communication and transfer data.

HTTP is less secure because it does not use any encryption method like HTTPS and use TLS to encrypt regular HTTP requests and response.

HTTP is not optimized for cellular phones and it is too gabby.

HTTP does not offer a genuine exchange of data because it is less secure.

The client does not close the connection until it receives complete data from the server; hence, the server needs to wait for data completion and cannot be available for other clients during this time.

Cookies in HTTP
An HTTP cookie (web cookie, browser cookie) is a little piece of data that a server transmits to a userʼs web browser. When making subsequent queries, the browser may keep the cookie and transmit it back to the same server. An HTTP cookie is typically used, for
example, to maintain a userʼs login state, to determine whether two requests originate from the same browser. For the stateless HTTP protocol, it retains stateful information.

HTTP status code


Three-digit codes known as HTTP status codes are most frequently used to show if an HTTP request has been fulfilled successfully. The five blocks below represent the breakdown of status codes:

1x Informative

2xx Achievement

3xx Reorientation

4xx Client Mistake

5xx Error on the Server

Different numbers between 00 and 99 are denoted by the “xxˮ. Status codes that begin with “2ˮ denote a successful outcome. For instance, the most typical answers sent after a client requests a webpage have a status code of “200 OK,ˮ which denotes that the
request was successfully fulfilled.

Is it possible to launch DDoS assaults over HTTP?


Remember that because HTTP is a “statelessˮ protocol, every command executed over it operates independently of every other operation. Each HTTP request opened and terminated a TCP connection according to the original specification. Multiple HTTP requests
can now flow over a persistent TCP connection in HTTP 1.1 and later versions of the protocol, which improves resource use. Large-scale HTTP requests are regarded as application layer or layer 7 attacks in the context of DoS or DDoS attacks, and they can be used
to mount an attack on a target device.

answer 3

HTTP
ADVERTISEMENT
ADVERTISEMENT

HTTP stands for HyperText Transfer Protocol.

It is a protocol used to access the data on the World Wide Web (www).

The HTTP protocol can be used to transfer the data in the form of plain text, hypertext, audio, video, and so on.

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.

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.

HTTP is used to carry the data in the form of MIME-like format.

application layer 15
HTTP is similar to SMTP as the data is transferred between client and server. The HTTP differs from the SMTP in the way the messages are sent from the client to the server and from server to the client. SMTP messages are stored and forwarded while HTTP
messages are delivered immediately.

Features of HTTP:
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.

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.

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.

HTTP Transactions

The above figure shows the HTTP transaction between client and server. The client initiates a transaction by sending a request message to the server. The server replies to the request message by sending a response message.

Messages
HTTP messages are of two types: request and response. Both the message types follow the same message format.

Request Message: The request message is sent by the client that consists of a request line, headers, and sometimes a body.

Response Message: The response message is sent by the server to the client that consists of a status line, headers, and sometimes a body.

ADVERTISEMENT

Uniform Resource Locator (URL)


A client that wants to access the document in an internet needs an address and to facilitate the access of documents, the HTTP uses the concept of Uniform Resource Locator URL.

The Uniform Resource Locator URL is a standard way of specifying any kind of information on the internet.

The URL defines four parts: method, host computer, port, and path.

Method: The method is the protocol used to retrieve the document from a server. For example, HTTP.

Host: The host is the computer where the information is stored, and the computer is given an alias name. Web pages are mainly stored in the computers and the computers are given an alias name that begins with the characters "www". This field is not mandatory.

Port: The URL can also contain the port number of the server, but it's an optional field. If the port number is included, then it must come between the host and path and it should be separated from the host by a colon.

Path: Path is the pathname of the file where the information is stored. The path itself contain slashes that separate the directories from the subdirectories and files.
what is FTP
https://www.geeksforgeeks.org/file-transfer-protocol-ftp/

answer 1

File Transfer Protocol (FTP)

File transfer protocol FTP is an Internet tool provided by TCP/IP. The first feature of FTP is developed by Abhay Bhushan in 1971. It helps to transfer files from one computer to another by providing access to directories or folders on remote computers and allows
software, data, text file to be transferred between different kinds of computers. The end-user in the connection is known as localhost and the server which provides data is known as the remote host.

The goals of FTP are:

It encourages the direct use of remote computers.

It shields users from system variations (operating system, directory structures, file structures, etc.)

It promotes sharing of files and other types of data.

Why FTP?
FTP is a standard communication protocol. There are various other protocols like HTTP which are used to transfer files between computers, but they lack clarity and focus as compared to FTP. Moreover, the systems involved in connection are heterogeneous systems,
i.e. they differ in operating systems, directory, structures, character sets, etc the FTP shields the user from these differences and transfer data efficiently and reliably. FTP can transfer ASCII, EBCDIC, or image files. The ASCII is the default file share format, in this, each
character is encoded by NVT ASCII. In ASCII or EBCDIC the destination must be ready to accept files in this mode. The image file format is the default format for transforming binary files.

FTP Clients
FTP works on a client-server model. The FTP client is a program that runs on the userʼs computer to enable the user to talk to and get files from remote computers. It is a set of commands that establishes the connection between two hosts, helps to transfer the files,
and then closes the connection. Some of the commands are: get filename(retrieve the file from server), mget filename(retrieve multiple files from the server ), ls(lists files available in the current directory of the server). There are also built-in FTP programs, which makes
it easier to transfer files and it does not require remembering the commands.

application layer 16
Type of FTP Connections
FTP connections are of two types:
Active FTP connection: In an Active FTP connection, the client establishes the command channel and the server establishes the data channel. When the client requests the data over the connection the server initiates the transfer of the data to the client. It is not the
default connection because it may cause problems if there is a firewall in between the client and the server.
Passive FTP connection: In a Passive FTP connection, the client establishes both the data channel as well as the command channel. When the client requests the data over the connection, the server sends a random port number to the client, as soon as the client
receives this port number it establishes the data channel. It is the default connection, as it works better even if the client is protected by the firewall.

Anonymous FTP
Some sites can enable anonymous FTP whose files are available for public access. So, the user can access those files without any username or password. Instead, the username is set to anonymous and the password to the guest by default. Here, the access of the
user is very limited. For example, the user can copy the files but not allowed to navigate through directories.

How FTP works?


The FTP connection is established between two systems and they communicate with each other using a network. So, for the connection, the user can get permission by providing the credentials to the FTP server or can use anonymous FTP.

When an FTP connection is established, there are two types of communication channels are also established and they are known as command channel and data channel. The command channel is used to transfer the commands and responses from client to server and
server to client. FTP uses the same approach as TELNET or SMTP to communicate across the control connection. It uses the NVT ASCII character set for communication. It uses port number 21. Whereas the data channel is used to actually transfer the data between
client and server. It uses port number 20.

The FTP client using the URL gives the FTP command along with the FTP server address. As soon as the server and the client get connected to the network, the user logins using User ID and password. If the user is not registered with the server, then also he/she can
access the files by using the anonymous login where the password is the clientʼs email address. The server verifies the user login and allows the client to access the files. The client transfers the desired files and exits the connection. The figure below shows the working
of FTP.

Detail steps of FTP


FTP client contacts FTP server at port 21 specifying TCP as transport protocol.

Client obtain authorization over control connection.

Client browse remote directory by sending commands over control connection.

When server receives a command for a file transfer, the server open a TCP data connection to client.

after transferring one file, server closes connection.

server opens a second TCP data connection to transfer another file.

FTP server maintains state i.e. current directory, earlier authentication.

Transmission mode
FTP transfer files using any of the following modes:

Stream Mode: It is the default mode. In stream mode, the data is transferred from FTP to TCP in stream bytes. Here TCP is the cause for fragmenting data into small segments. The connection is automatically closed if the transforming data is in the stream bytes.
Otherwise, the sender will close the connection.

Block Mode: In block mode, the data is transferred from FTP to TCP in the form of blocks, and each block followed by a 3-byte header. The first byte of the block contains the information about the block so it is known as the description block and the other two
bytes contain the size of the block.

Compressed Mode: This mode is used to transfer big files. As we know that, due to the size limit we can not transfer big files on the internet, so the compressed mode is used to decrease the size of the file into small and send it on the internet.

FTP Commands
Sr. no. Command Meaning

1. cd Changes the working directory on the remote host

2. close Closes the FTP connection

3. quit Quits FTP

4. pwd displays the current working Directory on the remote host

5. dis or ls Provides a Directory Listing of the current working directory

6. help Displays a list of all client FTP commands

7. remotehelp Displays a list of all server FTP commands

8. type Allows the user to specify the file type

9. struct specifies the files structure

Applications of FTP
The following are the applications of FTP

FTP connection is used by different big business organizations for transferring files in between them, like sharing files to other employees working at different locations or different branches of the organization.

FTP connection is used by IT companies to provide backup files at disaster recovery sites.

Financial services use FTP connections to securely transfer financial documents to the respective company, organization, or government.

Employees use FTP connections to share any data with their co-workers.

Advantages
Multiple transfers: FTP helps to transfer multiple large files in between the systems.

Efficiency: FTP helps to organize files in an efficient manner and transfer them efficiently over the network.

Security: FTP provides access to any user only through user ID and password. Moreover, the server can create multiple levels of access.

Continuous transfer: If the transfer of the file is interrupted by any means, then the user can resume the file transfer whenever the connection is established.

Simple: FTP is very simple to implement and use, thus it is a widely used connection.

Speed: It is the fastest way to transfer files from one computer to another.

Disadvantages
Less security: FTP does not provide an encryption facility when transferring files. Moreover, the username and passwords are in plain text and not a combination of symbols, digits, and alphabets, which makes it easier to be attacked by hackers.

Old technology: FTP is one of the oldest protocols and thus it uses multiple TCP/IP connections to transfer files. These connections are hindered by firewalls.

application layer 17
Virus: The FTP connection is difficult to be scanned for viruses, which again increases the risk of vulnerability.

Limited: The FTP provides very limited user permission and mobile device access.

Memory and programming: FTP requires more memory and programming efforts, as it is very difficult to find errors without the commands.
answer 2

What is File Transfer Protocol (FTP)?

File Transfer Protocol FTP is a communication layer protocol that transfers files from one computer to another computer, with one functioning as a server if both computers have an internet connection.

FTP, a networking protocol that connects client and server, allows users to download web pages, data, and programs from other services. FTP is used when a user wants to download information to their own computer.

The end user's machine is commonly referred to as the local host in an FTP transaction. The second computer involved in FTP is a remote host, which is usually a server. Both computers must be network-connected and correctly set up to transmit files over FTP. To
access these services, servers must be configured to run FTP services, and clients must have FTP software installed.

Despite the fact that many file transfers can be performed using Hypertext Transfer Protocol HTTP, i.e., another protocol in the TCP/IP stack. Simultaneously, FTP is still being frequently utilized behind the scenes for a variety of applications, including banking
services. It is also used in web browsers to download new software.

Individuals and businesses can share electronic files with others via the file transfer protocol without needing to be in the same space. This can be accomplished via an FTP client or the cloud.

FTP clients come with most online browsers, allowing users to transfer files from their computer to a server and vice versa. Some users may prefer to utilize a third-party FTP client because many of them often come with additional features. Some FTP clients that
are available for free to download are FileZilla Client, FTP Voyager, WinSCP, CoffeeCup Free FTP, and Core FTP.

Many people have utilized FTP without even knowing it. You've used FTP if you've ever downloaded a file from a website. The starting step is to log in, which can be done automatically or by manually entering a username and password. FTP requires a specific port
number to access an FTP server. You can transfer files using your FTP client after connecting to the FTP server. Some public FTP servers do not require you to sign in because you can access them anonymously.

How Does File Transfer Protocol (FTP) Work?


FTP works by connecting two computers that are attempting to interact with each other. One connection handles the commands and answers that get sent between the two clients, while the other channel handles data transfer. During an FTP transmission, the
computers, servers, or proxy servers communicate using four commands. These are send, get, change directory, and transfer.

FTP transfers files in three separate modes: block, stream, and compressed. The stream mode allows FTP to manage information in a string of data without any boundaries between them. The block mode divides the data into blocks, and in the compressed mode,
FTP uses an algorithm called the Lempel-Ziv to compress the data.

A typical FTP transfer works like this:

 Firstly, a user must log in to the FTP server. There are some servers that make some or all of their content available without requiring a login; they are referred to as anonymous FTP.

 When a user raises a request to download a file, the client starts a discussion with the server.

 A client can use FTP to download, move, delete, upload, rename, and copy files on a server.

FTP sessions work in both active and passive modes:

Active mode: When a client requests a session over a command channel, the server establishes a data connection with the client and starts sending data.

Passive mode: The command channel is used by the server to transfer the information needed by the client to start a data channel. Because the client initiates all connections in passive mode, it can easily traverse firewalls and network address translation
gateways.

FTP can be accessed via a basic command-line interface (from a console or terminal window in Microsoft Windows, Apple macOS, or Linux) or with a dedicated graphical user interface. FTP clients can also be used with web browsers.

What is the Purpose of FTP, and Why is It Important?

File Transfer Protocol is a type of standard network protocol that allows for large-scale file transfers through IP networks. Other systems, such as email or an HTTP web service, can manage file and data transmission in the absence of FTP, but they lack the clarity of
focus, accuracy, and control that FTP provides.

FTP is a file transfer protocol that is used to send files between systems and has a variety of uses. Some of the uses of FTP are:

application layer 18
Backup: Individual users can use FTP to store their data by uploading it onto a server. Also, backup services can use FTP to backup data from one location to a secure backup server running FTP services.

Replication: FTP can also be used for replication and is similar to backup. It involves duplicating data from one computer to another but takes a more extensive approach to increase availability and resilience.

Access and data loading: FTP is also often used to access shared web hosting and cloud services to load data onto a remote server.

Types of FTP in Computer Networks


File transfers can be performed in a variety of ways by an FTP server and client software:

1. Anonymous FTP
This is the most fundamental type of FTP. Anonymous File Transfer Protocol FTP allows remote users to connect to an FTP server without a user ID and password. It is mostly used for downloading freely distributable material. It operates on a port.

Anonymous FTP allows unprotected (no password required) access to specific information about a remote system. The remote site determines what information is made to be accessible for broad access. Such information is considered public and can be accessed
by anybody. It is the responsibility of the owner who owns the information to ensure that only appropriate information is made available.

2. Password Protected FTP


It is also a fundamental type of FTP but demands a password and username, although the service may not be encrypted or secure. It also operates on port 21.

3. FTP Secure (FTPS)


FTPS File Transfer Protocol Secure) is a File Transfer Protocol modification that supports Transport Layer Security TLS and the now-defunct Secure Sockets Layer SSL.

FTPS is a more secure version of FTP that enables organizations to securely interact with their trading partners, users, and customers. FTPS-enabled software such as client certificates and server identities which are used to authenticate sent files. It usually uses
port 990 by default.

4. FTP over Explicit SSL/TLS (FTPES)


FTPES is similar to FTPS, as it explicitly connects to your web hosting account instead of FTP's implicit connection. The difference is primarily in how and when the login information is encrypted. SmartFile uses FTPES, which is known to be the safest FTP
connection. For example, when making online transactions at 'secure' websites, FTPES is employed. It adds explicit TLS support by converting an unencrypted FTP connection via port 21 to an encrypted connection.

5. Secure FTP (SFTP)


The Secure File Transfer Protocol SFTP is a file protocol that transfers large files over the internet. It is based on the File Transfer Protocol FTP and contains Secure Shell SSH security features.

Secure Shell is an internet security cryptography component. The Internet Engineering Task Force IETF created SSH and SFTP to improve web security and avoid password sniffing and revealing critical information in plain text. SFTP transfers files securely via
SSH and encrypted FTP instructions.

SFTP can be useful in any case where sensitive data must be safeguarded. For example, trade secrets may not be covered by any specific data privacy rule, yet they might be devastating if they fall into the wrong hands. A corporate user may use SFTP to send files
holding trade secrets or other sensitive information. A private user may also desire to encrypt their communications. This is also known as the Secure Shell SSH File Transfer Protocol.

Objectives of FTP
To encourage file sharing (computer programs and/or data).

To encourage the indirect or implicit use of remote computers (via programs).

To protect a user from variations in file storage systems between hosts.

To reliably and efficiently transfer data (designed mainly for use by programs).

FTP Commands
FTP commands Description

! It is used to switch between the operating system and FTP.

? It is used to print the FTP command's details.

append It is used to append the two files together.

ascii It is used to change the file transfer mode to ASCII. It is the default mode for most FTP programs.

binary It sets the file transfer mode to binary.

bell This command sounds a bell when it completes any command.

bye It is used to exit and end the ftp session.

cd This command alters the remote system's directory.

close It is used to put an end to a remote system's FTP connection.

dir It is used to get a list of contents in the remote directory.

delete It's used to remove a file from the currently open remote directory.

debug It is used to turn on and off debugging mode. This command does not necessitate a remote system connection.

disconnect It is used to end the FTP session.

ftp It is used to access the FTP interpreter.

get It is used to copy data (a file) from a server to a client device.

hash It enables the client to request a file's cryptographic hash from a server-FTP process.

help It is used to show local assistance information. This command does not necessitate a remote system connection.

lcd It is used to modify the directory on your local system.

literal It sends the argument to the remote system.

ls It is used to display a list of the names of the files in the current remote directory.

mdelete It is used to delete a large number of files at once.

mdir It is used to list the contents of multiple remote directories.

mget It is used to copy multiple data files from a remote computer to a local computer.

mkdir It is used to create a new directory within the current remote directory.

mls This command displays a list of the file names in the various server directories.

mput This command copies a large number of files from a user device to a server device.

open This command is used to establish a link with another computer system.

put This command copies a file from a user device to a server device.

pwd This command is used to find the path name of the remote system's local directory.

quit It is used to end an FTP session (same as bye).

quote It sends the argument to the remote system.

recv This command retrieves a file from a remote machine.

remotehelp It is used to display the information of the remote system.

rename This command renames the system's file.

rmdir This command is used to delete a directory from the local remote directory.

send This command is used to send a file.

status This command displays the system's current status.

type It is used to specify the file transfer type.

user This command transmits the new user's information.

verbose It is used to turn verbose on/off.

FTP Client
An FTP client is software that connects a host computer to a remote server, typically an FTP server. An FTP client allows two computers to transfer data and files in both directions through a TCP network or an Internet connection. An FTP client operates on a
client/server architecture, with the host computer as the client and the remote FTP server as the central server.

FTP client is generally used to transmit data between a remote and local host. It operates by connecting the host computer to the FTP server using the server's domain, IP address, username, and password. Following user identification, a connection is established
between the two systems, allowing the host computer to upload data to the FTP server. An FTP client typically allows for one or more simultaneous file transfers. Moreover, most FTP clients may connect to many FTP servers simultaneously, providing status updates
on the uploading process and notifications about successful and failed uploads. In addition to uploading, the host computer can use the FTP client to get files from the FTP server.

Some of the following FTP clients that are available:

Client Description

FileZilla It is a free FTP client that supports FTP, FTPS, and SFTP on Windows, macOS, and Linux.

Transmit It is a macOS FTP client that supports FTP and SSH.

WinSCP It is a free (open-source) SSH File Transfer Protocol for Windows FTP clients that supports FTP, SSH, and SFTP.

WS_FTP It is yet another FTP client for Windows that supports SSH.

FTP Security
FTP was not designed to be secure. It is widely regarded as an insecure protocol since it uses clear-text usernames and passwords for authentication and does not use encryption. Sniffing, spoofing, and brute force attacks, among other basic attack methods, are
all possible with data sent via FTP.

There are numerous ways that are commonly used to address these challenges and secure FTP usage. FTPS is an FTP extension that can encrypt connections at the request of the client. Transport Layer Security TLS, Secure Socket Layer SSL, and SSH File
Transfer Protocol (also known as Secure File Transfer Protocol or SFTP are frequently used as more secure alternatives to FTP because they use encrypted connections.

Advantages of File Transfer Protocol

application layer 19
1. FTP can handle large file transfers

For many businesses, file transfer requirements extend beyond sending a single Microsoft Word document at a time. It is possible that you will need to deliver hundreds of gigabytes of data all at once. FTP makes large transfers simple, and you also benefit from a faster
pace of file transfers.

2. Your workflow will improve


Using FTP, you can transmit many directories at once. If you frequently transfer files, you will realize how useful this feature can be. You can transfer many folders simultaneously instead of sending individual files or even single directories. Also, you can continue
working while transfers are being processed and accomplish these transfers more quickly.
3. Transfers can be resumed

You will not lose any progress if your file transfer is interrupted. You can continue a paused file transfer via FTP if your connection is lost. Continue from where you left off without restarting the transfer from the beginning.
4. Transfers can be scheduled

With the best FTP solutions, you can schedule transfers at times when they will have the least impact on your workflow, such as overnight or on the weekend. This will not affect your productivity, and the transfers are automated according to your convenience.

5. Recover Lost Data


Even when unexpected circumstances occur, top FTP providers ensure that data is never lost. Your files are frequently and automatically backed up with disaster recovery, so you don't have to worry about losing data if there is a flood, fire, or power outage.

Disadvantages of File Transfer Protocol


1. FTP Lacks Security

FTP is an inherently insecure method of data transfer. When a file is delivered via FTP protocol, the data such as login and password are all shared in plain text, making it easy for a hacker to obtain this information. To ensure data security, choose an updated version of
FTP such as FTPS or SFTP.

2. Not all vendors are created equal


Businesses use hosted FTP solutions managed by vendors to address the issue of security vulnerabilities. Unfortunately, not all vendors pass the necessary security tests, making it challenging to select the best one. Each competitor has its own set of features, and
many of them lack aspects that you actually require, such as access restrictions, security, usability, price alternatives, etc.

3. FTP Does Not Encrypt the Data

FTP does not provide encryption which is why transferred data gets easily intercepted. When browsing for an FTP provider, you'll realize that encryption isn't always available or enforced. Encryption is a necessity if your company uses sensitive data like card payment
data or ePHI (electronic protected health information).
4. FTP is Vulnerable to Attack

If you select the wrong vendor, you may be stuck with an FTP solution that does not protect your data, leaving you vulnerable to hacker tactics such as brute force or spoofing attacks. Hackers use brute force to break into your solution by iterating through
thousands of username and password combinations in seconds. They eventually find the correct password/username combination, and they're in.

FTP is also subject to spoofing attacks, in which the hacker poses as a genuine network user or device on the network. A hacker may appear on the network and intercept your data if you access a public Wi-Fi network at a coffee shop. You may be subject to brute
force or spoofing attacks depending on the type of FTP vendor you use.

5. Compliance is a Problem
When using FTP to deliver files, you need also be concerned about compliance. FTP on its own or using an insecure FTP vendor could expose your company to non-compliance charges. A lack of encryption plays a significant role in noncompliance. Thus it would be
best if you chose a solution that fits your compliance requirements.

6. Monitoring activity is Difficult

Before partnering with an FTP vendor, consider your company's reporting requirements. Many FTP systems have an inability or inconsistent tracking of what has been uploaded on the remote system. As a result, if files are mishandled, or a data breach happens, you
may have difficulty tracing the source of the problem.

Example of File Transfer Protocol


FTP software is relatively simple to install. FileZilla is a free FTP client that can be easily downloaded. Enter the address, the port number, and the server password of the server you want to connect to.

Once allowed access, the user's files on their local system and the accessed server will be viewable. The user can download files from the server or upload files from their local system to the server. If they have the necessary permissions, they can also make
changes to files on the server.
streaming audio and video : incomplete

streaming stored video


Streaming of videos involve, storing of prerecorded videos on servers.

Users send request to those servers.

Users may watch the video from the start till the end, and may pause it anytime, do a forward or reverse skip, or stop the video whenever they want to do so.

There are 3 video streaming categories:

1. UDP Streaming
2. HTTP Streaming
3. Adaptive HTTP Streaming

Usually, todayʼs system employs HTTP and Adaptive HTTP Streaming. Common characteristic of these three streaming technique is that the extensive use of Client-Side Buffering. Advantages of Client Buffering:

 Client side buffer absorbs variations in server-client delay. Until the delayed packet is received by the client, the received-but not yet-played video will be played.

 Even if bandwidth drops, user can view the video until the buffer is completely drained.

1. UDP STREAMING UDP servers send video chunks Chunk: unit of information that contains either control information or user data) to clients, based on clientʼs consumption rate. It transmits chunks at a rate, that matches clientʼs video consumption rate by clocking out
video chunks over UDP over steady state. For example,

Video consumption rate = 2Mbps


Capacity of one UDP packet = 8000 bits

Therefore,
Transmission rate = 8000 bits/2 Mbps = 4000 msec

Properties:

UDP does not use congestion-control mechanism. Video chunks are encapsulated before transmission using RTT Real-Time Transport) Protocol.

Additional client-server path is maintained to inform the client state to server like pause, resume, skip and so on.

Drawbacks:

Bandwidth is unpredictable and varying between client and server.

UDP streaming requires a separate media control server like RTSP server(Real-Time Streaming Protocol) to track client state(pause, resume etc).

Devices are configured with firewalls to block UDP traffic which prevents the reception of UDP packets to clients.

2. HTTP STREAMING Video is stored in an HTTP server as a simple ordinary file with a unique URL. Client establishes TCP connection with server and issues a HTTP GET request for that URL. Server sends the video file along with an HTTP RESPONSE. Now the client
buffer grabs the video and then displayed on user screen. Advantages:

Use of HTTP over TCP allows the video to traverse firewalls and NATs easily.

Does not need any media control servers like RTSP servers causing reduction in cost of large-scale deployment over internet.

Disadvantages:

Latency or lag between a video is recorded and played. This can make the viewers more annoyed and irritated. Only a few milliseconds delay is acceptable.

Early pre-fetching of video, but, what if, the user stops playing the video at a early stage? Wastage of data is not appreciated.

All clients receive the same encoding of the video, despite the large variations in bandwidth amount available to different clients and also for same client over time.

Uses: Youtube and Netflix uses HTTP streaming mechanism. 3. ADAPTIVE HTTP STREAMING The major drawbacks of HTTP streaming, lead to development of new type of HTTP based streaming referred to as DASH Dynamic Adaptive Streaming over HTTP. Videos are
encoded into different bit rate versions, having different quality. The host makes a dynamic video request of few seconds in length from different bit versions. When bandwidth is high, high bit rate chunks are received hence high quality similarly, low quality video during
low bandwidth. Advantages:

DASH uses the user to switch over different qualities of video on screen.

Client can use HTTP byte-range request to precisely control the amount of pre-fetched video that is locally buffered.

DASH also stores the audio in different versions with different quality and different bit-rate with unique URL.

So the client dynamically selects the video and audio chunks and synchronizes it locally in the play-out. Uses: COMCAST uses DASH for streaming high quality video contents.

Advantages of Streaming Stored Video


Convenience: Streaming stored video allows users to access content at any time, without the need for a physical media or download.

Increased Accessibility: Streaming stored video makes it easier for users to access content, as it eliminates the need for physical storage and retrieval of media.

On-demand Content: Streaming stored video allows users to choose what they want to watch, and when they want to watch it, rather than having to conform to a schedule.

Increased User Experience: Streaming stored video provides a better viewing experience compared to traditional broadcast, as it allows for higher quality video and improved interactivity.

Scalability: Streaming stored video can be scaled to meet the demands of large numbers of users, making it a reliable solution for large-scale video distribution.

Applications of Streaming Stored Video


Online Entertainment: Streaming stored video is commonly used for online entertainment, allowing users to access movies, TV shows, and other content from the internet.

Video Conferencing: Streaming stored video is used for video conferencing, allowing for real-time communication between participants.

Education: Streaming stored video is used in education to facilitate online classes and lectures.

application layer 20
Corporate Communications: Streaming stored video is used in corporate communications to share important information with employees and stakeholders.

Advertising: Streaming stored video is used for advertising, allowing businesses to reach target audiences with video content.

application layer 21

You might also like