Why don't app developers write software for network-core devices?
Network-core devices do not run user applications. Applications on end systems allows for rapid app development, propagation.
Characteristics of the server and of clients in the client-server architecture.
Server: always-on host; permanent IP address; data centers for scaling. Clients: communicate with server; may be intermittently connected; may have dynamic IP addresses; do not communicate directly with each other.
In P2P, new peers bring new service capacity, as well as new service demands. What is this property called?
Self scalability.
List the properties of the P2P architecture.
No always-on server; arbitrary end systems directly communicate; peers request service from other peers, provide service in return; self scalability; peers are intermittently connected and change IP addresses; complex management.
Give three pure P2P examples.
File distribution (BitTorrent), streaming (KanKan), VoIP (Skype).
Client process vs server process?
Client process: process that initiates communication. Server process: process that waits to be contacted.
What is a socket, and what is it analogous to?
A process sends/receives messages to/from its socket. Socket analogous to door: the sending process shoves the message out the door and relies on transport infrastructure on the other side to deliver it to the receiving process's socket.
Why isn't the IP address enough to identify a process? What is the identifier?
Many processes can be running on the same host. The identifier includes both IP address and port numbers associated with the process on the host.
Example port numbers for an HTTP server and a mail server.
HTTP server: 80; mail server: 25.
What four things does an app-layer protocol define?
Types of messages exchanged (e.g., request, response); message syntax (what fields & how delineated); message semantics (meaning of information in fields); rules for when and how processes send & respond to messages.
Open vs proprietary protocols (with examples).
Open: defined in RFCs, allows for interoperability, e.g., HTTP, SMTP. Proprietary: e.g., Skype.
Name the four transport-service needs of an app.
Data integrity, timing, throughput, security.
What are "elastic apps"?
Apps that make use of whatever throughput they get (unlike multimedia apps that require a minimum amount of throughput).
Which common apps are loss-tolerant, and what throughput does each need?
Real-time audio/video: audio 5kbps-1Mbps, video 10kbps-5Mbps. Stored audio/video: same as above. Interactive games: few kbps up. (The other apps need no loss.)
What does TCP provide, and what does it NOT provide?
Provides: reliable transport; flow control (sender won't overwhelm receiver); congestion control (throttle sender when network overloaded); connection-oriented setup. Does not provide: timing, minimum throughput guarantee, security.
What does UDP provide?
Unreliable data transfer between sending and receiving process. It does not provide reliability, flow control, congestion control, timing, throughput guarantee, security, or connection setup.
Which common applications may use TCP or UDP?
Streaming multimedia (HTTP e.g. YouTube, RTP) and Internet telephony (SIP, RTP, proprietary e.g. Skype). E-mail, remote terminal access, Web and file transfer use TCP.
What does SSL provide, and at which layer is it?
Encrypted TCP connection, data integrity, end-point authentication. SSL is at app layer: apps use SSL libraries, which "talk" to TCP.
What does a web page consist of, and how is each object addressed?
A base HTML-file which includes several referenced objects (HTML file, JPEG image, Java applet, audio file…). Each object is addressable by a URL: host name + path name.
HTTP uses which transport protocol and port, and what does "stateless" mean?
TCP, port 80. Stateless: the server maintains no information about past client requests.
Why are protocols that maintain "state" complex?
Past history (state) must be maintained; if server/client crashes, their views of "state" may be inconsistent and must be reconciled.
Non-persistent vs persistent HTTP.
Non-persistent: at most one object sent over a TCP connection, which is then closed; multiple objects need multiple connections. Persistent: multiple objects can be sent over a single TCP connection.
Define RTT and give the non-persistent HTTP response time.
RTT: time for a small packet to travel from client to server and back. Response time = 2RTT + file transmission time (one RTT to initiate TCP, one RTT for request + first bytes of response).
Three issues with non-persistent HTTP.
Requires 2 RTTs per object; OS overhead for each TCP connection; browsers often open parallel TCP connections to fetch referenced objects.
How does persistent HTTP work, and how few RTTs can the referenced objects need?
The server leaves the connection open after sending the response; subsequent messages go over the open connection; the client sends requests as soon as it encounters a referenced object — as little as one RTT for all the referenced objects.
The four components of cookies.
1) Cookie header line of HTTP response message; 2) cookie header line in next HTTP request message; 3) cookie file kept on user's host, managed by user's browser; 4) back-end database at Web site.
What can cookies be used for, and what is the privacy concern?
Authorization, shopping carts, recommendations, user session state (Web e-mail). Privacy: cookies permit sites to learn a lot about you.
What is the goal of a Web cache, and what does it do on a request?
Satisfy client request without involving origin server. If the object is in the cache, the cache returns it; else the cache requests it from the origin server, then returns it to the client.
Describe the two roles a Web cache plays, who typically installs it, and the reasons to use one.
Server for the original requesting client; client to the origin server. Typically installed by ISP (university, company, residential ISP). Reduces response time and traffic on an institution's access link.
Caching example with hit rate 0.4: access-link utilization and total delay?
Data rate over access link = 0.6 × 1.50 = .9 Mbps; utilization = 0.9/1.54 = .58; total delay = 0.6(2.01) + 0.4(~msecs) ≈ 1.2 secs — less than with a 154 Mbps link, and cheaper.
FTP's two connections: ports and what each carries.
Control connection: TCP, server port 21 — authorization, browsing the remote directory, commands ("out of band"). Data connection: TCP, server port 20 — opened by the server for each file, closed after transferring one file.
What "state" does an FTP server maintain?
Current directory, earlier authentication.
Three major components of e-mail, and what a mail server holds.
User agents, mail servers, SMTP. A mail server holds the mailbox (incoming messages for the user) and the message queue of outgoing (to be sent) mail messages.
Between two mail servers, which is the SMTP "client" and which the "server"?
Client: sending mail server. "Server": receiving mail server.
SMTP: transport, port, and the three phases of transfer.
TCP (reliable transfer from client to server), port 25; direct transfer from sending server to receiving server. Phases: handshaking (greeting), transfer of messages, closure.
SMTP vs mail access protocol; what POP and IMAP offer.
SMTP: delivery/storage to receiver's server. Mail access protocol: retrieval from server. POP [RFC 1939]: authorization, download. IMAP [RFC 1730]: more features, including manipulation of stored msgs on server. (HTTP: gmail, Hotmail, Yahoo! Mail.)
POP3 "download and delete" vs "download-and-keep"; is POP3 stateful?
Download and delete: Bob cannot re-read e-mail if he changes client. Download-and-keep: copies of messages on different clients. POP3 is stateless across sessions.
What does IMAP keep, and where?
All messages in one place: at server; lets the user organize messages in folders; keeps user state across sessions: names of folders and mappings between message IDs and folder name.
What is DNS (two parts of the definition)?
A distributed database implemented in a hierarchy of many name servers, and an application-layer protocol: hosts, name servers communicate to resolve names (address/name translation).
DNS services, and why DNS is not centralized.
Services: hostname to IP address translation; host aliasing; mail server aliasing; load distribution. Not centralized because of single point of failure, traffic volume, distant centralized database, maintenance — it doesn't scale.
Root vs TLD vs authoritative DNS servers.
Root: contacted by a local name server that can not resolve a name (13 root "servers" worldwide). TLD: responsible for com, org, net, edu, aero, jobs, museums and country domains. Authoritative: an organization's own DNS server(s) with authoritative hostname-to-IP mappings for its named hosts.
Where does a host send its DNS query first, and is that server part of the DNS hierarchy?
To the local DNS name server, which does not strictly belong to the hierarchy; each ISP has one ("default name server"); host queries go to it first; it has a local cache of recent name-to-address pairs (may be out of date) and acts as proxy, forwarding the query into the hierarchy.
Iterated vs recursive DNS query.
Iterated: the contacted server replies with the name of a server to contact ("I don't know this name, but ask this server"). Recursive: puts the burden of name resolution on the contacted name server.