子網路計算機與 VLSM 設計工具
快速規劃 IPv4 網路。直接在瀏覽器中獲取網路位址、廣播位址、遮罩、主機範圍以及完整的可變長度子網路規劃。
計算子網路或設計 VLSM 規劃
192.168.1.0/24
32-Bit Binary Bitmask Breakdown
Every IPv4 address consists of 32 binary bits divided into 4 octets. The bitwise AND operation (IP AND Mask = Network) isolates the network ID from the host space:
Subnet Decomposition (Split /24 into 2x /25 Subnets)
Need to segment this network for guest isolation or separate VLANs? Borrowing 1 host bit divides 192.168.1.0/24 into two equal /25 subnets:
| Subnet CIDR | Usable Host Range | Broadcast Address | Usable Hosts | Action |
|---|---|---|---|---|
| 192.168.1.0/25 | 192.168.1.1 - 192.168.1.126 | 192.168.1.127 | 126 | |
| 192.168.1.128/25 | 192.168.1.129 - 192.168.1.254 | 192.168.1.255 | 126 |
Device CLI Configuration Generator
! Cisco IOS / Catalyst / Nexus Configuration ! VLAN Interface & DHCP Pool Definition interface Vlan100 description Purple-Managed Guest WiFi ip address 192.168.1.1 255.255.255.0 no shutdown exit ip dhcp excluded-address 192.168.1.1 ip dhcp pool GUEST_WIFI_POOL network 192.168.1.0 255.255.255.0 default-router 192.168.1.1 dns-server 1.1.1.1 8.8.8.8 lease 0 1 0 exit
為什麼子網路劃分依然至關重要
子網路劃分將一個 IP 範圍分割成多個較小且隔離的網路,讓您可以區隔訪客、員工和 IoT 流量,控制廣播網域,並高效利用位址空間。此計算機可同時處理單一子網路計算,以及用於多網段設計的可變長度子網路遮罩 (VLSM)。
此工具為您提供
- 任何 CIDR 前綴的網路與廣播位址、子網路遮罩、萬用字元遮罩以及可用主機範圍。
- 根據所需的主機數量(由大到小排序)為每個子網路量身打造的 VLSM 分配規劃,且完全不重疊。
- 即時且私密的結果。所有計算均在本地執行,不會傳送任何資料至伺服器。
IPv4 CIDR Prefix, Subnet Mask, and Host Capacity Reference Table
Quick reference guide mapping CIDR prefix lengths (/1 to /32) to dotted-decimal subnet masks, wildcard masks, usable IP addresses, and common network engineering applications.
| CIDR | Subnet Mask | Wildcard Mask | Usable Hosts | Common Enterprise Use Case |
|---|---|---|---|---|
| /32 | 255.255.255.255 | 0.0.0.0 | 1 | Host route, loopback interface, single endpoint |
| /31 | 255.255.255.254 | 0.0.0.1 | 2 | Point-to-point router links (RFC 3021 standard) |
| /30 | 255.255.255.252 | 0.0.0.3 | 2 | Legacy point-to-point links (dedicated network/broadcast) |
| /29 | 255.255.255.248 | 0.0.0.7 | 6 | Small router links, firewall DMZ with static IPs |
| /28 | 255.255.255.240 | 0.0.0.15 | 14 | Server rack management subnet, lab environment |
| /27 | 255.255.255.224 | 0.0.0.31 | 30 | Small branch office, security camera / IoT VLAN |
| /26 | 255.255.255.192 | 0.0.0.63 | 62 | Departmental subnet (e.g. accounting, executives) |
| /25 | 255.255.255.128 | 0.0.0.127 | 126 | Medium department, secondary branch VLAN |
| /24 | 255.255.255.0 | 0.0.0.255 | 254 | Standard Class C LAN, default office subnet |
| /23 | 255.255.254.0 | 0.0.1.255 | 510 | Hotel guest WiFi, boutique venue, medium office |
| /22 | 255.255.252.0 | 0.0.3.255 | 1,022 | Corporate campus VLAN, medium venue guest WiFi |
| /21 | 255.255.248.0 | 0.0.7.255 | 2,046 | University student accommodation, large venue WiFi |
| /20 | 255.255.240.0 | 0.0.15.255 | 4,094 | Stadium, convention centre, airport guest WiFi scope |
| /19 | 255.255.224.0 | 0.0.31.255 | 8,190 | Metropolitan network, major transit hub infrastructure |
| /18 | 255.255.192.0 | 0.0.63.255 | 16,382 | Large enterprise site aggregation, regional network |
| /17 | 255.255.128.0 | 0.0.127.255 | 32,766 | Multi-campus enterprise block allocation |
| /16 | 255.255.0.0 | 0.0.255.255 | 65,534 | Standard Class B supernet, private cloud VPC |
| /12 | 255.240.0.0 | 0.15.255.255 | 1,048,574 | RFC 1918 172.16.0.0/12 private range block |
| /8 | 255.0.0.0 | 0.255.255.255 | 16,777,214 | RFC 1918 10.0.0.0/8 private major network block |
High-density WiFi subnetting and DHCP scope best practices
Designing IP subnets for wireless venues differs fundamentally from wired switching architectures. Wireless devices share physical RF airtime. When a device sends an Address Resolution Protocol (ARP) broadcast or multicast packet, the wireless access point must retransmit that frame at low base data rates across all associated radios.
1. Limit broadcast domain sizes
Never deploy large flat /16 networks (65,534 hosts) on guest SSIDs without client isolation. A /22 (1,022 hosts) or /23 (510 hosts) subnet provides sufficient lease room while preventing excessive multicast airtime consumption.
2. Tune DHCP lease durations
In transient environments like retail malls, cafes, and stadiums, set DHCP lease times to 30 to 60 minutes. Long 24-hour leases cause scope exhaustion as transient visitors retain IP leases long after leaving the venue.
3. Enable wireless client isolation
Enabling AP client isolation prevents peer-to-peer device traffic on public subnets, blocking internal network scanning and mitigating malicious ARP poisoning attacks.
For student accommodation, multi-dwelling units (MDUs), and build-to-rent (BTR) communities, traditional VLAN-per-user architectures exhaust switch VLAN tables (limited to 4,094 VLANs). Learn how Purple uses Identity Pre-Shared Keys (iPSK) and RADIUS-backed dynamic isolation to give every resident a private personal area network on a single shared SSID.
Download the high-density WiFi architecture & DHCP sizing guide
Get our reference architecture guide for multi-vendor campus networks. Includes DHCP scope sizing templates for Cisco Meraki, HPE Aruba, Ruckus, and Juniper Mist, plus VLAN security checklists.
Related network engineering tools and technical guides
Multi-Tenant iPSK Subnet Designer →
Design resident subnets and DHCP pools for student housing and BTR developments.
Access Point Calculator →
Calculate required AP density and client capacity across indoor and outdoor venue areas.
Captive Portal Guide →
Comprehensive architectural guide to guest onboarding, walled gardens, and RADIUS integration.
Enterprise WiFi Security Guide →
Deep dive into 802.1X, WPA3-Enterprise, certificate-based staff authentication, and network isolation.
關於 IP 子網路劃分與 CIDR 的常見問題
子網路遮罩與 CIDR 表示法有何不同?
子網路遮罩是一個 32 位元的點分十進位數字(例如 255.255.255.0),用於將 IP 位址的網路部分與主機部分隔開。無類別域間路由(CIDR)表示法則將相同的遮罩表示為斜線,後跟連續領先二進位 1 的數量(例如 /24)。CIDR 消除了嚴格的 Class A、B 和 C 邊界,以允許靈活的網路前綴長度。
如何計算 IPv4 子網路中可用的主機位址?
可用 IPv4 主機的計算公式為 2^(32 - 前綴) - 2。根據 RFC 標準,保留了兩個位址:第一個位址(所有主機位元均為 0)為網路 ID,最後一個位址(所有主機位元均為 1)為定向廣播位址。例如,/24 子網路具有 32 - 24 = 8 個主機位元,可產生 2^8 - 2 = 254 個可用主機。根據 RFC 3021 的點對點 /31 子網路和單一主機 /32 loopbacks 則是例外,分別允許 2 個和 1 個可用位址。
針對訪客 WiFi 和高密度場所,建議使用什麼大小的子網路?
對於體育場、飯店和零售商場等高密度訪客 WiFi 環境,建議使用 /22 子網路(1,022 個可用租約)或 /20 子網路(4,094 個可用租約),並搭配較短的 DHCP 租期(例如 30 至 60 分鐘)。這可以防止 DHCP 範圍耗盡,同時用戶端隔離可防止無線網路中的 ARP 廣播風暴。
什麼是可變長度子網路遮罩(VLSM),為什麼要使用它?
VLSM 允許網路工程師根據每個區段(例如 POS 終端機、企業工作站、訪客 WiFi 和路由器鏈路)的特定主機需求,將 IP 位址區塊劃分為不同大小的子網路。與固定長度子網路劃分相比,這可以避免浪費位址空間。
為什麼高密度 WiFi 網路應避免使用大型扁平的 /16 子網路?
扁平的 /16 子網路會建立龐大的廣播網域,容納多達 65,534 個主機。在無線網路中,廣播和多播訊框(例如 ARP 請求和 mDNS)會以較低的傳統數據傳輸率在所有存取點之間傳輸,從而消耗空中時間並降低吞吐量。將其分割為較小的 /22 或 /23 VLAN,並啟用 AP 用戶端隔離,可維持空中時間效率。
Purple 如何與企業子網路和 VLAN 分割協同運作?
Purple 與您的企業網路基礎架構(Cisco Meraki、HPE Aruba、Ruckus、Juniper Mist 和 Fortinet)整合,提供雲端強制入口、透過 RADIUS 進行的動態 VLAN 導向,以及住戶隔離的 iPSK 網路,而無需重新設定硬體。
Planning a venue network?
Subnetting is the foundation. Purple layers guest onboarding, captive portals, and location analytics on top of the network you design here, across Cisco Meraki, HPE Aruba, Ruckus, and Juniper Mist.
Book a 20-min demoNetforge Network Multi-Tool
Run offline network health checks, path analysis, and latency diagnostic scans directly from your desktop.
Download Multi-Tool