Catalog / Subnetting and IP Addressing Cheat Sheet
Subnetting and IP Addressing Cheat Sheet
A quick reference guide to subnetting, IP addressing, and related networking concepts, designed to help network administrators and students quickly find the information they need.
IP Addressing Fundamentals
IP Address Structure
IPv4 Address: |
32-bit address, represented in dotted decimal notation (e.g., 192.168.1.1). |
IPv6 Address: |
128-bit address, represented in hexadecimal notation (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334). |
Address Classes (IPv4): |
A, B, C (Unicast); D (Multicast); E (Reserved). |
Private IP Ranges (IPv4): |
10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 |
Public vs. Private IP Addresses: |
Public IPs are globally unique, while private IPs are used within private networks. |
Key Concepts
Network Address: Identifies the network. Host Address: Identifies a specific device within the network. Subnet Mask: Differentiates between the network and host portions of an IP address. |
Default Gateway: The IP address of the router that allows devices to communicate outside their local network. |
DNS (Domain Name System): Translates domain names to IP addresses. |
Important IP Addresses
Loopback Address: |
127.0.0.1 (IPv4), ::1 (IPv6) - Used for testing network stack on a local machine. |
Link-Local Address: |
169.254.0.0/16 (IPv4), fe80::/10 (IPv6) - Automatically assigned when a device fails to obtain an IP address. |
Multicast Address: |
224.0.0.0/4 (IPv4), ff00::/8 (IPv6) - Used for sending data to a group of devices. |
Subnetting Basics
Understanding Subnetting
Subnetting is the practice of dividing a network into smaller, more manageable subnetworks (subnets). This improves network performance, security, and organization. |
The subnet mask determines the size of the subnet and the number of available host addresses. |
Subnet Mask Representation
Dotted Decimal Notation: |
e.g., 255.255.255.0 |
CIDR Notation (Slash Notation): |
e.g., /24 (equivalent to 255.255.255.0) |
Calculating Usable Hosts: |
2^(number of host bits) - 2 (subtracting network and broadcast addresses) |
Common Subnet Masks and CIDR Equivalents
/24 |
255.255.255.0 (254 usable hosts) |
/25 |
255.255.255.128 (126 usable hosts) |
/26 |
255.255.255.192 (62 usable hosts) |
/27 |
255.255.255.224 (30 usable hosts) |
/28 |
255.255.255.240 (14 usable hosts) |
Subnetting Techniques
FLSM vs. VLSM
FLSM (Fixed Length Subnet Masking): Each subnet has the same subnet mask, leading to wasted addresses if subnet sizes vary greatly. VLSM (Variable Length Subnet Masking): Allows different subnets to have different subnet masks, optimizing address allocation. |
VLSM is generally preferred for efficient address utilization. |
VLSM Implementation Steps
|
Example of VLSM
Given network 192.168.1.0/24, and subnets requiring 60, 30, and 10 hosts:
|
Supernetting (CIDR)
Supernetting (or CIDR aggregation) is the opposite of subnetting. It combines multiple smaller networks into a larger network to reduce routing table entries. For example, combining 192.168.0.0/24 and 192.168.1.0/24 into 192.168.0.0/23. |
Practical Applications and Troubleshooting
Network Design Considerations
When designing a network, consider:
|
Troubleshooting IP Connectivity
ping: |
Tests basic IP connectivity to a host. |
traceroute (tracert on Windows): |
Displays the path packets take to reach a destination. |
ipconfig/ifconfig: |
Displays IP configuration information on Windows/Linux. |
nslookup: |
Query DNS server to obtain domain name or IP address mapping or to query for other specific DNS records. |
Common Issues and Resolutions
IP Address Conflicts: Ensure each device has a unique IP address on the network. Incorrect Subnet Mask: Verify that the subnet mask is correctly configured for the network. Default Gateway Issues: Check that the default gateway is reachable and correctly configured. |
DNS Resolution Problems: Verify DNS server settings and network connectivity. DHCP Issues: Check the DHCP server configuration and ensure it’s properly assigning IP addresses. |