Computer Science
Beginner
80 mins
Teacher/Student led
What you need:
Chromebook/Laptop/PC

Network Protocols and Infrastructure

In this lesson, you'll explore the essentials of network protocols and infrastructure. Learn about HTTP, TCP/IP, and VOIP, understand the client-server model, packet transmission, and sockets, and engage in a discussion on network security challenges.
Learning Goals Learning Outcomes Teacher Notes

Live Class Feed

This is a live feed of the latest activity by your students on this lesson. It will update in real-time as they work on the lesson.
Load previous activity

    1 - Introduction

    In this lesson, you will explore network protocols and infrastructure, key concepts in computer networking. You will learn about protocols such as HTTP, TCP/IP, and VOIP, the client-server model, packet transmission, and sockets. The lesson includes a discussion activity on network security. This maps to Leaving Certificate Computer Science curriculum outcomes on understanding network communication, data transmission, and security implications.

    By the end of this lesson, you will be able to:

    • Explain key network protocols and their roles.
    • Describe the client-server model and packet transmission.
    • Understand sockets and their function in networking.
    • Discuss security considerations in network infrastructure.

    2 - Understanding Network Protocols

    Network protocols are sets of rules that allow devices to communicate over a network. They ensure data is sent and received correctly, much like traffic rules on a road. Without these protocols, devices would not be able to understand or process the information being exchanged, leading to potential communication breakdowns. Let's explore some key protocols in more detail:

    HTTP (HyperText Transfer Protocol):
    This protocol is used for transferring web pages over the internet. When you visit a website, your browser uses HTTP to request and receive data from a server. It's the foundation of web browsing, operating on a request-response model where the client asks for specific resources, and the server provides them.

    TCP/IP (Transmission Control Protocol/Internet Protocol):
    TCP/IP is the core protocol suite for the internet. TCP ensures reliable data delivery by breaking data into packets, reassembling them at the destination, and handling any errors or lost packets through retransmission. IP, on the other hand, handles addressing and routing to make sure packets reach the correct destination across networks.

    VOIP (Voice Over Internet Protocol):
    VOIP enables voice communication over the internet, like in apps such as Skype or Zoom. It converts voice signals into digital packets for transmission, allowing real-time calls without traditional phone lines, and often includes features for video and text as well.

    These protocols work together to enable seamless communication. For example, a video call might use VOIP for audio, TCP/IP for reliable delivery, and HTTP for any web-based interface.

    3 - HTTP

    HTTP, or HyperText Transfer Protocol, is a fundamental protocol used for communication on the World Wide Web. It defines how messages are formatted and transmitted, and what actions web servers and browsers should take in response to various commands. As a stateless protocol, HTTP treats each request independently, without retaining information about previous interactions.

    HTTP operates on a request-response cycle. When you enter a URL in your browser, it sends an HTTP request to the server hosting the website. This request includes methods like GET (to retrieve data), POST (to send data), PUT (to update data), or DELETE (to remove data). The server processes the request and sends back a response, which includes a status code (such as 200 for success or 404 for not found), headers with metadata, and the actual content, like HTML for a webpage.

    Key Components of HTTP:

    • URL (Uniform Resource Locator): Specifies the address of the resource, including the protocol (http://), domain (www.test.com), and path (/AboutUs.html).
    • Headers: Provide additional information, such as content type, cookies for session management, or caching instructions.
    • Body: Contains the data being sent or received, like form submissions or JSON data in APIs.

    HTTP has evolved; the latest version, HTTP/2, improves performance with features like multiplexing (handling multiple requests over a single connection) and header compression. However, for security, HTTPS (HTTP Secure) is preferred, which adds encryption using SSL/TLS to protect data in transit.

    Example: Loading a news website: Your browser sends a GET request to the server's IP address on port 80 (or 443 for HTTPS). The server responds with the page's HTML, CSS, and images.
    Activity: Open your web browser (such as Chrome or Firefox) and access the developer tools by pressing F12, or right-click on a webpage and select 'Inspect'. Go to the 'Network' tab. Then, refresh the current page. Observe the HTTP requests and responses listed there. Look for details such as the request method (e.g., GET), the status code (e.g., 200 OK), headers, and the response body. Note any differences if the site uses HTTPS. 

    4 - TCP/IP

    TCP/IP, or Transmission Control Protocol/Internet Protocol, is the foundational protocol suite that powers the internet and most modern networks. It defines how data is exchanged over networks by providing end-to-end communication, ensuring reliable delivery, and handling the routing of data packets. TCP/IP is not a single protocol but a set of protocols working together in layers, often referred to as the TCP/IP model, which includes layers like the network interface, internet, transport, and application layers.

    TCP/IP operates by breaking down data into packets at the source, addressing them with IP for routing across networks, and using TCP to ensure they are delivered reliably and in the correct order at the destination. IP is connectionless and handles the addressing and forwarding of packets, while TCP is connection-oriented, establishing a virtual connection, sequencing packets, and retransmitting any that are lost or corrupted. This combination allows for robust, error-free communication even over unreliable networks.

    Key Components of TCP/IP:

    • IP (Internet Protocol): Responsible for addressing (using IP addresses like 192.168.1.1) and routing packets to their destination, determining the best path through the network.
    • TCP (Transmission Control Protocol): Ensures reliable transmission by managing packet sequencing, acknowledgements, flow control, and error detection.
    • UDP (User Datagram Protocol): An alternative to TCP for faster, less reliable transmission where speed is prioritised over accuracy, such as in video streaming.
    • Ports: Numerical identifiers (e.g., port 80 for HTTP) that allow multiple services to run on the same IP address.

    TCP/IP has evolved with versions like IPv4 (using 32-bit addresses) and IPv6 (using 128-bit addresses to accommodate more devices). It underpins higher-level protocols like HTTP, making it essential for all internet activities.

    Example: When you send an email, TCP/IP breaks the message into packets, routes them via IP across the internet, and reassembles them using TCP at the recipient's end.

    Activity: Open a command prompt or terminal on your computer (on Windows, search for 'cmd'; on macOS/Linux, search for 'terminal'). Type 'ping www.google.com' and press enter. Observe the output, which shows the IP address of the site, the packets sent and received, and round-trip times. This demonstrates IP addressing and basic packet transmission in TCP/IP.

    For example, the output might look like this:

    Pinging www.google.com [209.85.202.147] with 32 bytes of data:
    Reply from 209.85.202.147: bytes=32 time=20ms TTL=106
    Reply from 209.85.202.147: bytes=32 time=43ms TTL=106
    Reply from 209.85.202.147: bytes=32 time=43ms TTL=106
    Reply from 209.85.202.147: bytes=32 time=42ms TTL=106
    
    Ping statistics for 209.85.202.147:
        Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
        Minimum = 20ms, Maximum = 43ms, Average = 37ms

    This output shows the domain name resolved to an IP address (e.g., 209.85.202.147), then sends 4 packets of 32 bytes each. Each 'Reply' line indicates a successful response, with the time taken (in milliseconds) for the round trip and TTL (Time To Live, which decreases with each hop). The statistics summarise packets sent/received/lost and average response times. If packets are lost, it might indicate network issues.

    Then, try 'tracert www.google.com' (or 'traceroute' on macOS/Linux) to see the routing path. Spend a few minutes experimenting and noting what you observe about packet loss or response times.

    For example, the output might look like this:

    Tracing route to www.google.com [209.85.202.147]
    over a maximum of 30 hops:
    
      1     1 ms     1 ms     1 ms  192.168.1.1
      2     8 ms     7 ms     7 ms  10.0.0.1
      3    10 ms     9 ms    10 ms  some-router.isp.net [203.0.113.1]
      4    15 ms    14 ms    15 ms  another-router.isp.net [198.51.100.2]
      5    20 ms    19 ms    20 ms  google-router [209.85.202.147]
    
    Trace complete.

    This output shows the path packets take, listing each hop (router) with response times. It helps identify where delays or issues might occur in the network path.

    5 - VOIP

    VOIP, or Voice Over Internet Protocol, is a technology that enables voice communication and multimedia sessions over Internet Protocol (IP) networks, such as the internet. It converts analogue voice signals into digital data packets that can be transmitted over IP networks, allowing for phone calls, video conferences, and other real-time communications without relying on traditional telephone lines. VOIP is connection-oriented for real-time delivery and is widely used in applications like Skype, Zoom, and WhatsApp calls.

    VOIP works by digitising voice input through a microphone, compressing it using codecs to reduce bandwidth usage, and then packaging it into IP packets for transmission. At the receiving end, the packets are reassembled, decompressed, and converted back to analogue sound. Protocols like SIP (Session Initiation Protocol) handle call setup, signalling, and termination, while RTP (Real-time Transport Protocol) manages the actual delivery of voice and video data, ensuring low latency and synchronisation.

    Key Components of VOIP:

    • SIP (Session Initiation Protocol): Manages the establishment, maintenance, and termination of communication sessions, including locating users and negotiating capabilities.
    • RTP (Real-time Transport Protocol): Handles the transport of audio and video packets, providing timing information to ensure smooth playback.
    • Codecs: Algorithms like G.711 or Opus that compress and decompress voice data to optimise quality and bandwidth.
    • Ports: Typically uses ports like 5060 for SIP signalling and a range (e.g., 10000-20000) for RTP media streams.

    VOIP has evolved with improvements in quality of service (QoS) to prioritise voice packets over other data, reducing issues like jitter or packet loss. For security, protocols like SRTP (Secure RTP) add encryption to protect calls from eavesdropping.

    Example: Making a Zoom call: Your device uses VOIP to convert your voice into packets, sends them via RTP over the internet to the recipient, where they are reassembled into audible speech.

    Unlock the Full Learning Experience

    Get ready to embark on an incredible learning journey! Get access to this lesson and hundreds more in our Digital Skills Curriculum.

    Copyright Notice
    This lesson is copyright of DigitalSkills.org. Unauthorised use, copying or distribution is not allowed.
    🍪 Our website uses cookies to make your browsing experience better. By using our website you agree to our use of cookies. Learn more