Computer Network Entities:
Computer Network Entities is a group of communicating entities that uses common network protocol to exchange data and resources with each other over a communication medium. These communicating entities can be differentiated into end systems or intermediate systems.
End systems-Computer, Laptop, telephone
Intermediate systems-Repeater, Hub, Bridges, Router
FTP (File Transfer Protocol):
FTP (File Transfer Protocol) is a protocol for transferring a file from one host to another host. In a typical FTP session, the user is sitting in front of one host (the local host) and wants to transfer files to or from a remote host. In order for the user to access the remote account, the user must provide a user identification and a password. After providing this authorization information, the user can transfer files from the local file system to the remote file system and vice versa.
HTTP and FTP are both file transfer protocols and have many common characteristics; for example, they both run on top of TCP, the Internet’s connection-oriented, transport-layer, reliable data transfer protocol. However, the two application-layer protocols have some important differences. The most striking difference is that FTP uses two parallel TCP connections to transfer a file, a control connection and a data connection. The control connection is used for sending control information between the two hosts– information such as user identification, password, commands to change remote directory, and commands to “put” and “get” files. The data connection is used to actually send a file. Because FTP uses a separate control connection, FTP is said to send its control information out-of-band. In Chapter 6 we shall see that the RTSP protocol, which is used for controlling the transfer of continuous media such as audio and video, also sends its control information out-of band.
HTTP, as you recall, sends request and response header lines into the same TCP connection that carries the transferred file itself. For this reason, HTTP is said to send its control information in-band. In the next section we shall see that SMTP, the main protocol for electronic mail, also sends control information in-band. When a user starts an FTP session with a remote host, FTP first sets up a control TCP connection on server port number 21. The client side of FTP sends the user identification and password over this control connection. The client side of FTP also sends, over the control connection, commands to change the remote directory. When the user requests a file transfer (either to, or from, the remote host), FTP opens a TCP data connection on server port number 20. FTP sends exactly one file over the data connection and then closes the data connection.
If during the same session, the user wants to transfer another file, FTP opens another data TCP connection. Thus, with FTP, the control connection remains open throughout the duration of the user session, but a new data connection is created for each file transferred within a session (i.e., the data connections are non-persistent). Throughout a session, the FTP server must maintain state about the user. In particular, the server must associate the control connection with a specific user account, and the server must keep track of the user’s current directory as the user wanders about the remote directory tree.
Keeping track of this state information for each ongoing user session significantly impedes the total number of sessions that FTP can maintain simultaneously. HTTP, on the other hand, is stateless — it does not have to keep track of any user state.
FTP Commands and Replies:
• USER username : Used to send the user identification to server.
• PASS password : Used to send the user password to the server.
• LIST : Used to ask the server to send back a list of all the files in the current remote directory. The list of files is sent over a (new and non-persistent) data TCP connection and not over the control TCP
• RETR filename : Used to retrieve (i.e., get) a file from the current directory of the remote host.
• STOR filename : Used to store (i.e., put) a file into the current directory of the remote host
Mail Access Protocols-SMTP, POP, IMAP
SMTP stands for Simple Mail Transfer Protocol. It was first proposed in 1982. It is a standard protocol used for sending e-mail efficiently and reliably over the internet.
•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, SMPT 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. These SMTP commands specify the sender’s and receiver’s e-mail address, along with the message to be send. The exchange of commands between servers is carried out without intervention of any user. In case, message cannot be delivered, an error report is sent to the sender which makes SMTP a reliable protocol.
The following table describes some of the SMTP commands:
S.N. Command Description:
This command initiates the SMTP conversation.
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.
This command let the server know the size of attached message in bytes.
The DATA command signifies that a stream of data will follow. Here stream of data refers to the body of the message.
IMAP stands for Internet Mail Access Protocol. It was first proposed in 1986. There exist five versions of IMAP as follows:
1. Original IMAP
IMAP allows the client program to manipulate the e-mail message on the server without downloading them on the local computer. The e-mail is hold and maintained by the remote server. It enables us to take any action such as downloading, delete the mail without reading the mail.It enables us to create, manipulate and delete remote message folders called mail boxes. IMAP enables the users to search the e-mails. It allows concurrent access to multiple mailboxes on multiple mail servers.
POP stands for Post Office Protocol. It is generally used to support a single client. There are several
versions of POP but the POP 3 is the current standard.
POP is an application layer internet standard protocol.
Since POP supports offline access to the messages, thus requires less internet usage time.
POP does not allow search facility.
In order to access the messaged, it is necessary to download them.
It allows only one mailbox to be created on server.
It is not suitable for accessing non mail data.
POP commands are generally abbreviated into codes of three or four letters. Eg. STAT.
The following table describes some of the POP commands: