TCP and UDP Flashcards
What does TCP assume about channel reliability?
TCP assumes some unreliability in channels such as errors or packet loss
Why do errors like flipped bits occur in local networks?
Flipped bit errors are caused by transmission issues such as electromagnetic interference, signal degradation, or hardware faults.
What is the purpose of acknowledgements (ACKs) in TCP?
ACKs confirm that the receiver has correctly received the packet and notify the sender to proceed
What is a NAK and how does it work?
A NAK informs the sender that a packet had errors prompting retransmission
What happens if ACKs or NAKs are corrupted?
The sender cannot determine if the packet was received causing retransmissions and potential duplicates
How are duplicates handled in TCP?
Sequence numbers help identify and discard duplicate packets
Why is the IP checksum weak?
It may not reliably detect multiple bit flips in a packet
What is the role of a timer in TCP retransmissions?
The sender waits for a reasonable time for ACK if none is received it retransmits
How does TCP handle packet loss?
TCP uses retransmissions sequence numbers and timers to ensure delivery
What is the concept of TCP’s flow control?
Flow control prevents senders from overwhelming receivers by managing buffer capacity
How does the TCP three-way handshake work?
It establishes connections using SYN SYN-ACK and ACK packets to confirm readiness
What is the TCP connection teardown process?
The initiator sends a FIN to close the connection, and the responder replies with an ACK, sends its own FIN, and receives a final ACK from the initiator to complete the teardown.
What are the two main TCP solutions to scaling issues?
Window scaling and PAWS Protection Against Wrapped Sequence Numbers
How does window scaling address TCP’s limitations?
It increases the receive window size to handle larger bandwidth-delay products
What is PAWS and why is it used?
PAWS prevents misidentification of old packets due to sequence number wraparound
What is RTTM in TCP?
Round Trip Time Measurement ensures accurate RTT calculation by embedding timestamps
What is the purpose of Slow Start in TCP?
It gradually ramps up data transmission to prevent congestion
How does Fast Retransmit work?
It retransmits lost packets immediately based on duplicate ACKs avoiding timeout delays
(Fast Retransmit works when the receiver notices a missing packet and keeps asking for it by sending the same “ACK” repeatedly. If the sender gets three duplicate ACKs in a row, it assumes the packet is lost and resends it right away without waiting for a timeout. This speeds up recovery from lost packets.)
What is the problem with early HTTP protocols like HTTP/1.0?
They lacked pipelining leading to inefficiencies such as multiple connections per object
What is the purpose of NAT?
To conserve public IP addresses by translating private addresses for external communication
What is outbound NAT?
It maps multiple internal source IPs to fewer external IPs using port numbers
What is inbound NAT?
It allows external traffic to access services on a private network using ports
What is the challenge of using NAT for UDP?
NAT (Network Address Translation) for UDP is challenging because UDP is stateless, meaning it doesn’t establish a connection like TCP. NAT relies on active connections to maintain mappings, but since UDP doesn’t create a persistent connection, its mappings are cleared after brief periods of inactivity, making it hard to track and manage UDP traffic consistently.
What is a key advantage of IPv6 over NAT?
IPv6 assigns unique public IPs to devices simplifying logging and investigation