TCP / HTTP Flashcards

1
Q

What is TCP?

A

Transmission Control Protocol.

Sends streams of bytes, endlessly long.

The packets are labeled with a number, so if the application arrives too many packets out of order, it will wait for the remaining packets, and then send it in order. It has enough knowledge to know what is missing.

Stream-oriented
Multiplexer
Complex
Slow Startup (needs handshake)

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

What is the different between TCP (transmission control protocol) and UDP (user datagram protocol)?

A

TCP sends packets in order, and UDP (can) sends packets out of order.

TCP are stream oriented, and UDP are message oriented.

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

What are the WEB built up with?

A

URL + HTTP + HTML

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

How is an URL built?

A

Schema
Host
Path

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

How does the HTML in the Web work?

A
  1. Get IP of host in URL
  2. Connects to IP of host via TCP port 80
  3. Issue command (method) on path + options (headers)
  4. Get response
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What it the difference between a Client and a Server?

A

The Client wants information. Uses random TCP port.

The Server provides information. Uses well-known TCP port.

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

What does GET, POST, HEAD and OPTIONS in HTML methods mean?

A
GET = retrieve path
POST = modify this data on path
HEAD = retrieve info about path
OPTIONS = retrieve extra info about path
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

HTTP status code 1xx, 2xx, 3xx, 4xx and 5xx? (

A
1xx = information
2xx = success
3xx = redirects 
4xx = client error
5xx = server error
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Common HTTP status codes?

A
200 OK
100 Continue 
307 Temporary redirect 
308 Permanent redirect 
403 Forbidden 404 Not found 
405 Method not allowed 
410 Gone 
500 Internal Server Error
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What does wget do?

A

Download and stores a file from the web.

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

What does curl do?

A

Download a file from the web, and show the content in stdout (like cat).

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