YEAR 13 DIGITAL TECHNOLOGY
  • Home
  • Web Design
    • Term 1 Overview
    • Level 2 JS with HTML recap
    • Level 2 CSS Recap
    • Responsive Design
    • Javascript - Non-Core Functionality
    • Learn - Photoshop
    • User Experience Principles
    • AS91903 - Media Outcome >
      • Resources
  • Programming
    • Term 2 Overview
    • Recap Level 1
    • Recap Arrays
    • Game Organiser App
    • Objects & Classes in Javascript
    • Importing Text into Javascript
  • Databases
    • Recap - Microsoft Access
    • SQL - SELECT
    • SQL - INSERT/UPDATE/DELETE
    • SQL - JOIN
    • Forms & Advanced Queries
    • Open with main menu and DELETE
    • Documentation x7
    • Extra for experts >
      • Security Lockdown
  • External
    • Network Communication Protocols >
      • Introduction
      • Encapsulation
      • Application Layer
      • HTTPS and SSL/TLS
      • Transport Layer
      • Network Layer
      • Link Layer
      • Network Optimisation
      • Traffic Analysis
    • Pre-exam info
    • (Optional) Reflection
  • Freyberg Digital

Transport Layer

The Transport layer is focused on the transmission of data. Data travels across the Internet in what we call "packets" and is generally sent using two main methods: Transmission Control Protocol (TCP), and User Datagram Protocol (UDP).

Transmission Control Protocol - TCP

TCP is the most reliable method of data transmission due to its strict handshaking processes. We use TCP for transmission of data that needs to be exactly the same after it's disassembled and re-assembled as it did at the start. Examples of when we use it: web pages, emails, monetary transactions.

A simplified overview of the process that happens to set up a TCP connection is as follows:
  1. A connection is established between the two computers that want to send data to each other using a "three-way handshake"
    1. Computer A sends a packet with the SYN bit (stands for "sychronize?") set to 1
    2. Computer B sends a packet back also with the SYN bit set to 1 and and the ACK bit (stands for "acknowledge!") set to 1
    3. Computer A sends a packet back again with the ACK bit set to 1
  2. Now that the connection is set up data can be sent. Data is sent from one computer to another, with each packet received the receiving computer sends back a packet with ACK set to 1 acknowledging that specific packet was received.
  3. Connection is closed. This can be done by either computer. The wrap up is similar to the first "three-way handshake" except with the FIN bit set to 1 in place of the SYN bit.
So the data was sent and they all lived happily ever after... Well, not quite. Throughout this process there is the inevitability of various problems like:
  • Packets going missing (packet loss)
  • Packets arriving out of order (packet delay)
  • Packet header/data being changed along the way (packet corruption)

​​In TCP all of these issues are noted and accounted for. Fortunately, because of all of the checks and balances in the process and in the "header" of the TCP packet this can be done: missing sequence data can be requested again, data that has been corrupted (according to the "checksum") can be requested again, and data can be ordered correctly. For more information on the TCP header structure you can visit this page: https://www.imperva.com/learn/ddos/tcp-transmission-control-protocol/

Once all of this has been completed we can be almost 100% certain that our data has been sent/received correctly, making TCP the best protocol to use when sending data that absolutely needs its integrity assured.
Picture
TCP Header (Credit: Khan Academy)
Tasks:
​1) Read through the Khan Academy resource on TCP. Make your own notes on the "three-way handshake" process. Maybe include some diagrams to help show the process. Memorise your notes, write them from memory.
2) Explain how TCP detects and handles lost packets.
3) Explain how TCP handles packets arriving out of order.
4) Explain how TCP detects that data has become corrupted.
5) Do this short multi-choice test at Khan academy

​
Extra reading/notes: TCP - CS Field Guide
Check sum information

User Datagram Protocol - UDP

In contrast to TCP, UDP is a far simpler process. UDP requires no handshaking of any sort, lacking handshakes at the start/end as well as all throughout the process as a receipt for packets. Because of this UDP is a whole lot faster than TCP and is good for transmission of data that needs to arrive quickly but doesn't necessarily need to be exact in terms of integrity. UDP still has a "checksum" as a part of its header so the computer receiving it can at least still determine whether the data was corrupted in some way.

UDP is a good solution for things like audio/video streaming, Teams/Zoom meetings, and online gaming as it allows for very quick transmission of data. The trade off is that when things go wrong there is no direct way to fix it and as a result we get things like audio being out of time with video, glitches in video, or character models "lagging out" and moving about crazily in games.

​Khan Academy - UDP
Picture
UDP Header (Credit: IP with Ease)
Tasks:
1) Make your own notes about UDP and how it works. 
2) Compare and contrast the processes of UDP and TCP.
3) For each of the following, determine whether it would be better to use TCP or UDP (or some combination of them both). For each give an explanation of why you think this.
  1. Sending an email
  2. Calling your grandma
  3. Sending a meme to your friend using a messaging app
  4. Online bank transactions
  5. Sending real-time telemetry data from sensors
  6. Downloading software updates from a server
  7. Online multiplayer gaming where fast response time is important
  8. Streaming live video or audio broadcasts
  9. Online shopping checkout process
  10. Online multiplayer gaming where reliability is crucial
  11. Live sports event streaming
  12. Accessing a website
Picture
< ​HTTPS AND SSL/TLS
Network Layer >
Powered by Create your own unique website with customizable templates.
  • Home
  • Web Design
    • Term 1 Overview
    • Level 2 JS with HTML recap
    • Level 2 CSS Recap
    • Responsive Design
    • Javascript - Non-Core Functionality
    • Learn - Photoshop
    • User Experience Principles
    • AS91903 - Media Outcome >
      • Resources
  • Programming
    • Term 2 Overview
    • Recap Level 1
    • Recap Arrays
    • Game Organiser App
    • Objects & Classes in Javascript
    • Importing Text into Javascript
  • Databases
    • Recap - Microsoft Access
    • SQL - SELECT
    • SQL - INSERT/UPDATE/DELETE
    • SQL - JOIN
    • Forms & Advanced Queries
    • Open with main menu and DELETE
    • Documentation x7
    • Extra for experts >
      • Security Lockdown
  • External
    • Network Communication Protocols >
      • Introduction
      • Encapsulation
      • Application Layer
      • HTTPS and SSL/TLS
      • Transport Layer
      • Network Layer
      • Link Layer
      • Network Optimisation
      • Traffic Analysis
    • Pre-exam info
    • (Optional) Reflection
  • Freyberg Digital