TCP Flashcards

1
Q

What is TCP?

A

Protocol that control transmission

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

What are some TCP use cases ?

A
  1. Database connection
  2. Web connection
  3. Remote ssh connection
  4. Any bidirectional communication
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How segments are being tracked in TCP ?

A

They are numbered with a sequence and acknowledge for “ order and retransmission purposes”

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

What is a file descriptor ?

A

Everything in linux is treated as a file , tcp connection is called file descriptor that uniquely represent a socket.

Socket/file descriptor example :
10.0.0.1:5555:10.0.0.2:22

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

What is a Four way handshake ?

A

The way a TCP connection is closed (fin-ack-fin-ack) , we delete the file descriptors from both sides

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

What is flow control ?

A

Property of TCP which manage how much a receiver can handle

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

What are the components of flow control ?

A
  1. Receiver window
  2. Sliding window (when the sender receives as acknowledgment it will slide its window
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is congestion control ?

A

A way to avoid congestion the middle boxes (routers) between receiver and sender

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

What are the existing algorithms of congestion control ?

A
  1. Slow start : with each ack , increment the MSS (maximum segment size) by one
  2. Congestion avoidance : increases linearly , all sent segments needs to be acknowledged to increase the MSS
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How can the router notify the sender that it will face a congestion ?

A

Every IP header have an ECN (explicit congestion notification) flag which the router will set to 1 if its facing a congestion

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

How the router remember the ips when doing NAT ?

A

He keeps a NAT Table of the ips he replaced

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