The Transport Layer Flashcards

1
Q

What is Transport Layer?

A

The transport layer is responsible for delivering data between devices in a network. It makes sure that data is sent and received correctly and in the right order. It also controls data flow and handles errors.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does Transport layer do?

A
  • It manages error detection, flow control, and retransmissions to ensure reliable communication.

-The transport layer assigns port numbers to help data reach the correct application on a device.

  • It decides whether to use connection-oriented (TCP) or connectionless (UDP) communication.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Give me an example of a Transport Layer

A
  • In video calls, the transport layer ensures voice and video sync correctly, avoiding major delays.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is Multiplexing & Demultiplexing

A
  • Multiplexing is when data from multiple applications is combined and sent over a network.
  • Demultiplexing is when data is separated at the destination so it reaches the correct application.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does Multiplexing & Demultiplexing do?

A
  • Multiplexing allows a single network connection to carry data from multiple applications.

Demultiplexing ensures the received data is delivered to the correct app (e.g., YouTube videos to YouTube, not your email).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Can you give me an example of Multiplexing & Demultiplexing?

A
  • When you watch YouTube and download a file at the same time, multiplexing combines their data.
  • Your laptop receives all the data, and demultiplexing separates the YouTube video from the file download.
  • When sending a Zoom video call, your voice and video are multiplexed into one stream before sending.
  • On the receiver’s side, demultiplexing ensures video data is sent to the video player and audio to the speakers.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is IP Datagrams?

A
  • An IP datagram is a unit of data that travels across a network using the Internet Protocol (IP).
  • It contains the source and destination IP addresses, helping route data from one device to another.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What does IP datagrams do?

A
  • It carries data across the internet, allowing devices to communicate.
  • It uses IP addresses to find the best path for data delivery.
  • The network layer breaks large datagrams into smaller fragments if needed.
  • Since IP itself is unreliable, TCP adds reliability by handling lost or damaged datagrams.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Can you give me an example of IP Datagrams?

A
  • When you send an email, your message is broken into IP datagrams and sent to the recipient’s email server.
  • When you load a website, IP datagrams carry the data from the web server to your browser.
  • In online gaming, datagrams are used to update player positions in real time.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is TCP and UDP?

A
  • TCP and UDP are protocols used to send data over the network.

-Transmission Control Protocol is reliable, ordered, and ensures error-free delivery, while User Datagram Protocol is fast but unreliable.

  • TCP uses ACKs and retransmissions, while UDP just sends data without checking for errors.
  • They work at the transport layer and are used for different types of applications.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What does TCP and UDP do?

A
  • TCP ensures data arrives in order and without errors (used in web browsing, file downloads, and messaging).
  • UDP sends data quickly without checking for errors (used in online gaming, live streaming, and voice calls).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Give me examples of TCP and UDP

A
  • TCP: When downloading a file, TCP ensures all parts arrive correctly and in order.
  • UDP: When playing an online game, UDP sends quick updates to avoid lag, even if some data is lost.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is SNMP?

A

Simple Network Management Protocol

SNMP helps monitor and manage network devices like routers and switches.

How It Works:
Manager 🖥️ – Collects data from devices.
Agent 📡 – Sends device status updates.
MIB 📊 – Stores device info.

What It Does:
Checks if devices work ✅
Finds problems 🚨
Changes settings if needed 🔄

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What does SNMP do?

A
  • It helps detect and fix network issues by collecting data from devices.
  • Sends alerts if a device fails or has high traffic.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Give me an example of SNMP?

A
  • A company uses SNMP to check if its servers are running smoothly.
  • An SNMP system alerts the admin if a router goes offline.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is a checksum?

A
  • A checksum is a small numerical value used to check if data was transmitted correctly.
  • It is created by adding up the bits of a data packet and storing the result.
  • The receiver recalculates the checksum and compares it to the sender’s value.
  • If the values do not match, the data is corrupted and must be resent.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What does checksum do?

A
  • It detects errors in data transmission caused by interference or packet loss.
  • It does not correct errors, only detects them.
  • Used in TCP, UDP, and IP to ensure data integrity.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Give me a checksum example

A
  • When downloading a file, the checksum confirms the file was not altered or corrupted.
  • When sending an email, the checksum ensures the email arrives as it was sent.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What is Reliable and Unreliable Data Transfer

A
  • Reliable data transfer ensures data arrives correctly and in order.
  • Unreliable data transfer means data might be lost, arrive late, or be out of order.

TCP provides reliable transfer, while UDP is unreliable.

Reliability depends on error checking, retransmissions, and acknowledgments (ACKs).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What does Reliable and Unreliable Data Transfer do?

A

-Reliable transfer ensures no data is lost, duplicated, or received in the wrong order.

  • Unreliable transfer is faster but can result in missing or corrupted data.
  • Reliable protocols (TCP) are used for emails, file transfers, and web browsing.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Can you give me examples of Reliable and Unreliable Data Transfer

A

Reliable: Sending an email ensures the full message arrives in order.

Unreliable: Watching a live football match may have momentary glitches but continues playing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What is ACK (Acknowledgment)

A
  • An ACK (acknowledgment) is a message sent back to the sender to confirm data was received.
  • If the sender does not receive an ACK, it resends the data.
  • Used in TCP for reliable communication.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What does ACK do?

A
  • Confirms successful data transmission.
  • Prevents duplicate packets from being processed.
  • Helps maintain order in data transfer.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Give me an example of ACK?

A
  • When you send a WhatsApp message, the double checkmarks indicate ACKs.

-When downloading a file, the server sends ACKs to confirm receipt of each packet.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What is FSM? (Finite State Machine)
A Finite State Machine (FSM) is used in network protocols to manage communication between devices. Example: TCP Connection (Three-Way Handshake) 🌍 When two computers connect using TCP, they follow steps (states): 1️⃣ CLOSED – No connection yet. 2️⃣ SYN SENT – Client sends a request to connect. 3️⃣ SYN-RECEIVED – Server receives the request and responds. 4️⃣ ESTABLISHED – Connection is complete, and data can be sent. 5️⃣ CLOSED – Connection ends after communication is done. Each step changes the state based on rules (like receiving a message).
26
What does FSM do?
- Defines how a network protocol reacts to different events. Finite State Machine (FSM)
27
Give me a FSM example?
- In TCP, FSM tracks whether a connection is established, sending data, or closed.
28
What is Stop-and-wait?
- A simple data transfer protocol where the sender waits for an ACK before sending the next packet. - It ensures reliable delivery by checking if each packet was received correctly. - If no ACK is received, the sender resends the packet.
29
What does stop-and-wait do?
- Ensures data is delivered without loss. -Makes sure data arrives in order. -Prevents overloading the receiver.
30
Give me an example of Stop and wait
-When sending a photo via Bluetooth, it sends one chunk at a time, waiting for confirmation. - In email, servers use stop-and-wait to ensure complete delivery.
31
What is packet loss?
- Packet loss happens when data does not reach its destination. - It can occur due to network congestion, poor signal, or hardware issues. - Lost packets cause delays, lag, and missing information in communication. - TCP handles packet loss by resending lost packets, while UDP does not.
32
What does packet loss do?
- Causes delays in video calls and streaming. - Can disrupt file downloads and require retransmission.
33
Give me a packet loss example?
- In a video call, freezing or lagging happens due to lost packets. - A web page loads slowly if packets are lost and need to be resent.
34
What is Utilization sender formula?
Sender Utilization measures how much time a sender spends actually transmitting data versus waiting. Higher utilization = Sender is sending data most of the time. Lower utilization = Sender spends more time waiting.
35
What does Utilization sender formula do?
- Helps determine if a network is efficient or slow. - Shows how much time is wasted waiting for acknowledgments.
36
Give me an example of utilization sender formula
- A network with high delays has low utilization because the sender is always waiting. - Pipelining increases utilization by sending multiple packets at once.
37
What is Pipelining?
- Pipelining is a method that allows multiple packets to be sent before waiting for an acknowledgment (ACK). - It improves network efficiency by keeping the sender busy. - Unlike stop-and-wait, where the sender waits for each ACK, pipelining sends multiple packets in a row. - Used in TCP and other protocols to speed up communication
38
What does Pipelining do?
- Reduces the waiting time between packets. - Increases network throughput (how much data can be sent at once).
39
Can you give me an example of pipelining?
- When watching Netflix, pipelining allows several seconds of video to load ahead.
40
What is Go-Back-N (GBN) - Sender Side
Go-Back-N (GBN) is a reliable data transfer protocol that sends multiple packets at once but retransmits from the last unacknowledged packet if an error occurs. How It Works: The sender sends multiple packets (up to a window size 🎯). The receiver acknowledges (ACK) received packets. If a packet is lost or corrupted, the sender retransmits that packet and all after it.
41
What does Go-Back-N GBN) - Sender Side do?
- Allows a sender to keep sending packets without waiting for each ACK. - If an error happens, all packets after the lost one must be resent. - Improves performance in networks with low error rates. - Helps avoid long waiting times in high-speed networks.
42
Go-Back-N (GBN) - Sender Side example?
- When downloading a file, if packet 3 is lost, packets 3, 4, and 5 are all resent.
43
What is Go-Back-N (GBN) - Receiver Side
- The receiver in GBN only accepts packets in order. - If a packet is missing, the receiver ignores all later packets until the lost one is received. - It sends cumulative ACKs, meaning it only acknowledges the last correctly received packet. - This avoids processing out-of-order packets.
44
What does Go-Back-N (GBN) - Receiver Side do?
-Ensures data is received in the correct order. - If a packet is lost, the receiver keeps waiting until the sender resends it
45
Give me a Go-Back-N (GBN) - Receiver Side example
If a student misses question 3 in a quiz, they must redo questions 3, 4, and 5. - When watching YouTube, if part of a video is missing, the rest won't load until it is resent.
46
What is Out-of-Order Packets?
- Packets that arrive in the wrong order due to network delays or routing changes. - This happens because packets can take different paths through the network. - The receiver must reorder them before delivering data to an application. - Some protocols, like UDP, do not fix out-of-order packets, while TCP does.
47
What does Out-of-order packets do?
- Can cause video glitches, scrambled messages, or delays. - TCP fixes this by using sequence numbers to reorder packets.
48
Out-of-order packet example
- If a text message arrives with mixed-up words, the phone must reorder them. - Watching Netflix, if some video frames arrive out of order, they must be fixed before playing
49
What is window size?
- The number of packets a sender can send before needing an ACK. - A larger window size allows faster communication because the sender doesn't stop often. - It is used in pipelined protocols like TCP, Go-Back-N, and Selective Repeat. - If the window is too small, the sender waits too much; if too big, it may overload the receiver.
50
What does Window size do?
- Controls how much data can be sent at once. - Helps balance speed vs. network reliability. - Larger window = higher efficiency in fast networks.
51
Can you give me a Window size example
- A large window lets Netflix preload more video so it plays smoothly.
52
What is Selective Repeat (SR) - Packet Sequence
- A transport protocol where only lost packets are resent, unlike Go-Back-N. - The receiver stores out-of-order packets and waits for missing ones. - This prevents unnecessary retransmissions. - Requires buffering to hold packets until all are received.
53
What does Selective Repeat (SR) - Packet Sequence do?
- Fixes packet loss more efficiently than Go-Back-N. - Ensures packets arrive in order without wasting bandwidth. - Uses individual ACKs for each packet instead of cumulative ACKs.
54
Give me a Selective Repeat (SR) - Packet Sequence example
- When downloading a file, if one part is lost, only that part is resent.
55
What is TCP Round-Trip Time (RTT) & Timeout
- RTT is the time for a packet to travel to its destination and back. - TCP calculates RTT to decide when to retransmit lost packets. - A timeout happens if an ACK takes too long to arrive. - If the timeout is too short, TCP resends packets too early; if too long, it delays retransmission. 🔄 RTT (Round-Trip Time) = Time it takes for a packet to go to the receiver and back. ⏳ If RTT is high, the network is slow. If RTT is low, the network is fast. ⏰ Timeout = How long TCP waits for an acknowledgment (ACK) before resending a packet. If RTT is too high, TCP waits longer before resending. If RTT is low, TCP resends faster when no response is received. Example: You send a message 📩 → RTT measures how long it takes to get a reply. If no reply comes in time ⏳ → TCP resends after timeout.
56
Give me a TCP Round-Trip Time (RTT) & Timeout example?
1️⃣ Webpage Loading Slow 🌍 What it means: If a website takes a long time to load, it means RTT is high (the request & response are taking too long). Example: You click on a website, but it loads slowly because the data takes too long to travel back and forth. 2️⃣ Netflix Adjusts Video Quality 📺 What it means: If RTT is high, Netflix lowers video quality so it doesn’t keep buffering. Example: Your internet is slow → Netflix switches to lower quality to avoid interruptions. 3️⃣ Online Gaming Needs Low RTT 🎮 What it means: Low RTT = Faster response time in multiplayer games. Example: In Fortnite, if RTT is high, your character reacts slowly. If RTT is low, actions happen instantly. 4️⃣ TCP Timeout & Resending Data ⏳ What it means: If a response doesn’t arrive in time, TCP resends the data to avoid lag. Example: If a message doesn’t get delivered in time, TCP sends it again to make sure it arrives. The Main Idea: High RTT = Slow connection, delays. Low RTT = Fast response, smooth performance. TCP Timeout = If a response is too slow, it resends the data.
57
What is TCP Fast Retransmit
- A mechanism in TCP that resends lost packets quickly, without waiting for a timeout. - Instead of waiting for a long timeout, TCP retransmits a packet if it receives multiple duplicate ACKs. - This improves speed and avoids unnecessary delays in data transfer. - Helps prevent slow performance in networks with occasional packet loss. - If your Netflix stream suddenly buffers, TCP fast retransmit ensures missing data is resent quickly.
58
What is TCP Flow Control?
- A method that prevents the sender from overwhelming the receiver with too much data. - Uses a receive window to control how much data can be sent before waiting for an ACK. -Helps maintain smooth and efficient communication. - Used in TCP to avoid buffer overflow at the receiver.
59
What is Sequence Numbers?
A Sequence Number is a unique number assigned to each packet in a network to keep data in order. Why It’s Needed? ✅ Ensures packets arrive in the correct order. ✅ Helps reassemble messages properly. ✅ Detects missing or duplicate packets.
60
What TCP Connection Management?
TCP Connection Management controls how a connection starts, stays open, and ends between two devices. 3 Main Phases: 1️⃣ Connection Establishment (Three-Way Handshake) 🤝 Client sends SYN (Hello, I want to connect). Server replies SYN-ACK (Okay, let's connect). Client sends ACK (Confirmed, connection open). 2️⃣ Data Transfer 📦 Data is sent and received between the devices. Uses sequence numbers to keep data in order.
61
What is TCP 3-Way Handshake
- The process used to establish a TCP connection between two devices. - Uses three steps: SYN → SYN-ACK → ACK. - Ensures both sender and receiver agree to start communication. - Helps prevent errors and unauthorized connections.
62
Why do we use TCP 3- way handshake?
- Confirms that both devices are ready to send and receive data. - Helps prevent connection issues and unauthorized access. - Ensures a stable network session before sending data. - Used in secure communication protocols like HTTPS.
63
What is a congestion control?
- A method to prevent network overload when too much data is being sent. -Adjusts the amount of data sent based on network conditions. -Helps prevent packet loss, slow speeds, and crashes. -Used in TCP to manage traffic on the internet.
64
What does Congestion control do?
- Reduces data transmission when the network is too busy. - Prevents delays and dropped connections. - Ensures all devices get a fair share of bandwidth. - Adjusts the window size dynamically to avoid congestion.
65
What is TLS?
- Transport Layer Security - A security protocol that encrypts data between users and websites. - Protects against hackers and keeps online communication private. -Replaces older security methods like SSL (Secure Sockets Layer). - Used in banking, emails, and secure messaging.
66
What does TSL do?
- Encrypts data to prevent hacking and eavesdropping. - Ensures safe online transactions and logins. -Protects passwords, credit card info, and personal messages. -Used in HTTPS websites to secure data transfers.
67
What is QUIC (Quick UDP Internet Connections)
- A newer and faster protocol that replaces TCP for web browsing. Uses UDP instead of TCP for speed but still provides reliability. Designed by Google to improve loading times for websites. Helps reduce connection delays and improve performance.
68
What is Bottleneck Link
A bottleneck link is the slowest part of a network connection that limits overall speed. It occurs when more data is sent than the link can handle. Causes delays, packet loss, and slow network performance. When Does It Happen? 1️⃣ When sending large amounts of data (streaming, downloads, gaming). 2️⃣ When multiple users/devices share a network (Wi-Fi in a crowded place). 3️⃣ When network congestion occurs (busy hours, too much traffic). 4️⃣ When one part of the network is slower than others (old cables, weak Wi-Fi, slow ISP).
69
What is Delay-Based TCP Congestion Control
Instead of waiting for packet loss, it reduces speed when delay increases. Used in networks where packet loss is rare, but delay is a problem.
70
What is TCP fairness
TCP Fairness means all TCP connections share network bandwidth equally so that no single connection takes up all the speed. Example: You download a file 📂 and stream a video 🎥 at the same time. TCP makes sure both get bandwidth instead of one stopping the other.
71
What is Cryptographic Keys?
A cryptographic key is a special code used to lock (encrypt) or unlock (decrypt) data 🔐. Types of Keys: 1️⃣ Symmetric Key 🗝️ – Same key is used for both encryption & decryption (Fast but less secure). Example: Like a house key—whoever has it can open the door. 2️⃣ Asymmetric Keys 🔑 – Uses two keys: Public Key (to encrypt) 📤 Private Key (to decrypt) 📥 Example: Like a mailbox—anyone can put mail in (encrypt), but only the owner can open it (decrypt). Why Are Keys Important? ✅ Keep data private (encryption). ✅ Ensure messages aren’t changed (integrity). ✅ Verify identity (digital signatures).
72
What is Encrypting Data
A process that converts readable data into unreadable code. Protects sensitive information from hackers and unauthorized users. Used in passwords, emails, and financial transactions. Requires encryption keys to decode the data.
73
What is Cipher Suite (TLS)
A Cipher Suite is a set of encryption rules used in TLS (Transport Layer Security) to secure internet connections 🔐. What It Includes: 1️⃣ Key Exchange Algorithm – Decides how to share encryption keys securely. 2️⃣ Encryption Algorithm – Protects data by scrambling it. 3️⃣ Message Authentication Code (MAC) – Ensures data isn’t changed. Example (TLS Cipher Suite Name 🏷️) 🔹 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 ECDHE = Key exchange RSA = Authentication AES_256_GCM = Encryption SHA384 = Integrity check
74
What is HOL Blocking (Head-of-Line Blocking)
- A delay that happens when one slow packet blocks others behind it. - Common in network routers, TCP, and web browsing. - Slows down traffic and reduces network efficiency. Can cause buffering, delays, and lower speeds.
75
What is 2-Way Handshake (TCP)
- A method for establishing a connection between two devices. Involves two steps: one device sends a SYN (synchronize) message, and the other responds with an ACK (acknowledgment). It is faster than the 3-way handshake but less secure. Mainly used in older or less secure protocols.
76
Give me 2-Way Handshake Scenarios
- Situations where a 2-step handshake is used instead of a 3-way handshake. Typically used in simple or internal network connections. Faster but less reliable and less secure. If one side fails, the connection might not be properly established.
77
What is a Closing a TCP Connection
The process of properly ending a TCP session between two devices. Uses a 4-step process with FIN (Finish) and ACK messages. Ensures that all data is sent before disconnecting safely. Prevents data loss or connection errors.
78
What is AIMD (Additive Increase Multiplicative Decrease)
A method used in TCP congestion control to adjust data flow. If no congestion is detected, speed increases slowly (additively). If congestion occurs, speed is reduced sharply (multiplicatively). Helps balance network traffic and avoid congestion collapse.
79
What is a TCP CUBIC
A modern congestion control algorithm used in TCP. Designed to work better in high-speed networks. Adjusts the congestion window based on a cubic function instead of linear increases. Used in Linux, Google servers, and modern internet applications.
80
What is RDT 1.0 (Reliable Data Transfer 1.0)
A simple data transfer protocol that assumes a perfect network. No packet loss, no corruption, and no need for retransmissions.
81
What is Selective Repeat (SR)
A transport layer protocol that only resends lost or corrupted packets instead of resending everything. More efficient than Go-Back-N because it does not waste bandwidth. The receiver stores out-of-order packets and waits for missing ones. Requires buffering to hold packets until they can be processed.
82
What is Parallelism
Parallelism means doing multiple tasks at the same time to make things faster and more efficient. Where It's Used? ✅ Computers – Running multiple processes at once (e.g., opening many apps). ✅ Networking – Sending multiple data packets at the same time. ✅ Cybersecurity – Scanning for threats while running other tasks..
83
What is RDT 2.0 (Reliable Data Transfer 2.0)
An improved version of RDT 1.0, designed to handle corrupted packets. Uses error detection (checksums) to verify if packets arrive correctly. Introduces ACKs (Acknowledgments) and NAKs (Negative Acknowledgments). Ensures that only correct data is accepted and that corrupted data is resent.
84
What is RDT 3.0 (Reliable Data Transfer 3.0)
A further improvement of RDT 2.0, designed to handle packet loss. Introduces timeouts, so if no ACK is received, the sender automatically resends the packet. Ensures all packets eventually arrive, even if the network loses some. Used in real-world networks where packets can be lost due to congestion.