Application layer 2 Flashcards

1
Q

What is the Hypertext Transfer Protocol (HTTP)?

A

• The web’s application layer protocol
• Defined in RFC 1945 (HTTP/1.0) and RFC 2616 (HTTP/1.1)
• Typically operates on port 80

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does a web page consist of?

A

• A base HTML file
• Several referenced objects (e.g., images, Java applets, audio files)
• Each object is addressable by a URL

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How does HTTP operate as a client/server protocol?

A

• The client (browser) requests and displays web objects
• The server sends requested objects
• HTTP servers are stateless

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What underlying transport protocol does HTTP use?

A

• TCP

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does the first diagram (D1) represent?

A
  • Communication between client browsers (PC and iPhone) and a web server
  • Via HTTP request and HTTP response messages
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What browser and server software are shown in D1?

A
  • PC: Firefox browser
  • iPhone: Safari browser
  • Server: Apache Web Server
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

In the TCP handshake and data transfer diagram (D2), what steps are shown?

A
  • Initiating TCP connection
  • Requesting a file
  • Receiving a file after Round Trip Time (RTT) delays
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What does RTT represent?

A
  • Round-trip time for a small packet to travel to the server and back, including delays
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How many RTTs are involved before file data transmission starts in non-persistent HTTP?

A
  • 2 RTTs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How does non-persistent HTTP handle multiple objects?

A

• Opens a new TCP connection for each object
• Closes the connection after each object transfer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How does persistent HTTP improve performance?

A

• Keeps the TCP connection open
• Allows multiple objects to be transferred in fewer RTTs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does the HTTP request message structure (D3) show?

A
  • Request line (method, URL, HTTP version)
  • Header lines
  • Blank line
  • Optional entity body
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Give an example of an HTTP request line.

A

```plaintext
GET /index.html HTTP/1.1\r\n
~~~

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is indicated by a carriage return and line feed (\r\n) in HTTP?

A

• Marks the end of header lines

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are common HTTP request methods?

A

• GET
• POST
• HEAD

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What does an HTTP response message consist of?

A

• Status line (protocol version, status code, status phrase)
• Header lines
• Blank line
• Data (requested content)

17
Q

What is the purpose of cookies in HTTP?

A

• Maintain session state information
• Identify users and manage personalized sessions

18
Q

What components make up an HTTP cookie system?

A

• Cookie header in HTTP request and response
• Cookie file on the client
• Server-side database

19
Q

What is a web cache (proxy server)?

A

• Satisfies HTTP requests on behalf of an origin server
• Reduces response time and network traffic

20
Q

What is conditional GET used for in caching?

A

• Avoids stale data
• Uses If-Modified-Since and Last-Modified headers

21
Q

What does the SMTP email diagram (D4) illustrate?

A
  • Mail servers communicating via SMTP
  • User agents interacting with mail servers
  • Outgoing message queues and user mailboxes
22
Q

What three components make up an email system?

A

• User agents
• Mail servers
• SMTP protocol

23
Q

How does SMTP transfer email?

A

• Uses TCP (port 25)
• Direct server-to-server message transfer

24
Q

What are the three phases of SMTP interaction?

A

• Handshaking
• Message transfer
• Closure

25
What does the mail message format diagram (D5) represent?
* Headers: e.g., To, From, Subject * Blank line separating header and body * Body containing the message content
26
Why can’t SMTP be used to retrieve emails?
• SMTP is a push protocol; retrieving emails is a pull operation
27
What protocols are used to access emails from a server?
• POP3 • IMAP • HTTP (for services like Gmail, Yahoo)
28
What are the phases of POP3 operation?
• Authorization (login) • Transaction (retrieving and managing messages) • Update (deletion of marked messages after session ends)
29
How does IMAP differ from POP3?
• Supports more features like folder manipulation • Maintains messages on the server
30
What is the basic operation model of HTTP?
• A client requests objects and a server provides objects over TCP connections.
31
Why is persistent HTTP faster than non-persistent HTTP?
• It reduces the overhead of setting up multiple TCP connections.
32
What function do cookies serve in web communication?
• Help servers remember user-specific information across sessions.
33
Which protocol is responsible for sending email between servers?
• SMTP
34
What distinguishes the body from the header in an email message format?
• A blank line separates the two sections.