Data Communication and Networking CH
Data Communication and Networking CH
26.2
Note
26.3
26.4
26.5
26.6
26.7
26.8
26.9
Example 26.1
Figure 26.4 shows an example of option negotiation. In this example, the client wants the server to echo each character sent to the server. The echo option is enabled by the server because it is the server that sends the characters back to the user terminal. Therefore, the client should request from the server the enabling of the option using DO. The request consists of three characters: IAC, DO, and ECHO. The server accepts the request and enables the option. It informs the client by sending the three-character approval: IAC, WILL, and ECHO.
26.10
26.11
26.12
Example 26.2
Figure 26.5 shows an example of suboption negotiation. In this example, the client wants to negotiate the type of the terminal.
26.13
26.14
26.16
Note
When the sender and the receiver of an e-mail are on the same system, we need only two user agents.
26.17
26.18
Note
When the sender and the receiver of an e-mail are on different systems, we need two UAs and a pair of MTAs (client and server).
26.19
26.20
Note
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).
26.21
26.22
26.23
Note
When both sender and receiver are connected to the mail server via a LAN or a WAN, we need two UAs, two pairs of MTAs and a pair of MAAs. This is the most common situation today.
26.24
26.25
Note
Some examples of command-driven user agents are mail, pine, and elm.
26.26
Note
Some examples of GUI-based user agents are Eudora, Outlook, and Netscape.
26.27
26.28
26.29
26.30
26.31
26.32
26.33
26.34
26.35
26.36
26.37
26.38
26.39
Example 26.3
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, [email protected] 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.
26.40
26.41
26.42
26.43
26.44
26.45
26.46
Note
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.
26.47
26.48
26.49
26.50
Example 26.4
The following shows an actual FTP session for retrieving a list of items in a directory. The colored lines show the responses from the server control connection; the black lines show the commands sent by the client. The lines in white with a black background show data transfer. 1. After the control connection is created, the FTP server sends the 220 response. 2. The client sends its name. 3. The server responds with 331.
26.51
26.52
26.53
Example 26.5
We show an example of anonymous FTP. We assume that some public data are available at internic.net.
26.54
26.55