Sunday, November 23, 2014

Standard And Nonstandard Application Protocols

The TCP/IP protocol suite includes many application protocols, and new application protocols appear daily. In fact, whenever a programmer devises a distributed program that uses TCP/IP to communicate, the programmer has invented a new application protocol. Of course, some application protocols have been documented in RFCs and adopted as part of the official TCP/IP protocol suite. We refer to such protocols as standard application protocols.  Other protocols, invented by application programmers for private use, are referred to as nonstandard application protocols.


Most network managers choose to use standard application protocols whenever possible; one does not invent a new application protocol when an existing protocol suffices. For example, the TCP/IP suite contains standard application protocolsfor services like file transfer, remote login, and electronic mail. Thus, a programmer would use a standard protocol for such
services.


An Example Of Standard Application Protocol Use


Remote login ranks among the most popular TCP/IP applications. Although a given remote login session only generates data at the speed a human can type and only receives data at the speed a human can read, remote login is the fourth highest source of packets on the connected Internet, exceeded by Web browsing, file transfer, and network news. Many users rely on remote login as part of their working environment; they do not have a direct connection to the machines that they use for most computation.

The TCP/IP suite includes a standard application protocol for remote login known as TELNET. The TELNET protocol
defines the format of data that an application program must send to a remote machine to log onto that system and the format of messages the remote machine sends back. It specifies how character data should be encoded for transmission and how one sends special messages to control the session or abort a remote operation.

For most users, the internal details of how the TELNET protocol encodes data are irrelevant; a user can invoke software that accesses a remote machine without knowing or caring about the implementation. In fact, using a remote service is usually as easy as using a local one. For example, computer systems that run TCP/IP protocols usually include a command that users invoke to run TELNET software. On Berkeley UNIX systems, the command is named telnet. To invoke it, a user types:

telnet machine

where the argument machine denotes the domain name of the machine to which remote login access is desired. Thus, to form a TELNET connection to machine nic.ddn.mil a user types:

telnet nic.ddn.mil

From the user's point of view, running telnet converts the user's terminal into a terminal that connects directly to the remote system. If the user is running in a windowing environment, the window in which the telnet command has been executed will be connected to the remote machine. Once the connection has been established, the telnet application sends each character the user types to the remote machine, and displays each character the remote machine emits on the user's screen.

After a user invokes telnet and connects to a remote system, the remote system displays a prompt that requests the user to
type a login identifier and a password. The prompt a machine presents to a remote user is identical to the prompt it presents to users who login on local terminals. Thus, TELNET provides each remote user with the illusion of being on a directly-connected terminal.

An Example Connection

As an example, consider what happens when a user invokes telnet
and connects to machine cnri.reston.va. us:
telnet cnri.reston.va.us
Trying...
Connected to xnri.reston.va.us.
Escape character is '^]'.
SunOS UNIX (CNRI)
login:

The initial output message, Trying... appears while the telnet program converts the machine name to an IP address and tries to make a valid TCP connection to that address. As soon as the connection has been established, telnet prints the second and third lines, telling the user that the connection attempt has succeeded and identifying a special character that the user can type to escape from the telnet application temporarily if needed (e.g., if a failure occurs and the user needs to abort the connection). The notation A] means that the user must hold the CONTROL key while striking the right bracket key.

The last few lines of output come from the remote machine. They identify the operating system as SunOS, and provide a standard login prompt. The cursor stops after the login: message, waiting for the user to type a valid login identifier. The user must have an account on the remote machine for the TELNET session to continue. After the user types a valid login identifier, the remote machine prompts for a password, and only permits access if the login identifier and password are valid.

No comments:

Post a Comment