联系

CCNA IP 地址与子网划分 – 完整指南

首页 / 博客

3 分钟阅读
ZILL E ALI2026年5月4日思科网络

IP addressing and subnetting CCNA topics are where most candidates lose easy points.

Every network device requires an IP address, which functions similarly to a postal address in terms of communication. Without subnetting, networks can become disorganised, inefficient, and insecure.

Whether you’re preparing for the CCNA or creating your first network, learning IP addressing and subnetting is an essential skill.

IP Addressing and Subnetting CCNA: What Is an IP Address?

IP addressing and subnetting CCNA diagram showing network ID and host ID split for a /24 address
IP addressing and subnetting CCNA: 192.168.1.0/24 split into a 24-bit network ID and an 8-bit host ID.

An IP address is a 32-bit number (IPv4) that identifies a 网络上的设备. It’s written in dotted decimal format.

It comprises two parts:

  1. Network component (identifies the network).
  2. The host part identifies the device.

IP Address Classes

类 范围 Usage
A 1.0.0.0 – 126.255.255.255 大型网络
B 128.0.0.0 – 191.255.255.255 Medium networks
C 192.0.0.0 – 223.255.255.255 Small networks

Private address ranges (non-routable on the internet):

  • Class A: 10.0.0.0/8
  • Class B: 172.16.0.0/12
  • Class C: 192.168.0.0/16

What Is Subnetting?

Subnetting separates a big network into smaller, more manageable portions known as subnets. It:

  • enhances security and performance.
  • Reduces broadcast traffic.
  • Enables logical grouping.

It employs a subnet mask to partition the network.

Common Subnet Masks

CIDR Subnet Mask Wildcard mask # of Hosts # of IP addresses # of usable IP addresses
/0 0.0.0.0 255.255.255.255 4,294,967,296 4,294,967,294
/1 128.0.0.0 127.255.255.255 2,147,483,648 2,147,483,646
/2 192.0.0.0 63.255.255.255 1,073,741,824 1,073,741,822
/3 224.0.0.0 31.255.255.255 536,870,912 536,870,910
/4 240.0.0.0 15.255.255.255 268,435,456 268,435,454
/5 248.0.0.0 7.255.255.255 134,217,728 134,217,726
/6 252.0.0.0 3.255.255.255 67,108,864 67,108,862
/7 254.0.0.0 1.255.255.255 33,554,432 33,554,430
/8 255.0.0.0 0.255.255.255 16,777,216 16,777,214
/9 255.128.0.0 0.127.255.255 8,388,608 8,388,606
/10 255.192.0.0 0.63.255.255 4,194,304 4,194,302
/11 255.224.0.0 0.31.255.255 2,097,152 2,097,150
/12 255.240.0.0 0.15.255.255 1,048,576 1,048,574
/13 255.248.0.0 0.7.255.255 524,288 524,286
/14 255.252.0.0 0.3.255.255 262,144 262,142
/15 255.254.0.0 0.1.255.255 131,072 131,070
/16 255.255.0.0 0.0.255.255 65,536 65,534
/17 255.255.128.0 0.0.127.255 32,768 32,766
/18 255.255.192.0 0.0.63.255 16,384 16,382
/19 255.255.224.0 0.0.31.255 8,192 8,190
/20 255.255.240.0 0.0.15.255 4,096 4,094
/21 255.255.248.0 0.0.7.255 2,048 2,046
/22 255.255.252.0 0.0.3.255 1,024 1,022
/23 255.255.254.0 0.0.1.255 512 510
/24 255.255.255.0 0.0.0.255 256 254
/25 255.255.255.128 0.0.0.127 128 126
/26 255.255.255.192 0.0.0.63 64 62
/27 255.255.255.224 0.0.0.31 32 30
/28 255.255.255.240 0.0.0.15 16 14
/29 255.255.255.248 0.0.0.7 8 6
/30 255.255.255.252 0.0.0.3 4 2
/31 255.255.255.254 0.0.0.1 2 2*
/32 255.255.255.255 0.0.0.0 1 1 1

/31 is a particular instance described in RFC 3021 in which networks with this subnet mask can assign two IP addresses for a point-to-point connection.

Step-by-step: How to Subnet Question:

  1. 192.168.1.0 requires 4 subnets.
  2. Begin with /24 = 256 addresses.
  3. Borrow 2 bits for /26 = 4 subnets.
  4. Each subnet contains 64 addresses.
  5. The first subnet ranges from 192.168.1.0 to 192.168.1.63, followed by 192.168.1.64 – 127.

CIDR: Classless Inter-Domain Routing
CIDR allows you to use flexible subnet masks (e.g., /22, /29) instead of classful bounds.

CIDR is utilised in:
Route summarisation
Efficient IP allocation
Internet routing tables

192.168.0.0/22 combines four /24 networks.

Packet Tracer Lab: Subnetting in Action.

Scenario:

You have three departments.

  • Admin (needs 50 hosts)
  • IT (needs 30 hosts).
  • Finance (needs 14 hosts).
    Use VLSM to subnet efficiently.
  • Admin: /26 (64 addresses)
  • IT: /27 (32 addresses)
  • Finance: /28 (16 addresses).

Assign subnets and set IP addresses on PCs and routers.

Real-world Use Case
Retail chain of 20 stores:
Every store need its own subnet for security, management, and performance. Subnetting enables efficient use of IP addresses and simple troubleshooting.

  • Subnetting Guide
  • Essential Network Devices
  • 🌐 IP Addressing – Cisco Docs
  • 🌐 Subnetting Made Easy – FreeCodeCamp

What is a subnet mask?

A subnet mask determines how many bits are used for network vs host. For example, 255.255.255.0 = /24 = 256 IPs total.

What is the difference between public and private IP?

Private IPs are used inside local networks and not routed on the internet. Public IPs are globally unique and internet-routable.

Why is subnetting important for CCNA?

It’s tested in multiple CCNA questions and required in almost all labs. You’ll use it to allocate IPs and plan networks.

What’s the easiest way to learn subnetting?

Practice! Use the powers of 2 (2^n) and work backward from how many hosts or subnets you need.

如果你更愿意有人一步步带你完成此过程,或者需要特定的 Packet Tracer 实验完成并解释,而不是自己摸索,请查看 CCNA 与 Packet Tracer 辅导 页面了解其工作原理。

作者

ZILL E ALI

拥有 MTCNA 和 MTCRE 认证的网络工程师、ISP 基础设施专家,Developer Zon 创始人。在此撰写关于 MikroTik、Cisco、ISP 基础设施以及偶尔的构建日志。

留下回复

本站使用 Akismet 来减少垃圾评论。了解您的评论数据如何被处理。