1/71
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
What is the main function of the Transport Layer?
"The transport layer manages data delivery between applications on devices
What problem does the Transport Layer solve that the Network Layer cannot?
"While the network layer ensures data reaches the correct machine
What are the two main protocols used at the Transport Layer?
Transmission Control Protocol (TCP) and User Datagram Protocol (UDP).
What is the PDU (Protocol Data Unit) for TCP?
A segment.
What is the PDU for UDP?
A datagram.
What does UDP stand for?
User Datagram Protocol.
Is UDP connection-oriented or connectionless?
Connectionless.
Does UDP provide reliability or error correction?
"No
What are the four fields in a UDP header?
"Source Port
What is the purpose of the UDP checksum?
To verify data integrity by detecting errors in transmission.
What is a port?
A 16-bit number that identifies a specific application or process on a device.
How many possible port numbers exist?
"65
What are the three categories of ports?
"Well-known ports (0–1023)
What are well-known ports used for?
"Reserved for common network services such as HTTP (80)
What are registered ports?
Ports used by user applications; developers can choose these safely for software connections.
What are ephemeral ports?
Temporary ports automatically assigned by the OS for outgoing connections.
"When connecting from one web browser to a web server
what is the destination port?"
What is the source port when a client connects to a server?
A temporary ephemeral port assigned by the operating system.
Why are ephemeral ports important?
They allow multiple applications or tabs to connect to different servers simultaneously without conflict.
What does NAT stand for?
Network Address Translation.
What problem does NAT solve?
Allows multiple devices to share one public IP address by mapping local addresses to unique external ports.
How does a router use NAT?
"It rewrites packets with a public IP and unique source port
What is stored in a NAT table?
"Original source IP and port
How does NAT handle incoming responses?
The router checks the destination IP and port in the NAT table and forwards the packet to the correct local device.
What happens if a website bans your public IP?
All devices sharing that IP via NAT are banned until the IP changes or a new address is leased.
What limitation does NAT have?
It only works if the internal machine initiates the connection; it cannot handle unsolicited inbound traffic without port forwarding.
What is port forwarding?
A configuration that maps incoming traffic on a public port to a specific device and port on a private network.
Why is port forwarding used?
"To allow external connections to reach devices behind a NAT
Give an example of port forwarding.
Forwarding external port 443 to internal IP 192.168.0.5 for a web server.
What is a socket?
A combination of an IP address and port number representing one endpoint of a network connection.
When is a socket created?
When an application opens a port for communication.
Why must applications open sockets explicitly?
For security and to ensure only authorized programs can receive data on that port.
What does TCP stand for?
Transmission Control Protocol.
What kind of delivery does TCP provide?
"Reliable
What is the tradeoff of TCP reliability?
Increased overhead and latency due to acknowledgments and larger headers.
How large is a typical TCP header?
"20 bytes minimum
What are the first two fields in a TCP header?
Source Port and Destination Port.
What is the purpose of the Sequence Number?
To track the order of bytes sent in the data stream.
What is the Acknowledgment Number used for?
To confirm successful receipt of data by indicating the next expected sequence number.
What does the Data Offset field indicate?
Where the data begins within the segment.
What is the Window Size field used for?
Flow control—it tells the sender how much data can be sent before waiting for an ACK.
What is the TCP Checksum used for?
To detect errors in the TCP header or data.
What is the Urgent Pointer?
An obsolete field that was once used to prioritize urgent data.
What does the SYN flag indicate?
Used to initiate a new TCP connection.
What does the ACK flag indicate?
Acknowledgment that data or a connection request was received.
What does the FIN flag indicate?
A request to close an active connection.
What does the RST flag do?
Resets the connection when errors occur or communication cannot continue.
What does the PSH flag do?
Pushes buffered data to the receiving application immediately.
What does the URG flag do?
Marks urgent data (now obsolete).
What are the four main types of TCP segments?
"SYN (start)
What is the TCP three-way handshake?
"A process to establish a reliable connection using SYN
What are the three steps of the TCP handshake?
"1. Client sends SYN
What does the ESTABLISHED state mean in TCP?
Both sides have acknowledged each other and can now send and receive data.
How does TCP ensure data is sent in order?
"Each byte has a sequence number
What happens if a segment is lost?
The receiver sends duplicate ACKs prompting the sender to retransmit the missing data.
What happens if the sender receives no ACK within the timeout period?
TCP retransmits all unacknowledged segments starting from the last ACK number.
What is RTT in TCP?
Round Trip Time—the time between sending a segment and receiving its acknowledgment.
What is RTO in TCP?
Retransmission Timeout—the maximum waiting time before assuming a packet was lost.
How is a TCP connection closed?
"Using a four-way handshake: FIN
Why does TCP use a four-way close instead of three?
Because each side must independently close its send stream and confirm the other side’s close.
What happens to ports after a TCP connection closes?
They are released back to the operating system for reuse.
What does it mean that TCP is full-duplex?
Data can be sent and received simultaneously in both directions.
What is congestion control in TCP?
A mechanism allowing receivers to adjust sender speed based on network capacity.
What is window scaling in TCP?
A TCP option that increases the effective window size to support faster networks.
What is silly window syndrome?
Inefficiency caused by sending small data packets with large headers.
What are the main differences between TCP and UDP?
TCP is reliable and ordered with acknowledgments; UDP is fast and connectionless with no guarantees.
Why might you use UDP instead of TCP?
"For applications where speed matters more than reliability
Give examples of TCP-based applications.
"Web browsing (HTTP)
Give examples of UDP-based applications.
"Video streaming
What is QUIC?
"A modern transport layer protocol built on UDP that adds reliability
Why was QUIC designed on top of UDP?
"Because most routers recognize TCP and UDP
What are the benefits of QUIC?
Combines the speed of UDP with the reliability and security of TCP.