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?
Errors like flipped bits often result from transmission issues such as interference
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?
It uses a four-step process FIN ACK LAST-ACK to close connections gracefully
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
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?
UDP mappings lack state and are cleared after short inactivity making tracking difficult
What is a key advantage of IPv6 over NAT?
IPv6 assigns unique public IPs to devices simplifying logging and investigation
What is the difference between the transport and network layers
The transport layer provides logical communication between processes while the network layer provides logical communication between hosts
How does the transport layer enhance network layer services
The transport layer breaks application messages into segments on the send side and reassembles segments into messages on the receive side
What are the two main transport protocols in the Internet
TCP and UDP
What services does TCP provide
Reliable in-order delivery congestion control flow control and connection setup
What type of delivery does UDP provide
Unreliable unordered delivery with no delay or bandwidth guarantees
What is the main function of demultiplexing in the transport layer
Directing transport-layer segments to the appropriate socket using IP addresses and port numbers
What identifies a TCP socket
A 4-tuple consisting of source IP address source port number destination IP address and destination port number
What identifies a UDP socket
A 2-tuple consisting of destination IP address and destination port number
Why is UDP considered connectionless
UDP does not involve handshaking between sender and receiver and handles each segment independently
What mechanisms allow TCP to provide reliable data transfer
Pipelined segments cumulative acknowledgments and a single retransmission timer
What triggers TCP retransmissions
Timeout events and duplicate acknowledgments
How does TCP handle duplicates
TCP uses sequence numbers to identify and discard duplicate packets