Can anyone explain or give me some example for the reason why we start subneting using the largest subnets first? What are consequences of opposite approach?
4 Answers
This is a most extreme example. Subnet 10.0.0.0 /8 for 2 networks with 2 hosts each.
Network DirectedBroadcast CIDR Mask UsableHosts
10.0.0.0 10.127.255.255 9 255.128.0.0 8,388,606 AVL
10.128.0.0 10.191.255.255 10 255.192.0.0 4,194,302 AVL
10.192.0.0 10.223.255.255 11 255.224.0.0 2,097,150 AVL
10.224.0.0 10.239.255.255 12 255.240.0.0 1,048,574 AVL
10.240.0.0 10.247.255.255 13 255.248.0.0 524,286 AVL
10.248.0.0 10.251.255.255 14 255.252.0.0 262,142 AVL
10.252.0.0 10.253.255.255 15 255.254.0.0 131,070 AVL
10.254.0.0 10.254.255.255 16 255.255.0.0 65,534 AVL
10.255.0.0 10.255.127.255 17 255.255.128.0 32,766 AVL
10.255.128.0 10.255.191.255 18 255.255.192.0 16,382 AVL
10.255.192.0 10.255.223.255 19 255.255.224.0 8,190 AVL
10.255.224.0 10.255.239.255 20 255.255.240.0 4,094 AVL
10.255.240.0 10.255.247.255 21 255.255.248.0 2,046 AVL
10.255.248.0 10.255.251.255 22 255.255.252.0 1,022 AVL
10.255.252.0 10.255.253.255 23 255.255.254.0 510 AVL
10.255.254.0 10.255.254.255 24 255.255.255.0 254 AVL
10.255.255.0 10.255.255.127 25 255.255.255.128 126 AVL
10.255.255.128 10.255.255.191 26 255.255.255.192 62 AVL
10.255.255.192 10.255.255.223 27 255.255.255.224 30 AVL
10.255.255.224 10.255.255.239 28 255.255.255.240 14 AVL
10.255.255.240 10.255.255.247 29 255.255.255.248 6 AVL
10.255.255.248 10.255.255.251 30 255.255.255.252 2 REQ 2
10.255.255.252 10.255.255.255 30 255.255.255.252 2 REQ 2
Imagine what would have happened if you had picked those two in the middle. My calculator works differently than others I have seen. You tell it the starting point i.e. 10.0.0.0 /8 or 192.168.1.0 /24, and the number and size of the networks you want like this
1,30 '1 network with 30 host
2,10 '2 nets with 10 hosts
1,4 '1 net with 4 hosts
Network DirectedBroadcast CIDR Mask UsableHosts
192.168.1.0 192.168.1.127 25 255.255.255.128 126 AVL
192.168.1.128 192.168.1.159 27 255.255.255.224 30 AVL
192.168.1.160 192.168.1.191 27 255.255.255.224 30 REQ 30
192.168.1.192 192.168.1.207 28 255.255.255.240 14 AVL
192.168.1.208 192.168.1.223 28 255.255.255.240 14 REQ 10
192.168.1.224 192.168.1.239 28 255.255.255.240 14 REQ 10
192.168.1.240 192.168.1.247 29 255.255.255.248 6 AVL
192.168.1.248 192.168.1.255 29 255.255.255.248 6 REQ 4
- 683
It is not a fixed rule, you can start subneting using the smallest subnet first or any order you like. However, with variable length subnet masks (VLSM) starting by the largest is easier to manage and support future modifications.
Starting by the largest is more space efficient, since you can borrow more bits for the smaller subnets. Since you can only subnet an address range at certain locations, you will have problems matching some addresses. Consider this:
1st split == 128 spaces
2nd split == 64 spaces
3rd split == 32 spaces
Every time you split you get less space. Imagine you need 2 subnets, one for 70 pcs and another for 3. You will make a better use of your addressing space starting by the biggest one first. It is the most compact way
- 113
You want to subnet in such a way that you have the largest block of addresses available when done. I have a subnet calculator, and as an example, I took 192.168.1.0 /24, and told it I wanted 2 networks of 30 hosts, and 1 network of 10 hosts. Here is the output:
192.168.1.0 /25 -> 126 (128) ++
192.168.1.128 /27 -> 30 (32)
192.168.1.160 /27 -> 30 (32)
192.168.1.192 /28 -> 10 (16)
An explanation of the above
Net CIDR Hosts Max Hosts(includes net# and directed broadcast)
192.168.1.0 25 126 (128)
192.168.1.128 27 30 (32) - 0 available
192.168.1.160 27 30 (32) - 0 available
192.168.1.192 28 10 (16) - 4 more available
The Max Hosts includes the network number and the directed broadcast, so for example, if you have 32 max, then only 30 are able to be assigned.
- 683
Maybe it's not a fixed rule, but I remember, when learning for CCNA and practicing in Packet Tracer, I've got error when set up smaller subnet first.