Acn - PT 2 Question Bank 2024 25 Final
Acn - PT 2 Question Bank 2024 25 Final
● SMTP stands for SIMPLE MAIL ● POP3 stands for POST PROTOCOL
TRANSFER PROTOCOL & is VERSION 3 & is
● also called Push Protocol ● also called a Pop Protocol.
● SMTP is used for sending emails. ● POP3 is used to retrieve the emails.
● SMTP transfer Email from Sender’s ● POP3 retrieves Emails from the
Device to the mailbox on the mailbox on the receipting server to
recipient’s server. their device.
● It is a message transfer Agent. ● It is a message access Agent POP3
SMTP has two MTAS. uses has two MAAs
● Hello
● Database description
o The primary role of reliability is Error Control. In reality, no transmission will be 100 percent
error-free delivery. Therefore, transport layer protocols are designed to provide error-free
transmission.
o The data link layer also provides the error handling mechanism, but it ensures only node-to-
node error-free delivery. However, node-to-node reliability does not ensure the end-to-end
reliability.
o The data link layer checks for the error between each network. If an error is introduced inside
one of the routers, then this error will not be caught by the data link layer. It only detects those
errors that have been introduced between the beginning and end of the link. Therefore, the
transport layer performs the checking for the errors end-to-end to ensure that the packet has
arrived correctly.
o Flow Control
o Flow control is used to prevent the sender from overwhelming the receiver. If the receiver is
overloaded with too much data, then the receiver discards the packets and asking for the
retransmission of packets. This increases network congestion and thus, reducing the system
performance. The transport layer is responsible for flow control. It uses the sliding window
protocol that makes the data transmission more efficient as well as it controls the flow of data
so that the receiver does not become overwhelmed. Sliding window protocol is byte oriented
rather than frame oriented.
To explain the architecture of e-mail, we give four scenarios. We begin with the simplest situation
and add complexity as we proceed. The fourth scenario is the most common in the exchange of
e-mail.
Four Scenario are as following:-
First Scenario – When the sender and the receiver of an e-mail are on the same mail server, we
need only two user against.
Second Scenario – When the sender and the receiver of an e-mail are on different mail servers,
we need two UAs and a pair of MTAs (client and server).
Third Scenario – When the sender is connected to the mail server via a LAN or a WAN, we
need two UAs and two pairs of MTAs (Client and server).
Four Scenario – When both server and receiver are connected to the mail server via a LAN or a
WAN , we need two UAs, two pairs of MTAs(client and server), and a pairs of MAAs(client and
server). This is the most common situation today.
List different timers used in TCP.
TCP uses several timers to ensure that excessive delays are not encountered during
communications.
Several of these timers are elegant, handling problems that are not immediately obvious at first
analysis. Each of the timers used by TCP is examined in the following subsections, which reveal
its role in ensuring data is properly sent from one connection to another.
TCP implementations use at least four timers as shown in following Fig.
1. Measured RTT (RTTm): The measured Round Trip Time (RTT) for a segment is the time
required for the segment to reach the destination and be acknowledged, although the
acknowledgment may include other segments.
2. Smoothed RTT (RTTS): It is the weighted average of RTTm. RTTM is likely to change and its
fluctuation is so high that a single measurement cannot be used to calculate RTO.
Deviated RTT (RTTd): Most implementation do not use RTTS alone so RTT deviated is also
calculated to find out RTO.
(i) Initially No value
(ii) After first measurement RTTd=RTTm/2
RTO Calculation: The value of RTO is based on the smoothed round-trip time and its
deviation. Most implementations use the following formula to calculate the RTO:
Initial value → Original (given in question). After any measurement→RTO=RTTs
+4*RTTd
2) Persistent Timer:
To deal with a zero-window-size deadlock situation, TCP uses a persistence timer.
When the sending TCP receives an acknowledgment with a window size of zero, it starts
a persistence timer.
When the persistence timer goes off, the sending TCP sends a special segment called a
probe. This segment contains only 1 byte of new data. It has a sequence number, but its
sequence number is never acknowledged; it is even ignored inCalculating the sequence
number for the rest of the data. The probe causes the receiving TCP to resend the
acknowledgment which was lost.
3) Keepalive Timer:
A keepalive timer is used to prevent a long idle connection between two TCPs. If a client
opens a TCP connection to a server transfers some data and becomes silent the client
will crash.
In this case, the connection remains open forever. So a keepalive timer is used. Each
time the server hears from a client, it resets this timer. The time-out is usually 2 hours. .
If the server does not hear from the client after 2 hours, it sends a probe segment. If
there is no response after 10 probes, each of which is 75 s apart, it assumes that the
client is down and terminates the connection.
4) Time Wait Timer:
This timer is used during TCP connection termination. The timer starts after sending the
last Ack for 2nd FIN and closing the connection.
After a TCP connection is closed, it is possible for datagrams that are still making their
way through the network to attempt to access the closed port. The quiet timer is
intended to prevent the just closed port from reopening again quickly and receiving
these last datagrams.
The quiet timer is usually set to twice the maximum segment lifetime (the same value as
the Time- To-Live field in an IP header), ensuring that all segments still heading for the
port have been discarded.
Explain the working of SSH.
SSH (Secure Shell) is the most popular remote login application program.
SSH uses client-server architecture in its implementation. An SSH server can be
deployed and allow several SSH clients to connect to it. The architecture of SSH
is shown in following Fig. and the SSH process is as follows:
1) The SSH client on the left provides authentication to the SSH server on the
right. In the initial connection, the client receives a host key of the server,
therefore, in all subsequent connections, the client will know it is connecting to
the same SSH server. This places less emphasis on the IP address of the SSH
server, which can be easily spoofed, and more emphasis on the host key of the
server, which cannot be spoofed very easily.
2) The SSH server determines if the client is authorized to connect to the SSH
service by verifying the username/password or public key that the client has
presented for authentication. This process is completely encrypted.
3) If the SSH server authenticates the client and the client is authorized, the
SSH session begins between the two entities. All communication is completely
encrypted.
● SMTP Commands:
1. HELO: Used by client to identify itself.
2. MAIL FROM: Identify sender.
3. RCPT TO: Identify intended recipient.
4. DATA: Send actual message.
5. QUIT: Terminate the message.
6. RSET: Reset the connection
7. VRFY: Verify the add of recipient
8. HELP: Mail
i. This algorithm is used to find the shortest distance from the single vertex to all the other
vertices of a weighted graph.
ii. Various other algorithms are used to find the shortest path, like the Dijkstra algorithm.
iii. If the weighted graph contains the negative weight values, then the Dijkstra algorithm does not
confirm whether it produces the correct answer or not.
iv. Rule for the algorithm:
We will go on relaxing all the edges (n - 1) times where n = number of vertices
v. Relaxing means:
If (d(u) + c(u , v) < d(v))
d(v) = d(u) + c(u , v)
Construct a diagram to show the application of cookies in a scenario in which the server
uses cookies for advertisement.(Summer-2024)/ (Winter 2022)
When cookies were invented, they were basically little documents containing information about you
and your preferences.
For instance, when you select your language in which you want to view your website, the website
would save the information in a document called a cookie on your computer, and the next time
when you visit the website, it would be able to read a cookie saved earlier. That way the website
could remember your language and let view the website in your preferred language without having
to select the language again.
A cookie can contain any type of information such as the time when you visited the website, the
items that you added into your shopping basket, all the links you clicked in website, etc. Cookies
themselves contain no personally identifiable information.
Depending on publisher’s and the user’s settings, information associated with cookies used in
advertising may be added to the user’s Google Account.
Most commonly, AdSense sends a cookie to the browser when a user visits a page that shows
Google ads. Pages with Google ads include ad tags that instruct browsers to request ad content
from our servers. When the server delivers the ad content, it also sends a cookie. But a page
doesn’t have to show Google ads for this to happen; it just needs to include our ad tags, which
might load a click tracker or impression pixel instead.
Working of Browsers-
• WWW works on client-server interaction.
• The browser program acts as a client that uses the internet to contact a remote server
for a copy of the requested page.
• The server on the remote system returns a copy of page along with the additional
information.
2.
www. oo le.com.
communicates.
connection.
1. STATIC DOCUMENTS-
• The contents of static documents are fixed. These contents are created
and stored in a server.
• If required the client can get a copy of static documents.
• The contents of static documents are determined when it is created.
2. DYNAMIC DOCUMENT-
• It is not defined in a pre-define format, like static documents.
• It is created by a web browser on the request for the document from a browser.
1. Client sends request.
2. Server runs a program create a dynamic doc.
Server sends the doc to client.
Explain the frame format of SSH
SSH Format-
1. Length: It indicates the size of the packet, not including the length field or the
variable length random padding fields that follows it.
The header of TCP segment can range from 20-60 bytes.40 bytes are
for option. if there are no options, header is of 20 bytes else it can be of
upmost 60 bytes.
Header Fields in TCP Segment Structure:
3) Sequence Number: -
This 32-bit field defines the number assigned to the first byte of data contained in this
segment. As we said before, TCP is a stream transport protocol. To ensure connectivity,
each byte to be transmitted is numbered. The sequence number tells the destination
which byte in this sequence comprises the first byte in the segment. During connection
establishment, each party uses a random number generator to create an initial sequence
number (ISN), which is usually different in each direction.
4) Acknowledgment Number: -
This 32-bit field defines the byte number that the receiver of the segment is expecting to
receive from the other party. If the receiver of the segment has successfully received byte
number x from the other party, it defines x + 1 as the acknowledgment number.
Acknowledgment and data can be piggybacked together.
5) Header length: -
This 4-bit field indicates the number of 4-byte words in the TCP header. The length of the
header can be between 20 and 60 bytes. Therefore, the value of this field can be between
5 (5 x 4 = 20) and 15 (15 x 4 = 60).
6) Reserved:-
This is a 6-bit field reserved for future use.
7) Control Field:-
This field defines 6 different control bits or flags. These are 6, 1 bit control bits that
controls connection establishment, connection termination, connection abortion, flow
control, mode of transfer etc.
8) Window Size: This field tells the window size of the sending TCP in bytes.
9) Checksum: This field holds the checksum for error control. It is mandatory in TCP as
opposed to UDP.
10) Urgent Pointer: This field (valid only if the URG control flag is set) used to point to
data that is urgently required that needs to reach the receiving process at the earliest. The
value of this field is added to the sequence number to get the byte number of the last
urgent byte.
11) Options: There can be up to 40 bytes of optional information in the TCP header.
Explain architecture of WWW With the help of Diagram
The WWW (World Wide Web) is a way of exchanging information between computers on
the Internet.
WWW works on client server architecture, in which a client using a browser can access a
service using a server.
Today, the WWW is a distributed client server service. The service provided is
distributed over many locations called sites and each site holds one or more
documents i.e., Web pages.
Client sends a request through its browser to the server using HTTP protocol which
specifies the way the browser and web server communicates.
Then server receives request using HTTP protocol and checks its search for the requested
web page. If found it returns it back to the web browser and close the HTTP connection.
Now the browser receives the web page, it interprets it and display the contents of web
page in web browser's window.
There are following three protocols play major roles in establishment multicast connections.
1) Multicast Distance Vector( DVMRP)
2) Multicast Link State(MOSPF)
Protocol Independent Multicast (PIM)
1) Multicast Distance Vector (DVMRP):
Distance vector routing when extended to support multicast is called Distance Vector
Multicast Routing Protocol (DVMRP).
The DVMRP is Multicast routing protocol that takes the routing decision based upon the
source address of the packet. This algorithm constructs the routing tree for a network.
Whenever, a router receives a packet, it forwards it to some of its ports based on the
source address of the packet. The rest of the routing tree is made by downstream routers.
In this way, routing tree is created from destination to source.
The DVMRP protocol must achieve the following tasks:
1. It must prevent the formation of loops in the network.
2. It must prevent the formation of duplicate packets.
3. It must ensure that the path travelled by a packet is the shortest from its source to the
router.
4. It should provide dynamic membership.
It is a following two-stage process:
1. Create a broadcast mechanism that allows a packet to be forwarded to all the networks
on the internet.
2. Refine this mechanism so that it prunes back networks that do not have hosts that
belong to the multicast group.
Multicast distance vector routing uses source-based trees, but the router never actually
makes a routing table. When a router receives a multicast packet, it forwards the packet as
though it is consulting a routing table.
We can say that the shortest path tree is evanescent. After its use (after a packet is
forwarded) the table is destroyed. To accomplish this, the multicast distance vector
algorithm uses a process based on following four decision-making strategies:
1. Flooding:
It is the first strategy that comes to mind. A router receives a packet and without even
looking at the destination group address, sends it out from every interface except the one
from which it was received. Flooding accomplishes the first goal of multicasting: every
network with active members receives the packet. However, so will networks without active
members. This is a broadcast, not a multicast.
There is another problem is, it creates loops. A packet that has left the router may come
back again from another interface or the same
interface and be forwarded again.
Some flooding protocols keep a copy of the packet for a while and discard any duplicates
to avoid loops. The next strategy, reverse path forwarding, corrects this defect.
2. Reverse Path Forwarding (RPF):
RPF is a modified flooding strategy. RPF eliminates the loop in the flooding processes.
In this strategy, the router only forwards those packets that have travelled the shortest path
from source to destination.
To achieve this, the router pretends that it has a packet to send to the source from has
arrived. In this way, the shortest path to the sender of the packet is computed.
If the same route is followed by the received packet, it is forwarded to the next router and it
is discarded otherwise.
The reverse path forwarding ensures that the network receives a copy of the packet
without formation of loops. A loop occurs when a packet that has left the router may come
back again from another interface or the same interface and be forwarded again.
RPF does not guarantee that there would be no duplicate packets in the network i.e. the
network may receive two or more copies.
The reason for this is that the routing is based on the source address and not on the
destination address.
Fig. RPF
Protocol Independent Multicast (PIM) is the name given to two independent multicast
routing protocols namely, Protocol Independent Multicast, Dense Mode (PIM-DM) and
Protocol Independent Multicast, Sparse Mode (PIM-SM). Both protocols are unicast-
protocol dependent, but the similarity ends here.
PIM-DM:
PIM Dense Mode (PIM-DM) is a multicast routing protocol designed with the opposite
assumption to PIM-SM, namely that the receivers for any multicast group are distributed
densely throughout the network.
PIM-DM is used when there is a possibility that each router is involved in multicasting
(dense mode). In this environment, the use of a protocol that broadcasts the packet is
justified because almost all routers are involved in the process.
PIM-DM is a source-based tree routing protocol that uses RPF and
pruning/grafting strategies for multicasting. Its operation is like DVMRP;
however, unlike DVMRP, it does not depend on a specific unicasting protocol.
It assumes that the autonomous system is using a unicast protocol and each
router has a table that can find the outgoing interface that has an optimal path
to a destination. This unicast protocol can be a distance vector protocol (RIP) or
link state protocol (OSPF).
PIM-DM is used in a dense multicast environment, such as a LAN. PIM-DM
uses RPF and pruning/grafting strategies to handle multicasting. However, it is
independent from the underlying unicast protocol.
PIM-SM:
PIM Sparse Mode (PIM-SM) is a multicast routing protocol designed on the
assumption that recipients for any particular multicast group will be sparsely
distributed throughout the network.
PIM-SM is used when there is a slight possibility that each router is involved in
multicasting (sparse mode). In this environment, the use of a protocol that
broadcasts the packet is not justified; a protocol such as CBT (Core Base Tree)
that uses a group-shared tree is more appropriate.
PIM-SM is a group-shared tree routing protocol that has a Rendezvous Point
(RP) as the source of the tree. Its operation is like CBT; however, it is simpler
because it does not require acknowledgment from a join message.
PIM-SM is used in a sparse multicast environment such as a WAN. PIM-SM is
similar to CBT but uses a simpler procedure.
Structure of a DNS
• uses a hierarchical tree based name structure.
• At top of the tree is the ―root‖ ( represented as a dot (.) ) followed by the TLD ( Top Level
Domain), then by the domain-name and any number of lower level sob-domains separated
by a dot.
The Top Level Domains are divided into 2 categories:
1. Generic TLD (gTLD)
2. Country Code TLD (ccTLD)
Below are some of the common Generic Top Level Domains:
Some of the common Generic Top Level
Domains (gTLDs):
.com – comercial web sites
.org – non profit organizations web sites .edu
– restricted to schools and institutions.
.net – originally for network infrastructures,
now unrestricted
Some of the Country Code Top Level Domains
(ccTLDs):
.us – United States
.in – India
.uk – United Kingdom
.ru – Russia
Responses
● The dotted black lines in the figure represent the transition that a server
normally goes through.
● The solid black lines show the transitions that a client normally goes
through.
The dotted black lines in the figure represent the transition that a server normally
goes through; the solid black lines show the transitions that a client normally goes
through.In some situations, a server transitions through a solid line or a client
transitions through a dotted line. The colored lines show special situations. The
rounded- corner rectangle marked ESTABLISHED has two sets of states, a set for
the client and another for the server, that are used for flow and error control.
Consider the scenario. Figure 4.4.2 shows the state transition diagram for this
scenario. The client process issues an
active open command to its TCP to request a connection to a specific socket
address.
State transition diagram.
TCP sends a SYN segment and moves to the SYN-SENT state. After receiving
the SYN +ACK segment, TCP sends an ACK segment and goes to the
ESTABLISHED state. Data are transferred, possibly in both directions, and
acknowledged. When the client process has no more data to send, it issues a
command called an active close. The TCP sends a FIN segment and goes to the
FINWAIT-
1 state. When it receives the ACK segment, it goes to the FIN- WAIT-2 state.
When the client receives a FIN segment, it sends an ACK segment and goes to
the TIME-WAIT state.The client remains in this state for 2 MSL .MSL is the
maximum time a TCP segment is expected to live, or stay in the network.When
the corresponding timer expires, the client goes to the CLOSED state.The
server process issues a passive open command. The server TCP goes to the
LISTEN state and remains there passively until it receives a SYN segment.
The TCP then sends a SYN +ACK segment and goes to the SYN- RCVD state,
waiting for the client to send an ACK segment. After receiving the ACK segment,
TCP goes to the ESTABLISHED state, where data transfer can take place. TCP
remains in this state until it receives a FIN segment from the client signifying that
there are no more data to be exchanged and the connection can be
closed.The server, upon receiving the FIN segment, sends all queued data to the
server with a virtual EOF marker, which means that the connection must be
closed. It sends an ACK segment and goes to the CLOSEWAIT state, but
postpones acknowledging the FIN segment received from the client until it
receives a passive close command from its process. After receiving the passive
close command, the server sends a FIN segment to the client and goes to the
LASTACK state, waiting for the final ACK. When the ACK segment is received
from the client,the server goes to the CLOSE state.
● Sometimes in some situations, a server transitions through a solid line or a client transition
through a dotted line.
State any four features of TCP.
1. TCP is connection oriented Protocol.
2. It provides reliable delivery of messages.
3. TCP makes checks for errors and reporting.
4. TCP has flow control.
5. TCP has High Speed.
Web Documents-
1. STATIC DOCUMENTS-
• The contents of static documents are fixed. These contents are created
and stored in a server.
• If required the client can get a copy of static documents.
• The contents of static documents are determined when it is created.
2. DYNAMIC DOCUMENT-
• It is not defined in a pre-define format, like static documents.
• It is created by a web browser on the request for the document from a browser.
Compare structure of Postal Email and Electronic Mail with proper diagram and state
advantages and disadvantages.
Format of an e-mail
E-mail address
Web-Based Mail
E-mail is such a common application that some websites today provide this service to anyone who
accesses the site. Three common sites are Hotmail, Yahoo, and Google and many more. There
are two cases:
Case I
• Alice, the sender, uses a traditional mail server;
• Bob, the receiver, has an account on a Web-based server.
• Mail transfer from Alice‘s browser to her mail server is done through SMTP.
• The transfer of the message from the sending mail server to the receiving mail server is still
through SMTP. However, the message from the receiving server (the web server) to Bob ‘ s
browser is done through HTTP
• Instead of using POP3 or IMAP4, HTTP is normally used.
• When Bob needs to retrieve his e-mails, he sends a request HTTP message to the website (i.e.
Hotmail).
• The website sends a form to be filled in by Bob, which includes the log-in name and the
password. If the log-in name and password match, the list of e-mails is transferred from the
Web server to Bob ‘ s browser in HTML format. Now Bob can browse through his received
emails and then, using more HTTP transactions, can get his e-mails one by one.
Case II
• Here both Alice and Bob use Web servers, but not necessarily the same server. Alice sends the message to
the Web server using HTTP transactions.
• Alice sends an HTTP request message to her Web server using the name and address of Bob‘s mailbox as the
URL. The server at the Alice site passes the message to the SMTP client and sends it to the server at the Bob site
using SMTP protocol.
• Bob receives the message using HTTP transactions.
• However, the message from the server at the Alice site to the server at the Bob site still takes place using SMTP
protocol.
● a status line
● header line,
● a blank line and
● sometimes a body.
HTTP Response sent by a server to the client. The response is used to provide the client
with the resource it requested. It is also used to it next client that the action requested has
been carried out. It can also inform the client that an error occurred in processing its
request.
General Header
The general header gives general information about the message and can be present in
both a request and a response.
e.g. Date: Mon, 27 Jul 2009 12:28:53 GMT
Response Header
The response header can be present only in a response message. It specifies the server's
configuration and special information about the request.
e.g. Server: Apache/2.2.14 (Win32)
Entity Header
The entity header gives information about the body of the document.
e.g. Content-Length: 88
e.g. Content-Type: text/html
Blank Line
An empty line (i.e., a line with nothing preceding the CRLF) indicating the end of the
header fields
Body
It contains actual content. This part is optional.
OR
1) Status Line: In the response message, the status line is the first line. The status line contains
three items:
a) HTTP Version Number: It is used to show the HTTP specification to which the server has
tried to make the message comply.
b) Status Code: It is a three-digit number that indicates the result of the request. The first digit
defines the class of the response. The last two digits do not have any categorization role.
There are five values for the first digit, which are as follows:
Code and Description:
1xx: Information: It shows that the request was received and continuing the process.
2xx: Success: It shows that the action was received successfully, understood, and
accepted.
3xx: Redirection: It shows that further action must be taken to complete the request.
4xx: Client Error: It shows that the request contains incorrect syntax, or it cannot be
fulfilled.
5xx: Server Error: It shows that the server failed to fulfil a valid request.
c) c) Reason Phrase: It is also known as the status text. It is a human- readable text that
summarizes the meaning of the status code.
2) Header Lines: The HTTP Headers for the response of the server contain the information that
a client can use to find out more about the response, and about the server that sent it. This
information is used to assist the client with displaying the response to a user, with
3) storing the response for the use of future, and with making further requests to the server now
or in the future. The name of the Response-header field can be extended reliably only in
combination with a change in the version of the protocol.
5) Entire Body: The body of the message is used for most responses. The exceptions are where
a server is using certain status codes and where the server is responding to a client request,
which asks for the headers but not the response body.
Request Message
• The format of the request is shown in Figure.
• A request message consists of a request line, a header, and sometimes a body.
• Request Line: The first line in a request message is called a request line.
There are three fields in this line separated by some character delimiter as shown in Figure The
fields are called Methods, URL, and Version.
2 File Transfer Protocol- FTP , TFTP
Transferring files from one computer to another is one of the most common tasks expected from a
networking or internetworking environment. There is greatest volume of data exchange in the
Internet today is due to file transfer.
• FTP uses the services of TCP. It needs two TCP connections.
• The well-known port 21 is used for the control connection and the well-known port 20 for
the data connection.
We show an example of anonymous FTP. We assume that some public data are available at
internic.net.
Enlist HTTP Response Codes and its Descriptions:
Example
Let us see how we can directly use SMTP to send an e-mail and simulate the commands and
responses we described in this section. We use TELNET to log into port 25 (the well-known
port for SMTP). We then use the commands directly to send an e-mail.
In this example, forouzanb@adelphia.net is sending an e-mail to himself. The first few lines show
TELNET trying to connect to the Adelphia mail server. After connection, we can type the SMTP
commands and then receive the responses, as shown on the next slide. Note that we have added, for
clarification, some comment lines, designated by the ―=‖ signs. These lines are not part of the e-
mail procedure.
$ telnet mail.adelphia.net 25
Trying 68.168.78.100 . . .
Connected to mail.adelphia.net (68.168.78.100).
Mail Transfer Phases
The process of transferring a mail message occurs in three phases:
1. connection establishment,
2. mail transfer,
3. connection termination.
Connection Establishment
After a client has made a TCP connection to the well-known port 25, the SMTP serve starts the
connection phase. This phase involves three steps,
1.The server sends code 220 (service ready) to tell the client that it is ready to receive mail. If the
server is not ready, it sends code 421 (service not available).
2.The client sends the HELO message to identify itself using its domain name address. This step is
necessary to inform the server of the domain name of the client. Remember that during TCP
connection establishment, the sender and receiver know each other through their IP addresses.
3.The server responds with code 250 (request command completed) or some other code depending
on the situation.
Message Transfer
After connection has been established between the SMTP client and server, a single message
between a sender and one or more recipients can be exchanged.
This phase involves eight steps. Steps 3 and 4 are repeated if there is more than one recipient
1.The client sends the MAIL FROM message to introduce the sender of the message. It includes
the mail address of the sender (mailbox and the domain name). This step is needed to give the
server the return mail address for returning errors and reporting messages.
2.The server responds with code 250 or some other appropriate code.
3.The client sends the RCPT TO (recipient) message, which includes the mail address of the
recipient.
4.The server responds with code 250 or some other appropriate code.
5.The client sends the DATA message to initialize the message transfer.
6.The server responds with code 354 (start mail input) or some other appropriate message.
7.The client sends the contents of the message in consecutive lines. Each line is terminated by a
two-character end-of-line token (carriage return and line feed). The message is terminated by a
line containing just one period.
8. The server responds with code 250 (OK) or some other appropriate code.
Connection Termination
After the message is transferred successfully, the client terminates the connection. This phase
involves two steps