0% found this document useful (0 votes)
10 views13 pages

Understanding DHCP, DNS, HTTP, FTP, SMTP

The document provides an overview of various networking protocols including DHCP, DNS, HTTP, HTTPS, FTP, SFTP, and SMTP. It explains the operation of DHCP in detail, the types of DNS queries, and the functionalities of HTTP and its secure variant HTTPS. Additionally, it covers FTP and SFTP protocols for file transfer, as well as the SMTP protocol for sending emails, detailing their commands and operations.

Uploaded by

yashpatil098q
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)
10 views13 pages

Understanding DHCP, DNS, HTTP, FTP, SMTP

The document provides an overview of various networking protocols including DHCP, DNS, HTTP, HTTPS, FTP, SFTP, and SMTP. It explains the operation of DHCP in detail, the types of DNS queries, and the functionalities of HTTP and its secure variant HTTPS. Additionally, it covers FTP and SFTP protocols for file transfer, as well as the SMTP protocol for sending emails, detailing their commands and operations.

Uploaded by

yashpatil098q
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

Module 06

University questions and answers

Q. Explain DHCP message format and its operation in detail.

The Dynamic Host Configuration Protocol (DHCP) is a client/server protocol designed to


provide the four pieces of information for a diskless computer or a computer that is booted for
the first time.
DHCP operation:
The DHCP client and server can either be on the same network or on different networks.
• • Same Network:

Although the practice is not very common, the administrator may put the client and the server
on the same network as shown in Figure1.

Fig1: Client and server on the same network


In this case, the operation can be described as follows:
i. The DHCP server issues a passive open command on UDP port number 67 and waits for a
client.
ii. A booted client issues an active open command on port number 68. The message is
encapsulated in a UDP user datagram, using the destination port number 67 and the source port
number 68. The UDP user datagram, in turn, is encapsulated in an IP datagram.
iii. The client uses all 0sas the source address and all 1s as the destination address.
iv. The server responds with either a broadcast or a unicast message using UDP source port
number 67 and destination port number 68. The response can be unicast because the server
knows the IP address of the client.
v. It also knows the physical address of the client, which means it does not need the services of
ARP for logical to physical address mapping.
• Different Networks : o As in other application-layer processes, a client can be in one network
and the server in another, separated by several other networks. Figure2 shows the situation.
The DHCP request is broadcast because the client does not know the IP address
of the server. o A broadcast IP datagram cannot pass through any router. A router
receiving such a packet discards it. Recall that an IP address of all 1s is a limited
broadcast address.
o To solve the problem, there is a need for an intermediary. One of the hosts (or a
router that can be configured to operate at the application layer) can be used as a
relay. The host in this case is called a relay agent.
o The relay agent knows the unicast address of a DHCP server and listens for
broadcast messages on port 67.
o When it receives this type of packet, it encapsulates the message in a unicast
datagram and sends the request to the DHCP server. The packet, carrying a
unicast destination address, is routed by any router and reaches the DHCP server.
o The DHCP server knows the message comes from a relay agent because one of
the fields in the request message defines the IP address ofthe relay agent. The
relay agent, after receiving the reply, sends it to the DHCP client.

Q. What is the need of DNS? Explain DNS Name Space.


Q. Write a short note on following b) DNS
There are three types of queries in the DNS system:
Recursive Query
In a recursive query, a DNS client provides a hostname, and the DNS Resolver “must” provide
an answer—it responds with either a relevant resource record, or an error message if it can't be
found. The resolver starts a recursive query process, starting from the DNS Root Server, until
it finds the Authoritative Name Server that holds the IP address and other information for the
requested hostname.
Iterative Query
In an iterative query, a DNS client provides a hostname, and the DNS Resolver returns the best
answer it can. If the DNS resolver has the relevant DNS records in its cache, it returns them. If
not, it refers the DNS client to the Root Server, or another Authoritative Name Server which is
nearest to the required DNS zone. The DNS client must then repeat the query directly against
the DNS server it was referred to.
Non-Recursive Query
A non-recursive query is a query in which the DNS Resolver already knows the answer. It
either immediately returns a DNS record because it already stores it in local cache, or queries
a DNS Name Server which is authoritative for the record, meaning it definitely holds the correct
IP for that hostname. In both cases, there is no need for additional rounds of queries (like in
recursive or iterative queries). Rather, a response is immediately returned to the client.

Q Write Short note on HTTP.

HTTP:
The Hypertext Transfer Protocol (HTTP) is an application protocol for distributed,
collaborative, hypermedia information systems. HTTP is the foundation of data communication
for the World Wide Web, where hypertext documents include hyperlinks to other resources that
the user can easily access, for example by a mouse click or by tapping the screen in a web
browser.
An HTTP session is a sequence of network request-response transactions. An HTTP client
initiates a request by establishing a Transmission Control Protocol (TCP) connection to a
particular port on a server (typically port 80, occasionally port 8080). An HTTP server listening
on that port waits for a client's request message. Upon receiving the request, the server sends
back a status and a message of its own. The body of this message is typically the requested
resource, although an error message or other information may also be returned. HTTP is also
called stateless protocol because the sessions between the HTTP browser
and HTTP client are not saved for later reference. The session is information is only valid until
the session exists.

HTTPS:
Hypertext Transfer Protocol Secure (HTTPS) is a variant of the standard web transfer protocol
(HTTP) that adds a layer of security on the data in transit through a secure socket layer (SSL)
or transport layer security (TLS) protocol connection.
HTTPS enables encrypted communication and secure connection between a remote user and
the primary web server. HTTPS is primarily designed to provide enhanced security layer over
the unsecured HTTP protocol for sensitive data and transactions such as billing details, credit
card transactions and user login etc. HTTPS encrypts every data packet in transition using SSL
or TLS encryption technique to avoid intermediary hackers and attackers to extract the content
of the data; even if the connection is compromised.
HTTPS is configured and supported by default in most web browsers and initiates a secure
connection automatically if the accessed web server requests secure connection. HTTPS works
in collaboration with certificate authorities that evaluates the security certificate of the accessed
website.

Q Write short note on FTP.

FTP:
File Transfer Protocol (FTP) is a standard Internet protocol for transmitting files between
computers on the Internet over TCP/IP connections.
FTP is a client-server protocol that relies on two communications channels between client and
server: a command channel for control information (commands and responses) and a data
channel for transmitting file content. Clients initiate conversations with servers by requesting
to download a file. Using FTP, a client can upload, download, delete, rename, move and copy
files on a server. A user typically needs to log on to the FTP server, although some servers make
some or all of their content available without login, also known as anonymous FTP. FTP uses
two well-known TCP ports: Port 21 for control connection and Port 20 for the data connection.
The control connection remains connected during the entire interactive FTP session. The data
connection is opened and then closed for each file transfer. It opens each time commands that
involve transferring files are used, and it closes when the file is transferred. In other words,
when a user starts an FTP session, the control connection opens. While the control connection
is open, the data connection can be opened and closed multiple times if several files are
transferred.
SFTP:
SFTP, which stands for SSH File Transfer Protocol, or Secure File Transfer Protocol, is a
separate protocol packaged with SSH that works in a similar way but over a secure connection.
The advantage is the ability to leverage a secure connection to transfer files and traverse the
filesystem on both the local and remote system.
In almost all cases, SFTP is preferable to FTP because of its underlying security features and
ability to rely on an SSH connection. FTP is an insecure protocol that should only be used in
limited cases or on networks you trust.
SSH or Secure Shell is a cryptographic network protocol for operating network services
securely over an unsecured network. Typical applications include remote command-line, login,
and remote command execution, but any network service can be secured with SSH.
By default, SFTP uses the SSH protocol to authenticate and establish a secure connection.
Because of this, the same authentication methods are available that are present in SSH.
SFTP also protects against password sniffing and man-in-the-middle attacks. It protects the
integrity of the data using encryption and cryptographic hash functions, and authenticates both
the server and the user.

Q. Write Short no SMTP.


It is a standard protocol used for sending e-mail efficiently and reliably over the internet.
Key Points:

SMTP is application level protocol.


SMTP is connection-oriented protocol.
SMTP is text-based protocol.
It handles exchange of messages between e-mail servers over TCP/IP network.
Apart from transferring e-mail, SMTP also provides notification regarding incoming mail.
When you send e-mail, your e-mail client sends it to your e-mail server which further
contacts the recipient mail server using SMTP client.
In case, message cannot be delivered, an error report is sent to the sender which makes SMTP
a reliable protocol.

S.N. Command Description


1 HELLO
This command initiates the SMTP conversation.

2 EHELLO
This is an alternative command to initiate the conversation.
ESMTP indicates that the sender server wants to use extended
SMTP protocol.
3 MAIL FROM
This indicates the sender’s address.

4 RCPT TO
It identifies the recipient of the mail. In order to deliver similar
message to multiple users this command can be repeated multiple
times.
5 SIZE
This command let the server know the size of attached message in
bytes.
6 DATA
The DATA command signifies that a stream of data will follow.
Here stream of data refers to the body of the message.
7 QUIT
This command is used to terminate the SMTP connection.

8 VERFY
This command is used by the receiving server in order to verify
whether the given username is valid or not.
9 EXPN
It is same as VRFY, except it will list all the users name when it
used with a distribution list.

You might also like