Week 6 Topic 4: Layer 4 protocols

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson
Download our mobile app to listen on the go
Get App

Questions and Answers

Which layer of the OSI model is responsible for providing reliable data transfer services between end users?

  • Session Layer
  • Transport Layer (correct)
  • Data Link Layer
  • Network Layer

What is the primary function of multiplexing in the context of Layer 4 protocols?

  • Detecting and correcting errors in transmitted data.
  • Allowing multiple applications to use the same IP address simultaneously. (correct)
  • Controlling the speed at which packets are sent to prevent overwhelming the receiver.
  • Ensuring data packets arrive in the correct order.

Which of these protocols is connection-oriented and requires a three-way handshake to establish a connection?

  • UDP
  • IP
  • DNS
  • TCP (correct)

What is the purpose of sequence numbers in TCP?

<p>To identify lost packets and reassemble packets that arrive out of order. (B)</p> Signup and view all the answers

Which of the following is NOT an advantage of using TCP over UDP?

<p>Lower overhead and faster data transmission in certain scenarios. (A)</p> Signup and view all the answers

Which of these protocols relies on TCP for reliable data transfer?

<p>HTTP (B)</p> Signup and view all the answers

During the TCP handshake, what is the purpose of the SYN-ACK packet?

<p>To acknowledge the receipt of the initial SYN packet and initiate the receiver's sequence number. (A)</p> Signup and view all the answers

Which protocol is more suitable for applications that require low latency and can tolerate occasional packet loss?

<p>UDP (C)</p> Signup and view all the answers

Which of the following is a characteristic of UDP that differs from TCP?

<p>It does not provide retransmission of lost packets. (D)</p> Signup and view all the answers

Why is the sequence numbering in TCP considered a security feature?

<p>It makes it more difficult to forge TCP packets. (C)</p> Signup and view all the answers

Which of these protocols is commonly used for broadcasting messages to all devices on a network?

<p>UDP (B)</p> Signup and view all the answers

Considering its reliability features, in what scenario would TCP be preferred over UDP?

<p>File transfer where data integrity is paramount. (A)</p> Signup and view all the answers

Which of the following best describes the role of port numbers in Layer 4 protocols?

<p>To identify the specific application or service on a host. (B)</p> Signup and view all the answers

What is the main purpose of the ACK packet in the TCP three-way handshake?

<p>To acknowledge that the connection has been established. (A)</p> Signup and view all the answers

Which of the following protocols uses UDP?

<p>DNS (A)</p> Signup and view all the answers

Which aspect of TCP helps prevent a fast sender from overwhelming a slow receiver?

<p>Flow Control (C)</p> Signup and view all the answers

In what situation would using UDP be more advantageous than using TCP?

<p>Streaming a live video feed. (D)</p> Signup and view all the answers

What potential issue arises from UDP's lack of inherent reliability mechanisms?

<p>Application's increased responsibility for error handling. (B)</p> Signup and view all the answers

Which of the following is a primary advantage of TCP's connection-oriented nature?

<p>The ability to establish a reliable and ordered communication channel. (C)</p> Signup and view all the answers

If a host sends a SYN packet with sequence number 1000, what might the sequence number be in the SYN-ACK packet from the recipient?

<p>A completely different, randomly generated number to initiate its own sequence. (C)</p> Signup and view all the answers

Flashcards

What is Layer 4 responsible for?

The transport layer (Layer 4) transfers data between end-users, providing reliable data transfer services. It handles reliability, flow control, and multiplexing.

What does TCP provide?

TCP uses port numbers for multiple applications on a single IP, enhances reliability by assigning sequence numbers to packets for reordering and retransmission, and includes checksums for error detection.

What is a TCP handshake?

A process used by TCP to synchronize sequence numbers, involving SYN, SYN-ACK, and ACK packets to establish a connection before data transfer.

What happens during the SYN step?

The sender initiates the connection by sending a SYN packet which contains the port information and the senders starting sequence number.

Signup and view all the flashcards

What happens during the SYN-ACK step?

The receiver responds to a SYN by sending a SYN-ACK packet with its own sequence number.

Signup and view all the flashcards

What happens during the ACK step?

The sender sends an ACK packet back to the receiver to acknowledge the connection, indicating that data transfer can begin.

Signup and view all the flashcards

What does UDP provide?

UDP uses port numbers, but it's unreliable. Packets may be lost, duplicated, or arrive out of order. Lacks error detection and flow control.

Signup and view all the flashcards

Can you broadcast with UDP?

UDP packets can be sent to the broadcast address, reaching all devices on the network. TCP connections are point-to-point only.

Signup and view all the flashcards

What are some popular TCP protocols?

HTTP (port 80), HTTPS (port 443), FTP (port 21), SMTP (port 25), POP3 (port 110), and SSH (port 22).

Signup and view all the flashcards

What are some popular UDP protocols?

DNS (port 53), DHCP (ports 67 and 68), OpenVPN (port 1194), and VOIP.

Signup and view all the flashcards

Study Notes

  • Layer 4, the transport layer, facilitates data transfer between end-users and offers reliable data transfer to upper layers.
  • Layer 4 handles reliability, ensuring packets arrive in the correct order.
  • Layer 4 manages flow control, preventing packets from being sent too quickly.
  • Layer 4 handles multiplexing, enabling multiple applications to run on the same IP address, each using a unique port number (up to 65,000 ports per IP address).
  • Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) are the two most well-known Layer 4 protocols.
  • UDP and TCP packets reside within IP packets which reside within the link frame data.

Transmission Control Protocol (TCP)

  • TCP uses port numbers so multiple applications can share a single IP address.
  • TCP improves the reliability of IP packets by assigning sequence numbers.
  • Sequence numbers help TCP identify missing packets for retransmission.
  • Sequence numbers lets TCP reassemble packets that arrive out of order.
  • TCP functions with a defined beginning and end, similar to a phone call.
  • TCP provides reliability by retransmitting lost packets.
  • TCP offers reordering to correct out-of-order packets.
  • TCP includes flow control to prevent overwhelming the receiver, adjusting the transmission speed as needed.
  • TCP performs error detection via checksums on all segments.
  • TCP sequence numbering enhances security, making it difficult to forge a TCP packet.
  • TCP is connection-oriented, requiring a three-way handshake to establish each connection.
  • TCP operations are managed at the OS level, simplifying application development.
  • HTTP (port 80), HTTPS (port 443), FTP (port 21), SMTP (port 25), POP3 (port 110), and SSH (port 22) are several protocols based on TCP.

TCP Handshake

  • TCP uses sequence numbers and acknowledgment numbers.
  • When a segment is received, the receiver sends an acknowledgment back to the sender.
  • Acknowledgments confirm that the receiver received segment number xxxxx.
  • Sequence numbers are 32-bit numbers that enhance system security.
  • TCP uses a three-way handshake to synchronize sequence numbers:
    • SYN: The sender sends a SYN packet with port information and its starting sequence number to begin the connection.
    • SYN-ACK: The receiver responds with a SYN-ACK packet containing its own sequence number.
    • ACK: The sender sends an ACK packet to confirm the connection.

User Datagram Protocol (UDP)

  • Like TCP, UDP uses port numbers.
  • UDP is unreliable, packets are not automatically resent if lost.
  • UDP lacks sequence numbers, making it easier to send fake packets.
  • UDP doesn't have flow control or packet reordering mechanisms.
  • UDP is suitable for small requests needing low latency.
  • Using UDP is like sending a package without a tracking number, relying on its arrival without confirmation.
  • UDP supports broadcasting to all devices on a network, using the network's broadcast address.
  • TCP connections are limited to two hosts, unlike UDP which can broadcast.
  • DNS (port 53), DHCP (ports 67 and 68), OpenVPN (port 1194), and VOIP are some common protocols based on UDP.
  • Most multiplayer games use UDP, and may implement custom schemes for resending lost packets.

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

More Like This

Use Quizgecko on...
Browser
Browser