Download presentation
Presentation is loading. Please wait.
1
STFTP (Simplified Trivial File Transfer Protocol) MODULE #1
2
STFTP Usage and Design Transfer files between processes. Minimal overhead (no security). Designed for UDP, although could be used with many transport protocols.
3
STFTP Usage and Design (cont.) Easy to implement Small - possible to include in firmware Used to bootstrap workstations and network devices.
4
Diskless Workstation Booting 1 The call for help Diskless Workstation Help! I don't know who I am! My Ethernet address is: 4C:23:17:77:A6:03 RARP
5
The answer from the all-knowing Diskless Workstation I know all! You are to be know as: 128.113.45.211 RARP REPLY RARP Server
6
Diskless Workstation I need the file named boot-128.113.45.211 STFTP Request (Broadcast) The request for instructions
7
The dialog Diskless Workstation STFTP File Transfer STFTP Server here is part 1 I got part 1 here is part 2 boot file
8
STFTP Protocol 5 message types: –Read request –Write request –Data –ACK (acknowledgment) [ Not required in module#1 but would be required in the later modules ] –Error
9
Messages Each is an independent UDP Datagram Each has a 2 byte opcode Each packet has null terminated Source IP, Destination IP, Source port and destination port. The structure of the rest of the datagram depends on the opcode.
10
Message Formats 2 bytes FILENAMEOPCODE 0 SOURCE IP 0 DEST IP 0 SOURCE Port 0 DEST Port 0 OPCODEDATA SOURCE IP 0 DEST IP 0 SOURCE Port 0 DEST Port 0BLOCK #OPCODE SOURCE IP 0 DEST IP 0 SOURCE Port 0 DEST Port 0BLOCK #ERROR MESSAGE0OPCODE SOURCE IP 0 DEST IP 0 SOURCE Port 0 DEST Port 0BLOCK #
11
2 byte opcode network byte order null terminated ascii string containing name of file Read Request 01filename0 SOURCE IP 0 DEST IP 0 SOURCE Port 0 DEST Port 0 null terminated strings
12
2 byte opcode network byte order null terminated ascii string containing name of file Write Request 02filename0 SOURCE IP 0 DEST IP 0 SOURCE Port 0 DEST Port 0 null terminated strings
13
all data packets have 512 bytes except the last one. 2 byte opcode network byte order STFTP Data Packet data 0 to 512 bytes 03 block # SOURCE IP 0 DEST IP 0 SOURCE Port 0 DEST Port 0 null terminated string
14
STFTP Acknowledgment 2 byte opcode network byte order 2 byte block number network byte order 04 block # SOURCE IP 0 DEST IP 0 SOURCE Port 0 DEST Port 0 null terminated string
15
STFTP Error Packet 05 errcodeerrstring 2 byte opcode network byte order 2 byte error code network byte order null terminated ascii error string ascii error string 0 SOURCE IP 0 DEST IP 0 SOURCE Port 0 DEST Port 0 null terminated string
16
STFTP Error Codes (16 bit int) 0 - not defined 1 - File not found 2 - Access violation 3 - Disk full 4 - Illegal (STFTP) operation 5 - Unknown port 6 - File already exists 7 - No such user
17
When is it over? There is no length of file field sent! All data messages except the last one contain 512 bytes of data. The last data message might contain 0 bytes of data!
18
Deliverables at the end of Module #1: A STFTP Client A STFTP Server A Proxy Server
19
References: http://www.cs.rpi.edu/~hollingd/netprog
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.