Application Layer Introduction; HTTP; FTP
Tom Kelliher, CS 325
Feb. 4, 2011
Packet-switched network characteristics; protocol layers and models.
- Introduction to the application layer.
- HTTP protocol.
- FTP protocol.
SMTP, DNS, and P2P.
Internet applications have an abstract Internet view:
The Internet has an architecture; so do applications.
- Client-Server architecture
- Well-defined roles.
- Infrastructure intensive -- server farms. Expensive.
- ``Always on''
- Hierarchical, centralized (ironic) -- scalability problems,
- Examples: Google, Amazon, etc.
- Peer-To-Peer Architecture
- Roles not so well-defined.
- Not infrastructure intensive. Cheap.
- ``Sometimes on.''
- Flat, decentralized -- scales well, less vulnerable.
- May have some centralization features.
- Examples: BitTorrent, LimeWire, Skype.
- Request messages (from client), response messages (from server).
- The Transport Layer provides the socket API:
Two key Transport Layer protocols:
- TCP is a connection-oriented service with reliable data transfer.
The connection must be established before messages can be sent.
Uses congestion control.
- 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.
Streaming media uses buffering to mitigate some of these problems.
- Reliable data transfer (TCP, not UDP).
- Throughput (neither has any guarantees).
- Latency (neither has any guarantees).
UDP has less overhead, an advantage.
- Security (neither has security built in).
Layer SSL over TCP for security.
Realtime applications may use UDP to reduce latency.
- By IP address, port number.
- 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 uses client-server architecture:
- HTTP is stateless.
- A single web page can contain several objects. How do we minimize
Persistent and non-persistent TCP connections. Multiple, parallel TCP
- HTTP client methods: GET, HEAD, PUT, POST, DELETE.
HTTP client request format:
- HTTP server response format:
- 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)
Expires: Sun, 03 Feb 2008 21:40:29 GMT
Content-Type: text/html; charset=ISO-8859-1
<TITLE>Welcome to Phoenix!</TITLE>
Connection closed by foreign host.
- Cookies allow association with state information:
This provides a single- or multi-session layer on top of stateless HTTP.
- 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
HTTP and FTP are both basically file transfer protocols. What are the
- FTP elements:
- FTP uses out-of-band control signaling:
- FTP retains session state information: login, current directory, idle
More overhead because of statefullness
- ASCII and binary data transfers.
- Transfer modes:
- Active: client opens a random data port, sends port number to
server over control connection, which connects to client at given port
Problems result if there's a firewall at the client.
- Passive: server opens a random data port, sends port number to
client over control connection, which connects to server at given port
Thomas P. Kelliher