Chapter 3 Flashcards
What layers are above and under the transport-layer?
Application-Layer
Network-Layer
What does the transport-layer protocol provides?
A logical communication between application processes running on different hosts.
What does a logical communication mean in the context of the transport layer?
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.
Where are the network protocols implemented?
In the system, not in the network routers.
What are transport-layer segments?
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.
What is a datagram.
Is a network-layer segment wrapper for the transport-layer segment.
Does TCP and UDP offer the same transport-layer services?
No.
Conceptually, what is the main difference between the transport and networking layers.
The transport-layer protocol provides logical communication between processes running on different hosts
-whereas-
The network layer provides logical communication between hosts
Generally, what are the two distinct TCP/IP network transport-layer protocols?
UDP (User Datagram Protocol)
TCP (Transmission Control Protocol)
What does UDP provide?
Unreliable and connectionless service to invoking the application
What doe TCP provide?
Reliable and connection-oriented service to the invoking application.
When does a developer decides between UDP and TCP?
When creating sockets.
Why is Internet Protocol (IP) referred to as a ‘best-effort delivery service’?
Because that IP makes its “best effort” to deliver segments between communicating hosts, but it makes no guarantees.
Why is IP an unreliable service?
It doesn’t guarantee: segment delivery, orderly delivery, and integrity.
What is the name for extending host-to-host delivery to process-to-process delivery?
Transport-layer multiplexing and demultiplexing.
What are the two services UPD provides?
Process-to-process delivery and error checking.
How does TCP changes the IP paradigm?
It converts IP’s unreliable service between end systems into a reliable data transport service between processes.
What does TCP’s congestion control do?
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)
What is demultiplexing?
In the transport-layer, getting the right data to the right socket on the receiving end.
What is multiplexing?
In the transport-layer, creating a single segments from data received from multiple sockets.
How many ports are available?
0 to 65535
What are well-known port numbers?
Port numbers from 0 to 1023 and are restricted. (e.g. 80 -> HTTP)
What is the four-tuple of a TCP socket?
Source IP address
Source port number
Destination IP address
Destination port number
What does the transport-layer must provide at the very least?
Multiplexing/Demultiplexing
Why is UDP connectionless?
There’s no handshaking process.
What is the different in packet overhead for UDP and TCP?
UDP 8 bytes overhead
TCP 20 bytes overhead
Why is UDP controversial for multimedia applications?
UPD has no congestion control. It congests the network and forces TCP connection to further reduce their bandwidth usage.
What are the four header fields for UDP?
Source port
Destination port
Length (length bytes = header + data)
Checksum
What is a checksum?
Provides error detection.
What is the end-end principle?
Certain functionality must be implemented on a end-end basis (i.e. ignoring functionality in between)
What are ARQ (Automatic Repeat reQuest) protocols
Protocols to let the receiver to let the sender know what has been received correctly.
What are the 5 ARQ (Automatic Repeat reQuest) protocols capabilities?
Positive acknowledgements (ACK) Negative acknowledgements (NAK) Error detection Receiver feedback Retransmission
What is a stop-wait-protocol?
A protocol where the sender must wait until the receiver has correctly received the current packet.
In finite state machines (FSM), what does the A (looking symbol) for?
Explicitly denote the lack of an action or event.
What represents a more realistic approach from a ‘perfect world’ rdt?
Bits and packets may be corrupted.
When does packet and bit corruption often occur?
Physical components of the network as packets propagate or is buffered.
Why are control messages important?
To let receiver alert the sender of a correct transmission
Setting reliable data transfer uses retransmission protocols. What the protocols called?
ARQ (Automatic Repeat reQuest)
What protocol capabilities do you need to handle bit errors?
- Error detection
- Receiver feedback
- Retransmission
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)
No. The sender will not send a new piece of data until it is sure that the receiver has correctly received the current packet
rdt 2.0 is considered a stop-and-wait protocol why?
Because it waits for an ACK before sending new data.
What is the fatal flaw for rdt 2.0? i.e. What doesn’t it cover?
The scenario where an ACK or NAK packet could be corrupted.
What is the best strategy to tackle ACK and NAK packets getting corrupted?
Sequence numbers.
What should you consider for protocol when dealing with packet loss?
- How to detect packet loss
- What to do when packet loss occurs
Why can’t wait the time of an RTT do determine if a packet was lost?
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
When could duplicate data packets occur when dealing with time based retransmission?
When a packet experiences a particularly large delay.
What is the ideal functionality to deal with duplicate packets?
Sequence numbers
What are the three steps of a countdown timer?
- Start the timer each time a packet is sent (first time or retransmission)
- Respond to a timer interrupt
- Stop timer
At a high level, what are the components of a reliable data transfer protocol?
- Checksums
- Sequence numbers
- Timers
- +/- acknowledgements
What is the utilization of the sender/channel?
The fraction of time the sender is actually busy sending bits into the channel
U = (L/R) / (RTT + L/R)
Why does stop-and-wait has performance issues?
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.
What is a solution to the stop-and-wait performance issue?
Pipelining.
What does pipelining do?
Send packets without dealing with ACKs (filling up the pipeline)
What needs to be changes when going from stop-and-wait to pipelining?
- 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
What are the two approaches to dealing with pipelined error recovery?
- Go-Back-N
- Selective repeat
At a high level, what does the GBN (Go-Back-N) protocol do?
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.
Why is GBN referred to as the sliding-windows protocol?
Because as the protocols operates, the window of size N slide forward in the sequence number space.
Why in the GBN protocol we limit the window size to N?
Flow control
A GBN protocol must respond to three types of events?
- Invocation from above (rdt_send())
- Receipt of an ACK
- Timeout event
Why does GBN reject out-of-order packets?
Because it simplifies the process of buffering packets to the application layer.
In GBN what values does the sender must track for the window?
The sender must track the upper and lower bounds of its window and the position of ‘nextsum’.
In GBN what values does the receiver must track for the window?
The sequence number of the next in-order packet (expectedsum)
In GBN, what is a disadvantage of throwing away a correctly received packet?
The subsequent retransmission of that packet might face issues thus requiring more transmission.
What is an issue that a GBN protocol faces?
With a large window size and slow bandwidth delay, a single packet error can cause extensive retransmission issues.
How does selective repeat (SR) protocol fix issues found in the GBN protocol?
Instead of rejecting out-of-order packets, it will require the sender to retransmit individual packets.
How does the SR protocol deal with out-of-order packets?
It buffers them.
What is the ideal window size for an SR protocol?
N >= Sequence # Space /2
What is the maximum lifespan of a TCP packet in a high-speed network?
3 minutes.
Why is TCP said to be connection-oriented?
Before an application process can begin to send data, the two processes must “handshake” with each other.
Why is said that TCP provides a full-duplex service?
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.
What is point-to-point?
A TCP connection is always between one receiver and one sender.
What is MSS and MTU?
MSS: Maximum segment size
MTU: Maximum transmission unit
In addition to a source/destination port and checksum field. What does a TCP header contain?
- 32-bit sequence number field
- ACK number field
- 16-bit receiver window
- 4-bit header length field
- Option fiels
- Flag field
What are the flags in a TCP header (besides ACK) and what is their high level purpose?
- RST, SYN, FIN bits connection setup and teardown
- (PSH/URG)
How does cumulative acknowledgment works?
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
How does TCP deal with out-of-order packets?
It’s up to the TCP developer: drop or buffer
Why is Telnet vulnerable to eavesdropping attacks?
The data isn’t encrypted. People now use SSH instead.
What purpose a duplicate ACK serves?
It’s an ACK that reacknowledges a segment for which the sender has already received and earlier acknowledgement.
Why does TCP use a duplicate ACK?
Because it doesn’t use NAKs, it simply reacknowledges the last received in order byte.
What does a triple ACK means?
That the segment that the receiver is expecting is definitely lost.
When a triple ACK happens what does the sender do?
Performs a fast retransmit, that is, send the segment before that segment timer expires.
Why does TCP provides a flow-control service?
Eliminate the possibility of the sender overflowing the receiver’s buffer.
With regards to TCP flow control, what is the receive window?
The sender must maintain a window to which the data can be sent to the receiver. (Free buffer space)
What is the difference between congestion control and flow-control?
Congestion control = IP
Flow = TCP
Step by step, how does the 3-way handshake happen for a TCP connection
- Client sends segment with SYN bit set to 1 + random initial sequence number
- Server set its local variables and send a SYNACK to acknowledge and it’s own random starting sequence number
- Client receives confirmation and sets the SYN bit to zero and sends a third acknowledgement. Only step three can carry a payload.
How does a SYN flood attack happen?
A malicious user overloads a server with TCP requests without ever completing the third segment of the TCP connection.
How do you prevent a SYN flood attack?
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.
When does congestion occur?
Too many sources attempting to send data at too high a rate.
What is the formula to calculate throughput?
R/2
Why is TCP is responsible for end-to-end to congestion-control?
IP layers provide no explicit feedback to the end systems regarding network congestion.
What are the three elements to the TCP congestion-control algorithm?
- Slow start
- Congestion avoidance
- Fast recovery
What is ‘cwnd’
Congestion window
How does slow start works?
–> 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
How does fast recovery starts?
cwnd is increased by 1 MSS for every duplicate ACK received for the missing segment that caused TCP to enter the fast-recovery state
How would slow start be represented on a graph?
Exponentially
How would congestion control be represented on a graph?
Linearly
How would a triple ACK be represented on a graph?
Jagged edge (small drops)
How would a timeout be represented on a graph?
Drop to one.