1. Home
  2. Explore
  3. Computer Science
  4. TCP vs UDP

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

TCP vs UDP

  • 51Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Layer 4 Basics
Layer 4 provides
transfer of data between end hosts.

51 questions

  1. 1
    Layer 4 provides
    _____
    transfer of data between end hosts.
    Hint

    Think of the Layer's purpose: it delivers data unchanged, hiding network details.

    Answer

    transparent

  2. 2
    The addresses used at Layer 4 are called
    _____
    .
    Hint

    These are numeric identifiers, distinct from physical interfaces.

    Answer

    port numbers

  3. 3
    Port numbers identify the
    _____
    layer protocol being used.
    Hint

    Think of the layer above Layer 4 in the OSI model.

    Answer

    Application

  4. 4
    The process of using port numbers to manage multiple simultaneous communication sessions is called
    _____
    .
    Hint

    It allows a host to handle several data streams concurrently.

    Answer

    session multiplexing

  5. 5
    IANA defines well-known port numbers in the range 0 to
    _____
    .
    Hint

    These ports are strictly regulated and used by major protocols.

    Answer

    1023

  6. 6
    IANA defines registered port numbers in the range 1024 to
    _____
    .
    Hint

    These require registration but are less strictly controlled.

    Answer

    49151

  7. 7
    IANA defines ephemeral (private/dynamic) port numbers in the range 49152 to
    _____
    .
    Hint

    Hosts typically use this range for randomly chosen source ports.

    Answer

    65535

  8. 8
    Hosts randomly select source port numbers from the
    _____
    range.
    Hint

    This range is also called private or dynamic.

    Answer

    ephemeral

  9. 9
    The total number of available port numbers (0–65535) is 2 to the power of
    _____
    .
    Hint

    Each port field in the TCP/UDP header is 16 bits.

    Answer

    16

  10. 10
    The Layer 4 PDU for TCP is called a
    _____
    .
    Hint

    Just as a Layer 3 PDU is a packet and Layer 2 is a frame.

    Answer

    segment

  11. 11
    TCP is a
    _____
    protocol, meaning it establishes a connection before sending data.
    Hint

    It uses a handshake to set up the connection.

    Answer

    connection-oriented

  12. 12
    TCP provides reliable communication through
    _____
    and retransmission.
    Hint

    The receiver confirms receipt of data.

    Answer

    acknowledgments

  13. 13
    TCP uses
    _____
    numbers to sequence segments and allow out-of-order reassembly.
    Hint

    These numbers are in the TCP header.

    Answer

    sequence

  14. 14
    TCP provides
    _____
    control using the Window Size field to prevent overwhelming the receiver.
    Hint

    It regulates the data transmission rate.

    Answer

    flow

  15. 15
    The process to establish a TCP connection is called the
    _____
    handshake.
    Hint

    It involves three message exchanges.

    Answer

    three-way

  16. 16
    The first step of the TCP three-way handshake involves sending a segment with the
    _____
    flag set.
    Hint

    This flag synchronizes sequence numbers.

    Answer

    SYN

  17. 17
    The second step of the TCP three-way handshake involves sending a segment with the SYN and
    _____
    flags set.
    Hint

    This flag acknowledges receipt of the SYN.

    Answer

    ACK

  18. 18
    The third step of the TCP three-way handshake involves sending a segment with the
    _____
    flag set.
    Hint

    This finalizes the connection.

    Answer

    ACK

  19. 19
    The process to terminate a TCP connection is sometimes called the
    _____
    handshake.
    Hint

    It involves four message exchanges.

    Answer

    four-way

  20. 20
    In TCP, the acknowledgment number indicates the next expected
    _____
    number.
    Hint

    This is part of forward acknowledgment.

    Answer

    sequence

  21. 21
    TCP uses
    _____
    acknowledgment, where the ack number is the next expected sequence number.
    Hint

    It looks ahead rather than confirming the last received.

    Answer

    forward

  22. 22
    If a TCP segment is not acknowledged, the sender will
    _____
    it.
    Hint

    This ensures reliability.

    Answer

    retransmit

  23. 23
    The TCP header field that controls how much data can be sent before an acknowledgment is required is the
    _____
    field.
    Hint

    This field enables flow control.

    Answer

    window size

  24. 24
    TCP dynamically adjusts the window size using a mechanism called the
    _____
    window.
    Hint

    It moves as data is acknowledged.

    Answer

    sliding

  25. 25
    The TCP header fields for source and destination port are each
    _____
    bits long.
    Hint

    This determines the total number of available ports.

    Answer

    16

  26. 26
    In the TCP header, the flags used to establish a connection are SYN and
    _____
    .
    Hint

    Both flags are set in the second handshake step.

    Answer

    ACK

  27. 27
    UDP is a
    _____
    protocol; it does not establish a connection before sending data.
    Hint

    It sends data immediately without setup.

    Answer

    connectionless

  28. 28
    UDP provides
    _____
    communication; it does not guarantee delivery.
    Hint

    It makes an effort but no promises.

    Answer

    best-effort

  29. 29
    UDP does not provide
    _____
    for lost segments.
    Hint

    Once data is sent, it's not resent automatically.

    Answer

    retransmission

  30. 30
    UDP does not provide
    _____
    of segments if they arrive out of order.
    Hint

    It has no sequence numbers.

    Answer

    sequencing

  31. 31
    UDP does not provide
    _____
    control; it has no mechanism to adjust data flow.
    Hint

    It does not use windowing.

    Answer

    flow

  32. 32
    The UDP header contains four fields: source port, destination port, length, and
    _____
    .
    Hint

    This field checks for errors.

    Answer

    checksum

  33. 33
    FTP uses TCP ports 20 and
    _____
    .
    Hint

    One port is for data, the other for control.

    Answer

    21

  34. 34
    SSH uses TCP port
    _____
    .
    Hint

    This port is used for secure remote CLI access.

    Answer

    22

  35. 35
    Telnet uses TCP port
    _____
    .
    Hint

    An older, unencrypted remote access protocol.

    Answer

    23

  36. 36
    SMTP uses TCP port
    _____
    .
    Hint

    This protocol is used for sending email.

    Answer

    25

  37. 37
    HTTP uses TCP port
    _____
    .
    Hint

    This is the standard port for web traffic.

    Answer

    80

  38. 38
    POP3 uses TCP port
    _____
    .
    Hint

    This protocol retrieves email from a server.

    Answer

    110

  39. 39
    HTTPS uses TCP port
    _____
    .
    Hint

    The secure version of HTTP.

    Answer

    443

  40. 40
    DHCP uses UDP ports 67 and
    _____
    .
    Hint

    One port is for the server, the other for the client.

    Answer

    68

  41. 41
    TFTP uses UDP port
    _____
    .
    Hint

    A simpler file transfer protocol than FTP.

    Answer

    69

  42. 42
    SNMP uses UDP ports 161 and
    _____
    .
    Hint

    One port is for queries, the other for traps.

    Answer

    162

  43. 43
    Syslog uses UDP port
    _____
    .
    Hint

    This port is used for system logging messages.

    Answer

    514

  44. 44
    DNS typically uses UDP, but can use
    _____
    in some situations (e.g., zone transfers).
    Hint

    This protocol provides connection-oriented service.

    Answer

    TCP

  45. 45
    The File Transfer Protocol (FTP) uses the
    _____
    protocol at the transport layer.
    Hint

    FTP requires reliable delivery.

    Answer

    TCP

  46. 46
    The Simple Mail Transfer Protocol (SMTP) uses
    _____
    at the transport layer.
    Hint

    Email delivery requires reliability.

    Answer

    TCP

  47. 47
    The Trivial File Transfer Protocol (TFTP) uses
    _____
    at the transport layer.
    Hint

    It is simpler and does not guarantee delivery.

    Answer

    UDP

  48. 48
    The Domain Name System (DNS) typically uses
    _____
    at the transport layer.
    Hint

    It's efficient for small queries.

    Answer

    UDP

  49. 49
    TCP is preferred for applications that require
    _____
    communication, such as file downloads.
    Hint

    It ensures data arrives complete and in order.

    Answer

    reliable

  50. 50
    UDP is preferred for
    _____
    -sensitive applications such as voice and video.
    Hint

    These applications cannot tolerate retransmission delays.

    Answer

    delay

  51. 51
    TFTP uses UDP but provides
    _____
    within the application itself.
    Hint

    It simulates TCP-like features at a higher layer.

    Answer

    reliability

1 of 51
Question 1 of 51

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent