Chapter 2/Lecture 2 Application Layer Flashcards
Which ports and protocols are used by HTTP(S), FTP, DHCP, DNS and ICMP?
HTTP(S):80(443) TCP, FTP:20(data), 21(control) TCP, DHCP: 67(server)/68(client) UDP, DNS:53 UDP, ICMP: None None(Layer 3 protocol, not Layer 4).
What does an app-layer protocol define?
Type of message(request/response/etc), message-syntax(fields and how they are delineated), semantics(what does information mean) and rules for when/how send/recieve.
What’s the api from L5 to L4?
Sockets.
What does UDP offer?
Lower overhead because of unreliable data transfer(no setup).
What does TCP offer?
Reliable transport(sequence number and acks), flow control(sliding window, receive window telling how many bytes), congestion control(slow-start, congestion avoidance(?), fast retransmit), connection-oriented(3-way).
What’s the difference between stateless and statefull?
Stateless; server maintains no information about past requests. If either server or client crashes, no biggie. Example: HTTP
Statefull; server maintains information about past requests. If server crashes, must rebuild state. Example: FTP
What’s the difference between non-persistent and persistent HTTP?
Non-persistent sends at most one object, then shuts down the connection. Persistent leaves the connection ope, so that several objects can be sent over one connection.
What does RTT stand for, and what is the definition?
Round Trip Time, time for a small packet to travel from client to server and back(or ack back).
What are the different method types, and how’s the HTTP message request/response defined?
Methods; GET/POST/HEAD(1.0), PUT/DELETE(1.1) Message: "method" "url" "version" or "version" "status_code" "status_phrase"\r\n "header" "value"\r\n .... "header" "value"\r\n \r\n body
What are the three major components in e-mail?
User agent, mail server and SMTP.
Explain the SMTP protocol(port, phases, what does it do etc).
SMTP goes over TCP on port 25. It’s a protocol for delivery of message from sender to receiver. It has three phases, handshake, transfer and closure. Commands are ASCII text, and response is a status code and phrase.
Which protocols are used for retrieval?
POP(Post Office Protocol), IMAP(Internet Message Access Protocol) and HTTP
What’s the different between POP and IMAP?
POP is stateless(mails are downloaded to the client, but no status change is recorded on server. Download and delete(on server) or keep(on server)), while IMAP is statefull(mails are changed on server, so changes are synced between user agent(s) and server).
What does DNS stand for, and how is it organized?
Domain name system, distributed database to avoid single-point-of-failure(due to traffic volume, load distribution etc). Organized with root servers at the top, followed by TLD(top level domains) and authoritative DNS server(organizations own). Also has local DNS servers, which is operated by company, university, residential isp etc. Local DNS does not belong in the hierarchy.
How does DNS (queries) work?
Local DNS(default name server) stores a cache of recent name-to-address translations. Cache entries has a timeout(TTL), after which the record disappears, but entry may still be out of date because new records takes time to spread(best-effort). If lookup misses, local dns queries hierarchy. Either via recursive query(if dns miss, asked server asks higher up) or iterative query(server responds with new server to contact if dns mss).