Transport Layer Flashcards
(25 cards)
What does the Transport Layer do?
It lets apps on different computers communicate, breaks messages into segments, ensures delivery, and can control reliability, flow, or congestion
What is the difference between the Transport and Network Layers?
Transport Layer → Apps talk to each other (on different computers).
Network Layer → Computers move data to each other(host to host).
What are the two key transport protocols?
TCP - Reliable and connected (like a phone call 📞)
UDP - Unreliable and no connection (like a text message 📩 — might get lost)
🔀 Multiplexing & Demultiplexing
What is multiplexing in networking?
Takes app data, adds port numbers, and sends it in segments
What is demultiplexing?
It checks the port number and sends the data to the right app
How does demultiplexing differ for TCP vs UDP?
UDP: Uses {dest IP, dest port} only
TCP: Uses {source IP, source port, dest IP, dest port} for each unique connection.
What are the key features of UDP?
Sends without asking.
Messages might get lost or mixed up.
Tiny extra info (8 bytes).
No congestion control → Keeps sending, even if the network is busy.
When is UDP preferred?
Streaming media → Speed is more important than perfect delivery (videos, music).
DNS → Quick lookups, okay if retried.
SNMP → Network monitoring, some loss is fine.
Apps that can handle loss or need speed
What does the UDP checksum do?
It checks for errors by calculating a checksum for the header and data, but it’s not perfect
What does RDT stand for?
Reliable Data Transfer ensures data gets there correctly, even on a bad network
What does RDT 1.0 assume?
A perfectly reliable channel means no errors or loss, so sending data is easy
What does RDT 2.0 introduce?
Bit errors can happen, it uses ACKs (acknowledgements) and NAKs (negative acknowledgements) to confirm or resend data
What does RDT 2.1 add?
Sequence numbers help spot duplicates and fix bad ACKs/NAKs
What does RDT 2.2 do?
No NAKs needed, duplicate ACKs tell the sender to resend
What’s new in RDT 3.0?
If data is lost, it waits and resends after a timeout
What are the key features of TCP?
It’s connection-based,
sends data in order,
controls flow and congestion,
and uses sequence numbers with ACKs
What is TCP’s sequence number?
Byte number of the first byte in the segment’s data.
What is a TCP ACK number?
The next byte the receiver is waiting for
What is a cumulative ACK?
One ACK confirms all data up to a certain byte
How does TCP handle lost segments?
Resend data after a timeout or after 3 duplicate ACKs
What is the TCP 3-way handshake?
Client sends SYN, server replies with SYNACK, client sends ACK. Connection starts
What is the TCP 4-way handshake (close)?
Client sends FIN, server replies with ACK, server sends FIN, client replies with ACK. Connection is closed
What is TCP flow control?
Window size limits how much data the sender can send before needing an ACK
Why is TCP called ‘pipelined’?
It sends many segments at once without waiting, to work faster