0% found this document useful (0 votes)
16 views42 pages

Remote Logging, Email, and File Transfer

data communication and networking

Uploaded by

ishvijain2022
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)
16 views42 pages

Remote Logging, Email, and File Transfer

data communication and networking

Uploaded by

ishvijain2022
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

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

▪ In the Internet, users may want to run application


programs at a remote site and create results that can
be transferred to their local site

▪ TELNET is an abbreviation for TErminaL NETwork.

▪ It is the standard TCP/IP protocol for virtual terminal


service as proposed by the International Organization
for Standards (ISO).

▪ TELNET enables the establishment of a connection to


a remote system in such a way that the local terminal
appears to be a terminal at the remote system.
26.2
Figure 26.1 Local and remote log-in

26.3
Figure 26.2 Concept of NVT

26.4
Table 26.1 Some NVT control characters

26.5
26-2 ELECTRONIC MAIL

One of the most popular Internet services is electronic


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

Topics discussed in this section:


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

26.7
Note

When the sender and the receiver of an


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

26.8
Figure 26.7 Second scenario in electronic mail

26.9
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.10
Figure 26.8 Third scenario in electronic mail

26.11
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.12
Figure 26.9 Fourth scenario in electronic mail

26.13
Figure 26.10 Push versus pull in electronic email

26.14
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.15
Figure 26.11 Services of user agent

26.16
There are two types of user agents:
command-driven and GUI-based.

Some examples of command-driven


user agents are mail, pine,
and elm.
Some examples of GUI-based user
agents are Eudora, Outlook, and
Netscape.

26.17
Figure 26.12 Format of an e-mail

26.18
Figure 26.13 E-mail address

26.19
Figure 26.14 MIME(Multipurpose Internet Mail Extensions (MIME))

26.20
Figure 26.16 SMTP range

26.21
Figure 26.19 POP3 and IMAP4

26.22
26-3 FILE TRANSFER

Transferring files from one computer to another is one


of the most common tasks expected from a networking
or internetworking environment. As a matter of fact,
the greatest volume of data exchange in the Internet
today is due to file transfer.

Topics discussed in this section:


File Transfer Protocol (FTP)
Anonymous FTP

26.23
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.24
Figure 26.21 FTP

26.25
Figure 26.22 Using the control connection

26.26
Figure 26.23 Using the data connection

■ A file is to be copied from the server to the client. This is called


retrieving a file . It is done under the supervision of the RETR
command,
■ A file is to be copied from the client to the server. This is called
storing a file It is done under the supervision of the STOR command.
■ A list of directory or file names is to be sent from the server to the
client. This is done under the supervision of the LIST command.
■ Note that FTP treats a list of Directory or file names as a file. It is
sent over the data connection

26.27
Transmission Mode in FTP
■ FTP can transfer a file across the data connection by using one of
the following three transmission modes: stream mode, block mode,
and compressed mode.
■ The stream mode is the default mode. Data are delivered from FTP
to TCP as a continuous stream of bytes. TCP is responsible for
chopping data into segments of appropriate size. If the data are
simply a stream of bytes (file structure), no end-of-file is needed
■ In block mode, data can be delivered from FTP to TCP in blocks. In
this case, each block is preceded by a 3-byte header. The first byte
is called the block descriptor; the next 2 bytes define the size of the
block in bytes.
■ The compression method normally used is run-length encoding. In
this method, consecutive appearances of a data unit are replaced by
one occurrence and the number of repetitions. In a text file, this is
usually spaces (blanks). In a binary file, null characters are usually
compressed.
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.29
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 list of files on the directory named report.
7. Now the server responds with 150 and opens the data
connection.
8. The server then sends the list of the files or directories
on the data connection.
9. The client sends a QUIT command.
10. The server responds with 221.

26.30
Example 26.4 (continued)

26.31
Example 26.5

We show an example of anonymous FTP. We assume that


some public data are available at [Link].

continued on next slide

26.32
Example 26.5 (continued)

26.33
Contents

▶ Introduction
▶ Example Of
Domain Name
▶ Name Server
▶ DNS in Internet
▶ Generic Domain
▶ Country Domain
▶ Inverse Domain
Introduction

▶ Domain name system is a client server application that


identifies each host on
the internet, with a unique user friendly name.
▶ Domain name system is a method to identifying hosts with
user friendly names instead of ip addresses. Because to
remember numeric addresses are difficult compare to
names.
▶ In Domain Name System names must be unique because
the addresses are
unique.
▶ Each Domain is partitioned into sub domains.
▶ Once an Organization assigned domain name, the name
is reserved for the Organization, means no other
Organization will be assigned the same name.
▶ To map a name into IP address, an application program calls a library
procedure called the Resolver, passing it the name as a Parameter. The
Resolver sends a UDP packet to local DNS server, which then looks up the
name and returns the IP address to the resolver, which then returns it to the
caller process.
▶ Domain names are always read from the bottom to top.
Name Server

▶ Information contained in the domain name system must be stored. It is very


difficult and not reliable to have just one computer store such large
information.
▶ To solve above problem, we have to distribute the information among many
computer called DNS servers.
▶ The hierarchy of servers shown beside:
DNS in Internet

▶ In the internet, domain name space is divided into


3 different section.
[Link] domain
[Link] domain
[Link] domain
1. Generic Domain
▶ Generic domain defines registered host according to their generic behavior
Each node in the tree defines a domain.
Com Commercial Organization

Edu Educational Institutions

Gov Government Institutions

Int International Organization

Mil Military Groups

Net Network Organization

Org Non profit Organization


2. Country Domain
▶ The Country domain uses a two-character abbreviation in place of three
character abbreviation at first level.
3. Inverse Domain

▶ The inverse domain is used to map address to a name.


▶ When a server has received a request from a client to do a task,
server lists only the IP address of the client. To determine if the client
is on the authorized list, the server can send a query to the inverse
DNS server and ask for a mapping of address to name.
▶ The inverse domain is added to the domain name space with the
first-level node called arpa. (Advanced Research Projects Agency) The
second level is also one single node named in-addr.
(for inverse address) The rest of the domain defines IP address.

You might also like