IP Address Cheat Sheet

Essential networking reference for developers

Private IPs CIDR Special IPs Ports IPv6 Calculators

Quick Reference

Most frequently needed networking information at a glance

Private IP Ranges

  • 10.0.0.0/8 16.7M addresses
  • 172.16.0.0/12 1M addresses
  • 192.168.0.0/16 65K addresses

Non-routable on public internet

Common Subnet Masks

  • /24 255.255.255.0 (254 hosts)
  • /16 255.255.0.0 (65K hosts)
  • /8 255.0.0.0 (16M hosts)

Most used in practice

Public DNS Servers

  • 1.1.1.1 Cloudflare (fast)
  • 8.8.8.8 Google (reliable)
  • 9.9.9.9 Quad9 (secure)

Alternative to ISP DNS

Special Addresses

  • 127.0.0.1 Localhost
  • 0.0.0.0 Default route
  • 255.255.255.255 Broadcast

Reserved & special purpose

Essential Ports

  • 22 SSH
  • 80 HTTP
  • 443 HTTPS
  • 3306 MySQL

Most common services

Common Gateways

  • 192.168.1.1 Most routers
  • 192.168.0.1 Alternative
  • 10.0.0.1 Some ISPs

Router admin access

Auto-Configuration

  • 169.254.0.0/16 Link-Local
  • fe80::/10 IPv6 Link-Local

APIPA when DHCP fails

CIDR Quick Guide

  • /32 1 host (single IP)
  • /30 2 hosts (P2P link)
  • /29 6 hosts
  • /28 14 hosts

Small subnet sizing

IPv6 Essentials

  • ::1 Localhost
  • :: Unspecified
  • 2001:db8::/32 Documentation

Most common IPv6 addresses

IP Address Classes

Note: Classful addressing is largely obsolete, replaced by CIDR. However, understanding classes helps with troubleshooting legacy systems and exam preparation.

Class Range Default Subnet Mask CIDR Networks Hosts per Network Purpose
A 1.0.0.0 - 126.255.255.255 255.0.0.0 /8 126 16,777,214 Large networks
B 128.0.0.0 - 191.255.255.255 255.255.0.0 /16 16,384 65,534 Medium networks
C 192.0.0.0 - 223.255.255.255 255.255.255.0 /24 2,097,152 254 Small networks
D 224.0.0.0 - 239.255.255.255 N/A N/A N/A N/A Multicast
E 240.0.0.0 - 255.255.255.255 N/A N/A N/A N/A Experimental

CIDR Notation Guide

CIDR (Classless Inter-Domain Routing) uses a suffix to indicate the number of network bits.

Format: IP_ADDRESS/PREFIX_LENGTH

Example: 192.168.1.0/24 means the first 24 bits are the network portion.

Common CIDR Blocks

CIDR Subnet Mask Wildcard Mask Available IPs Usable Hosts
/32 255.255.255.255 0.0.0.0 1 1
/31 255.255.255.254 0.0.0.1 2 2*
/30 255.255.255.252 0.0.0.3 4 2
/29 255.255.255.248 0.0.0.7 8 6
/28 255.255.255.240 0.0.0.15 16 14
/27 255.255.255.224 0.0.0.31 32 30
/26 255.255.255.192 0.0.0.63 64 62
/25 255.255.255.128 0.0.0.127 128 126
/24 255.255.255.0 0.0.0.255 256 254
/23 255.255.254.0 0.0.1.255 512 510
/22 255.255.252.0 0.0.3.255 1,024 1,022
/21 255.255.248.0 0.0.7.255 2,048 2,046
/20 255.255.240.0 0.0.15.255 4,096 4,094
/19 255.255.224.0 0.0.31.255 8,192 8,190
/18 255.255.192.0 0.0.63.255 16,384 16,382
/17 255.255.128.0 0.0.127.255 32,768 32,766
/16 255.255.0.0 0.0.255.255 65,536 65,534
/8 255.0.0.0 0.255.255.255 16,777,216 16,777,214

* /31 is used for point-to-point links (RFC 3021)

Special & Reserved IP Addresses

Addresses with special meanings in networking

0.0.0.0

Default Route / Unspecified

Used in routing tables to indicate "any address". In servers, binds to all available interfaces.

Common in: Route tables, server binding

127.0.0.0/8

Loopback Network

All addresses route back to localhost. 127.0.0.1 is most common. Traffic never leaves the host.

Use case: Local development, testing

255.255.255.255

Limited Broadcast

Broadcast to all devices on the local network segment. Not forwarded by routers.

Common in: DHCP discovery, ARP

169.254.0.0/16

Link-Local / APIPA

Auto-assigned when DHCP fails. Allows communication on local segment only. Not routable.

Indicates: DHCP failure, network issue

224.0.0.0/4

Multicast (Class D)

One-to-many communication. Range: 224.0.0.0 - 239.255.255.255. Used for streaming, routing protocols.

Use case: IPTV, routing (OSPF, EIGRP)

100.64.0.0/10

Carrier-Grade NAT (CGNAT)

Shared address space for ISPs. Used when ISP NATs traffic before it reaches internet.

ISP internal use only

192.0.2.0/24

TEST-NET-1 (Documentation)

Reserved for examples in documentation, books, RFCs. Should never appear in real traffic.

Also: 198.51.100.0/24, 203.0.113.0/24

240.0.0.0/4

Reserved (Class E)

Reserved for future use and experimentation. Range: 240.0.0.0 - 255.255.255.255.

Status: Never implemented

192.88.99.0/24

6to4 Relay Anycast

Used for IPv6 transition mechanism. Deprecated but may still appear in legacy systems.

IPv6 transition technology

Common Network Ports

Essential port numbers for developers and network engineers

0-1023 Well-Known Ports
1024-49151 Registered Ports
49152-65535 Dynamic/Private

Well-Known Ports (0-1023)

Port Protocol Service Description
20, 21 TCP FTP File Transfer Protocol (data, control)
22 TCP SSH Secure Shell
23 TCP Telnet Unencrypted text communications
25 TCP SMTP Simple Mail Transfer Protocol
53 TCP/UDP DNS Domain Name System
67, 68 UDP DHCP Dynamic Host Configuration Protocol
80 TCP HTTP Hypertext Transfer Protocol
110 TCP POP3 Post Office Protocol v3
143 TCP IMAP Internet Message Access Protocol
443 TCP HTTPS HTTP Secure (HTTP over TLS/SSL)
465 TCP SMTPS SMTP Secure (SMTP over SSL)
587 TCP SMTP SMTP (mail submission)
993 TCP IMAPS IMAP over SSL
995 TCP POP3S POP3 over SSL

Registered Ports (1024-49151)

Port Protocol Service Description
1433 TCP MSSQL Microsoft SQL Server
3306 TCP MySQL MySQL Database
3389 TCP RDP Remote Desktop Protocol
5432 TCP PostgreSQL PostgreSQL Database
5900 TCP VNC Virtual Network Computing
6379 TCP Redis Redis Database
8080 TCP HTTP-Alt HTTP Alternate (often used for dev servers)
8443 TCP HTTPS-Alt HTTPS Alternate
27017 TCP MongoDB MongoDB Database

IPv4 vs IPv6 Comparison

Understanding the differences between IP versions

IPv4

  • Address Length: 32 bits
  • Address Format: Decimal (dotted-quad)
  • Example: 192.168.1.1
  • Total Addresses: ~4.3 billion
  • Notation: 255.255.255.255
  • Header Size: 20-60 bytes

IPv6

  • Address Length: 128 bits
  • Address Format: Hexadecimal (colon-separated)
  • Example: 2001:0db8:85a3::8a2e:0370:7334
  • Total Addresses: ~340 undecillion
  • Notation: 8 groups of 4 hex digits
  • Header Size: 40 bytes (fixed)

📝 IPv6 Address Compression Rules

  • Omit leading zeros: 00011
  • Compress consecutive zeros: Use :: once per address for consecutive zero groups
  • Example: 2001:0db8:0000:0000:0000:0000:0000:00012001:db8::1
  • Another example: fe80:0000:0000:0000:0000:0000:0000:0001fe80::1

Why IPv6?

  • IPv4 address exhaustion
  • 340 undecillion addresses
  • Better security (IPsec built-in)
  • No NAT required
  • Improved routing efficiency

IPv6 Adoption

  • Most modern OSes support it
  • Mobile networks widely adopted
  • Dual-stack common (IPv4 + IPv6)
  • Cloud providers offer native support
  • Gradual transition ongoing

Quick Subnet Calculation Tips

Network Address

First IP in the subnet (all host bits = 0)

192.168.1.0/24 → 192.168.1.0

Broadcast Address

Last IP in the subnet (all host bits = 1)

192.168.1.0/24 → 192.168.1.255

Usable Host Range

Network + 1 to Broadcast - 1

192.168.1.0/24 → 192.168.1.1 - 192.168.1.254

Number of Hosts

2^(host bits) - 2

/24 → 2^8 - 2 = 254 usable hosts

Binary Conversion Reference

Understanding IP addresses in binary notation

Key Concept: Each octet in an IP address is 8 bits, representing values from 0-255 in decimal.

To convert decimal to binary, determine which powers of 2 sum to the decimal value.

128 64 32 16 8 4 2 1
2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0

Example: 192 = 128 + 64 = 11000000 in binary

Common Decimal to Binary

  • 255 = 11111111
  • 192 = 11000000
  • 128 = 10000000
  • 64 = 01000000
  • 0 = 00000000

Quick Tips

  • All 1s = 255
  • All 0s = 0
  • Powers of 2 are single bits
  • Use calculator for complex conversions
  • Practice makes perfect!

Interactive Network Calculators

Real-time tools for subnet calculations, conversions, and network analysis

Subnet Calculator

CIDR ↔ Subnet Mask Converter

OR

IP to Binary Converter

IP Address Analyzer

Subnetting Calculator