Skip to content

Networking Basics

Networking is one of the core skills every DevOps Engineer should understand. This chapter introduces the networking concepts you'll encounter in cloud platforms, Linux servers, Kubernetes, and production infrastructure.


What is an IP Address?

An IP Address (Internet Protocol Address) is a unique identifier assigned to a device on a network.

Just as every house has a postal address, every device connected to a network has an IP address.

Example

192.168.1.10

Private vs Public IP Address

  • Private IP

    Used inside private networks.

    Characteristics

    • Not accessible from the Internet
    • Used in Home, Office and Cloud VPCs
    • Free to use

    Example

    192.168.1.20
    
  • Public IP

    Used on the Internet.

    Characteristics

    • Globally unique
    • Assigned by ISP or Cloud Provider
    • Accessible from anywhere

    Example

    8.8.8.8
    

Private IP Ranges

  • Class A

    10.0.0.0
    ↓
    10.255.255.255
    
  • Class B

    172.16.0.0
    ↓
    172.31.255.255
    
  • Class C

    192.168.0.0
    ↓
    192.168.255.255
    

Valid vs Invalid IP

  • Valid IP

    192.168.1.10
    10.0.0.5
    8.8.8.8
    
  • Invalid IP

    256.10.20.30
    192.300.1.1
    999.1.1.1
    

Every octet in an IPv4 address must be between 0 and 255.


Public Network vs Private Network

  • Public Network

    • Connected to the Internet
    • Accessible globally
    • Example: Public Website
  • Private Network

    • Internal communication only
    • Home LAN
    • Office LAN
    • AWS VPC

VPN

A Virtual Private Network (VPN) creates an encrypted connection between your device and a private network.

Laptop
   │
   ▼
  VPN
   │
   ▼
Office Network

Bastion Host

A Bastion Host is a secure jump server used to access private servers inside a network.

Developer
     │
     ▼
Bastion Host
     │
     ▼
Private Servers

CIDR

CIDR (Classless Inter-Domain Routing) represents the network prefix using a slash (/).

Example

IP Address     : 192.168.1.10
Subnet Mask    : 255.255.255.0
CIDR Notation  : 192.168.1.10/24

Common CIDR Blocks

  • /8

    255.0.0.0
    

    Hosts

    16,777,214

  • /16

    255.255.0.0
    

    Hosts

    65,534

  • /24

    255.255.255.0
    

    Hosts

    254


Key Takeaways

  • Private IP addresses are used inside internal networks.
  • Public IP addresses are reachable over the Internet.
  • Every IPv4 octet must be between 0 and 255.
  • VPN provides secure remote connectivity.
  • Bastion Hosts provide secure access to private infrastructure.
  • CIDR determines the size of a network.