TCP, UDP, OSI Model, and NAT

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 of the following is true about the IP protocol?

  • It provides addressing for devices to communicate on a network. (correct)
  • It ensures reliable communication between devices.
  • It provides information about the application the packet is intended for.
  • It works in both single and dual way.

What is the primary function of Network Address Translation (NAT)?

  • To convert IP addresses between networks enabling communication. (correct)
  • To ensure every device has a unique public IP address.
  • To prevent communication between networks.
  • To block unwanted network traffic.

Which type of NAT assigns the same public IP address to multiple private devices?

  • VPN-NAT
  • Dynamic NAT
  • Static NAT
  • PAT-NAT (correct)

In the context of network communication, what is the primary purpose of TCP?

<p>To establish a reliable connection between two applications on different devices. (D)</p> Signup and view all the answers

Why is it necessary to combine IP with another protocol like TCP?

<p>IP does not specify which application the packet is intended for. (C)</p> Signup and view all the answers

What process describes the layering of protocols where data from one protocol is included within another?

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

What is the role of 'virtual ports' in TCP communication?

<p>They serve as identifiers for applications on a device. (B)</p> Signup and view all the answers

Which of the following is a primary characteristic of TCP packets?

<p>They are included into IP packets for routing. (B)</p> Signup and view all the answers

What is the purpose of the 'three-way handshake' in TCP?

<p>To establish a connection between two devices before data transfer. (B)</p> Signup and view all the answers

What is the significance of sequence and acknowledgment numbers in TCP data transfer?

<p>To ensure reliable delivery of packets in the correct order. (A)</p> Signup and view all the answers

Which of the following best describes the 'four-way handshake' in TCP?

<p>The procedure for terminating a TCP connection. (B)</p> Signup and view all the answers

What is the key difference between TCP and UDP in terms of reliability?

<p>TCP ensures reliable data transfer, while UDP does not guarantee delivery. (A)</p> Signup and view all the answers

For which of the following applications would UDP be more suitable than TCP?

<p>Online video games. (C)</p> Signup and view all the answers

What is a primary characteristic of UDP regarding connection management?

<p>UDP does not control the connection. (C)</p> Signup and view all the answers

Which of the following best describes the use case for TCP?

<p>Applications where reliability and correct order of data are essential. (D)</p> Signup and view all the answers

Which field is included in the UDP header?

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

Which of the following is the best description of the OSI model?

<p>A conceptual model standardizing communication functions of a computing system. (B)</p> Signup and view all the answers

What does the OSI model primarily aim to do?

<p>Standardize the different abstraction layers required for enabling communication between devices over a network. (D)</p> Signup and view all the answers

In the OSI model, what is the process of 'encapsulation'?

<p>Adding headers and trailers to data as it moves down the layers. (D)</p> Signup and view all the answers

Which layer of the OSI model is responsible for physical addressing (MAC addressing)?

<p>Data-Link Layer (D)</p> Signup and view all the answers

Which OSI layer handles network addressing, determining the path for data transmission??

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

What task is performed by the transport layer?

<p>Connection and data control. (D)</p> Signup and view all the answers

What does the Application layer of the OSI model deal with?

<p>Data from the application (D)</p> Signup and view all the answers

Which OSI layer is responsible for encoding of applicative data?

<p>Presentation (D)</p> Signup and view all the answers

Which OSI layer is responsible for communication and session control?

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

What type of transmission does the physical layer perform?

<p>Binary, digital or Analog (B)</p> Signup and view all the answers

What would be an example of the data link layer

<p>Ethernet/XDSL, LoRa (B)</p> Signup and view all the answers

What is an example of the transport layer?

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

What is an example of the application layer

<p>HTML, XML, JSON (C)</p> Signup and view all the answers

Which example belongs to the Session layer?

<p>HTTP/HTTPS, MQTT (C)</p> Signup and view all the answers

What does static NAT do?

<p>A private device always gets the same unique public IP on the Internet (B)</p> Signup and view all the answers

What is a use-case for UDP?

<p>When you need to send data super fast (B)</p> Signup and view all the answers

Flashcards

IP protocol

A protocol used to make devices able to communicate on a network or the internet.

Network Address Translation (NAT)

Allows communication between two networks by converting IPs between those.

Static NAT

A private device always gets the same unique public IP on the internet.

Dynamic NAT

The router has a pool of available public IPs for its private devices.

Signup and view all the flashcards

PAT-NAT

All private devices share the same public IP.

Signup and view all the flashcards

Transmission Control Protocol (TCP)

An extension of the IP protocol, establishing a connection between two applications running on two different devices using virtual ports.

Signup and view all the flashcards

Encapsulation

The process of including data of one protocol into another, like putting TCP or UDP inside IP.

Signup and view all the flashcards

Three-way handshake

A connection establishment requiring both devices to follow a pattern.

Signup and view all the flashcards

Sequence numbers

Used in order to guarantee the arrival order of packets during data transfer.

Signup and view all the flashcards

Checksum

Used to detect errors during data transfer.

Signup and view all the flashcards

Acknowledgement number

Used to detect lost or late data segments, ensuring reliability.

Signup and view all the flashcards

Four-way handshake

The termination of a TCP connection using a four-way handshake, independently managed by both ends.

Signup and view all the flashcards

UDP protocol

Alternative to TCP, allowing simple data transfers with no high reliability needed.

Signup and view all the flashcards

OSI Model

A conceptual model that characterizes and standardizes the different abstraction layers required for enabling communication between devices over a network.

Signup and view all the flashcards

Application Layer

The data from the application, without specific network service.

Signup and view all the flashcards

Presentation Layer

Handles the encoding of applicative data.

Signup and view all the flashcards

Session Layer

Manages communication and sessions control.

Signup and view all the flashcards

Transport Layer

Manages connection and data control (TCP/UDP).

Signup and view all the flashcards

Network Layer

Handles network addressing and determines the path in a network, like IP and LoraWAN.

Signup and view all the flashcards

Data-Link Layer

Handles physical addressing (using MAC address) device to device.

Signup and view all the flashcards

Physical Layer

Involves binary transmission, digital or analog, using RJ45 cables, optical fiber, WiFi waves, etc.

Signup and view all the flashcards

Study Notes

  • Lecture 4 focuses on TCP, UDP, and the OSI model within the context of Network Architecture.

IP Protocol

  • The IP protocol facilitates device communication on private networks or the internet.
  • It operates in a single-way communication manner.
  • The IP protocol relies on IP addressing and IP datagrams.

NAT and NAT-PAT

  • Network Address Translation enables communication between networks.
  • NAT achieves this by converting IP addresses across those networks.
  • There are three types of NAT: Static, Dynamic, and PAT-NAT.
  • Static NAT assigns a unique public IP to a private device on the internet.
  • Dynamic NAT involves a router using a pool of public IPs for private devices.
  • PAT-NAT (Port Address Translation) allows multiple private devices to share a single public IP.

Today's Problematic: Application Identification

  • A key challenge is determining which application an IP packet is intended for.

TCP Protocol

  • The IP protocol only provides an address and does not identify the intended application for a packet.
  • Combining the IP protocol with other protocols becomes necessary to solve the problem of application identification for IP Packets.
  • The diagram shows packets with MAC, IP, and TCP addresses

Encapsulation Overview

  • Frame Header encapsulates IP Header, TCP or UDP Header, HTTP/HTTPS Header, HTML Header.

TCP (Transmission Control Protocol)

  • TCP is an extension of the IP protocol, often discussed as TCP/IP.
  • It establishes connections between two applications running on different devices.
  • TCP uses virtual ports for application identification.
  • TCP packets are incorporated into IP packets.
  • TCP necessitates multiple routings to create a connection, with each routing processed by IP.

TCP Packet Datagram

  • Header size: 20 bytes, encompassing source and destination ports (16 bits each).
  • Sequence and acknowledgment numbers are 32 bits each.
  • Furthermore, there are settings for header length (4 bits), reserved bits (3 bits), and flags (9 bits).

TCP/IP Packet Datagram

  • Contains IP Header (96 bits), Source IP and Destination IP (32 bits each.)
  • It also includes IP Options (32 bits), Source Port and Destination Port (16 bits each).
  • TCP Header (128 bits).

TCP/IP Protocol: Connection Establishment

  • TCP enables connection between devices.
  • Both devices must follow a "three-way handshake" pattern.
  • The handshake serves the purposes of confirming readiness to transfer data and prevents hijacking.
  • The process involves agreeing on an initial sequence number and incrementing it with each data transfer.

TCP/IP Protocol: Three-Way Handshake

  • Client sends SYN to the Server for Synchronization
  • Server responds with SYN + ACK for Synchronization with Acknowledgement
  • Client responds with ACK for Acknowledgement

TCP/IP Protocol: Data Transfer

  • During Transfer: TCP uses sequence and acknowledgement numbers to confirm the reliability of its connection.
  • Sequence numbers guarantee the arrival order of packets.
  • Checksums detect errors.
  • Acknowledgement numbers identify lost or late data segments.
  • With TCP, assurance that its packets have been well received is guaranteed through acknowledgement.

TCP/IP Protocol: Data Transfer Diagram

  • Client sends Data to Server; Server then sends Acknowledgement to Client.

TCP/IP Protocol: End of Connection

  • Termination of a TCP connection uses a "four-way handshake".
  • Both ends of the connection can independently manage the termination process.
  • The end of connection involves a Four-way handshake of FIN and ACK signals.

UDP (User Datagram Protocol)

  • UDP provides an alternative to TCP and UDP allows for data transfers without high reliability.

UDPs Problematic

  • TCP is great for connection's reliability, but it imposes a heavy protocol for it and packet's order arrival.
  • Sometime, speed over reliability and packet's order is wanted, mostly for real time services.
  • For example, a direct visio conference (Skype, Teams...) or online video games, prefers a small data packet lost instead of blocking the flux while waiting for the packet to reach destination.

UDP Protocol Defined

  • Alternative to TCP.
  • UDP uses ports, but it doesn't control connection.
  • Mostly used to send small amounts of data quickly, where the arrival order is not mandatory.
  • Examples for usage: video streaming, video-games, music streaming, realtime information, DNS...etc.

UDP Datagram

  • Header: 8 bytes includes 16 bits for source and destination ports.
  • Total length and checksum also take 16 bits each.
  • The datagram accommodates a max of 65,508 bytes including the header.

UDP/IP Datagram

  • Contains IP Header (96 bits), Source IP and Destination IP (32 bits each.)
  • IP Options (32 bits), Source Port and Destination Port (16 bits each).
  • UDP Header (32 bits), and Data (Max. 65 505 bytes).

OSI Model

  • The Open Systems Interconnection model is a conceptual model that is used to standardize the layers
  • The OSI layers are required for enabling communication between devices over a network.
  • Layers from top to bottom: Upper Layers, Transport Layer, Network Layer, Data Link Layer, Physical Layer

Encapsulation in OSI Model

  • Encapsulation includes data from a protocol into another one

OSI Model Layers

  • Application: Data from the application. no specific network service, example: applicative data
  • Presentation: Encoding of applicative data, example: HTML, XML, JSON
  • Session: Communication and sessions control, example: HTTP/HTTPS, MQTT
  • Transport: Connection and data control, example: TCP/UDP
  • Network: Network addressing, determines the path in a network, example: IP, LoraWAN
  • Data-Link: Physical addressing (using MAC address) device to device, example: Ethernet/xDSL, LoRa
  • Physical Layer: Binary transmission, digital or analog, example: RJ45 cables, optical fiber, WiFi waves, LoRa waves...etc.

Studying That Suits You

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

Quiz Team

Related Documents

More Like This

Use Quizgecko on...
Browser
Browser