1/59
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
What is the main responsibility of the Transport Layer?
It provides logical communication between application processes on different hosts. Transport layer can compensate for unreliability in TCP or UDP in network layer. Transport layer features include: resending lost packets, encryption, ordering
handles segmentation, reassembly, error recovery, flow control, and sometimes congestion control.
How does the Transport Layer differ from the Network Layer?
Transport layer delivers data to the correct application, while the network layer delivers data to the correct host.
Network Layer (IP) | Transport Layer (TCP/UDP) |
· Moves data from one host to another. · Like the postal service, it’s responsible for: o Routing the data through routers (mail centers). o Making sure it gets from one address to another. · Routers operate here and don't care what's inside the data — just where it’s going. | · Operates only in end systems (hosts). · Responsible for getting data to the right application on the host. o Collects data from the sender’s processes o Delivers it to the correct process on the receiving host
|
What are the two main protocols in the Transport Layer?
TCP and UDP.
What does the transport layer provide?
Logical communication between app processes running on different hosts.
Where do transport protocols run?
In end systems only; routers do not run transport protocols.
What happens on the send side of the transport layer?
Takes data from the app, segments it, adds a header (with port numbers), and passes it to the network layer (IP).
What happens on the receive side of the transport layer?
Reassembles segments into messages and delivers them to the correct application process.
What kind of delivery does IP provide?
Best-effort delivery (no guarantees for delivery, order, or correctness).
What is multiplexing at in transport protocols?
(at sender) The process of gathering data from multiple applications and sending them with unique port numbers.
What is demultiplexing in transport protocols?
(at receiver) The process of delivering received data to the correct application using port numbers.
What is UDP?
A lightweight, connectionless protocol providing fast transmission with no reliability guarantees.
lightweight and fast
no reliability mechanisms
connection-less
no congestion control
Why is UDP good for video streaming?
It's loss-tolerant and does not introduce delay with retransmissions.
How do you create a UDP socket in Python?
clientSocket = socket(AF_INET, SOCK_DGRAM)
What is TCP?
A connection-oriented protocol that provides reliable, ordered, and error-checked delivery.
What makes TCP reliable?
Sequence numbers, acknowledgements, retransmissions, congestion control. In the Internet, packets can be lost, get corrupted, and can arrive out of order, TCP makes sure none of these is perceived by the application processes and flow control.
What is TCP flow control?
A mechanism to ensure the sender does not overwhelm the receiver.
What is the 'receive window' in TCP?
The buffer space the receiver advertises to the sender.
What is TCP congestion control?
A mechanism to prevent the network from becoming overloaded.
What does AIMD stand for in TCP?
Additive Increase, Multiplicative Decrease.
What is the initial phase of TCP congestion control?
Slow Start.
What happens during TCP Slow Start?
Congestion window (cwnd) increases exponentially.
When does TCP switch from Slow Start to Congestion Avoidance?
When cwnd reaches the threshold (ssthresh) or packet loss occurs.
What is Fast Retransmit in TCP?
Re-sending a packet after receiving 3 duplicate ACKs without waiting for a timeout.
What is the four-tuple used to identify a TCP connection?
Source IP, source port, destination IP, destination port.
What does 'full-duplex' mean in TCP?
Data can flow in both directions at the same time.
What is the difference between Stop-and-Wait and Pipelining?
Stop-and-Wait sends one packet at a time, Pipelining allows multiple in-flight packets.
What is Go-Back-N protocol?
A pipelining protocol where the sender can send multiple packets but must resend from a lost packet onward.
What is Selective Repeat protocol?
A pipelining protocol where only the lost packet is resent, not all subsequent packets.
What is the Alternating Bit Protocol?
A Stop-and-Wait protocol with a 1-bit sequence number to detect duplicates.
What is the Delay-Bandwidth Product?
The amount of data that can be in flight at one time, calculated as link rate × RTT.
What is rdt1.0?
A reliable data transfer protocol over a perfect channel — no errors or loss.
What improvements does rdt2.0 add?
Error detection and ACK/NAK feedback.
What problem does rdt2.1 solve?
Corrupted ACK/NAK messages using sequence numbers.
What improvement does rdt3.0 make over rdt2.2?
It adds a timer to detect and recover from lost packets.
Why are sequence numbers important?
They help detect duplicates and ensure correct order of packets.
What is TCP's retransmission strategy?
It uses cumulative ACKs and retransmits only the segment that timed out.
What Python function is used to accept a client connection on the server side?
connectionSocket, addr = serverSocket.accept()
How does TCP multiplexing work?
1. Multiple application processes (like web browsers, email clients, file transfer apps) on the same host want to send data.
2. Each application has its own TCP socket with a unique 4-tuple:
(source IP, source port, destination IP, destination port)
3. The TCP layer:
- Tags each segment with the correct source and destination port numbers.
- Uses the 4-tuple to manage multiple active connections at once.
4. It passes the segment to the network layer, which encapsulates it in an IP datagram and forwards it toward the destination.