基于192.168.10.0/24的VLAN IPv4地址规划及子网分配表需求问询
Hey there, let's break down the subnetting for your three VLANs step by step using the 192.168.10.0/24 base network. First, I need to figure out the right subnet size for each VLAN by calculating the required host bits—since every subnet needs to set aside one address for the network itself and one for the broadcast, the formula for usable hosts is 2^n - 2 where n is the number of host bits we allocate.
Step-by-Step Subnet Calculations
VLAN 20 (L): 115 hosts
We need at least 115 usable addresses. Let's check:2^7 - 2 = 126, which covers our needs. That means we'll use 7 host bits, so the subnet mask is/25(or255.255.255.128). This takes the first half of the base network.VLAN 10 (S): 58 hosts
For 58 hosts,2^6 - 2 = 62is more than enough. We use 6 host bits here, giving a subnet mask of/26(or255.255.255.192). This fits neatly into the next available block after VLAN 20's subnet.VLAN 99 (IT): 12 hosts
For 12 hosts,2^4 - 2 = 14works perfectly. We use 4 host bits, so the subnet mask is/28(or255.255.255.240). This takes the next small block in the remaining address space.
Final Subnet Assignment Table
| VLAN ID (名称) | 网络地址 | 子网掩码 | 首个可用地址 | 最后可用地址 | 广播地址 |
|---|---|---|---|---|---|
| VLAN 20 (L) | 192.168.10.0/25 | 255.255.255.128 | 192.168.10.1 | 192.168.10.126 | 192.168.10.127 |
| VLAN 10 (S) | 192.168.10.128/26 | 255.255.255.192 | 192.168.10.129 | 192.168.10.190 | 192.168.10.191 |
| VLAN 99 (IT) | 192.168.10.192/28 | 255.255.255.240 | 192.168.10.193 | 192.168.10.206 | 192.168.10.207 |
A quick note: After assigning these subnets, there's still unused address space in the 192.168.10.0/24 network (from 192.168.10.208 to 192.168.10.255) that you can reserve for future VLANs or other uses.
备注:内容来源于stack exchange,提问作者Nate

