Skip to main content

Command Palette

Search for a command to run...

Networking Crash Course for the cloud

Updated
β€’5 min read
Networking Crash Course for the cloud
C

Cloud | AWS | DevOps | AI πŸ“ Toronto πŸ‡¨πŸ‡¦ πŸš€ Cloud Architect @ AWS πŸ‘¨πŸ½β€πŸ« Professor

Networking is the backbone of cloud computing. Whether you're deploying applications, managing virtual networks, or securing data, understanding core networking concepts is essential. In this crash course, we'll explore key networking topics as follows:

  • OSI Model

  • TCP/IP Model

  • What is TCP?

  • What is UDP?

  • TCP vs UDP

  • DNS

  • SSH

  • IP Address and Subnetting

  • IP Classes

  • CIDR

OSI Model

The OSI (Open Systems Interconnection) model provides a conceptual framework for understanding how data flows through a network. It has 7 layers, each with specific responsibilities:

  1. Physical Layer
    Manages the transmission of raw data bits over physical media (e.g., cables, Wi-Fi).
    Example: Ethernet cables.

  2. Data Link Layer
    Ensures error-free data transfer between adjacent nodes. Includes MAC addresses.
    Example: Ethernet, Wi-Fi (802.11).

  3. Network Layer
    Handles routing and addressing using IP addresses.
    Example: IPv4, IPv6.

  4. Transport Layer
    Ensures reliable delivery (TCP) or faster, connectionless transfer (UDP).
    Example: TCP, UDP.

  5. Session Layer
    Manages sessions and controls connections between applications.
    Example: Remote Desktop Protocol (RDP).

  6. Presentation Layer
    Translates data formats for applications. Handles encryption and compression.
    Example: SSL/TLS encryption.

  7. Application Layer
    Interfaces directly with users.
    Example: HTTP, FTP, DNS.

TCP/IP Model

The TCP/IP model - is essentially a condensed version of the OSI model widely used in modern networking.

  1. Link Layer
    Combines the OSI Physical and Data Link layers.
    Example: Ethernet.

  2. Internet Layer
    Maps to the OSI Network layer. Handles IP addressing and routing.
    Example: IPv4, IPv6.

  3. Transport Layer
    Supports reliable (TCP) or best-effort (UDP) delivery of data.
    Example: TCP, UDP.

  4. Application Layer
    Combines OSI Application, Presentation, and Session layers.
    Example: HTTP, FTP.

TCP vs. UDP

What is TCP?

Transmission Control Protocol (TCP) is a communications standard that allows devices and applications to exchange data over a network. It's a fundamental protocol in the Internet Protocol (IP) suite and is a key part of the Internet's rules. TCP is responsible for ensuring that data is delivered reliably and in the correct order.

TCP (Transmission Control Protocol)

  • Ensures reliable data delivery through acknowledgment and retransmission.

  • Establishes a connection using a three-way handshake.

  • Suitable for applications needing accuracy (e.g., web browsing, file transfers).

What is UDP?

UDP stands for User Datagram Protocol, a communication protocol used to send data between computers on a network. UDP is often used for time-sensitive applications that require speed over reliability.

UDP

  • Focuses on speed and low latency.

  • Does not guarantee delivery, order, or error correction.

  • Ideal for real-time applications (e.g., video streaming, gaming).

Comparison Table

FeatureTCPUDP
ReliabilityReliableUnreliable
SpeedSlowerFaster
Use CasesWeb, file transferStreaming, gaming

Domain Name System

Domain Name System (DNS) is the "phonebook" of the internet, translating human-friendly domain names like example.com into IP addresses 192.168.4.4 . This is required because nodes in a network need to know their β€œaddress” - in other words - IP - to reach and communicate.

  • Key Components:

    • DNS Servers: Store mappings of domain names to IPs.

    • DNS Records: Types include:

      • A Record: Maps domain to IPv4.

      • AAAA Record: Maps domain to IPv6.

      • CNAME: Points to another domain.

SSH

Secure SHell is a network protocol that allows users to securely access and manage remote computers and systems over an unsecured network. It is commonly used in Linux environments.

IP Addressing and Subnetting

IP Addressing

An IP address is a unique identifier for devices on a network. It comes in two versions:

  • IPv4: 32-bit (e.g., 192.168.1.1).

  • IPv6: 128-bit (e.g., 2001:0db8::1).

Subnetting

Subnetting divides a network into smaller subnetworks, improving efficiency and security.

  • Subnet Mask: Determines the network and host portions of an IP.
    Example:

    • IP: 192.168.1.1

    • Subnet Mask: 255.255.255.0

    • Network: 192.168.1.0

    • Hosts: 192.168.1.1 to 192.168.1.254

IP Classes

IP addresses are divided into classes to categorize networks based on their size and usage. IP classes were part of the original design of IPv4 and are used to define ranges of IP addresses. Below are the key classes:

Class A

  • Range: 1.0.0.0 to 126.255.255.255

  • Default Subnet Mask: 255.0.0.0 (or /8)

  • Purpose: Very large networks, typically used by organizations with a huge number of devices.

  • Addressing:

    • The first octet represents the network.

    • The remaining three octets represent the host.

Example: 10.0.0.1
Network: 10.0.0.0
Hosts: Over 16 million addresses.

Class B

  • Range: 128.0.0.0 to 191.255.255.255

  • Default Subnet Mask: 255.255.0.0 (or /16)

  • Purpose: Medium-sized networks, such as universities or large businesses.

  • Addressing:

    • The first two octets represent the network.

    • The last two octets represent the host.

Example: 172.16.0.1
Network: 172.16.0.0
Hosts: About 65,000 addresses.

Class C

  • Range: 192.0.0.0 to 223.255.255.255

  • Default Subnet Mask: 255.255.255.0 (or /24)

  • Purpose: Small networks, such as small businesses.

  • Addressing:

    • The first three octets represent the network.

    • The last octet represents the host.

Example: 192.168.1.1
Network: 192.168.1.0
Hosts: Up to 254 addresses.

Class D

  • Range: 224.0.0.0 to 239.255.255.255

  • Purpose: Reserved for multicasting (sending data to multiple hosts simultaneously).

  • Addressing: Does not use subnetting.

Class E

  • Range: 240.0.0.0 to 255.255.255.255

  • Purpose: Reserved for experimental purposes. Not used for general networking.

Special Ranges

  1. Private IP Addresses:

    • Reserved for internal use within a network.

    • Class A: 10.0.0.0 to 10.255.255.255

    • Class B: 172.16.0.0 to 172.31.255.255

    • Class C: 192.168.0.0 to 192.168.255.255

  2. Loopback Address: 127.0.0.0 to 127.255.255.255 (used for testing and diagnostics).

  3. APIPA: 169.254.0.0 to 169.254.255.255 (used for automatic addressing when DHCP fails).

Classes are less relevant today because of the following reasons:

  • Classless Inter-Domain Routing (CIDR): Modern IP address allocation uses CIDR, which allows flexible subnetting regardless of class.

  • IPv6: The introduction of IPv6 reduces reliance on IPv4 classes.

CIDR: Efficient IP Allocation

CIDR (Classless Inter-Domain Routing) simplifies IP allocation using a prefix notation (e.g., /24).

  • Example: 192.168.1.0/24

    • /24 means the first 24 bits define the network.

    • Host range: 192.168.1.1 to 192.168.1.254.

Why It Matters in the Cloud
CIDR is widely used in defining virtual private networks (VPNs), configuring VPCs in AWS, or VNets in Azure.

This concludes our networking crash course for the cloud.

More from this blog

C

Cerulean Cloud Blog

27 posts

Cerulean Cloud Blog aims to share cloud engineering concepts that work for people of all levels, from beginners to advanced engineers.