Networking Crash Course for the cloud

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:

Physical Layer
Manages the transmission of raw data bits over physical media (e.g., cables, Wi-Fi).
Example: Ethernet cables.Data Link Layer
Ensures error-free data transfer between adjacent nodes. Includes MAC addresses.
Example: Ethernet, Wi-Fi (802.11).Network Layer
Handles routing and addressing using IP addresses.
Example: IPv4, IPv6.Transport Layer
Ensures reliable delivery (TCP) or faster, connectionless transfer (UDP).
Example: TCP, UDP.Session Layer
Manages sessions and controls connections between applications.
Example: Remote Desktop Protocol (RDP).Presentation Layer
Translates data formats for applications. Handles encryption and compression.
Example: SSL/TLS encryption.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.

Link Layer
Combines the OSI Physical and Data Link layers.
Example: Ethernet.Internet Layer
Maps to the OSI Network layer. Handles IP addressing and routing.
Example: IPv4, IPv6.Transport Layer
Supports reliable (TCP) or best-effort (UDP) delivery of data.
Example: TCP, UDP.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
| Feature | TCP | UDP |
| Reliability | Reliable | Unreliable |
| Speed | Slower | Faster |
| Use Cases | Web, file transfer | Streaming, 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.1Subnet Mask:
255.255.255.0Network:
192.168.1.0Hosts:
192.168.1.1to192.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.0to126.255.255.255Default 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.0to191.255.255.255Default 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.0to223.255.255.255Default 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.0to239.255.255.255Purpose: Reserved for multicasting (sending data to multiple hosts simultaneously).
Addressing: Does not use subnetting.
Class E
Range:
240.0.0.0to255.255.255.255Purpose: Reserved for experimental purposes. Not used for general networking.
Special Ranges
Private IP Addresses:
Reserved for internal use within a network.
Class A:
10.0.0.0to10.255.255.255Class B:
172.16.0.0to172.31.255.255Class C:
192.168.0.0to192.168.255.255
Loopback Address:
127.0.0.0to127.255.255.255(used for testing and diagnostics).APIPA:
169.254.0.0to169.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/24means the first 24 bits define the network.Host range:
192.168.1.1to192.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.






