Subnetting
Subnetting involves breaking a large network into smaller, more manageable networks known as “subnets.” These subnets allow groups of devices to communicate within their own dedicated space, simplifying network operations. This approach enhances security and streamlines network management, as each subnet can be individually monitored and controlled.
A public subnet enables devices to connect directly to the internet, whereas a private subnet remains isolated from the internet and is generally reserved for internal communication within an organisation.
The table below has helped me easily understand subnetting and become efficient in creating subnets.
128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|
|
|
|
|
|
|
|
53 |
|
Office Hosts |
46 |
Management Hosts |
20 |
Multimedia Hosts |
14 |
Lets design a logical IP addressing scheme for a given network using Variable Length Subnet Masking (VLSM) for the IPv4 192.168.150.0/24 network.
subnet size |
network address |
first host |
last host |
broadcast address |
mask |
prefix |
|
55 |
|
|
|
|
|
|
|
48 |
|
|
|
|
|
|
|
22 |
|
|
|
|
|
|
|
16 |
|
|
|
|
|
|
|
3) Enter the subnet size. Using the binary table, work out the closest number that the hosts will fit into. 55 = 64 subnet size, 48 = 64, 22 = 32, 16 = 16
hosts | subnet size | network address | first host | last host | broadcast address | mask | prefix |
55 | 64 | 192.168.150.0 | |||||
48 | 64 | 192.168.150.64 | |||||
22 | 32 | 192.168.150.128 | | | |||
16 | 16 | 192.168.150.160 | | | | |
5) Add the first hosts. This is simply done by adding 1 to the network addresses.
subnet size |
network address |
first host |
last host |
broadcast address |
mask |
prefix |
|
55 |
64 |
192.168.150.0 |
1 |
|
63 |
|
|
48 |
64 |
192.168.150.64 |
65 |
|
127 |
|
|
22 |
32 |
192.168.150.128 |
129 |
|
159 |
|
|
16 |
16 |
192.168.150.160 |
161 |
|
175 |
|
|
7) For the last host column all that's needed to be done is remove 1 number from the broadcast addresses so 63 becomes 62.
8) To work out the mask number you need to find the subnet size in the 8-bit binary table and add all the bit numbers up to it. For example, 64 would be 128+64 = 192. The maximum being 255. 9) Lastly to enter the prefix number all you have to do is add however many numbers you used to get the mask to /24. So to get the 192 mask you added 2 numbers so you would add 2 to 24 = 26. If you added the first 3 numbers in the binary table to get the mask of 224 then you would add 3 to 24 = 27. |