Back to course

IP Addressing and Subnetting Basics

Cyber Security Mastery: From Zero to Hero

Understanding IP Addresses

An IP address is a numerical label assigned to each device connected to a computer network that uses the Internet Protocol for communication.

IPv4

  • 32-bit address, typically written in dotted-decimal notation (e.g., 192.168.1.1).
  • Addresses are divided into Network ID and Host ID.
  • Classes: Historically defined A, B, C, D, E based on the first octet.

Subnet Mask

The subnet mask determines which part of the IP address is the Network ID and which part is the Host ID. It's represented in CIDR notation (e.g., /24).

  • 255.255.255.0 is equivalent to /24 (24 bits are dedicated to the network).

Private vs. Public IP Ranges

To conserve public IP addresses, reserved private ranges are used internally:

  • 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