Networks: Unit 7 - TCP and UDP

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/65

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.

66 Terms

1
New cards

What is the main purpose of the transport layer?

To provide logical communication between processes running on different hosts.

2
New cards

What does 'logical communication' mean in the transport layer?

Applications behave as if hosts are directly connected even though the network may be complex.

3
New cards

Where is the transport layer implemented?

In end systems (hosts), not in network routers.

4
New cards

What is a transport segment?

Application data plus a transport layer header.

5
New cards

What are the two main Internet transport protocols?

TCP and UDP.

6
New cards

What are key characteristics of TCP?

Reliable, connection-oriented, flow-controlled, and congestion-controlled.

7
New cards

What are key characteristics of UDP?

Unreliable and connectionless.

8
New cards

What services are NOT provided by the transport layer?

Delay guarantees and bandwidth guarantees.

9
New cards

What is multiplexing?

Combining data from multiple processes and attaching headers before sending.

10
New cards

What is demultiplexing?

Delivering received segments to the correct application socket using header information.

11
New cards

How is a TCP socket identified?

By a four-tuple: source IP, source port, destination IP, destination port.

12
New cards

How is a UDP socket identified?

By destination IP and destination port only.

13
New cards

Why do some applications prefer UDP?

It has lower delay, no handshake, and low overhead.

14
New cards

Give examples of applications that use TCP.

HTTP, FTP, SMTP, Telnet.

15
New cards

Give examples of applications that use UDP.

DNS, VoIP, streaming, SNMP.

16
New cards

What is the purpose of the UDP checksum?

Basic error detection.

17
New cards

What is the goal of reliable data transfer (rdt)?

To deliver data without loss, corruption, or reordering.

18
New cards

What is an ACK?

Acknowledgment that a packet was received correctly.

19
New cards

What is a NAK?

A signal indicating a packet was received with errors.

20
New cards

How does the receiver handle duplicate packets?

Discards duplicates and resends ACK.

21
New cards

What is a limitation of stop-and-wait protocols?

Only one packet can be in flight → low utilization.

22
New cards

What is pipelining?

Sending multiple packets without waiting for ACKs.

23
New cards

Why is pipelining beneficial?

Greatly increases throughput.

24
New cards

What are the two pipelined protocols?

Go-Back-N (GBN) and Selective Repeat (SR).

25
New cards

What is the window size in pipelined protocols?

Number of unacknowledged packets allowed in flight.

26
New cards

Why do pipelining protocols need larger sequence numbers?

To uniquely identify all packets in flight.

27
New cards

How does the Go-Back-N (GBN) receiver handle out-of-order packets?

Discards them and sends cumulative ACK.

28
New cards

When does Go-Back-N (GBN) retransmit packets?

When the oldest unacknowledged packet times out.

29
New cards

How does the Selective Repeat (SR)receiver handle out-of-order packets?

Buffers them and ACKs individually.

30
New cards

What is a benefit of Selective Repeat (SR) over Go-Back-N (GBN) ?

Only erroneous packets are resent, conserving bandwidth.

31
New cards

What type of service does TCP provide?

Reliable, full-duplex byte-stream service.

32
New cards

What is Maximum Segment Size (MSS) in TCP?

Maximum Segment Size—max data bytes in a TCP segment.

33
New cards

What does a TCP sequence number represent?

The byte number of the first byte in the segment.

34
New cards

What does a TCP acknowledgment number represent?

The next byte expected by the receiver.

35
New cards

When is the TCP ACK flag set?

In all segments except the initial SYN.

36
New cards

What are common TCP header fields?

Ports, sequence number, acknowledgment number, flags, window, checksum, options.

37
New cards

What are the TCP control flags?

SYN, ACK, FIN, RST, URG, PSH.

38
New cards

What is the TCP three-way handshake used for?

Establishing a connection and agreeing on sequence numbers.

39
New cards

What happens in the first step of the three-way handshake?

Client sends SYN with its initial sequence number.

40
New cards

What happens in the second handshake step?

Server responds with SYN-ACK.

41
New cards

What happens in the final handshake step?

Client sends ACK confirming the connection.

42
New cards

What does 'full duplex' mean in TCP?

Data can flow simultaneously in both directions.

43
New cards

What is flow control in TCP?

Prevents sender from overwhelming the receiver.

44
New cards

What does the TCP receiver window represent?

The number of bytes the receiver is willing to accept.

45
New cards

What is the purpose of the urgent pointer?

Indicates the location of urgent data in the segment.

46
New cards

Why does TCP include a checksum?

For error detection.

47
New cards

What is network congestion?

Too much sending too fast for the network to handle.

48
New cards

What are signs of congestion?

Packet loss and long queueing delays.

49
New cards

What does AIMD stand for?

Additive Increase, Multiplicative Decrease.

50
New cards

How does additive increase work?

cwnd grows by 1 MSS per RTT.

51
New cards

How does additive increase work?

cwnd grows by 1 MSS per RTT.

52
New cards

How does multiplicative decrease work?

cwnd is halved after packet loss.

53
New cards

What is the congestion window (cwnd)?

Controls how much data TCP can have in flight.

54
New cards

What is slow start used for?

Quickly ramping up the sending rate at the beginning of a connection.

55
New cards

What is the initial cwnd in slow start?

1 MSS.

56
New cards

When does slow start end?

When cwnd reaches threshold or a loss occurs.

57
New cards

What indicates packet loss to TCP?

Timeout or 3 duplicate ACKs.

58
New cards

How is a TCP connection closed?

Using a four-segment FIN/ACK exchange.

59
New cards

What port does Telnet use?

TCP port 23.

60
New cards

What port does HTTP use?

TCP port 80.

61
New cards

What port does DNS use?

UDP port 53.

62
New cards

What is the main difference between TCP and UDP?

TCP is reliable and connection-oriented; UDP is unreliable and connectionless.

63
New cards

Why is buffering required in pipelined protocols?

Multiple packets are in flight and must be tracked.

64
New cards

Why does UDP not use congestion control?

It is designed for real-time applications requiring steady transmission.

65
New cards

What ensures ordered delivery in TCP?

Sequence numbers and acknowledgment flow.

66
New cards

Why is the ACK number critical in TCP?

It ensures reliable and in-order byte delivery.