TOP  

IPv4 and IPv6 Subnetting Cheat Sheet

This article provides a comprehensive subnetting cheat sheet for IPv4 and IPv6, outlining key concepts, subnetting steps, default masks, and examples. It goes through subnetting scripts, offering practical guidance for dividing networks into subnets and assigning addresses. Additionally, it also offers a few quick tips for effective subnetting and optimizing network space.

IP Subnetting CheatSheet

This IP subnetting cheat sheet (for IPv4 and IPv6) is designed to give you clear and quick information about both IPv4 and IPv6 subnetting processes.

Need a solid IP solution for subnetting? Discover RapidSeedbox’s IP rental service, offering IPv4 and IPv6 addresses, competitive prices, and flexible deployment. Get your IP now and optimize your network’s efficiency.

1. IPv4 Subnetting

Key Concepts:

  • IP Address: 32 bits, divided into 4 octets.
  • Subnet Mask: Defines the network and host portions.
  • CIDR Notation: Denoted as /x, where x is the number of network bits.

Subnetting Steps:

  • Determine Subnet Mask: Based on required hosts/subnets.
  • Calculate Subnets: Number of subnets = 2² (n = borrowed bits).
  • Calculate Hosts: Hosts per subnet =2ⁿ − 2 (m = remaining host bits).

Default Subnet Masks:

  • Class A: 255.0.0.0 (/8)
  • Class B: 255.255.0.0 (/16)
  • Class C: 255.255.255.0 (/24)

CIDR Subnet Masks:

  • /24: 255.255.255.0 – 256 hosts
  • /25: 255.255.255.128 – 128 hosts
  • /26: 255.255.255.192 – 64 hosts
  • …continue as needed…

Subnetting Example:

  • IP: 192.168.1.0/26
    • Subnet Mask: 255.255.255.192
    • Number of Hosts: 62
    • Number of Subnets: 4

2. IPv6 Subnetting

Key Concepts:

  • IP Address: 128 bits, divided into 8 groups of 16 bits.
  • CIDR Notation: Typically /48 for organizations, /64 for subnets.

Subnetting Steps:

  • Determine Network Prefix: Typically provided (/48, /56, /64).
  • Subnet Allocation: Allocate bits from subnet ID for hierarchical structuring.
  • Interface ID: Typically 64 bits, unique to each device.

IPv6 Address Structure:

  • Global Routing Prefix (n bits) | Subnet ID (m bits) | Interface ID (128-n-m bits)

Common Prefixes:

  • /48: Organization level
  • /64: Standard subnet size
  • /128: Single device (loopback, point-to-point)

Subnetting Example:

  • Network: 2001:db8::/48
    • Subnet ID: Next 16 bits (e.g., 2001:db8:1::/64 for the first subnet)
    • Allows for 65,536 subnets within the organization.

Special IPv6 Addresses:

  • Loopback: ::1/128
  • Unspecified: ::/128
  • Link-Local: fe80::/10

3. IPv4 and IPv6 Subnetting Flow

The following scripts are an essential part of the subnetting cheat sheet. These are useful for keeping the subnetting process flow as streamlined as possible.

a. IPv4 Subnetting Script

IPv4 Subnetting CheatSheet

Scenario: You’ve been given an IPv4 network and need to divide it into smaller subnets.

Identify Requirements:

  • How many subnets do you need?
  • How many hosts per subnet are required?

Determine Subnet Mask:

  • Based on the number of required hosts, choose a subnet mask that provides enough host bits.
  • Remember: Hosts per subnet= 2^(32−subnet mask length) − 2

Calculate Subnets:

  • Determine the number of subnets:
  • Number of subnets=2^(borrowed bits)
  • Borrowed bits = subnet mask length – original network class mask length.

Subnet Addresses:

  • Calculate the range of addresses for each subnet.
  • Increment network addresses by using the host portion.

Assign Addresses:

  • Assign network, first usable, last usable, and broadcast addresses for each subnet.

Verification:

  • Ensure there’s no overlap between subnets.
  • Verify that each subnet accommodates the required number of hosts.

Documentation:

  • Clearly document each subnet’s range and intended use.

b. IPv6 Subnetting Script

IPv6 Subnetting CheatSheet

Scenario: You’re tasked with creating subnets within an assigned IPv6 block.

Understand the Prefix:

  • Typically, you’ll start with a /48 or /56 prefix.
  • Decide how you want to allocate the subnet bits within your available range.

Determine Subnetting Scheme:

  • Decide on the subnet size. /64 is standard for most applications.
  • If you have a /48 prefix, you can create 2^(64-48) = 65,536 /64 subnets.

Allocate Subnets:

  • Assign a unique subnet ID to each subnet within your allocation.
  • For example, if you start with 2001:db8:1234::/48, your first subnet might be 2001:db8:1234:0001::/64, the next 2001:db8:1234:0002::/64, and so on.

Assign Addresses:

  • Within each /64 subnet, you can assign addresses to devices.
  • Remember, the last 64 bits are typically for the interface ID.

Special Addresses:

  • Be aware of and assign special addresses as needed, like link-local (fe80::/10) or multicast (ff00::/8).

Verification:

  • Ensure there’s no overlap and that the subnets are logically organized.
  • Validate that the addressing scheme supports your network’s topology and device requirements.

Documentation:

  • Document each subnet, its purpose, and any assigned ranges within it.

4. Subnetting Cheat Sheet: Quick Tips.

There is no complete subnetting cheat sheet without quick tips to help you subnet easier and better.

  • VLSM (Variable Length Subnet Mask): Utilize VLSM to efficiently allocate IPv4 space across various subnets.
  • CIDR: Eliminates traditional classful networking, enabling efficient IPv4 space usage.
  • Subnet Overlap Prevention: Avoid IPv4 subnet overlap to prevent potential routing conflicts.
  • Subnet Zero Compatibility: Verify IPv4 subnet zero compatibility with older network equipment.
  • Wildcard Mask Mastery: Learn to use wildcard masks for effective IPv4 ACLs and routing strategies.
  • NAT Optimization: Enhance NAT efficiency through strategic IPv4 subnetting practices.
  • Subnet Zero and All-Ones Subnet: Generally usable unless restricted by device configuration.
  • IPv6: No NAT needed, all devices can have a unique public IP.
  • Simplified IPv6 Subnet Division: Focus on dividing the network prefix for straightforward IPv6 subnetting.
    ULA: Utilize Unique Local Addresses for secure internal network addressing, avoiding external routing.
  • Anycast: Implement anycast addresses in IPv6 for closer and faster service delivery.
  • IPSec: Leverage IPv6’s built-in IPsec for secure, end-to-end network communication.

5. Final Words

This IPv4 and IPv6 subnetting cheat sheet effectively breaks down the subnetting process for both protocols. It provides clear steps, examples, and tips. This cheat sheet will help you with everything from understanding the basic concepts to applying subnetting in practical scenarios. 

We hope you print this subnetting cheat sheet, keep it handy, and use it as a quick reference for your daily subnetting tasks in both IPv4 and IPv6 environments!

Are you seeking a robust solution for your network’s IP needs? 

Learn about RapidSeedbox’s IP rental service with IPv4 and IPv6 addresses.

A variety of IPv4 and IPv6 addresses for lease.
Competitive pricing with a 24-hour money-back guarantee.
Ownership of all IP addresses, ensuring direct dealings without brokers.
Flexible deployment, with hosting on our servers or your data center.

————

About author Diego Asturias

Avatar for Diego Asturias

Diego Asturias is a tech journalist who translates complex tech jargon into engaging content. He has a degree in Internetworking Tech from Washington DC, US, and tech certifications from Cisco, McAfee, and Wireshark. He has hands-on experience working in Latin America, South Korea, and West Africa. He has been featured in SiliconANGLE Media, Cloudbric, Pcwdld, Hackernoon, ITT Systems, SecurityGladiators, Rapidseedbox, and more.

Join 40K+ Newsletter Subscribers

Get regular updates regarding Seedbox use-cases, technical guides, proxies as well as privacy/security tips.

Speak your mind

Leave a Reply

Your email address will not be published. Required fields are marked *