You are on page 1of 8

Telnet + FTP

TELNET
Telnet ,
Telnet .
MAC header IP header TCP header Telnet message
Telnet :
Code
Name
240 SE
241 NOP
242 Data Mark

Description
End of subnegotiation parameters.
No operation.
The data stream portion of a Synch. This should always be accompanied by a
TCP Urgent notification.
NVT character BRK.

243 Break
Interrupt
The function IP.
244
Process
245 Abort output The function AO.
246 Are You There The function AYT.
Erase
The function EC.
247
character
The function EL.
248 Erase Line
The GA signal.
249 Go ahead
Indicates that what follows is subnegotiation of the indicated option.
250 SB
WILL (option Indicates the desire to begin performing, or confirmation that you are now
251
code)
performing, the indicated option.
WON'T
Indicates the refusal to perform, or continue performing, the indicated option.
252
(option code)
DO (option
Indicates the request that the other party perform, or confirmation that you are
253
code)
expecting the other party to perform, the indicated option.
DON'T
Indicates the demand that the other party stop performing, or confirmation that
254
(option code) you are no longer expecting the other party to perform, the indicated option.
Data Byte 255.
255 IAC

Telnet :
Code
Option
0 TRANSMIT-BINARY, Binary Transmission.
1 ECHO, Echo.
2 Reconnection.
3 SUPPRESS-GO-AHEAD, Suppress Go Ahead.
4 Approx Message Size Negotiation.
5 STATUS.
6 TIMING-MARK, Timing Mark
2

7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44

RCTE, Remote Controlled Trans and Echo.


Output Line Width.
Output Page Size.
NAOCRD, Negotiate About Output Carriage-Return
Disposition.
NAOHTS, Negotiate About Output Horizontal
Tabstops.
NAOHTD, Negotiate About Output Horizontal Tab
Disposition.
NAOFFD, Negotiate About Output Formfeed
Disposition.
NAOVTS, Negotiate About Vertical Tabstops.
NAOVTD, Negotiate About Output Vertcial Tab
Disposition.
NAOLFD, Negotiate About Output Linefeed
Disposition.
Extended ASCII.
LOGOUT, Logout.
BM, Byte Macro.
Data Entry Terminal.
SUPDUP.
SUPDUP-OUTPUT, SUPDUP Output.
SEND-LOCATION, Send Location.
TERMINAL-TYPE, Terminal Type.
END-OF-RECORD, End of Record.
TUID, TACACS User Identification.
OUTMRK, Output Marking.
TTYLOC, Terminal Location Number.
Telnet 3270 Regime.
X.3 PAD.
NAWS, Negotiate About Window Size.
Terminal Speed.
Remote Flow Control.
Linemode.
X Display Location.
Environment Option.
AUTHENTICATION, Authentication Option.
Encryption Option.
New Environment Option.
TN3270E.
XAUTH.
CHARSET.
RSP, Telnet Remote Serial Port.
Com Port Control Option
3

45
46
47
48
49
50
137
138
139
140
141
254
255

Telnet Suppress Local Echo


Telnet Start TLS
KERMIT
SEND-URL
FORWARD_X

TELOPT PRAGMA LOGON


TELOPT SSPI LOGON
TELOPT PRAGMA HEARTBEAT

EXOPL, Extended-Options-List.

FTP File Transfer Protocol


FTP :
- ( 21 )
- ( 20 )

FTP :
MAC header IP header TCP header FTP message

FTP :
Command
Description
Abort.
ABOR
Account.
ACCT
Authentication/Security Data.
ADAT
Allocate.
ALLO
Append.
APPE
Authentication/Security Mechanism.
AUTH
Clear Command Channel.
CCC
Change to parent directory.
CDUP
Confidentiality Protected Command.
CONF
Change working directory.
CWD
Delete.
DELE
Privacy Protected Command.
ENC
Extended Data port.
EPRT
Extended Passive.
EPSV
Feature.
FEAT
Help.
HELP
Language negotiation.
LANG
List.
LIST
Long data port.
LPRT
Long passive.
LPSV
MDTM File modification time.
Integrity Protected Command.
MIC
Make directory.
MKD
MLSD
MLST
Transfer mode.
MODE
Name list.
NLST
No operation.
NOOP
Options.
OPTS
Password.
PASS
Passive mode.
PASV
5

PBSZ
PORT
PROT
PWD
QUIT
REIN
REST
RETR
RMD
RNFR
RNTO
SITE
SIZE
SMNT
STAT
STOR
STOU
STRU
SYST
TYPE
USER
XCUP
XMKD
XPWD
XRCP
XRMD
XRSQ
XSEM
XSEN

Protection Buffer Size.


Data port.
Data Channel Protection Level.
Print working directory.
Logout.
Reinitialize.
Restart of interrupted transfer.
Retrieve.
Remove directory.
Rename from.
Rename to.
Site parameters.
File size.
Structure mount.
Status.
Store.
Store unique.
File structure.
System.
Representation type.
User name.
Change to the parent of the current working directory.
Make a directory.
Print the current working directory.
Remove the directory.
Send, Mail if cannot.
Send to terminal.

FTP
xyz +
, .

( , , ...).
5 :
1yz

,
.

2yz Positive Completion reply .


.
6

3yz Positive Intermediate reply



.
4yz Transient Negative Completion reply
,
.
5yz Permanent Negative Completion reply
.
.

,
. (e.g. file system error, command syntax error).
:
x0z Syntax ,
,

x1z Information - ,
x2z Connections
x3z Authentication and accounting

x4z .
x5z File system file system
file system - .

()
.

:
,
FTP TKLAB file.exe
ftp.feit.ukim.edu.mk 1301 () ,
5001 .
DNS SERVER

TKLAB
ftp.feit.ukim.edu.mk

ftp.feit.ukim.edu.mk

DNS (Query)
DNS (Reply)
TCP (SYN) (1301,21)
TCP (SYN, ACK) (21,1301)

Get File.exe

TCP (ACK) (1301,21)


PORT (5001) (1301,21)
FTP (200 OK) (21,1301)
FTP (GET File.exe) (1301,21)
Opening Data connection (21, 1301)
TCP (SYN) (20, 5001)
TCP (SYN, ACK)(5001,20)
TCP (ACK) (20, 5001)
DATA (20, 5001)
TCP (FIN, ACK) (20, 5001)
TCP (ACK)(5001,20)
TCP (FIN, ACK)(5001,20)
TCP (ACK) (20, 5001)

FTP (Quit) (1301,21)


FTP (221) (21,1301)
TCP (RST, ACK)(1301,21)
TCP (FIN, ACK) (21,1301)