Chapter 3 Flashcards

1
Q

What layers are above and under the transport-layer?

A

Application-Layer

Network-Layer

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

What does the transport-layer protocol provides?

A

A logical communication between application processes running on different hosts.

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

What does a logical communication mean in the context of the transport layer?

A

It’s as if the two hosts running processes are directly connection, but in reality they can potentially be on opposite sides of the planet.

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

Where are the network protocols implemented?

A

In the system, not in the network routers.

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

What are transport-layer segments?

A

The process of converting application-layer messages into transport-layer packets (i.e. segments). From the sending side. On the receiving end, the network layer extracts the transport-layer segment from the datagram and sends up segment to the transport-layer.

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

What is a datagram.

A

Is a network-layer segment wrapper for the transport-layer segment.

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

Does TCP and UDP offer the same transport-layer services?

A

No.

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

Conceptually, what is the main difference between the transport and networking layers.

A

The transport-layer protocol provides logical communication between processes running on different hosts
-whereas-
The network layer provides logical communication between hosts

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

Generally, what are the two distinct TCP/IP network transport-layer protocols?

A

UDP (User Datagram Protocol)

TCP (Transmission Control Protocol)

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

What does UDP provide?

A

Unreliable and connectionless service to invoking the application

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

What doe TCP provide?

A

Reliable and connection-oriented service to the invoking application.

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

When does a developer decides between UDP and TCP?

A

When creating sockets.

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

Why is Internet Protocol (IP) referred to as a ‘best-effort delivery service’?

A

Because that IP makes its “best effort” to deliver segments between communicating hosts, but it makes no guarantees.

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

Why is IP an unreliable service?

A

It doesn’t guarantee: segment delivery, orderly delivery, and integrity.

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

What is the name for extending host-to-host delivery to process-to-process delivery?

A

Transport-layer multiplexing and demultiplexing.

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

What are the two services UPD provides?

A

Process-to-process delivery and error checking.

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

How does TCP changes the IP paradigm?

A

It converts IP’s unreliable service between end systems into a reliable data transport service between processes.

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

What does TCP’s congestion control do?

A

It prevents any one TCP connection to swamp the links and routers between communicating hosts. Rather, it shares the available bandwidth. (A service to the Internet)

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

What is demultiplexing?

A

In the transport-layer, getting the right data to the right socket on the receiving end.

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

What is multiplexing?

A

In the transport-layer, creating a single segments from data received from multiple sockets.

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

How many ports are available?

A

0 to 65535

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

What are well-known port numbers?

A

Port numbers from 0 to 1023 and are restricted. (e.g. 80 -> HTTP)

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

What is the four-tuple of a TCP socket?

A

Source IP address
Source port number
Destination IP address
Destination port number

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

What does the transport-layer must provide at the very least?

A

Multiplexing/Demultiplexing

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

Why is UDP connectionless?

A

There’s no handshaking process.

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

What is the different in packet overhead for UDP and TCP?

A

UDP 8 bytes overhead

TCP 20 bytes overhead

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

Why is UDP controversial for multimedia applications?

A

UPD has no congestion control. It congests the network and forces TCP connection to further reduce their bandwidth usage.

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

What are the four header fields for UDP?

A

Source port
Destination port
Length (length bytes = header + data)
Checksum

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

What is a checksum?

A

Provides error detection.

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

What is the end-end principle?

A

Certain functionality must be implemented on a end-end basis (i.e. ignoring functionality in between)

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

What are ARQ (Automatic Repeat reQuest) protocols

A

Protocols to let the receiver to let the sender know what has been received correctly.

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

What are the 5 ARQ (Automatic Repeat reQuest) protocols capabilities?

A
Positive acknowledgements (ACK)
Negative acknowledgements (NAK)
Error detection
Receiver feedback
Retransmission
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

What is a stop-wait-protocol?

A

A protocol where the sender must wait until the receiver has correctly received the current packet.

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

In finite state machines (FSM), what does the A (looking symbol) for?

A

Explicitly denote the lack of an action or event.

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

What represents a more realistic approach from a ‘perfect world’ rdt?

A

Bits and packets may be corrupted.

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

When does packet and bit corruption often occur?

A

Physical components of the network as packets propagate or is buffered.

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

Why are control messages important?

A

To let receiver alert the sender of a correct transmission

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

Setting reliable data transfer uses retransmission protocols. What the protocols called?

A

ARQ (Automatic Repeat reQuest)

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

What protocol capabilities do you need to handle bit errors?

A
  • Error detection
  • Receiver feedback
  • Retransmission
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q

In a ‘wait for ACK/NAK’ can the sender get more date from the upper layer and use the rdt_send()? Why? (rdt 2.0)

A

No. The sender will not send a new piece of data until it is sure that the receiver has correctly received the current packet

41
Q

rdt 2.0 is considered a stop-and-wait protocol why?

A

Because it waits for an ACK before sending new data.

42
Q

What is the fatal flaw for rdt 2.0? i.e. What doesn’t it cover?

A

The scenario where an ACK or NAK packet could be corrupted.

43
Q

What is the best strategy to tackle ACK and NAK packets getting corrupted?

A

Sequence numbers.

44
Q

What should you consider for protocol when dealing with packet loss?

A
  • How to detect packet loss

- What to do when packet loss occurs

45
Q

Why can’t wait the time of an RTT do determine if a packet was lost?

A

This is a worst case scenario and it is very difficult for networks to estimate this. Further, a protocol should recover from packet loss ASAP

46
Q

When could duplicate data packets occur when dealing with time based retransmission?

A

When a packet experiences a particularly large delay.

47
Q

What is the ideal functionality to deal with duplicate packets?

A

Sequence numbers

48
Q

What are the three steps of a countdown timer?

A
  1. Start the timer each time a packet is sent (first time or retransmission)
  2. Respond to a timer interrupt
  3. Stop timer
49
Q

At a high level, what are the components of a reliable data transfer protocol?

A
  • Checksums
  • Sequence numbers
  • Timers
  • +/- acknowledgements
50
Q

What is the utilization of the sender/channel?

A

The fraction of time the sender is actually busy sending bits into the channel

U = (L/R) / (RTT + L/R)

51
Q

Why does stop-and-wait has performance issues?

A

Because it only sends one packet at a time, neglecting the lower layer of the network stack.

E.g. the high performance link but the slow protocol.

52
Q

What is a solution to the stop-and-wait performance issue?

A

Pipelining.

53
Q

What does pipelining do?

A

Send packets without dealing with ACKs (filling up the pipeline)

54
Q

What needs to be changes when going from stop-and-wait to pipelining?

A
  • Increase range of sequence numbers
  • Need for buffers on both sides
  • Buffering needs to be adapted to the approach for dealing with lost, corrupted and overly delayed packets
55
Q

What are the two approaches to dealing with pipelined error recovery?

A
  • Go-Back-N

- Selective repeat

56
Q

At a high level, what does the GBN (Go-Back-N) protocol do?

A

the sender is allowed to transmit multiple packets (when available) without waiting for an acknowledgment, but is constrained to have no more than some maximum allowable number, N, of unacknowledged packets in the pipeline.

57
Q

Why is GBN referred to as the sliding-windows protocol?

A

Because as the protocols operates, the window of size N slide forward in the sequence number space.

58
Q

Why in the GBN protocol we limit the window size to N?

A

Flow control

59
Q

A GBN protocol must respond to three types of events?

A
  • Invocation from above (rdt_send())
  • Receipt of an ACK
  • Timeout event
60
Q

Why does GBN reject out-of-order packets?

A

Because it simplifies the process of buffering packets to the application layer.

61
Q

In GBN what values does the sender must track for the window?

A

The sender must track the upper and lower bounds of its window and the position of ‘nextsum’.

62
Q

In GBN what values does the receiver must track for the window?

A

The sequence number of the next in-order packet (expectedsum)

63
Q

In GBN, what is a disadvantage of throwing away a correctly received packet?

A

The subsequent retransmission of that packet might face issues thus requiring more transmission.

64
Q

What is an issue that a GBN protocol faces?

A

With a large window size and slow bandwidth delay, a single packet error can cause extensive retransmission issues.

65
Q

How does selective repeat (SR) protocol fix issues found in the GBN protocol?

A

Instead of rejecting out-of-order packets, it will require the sender to retransmit individual packets.

66
Q

How does the SR protocol deal with out-of-order packets?

A

It buffers them.

67
Q

What is the ideal window size for an SR protocol?

A

N >= Sequence # Space /2

68
Q

What is the maximum lifespan of a TCP packet in a high-speed network?

A

3 minutes.

69
Q

Why is TCP said to be connection-oriented?

A

Before an application process can begin to send data, the two processes must “handshake” with each other.

70
Q

Why is said that TCP provides a full-duplex service?

A

If there’s a TCP connection between process A and B (separate hosts), the the application layer data can flow from process A to process B at the same time as application data flows from process B to process A.

71
Q

What is point-to-point?

A

A TCP connection is always between one receiver and one sender.

72
Q

What is MSS and MTU?

A

MSS: Maximum segment size
MTU: Maximum transmission unit

73
Q

In addition to a source/destination port and checksum field. What does a TCP header contain?

A
  • 32-bit sequence number field
  • ACK number field
  • 16-bit receiver window
  • 4-bit header length field
  • Option fiels
  • Flag field
74
Q

What are the flags in a TCP header (besides ACK) and what is their high level purpose?

A
  • RST, SYN, FIN bits connection setup and teardown

- (PSH/URG)

75
Q

How does cumulative acknowledgment works?

A

TCP only acknowledges bytes up to the first missing byte in the stream.

Host A has received one segment from Host B containing bytes 0 through 535 and another segment containing bytes 900 through 1,000. For some reason Host A has not yet received bytes 536 through 899. In this example, Host A is still waiting for byte 536

76
Q

How does TCP deal with out-of-order packets?

A

It’s up to the TCP developer: drop or buffer

77
Q

Why is Telnet vulnerable to eavesdropping attacks?

A

The data isn’t encrypted. People now use SSH instead.

78
Q

What purpose a duplicate ACK serves?

A

It’s an ACK that reacknowledges a segment for which the sender has already received and earlier acknowledgement.

79
Q

Why does TCP use a duplicate ACK?

A

Because it doesn’t use NAKs, it simply reacknowledges the last received in order byte.

80
Q

What does a triple ACK means?

A

That the segment that the receiver is expecting is definitely lost.

81
Q

When a triple ACK happens what does the sender do?

A

Performs a fast retransmit, that is, send the segment before that segment timer expires.

82
Q

Why does TCP provides a flow-control service?

A

Eliminate the possibility of the sender overflowing the receiver’s buffer.

83
Q

With regards to TCP flow control, what is the receive window?

A

The sender must maintain a window to which the data can be sent to the receiver. (Free buffer space)

84
Q

What is the difference between congestion control and flow-control?

A

Congestion control = IP

Flow = TCP

85
Q

Step by step, how does the 3-way handshake happen for a TCP connection

A
  1. Client sends segment with SYN bit set to 1 + random initial sequence number
  2. Server set its local variables and send a SYNACK to acknowledge and it’s own random starting sequence number
  3. Client receives confirmation and sets the SYN bit to zero and sends a third acknowledgement. Only step three can carry a payload.
86
Q

How does a SYN flood attack happen?

A

A malicious user overloads a server with TCP requests without ever completing the third segment of the TCP connection.

87
Q

How do you prevent a SYN flood attack?

A

The server creates a special ‘cookie’ which is a complex hash function to validate the requests from the client. There ‘cookies’ are known as SYN cookies.

88
Q

When does congestion occur?

A

Too many sources attempting to send data at too high a rate.

89
Q

What is the formula to calculate throughput?

A

R/2

90
Q

Why is TCP is responsible for end-to-end to congestion-control?

A

IP layers provide no explicit feedback to the end systems regarding network congestion.

91
Q

What are the three elements to the TCP congestion-control algorithm?

A
  1. Slow start
  2. Congestion avoidance
  3. Fast recovery
92
Q

What is ‘cwnd’

A

Congestion window

93
Q

How does slow start works?

A

–> Start at 1 MSS and increase for each ACK received back.
1 MSS, 2 MSS, 4 MSS (doubling every RTT)

–>First packet loss by timeout

  • Set ssthresh (slow start threshold) to cwnd/2
  • Set cwnd to 1 and the process starts over

– 2nd way –

When MSS reaches ssthresh –> restart

==> Trigger congestion avoidance

94
Q

How does fast recovery starts?

A

cwnd is increased by 1 MSS for every duplicate ACK received for the missing segment that caused TCP to enter the fast-recovery state

95
Q

How would slow start be represented on a graph?

A

Exponentially

96
Q

How would congestion control be represented on a graph?

A

Linearly

97
Q

How would a triple ACK be represented on a graph?

A

Jagged edge (small drops)

98
Q

How would a timeout be represented on a graph?

A

Drop to one.