Sie sind auf Seite 1von 11

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 servers 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.

Text based games can be accessed and played. Information is communicated as ASCII Text Telnet is carried inside the payload of TCP (encapsulated in TCP) Three main principles:

1.3
Page | 2
o o o

The concept of the Network Virtual Terminal (NVT). A symmetrical view of terminals and processes. The concept of negotiations.

Network Virtual Terminal The Network Virtual Terminal is a device used by Telnet to enable a local computer to communicate with a remote computer. To make Telnet inter-operate between as many systems as possible, it must be able to accommodate the details of heterogeneous computers and operating systems. To accommodate heterogeneity, Telnet defines how data and command sequences are sent across the Internet. The definition is known as the Network Virtual Terminal (NVT). The NVT defines how data and commands are sent across the internet.

Symmetrical View of terminals and processes Another concept of Telnet is one of symmetry in the negotiation syntax. This symmetry allows either the client or server ends of the connection to request a particular option as required, thus optimizing the service provided by the other party. A terminal protocol should not only allow a terminal to interact with an application process on a host, but it should also allow process-process and terminal-terminal

interactions. This symmetry is a convention in Telnet to minimize the possibility of errors in the communications. It defines rules where by requests are received and translated. 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, video games, chat, sending files, and many other real-time operations. 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. The Telnet protocol negotiation mechanism can be initiated by either side. Besides negotiating whether or not a particular option is to be in effect, the mechanism also allows one to specify, when appropriate, which side is to perform the function. For example, a user may negotiate the Echo option and specify whether echoing is to be done locally or remotely to the initiator of the negotiation. Sender Sent
WILL

Receiver Responds
DO

Implication
The sender would like to use a certain facility if the receiver can handle it. Option is now in effect

WILL

DONT

Receiver says it cannot support the option. 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. Option is now in effect.

DO

WONT

Receiver says it cannot support the option. Option is not in effect.

WONT DONT

DONT WONT

Option disabled. DONT is only valid response. Option disabled. WONT is only valid response.

1.4 Built in Commands of Telnet (Windows)


Commands may be abbreviated. Supported commands are: c - close close current connection d - display display operating parameters - open hostname [port] connect to hostname (default port 23). q - quit exit telnet sen - send send strings to server st - status print status information u - unset unset options (type 'unset ?' for a list) ?/h - help print help information

2. HTTP( Hypertext Transmission Protocol)


2.1 Introduction HTTP stands for Hypertext Transmission Protocol. It is TCP/IP based communication
Page | 4

protocol which is used to deliver virtually all files and other data, collectively called resources, on the World Wide Web. These resources could be HTML files, image files, query results, or anything else. HTTP is one of the most successful and widely used protocols on the Internet today. It is application-layer protocol used to transmit and receive hypertext pages. HTTP allows a client usually a web browser to send a simple request and receive response back from the server. Whenever you write a URL in address bar of you browser, your browser firstly contacts the web server, web server locates the requested page and sends the appropriate response. These requests and responses are issued in HTTP. A browser is works as an HTTP client because it sends requests to an HTTP server which is called Web server. The Web Server then sends responses back to the client. 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. It is also known as request response protocol. There are three important things about HTTP of which you should be aware:

HTTP is connectionless: After a request is made, the client disconnects from the server and waits for a response. The server must re-establish the connection after it processes the request.

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. How content is handled is determined by the MIME specification.

HTTP is stateless: This is a direct result of HTTP's being connectionless. The server and client are aware of each other only during a request. Afterwards, each forgets the other. For this reason neither the client nor the browser can retain information between different requests across the web pages. The diagram shows where HTTP Protocol fits in communication:

2.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. However, HTTP is not used to establish connection; it only defines the rules that specify how to communicate. Request The web browser sends a request to server, specifying the resource to retrieve. HTTP defines the set of rules for sending the request Response It is the response send by the web server to client. The server firstly locates the requested document and sends the appropriate response. The first line of the every HTTP response is called the Status-Line and consists of numeric status code returned along with reason phrase. It is the response returned associated with the HTTP request. After Status-Line, Response-Header starts and providing the characteristics associated with data returned. Close The web browser makes request, new connection is established. There is no account for the previous requested resource on web server or it can be said that no session maintained. This makes HTTP a stateless protocol. 2.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, a syndicated feed, or any sort of web service over HTTP. When the client requests a resource, it should always announce who it is, as specifically as possible. This allows the server-side administrator to get in touch with the client-side developer if anything is going fantastically wrong.

Redirects Sometimes resources move around. Web sites get reorganized, pages move to new addresses. Even web services can reorganize. A URL feed at http://abc.com/index.xml

Page | 6

might be moved to http://abc.com/xml/main.xml. Or an entire domain might move, as an organization expands and reorganizes, for example, http://www.abc.com/index.xml might be redirected to http://changes.abc.com/index.xml. Every time user requests any kind of resource from an HTTP server, the server includes a status code in its response. For example

Status code 200 means everything's normal, here's the page you asked for. Status code 404 means page not found.

HTTP has two different ways of signifying that a resource has moved.

Status code 302 is a temporary redirect; it means oops, that got moved over here temporarily and then gives the temporary address in a Location: header. Status code 301 is a permanent redirect; it means oops, that got moved permanently and then gives the new address in a Location: header.

Last-Modified/If-Modified-Since Some data changes all the time. The home page of CNN.com is constantly updating every few minutes. On the other hand, the home page of Google.com only changes once every few weeks (when they put up a special holiday logo, or advertise a new service). Web services are no different; usually the server knows when the data you requested last changed, and HTTP provides a way for the server to include this last-modified date along with the data you requested. If you ask for the same data a second time (or third, or fourth), you can tell the server the last-modified date that you got last time: you send an If-Modified-Since header with your request, with the date you got back from the server last time. If the data hasn't changed since then, the server sends back a special HTTP status code 304, which means this data hasn't changed since the last time you asked for it. Why is this an improvement? Because when the server sends a 304, it doesn't re-send the data. All you get is the status code. So you don't need to download the same data over and over again if it hasn't changed; the server assumes you have the data cached locally. All modern web browsers support last-modified date checking. If you've ever visited a page, re-visited the same page a day later and found that it hadn't changed, and wondered why it loaded so quickly the second time -- this could be why. Your web browser cached

the contents of the page locally the first time, and when you visited the second time, your browser automatically sent the last-modified date it got from the server the first time. The server simply says 304: Not Modified, so your browser knows to load the page from its cache. Web services can be this smart too.
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. The way it works is, the server sends some sort of hash of the data (in an ETag header) along with the data you requested. Exactly how this hash is determined is entirely up to the server. The second time you request the same data, you include the ETag hash in an If-None-Match: header, and if the data hasn't changed, the server will send you back a 304 status code. As with the last-modified date checking, the server just sends the 304; it doesn't send you the same data a second time. By including the ETag hash in your second request, you're telling the server that there's no need to re-send the same data if it still matches this hash, since you still have the data from the last time.

Compression The last important HTTP feature is gzip compression. When you talk about HTTP web services, you're almost always talking about moving XML back and forth over the wire. XML is text, and quite verbose text at that, and text generally compresses well. When you request a resource over HTTP, you can ask the server that, if it has any new data to send you, to please send it in compressed format. You include the Accept-encoding: gzip header in your request, and if the server supports compression, it will send you back gzip-compressed data and mark it with a Content-encoding: gzip header.

2.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.1)

3. 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. FTP is the preferred method of exchanging files because it's faster than other protocols like HTTP or POP3. The transfer is asynchronous, meaning not at the same time and therefore faster than other protocols. FTP data is sent and received through computer port 21. 3.2 Objectives of FTP: 1. To promote sharing of files (computer programs and/or data). 2. To encourage indirect or implicit (via programs) use of remote computers. 3. To shield a user from variations in file storage systems among hosts and to transfer data reliably and efficiently. 3.3 Working of FTP
FTP works on the client/server principle. A client program enables the user to interact with a server in order to access information and services on the server computer. FTP

requires a client program (FTP client) and a server program (FTP server).
FTP client - This is an interface that allows the user to locate the file(s) to be

transferred and initiate the transfer process. These are programs that allow you to not only log in and upload files, but also manage your transfers with much more control. Programs such as CyberDuck (for the Mac platform) and CuteFTP or Filezilla (for the Windows platform) are very effective (and often free). It allows you to verify your files were sent successfully without any problems. FTP Server - Files that can be transferred are stored on computers called FTP servers. The server is generally password protected. 3.4 Modes of Transfer There are two modes of transfer in FTP: 1. ASCII 2. Binary. 1. ASCII is used only for files saved in ASCII format (this includes Postcript files)

2. Binary is used for files that are formatted and saved using a wordprocessing software like WordPerfect (.txt), spreadsheets (.xls), images (.jpg, .gif), and many executable programs (.exe) and videos (.avi).
Page | 9

3.5 ANONYMOUS FTP It allows a user to retrieve documents, files, programs, and other archived data from remote machine without having to establish a userid and password. To access the remote machine, the loginname and password will be anonymous and electronic mail address. The network user will bypass local security checks and will have access to publicly accessible files on the remote system. However, you are only able to copy the files from the remote machine to your own local machine; you are not able to write on the remote machine or to delete any files there. 3.6 FTP Commands FTP commands are initiated by the client, which opens a TCP connection called the control connection to the server. This control connection is used for the entire duration of a session between the client and server. A session typically begins when the client logs in, and ends when the quit command is sent to the server. The control connection is used exclusively for sending FTP commands and reading server replies - it is never used to transfer files. Transient TCP connections called data connections are set up whenever data (normally a file's contents) is to be transferred. For example, the client issues a command to retrieve a file from the server via the control channel. A data connection is then established, and the file's contents transferred to the client across it. Once the transfer is complete, the data connection is closed. Meanwhile, the control connection is maintained. 3.6.1 Data connections may be set up in two different ways, active and passive. Active and passive refer to the operation of the FTP server, not the client. 1. Passive mode

In passive mode, the client sends a PASV command to the server. This tells the server to listen for a connection attempt from the client, hence the server is passively waiting. The server replies to PASV with the host and port address that the server is

listening on. The client deciphers this reply and when a data connection is required, attempts to initiate the connection to the server at this address. 2.
Page | 10

Active mode

In active mode, the server actively connects to the client. To set up active mode, the client sends a PORT command to the server, specify the address and port number the client is listening on. When a data connection is required, the server initiates a connection to the client at this address. Generally the server is responsible for closing data connections.

FTP commands sent across the control connection consist of simple text strings. For example, to retrieve a file, the client sends "RETR filename" on the control connection to the FTP server. To transfer a file, the client sends "STOR filename". The FTP server acknowledges each command with an FTP reply, which consists of a three digit number followed by human-readable text. The first digit indicates if the response is good, bad, or incomplete. If an error occurred, the second digit may be used to indicate what type of error occurred. Similarly, the third digit can indicate more details of the error. The first digit is the most important, and the five possible values are described below: 1yz Positive Preliminary reply. The request action has been initiated, but another reply is to be expected before the client issues another command 2yz Positive Completion reply. The requested action has successfully completed, and the client may issue another command 3yz Positive Intermediate reply. The command has been accepted, but more information is required. The client should send another command in reply. 4yz Transient Negative reply. The command failed, but it can be retried 5yz Permanent Negative Completion reply. The command failed, and should not be repeated. 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. Request assistance or information about the FTP commands. This command does not require a connection to a remote system. Set the file transfer mode to ASCII (Note: this is the default and transmits seven bits per byte).

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). Exit the FTP environment (same as quit). This command does not require a connection to a remote system. Change directory on the remote system. Terminate a session with another system. Delete (remove) a file in the current remote directory (same as rm in UNIX). Lists the contents of the remote directory.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". For example, the following will be displayed. bet, ben, bingo, born, boon, bipartisan, bandit, boy This will display all entries that start with the letter "b" and have the letter "n" somewhere after the letter "b". For example, the following will be displayed. ben, bingo, born, boon, bipartisan, bandit The following will not be displayed. bet, boy

dir b*n*

dir b?n This will display all entries that start with the letter "b", have the letter "n" in the 3rd position and have a three character name. For example, the following will be displayed. ben The following will not be displayed. bet, bingo, born, boon, bipartisan, bandit, boy dir b?n* This will display all entries that start with the letter "b" and have the letter "n" in the 3rd position. For example, the following will be displayed. ben, bingo, bandit The following will not be displayed. bet, born, boon, bipartisan, boy

get help lcd ls mget mkdir mput open put pwd quit rmdir

Copy a file from the remote system to the local system. Request a list of all available FTP commands. This command does not require a connection to a remote system. Change directory on your local system (same as CD in UNIX). List the names of the files in the current remote directory. Copy multiple files from the remote system to the local system. (Note: You will be prompted for a "y/n" response before copying each file). Make a new directory within the current remote directory. Copy multiple files from the local system to the remote system. (Note: You will be prompted for a "y/n" response before copying each file). Open a connection with another system. Copy a file from the local system to the remote system. Find out the pathname of the current directory on the remote system. Exit the FTP environment (same as "bye"). This command does not require a connection to a remote system. Remove (delete) a directory in the current remote directory.

Das könnte Ihnen auch gefallen