Introduction

The top layer of TCP/IP is the Application Layer. This includes all processes that use Transport Layer protocols to deliver data to the Internet Layer. There are many application protocols and new protocols are frequently added. The most widely known and implemented Application Layer protocols are:

  • Network Terminal Protocol (Telnet) provides text communication for remote login and communication across the network
  • File Transfer Protocol (FTP) used to download and upload files across the network
  • Simple Mail Transfer Protocol (SMTP) delivers electronic mail messages across the network
  • Domain Name Service (DNS) maps IP addresses to Internet domain names
  • Hyper Text Transfer Protocol (HTTP) the protocol used by the World-Wide-Web to exchange text, pictures, sounds, and other multi-media information via a graphical user interface (GUI)
  • Routing Information Protocol (RIP) used by network devices to exchange routing information

Some protocols are used directly by users as applications, such as FTP and Telnet. Other protocols are directly behind applications, such as SMTP and HTTP. Others, such as RIP and DNS, happen indirectly or are used by the programs and operating system routines. A system administrator must be aware of all of the protocols and how they interact with each other and the lower TCP/IP layers.

 

Telnet

The Telnet protocol is often thought of as simply providing a facility for remote logins to computer via the Internet. This was its original purpose although it can be used for many other purposes. It is best understood in the context of a user with a simple terminal using the local telnet program (known as the client program) to run a login session on a remote computer where his communications needs are handled by a telnet server program. It should be emphasised that the telnet server can pass on the data it has received from the client to many other types of process including a remote login server.

 

FTP

The File Transfer Protocol provides facilities for transferring to and from remote computer systems. Usually the user transferring a file needs authority to login and access files on the remote system. The common facility known as anonymous FTP actually works via a special type of public guest account implemented on the remote system.

An FTP session normally involves the interaction of five software elements.

User Interface This provides a user interface and drives the client protocol interpreter.
Client PI This is the client protocol interpreter. It issues commands to the remote server protocol interpreter and it also drives the client data transfer process.
Server PI This is the server protocol interpreter which responds to commands issued by the client protocol interpreter and drives the server data transfer process.
Client DTP This is the client data transfer process responsible for communicating with the server data transfer process and the local file system.
Server DTP This is the server data transfer process responsible for communicating with the client data transfer process and the remote file system.

During an FTP session there will be two separate network connections one between the PIs and one between the DTPs. The connection between the PIs is known as the control connection.The connection between the DTPs is known as the data connection.

The control and data connections use TCP.

In normal Internet operation the FTP server listens on the well-known port number 21 for control connection requests. The choice of port numbers for the data connection depends on the commands issued on the control connection. Conventionally the client sends a control message which indicates the port number on which the client is prepared to accept an incoming data connection request.

The use of separate connections for control and data offers the advantages that the two connections can select different appropriate qualities of service e.g. minimum delay for the control connection and maximum throughput for the data connection, it also avoids problems of providing escape and transparency for commands embedded within the data stream.

When a transfer is being set up it always initiated by the client, however either the client or the server may be the sender of data. As well as transferring user requested files, the data transfer mechanism is also used for transferring directory listings from server to client.

E-mail

E-mail is a familiar way of transferring messages between two Internet users. E-mail was one of the earliest applications to be developed on the Internet.

The Internet E-mail system is associated with the RFC822 protocol commonly known as Simple Mail Transfer Protocol (SMTP).

E-Mail Addresses

An E-mail address such as

fred.smith@felpersham.ac.uk

has two parts known as the local part and the domain part separated by the @ symbol. The domain part identifies directly or indirectly an Internet host for receipt of the message. This host will run mail server software that will examine the local part and take whatever action is appropriate to deliver the message to the end user.

User and Transfer Agents

There are two sorts of software functionality involved in the transfer of E-mail. These are.

  1. Mail Transfer Agents (MTAs)

    These are permananetly running programs on hosts with permanent Internet connections. An MTA listens for incoming e-mail from both local users and remote MTAs, examines the e-mail and either saves it locally (in a mail spool) for retrieval by the destination user or identifies and contacts a remote MTA and transfers the e-mail to the remote MTA. Several MTAs may be involved in the transfer of e-mail from originator to destination, the intermediate MTAs are known as mail relays.

    Typical MTAs are programs such as sendmail and exim.

    A different type of MTA will listen for requests from users for any e-mail saved for them and will transfer the e-mail to the user.

    Host computers running MTA software are commonly known as mail servers.

  2. Mail User Agents (MUAs)

    An MUA is a program that a user runs when he or she wishes to send or receive E-mail. It provides a user interface for composition and local storage of mail messages and also has facilities to communicate with MTAs.

    There are numerous MUAs available under modern windows based environments. Typical examples include Eudora and Microsoft Outlook. On Unix based systems character based (non-windows) based programs such as elm and mail may be encountered. World Wide Web browsers such as Netscape also commonly incorporate MUA functions.

The Protocols

There are a number of protocols involved in the transfer of E-mail.

  1. RFC 821 - Simple Mail Transfer Protocol (SMTP) This protocol defines the mecahnism by which MTAs communicate with each other and with MUAs.
  2. RFC 822 - Internet Message Format This protocol defines the actual format of E-mail messages, especially the headers that are used by MTAs and MUAs to determine destinations and reply addresses.
  3. RFC 1939 - Post Office Protocol 3 (POP3) This protocol defines how a end user interacts with a POP MTA to retrieve incoming E-mail.
  4. RFC 2046 - Multimedia Internet Mail Extensions (MIME)

The basic message format defined in RFC 822 does not allow messages to include anything other than normal printing ASCII characters. This protocol defines a standard method for encoding data in other formats such as graphical images, binary files, word processed documents etc.

The Mechanism

The transfer of an E-mail from a local user to a remote user will typically involve the following steps assuming both users are using personal computers with dial-up Internet connections.

  1. Local user set up
  2. The local user starts his MUA program ensuring that it is configured with the Internet address of a host running an SMTP server MTA. Theoretically he could use any MTA anywhere on the Internet, however mail server administrators normally configure MTAs so they will only accept such requests from or for users in the same domain as the server. See notes on open relaying.

  3. Local user sends E-mail

      The local user composes the E-mail message possibly attaching files and then tells the MUA to send the E-mail to the MTA using SMTP. He may, of course, have prepared several items of mail "off-line" and send them all once a connection is established with the MTA. The MUA autommically includes the required headers in the E-mail message based on information supplied by the user either as part of the MUA configuration or entered interactively during mail composition.

  4. E-mail transmission

      The MTA analyses the headers of the incoming message to identify the destination mail server. The MTA then attempts to communicate with the destination mail server and transfers the message using SMTP. If the message cannot be transferred it is queued in the mail spool for further attempts.

      It is common that a single mail server host provides services for a large group of machines. The Internet DNS mechanism provides the facility for identifying a mail exchanger or MX host for a DNS domain so that E-mail can, apparently, be sent to a domain (such as wlv.ac.uk) rather than a specific host within that domain.

  5. E-mail receipt
  6. The destination mail server examines the incoming message to identify the local part of the address from the headers. This may be a nick-name (or alias) for an actual user, group of users or even a file or a program input. The server will usually store the incoming E-mail in the mail spool.

  7. Remote user receives E-mail

    The remote user starts his MUA program ensuring that it is configured with the Internet address of a host running a POP server MTA. This may well be the same host as he uses for outgoing E-mail although this is not essential. He establishes his bona-fides to the POP server by quoting a user identification code and password and the POP server examines the mail spool and responds with details of the number of incoming E-mail messages. The user can then instruct his MUA to transfer or copy the E-mail messages to his personal computer.

If the destination mail server host is a general purpose computer into which users may login, there is no need for the use of POP, user programs can directly manipulate the mail spool. This used to be standard practice and is still widely used.

DNS

The Domain Name System (DNS) is the method by which Internet addresses in mnemonic form such as sunc.scit.wlv.ac.uk. are converted into the equivalent numeric IP address such as 134.220.4.1. To the user and application process this translation is a service provided either by the local host or from a remote host via the Internet. The DNS server (or resolver) may communicate with other Internet DNS servers if it cannot translate the address itself.

DNS Name Structure

DNS names are constructed hierarchichally. The highest level of the hierarchy being the last component or label of the DNS address. Labels can be up to 63 characters long and are case insensitive. A maximum length of 255 characters is allowed. Labels must start with a letter and can only consist of letters, digits and hyphens. [Unfortunately some administrators construct names that start with digits. This is wrong and can easily cause problems with software that simply inspects the first character of a host address to determine whether a DNS name or an IP address has been quoted.]

Note In the early days of the Internet users in at least one country (the United Kingdom) adopted a similar scheme with the highest hierarchical level appearing first rather than last. i.e. uk.ac.wlv.scit.sun rather than sunc.scit.wlv.ac.uk. This practice is, fortunately, obsolete.

DNS addresses can be relative or fully qualified. A fully qualified address includes all the labels and is globally unique. A relative address can be converted by appending the local domain information. For example sunc.scit.wlv.ac.uk is a fully qualified name for the host sunc in the domain scit.wlv.ac.uk. Strictly there should be a stop at the end of a fully qualified name but this is often overlooked.

The final most significant label of a fully qualified name can fall into one of three classes

arpa

This is a special facility used for reverse translation, i.e. going from IP address to fully qualified domain address. If everything is properly configured a suitably framed query for 1.4.220.134.in-addr.arpa will return sunc.scit.wlv.ac.uk. Details of this will be described later.

3 letter codes

The DNS was orginally introduced in the United States of America and the final component of an address was intended to indicate the type of organisation hosting the computer. Some of the three letter final labels (edu, gov, mil) are still only used by organisations based in the USA, others can be used anywhere in the world.

Three letter codes are:

code
meaning
com
commercial
edu
educational
gov
government
int
international organization
mil
military
net
network related
org
Miscellaneous Organisation