Topic 10 - Transport Layer

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/71

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

72 Terms

1
New cards

What is the main function of the Transport Layer?

"The transport layer manages data delivery between applications on devices

2
New cards

What problem does the Transport Layer solve that the Network Layer cannot?

"While the network layer ensures data reaches the correct machine

3
New cards

What are the two main protocols used at the Transport Layer?

Transmission Control Protocol (TCP) and User Datagram Protocol (UDP).

4
New cards

What is the PDU (Protocol Data Unit) for TCP?

A segment.

5
New cards

What is the PDU for UDP?

A datagram.

6
New cards

What does UDP stand for?

User Datagram Protocol.

7
New cards

Is UDP connection-oriented or connectionless?

Connectionless.

8
New cards

Does UDP provide reliability or error correction?

"No

9
New cards

What are the four fields in a UDP header?

"Source Port

10
New cards

What is the purpose of the UDP checksum?

To verify data integrity by detecting errors in transmission.

11
New cards

What is a port?

A 16-bit number that identifies a specific application or process on a device.

12
New cards

How many possible port numbers exist?

"65

13
New cards

What are the three categories of ports?

"Well-known ports (0–1023)

14
New cards

What are well-known ports used for?

"Reserved for common network services such as HTTP (80)

15
New cards

What are registered ports?

Ports used by user applications; developers can choose these safely for software connections.

16
New cards

What are ephemeral ports?

Temporary ports automatically assigned by the OS for outgoing connections.

17
New cards

"When connecting from one web browser to a web server

what is the destination port?"

18
New cards

What is the source port when a client connects to a server?

A temporary ephemeral port assigned by the operating system.

19
New cards

Why are ephemeral ports important?

They allow multiple applications or tabs to connect to different servers simultaneously without conflict.

20
New cards

What does NAT stand for?

Network Address Translation.

21
New cards

What problem does NAT solve?

Allows multiple devices to share one public IP address by mapping local addresses to unique external ports.

22
New cards

How does a router use NAT?

"It rewrites packets with a public IP and unique source port

23
New cards

What is stored in a NAT table?

"Original source IP and port

24
New cards

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.

25
New cards

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.

26
New cards

What limitation does NAT have?

It only works if the internal machine initiates the connection; it cannot handle unsolicited inbound traffic without port forwarding.

27
New cards

What is port forwarding?

A configuration that maps incoming traffic on a public port to a specific device and port on a private network.

28
New cards

Why is port forwarding used?

"To allow external connections to reach devices behind a NAT

29
New cards

Give an example of port forwarding.

Forwarding external port 443 to internal IP 192.168.0.5 for a web server.

30
New cards

What is a socket?

A combination of an IP address and port number representing one endpoint of a network connection.

31
New cards

When is a socket created?

When an application opens a port for communication.

32
New cards

Why must applications open sockets explicitly?

For security and to ensure only authorized programs can receive data on that port.

33
New cards

What does TCP stand for?

Transmission Control Protocol.

34
New cards

What kind of delivery does TCP provide?

"Reliable

35
New cards

What is the tradeoff of TCP reliability?

Increased overhead and latency due to acknowledgments and larger headers.

36
New cards

How large is a typical TCP header?

"20 bytes minimum

37
New cards

What are the first two fields in a TCP header?

Source Port and Destination Port.

38
New cards

What is the purpose of the Sequence Number?

To track the order of bytes sent in the data stream.

39
New cards

What is the Acknowledgment Number used for?

To confirm successful receipt of data by indicating the next expected sequence number.

40
New cards

What does the Data Offset field indicate?

Where the data begins within the segment.

41
New cards

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.

42
New cards

What is the TCP Checksum used for?

To detect errors in the TCP header or data.

43
New cards

What is the Urgent Pointer?

An obsolete field that was once used to prioritize urgent data.

44
New cards

What does the SYN flag indicate?

Used to initiate a new TCP connection.

45
New cards

What does the ACK flag indicate?

Acknowledgment that data or a connection request was received.

46
New cards

What does the FIN flag indicate?

A request to close an active connection.

47
New cards

What does the RST flag do?

Resets the connection when errors occur or communication cannot continue.

48
New cards

What does the PSH flag do?

Pushes buffered data to the receiving application immediately.

49
New cards

What does the URG flag do?

Marks urgent data (now obsolete).

50
New cards

What are the four main types of TCP segments?

"SYN (start)

51
New cards

What is the TCP three-way handshake?

"A process to establish a reliable connection using SYN

52
New cards

What are the three steps of the TCP handshake?

"1. Client sends SYN

53
New cards

What does the ESTABLISHED state mean in TCP?

Both sides have acknowledged each other and can now send and receive data.

54
New cards

How does TCP ensure data is sent in order?

"Each byte has a sequence number

55
New cards

What happens if a segment is lost?

The receiver sends duplicate ACKs prompting the sender to retransmit the missing data.

56
New cards

What happens if the sender receives no ACK within the timeout period?

TCP retransmits all unacknowledged segments starting from the last ACK number.

57
New cards

What is RTT in TCP?

Round Trip Time—the time between sending a segment and receiving its acknowledgment.

58
New cards

What is RTO in TCP?

Retransmission Timeout—the maximum waiting time before assuming a packet was lost.

59
New cards

How is a TCP connection closed?

"Using a four-way handshake: FIN

60
New cards

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.

61
New cards

What happens to ports after a TCP connection closes?

They are released back to the operating system for reuse.

62
New cards

What does it mean that TCP is full-duplex?

Data can be sent and received simultaneously in both directions.

63
New cards

What is congestion control in TCP?

A mechanism allowing receivers to adjust sender speed based on network capacity.

64
New cards

What is window scaling in TCP?

A TCP option that increases the effective window size to support faster networks.

65
New cards

What is silly window syndrome?

Inefficiency caused by sending small data packets with large headers.

66
New cards

What are the main differences between TCP and UDP?

TCP is reliable and ordered with acknowledgments; UDP is fast and connectionless with no guarantees.

67
New cards

Why might you use UDP instead of TCP?

"For applications where speed matters more than reliability

68
New cards

Give examples of TCP-based applications.

"Web browsing (HTTP)

69
New cards

Give examples of UDP-based applications.

"Video streaming

70
New cards

What is QUIC?

"A modern transport layer protocol built on UDP that adds reliability

71
New cards

Why was QUIC designed on top of UDP?

"Because most routers recognize TCP and UDP

72
New cards

What are the benefits of QUIC?

Combines the speed of UDP with the reliability and security of TCP.