Application Layer Introduction; HTTP; FTP

Tom Kelliher, CS 325

Feb. 4, 2011




Read 2.4-2.6.

From Last Time

Packet-switched network characteristics; protocol layers and models.


  1. Introduction to the application layer.

  2. HTTP protocol.

  3. FTP protocol.

Coming Up

SMTP, DNS, and P2P.

Application Layer Introduction

Internet applications have an abstract Internet view:


Internet Application Architectures

The Internet has an architecture; so do applications.

  1. Client-Server architecture


    1. Well-defined roles.

    2. Infrastructure intensive -- server farms. Expensive.

    3. ``Always on''

    4. Hierarchical, centralized (ironic) -- scalability problems, isolation vulnerabilities.

    5. Examples: Google, Amazon, etc.

  2. Peer-To-Peer Architecture


    1. Roles not so well-defined.

    2. Not infrastructure intensive. Cheap.

    3. ``Sometimes on.''

    4. Flat, decentralized -- scales well, less vulnerable.

    5. May have some centralization features.

    6. Examples: BitTorrent, LimeWire, Skype.

Process Communication

  1. Request messages (from client), response messages (from server).

  2. The Transport Layer provides the socket API:


Transport Service Properties

Two key Transport Layer protocols:

  1. TCP is a connection-oriented service with reliable data transfer.

    The connection must be established before messages can be sent.

    Uses congestion control.

  2. UDP is a connectionless service with no data transfer reliability -- packets can be lost, arrive out of order, or be duplicated.

    Just ``throw'' messages out there.

    No congestion control.


  1. Reliable data transfer (TCP, not UDP).

  2. Throughput (neither has any guarantees).

  3. Latency (neither has any guarantees).

    UDP has less overhead, an advantage.

  4. Security (neither has security built in).

    Layer SSL over TCP for security.

Streaming media uses buffering to mitigate some of these problems.

Realtime applications may use UDP to reduce latency.

Service access:

  1. By IP address, port number.

  2. A service on a host ``listens'' for service requests at a ``well-known address'' -- its service port.

    Example ports: 13, daytime (TCP and UDP); 20, ftp data; 21, ftp control; 25, SMTP; 80, HTTP; 443, HTTPS.

Properties of various network applications:


Protocol use of various network applications:


HTTP Protocol

  1. HTTP uses client-server architecture:


  2. HTTP is stateless.

  3. A single web page can contain several objects. How do we minimize load time?

    Persistent and non-persistent TCP connections. Multiple, parallel TCP connections.


  4. HTTP client methods: GET, HEAD, PUT, POST, DELETE.

    HTTP client request format:


  5. HTTP server response format:


  6. Example exchange:
    % telnet phoenix http
    Connected to phoenix.
    Escape character is '^]'.
    GET / HTTP/1.1
    HTTP/1.1 200 OK
    Date: Sun, 03 Feb 2008 20:40:29 GMT
    Server: Apache/2.0.52 (Red Hat)
    Accept-Ranges: bytes
    Cache-Control: max-age=3600
    Expires: Sun, 03 Feb 2008 21:40:29 GMT
    Transfer-Encoding: chunked
    Content-Type: text/html; charset=ISO-8859-1
    <TITLE>Welcome to Phoenix!</TITLE>
    Connection closed by foreign host.

  7. Cookies allow association with state information:


    This provides a single- or multi-session layer on top of stateless HTTP.

  8. Proxy servers can be used to lessen congestion at a bottleneck:


    Client browsers are configured to send all requests to the proxy, which caches web objects. The proxy makes the real requests, on behalf of the clients.

FTP Protocol

HTTP and FTP are both basically file transfer protocols. What are the differences?

  1. FTP elements:


  2. FTP uses out-of-band control signaling:


  3. FTP retains session state information: login, current directory, idle time.

    More overhead because of statefullness

  4. ASCII and binary data transfers.

  5. Transfer modes:
    1. Active: client opens a random data port, sends port number to server over control connection, which connects to client at given port (role reversal).

      Problems result if there's a firewall at the client.

    2. Passive: server opens a random data port, sends port number to client over control connection, which connects to server at given port number.

Thomas P. Kelliher 2011-02-01
Tom Kelliher