TFTP - Trivial File Transfer Protocol
What is TFTP?
TFTP stands for Trivial File Transfer Protocol. It is a simple, lightweight protocol used to transfer files between devices on a network. Unlike FTP, TFTP does not require authentication and is typically used in local or controlled environments.
What is the purpose of TFTP?
Has a very small footprint, making it ideal for embedded systems.
Easy to implement and use in bootstrapping and firmware updates.
Commonly used for network booting, such as loading operating systems or configurations onto routers, switches, or diskless workstations.
How does it work?
Client sends a request – A device sends a read or write request to the TFTP server.
Server responds – The server acknowledges and begins the file transfer.
Data is transferred in blocks – Each block is acknowledged by the receiver.
Transfer completes – When the last block is received and acknowledged, the session ends.
Where is TFTP used?
Network booting (PXE) – For loading OS images onto diskless clients.
Firmware upgrades – For routers, switches, and embedded devices.
Configuration backups – For network equipment in enterprise environments.
Embedded systems – Where minimal protocol overhead is needed.
Which OSI Layer does this protocol belong to?
TFTP operates at the Application Layer (Layer 7) of the OSI model.
It provides file transfer services directly to applications or users.
Defines application-level commands like read and write requests.
Uses UDP (Layer 4) for transport, but protocol logic resides at Layer 7.
Topics in this section,
In this section, you are going to learn
Terminology
Version Info
sno |
version |
RFC - Version |
Core / Contribution |
Year |
---|---|---|---|---|
1 |
TFTP v1 |
RFC 783 |
Initial specification by Karen R. Sollins |
1981 |
2 |
TFTP v2 |
RFC 1350 |
Revision 2 fixes and clarifications (e.g., Sorcerer’s Apprentice bug) |
1992 |
3 |
TFTP Option Extension |
RFC 1782 (superseded), RFC 2347 |
Adds option negotiation mechanism |
1995 (RFC 1782), 1998 (RFC 2347) |
Setup
Setup
Read Request (RRQ) Packet
S.No |
Protocol Packets |
Description |
Size(bytes) |
---|---|---|---|
1 |
Read Request (RRQ) Packet |
Client requests to read a file from the server |
~10-300 |
Arguments |
Opcode + Filename + Mode |
260 |
|
Opcode |
1 (RRQ) |
1 |
|
Filename |
Name of the file to read |
variable(255+) |
|
Mode |
Transfer mode (e.g., netascii, octet, mail) |
variable(1-10) |
|
Write Request (WRQ) Packet
2 |
Write Request (WRQ) Packet |
Client requests to write a file to the server |
~10-300 |
---|---|---|---|
Arguments |
Opcode + Filename + Mode |
260 |
|
Opcode |
2 (WRQ) |
1 |
|
Filename |
Name of the file to write |
variable(255+) |
|
Mode |
Transfer mode (e.g., netascii, octet, mail) |
variable(1-10) |
|
DATA Packet
3 |
DATA Packet |
Carries a block of file data |
4-516 |
---|---|---|---|
Arguments |
Opcode + Block number |
4 |
|
Opcode |
3 |
2 |
|
Block Number |
Sequence number of the data block |
2 |
|
Data Payload |
File Data |
variable(0-512) |
|
Acknowledgment (ACK) Packet
4 |
Acknowledgment (ACK) Packet |
Acknowledges receipt of a data block |
4 |
---|---|---|---|
Arguments |
Opcode + Block number |
4 |
|
Opcode |
4 |
2 |
|
Block Number |
Acknowledges the corresponding data block |
2 |
|
ERROR Packet
5 |
ERROR Packet |
Indicates an error occurred during transfer |
5-260+ |
---|---|---|---|
Arguments |
Opcode + Error Code |
7 |
|
Opcode |
5 |
2 |
|
Error Code |
Indicates the type of error (e.g., file not found, access violation) |
2 |
|
Error Message |
Human-readable error description |
variable(1-255+) |
|
Option Acknowledgment (OACK) Packet
6 |
Option Acknowledgment (OACK) Packet |
Acknowledges options in extended TFTP (RFC 2347) |
4300+ |
---|---|---|---|
Arguments |
Opcode+Options |
250 |
|
Opcode |
6 |
2 |
|
Options |
Option String in format Key-value pairs for options like block size, timeout, etc. |
Variable |
|
sno |
Use cases |
Description |
---|---|---|
1 |
Network Booting (PXE Boot) |
TFTP is widely used to transfer boot files to diskless workstations or thin clients during Preboot Execution Environment (PXE) booting. |
2 |
Firmware Updates |
Many embedded systems (e.g., routers, switches, IoT devices) use TFTP to download firmware updates due to its simplicity and low overhead. |
3 |
Configuration File Transfers |
Network devices like switches and routers often use TFTP to upload or download configuration files. |
4 |
Backup and Restore |
TFTP can be used to back up or restore device configurations in network management. |
5 |
Simple File Transfers |
In controlled environments, TFTP is used for transferring files where authentication and encryption are not required. |
6 |
VoIP Phone Provisioning |
TFTP is used to deliver configuration files and firmware to IP phones during provisioning. |
S.no |
Feature |
Description |
---|---|---|
1 |
File Transfer |
|
2 |
Authentication |
|
3 |
Directory Operations |
|
4 |
File Management |
|
5 |
Modes of Transfer |
|
6 |
Transfer Types |
|
7 |
Multiple Platforms |
|
8 |
Control & Data Channels |
|
9 |
Logging & Auditing |
|
File Transfer - Testcases
S.No |
Test Case |
Description |
Expected Result |
---|---|---|---|
1 |
TC_FT_001 |
Verify file upload with valid filename |
File is uploaded successfully |
2 |
TC_FT_002 |
Verify file download with valid filename |
File is downloaded successfully |
3 |
TC_FT_003 |
Upload a file that already exists on server |
Server overwrites or rejects based on config |
4 |
TC_FT_004 |
Download a non-existent file |
Error message: File not found |
5 |
TC_FT_005 |
Upload a file with special characters in name |
Error or success based on server config |
6 |
TC_FT_006 |
Upload a file with maximum allowed size |
File is uploaded successfully |
7 |
TC_FT_007 |
Upload a file exceeding maximum size |
Error: File too large |
8 |
TC_FT_008 |
Download a file while another upload is in progress |
File is downloaded or queued |
9 |
TC_FT_009 |
Upload a file with read-only permissions |
Error: Permission denied |
10 |
TC_FT_010 |
Download a file with write-only permissions |
Error: Permission denied |
11 |
TC_FT_011 |
Upload a binary file |
File is uploaded and integrity maintained |
12 |
TC_FT_012 |
Download a binary file |
File is downloaded and integrity maintained |
13 |
TC_FT_013 |
Upload a file with 0 bytes |
File is uploaded successfully |
14 |
TC_FT_014 |
Download a file with 0 bytes |
File is downloaded successfully |
15 |
TC_FT_015 |
Upload a file with long filename (>255 chars) |
Error: Filename too long |
16 |
TC_FT_016 |
Download a file with long filename |
Error: Filename too long |
17 |
TC_FT_017 |
Upload file with invalid characters in name |
Error: Invalid filename |
18 |
TC_FT_018 |
Download file with invalid characters in name |
Error: Invalid filename |
19 |
TC_FT_019 |
Upload file with slow network |
File uploads with delay or timeout |
20 |
TC_FT_020 |
Download file with slow network |
File downloads with delay or timeout |
21 |
TC_FT_021 |
Upload file with packet loss |
Retransmission occurs, file uploads |
22 |
TC_FT_022 |
Download file with packet loss |
Retransmission occurs, file downloads |
23 |
TC_FT_023 |
Upload file with corrupted data |
Error or corrupted file on server |
24 |
TC_FT_024 |
Download file with corrupted data |
Error or corrupted file on client |
25 |
TC_FT_025 |
Upload file with timeout |
Error: Timeout occurred |
26 |
TC_FT_026 |
Download file with timeout |
Error: Timeout occurred |
27 |
TC_FT_027 |
Upload file with duplicate request |
Server handles duplicate gracefully |
28 |
TC_FT_028 |
Download file with duplicate request |
Server handles duplicate gracefully |
29 |
TC_FT_029 |
Upload file with invalid TFTP opcode |
Error: Illegal TFTP operation |
30 |
TC_FT_030 |
Download file with invalid TFTP opcode |
Error: Illegal TFTP operation |
31 |
TC_FT_031 |
Upload file with incorrect block number |
Error or retransmission |
32 |
TC_FT_032 |
Download file with incorrect block number |
Error or retransmission |
33 |
TC_FT_033 |
Upload file with unsupported mode (e.g., “netascii”) |
Error: Unsupported mode |
34 |
TC_FT_034 |
Download file with unsupported mode |
Error: Unsupported mode |
35 |
TC_FT_035 |
Upload file with mode “octet” |
File is uploaded successfully |
36 |
TC_FT_036 |
Download file with mode “octet” |
File is downloaded successfully |
37 |
TC_FT_037 |
Upload file with interrupted connection |
Upload fails or resumes if supported |
38 |
TC_FT_038 |
Download file with interrupted connection |
Download fails or resumes if supported |
39 |
TC_FT_039 |
Upload file with multiple clients |
Server handles concurrent uploads |
40 |
TC_FT_040 |
Download file with multiple clients |
Server handles concurrent downloads |
41 |
TC_FT_041 |
Upload file with invalid server IP |
Error: Host unreachable |
42 |
TC_FT_042 |
Download file with invalid server IP |
Error: Host unreachable |
43 |
TC_FT_043 |
Upload file with firewall blocking port 69 |
Error: Connection refused |
44 |
TC_FT_044 |
Download file with firewall blocking port 69 |
Error: Connection refused |
45 |
TC_FT_045 |
Upload file with server disk full |
Error: Disk full or allocation exceeded |
46 |
TC_FT_046 |
Download file with client disk full |
Error: Disk full |
47 |
TC_FT_047 |
Upload file with filename case sensitivity |
Server handles case as per config |
48 |
TC_FT_048 |
Download file with filename case sensitivity |
Server handles case as per config |
49 |
TC_FT_049 |
Upload file with retry mechanism |
File uploads after retries |
50 |
TC_FT_050 |
Download file with retry mechanism |
File downloads after retries |
Authentication - Testcases
S.No |
Test Case |
Description |
Expected Result |
---|---|---|---|
1 |
Valid Login |
Login with correct username and password |
Login successful |
2 |
Invalid Username |
Login with incorrect username |
Authentication fails |
3 |
Invalid Password |
Login with incorrect password |
Authentication fails |
4 |
Empty Username |
Attempt login with empty username |
Authentication fails |
5 |
Empty Password |
Attempt login with empty password |
Authentication fails |
6 |
Both Fields Empty |
Attempt login with empty username and password |
Authentication fails |
7 |
Case Sensitivity |
Login with correct credentials but wrong case |
Authentication fails |
8 |
Special Characters in Username |
Use special characters in username |
Authentication fails or succeeds based on server rules |
9 |
Special Characters in Password |
Use special characters in password |
Authentication succeeds if password is correct |
10 |
Long Username |
Use a very long username |
Authentication fails or succeeds based on server limits |
11 |
Long Password |
Use a very long password |
Authentication fails or succeeds based on server limits |
12 |
SQL Injection Attempt |
Try SQL injection in login fields |
Authentication fails, input sanitized |
13 |
Anonymous Login Allowed |
Login using anonymous credentials |
Login successful |
14 |
Anonymous Login Disallowed |
Attempt anonymous login when disabled |
Authentication fails |
15 |
Login with Expired Account |
Use expired user credentials |
Authentication fails |
16 |
Login with Locked Account |
Use credentials of a locked account |
Authentication fails |
17 |
Login with Disabled Account |
Use credentials of a disabled account |
Authentication fails |
18 |
Login with Inactive Account |
Use credentials of an inactive account |
Authentication fails |
19 |
Login with Multiple Sessions |
Login from multiple clients simultaneously |
All sessions authenticated if allowed |
20 |
Login with IP Restriction |
Login from unauthorized IP |
Authentication fails |
21 |
Login with Time Restriction |
Login outside allowed time window |
Authentication fails |
22 |
Login with Role Restriction |
Login with user not allowed FTP access |
Authentication fails |
23 |
Login with Correct Credentials After Failure |
Retry login after failed attempt |
Login successful |
24 |
Login After Multiple Failures |
Login after several failed attempts |
Account may be locked or login succeeds |
25 |
Login with Encrypted Password |
Use encrypted password (e.g., FTPS) |
Authentication successful |
26 |
Login with Plaintext Password |
Use plaintext password (FTP) |
Authentication successful |
27 |
Login with SFTP |
Authenticate using SFTP protocol |
Authentication successful |
28 |
Login with FTPS |
Authenticate using FTPS protocol |
Authentication successful |
29 |
Login with Invalid Port |
Attempt login on wrong port |
Connection fails |
30 |
Login with Correct Port |
Attempt login on correct port |
Authentication successful |
31 |
Login with Proxy |
Authenticate via FTP proxy |
Authentication successful |
32 |
Login with VPN |
Authenticate via VPN connection |
Authentication successful |
33 |
Login with Firewall Enabled |
Authenticate with firewall restrictions |
Authentication may fail or succeed |
34 |
Login with Brute Force Attempt |
Simulate brute force login |
Account locked or blocked |
35 |
Login with Captcha (if enabled) |
Attempt login with captcha |
Authentication succeeds if captcha passed |
36 |
Login with MFA Enabled |
Authenticate with multi-factor authentication |
Authentication successful |
37 |
Login with MFA Disabled |
Authenticate without MFA |
Authentication successful |
38 |
Login with Certificate |
Authenticate using client certificate |
Authentication successful |
39 |
Login with Invalid Certificate |
Use invalid certificate |
Authentication fails |
40 |
Login with Expired Certificate |
Use expired certificate |
Authentication fails |
41 |
Login with Revoked Certificate |
Use revoked certificate |
Authentication fails |
42 |
Login with Public Key |
Authenticate using SSH public key |
Authentication successful |
43 |
Login with Invalid Public Key |
Use wrong public key |
Authentication fails |
44 |
Login with Password Policy Violation |
Use password not meeting policy |
Authentication fails |
45 |
Login with Session Timeout |
Login after session timeout |
Re-authentication required |
46 |
Login with Session Persistence |
Maintain session after login |
Session remains active |
47 |
Login with Session Hijacking Attempt |
Simulate session hijack |
Session invalidated |
48 |
Login with Logging Enabled |
Enable logging during login |
Login attempts logged |
49 |
Login with Audit Trail |
Ensure audit trail is recorded |
Login recorded in audit logs |
50 |
Login with Server Restart |
Attempt login after server restart |
Authentication successful |
Directory Operations - Testcases
S.No |
Test Case |
Description |
Expected Result |
---|---|---|---|
1 |
TC_DIR_001 |
List contents of a valid directory |
Directory contents listed |
2 |
TC_DIR_002 |
List contents of an empty directory |
Message: Directory is empty |
3 |
TC_DIR_003 |
List contents of a non-existent directory |
Error: Directory not found |
4 |
TC_DIR_004 |
Create a new directory with valid name |
Directory created successfully |
5 |
TC_DIR_005 |
Create a directory that already exists |
Error: Directory already exists |
6 |
TC_DIR_006 |
Create directory with special characters |
Error or sanitized name |
7 |
TC_DIR_007 |
Create directory with long name (>255 chars) |
Error: Name too long |
8 |
TC_DIR_008 |
Delete an existing empty directory |
Directory deleted successfully |
9 |
TC_DIR_009 |
Delete a non-empty directory |
Error or recursive delete based on config |
10 |
TC_DIR_010 |
Delete a non-existent directory |
Error: Directory not found |
11 |
TC_DIR_011 |
Rename a directory with valid new name |
Directory renamed successfully |
12 |
TC_DIR_012 |
Rename a directory to an existing name |
Error: Name conflict |
13 |
TC_DIR_013 |
Rename a non-existent directory |
Error: Directory not found |
14 |
TC_DIR_014 |
Navigate to a valid subdirectory |
Navigation successful |
15 |
TC_DIR_015 |
Navigate to a non-existent subdirectory |
Error: Directory not found |
16 |
TC_DIR_016 |
Navigate using relative path |
Navigation successful |
17 |
TC_DIR_017 |
Navigate using absolute path |
Navigation successful |
18 |
TC_DIR_018 |
Navigate using “..” to parent directory |
Navigation successful |
19 |
TC_DIR_019 |
Attempt directory traversal attack |
Error: Access denied |
20 |
TC_DIR_020 |
List directory with read-only permissions |
Directory listed |
21 |
TC_DIR_021 |
Create directory with write-only permissions |
Error: Permission denied |
22 |
TC_DIR_022 |
Delete directory with insufficient permissions |
Error: Permission denied |
23 |
TC_DIR_023 |
List directory with special characters in path |
Error or sanitized path |
24 |
TC_DIR_024 |
Create nested directories in one command |
Directories created recursively |
25 |
TC_DIR_025 |
Delete nested directories recursively |
All directories deleted |
26 |
TC_DIR_026 |
List directory with symbolic link |
Target directory listed |
27 |
TC_DIR_027 |
Create directory with symbolic link in path |
Directory created at target |
28 |
TC_DIR_028 |
Delete directory with symbolic link |
Target directory deleted |
29 |
TC_DIR_029 |
List directory with large number of files |
All files listed |
30 |
TC_DIR_030 |
List directory with timeout |
Error: Timeout occurred |
31 |
TC_DIR_031 |
Create directory with timeout |
Error: Timeout occurred |
32 |
TC_DIR_032 |
Delete directory with timeout |
Error: Timeout occurred |
33 |
TC_DIR_033 |
List directory with network interruption |
Error or retry |
34 |
TC_DIR_034 |
Create directory with network interruption |
Error or retry |
35 |
TC_DIR_035 |
Delete directory with network interruption |
Error or retry |
36 |
TC_DIR_036 |
List directory with invalid characters in path |
Error: Invalid path |
37 |
TC_DIR_037 |
Create directory with invalid characters |
Error: Invalid name |
38 |
TC_DIR_038 |
Delete directory with invalid characters |
Error: Invalid name |
39 |
TC_DIR_039 |
List directory with symbolic link loop |
Error: Loop detected |
40 |
TC_DIR_040 |
Create directory with trailing slash |
Directory created successfully |
41 |
TC_DIR_041 |
Delete directory with trailing slash |
Directory deleted successfully |
42 |
TC_DIR_042 |
List directory with trailing slash |
Directory listed |
43 |
TC_DIR_043 |
Attempt to create directory in restricted path |
Error: Access denied |
44 |
TC_DIR_044 |
Attempt to delete root directory |
Error: Operation not allowed |
45 |
TC_DIR_045 |
Attempt to rename root directory |
Error: Operation not allowed |
46 |
TC_DIR_046 |
Attempt to list root directory |
Root directory listed |
47 |
TC_DIR_047 |
Attempt to create directory with unicode characters |
Directory created successfully |
48 |
TC_DIR_048 |
Attempt to list directory with unicode characters |
Directory listed successfully |
49 |
TC_DIR_049 |
Attempt to delete directory with unicode characters |
Directory deleted successfully |
50 |
TC_DIR_050 |
Attempt to perform directory operations without authentication |
Error: Authentication required |
File Management - Testcases
S.No |
Test Case |
Description |
Expected Result |
---|---|---|---|
1 |
TC_FM_001 |
Upload a file to the server |
File uploaded successfully |
2 |
TC_FM_002 |
Download a file from the server |
File downloaded successfully |
3 |
TC_FM_003 |
Delete an existing file |
File deleted successfully |
4 |
TC_FM_004 |
Delete a non-existent file |
Error: File not found |
5 |
TC_FM_005 |
Rename a file with a valid new name |
File renamed successfully |
6 |
TC_FM_006 |
Rename a file to an existing filename |
Error: File already exists |
7 |
TC_FM_007 |
Rename a non-existent file |
Error: File not found |
8 |
TC_FM_008 |
Move a file to a different directory |
File moved successfully |
9 |
TC_FM_009 |
Move a file to a non-existent directory |
Error: Directory not found |
10 |
TC_FM_010 |
Copy a file to another location |
File copied successfully |
11 |
TC_FM_011 |
Copy a file with overwrite disabled |
Error: File already exists |
12 |
TC_FM_012 |
Overwrite an existing file during upload |
File overwritten successfully |
13 |
TC_FM_013 |
Attempt to delete a file without permission |
Error: Permission denied |
14 |
TC_FM_014 |
Attempt to rename a file without permission |
Error: Permission denied |
15 |
TC_FM_015 |
Attempt to move a file without permission |
Error: Permission denied |
16 |
TC_FM_016 |
Attempt to copy a file without permission |
Error: Permission denied |
17 |
TC_FM_017 |
Upload a file with special characters in name |
File uploaded or sanitized |
18 |
TC_FM_018 |
Delete a file with special characters in name |
File deleted or error |
19 |
TC_FM_019 |
Rename a file with special characters |
File renamed or error |
20 |
TC_FM_020 |
Upload a file with long filename (>255 chars) |
Error: Filename too long |
21 |
TC_FM_021 |
Delete a file with long filename |
Error: Filename too long |
22 |
TC_FM_022 |
Rename a file with long filename |
Error: Filename too long |
23 |
TC_FM_023 |
Upload a file with unicode characters |
File uploaded successfully |
24 |
TC_FM_024 |
Delete a file with unicode characters |
File deleted successfully |
25 |
TC_FM_025 |
Rename a file with unicode characters |
File renamed successfully |
26 |
TC_FM_026 |
Upload a file with read-only permissions |
Error: Permission denied |
27 |
TC_FM_027 |
Delete a file with read-only permissions |
Error: Permission denied |
28 |
TC_FM_028 |
Rename a file with read-only permissions |
Error: Permission denied |
29 |
TC_FM_029 |
Move a file with read-only permissions |
Error: Permission denied |
30 |
TC_FM_030 |
Upload a file with write-only permissions |
File uploaded successfully |
31 |
TC_FM_031 |
Attempt to delete a file during transfer |
Error or operation queued |
32 |
TC_FM_032 |
Attempt to rename a file during transfer |
Error or operation queued |
33 |
TC_FM_033 |
Attempt to move a file during transfer |
Error or operation queued |
34 |
TC_FM_034 |
Attempt to copy a file during transfer |
Error or operation queued |
35 |
TC_FM_035 |
Upload a file with same name but different case |
File uploaded or conflict based on case sensitivity |
36 |
TC_FM_036 |
Delete a file with same name but different case |
File deleted or not found |
37 |
TC_FM_037 |
Rename a file to same name with different case |
File renamed or error |
38 |
TC_FM_038 |
Upload a file with invalid characters |
Error: Invalid filename |
39 |
TC_FM_039 |
Delete a file with invalid characters |
Error: Invalid filename |
40 |
TC_FM_040 |
Rename a file with invalid characters |
Error: Invalid filename |
41 |
TC_FM_041 |
Upload a file to a restricted directory |
Error: Access denied |
42 |
TC_FM_042 |
Delete a file from a restricted directory |
Error: Access denied |
43 |
TC_FM_043 |
Rename a file in a restricted directory |
Error: Access denied |
44 |
TC_FM_044 |
Move a file from a restricted directory |
Error: Access denied |
45 |
TC_FM_045 |
Copy a file from a restricted directory |
Error: Access denied |
46 |
TC_FM_046 |
Upload a file with network interruption |
Upload fails or retries |
47 |
TC_FM_047 |
Delete a file with network interruption |
Operation fails or retries |
48 |
TC_FM_048 |
Rename a file with network interruption |
Operation fails or retries |
49 |
TC_FM_049 |
Move a file with network interruption |
Operation fails or retries |
50 |
TC_FM_050 |
Copy a file with network interruption |
Operation fails or retries |
Modes of Transfer - Testcases
S.No |
Test Case |
Description |
Expected Result |
---|---|---|---|
1 |
TC_MODE_001 |
Upload file using octet mode |
File uploaded successfully |
2 |
TC_MODE_002 |
Download file using octet mode |
File downloaded successfully |
3 |
TC_MODE_003 |
Upload file using netascii mode |
File uploaded with correct text formatting |
4 |
TC_MODE_004 |
Download file using netascii mode |
File downloaded with correct text formatting |
5 |
TC_MODE_005 |
Upload binary file using octet mode |
File integrity maintained |
6 |
TC_MODE_006 |
Upload binary file using netascii mode |
File corrupted due to mode mismatch |
7 |
TC_MODE_007 |
Download binary file using octet mode |
File integrity maintained |
8 |
TC_MODE_008 |
Download binary file using netascii mode |
File corrupted due to mode mismatch |
9 |
TC_MODE_009 |
Upload text file using netascii mode |
File uploaded with correct line endings |
10 |
TC_MODE_010 |
Download text file using netascii mode |
File downloaded with correct line endings |
11 |
TC_MODE_011 |
Upload text file using octet mode |
File uploaded as-is |
12 |
TC_MODE_012 |
Download text file using octet mode |
File downloaded as-is |
13 |
TC_MODE_013 |
Upload file with invalid mode |
Error: Unsupported transfer mode |
14 |
TC_MODE_014 |
Download file with invalid mode |
Error: Unsupported transfer mode |
15 |
TC_MODE_015 |
Upload file with mode in uppercase (OCTET) |
File uploaded successfully |
16 |
TC_MODE_016 |
Download file with mode in uppercase (NETASCII) |
File downloaded successfully |
17 |
TC_MODE_017 |
Upload file with mixed-case mode (Octet) |
File uploaded successfully |
18 |
TC_MODE_018 |
Download file with mixed-case mode (NetAscii) |
File downloaded successfully |
19 |
TC_MODE_019 |
Upload file with empty mode field |
Error: Mode not specified |
20 |
TC_MODE_020 |
Download file with empty mode field |
Error: Mode not specified |
21 |
TC_MODE_021 |
Upload file with whitespace in mode |
Error: Invalid mode |
22 |
TC_MODE_022 |
Download file with whitespace in mode |
Error: Invalid mode |
23 |
TC_MODE_023 |
Upload file with mode set to “mail” |
Error or ignored (deprecated) |
24 |
TC_MODE_024 |
Download file with mode set to “mail” |
Error or ignored (deprecated) |
25 |
TC_MODE_025 |
Upload file with mode set to null |
Error: Mode not specified |
26 |
TC_MODE_026 |
Download file with mode set to null |
Error: Mode not specified |
27 |
TC_MODE_027 |
Upload file with mode set to binary (alias for octet) |
File uploaded successfully (if supported) |
28 |
TC_MODE_028 |
Download file with mode set to binary |
File downloaded successfully (if supported) |
29 |
TC_MODE_029 |
Upload file with mode set to text (alias for netascii) |
File uploaded successfully (if supported) |
30 |
TC_MODE_030 |
Download file with mode set to text |
File downloaded successfully (if supported) |
31 |
TC_MODE_031 |
Upload file with mode set to unsupported value |
Error: Unsupported mode |
32 |
TC_MODE_032 |
Download file with mode set to unsupported value |
Error: Unsupported mode |
33 |
TC_MODE_033 |
Upload file with mode set to numeric value |
Error: Invalid mode |
34 |
TC_MODE_034 |
Download file with mode set to numeric value |
Error: Invalid mode |
35 |
TC_MODE_035 |
Upload file with mode set to special characters |
Error: Invalid mode |
36 |
TC_MODE_036 |
Download file with mode set to special characters |
Error: Invalid mode |
37 |
TC_MODE_037 |
Upload file with mode set to null byte |
Error: Invalid mode |
38 |
TC_MODE_038 |
Download file with mode set to null byte |
Error: Invalid mode |
39 |
TC_MODE_039 |
Upload file with mode field omitted |
Error: Mode not specified |
40 |
TC_MODE_040 |
Download file with mode field omitted |
Error: Mode not specified |
41 |
TC_MODE_041 |
Upload file with mode field after filename |
File uploaded successfully |
42 |
TC_MODE_042 |
Download file with mode field after filename |
File downloaded successfully |
43 |
TC_MODE_043 |
Upload file with mode field before filename |
Error: Invalid request format |
44 |
TC_MODE_044 |
Download file with mode field before filename |
Error: Invalid request format |
45 |
TC_MODE_045 |
Upload file with mode field in mixed encoding |
Error: Invalid mode |
46 |
TC_MODE_046 |
Download file with mode field in mixed encoding |
Error: Invalid mode |
47 |
TC_MODE_047 |
Upload file with mode field in UTF-8 |
File uploaded successfully |
48 |
TC_MODE_048 |
Download file with mode field in UTF-8 |
File downloaded successfully |
49 |
TC_MODE_049 |
Upload file with mode field in ASCII |
File uploaded successfully |
50 |
TC_MODE_050 |
Download file with mode field in ASCII |
File downloaded successfully |
Transfer Types - Testcases
S.No |
Test Case |
Description |
Expected Result |
---|---|---|---|
1 |
TC_TT_001 |
Send a Read Request (RRQ) for a valid file |
File downloaded successfully |
2 |
TC_TT_002 |
Send a Write Request (WRQ) for a valid file |
File uploaded successfully |
3 |
TC_TT_003 |
Send RRQ for a non-existent file |
Error: File not found |
4 |
TC_TT_004 |
Send WRQ for a file that already exists |
File overwritten or error based on config |
5 |
TC_TT_005 |
Send RRQ with invalid filename |
Error: Invalid filename |
6 |
TC_TT_006 |
Send WRQ with invalid filename |
Error: Invalid filename |
7 |
TC_TT_007 |
Send RRQ with empty filename |
Error: Filename required |
8 |
TC_TT_008 |
Send WRQ with empty filename |
Error: Filename required |
9 |
TC_TT_009 |
Send RRQ with unsupported mode |
Error: Unsupported transfer mode |
10 |
TC_TT_010 |
Send WRQ with unsupported mode |
Error: Unsupported transfer mode |
11 |
TC_TT_011 |
Send RRQ with valid octet mode |
File downloaded in binary format |
12 |
TC_TT_012 |
Send WRQ with valid netascii mode |
File uploaded in text format |
13 |
TC_TT_013 |
Send RRQ with uppercase mode (OCTET) |
File downloaded successfully |
14 |
TC_TT_014 |
Send WRQ with mixed-case mode (NetAscii) |
File uploaded successfully |
15 |
TC_TT_015 |
Send RRQ with invalid opcode |
Error: Illegal TFTP operation |
16 |
TC_TT_016 |
Send WRQ with invalid opcode |
Error: Illegal TFTP operation |
17 |
TC_TT_017 |
Send RRQ with duplicate request |
Server handles duplicate gracefully |
18 |
TC_TT_018 |
Send WRQ with duplicate request |
Server handles duplicate gracefully |
19 |
TC_TT_019 |
Send RRQ with timeout |
Error: Timeout occurred |
20 |
TC_TT_020 |
Send WRQ with timeout |
Error: Timeout occurred |
21 |
TC_TT_021 |
Send RRQ with packet loss |
Retransmission occurs, file downloaded |
22 |
TC_TT_022 |
Send WRQ with packet loss |
Retransmission occurs, file uploaded |
23 |
TC_TT_023 |
Send RRQ with corrupted packet |
Error: Invalid packet |
24 |
TC_TT_024 |
Send WRQ with corrupted packet |
Error: Invalid packet |
25 |
TC_TT_025 |
Send RRQ with large file |
File downloaded in multiple blocks |
26 |
TC_TT_026 |
Send WRQ with large file |
File uploaded in multiple blocks |
27 |
TC_TT_027 |
Send RRQ with block size option |
File downloaded with specified block size |
28 |
TC_TT_028 |
Send WRQ with block size option |
File uploaded with specified block size |
29 |
TC_TT_029 |
Send RRQ with timeout option |
File downloaded with custom timeout |
30 |
TC_TT_030 |
Send WRQ with timeout option |
File uploaded with custom timeout |
31 |
TC_TT_031 |
Send RRQ with transfer size option |
Transfer size acknowledged |
32 |
TC_TT_032 |
Send WRQ with transfer size option |
Transfer size acknowledged |
33 |
TC_TT_033 |
Send RRQ with unsupported option |
Error: Option not supported |
34 |
TC_TT_034 |
Send WRQ with unsupported option |
Error: Option not supported |
35 |
TC_TT_035 |
Send RRQ with option negotiation |
Options negotiated successfully |
36 |
TC_TT_036 |
Send WRQ with option negotiation |
Options negotiated successfully |
37 |
TC_TT_037 |
Attempt to resume interrupted RRQ (if supported) |
File resumes download |
38 |
TC_TT_038 |
Attempt to resume interrupted WRQ (if supported) |
File resumes upload |
39 |
TC_TT_039 |
Attempt to append to file using WRQ (if supported) |
Data appended successfully |
40 |
TC_TT_040 |
Attempt to append to file using unsupported server |
Error: Operation not supported |
41 |
TC_TT_041 |
Attempt to broadcast file using RRQ (if supported) |
File broadcasted to multiple clients |
42 |
TC_TT_042 |
Attempt to broadcast file using WRQ (if supported) |
File broadcasted to multiple servers |
43 |
TC_TT_043 |
Send RRQ with filename containing path traversal |
Error: Access denied |
44 |
TC_TT_044 |
Send WRQ with filename containing path traversal |
Error: Access denied |
45 |
TC_TT_045 |
Send RRQ with symbolic link in filename |
File resolved and downloaded |
46 |
TC_TT_046 |
Send WRQ with symbolic link in filename |
File resolved and uploaded |
47 |
TC_TT_047 |
Send RRQ with filename containing unicode |
File downloaded successfully |
48 |
TC_TT_048 |
Send WRQ with filename containing unicode |
File uploaded successfully |
49 |
TC_TT_049 |
Send RRQ with filename in restricted directory |
Error: Access denied |
50 |
TC_TT_050 |
Send WRQ with filename in restricted directory |
Error: Access denied |
Multiple Platforms - Testcases
S.No |
Test Case |
Description |
Expected Result |
---|---|---|---|
1 |
TC_MP_001 |
Upload file from Windows client to Linux server |
File uploaded successfully |
2 |
TC_MP_002 |
Download file from Linux server to Windows client |
File downloaded successfully |
3 |
TC_MP_003 |
Upload file from Linux client to Windows server |
File uploaded successfully |
4 |
TC_MP_004 |
Download file from Windows server to Linux client |
File downloaded successfully |
5 |
TC_MP_005 |
Upload file from macOS client to Linux server |
File uploaded successfully |
6 |
TC_MP_006 |
Download file from Linux server to macOS client |
File downloaded successfully |
7 |
TC_MP_007 |
Upload file from embedded device to Linux server |
File uploaded successfully |
8 |
TC_MP_008 |
Download file from Linux server to embedded device |
File downloaded successfully |
9 |
TC_MP_009 |
Upload file from Android client to Windows server |
File uploaded successfully |
10 |
TC_MP_010 |
Download file from Windows server to Android client |
File downloaded successfully |
11 |
TC_MP_011 |
Upload file from iOS client to Linux server |
File uploaded successfully |
12 |
TC_MP_012 |
Download file from Linux server to iOS client |
File downloaded successfully |
13 |
TC_MP_013 |
Upload file from Windows client with long filename |
File uploaded or error based on OS |
14 |
TC_MP_014 |
Upload file from Linux client with case-sensitive name |
File uploaded with exact name |
15 |
TC_MP_015 |
Upload file from Windows client with case-insensitive name |
File uploaded, overwrites if name matches |
16 |
TC_MP_016 |
Upload file from macOS client with special characters |
File uploaded or sanitized |
17 |
TC_MP_017 |
Upload file from Linux client with symbolic link |
File or target uploaded based on config |
18 |
TC_MP_018 |
Upload file from embedded system with limited memory |
File uploaded or error: insufficient memory |
19 |
TC_MP_019 |
Upload file from Android with restricted permissions |
Error: Permission denied |
20 |
TC_MP_020 |
Upload file from iOS with sandboxed file access |
Error or success based on app permissions |
21 |
TC_MP_021 |
Download file to Windows with read-only directory |
Error: Access denied |
22 |
TC_MP_022 |
Download file to Linux with full permissions |
File downloaded successfully |
23 |
TC_MP_023 |
Download file to macOS with firewall enabled |
File downloaded or blocked |
24 |
TC_MP_024 |
Upload file from Windows with antivirus active |
File uploaded or scanned |
25 |
TC_MP_025 |
Upload file from Linux with SELinux enabled |
File uploaded or blocked |
26 |
TC_MP_026 |
Upload file from macOS with Gatekeeper enabled |
File uploaded successfully |
27 |
TC_MP_027 |
Upload file from Android with background data disabled |
Error: Network unavailable |
28 |
TC_MP_028 |
Upload file from iOS with low power mode |
File uploaded with delay |
29 |
TC_MP_029 |
Upload file from Windows with IPv6 |
File uploaded successfully |
30 |
TC_MP_030 |
Upload file from Linux with IPv6 |
File uploaded successfully |
31 |
TC_MP_031 |
Upload file from macOS with IPv6 |
File uploaded successfully |
32 |
TC_MP_032 |
Upload file from embedded system using serial-over-IP |
File uploaded successfully |
33 |
TC_MP_033 |
Upload file from Android using Wi-Fi |
File uploaded successfully |
34 |
TC_MP_034 |
Upload file from iOS using mobile data |
File uploaded successfully |
35 |
TC_MP_035 |
Upload file from Windows using VPN |
File uploaded successfully |
36 |
TC_MP_036 |
Upload file from Linux using proxy |
File uploaded or blocked |
37 |
TC_MP_037 |
Upload file from macOS using corporate network |
File uploaded successfully |
38 |
TC_MP_038 |
Upload file from embedded system with static IP |
File uploaded successfully |
39 |
TC_MP_039 |
Upload file from Android with dynamic IP |
File uploaded successfully |
40 |
TC_MP_040 |
Upload file from iOS with roaming enabled |
File uploaded successfully |
41 |
TC_MP_041 |
Upload file from Windows with TFTP client CLI |
File uploaded successfully |
42 |
TC_MP_042 |
Upload file from Linux using tftp command |
File uploaded successfully |
43 |
TC_MP_043 |
Upload file from macOS using GUI client |
File uploaded successfully |
44 |
TC_MP_044 |
Upload file from Android using TFTP app |
File uploaded successfully |
45 |
TC_MP_045 |
Upload file from iOS using TFTP app |
File uploaded successfully |
46 |
TC_MP_046 |
Upload file from Windows with PowerShell script |
File uploaded successfully |
47 |
TC_MP_047 |
Upload file from Linux with automated cron job |
File uploaded successfully |
48 |
TC_MP_048 |
Upload file from macOS with Automator script |
File uploaded successfully |
49 |
TC_MP_049 |
Upload file from embedded system with firmware TFTP client |
File uploaded successfully |
50 |
TC_MP_050 |
Upload file from Android with custom TFTP library |
File uploaded successfully |
Control and Data Channels - Testcases
S.No |
Test Case |
Description |
Expected Result |
---|---|---|---|
1 |
TC_CD_001 |
Initiate RRQ on port 69 |
Server responds with data port |
2 |
TC_CD_002 |
Initiate WRQ on port 69 |
Server responds with data port |
3 |
TC_CD_003 |
Send data to server-assigned port |
Data accepted |
4 |
TC_CD_004 |
Send data to port 69 after initial request |
Error: Unexpected port |
5 |
TC_CD_005 |
Receive data from server-assigned port |
Data received successfully |
6 |
TC_CD_006 |
Receive data from unexpected port |
Error: Unknown transfer ID |
7 |
TC_CD_007 |
Attempt to use same port for multiple transfers |
Error or session conflict |
8 |
TC_CD_008 |
Attempt to use different control and data ports |
Transfer proceeds correctly |
9 |
TC_CD_009 |
Monitor port 69 for control messages only |
Only initial requests received |
10 |
TC_CD_010 |
Monitor dynamic port for data packets |
Data packets received |
11 |
TC_CD_011 |
Send ACK to correct data port |
ACK accepted |
12 |
TC_CD_012 |
Send ACK to incorrect port |
Error: Unknown transfer ID |
13 |
TC_CD_013 |
Simulate port conflict on server |
Server handles or rejects session |
14 |
TC_CD_014 |
Simulate port conflict on client |
Client handles or retries |
15 |
TC_CD_015 |
Send RRQ from non-standard client port |
Server responds correctly |
16 |
TC_CD_016 |
Send WRQ from non-standard client port |
Server responds correctly |
17 |
TC_CD_017 |
Use firewall to block port 69 |
Initial request fails |
18 |
TC_CD_018 |
Use firewall to block data port |
Transfer fails mid-session |
19 |
TC_CD_019 |
Use NAT between client and server |
Transfer succeeds with correct mapping |
20 |
TC_CD_020 |
Use proxy between client and server |
Transfer succeeds if proxy supports UDP |
21 |
TC_CD_021 |
Monitor session for port reuse |
Ports are unique per session |
22 |
TC_CD_022 |
Attempt to hijack session using spoofed port |
Error: Unknown transfer ID |
23 |
TC_CD_023 |
Attempt to inject data from unauthorized port |
Data rejected |
24 |
TC_CD_024 |
Attempt to send ACK from unauthorized port |
ACK rejected |
25 |
TC_CD_025 |
Simulate timeout on control port |
Session fails to start |
26 |
TC_CD_026 |
Simulate timeout on data port |
Transfer interrupted |
27 |
TC_CD_027 |
Simulate packet loss on control port |
Request retransmitted |
28 |
TC_CD_028 |
Simulate packet loss on data port |
Data retransmitted |
29 |
TC_CD_029 |
Use IPv6 for control and data ports |
Transfer succeeds |
30 |
TC_CD_030 |
Use IPv4 for control and data ports |
Transfer succeeds |
31 |
TC_CD_031 |
Use mixed IPv4/IPv6 endpoints |
Transfer fails or adapts |
32 |
TC_CD_032 |
Use same port for control and data (non-standard) |
Transfer fails or succeeds based on implementation |
33 |
TC_CD_033 |
Log control and data port usage |
Ports logged correctly |
34 |
TC_CD_034 |
Attempt to change data port mid-transfer |
Transfer fails |
35 |
TC_CD_035 |
Attempt to change control port mid-transfer |
Transfer fails |
36 |
TC_CD_036 |
Use encrypted tunnel for control port |
Control request secured |
37 |
TC_CD_037 |
Use encrypted tunnel for data port |
Data secured |
38 |
TC_CD_038 |
Use VPN for both control and data |
Transfer succeeds |
39 |
TC_CD_039 |
Use different interfaces for control and data |
Transfer succeeds if routing is correct |
40 |
TC_CD_040 |
Use same interface for multiple sessions |
All sessions succeed |
41 |
TC_CD_041 |
Simulate DoS on control port |
New sessions blocked |
42 |
TC_CD_042 |
Simulate DoS on data port |
Active transfers disrupted |
43 |
TC_CD_043 |
Monitor port usage during concurrent transfers |
Unique ports used |
44 |
TC_CD_044 |
Attempt to reuse data port after session ends |
Port reused safely |
45 |
TC_CD_045 |
Attempt to reuse control port after session ends |
Port reused safely |
46 |
TC_CD_046 |
Use ephemeral ports for data transfer |
Transfer succeeds |
47 |
TC_CD_047 |
Use fixed port for data transfer (non-standard) |
Transfer fails or succeeds based on config |
48 |
TC_CD_048 |
Attempt to bind to port 69 without privileges |
Error: Permission denied |
49 |
TC_CD_049 |
Attempt to bind to data port already in use |
Error or port reassigned |
50 |
TC_CD_050 |
Verify port closure after transfer completion |
Ports released successfully |
Logging and Auditing - Testcases
S.No |
Test Case |
Description |
Expected Result |
---|---|---|---|
1 |
Log_Test_01 |
Verify logging for successful download by anonymous user |
Log includes timestamp, IP, filename, operation=download, status=success, user=anon |
2 |
Log_Test_02 |
Verify logging for failed upload due to permission error |
Log includes timestamp, IP, filename, operation=upload, status=failure, error=403 |
3 |
Log_Test_03 |
Verify logging for timeout during file transfer |
Log includes timestamp, IP, filename, operation, status=timeout |
4 |
Log_Test_04 |
Verify logging for malformed TFTP request |
Log includes timestamp, IP, operation=unknown, status=error, error=malformed packet |
5 |
Log_Test_05 |
Verify logging for successful upload by authenticated user |
Log includes timestamp, IP, filename, operation=upload, status=success, user=auth |
6 |
Log_Test_06 |
Verify logging for download with interrupted session |
Log includes timestamp, IP, filename, operation=download, status=interrupted |
7 |
Log_Test_07 |
Verify logging for upload with invalid file format |
Log includes timestamp, IP, filename, operation=upload, status=error, error=format |
8 |
Log_Test_08 |
Verify logging for retry after failed upload |
Log includes retry count, timestamp, status=retry |
9 |
Log_Test_09 |
Verify logging for download from restricted directory |
Log includes timestamp, IP, status=denied, error=restricted access |
10 |
Log_Test_10 |
Verify logging for upload with large file size |
Log includes timestamp, IP, filename, size, status=success |
11 |
Log_Test_11 |
Verify logging for download with checksum verification |
Log includes checksum, status=verified |
12 |
Log_Test_12 |
Verify logging for upload with checksum mismatch |
Log includes checksum, status=error, error=checksum mismatch |
13 |
Log_Test_13 |
Verify logging for anonymous upload attempt |
Log includes user=anonymous, status=denied |
14 |
Log_Test_14 |
Verify logging for authenticated download |
Log includes user=authenticated, status=success |
15 |
Log_Test_15 |
Verify logging for session timeout |
Log includes session ID, status=timeout |
16 |
Log_Test_16 |
Verify logging for duplicate upload request |
Log includes duplicate flag, status=ignored |
17 |
Log_Test_17 |
Verify logging for download with invalid filename |
Log includes filename, status=error, error=invalid name |
18 |
Log_Test_18 |
Verify logging for upload with special characters |
Log includes filename, status=success |
19 |
Log_Test_19 |
Verify logging for download with throttled bandwidth |
Log includes bandwidth info, status=success |
20 |
Log_Test_20 |
Verify logging for upload with network failure |
Log includes error=network failure, status=error |
21 |
Log_Test_21 |
Verify logging for download with expired token |
Log includes token status=expired, status=denied |
22 |
Log_Test_22 |
Verify logging for upload with valid token |
Log includes token status=valid, status=success |
23 |
Log_Test_23 |
Verify logging for download with IP filtering |
Log includes IP, status=blocked if not allowed |
24 |
Log_Test_24 |
Verify logging for upload with IP whitelisting |
Log includes IP, status=allowed |
25 |
Log_Test_25 |
Verify logging for download with session reuse |
Log includes session ID, reuse=true |
26 |
Log_Test_26 |
Verify logging for upload with session expiration |
Log includes session ID, status=expired |
27 |
Log_Test_27 |
Verify logging for download with multiple retries |
Log includes retry count, status=success |
28 |
Log_Test_28 |
Verify logging for upload with partial success |
Log includes status=partial, bytes transferred |
29 |
Log_Test_29 |
Verify logging for download with user-agent info |
Log includes user-agent string |
30 |
Log_Test_30 |
Verify logging for upload with client version info |
Log includes client version, status=success |
31 |
Log_Test_31 |
Verify logging for download with audit trail ID |
Log includes audit ID, status=success |
32 |
Log_Test_32 |
Verify logging for upload with audit trail ID |
Log includes audit ID, status=success |
33 |
Log_Test_33 |
Verify logging for download with encryption enabled |
Log includes encryption=true, status=success |
34 |
Log_Test_34 |
Verify logging for upload with encryption disabled |
Log includes encryption=false, status=success |
35 |
Log_Test_35 |
Verify logging for download with file not found |
Log includes status=error, error=file not found |
36 |
Log_Test_36 |
Verify logging for upload with permission granted |
Log includes permission=granted, status=success |
37 |
Log_Test_37 |
Verify logging for download with permission denied |
Log includes permission=denied, status=error |
38 |
Log_Test_38 |
Verify logging for upload with audit log disabled |
Log includes audit=disabled, status=warning |
39 |
Log_Test_39 |
Verify logging for download with audit log enabled |
Log includes audit=enabled, status=success |
40 |
Log_Test_40 |
Verify logging for upload with invalid session ID |
Log includes session ID, status=error, error=invalid session |
41 |
Log_Test_41 |
Verify logging for download with valid session ID |
Log includes session ID, status=success |
42 |
Log_Test_42 |
Verify logging for upload with file overwrite |
Log includes overwrite=true, status=success |
43 |
Log_Test_43 |
Verify logging for download with file versioning |
Log includes version info, status=success |
44 |
Log_Test_44 |
Verify logging for upload with file version conflict |
Log includes version conflict, status=error |
45 |
Log_Test_45 |
Verify logging for download with access log rotation |
Log includes log rotation event, status=success |
46 |
Log_Test_46 |
Verify logging for upload with access log rotation |
Log includes log rotation event, status=success |
47 |
Log_Test_47 |
Verify logging for download with audit timestamp accuracy |
Log includes timestamp with millisecond precision |
48 |
Log_Test_48 |
Verify logging for upload with audit timestamp accuracy |
Log includes timestamp with millisecond precision |
49 |
Log_Test_49 |
Verify logging for download with concurrent sessions |
Log includes session count, status=success |
50 |
Log_Test_50 |
Verify logging for upload with concurrent sessions |
Log includes session count, status=success |
Reference links