Basic Concepts

IP Address Classes

IP addresses are divided into different classes based on their leading bits. Here’s a quick overview:

  • Class A: 1.0.0.0 to 126.0.0.0

    • Default Subnet Mask: 255.0.0.0 (/8)
    • Number of Networks: 128 (2^7)
    • Hosts per Network: 16,777,214

  • Class B: 128.0.0.0 to 191.255.0.0

    • Default Subnet Mask: 255.255.0.0 (/16)
    • Number of Networks: 16,384 (2^14)
    • Hosts per Network: 65,534

  • Class C: 192.0.0.0 to 223.255.255.0

    • Default Subnet Mask: 255.255.255.0 (/24)
    • Number of Networks: 2,097,152 (2^21)
    • Hosts per Network: 254

Private IP Address Ranges

Private IP addresses are used within a network and are not routable on the internet. Here are the ranges:

  • 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

Subnet Masks and CIDR Notation

Subnet masks define the network and host portions of an IP address. CIDR (Classless Inter-Domain Routing) notation specifies the subnet mask in a compact form.

CIDR NotationSubnet MaskUsable HostsSubnet Increment
/8255.0.0.016,777,21416,777,216
/9255.128.0.08,388,6068,388,608
/10255.192.0.04,194,3024,194,304
/11255.224.0.02,097,1502,097,152
/12255.240.0.01,048,5741,048,576
/13255.248.0.0524,286524,288
/14255.252.0.0262,142262,144
/15255.254.0.0131,070131,072
/16255.255.0.065,53465,536
/17255.255.128.032,76632,768
/18255.255.192.016,38216,384
/19255.255.224.08,1908,192
/20255.255.240.04,0944,096
/21255.255.248.02,0462,048
/22255.255.252.01,0221,024
/23255.255.254.0510512
/24255.255.255.0254256
/25255.255.255.128126128
/26255.255.255.1926264
/27255.255.255.2243032
/28255.255.255.2401416
/29255.255.255.24868
/30255.255.255.25224

Quick Reference for Common Subnets

Class A Subnetting

Subnet MaskCIDRUsable HostsNotes
255.0.0.0/816,777,214Default
255.240.0.0/121,048,574
255.255.0.0/1665,534Commonly used
255.255.255.0/24254

Class B Subnetting

Subnet MaskCIDRUsable HostsNotes
255.255.0.0/1665,534Default
255.255.240.0/204,094
255.255.255.0/24254Commonly used
255.255.255.240/2814

Class C Subnetting

Subnet MaskCIDRUsable HostsNotes
255.255.255.0/24254Default
255.255.255.128/25126
255.255.255.192/2662
255.255.255.224/2730
255.255.255.240/2814
255.255.255.248/296
255.255.255.252/302Point-to-point links

Special IP Address Ranges

IP address ranges have specific purposes, from local communication to testing and future use. Here’s a detailed look at these special IP address ranges, presented in a more visual and structured format.


Reserved and Private Ranges

IP RangeDescriptionNotes
0.0.0.0/8“This” NetworkReserved, used for routing and initialization.
10.0.0.0/8Private NetworkCommonly used for internal communications in private networks.
127.0.0.0/8LoopbackUsed for localhost (127.0.0.1), testing network software locally.
169.254.0.0/16Link-localUsed for Automatic Private IP Addressing (APIPA).
172.16.0.0/12Private NetworkUsed for local communications within a private network.
192.168.0.0/16Private NetworkWidely used in home networks and small businesses.

Documentation and Testing

IP RangeDescriptionNotes
192.0.2.0/24TEST-NET-1Reserved for documentation and examples.
198.51.100.0/24TEST-NET-2Reserved for documentation and examples.
203.0.113.0/24TEST-NET-3Reserved for documentation and examples.

Specialized Purposes

IP RangeDescriptionNotes
192.88.99.0/24IPv6 to IPv4 relayUsed for 6to4 relay, aiding the transition from IPv4 to IPv6.
198.18.0.0/15Network Interconnect Device BenchmarkingReserved for benchmarking network interconnect devices.
224.0.0.0/4MulticastReserved for multicast traffic.
240.0.0.0/4Reserved for Future UseExperimental, reserved for future protocols or applications.
255.255.255.255BroadcastLimited broadcast to all hosts on the local network.

Visual Explanation and Practical Examples

APIPA (Automatic Private IP Addressing)

  • Range: 169.254.0.0/16
  • Usage: When a device can’t obtain an IP from DHCP, it auto-assigns an address within this range.
  • Example: A device might use 169.254.45.1 to communicate locally.
+---------------------+
| Device A            |
| IP: 169.254.45.1    |
+---------------------+
         |
         | (Link-local communication)
         |
+---------------------+
| Device B            |
| IP: 169.254.45.2    |
+---------------------+

Loopback Address

  • Range: 127.0.0.0/8
  • Usage: Test network software without external network. Commonly used address: 127.0.0.1.
  • Example: Web developers testing a web server on their local machine.
+---------------------------+
| Local Machine             |
|                           |
| Test Web Server:          |
| http://127.0.0.1          |
+---------------------------+

Private Network Addresses

RangeTypical Usage
10.0.0.0/8Large private networks (e.g., enterprise networks).
172.16.0.0/12Medium-sized private networks.
192.168.0.0/16Small home and business networks.
+----------------------------------------------+
| Home Router                                  |
|                                              |
| +-------------------+     +----------------+ |
| | Device A          |     | Device B       | |
| | IP: 192.168.1.2   |     | IP: 192.168.1.3| |
| +-------------------+     +----------------+ |
|                                              |
| Private Network: 192.168.1.0/24              |
+----------------------------------------------+

Practical Usage of Special IP Ranges

Broadcast Address (255.255.255.255)

  • Usage: Send a message to all devices in the local network segment.
  • Example: A DHCP request might be broadcast to 255.255.255.255.

Multicast Address (224.0.0.0/4)

  • Usage: Stream data to multiple devices simultaneously.
  • Example: Video conferencing tools often use multicast to distribute video streams.

Common Calculations

Determining Subnet Range

  1. Identify the subnet mask.
  2. Calculate the block size: 256 - the value in the subnet mask's relevant octet.
  3. List subnet ranges using the block size.

For example

For 192.168.1.0/26:

  1. Subnet Mask: 255.255.255.192
  2. Block Size: 256 - 192 = 64
  3. Subnets:
    • 192.168.1.0 - 192.168.1.63
    • 192.168.1.64 - 192.168.1.127
    • 192.168.1.128 - 192.168.1.191
    • 192.168.1.192 - 192.168.1.255

Calculating Usable Hosts

  • Formula: 2^n - 2
    • n = number of host bits.
  • Example for /26:
    • Host Bits: 32 - 26 = 6
    • Usable Hosts: 2^6 - 2 = 62

Binary to Decimal Conversion

Understanding binary to decimal conversion is key in subnetting:

  • Powers of 2: 2^0 = 1, 2^1 = 2, 2^2 = 4, …, 2^8 = 256
  • Example: Binary 11000000 equals decimal 192.

Subnetting Practice Exercises

  1. Determine the number of subnets and hosts per subnet for a given CIDR.
  2. Practice converting binary to decimal and vice versa.
  3. Calculate subnet ranges and broadcast addresses.

Quick Tips

  • Memorize Common Subnet Masks and CIDR Notations.
  • Use Incremental Values for easy subnet calculation.
  • Plan for Future Growth: Allocate larger subnets than currently needed.
  • Document Your Subnetting Scheme: Keep a record of your IP address allocations and network design.
  • Practice, Practice, Practice: Regular practice with different scenarios will improve your subnetting skills.

Conclusion

This cheat sheet serves as a quick reference to essential subnetting information, equipping you with the knowledge needed to efficiently design and manage IP networks. By familiarizing yourself with these special IP address ranges, you can ensure proper allocation of IP addresses and avoid conflicts.

Understanding these ranges allows network administrators to:

  • Design Efficient Networks: Plan and implement network segments that are both scalable and organized.
  • Avoid IP Conflicts: Use reserved and private IP ranges correctly to prevent address overlap and connectivity issues.
  • Troubleshoot Effectively: Quickly identify and resolve network issues by recognizing the significance of different IP ranges.
  • Plan for the Future: Allocate IP addresses with foresight, considering potential network growth and changes.

With this cheat sheet at your disposal, you’ll be well-prepared to handle the complexities of subnetting and IP address management. Happy subnetting!

Last updated 01 Sep 2024, 10:22 CEST . history