1.

TELNET
1.1 Introduction Telnet or Telecommunication Network is a network protocol which is mostly used to connect to remote machines over a local area network or the internet. It is a utility that allows a user to connect to another computer on the TCP/IP network such as internet. Through the Telnet utility a network administrator or a user can access another computer. Telnet client and server functionality comes built-in in most operating systems. Windows XP Professional and the Windows Server 2003 have the built-in Telnet client and server which allow you to connect to the remote computer and server. In addition, there are several third-party applications like putty client that enable remote connectivity. Most applications and embedded devices make use of the telnet technology to connect to remote server machines and provide end user functionality. The most common use of telnet stands to enable remote authentication and access. Telnet client and server are ideal in the situations where there are minimal resources like memory, processor and bandwidth in the client or host computer. Telnet is still very popular in the enterprise networks to access the server’s resources. 1.2

Page | 1

Telnet provides the following features Telnet provides reliable communication via TCP and is carried inside the payload of TCP i.e. encapsulated in TCP.

          

Telnet operates at the OSI Model's Application Layer. It facilitates the administration of the remote servers. Multiple users can log in simultaneously. Remote printing support. Console application support. Active directory support. Session logging. Supports multiple sessions. Web server management Remote computer troubleshooting. Access files remotely.

Telnet defines how data and command sequences are sent across the Internet.   Text based games can be accessed and played. The definition is known as the Network Virtual Terminal (NVT). - Symmetrical View of terminals and processes Another concept of Telnet is one of symmetry in the negotiation syntax. thus optimizing the service provided by the other party. - Network Virtual Terminal The Network Virtual Terminal is a device used by Telnet to enable a local computer to communicate with a remote computer. This symmetry allows either the client or server ends of the connection to request a particular option as required. A terminal protocol should not only allow a terminal to interact with an application process on a host. A symmetrical view of terminals and processes. it must be able to accommodate the details of heterogeneous computers and operating systems. Information is communicated as ASCII Text Telnet is carried inside the payload of TCP (encapsulated in TCP) Three main principles: 1. To make Telnet inter-operate between as many systems as possible. To accommodate heterogeneity. but it should also allow process-process and terminal-terminal .3 Page | 2 o o o The concept of the Network Virtual Terminal (NVT). The NVT defines how data and commands are sent across the internet. The concept of negotiations.

Option is now in effect WILL DONT Receiver says it cannot support the option. This occurs in such a way that it can connect users as well as programs in such a way that the processes seem to occur simultaneously. This allows Telnet to be Page | 3 used for many different applications such as. Option is not in effect DO WILL The sender says it can handle traffic from the sender if the sender wishes to use a certain option. which side is to perform the function. It defines rules where by requests are received and translated. DO WONT Receiver says it cannot support the option.interactions. a user may negotiate the Echo option and specify whether echoing is to be done locally or remotely to the initiator of the negotiation. Option disabled. 1. Option is not in effect. and many other real-time operations.close close current connection d . Option is now in effect.unset unset options (type 'unset ?' for a list) ?/h .open hostname [port] connect to hostname (default port 23). Besides negotiating whether or not a particular option is to be in effect.display display operating parameters .quit exit telnet sen . q . For example. WONT is only valid response. when appropriate.status print status information u . video games. The Telnet protocol negotiation mechanism can be initiated by either side. Concept of Negotiation The option negotiation mechanism allows the user to set terminal parameters to values other than the default or to negotiate more sophisticated facilities. chat. This symmetry is a convention in Telnet to minimize the possibility of errors in the communications. Supported commands are: c . sending files.send send strings to server st .4 Built in Commands of Telnet (Windows)          Commands may be abbreviated. the mechanism also allows one to specify.help print help information . WONT DONT DONT WONT Option disabled. DONT is only valid response. Sender Sent WILL Receiver Responds DO Implication The sender would like to use a certain facility if the receiver can handle it.

The server must re-establish the connection after it processes the request.  HTTP is stateless: This is a direct result of HTTP's being connectionless. The diagram shows where HTTP Protocol fits in communication: . the client disconnects from the server and waits for a response. It is TCP/IP based communication Page | 4 protocol which is used to deliver virtually all files and other data.  HTTP is media independent: Any type of data can be sent by HTTP as long as both the client and server know how to handle the data content. your browser firstly contacts the web server. It is application-layer protocol used to transmit and receive hypertext pages. The standard and default port for HTTP servers to listen on is 80 but it can be changed to any other port like 8080 etc. The Web Server then sends responses back to the client. on the World Wide Web. Afterwards. A browser is works as an HTTP client because it sends requests to an HTTP server which is called Web server. There are three important things about HTTP of which you should be aware:  HTTP is connectionless: After a request is made. Whenever you write a URL in address bar of you browser. HTTP allows a client usually a web browser to send a simple request and receive response back from the server. HTTP is one of the most successful and widely used protocols on the Internet today. HTTP( Hypertext Transmission Protocol) 2. or anything else. image files. web server locates the requested page and sends the appropriate response. The server and client are aware of each other only during a request. query results. It is also known as request response protocol. These requests and responses are issued in HTTP. How content is handled is determined by the MIME specification. collectively called resources. For this reason neither the client nor the browser can retain information between different requests across the web pages.1 Introduction HTTP stands for Hypertext Transmission Protocol. These resources could be HTML files.2. each forgets the other.

 Request The web browser sends a request to server. a syndicated feed. new connection is established.3 Features of HTTP       User-Agent Redirects Last-Modified/If-Modified-Since ETag/If-None-Match Compression User-Agent The User-Agent is simply a way for a client to tell a server who it is when it requests a web page. or any sort of web service over HTTP. When the client requests a resource. After Status-Line. 2. Response-Header starts and providing the characteristics associated with data returned. .2 Each HTTP cycle has following steps  Connection The connection is established between a web browser and a web server. The connection is established via TCP/IP protocols over particular port generally Page | 5 port 80 is used. This makes HTTP a stateless protocol.2. The server firstly locates the requested document and sends the appropriate response. it only defines the rules that specify how to communicate. as specifically as possible. it should always announce who it is. HTTP is not used to establish connection.  Close The web browser makes request. However. HTTP defines the set of rules for sending the request  Response It is the response send by the web server to client. It is the response returned associated with the HTTP request. specifying the resource to retrieve. There is no account for the previous requested resource on web server or it can be said that no session maintained. The first line of the every HTTP response is called the Status-Line and consists of numeric status code returned along with reason phrase. This allows the server-side administrator to get in touch with the client-side developer if anything is going fantastically wrong.

you can tell the server the last-modified date that you got last time: you send an If-Modified-Since header with your request. On the other hand. pages move to new addresses.com is constantly updating every few minutes. the server sends back a special HTTP status code 304.this could be why. that got moved permanently” and then gives the new address in a Location: header. that got moved over here temporarily” and then gives the temporary address in a Location: header. or fourth). with the date you got back from the server last time. Your web browser cached . usually the server knows when the data you requested last changed. Status code 301 is a permanent redirect.com/index. HTTP has two different ways of signifying that a resource has moved. For example   Status code 200 means “everything's normal. All you get is the status code. Even web services can reorganize. it means “oops. http://www. All modern web browsers support last-modified date checking.abc. Or an entire domain might move. So you don't need to download the same data over and over again if it hasn't changed. the home page of Google. If the data hasn't changed since then. If you ask for the same data a second time (or third. Web services are no different. or advertise a new service). Status code 404 means “page not found”. A URL feed at http://abc.com only changes once every few weeks (when they put up a special holiday logo. the server assumes you have the data cached locally. If you've ever visited a page. it means “oops.   Last-Modified/If-Modified-Since Some data changes all the time.xml might be redirected to http://changes. Web sites get reorganized. here's the page you asked for”. Redirects Sometimes resources move around.xml.com/index. The home page of CNN. which means “this data hasn't changed since the last time you asked for it”. Every time user requests any kind of resource from an HTTP server.xml.  Status code 302 is a temporary redirect. as an organization expands and reorganizes. and HTTP provides a way for the server to include this last-modified date along with the data you requested.xml Page | 6 might be moved to http://abc.com/index. it doesn't re-send the data.abc. re-visited the same page a day later and found that it hadn't changed. the server includes a status code in its response. for example.com/xml/main. Why is this an improvement? Because when the server sends a 304. and wondered why it loaded so quickly the second time -.

so your browser knows to load the page from its cache. and text generally compresses well. Page | 7  ETag/If-None-Match ETags are an alternate way to accomplish the same thing as the last-modified date checking: don't re-download data that hasn't changed. you can ask the server that.1) . since you still have the data from the last time. if it has any new data to send you. The way it works is. and quite verbose text at that. your browser automatically sent the last-modified date it got from the server the first time.4 Other Important features of HTTP        Content negotiation (tell the server how you want the result) Data typing (Content-type) Freeform data content Extensibility via headers Encryption/authentication (SSL) Infrastructure (proxy gateways) Connectionless/connection full hybrids (in HTTP/1. you're almost always talking about moving XML back and forth over the wire. and if the data hasn't changed. it will send you back gzip-compressed data and mark it with a Content-encoding: gzip header. XML is text. the server sends some sort of hash of the data (in an ETag header) along with the data you requested. and when you visited the second time. Exactly how this hash is determined is entirely up to the server. When you request a resource over HTTP. it doesn't send you the same data a second time. 2.  Compression The last important HTTP feature is gzip compression. you include the ETag hash in an If-None-Match: header. Web services can be this smart too. you're telling the server that there's no need to re-send the same data if it still matches this hash.the contents of the page locally the first time. You include the Accept-encoding: gzip header in your request. to please send it in compressed format. The server simply says 304: Not Modified. By including the ETag hash in your second request. and if the server supports compression. The second time you request the same data. When you talk about HTTP web services. As with the last-modified date checking. the server just sends the 304. the server will send you back a 304 status code.

meaning not at the same time and therefore faster than other protocols.Files that can be transferred are stored on computers called FTP servers. 3. It allows you to verify your files were sent successfully without any problems.2 Objectives of FTP: 1. FTP client . FTP is the preferred method of exchanging files because it's faster than other protocols like HTTP or POP3. Programs such as “CyberDuck” (for the Mac platform) and CuteFTP or Filezilla (for the Windows platform) are very effective (and often free). ASCII is used only for files saved in ASCII format (this includes Postcript files) . FTP requires a client program (FTP client) and a server program (FTP server). To promote sharing of files (computer programs and/or data). ASCII 2. A client program enables the user to interact with a server in order to access information and services on the server computer.3. The server is generally password protected. FTP data is sent and received through computer port 21. To shield a user from variations in file storage systems among hosts and to transfer data reliably and efficiently. 3. Binary. The transfer is asynchronous.4 Modes of Transfer There are two modes of transfer in FTP: 1. 1. 3.This is an interface that allows the user to locate the file(s) to be transferred and initiate the transfer process. but also manage your transfers with much more control. FTP(File Transfer Protocol) – 3.1 Introduction File Transfer Protocol is a used for exchange and manipulate files over the Page | 8 TCP/IP based network like internet. To encourage indirect or implicit (via programs) use of remote computers. FTP Server . These are programs that allow you to not only log in and upload files. 3. 2.3 Working of FTP FTP works on the client/server principle.

files. Passive mode In passive mode. the data connection is closed. The control connection is used exclusively for sending FTP commands and reading server replies . not the client. To access the remote machine. you are only able to copy the files from the remote machine to your own local machine. the loginname and password will be “anonymous” and electronic mail address. . 3. the client sends a PASV command to the server. and the file's contents transferred to the client across it. Active and passive refer to the operation of the FTP server.6. the control connection is maintained. hence the server is passively waiting. and other archived data from remote machine without having to establish a userid and password. This control connection is used for the entire duration of a session between the client and server.xls). This tells the server to listen for a connection attempt from the client. Once the transfer is complete. which opens a TCP connection called the control connection to the server. Transient TCP connections called data connections are set up whenever data (normally a file's contents) is to be transferred. active and passive. and ends when the quit command is sent to the server.jpg. spreadsheets (. Meanwhile.avi). Page | 9 3. programs. images (. The server replies to PASV with the host and port address that the server is . The network user will bypass local security checks and will have access to publicly accessible files on the remote system. For example.5 ANONYMOUS FTP – It allows a user to retrieve documents.exe) and videos (.6 FTP Commands FTP commands are initiated by the client.1 Data connections may be set up in two different ways. A data connection is then established. 3.gif). Binary is used for files that are formatted and saved using a wordprocessing software like WordPerfect (. However. A session typically begins when the client logs in. the client issues a command to retrieve a file from the server via the control channel.2. you are not able to write on the remote machine or to delete any files there.txt). 1. and many executable programs (.it is never used to transfer files.

This command does not require a connection to a remote system. but another reply is to be expected before the client issues another command 2yz Positive Completion reply.listening on. but it can be retried 5yz Permanent Negative Completion reply. The requested action has successfully completed. For example. Common FTP Commands Comm and ! ? ascii Description Preceding a command with the exclamation point will cause the command to execute on the local system instead of the remote system. When a data connection is required. FTP commands sent across the control connection consist of simple text strings. the client sends a PORT command to the server. The command failed. . attempts to initiate the connection to the server at this address. The client should send another command in reply. the client sends "STOR filename". Page | 10 Active mode In active mode. which consists of a three digit number followed by human-readable text. but more information is required. the server initiates a connection to the client at this address. and should not be repeated. If an error occurred. and the client may issue another command 3yz Positive Intermediate reply. specify the address and port number the client is listening on. The first digit is the most important. The command has been accepted. bad. or incomplete. Request assistance or information about the FTP commands. the client sends "RETR filename" on the control connection to the FTP server. Generally the server is responsible for closing data connections. To set up active mode. to retrieve a file. 2. The first digit indicates if the response is good. The FTP server acknowledges each command with an FTP reply. To transfer a file. the second digit may be used to indicate what type of error occurred. The request action has been initiated. the server actively connects to the client. The client deciphers this reply and when a data connection is required. the third digit can indicate more details of the error. 4yz Transient Negative reply. The command failed. Similarly. and the five possible values are described below: 1yz Positive Preliminary reply. Set the file transfer mode to ASCII (Note: this is the default and transmits seven bits per byte).

bet. bipartisan. bandit The following will not be displayed. ben. bandit The following will not be displayed. the following will be displayed. bingo. ben. Change directory on the remote system. born.binary bye cd Page | 11 close delete dir Set the file transfer mode to binary (Note: the binary mode transfers all eight bits per byte and must be used to transfer non-ASCII files). bingo. Remove (delete) a directory in the current remote directory. have the letter "n" in the 3rd position and have a three character name. bipartisan. bet. bet. bipartisan. Copy multiple files from the remote system to the local system. Exit the FTP environment (same as quit). born. boon. boon. boy dir b?n* This will display all entries that start with the letter "b" and have the letter "n" in the 3rd position. ben. bet. boon. Find out the pathname of the current directory on the remote system. For example. List the names of the files in the current remote directory. Exit the FTP environment (same as "bye"). Copy multiple files from the local system to the remote system. the following will be displayed. For example. Terminate a session with another system. boy This will display all entries that start with the letter "b" and have the letter "n" somewhere after the letter "b". boon. Lists the contents of the remote directory. born. This command does not require a connection to a remote system. (Note: You will be prompted for a "y/n" response before copying each file). For example. This command does not require a connection to a remote system. born. boy get help lcd ls mget mkdir mput open put pwd quit rmdir Copy a file from the remote system to the local system. bipartisan. bingo. Change directory on your local system (same as CD in UNIX). ben The following will not be displayed. . bingo. This command does not require a connection to a remote system.The asterisk (*) and the question mark (?) may be used as wild cards. For example: dir b* This will display all entries that start with the letter "b". (Note: You will be prompted for a "y/n" response before copying each file). Copy a file from the local system to the remote system. boy dir b*n* dir b?n This will display all entries that start with the letter "b". For example. Request a list of all available FTP commands. Make a new directory within the current remote directory. Delete (remove) a file in the current remote directory (same as rm in UNIX). bandit. the following will be displayed. Open a connection with another system. bandit. the following will be displayed.

Sign up to vote on this title
UsefulNot useful