TCP/IP Flashcards

1
Q

In what components of a network does transport protocols run?

A

In end-system. The edges of the networks, the hosts

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

What does the end user need from the transport layer?

A
  • connection management
  • reliability (guaranteed info. arrival)
  • timing e.g. for streamed coms.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What services to the internet transport protocols offer the application?

A

TCP:
- setup (connections)
- reliable transport
-flow control
-action upon congestion
TCP does not provide timing or bandwidth guarantees.

UDP:
- best effort. Relies on IP transport capabilities which are essentially none.
-connectionless

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

In TCP demultiplexing, how do we direct the message to the correct socket?

A

We use the src and destination IPs and port number to identify the socket. I.e the 4-tuple.

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

How do we demultiplex a UPD datagram at ?

A

Simply looking at destination IP and port in header and directing packet to that socket.

Datagrams with same dest.port # but different source IP addresses and/or source port numbers will be directed to the same socket

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

What is the stop and wait technique: Positive acknowledgement with retransmission?

A

Receiver sends acknowledgement when data arrives
Sender starts timer whenever transmitting
Sender retransmits if timer expires before acknowledgement arrives

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

What are the disadvatanges with stop and wait?

A

The bandwithd utilization SO LOW. We are wasting capacity of link.

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

What is the sliding window technique used for?

A

It is used to prevent the low bandwidth utilisation that comes with Stop&Wait. With sliding window, several unACKed segments can be in transmission, waiting for acknowledgement instead of just 1.

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

How are timeouts set in TCP?

A
  • By monitoring the RTT of sent packets. If this is increased, we can dynamically increase the timout to adapt to slower networks.
  • EWMA, calculates an average but gives more weight to recent RTT data.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Explain the Fast Retransmit functionality in TCP?

A
  • When a receiver has gotten a segment out of order or is missing a segment it can send duplicate ACKs indicating which packet is missing.
  • If sender gets back 3 duplicate ACKS, it know it should drop everything and retransmit the missing packet, so we can recover for the packet loss without resending all the data.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the purpose of the RcvWindow field in the TCP segment header?

A

part of TCP flow control. It tells the sender the size of the current receive window so that it can adjust how many unACKd data it can continue to transmit.

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

Define network congestion

A

Network congestion is a critical issue that arises when the demand for available network resources, such as bandwidth and processing capacity, exceeds what the network can provide.

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

What are the consequences of Network congestion?

A
  • Packet loss due to overflowed buffer space in routers/switches.
  • Increased latency
  • reduced throughtput
  • degraded UX
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the difference between TCP flow och congestion control (hint: scope)

A

flow control focuses on making sure sender and receiver operate at same rate to not overflow receiver. Balancing sender receiver capacity.

Congestion control is a core network issue and not about the capacity of an induvidual system or edge pair.§

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

What are the goals of congestion control?

A
  • Fair resource sharing. Fair distribution of network resources amongst its users.
  • Preventing network collpase, to prevent deteriorating network performance
  • ## To be able to uphold a quality of service
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is TCP CWND?

A

The heart of TCP congestion control. represents the maximum number of unacknowledged packets that a sender can have in transit at any given time. It essentially determines how much data can be in flight across the network.

17
Q

What parameters form basis of TCP congestion control?

A
  • CWND
  • RWND
  • ACKs
  • Sender dynamic capabilities
18
Q

What does the CWND consist of:

A

Consists of 2 components: “Bytes in Flight” (BIF), representing unacknowledged data in transit, and the “Receiver Window” (rwnd), indicating the receiver’s buffer space.

19
Q

How is the throughput in bytes/sec calculated for a TCP connection? and what do the variables stand for?

A

w = # of segments sent within one RTT.
MSS = Maximum segment Size. self-explanatory
RTT= Round trip time.
(w * MSS) / RTT

20
Q

What does this calculate?
w * MSS:

A

the total amount of data transmitted in one RTT

21
Q

What is an indicator of congestion?

A

duplicate ACKs!

22
Q

What happens with CWND when congestion is high vs low?

A

it grows and shrinks

23
Q

How does the CWND grow (and shrink)

A

exponentially and arithmetically

24
Q

Describe multiplicative update and decrease!

A

Congestion:
CWND = CWND/2
No Congestion:
CWND = CWND*2
- it is fast, but unfair
- When congestion is detected, TCP connections engage in multiplicative decrease, where they significantly reduce their sending rates by halving the congestion window size.

25
Q

Describe additive update and increase!

A

Congestion:
CWND = CWND-1
No Congestion:
CWND = CWND+1
-slow response, but more fair, divides spare bandwidth equally

  • When a TCP connection starts or when it’s operating below its congestion threshold, it increases its sending rate by a fixed amount for each successful round-trip transmission. This gradual increase prevents connections from quickly hogging the available bandwidth and gives other connections a chance to send data.
26
Q

What is AIMD scheme?

A

Additive Increase Multiplicative Decrease.

  • allows for FAIR resource sharing. Connections that are consuming more bandwidth than their fair share will experience more frequent multiplicative decreases, causing them to reduce their sending rates.
  • allows fast recovery and responsiveness. While AIMD involves reducing the sending rate upon congestion, it also includes a concept known as “fast recovery.” Instead of immediately reducing the congestion window to half upon detecting congestion, TCP enters a phase where it decreases the window more moderately and then enters an additive increase phase.
27
Q

What is TCP slow start?

A

TCP Slow Start is a congestion control mechanism used in TCP to gradually increase the sending rate of data when initiating a connection. It starts with a small sending rate and doubles it for each successful acknowledgment, helping avoid congestion while efficiently utilizing network bandwidth. When it reaches the slow start threshold we go into the congestion avoidance state.

28
Q

How does CWND grow in congestion avoidance face?

A

linearly

29
Q

How does it shirnk

A

geometrically (CWND/2)

30
Q

Difference between TCP-Tahoe and TCP-Reno variants?

A
  • TCP-Tahoe: The earlier variant. It enters slow start upon congestion and reduces the congestion window significantly.
  • TCP-Reno: An evolution of TCP-Tahoe. It adds fast recovery and doesn’t reduce the window as severely during congestion.
31
Q

How does TCP fast recovery work

A

TCP Fast Recovery:

Purpose: Part of TCP congestion control. Helps maintain data flow during congestion without going back to slow start.
Trigger: When duplicate ACKs are received, indicating packet loss.
Action: Sender retransmits missing packets, reduces the congestion window (CWND) to half, and continues sending new data.
Benefits: Prevents a full return to slow start, optimizing throughput during congestion while controlling CWND.
32
Q

Why is Fast recovery fast?

A

By reducing the CWND by a smaller value, Fast Recovery allows the sender to quickly resume sending at a reasonable rate. This is especially useful in scenarios where only a few packets are lost, or congestion is minor.

33
Q

What is Explicit Congestion Notification in TCP?

A

Purpose: Mechanism to indicate network congestion before packet loss occurs.

Operation: Routers mark packets with an ECN field when congestion is detected. Receivers and senders respond accordingly.

Benefits: Helps prevent packet loss and improves network efficiency by reacting to congestion proactively.

Implementation: Part of the IP and TCP headers, and requires support from routers and end systems.
34
Q

Example of real world application that benefit from TCP congestion control

A
  • web browsing
  • streaming
  • online gaming
  • Cloud services
35
Q
A