Computer Networking Lecture Notes

31 January 2013 • The Application Layer


Outline

The Lay of the Land

Principles

Protocols

Architecture

Communication

Addressing

Application Services

Reliability

Bandwidth

Delay

FTP

Example

$ ls README.TXT
ls: cannot access README.TXT: No such file or directory

$ ftp ftp1.FreeBSD.org
Connected to moss.cse.buffalo.edu.
220 FTP server (V. wu-2.6.2(1) Mon Aug 2 14:04:46 EDT 2010) ready.
Name (ftp1.FreeBSD.org:rclayton): anonymous
331 Guest login ok, send your complete e-mail address as password.
Password:
230 Guest login ok, access restrictions apply.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.
total 8
drwxrwxr-x  2 0      5    512 Jun  5  2009 .snap
drwxr-xr-x  2 0      0    512 Aug  1  2008 bin
drwxrwxr-x  4 89987  546  512 Jun 13  2009 mirror
drwxrwxr-x  2 89987  546  512 Jun 14  2009 pub
226 Transfer complete.
ftp> cd pub/FreeBSD
250-If you're looking for one of the FreeBSD releases, please look in the
250-releases/${ARCH}/${RELNAME} directory, where ARCH = "alpha", "amd64",
250-"i386", "ia64", "pc98", or "sparc64" and RELNAME = the release
250-you're interested in, e.g. "7.1-RELEASE" or "8.0-RELEASE".
250-
250-Please read the file README.TXT
250-  it was last modified on Fri Jun 18 21:54:21 2004 - 3005 days ago
250 CWD command successful.
ftp> ls
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.
total 90
-rw-rw-r--   1 89987  546    262 Jan 28  2010 .message
-r--rw-r--   1 89987  546      0 Nov  7  1996 .notar
drwxrwxr-x   6 89987  546    512 Oct 23  2006 CERT
lrwxrwxrwx   1 89987  546     15 Apr 19  2007 CTM -> development/CTM
lrwxrwxrwx   1 89987  546     17 Apr 19  2007 CVSup -> development/CVSup
drwxrwxr-x   4 89987  546    512 Oct 23  2006 ERRATA
lrwxrwxrwx   1 89987  546     17 Apr 19  2007 FreeBSD-current -> branches/-current
lrwxrwxrwx   1 89987  546     19 Apr 19  2007 FreeBSD-stable -> branches/4.0-stable
lrwxrwxrwx   1 89987  546     25 Apr 19  2007 ISO-IMAGES-alpha -> releases/alpha/ISO-IMAGES
lrwxrwxrwx   1 89987  546     25 Apr 19  2007 ISO-IMAGES-amd64 -> releases/amd64/ISO-IMAGES
lrwxrwxrwx   1 89987  546     24 Apr 19  2007 ISO-IMAGES-i386 -> releases/i386/ISO-IMAGES
lrwxrwxrwx   1 89987  546     24 Apr 19  2007 ISO-IMAGES-ia64 -> releases/ia64/ISO-IMAGES
lrwxrwxrwx   1 89987  546     24 Apr 19  2007 ISO-IMAGES-pc98 -> releases/pc98/ISO-IMAGES
lrwxrwxrwx   1 89987  546     27 Apr 20  2007 ISO-IMAGES-powerpc -> releases/powerpc/ISO-IMAGES
lrwxrwxrwx   1 89987  546     27 Apr 19  2007 ISO-IMAGES-sparc64 -> releases/sparc64/ISO-IMAGES
-rw-rw-r--   1 89987  546   6430 Jun 19  2004 README.TXT
drwxrwxr-x   3 89987  546    512 Oct 23  2006 SOC2005
-rw-rw-r--   1 89987  546     11 Sep 11 04:55 TIMESTAMP
drwxrwxr-x   2 89987  546    512 Oct 23  2006 TrustedBSD
drwxrwxr-x   6 89987  546    512 Oct 23  2006 branches
drwxrwxr-x  10 89987  546    512 Jun  3  2008 development
-rw-r--r--   1 89987  546  48291 Sep 11 05:22 dir.sizes
lrwxrwxrwx   1 89987  546     15 Apr 19  2007 distfiles -> ports/distfiles
drwxrwxr-x  24 89987  546   1024 Jun  1 09:47 doc
drwxrwxr-x   3 89987  546    512 Oct 23  2006 misc
drwxrwxr-x  12 89987  546    512 Jun 14 15:43 ports
drwxrwxr-x  10 89987  546    512 Dec  8  2011 releases
drwxrwxr-x   2 89987  546    512 Aug 30 15:51 snapshots
drwxrwxr-x   5 89987  546   1024 Oct 24  2006 tools
drwxrwxr-x   2 89987  546    512 Oct 24  2006 tools.NEW
drwxrwxr-x   3 89987  546    512 Oct 24  2006 torrents
drwxrwxr-x   2 89987  546    512 Oct 24  2006 updates
226 Transfer complete.
ftp> get README.TXT 
local: README.TXT remote: README.TXT
200 PORT command successful.
150 Opening BINARY mode data connection for README.TXT (6430 bytes).
226 Transfer complete.
6430 bytes received in 0.02 secs (256.4 kB/s)
ftp> quit
221-You have transferred 6430 bytes in 1 files.
221-Total traffic for this session was 10019 bytes in 3 transfers.
221-Thank you for using the FTP service on moss.cse.buffalo.edu.
221 Goodbye.

$ ls README.TXT 
README.TXT

$ 

Architecture

Operation

Commands

$ ftp
ftp> ?
Commands may be abbreviated.  Commands are:

!               dir             mdelete         qc              site
$               disconnect      mdir            sendport        size
account         exit            mget            put             status
append          form            mkdir           pwd             struct
ascii           get             mls             quit            system
bell            glob            mode            quote           sunique
binary          hash            modtime         recv            tenex
bye             help            mput            reget           tick
case            idle            newer           rstatus         trace
cd              image           nmap            rhelp           type
cdup            ipany           nlist           rename          user
chmod           ipv4            ntrans          reset           umask
close           ipv6            open            restart         verbose
cr              lcd             prompt          rmdir           ?
delete          ls              passive         runique
debug           macdef          proxy           send
ftp> quit

$

Replies

Media Services

Simple Implementation

Another Implementation

Streaming Implementation

Live Media Streaming

Distribution

Summary


This page last modified on 2012 September 11.

Creative
    Commons License