Networking Applications

Slides:



Advertisements
Similar presentations
Umut Girit  One of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer.
Advertisements

FTP - File Transfer Protocol TFTP – Trivial FTP CISC 856 – Fall 2005 Michael Haggerty University of Delaware (some/most slides courtesy of Umakanth Puppala.
FILE TRANSFER PROTOCOL Short for File Transfer Protocol, the protocol for exchanging files over the Internet. FTP works in the same way as HTTP for transferring.
FTP - File Transfer Protocol TFTP – Trivial FTP CISC 856 – Fall 2007 Brian Lucas University of Delaware (some/most slides courtesy of Umakanth Puppala,
Client-Server Applications. Indirect Top Level Interaction Application.
Chapter 26 FTP.
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
Lecture 10 FTP & TFTP CPE 401 / 601 Computer Network Systems slides are modified from Dave Hollinger and Michael mgunes.
File Transfer: FTP and TFTP
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 20 File Transfer Protocol (FTP)
Internet Applications: File Transfer Protocol (FTP)
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 20 File Transfer Protocol (FTP)
File Transfer Protocol (FTP)
FTP File Transfer Protocol Reference: RFC 959. FTP Objectives (from RFC 959) n promote sharing of files n encourage indirect use of remote computers n.
OVER VIEW RFC 959 FILE TRANSFER PROTOCOL (FTP). C ONTENTS  The Ftp Model  Data transfer functions  File transfer functions  Declarative specifications.
Chapter 26 remote logging & Ftp
TCP/IP suit 4th Edition by Behrouz A Forouzan. 2 Internet Computing (CS-413)
John Degenhart Joseph Allen.  What is FTP?  Communication over Control connection  Communication over Data Connection  File Type  Data Structure.
File Transfer Protocol (FTP)
FTP - File Transfer Protocol CISC 856 – Fall 2012
Lecturer : Ms.Trần Thị Ngọc Hoa Chapter 8 File Transfer Protocol – Simple Mail Transfer Protocol.
Chapter 31 File Transfer & Remote File Access (NFS)
FTP File Transfer Protocol. Introduction transfer file to/from remote host client/server model  client: side that initiates transfer (either to/from.
FTP - File Transfer Protocol TFTP – Trivial FTP CISC 856 – Fall 2005 Michael Haggerty University of Delaware (some/most slides courtesy of Umakanth Puppala.
2440: 141 Web Site Administration Remote Web Server Access Tools Instructor: Enoch E. Damson.
Accessing the Internet with Anonymous FTP Transferring Files from Remote Computers.
FTP - File Transfer Protocol TFTP – Trivial FTP CISC 856 – Fall 2008 Shriram Ganesh University of Delaware (some/most slides courtesy of Brian Lucas, Umakanth.
File Transfer & Access (FTP, TFTP, NFS)
Ferry Astika Saputra FTP & TFTP Server. Overview File Transfer Protocol (RFC 959) Why FTP? FTP’s connections FTP in action FTP commands/responses Trivial.
1 Web Server Administration Chapter 9 Extending the Web Environment.
FTP (File Transfer Protocol) & Telnet
Network Applications (typically) CLIENT-SERVER Examples of the Application level of the OSI model One typically provides a service to the other Servers.
Simple Mail Transfer Protocol (SMTP)
FTP Server and FTP Commands By Nanda Ganesan, Ph.D. © Nanda Ganesan, All Rights Reserved.
1 INFO 321 Server Technologies II FTP Material adapted from Dr. Randy Kaplan.
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Network Protocols Chapter 26 (Data Communication and Networking): Remote Logging, Electronic Mail, and.
Computer Networking From LANs to WANs: Hardware, Software, and Security Chapter 13 FTP and Telnet.
BASIC INTERNET PROTOCOLS: http, ftp, telnet. Mirela Walczak.
TFTP: Trivial file transfer protocol
TCP/IP Protocol Suite 1 Chapter 19 Upon completion you will be able to: File Transfer: FTP and TFTP Understand the connections needed for FTP file transfer.
File Transfer Protocol (FTP)
Chapter 27 - Faxes & File Transfer (FTP) Introduction Sending a Fax –The Internet can be used to send a fax. Two fax machines can be modified to communicate.
Remote Access Usages. Remote Desktop Remote desktop technology makes it possible to view another computer's desktop on your computer. This means you can.
FTP COMMANDS OBJECTIVES. General overview. Introduction to FTP server. Types of FTP users. FTP commands examples. FTP commands in action (example of use).
File Transfer Protocol (FTP) CIS 130. File Transfer Protocol (FTP) Copy files from one internet host (server) to your account on another host –Need domain.
Ch26 Ameera Almasoud 1 Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007.
1 FTP: File Transfer Protocol EE 122: Intro to Communication Networks Fall 2006 Vern Paxson TAs: Dilip Antony Joseph and Sukun Kim
Chapter 11 User Datagram Protocol
Application layer Lecture 7.
Networking Applications
FTP Lecture supp.
MCA – 405 Elective –I (A) Java Programming & Technology
Module 23 (ftp and wireshark)
Net 323 D: Networks Protocols
FTP & TFTP Server Ferry Astika Saputra.
File Transfer and access
Client-Server Interaction
File Transfer: FTP Objectives Chapter 19
Application layer Lecture 7.
Process-to-Process Delivery:
CS4470 Computer Networking Protocols
File Transfer Protocol
Net 323 D: Networks Protocols
CPEG514 Advanced Computer Networkst
FTP AND COMMAND PROCESSING IN FTP
Chapter 7 Network Applications
Process-to-Process Delivery: UDP, TCP
File Transfer Protocol
Internet Applications (Telnet, FTP)
Presentation transcript:

Networking Applications Dr. Ayman A. Abdel-Hamid College of Computing and Information Technology Arab Academy for Science & Technology and Maritime Transport File Transfer Protocol (FTP) File Transfer Protocol © Dr. Ayman Abdel-Hamid, Networking Applications

© Dr. Ayman Abdel-Hamid, Networking Applications Outline Introduction FTP Model Connections Setup of data connections File Transfer File Transfer Protocol © Dr. Ayman Abdel-Hamid, Networking Applications

© Dr. Ayman Abdel-Hamid, Networking Applications FTP Objectives Promote sharing of files Encourage indirect use of remote computers Shield user from variations in file storage among hosts Different ways to represent text and data Different directory structure Transfer data reliably and efficiently File Transfer Protocol © Dr. Ayman Abdel-Hamid, Networking Applications

© Dr. Ayman Abdel-Hamid, Networking Applications Port Numbers Port numbers are 16-bit integers (0  65,535) Servers use well know ports, 0-1023 are privileged Clients use ephemeral (short-lived) ports Internet Assigned Numbers Authority (IANA) maintains a list of port number assignment. Well-known ports (0-1023)  controlled and assigned by IANA Registered ports (1024-49151)  IANA registers and lists use of ports as a convenience (49151 is ¾ of 65536) Dynamic ports (49152-65535)  ephemeral ports For well-known port numbers, see /etc/services on a UNIX or Linux machine File Transfer Protocol © Dr. Ayman Abdel-Hamid, Networking Applications

© Dr. Ayman Abdel-Hamid, Networking Applications FTP Model 1/2 Two connections between client and server data transfer connection Control connection (commands and responses) Server uses two well-known TCP ports: 21 for control connection and 20 for data connection Client Components User Interface, client control process, and client data transfer process Server Components Server control process and server data transfer process File Transfer Protocol © Dr. Ayman Abdel-Hamid, Networking Applications

© Dr. Ayman Abdel-Hamid, Networking Applications FTP Model 2/2 User Interface Control Process Data Transfer Process User TCP/IP Control Process Data Transfer Process Server File System File System Client File Transfer Protocol © Dr. Ayman Abdel-Hamid, Networking Applications

© Dr. Ayman Abdel-Hamid, Networking Applications FTP Transfer Overview Server data process Server data process Server data process Server data process File Transfer Protocol © Dr. Ayman Abdel-Hamid, Networking Applications

© Dr. Ayman Abdel-Hamid, Networking Applications Control Connection Control connection maintained during entire FTP session Uses ASCII to communicate commands and responses Send a command as a short line (terminated by carriage return and line feed) Receive response as a short line The objective is to minimize delay An FTP session always initiated by the client, however either the client or the server may be the sender of data File Transfer Protocol © Dr. Ayman Abdel-Hamid, Networking Applications

Setup of a Data Connection 1/4 FTP server listening for control connections on port 21 FTP client uses an ephemeral port for its control connection (for example 1678) It connects to the FTP server at port 21 To setup an active data connection Client listens on an ephemeral port for data connections from server (for example 1742) Client sends to server port number 1742 on which it is ready to accept data connections The server (using port 20) connects to the client on port 1742 File Transfer Protocol © Dr. Ayman Abdel-Hamid, Networking Applications

Setup of a Data Connection 2/4 FTP active data connection. Figure from www.tcpipguide.com File Transfer Protocol © Dr. Ayman Abdel-Hamid, Networking Applications

Setup of a Data Connection 3/4 To setup a passive data connection Client tells server to be passive Accept a data connection from client Server replies providing IP address and port it is listening to Server listens on (IP, port) pair waiting for data connections The client chooses an ephemeral port to connect to server at (IP, Port) Data transfer can occur File Transfer Protocol © Dr. Ayman Abdel-Hamid, Networking Applications

Setup of a Data Connection 4/4 FTP passive data connection. Figure from www.tcpipguide.com File Transfer Protocol © Dr. Ayman Abdel-Hamid, Networking Applications

© Dr. Ayman Abdel-Hamid, Networking Applications Data Connection Data connection opened and closed for each file transfer Opened when data are ready for transfer Closed when not needed The objective is to maximize throughput To deal with heterogeneity, need to define three attributes for communication (transmitted through the control connection) File type Data structure Transmission mode File Transfer Protocol © Dr. Ayman Abdel-Hamid, Networking Applications

Data Connection – File Type ASCII File Default for transferring text files Sender transforms the file from its own representation to ASCII Receiver transforms ASCII characters into its own representation EBCDIC File (used on IBM computers) Image File Default for transferring binary files File sent as a continuous stream of bits without any interpretation or encoding File Transfer Protocol © Dr. Ayman Abdel-Hamid, Networking Applications

Data Connection – Data Structure File Structure Default. File is a continuous stream of bytes Record Structure File divided into records Only with text files Page Structure File divided into pages Each page has a page number and page header Pages can be stored or accessed randomly or sequentially File Transfer Protocol © Dr. Ayman Abdel-Hamid, Networking Applications

Data Connection – Transmission Mode 1/2 Stream Mode Default Data delivered from FTP to TCP as a continuous stream of bytes TCP responsible for chopping data into segments of suitable size Block Mode Data delivered from FTP to TCP in blocks. Each block preceded by a 3-byte header First byte if a block descriptor; next 2 bytes define the size of the blocks in bytes File Transfer Protocol © Dr. Ayman Abdel-Hamid, Networking Applications

Data Connection – Transmission Mode 2/2 Compressed Mode Data can be compressed if file is large in size Compression method normally used is run-length encoding Consecutive appearances of a data unit are replaced by one occurrence and the number of repetitions Spaces in a text file Null characters in a binary file File Transfer Protocol © Dr. Ayman Abdel-Hamid, Networking Applications

© Dr. Ayman Abdel-Hamid, Networking Applications File Transfer A file is to be copied from server to client (get) Retrieving a file File copied from client to server (put) Storing a file List of directory names sent from server to client (ls) FTP treats a list of directory or file names as a file It is sent over the data connection File Transfer Protocol © Dr. Ayman Abdel-Hamid, Networking Applications

© Dr. Ayman Abdel-Hamid, Networking Applications User Interface Most operating systems provide a user interface to access FTP services Lots of tools to provide GUI for FTP commands Popular FTP commands put (mput) get (mget) cd lcd bye File Transfer Protocol © Dr. Ayman Abdel-Hamid, Networking Applications

© Dr. Ayman Abdel-Hamid, Networking Applications Anonymous FTP To use FTP, an user name and password are needed on the remote server Some sites have files available for public access A user can use “anonymous” as user name and provide “guest” as password (or his email address) User access to system is limited Can copy files, but limited navigation capabilities File Transfer Protocol © Dr. Ayman Abdel-Hamid, Networking Applications

© Dr. Ayman Abdel-Hamid, Networking Applications FTP in Action 1/3 bash$ ftp plaza.aarnet.edu.au Connected to plaza.aarnet.edu.au. 220 plaza.aarnet.EDU.AU FTP server (Version wu-2.4(2) Fri Apr 15 14:04:20 EST 1994) ready. Name (plaza.aarnet.edu.au:jphb): ftp 331 Guest login ok, send your complete e-mail address as password. Password: 230- 230- This is the AARNet Archive Server, Melbourne, Australia. 230-Local time is Tue Jun 4 17:46:00 2001 230-Please read the file /info/welcome-ftpuser 230- it was last modified on Fri Apr 22 14:47:05 1999 - 774 days ago 230 Guest login ok, access restrictions apply. File Transfer Protocol © Dr. Ayman Abdel-Hamid, Networking Applications

© Dr. Ayman Abdel-Hamid, Networking Applications FTP in Action 2/3 ftp> pwd 257 "/" is current directory. ftp> ls 200 PORT command successful. 150 Opening ASCII mode data connection for file list. lost+found usr etc java pub micros bin ACS usenet X11 rfc graphics 226 Transfer complete. 214 bytes received in 0.018 seconds (11 Kbytes/s) File Transfer Protocol © Dr. Ayman Abdel-Hamid, Networking Applications

© Dr. Ayman Abdel-Hamid, Networking Applications FTP in Action 3/3 ftp> cd rfc 250 CWD command successful. ftp> get rfc1048.txt.gz 200 PORT command successful. 150 Opening ASCII mode data connection for rfc1048.txt.gz (5141 bytes). 226 Transfer complete. local: rfc1048.txt.gz remote: rfc1048.txt.gz 5161 bytes received in 1.6 seconds (3.2 Kbytes/s) ftp> quit 221 Goodbye. File Transfer Protocol © Dr. Ayman Abdel-Hamid, Networking Applications

FTP Connections in Action 1/2 C:\WINDOWS\system32>netstat Active Connections … TCP Office:4948 host-197.218.56.2.tedata.net:ftp ESTABLISHED C:\WINDOWS\system32>netstat -n Active Connections TCP 188.9.140.10:4948 197.218.56.2:21 ESTABLISHED File Transfer Protocol © Dr. Ayman Abdel-Hamid, Networking Applications

FTP Connections in Action 2/2 //After File Transfer C:\WINDOWS\system32>netstat -n Active Connections TCP 188.9.140.10:4948 197.218.56.2:21 ESTABLISHED TCP 188.9.140.10:1296 197.218.56.2:20 TIME_WAIT File Transfer Protocol © Dr. Ayman Abdel-Hamid, Networking Applications

© Dr. Ayman Abdel-Hamid, Networking Applications Further Information RFC 959: File Transfer Protocol (FTP), October 1985 File Transfer Protocol © Dr. Ayman Abdel-Hamid, Networking Applications