0% found this document useful (0 votes)
17 views55 pages

CH 26

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)
17 views55 pages

CH 26

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/ 55

Chapter 26

Remote Logging,
Electronic Mail,
and File Transfer

26.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
26--1 REMOTE LOGGING
26

It would be impossible to write a specific client/server


program for each demand.
demand. The better solution is a
general--purpose client/server program that lets a user
general
access any application program on a remote computer.
computer.

Topics discussed in this section:


TELNET

26.2
Note

TELNET is a general-purpose
client/server
li t/ application
li ti program.

26.3
Figure 26.1 Local and remote log-in

26.4
Figure 26.2 Concept of NVT

26.5
Table 26.1 Some NVT control characters

26.6
Figure 26.3 An example of embedding

26.7
Table 26.2 Options

26.8
T bl 26.3
Table 26 3 NVT character
h set ffor option
i negotiation
i i

26.9
Example 26.1

Figure 26.4 shows an example of option negotiation. In


this example,
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.
DO, ECHO The server accepts the request and
enables the option. It informs the client by sending the
three-character approval: IAC,
IAC WILL,
WILL and ECHO.
ECHO

26.10
Figure 26.4 Example 26.1: Echo option

26.11
Table 26.4 Character set for suboptions

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
Figure 26.5 Example of suboption negotiation

26.14
26--2 ELECTRONIC MAIL
26

One of the most popular Internet services is electronic


mail (e-
(e-mail).
mail). The designers of the Internet probably
never imagined the popularity of this application
program.. Its architecture consists of several
program
components that we discuss in this chapter
chapter..

Topics discussed in this section:


Architecture
User Agent
Message Transfer Agent: SMTP
Message Access Agent: POP and IMAP
Web-Based Mail
26.15
Figure 26.6 First scenario in electronic mail

26.16
Note

When the sender and the receiver of an


e-mail
il are on th
the same system,
t
we need only two user agents.

26.17
Figure 26.7 Second scenario in electronic mail

26.18
Note

When th
Wh the sender
d and d the
th receiver
i off an
e-mail are on different systems, we
need two UAs and a pair of
MTAs s (client
(c e t aandd se
server).
e)

26.19
Figure 26.8 Third scenario in electronic mail

26.20
Note

When the sender is connected to the


mail
il server via
i a LAN or a WAN,
WAN
we need two UAs and two pairs
of MTAs (client and server).

26.21
Figure 26.9 Fourth scenario in electronic mail

26.22
Figure 26.10 Push versus pull in electronic email

26.23
Note

When both sender and receiver are


connected to the mail server via
a LAN or a WAN
WAN, we need two
UAs, two pairs of MTAs
and a pair of MAAs.
MAAs
This is the most common situation
today.

26.24
Figure 26.11 Services of user agent

26.25
Note

Some examples of command-driven


user agents
t are mail,
il pine,
i
and elm.

26.26
Note

Some examples of GUI-based user


agents
t are Eudora,
E d O tl k and
Outlook, d
Netscape.

26.27
Figure 26.12 Format of an e-mail

26.28
Figure 26.13 E-mail address

26.29
Figure 26.14 MIME

26.30
Figure 26.15 MIME header

26.31
Table 26.5 Data types and subtypes in MIME

26.32
Table 26.6 Content-transfer-encoding

26.33
Figure 26.16 SMTP range

26.34
Figure 26.17 Commands and responses

26.35
Figure 26.18 Command format

26.36
Table 26.7 Commands

26.37
Table 26.8 Responses

26.38
Table 26.8 Responses (continued)

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
( h well-known
ll k port for
f SMTP).
S ) We then
h use the
h
commands directly to send an e-mail. In this example,
f
[email protected]
b@ d l hi i sending
is di an e-mail il to himself.
hi lf
The first few lines show TELNET trying to connect to the
Ad l hi mail
Adelphia il server. After
Af connection,
i we can type the h
SMTP commands and then receive the responses, as
shown
h on the
h next slide.
lid Note
N that
h we haveh added,
dd d for
f
clarification, some comment lines, designated by the “=”
signs.
i Th
These li
lines are not part off the
h e-mail il procedure.
d
26.40
Example 26.3 (continued)

$ telnet mail.adelphia.net 25
Trying 68.168.78.100 . . .
Connected to mail.adelphia.net (68.168.78.100).

26.41
Example 26.3 (continued)

26.42
Example 26.3 (continued)

26.43
Figure 26.19 POP3 and IMAP4

26.44
Figure 26.20 The exchange of commands and responses in POP3

26.45
26--3 FILE TRANSFER
26

Transferring
T f i files
fil from
f one computer
t to
t another
th is
i one
of the most common tasks expected from a networking
or internetworking
i t t ki environment
environment.
i t. As
A a matter
tt off fact,
f t
the greatest volume of data exchange in the Internet
today
t d is i due
d tot file
fil transfer
ttransfer.
f .

Topics discussed in this section:


File Transfer Protocol (FTP)
Anonymous FTP

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
Figure 26.21 FTP

26.48
Figure 26.22 Using the control connection

26.49
Figure 26.23 Using the data connection

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
li
lines show
h theh commands d sent by
b the
h client.
li The
h lines
li i
in
white with a black background show data transfer.

1. After the control connection is created, the FTP server


sends
d the
h 220 response.
2. The client sends its name.
3 The
3. Th server responds d with
i h 331.
331

26.51
Example 26.4 (continued)

4. The client sends the password (not shown).


5. The server responds with 230 (user log-in is OK).
6. The client sends the list command (ls reports) to find
the
h li
list off files
fil on the
h directory
di namedd report.
7. Now the server responds with 150 and opens the data
connection.
i
8. The server then sends the list of the files or directories
on the
h ddata connection.
i
9. The client sends a QUIT command.
10. The server responds with 221.

26.52
Example 26.4 (continued)

26.53
Example 26.5

We show an example of anonymous FTP. We assume that


some public data are available at internic.net.

continued
i d on next slide
lid

26.54
Example 26.5 (continued)

26.55

You might also like