Telematik 1:Praktikum
Zur Navigation springen
Zur Suche springen
Aufgaben
Aufgabe 1
- Starten Sie Netscape und richten Sie den Mail Client (nicht mail.netscape.com) mit folgenden Parametern ein bzw. überprüfen Sie deren Korrektheit:
SMTP Server : spider.prakinf.tu-ilmenau.de POP3 : spider.prakinf.tu-ilmenau.de User Name : asprak? Mail Adresse : asprak?@spider.prakinf.tu-ilmenau.de
- Überprüfen Sie, ob sich in Ihrem Postfach bereits eine Mail befindet. Das Passwort für den Server Spider lautet wiprak.
- Verschicken Sie eine Mail an einen ihrer Praktikumsmitstreiter und lassen Sie sich selbst eine Mail zuschicken.
Aufgabe 2
- Informieren Sie sich anhand von RFC 1939 über die Bedeutung des Post Office Protocols - Version 3 (POP3). Wozu wird es eingesetzt?
- Um Nachrichten von einem Mail-Server abzurufen und diese zu löschen
- Unter welcher Portnummer ist ein POP3 Server im Regelfall zu erreichen?
- Port: 110
- Die Kommunikation mit einem POP3 Server wird laut RFC in mehrere Phasen eingeteilt. Welche sind das?
- Authorisation (Client identifiziert sich gegenüber dem POP3 Server)
- Transaction (Client führt Aktionen auf dem POP3 Server aus. z.B. Mails abrufen.)
- Update (Auf dem Server werden alle Ressourcen freigegeben, die während der Transaktionsphase belegt wurden. Als gelöscht markierte Mails werden endgültig gelöscht Großes gegenseitiges Verabschieden.)
- Stellen Sie kurz die Bedeutung der Kommandos USER, PASS, STAT, LIST, RETR, DELE und QUIT dar.
- USER: während Authorisationsphase. Argument ist der Benutzername
- PASS: wird nach erfolgreicher Eingabe von USER erwartet. Argument ist halt das zugehörige Passwort
- STAT: während Transaktionsphase. Statistik über Mailbox abfragen. Erwartete Antwort: +OK nn mm wobei nn Anzahl der Mails ist und mm die Größe der Mailbox
- LIST: während Transaktionsphase. Gibt Infos über Mails in Mailbox zurück (sog. Scanlisting ( +OK MailID Größe)) optionales Argument: MailID dann gibbet nur infos über die entsprechende Mail
- RETR: während Transaktionsphase. Benötigtes Argument: MailID. Gibt Inhalt der Mail zurück
- DELE: während Transaktionsphase. Benötigtes Argument: MailID. Markiert entsprechende Mail als gelöscht
- QUIT: Geht immer. Server geht in updatephase
- Schicken Sie eine eMail an sich selbst und lesen Sie diese mittels Telnet direkt vom POP3 Server!
- Zugriff auf eine 1und1 Mailbox (exemplarisch): Telnet-Zugriff
- Löschen Sie anschliessend alle eMails vom Server. Dokumentieren Sie die notwendigen Schritte.
- Anmelden am Server durch USER und PASS
- lesen der Mail per RETR MailID (halt mailIDs so lange durchprobieren, bis die richtige getroffen wurde. Oder vorher per List mal die Eigenschaften der Mails ansehen. Vielleicht gibt ja die Größe oder irgendsowas aufschluss drüber, welche Mail die richtige ist
- löschen der Mail per DELE MailID
- QUIT
- Achtung: Wenn eine (Telnet-)Verbindung zum POP3 Server besteht, kann nur auf die zum Zeitpunkt der Authentifizierung vorliegenden Mails zugegriffen werden. Zwischenzeitlich eintreffende Mails sind erst nach Neuaufbau der Verbindung sichtbar.
Aufgabe 3
In RFC 821 finden Sie die Definition zum Simple Mail Transfer Protokoll (SMTP).
- Wo liegt der Unterschied zu POP3?
- Mit SMTP kann man nur Nachrichten senden mit POP3 nur verwalten.
- Welche Portnummer wird normalerweise für SMTP benutzt?
- Port: 25
- Erschliessen Sie sich die Bedeutung der Kommandos HELO, MAIL FROM:,RCPT TO:, DATA und QUIT
- Verschicken Sie dann eine eMail an sich selbst mittels Telnet zum SMTP Server.
- Dokumentieren Sie die notwendigen Schritte. Vergewissern Sie sich, dass ihre eMail auch angekommen ist!
Aufgabe 4
In RFC 1945 sind die Mechanismen des Protokolls HTTP in Version 1.0 beschrieben.
- Wo liegt der Unterschied zwischen einem GET und einem HEAD Request?
- Welcher Port wird im Regelfall für HTTP benutzt?
- 80, 8080 ?
- Anhand welches HTTP-Headers können Sie feststellen, wann eine WWW-Seite das letzte Mal modifiziert wurde? Wie können Sie diese Information ausnutzen, um eine evtl. nicht veränderte Seite nicht neu übertragen zu müssen?
- Stellen Sie fest, wann die Seite http://eris.prakinf.tu-ilmenau.de/edu/Telematik1/ das letzte Mal geändert wurde! Benutzen Sie dazu nicht den WWW-Browser, sondern eine Telnet Verbindung zum Server.
- Beschreiben Sie die notwendigen Schritte. Beachten Sie dabei, dass HTTP Gross-/Kleinschreibung unterscheidet.
- Rufen Sie die Seite http://www.tu-ilmenau.de/ mittels Telnet ab und erläutern Sie die erhaltene Ausgabe.
Aufgabe 5
- Machen Sie sich mit dem im RFC 765 beschriebenen Modell des FTP-Dienstes vertraut!
- Worin besteht der Unterschied zwischen einer Steuer- und Datenverbindung? Welcher TCP-Port wird standardmäßig für beide verwendet?
- FTP: 21
- DTP: 20 (ist aber nie so *g*)
THE FTP MODEL With the above definitions in mind, the following model (shown in Figure 1) may be diagrammed for an FTP service. ------------- |/---------\| || User || -------- ||Interface|<--->| User | |\----:----/| -------- ---------- | V | |/------\| FTP Commands |/---------\| ||Server|<---------------->| User || || PI || FTP Replies || PI || |\--:---/| |\----:----/| | V | | V | -------- |/------\| Data |/---------\| -------- | File |<--->|Server|<---------------->| User |<--->| File | |System| || DTP || Connection || DTP || |System| -------- |\------/| |\---------/| -------- ---------- ------------- Server-FTP User-FTP NOTES: 1. The data connection may be used in either direction. 2. The data connection need not exist all of the time. Figure 1 Model for FTP Use In the model described in Figure 1, the user-protocol interpreter initiates the TELNET connection. At the initiation of the user, standard FTP commands are generated by the user-PI and transmitted to the server process via the TELNET connection. (The user may establish a direct TELNET connection to the server-FTP, from a TIP terminal for example, and generate standard FTP commands himself, bypassing the user-FTP process.) Standard replies are sent from the server-PI to the user-PI over the TELNET connection in response to the commands. The FTP commands specify the parameters for the data connection (data port, transfer mode, representation type, and structure) and the nature of file system operation (store, retrieve, append, delete, etc.). The user-DTP or its designate should "listen" on the specified data port, and the server initiate the data connection and data transfer in accordance with the specified parameters. It should be noted that the data port need not be in 6 IEN 149 June 1980 RFC 765 File Transfer Protocol the same Host that initiates the FTP commands via the TELNET connection, but the user or his user-FTP process must ensure a "listen" on the specified data port. It should also be noted that the data connection may be used for simultaneous sending and receiving. In another situation a user might wish to transfer files between two Hosts, neither of which is his local Host. He sets up TELNET connections to the two servers and then arranges for a data connection between them. In this manner control information is passed to the user-PI but data is transferred between the server data transfer processes. Following is a model of this server-server interaction. TELNET ------------ TELNET ---------->| User-FTP |<----------- | | User-PI | | | | "C" | | V ------------ V -------------- -------------- | Server-FTP | Data Connection | Server-FTP | | "A" |<---------------------->| "B" | -------------- Port (A) Port (B) -------------- Figure 2 The protocol requires that the TELNET connections be open while data transfer is in progress. It is the responsibility of the user to request the closing of the TELNET connections when finished using the FTP service, while it is the server who takes the action. The server may abort data transfer if the TELNET connections are closed without command.
- Hinweis: Machen Sie sich den Unterschied zwischen der Richtung des Verbindungsaufbaus (passiv/aktiv) und der Richtung des Datenaustausches (senden/empfangen) klar!
DATA PORT (PORT) The argument is a HOST-PORT specification for the data port to be used in data connection. There defaults for both the user and server data ports, and under normal circumstances this command and its reply are not needed. If this command 23 June 1980 IEN 149 File Transfer Protocol RFC 765 is used the argument is the concatenation of a 32-bit internet host address and a 16-bit TCP port address. This address information is broken into 8-bit fields and the value of each field is transmitted as a decimal number (in character string representation). The fields are separated by commas. A port command would be: PORT h1,h2,h3,h4,p1,p2 where, h1 is the high order 8 bits of the internet host address. PASSIVE (PASV) This command requests the server-DTP to "listen" on a data port (which is not its default data port) and to wait for a connection rather than initiate one upon receipt of a transfer command. The response to this command includes the host and port address this server is listening on.
Aufgabe 6
- Verschaffen Sie sich einen Überblick über die Bedeutung folgender FTPProtokollworte:
USER NAME (USER) The argument field is a TELNET string identifying the user. The user identification is that which is required by the server for access to its file system. This command will normally be the first command transmitted by the user after the TELNET connections are made (some servers may require this). Additional identification information in the form of a password and/or an account command may also be required by some servers. Servers may allow a new USER command to be entered at any point in order to change the access control and/or accounting information. This has the effect of flushing any user, password, and account information already supplied and beginning the login sequence again. All transfer parameters are unchanged and any file transfer in progress is completed under the old account.
PASSWORD (PASS) The argument field is a TELNET string identifying the user's password. This command must be immediately preceded by the user name command, and, for some sites, completes the user's identification for access control. Since password information is quite sensitive, it is desirable in general to "mask" it or suppress typeout. It appears that the server has no foolproof way to achieve this. It is therefore the responsibility of the user-FTP process to hide the sensitive password information.
DATA PORT (PORT) The argument is a HOST-PORT specification for the data port to be used in data connection. There defaults for both the user and server data ports, and under normal circumstances this command and its reply are not needed. If this command is used the argument is the concatenation of a 32-bit internet host address and a 16-bit TCP port address. This address information is broken into 8-bit fields and the value of each field is transmitted as a decimal number (in character string representation). The fields are separated by commas. A port command would be: PORT h1,h2,h3,h4,p1,p2 where, h1 is the high order 8 bits of the internet host address.
PASSIVE (PASV) This command requests the server-DTP to "listen" on a data port (which is not its default data port) and to wait for a connection rather than initiate one upon receipt of a transfer command. The response to this command includes the host and port address this server is listening on.
RETRIEVE (RETR) This command causes the server-DTP to transfer a copy of the file, specified in the pathname, to the server- or user-DTP at the other end of the data connection. The status and contents of the file at the server site shall be unaffected.
STORE (STOR) This command causes the server-DTP to accept the data transferred via the data connection and to store the data as a file at the server site. If the file specified in the pathname exists at the server site then its contents shall be replaced by the data being transferred. A new file is created at the server site if the file specified in the pathname does not already exist.
LIST (LIST) This command causes a list to be sent from the server to the passive DTP. If the pathname specifies a directory, the server should transfer a list of files in the specified directory. If the pathname specifies a file then the server should send current information on the file. A null argument implies the user's current working or default directory. The data transfer is over the data connection in type ASCII or type EBCDIC. (The user must ensure that the TYPE is appropriately ASCII or EBCDIC).
LOGOUT (QUIT) This command terminates a USER and if file transfer is not in progress, the server closes the TELNET connection. If file transfer is in progress, the connection will remain open for result response and the server will then close it. If the user-process is transferring files for several USERs but does not wish to close and then reopen connections for each, then the REIN command should be used instead of QUIT. An unexpected close on the TELNET connection will cause the server to take the effective action of an abort (ABOR) and a logout (QUIT).
- Wie erfolgt die Umschaltung zwischen Passiv- und Aktiv-Modus?
- Mit PASS oder PORT.
- Weitere Infomationen finden Sie bei Bedarf unter
RFC 765 (FTP COMMANDS) RFC 765 (The following are)
Aufgabe 7
- Bauen Sie mit Hilfe von telnet eine Verbindung zum FTP-Server spider auf (username asprak?, password wiprak)!
- Nutzen Sie den Passiv-Modus des FTP-Servers, um sich mit Hilfe eines zweiten telnet-Programms ein Directory-Listing des Wurzelverzeichnisses „/“ auf dem Bildschirm ausgeben zu lassen.
- Notieren Sie (kurz!) Ihr Vorgehen.
RFC 765 (ESTABLISHING DATA CONNECTIONS)
- Hinweis: Die Portnummer für die Datenverbindung wird durch den FTP-Server in zwei Byte angegeben (h1,h2,h3,h4,p1,p2), die Sie erst umrechnen müssen (256 * p1 + p2). Für die Berechnung können die Programme bc oder xcalc nützlich sein.