Application Layer Introduction; HTTP; FTP
Tom Kelliher, CS 325
Feb. 4, 2011
Read 2.4-2.6.
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,
isolation vulnerabilities.
- 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.
Properties:
- 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.
Streaming media uses buffering to mitigate some of these problems.
Realtime applications may use UDP to reduce latency.
Service access:
- 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
load time?
Persistent and non-persistent TCP connections. Multiple, parallel TCP
connections.
- HTTP client methods: GET, HEAD, PUT, POST, DELETE.
HTTP client request format:
- HTTP server response format:
- Example exchange:
bluebird:~
% telnet phoenix http
Trying 10.32.3.39...
Connected to phoenix.
Escape character is '^]'.
GET / HTTP/1.1
Host: phoenix.goucher.edu
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
19f
<HTML>
<HEAD>
<TITLE>Welcome to Phoenix!</TITLE>
...
</BODY>
</HTML>
0
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
the clients.
HTTP and FTP are both basically file transfer protocols. What are the
differences?
- FTP elements:
- FTP uses out-of-band control signaling:
- FTP retains session state information: login, current directory, idle
time.
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
(role reversal).
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
number.
Thomas P. Kelliher
2011-02-01
Tom Kelliher