Subnetting
Technique to divide a subnet to more subnet
Dividing
For example, lets subnetting 10.10.10.0/24
To divide this subnet, we first increment the / by 1 and then divide the address by 2. So:
10.10.10.0/2410.10.10.0/2510.10.10.128/25
- Note:
/25means7for hosts which allows2^7 = 128usable hosts
We can continue to divide like so:
10.10.10.0/2410.10.10.0/2510.10.10.0/2610.10.10.64/26
10.10.10.128/2510.10.10.128/2610.10.10.192/26
Merging
For example merge the 2 subnets 10.10.0.0/24 and 10.10.1.0/24 we need to identify the binary format:
10.10.0.0/24xxxxxxxx.xxxxxxxx.00000000.00000000
10.10.1.0/24xxxxxxxx.xxxxxxxx.00000001.00000000
To merge these 2, we need the 24th bit to be flexible (either 1 or 0). Therefore, we can make it a /23.
- So we have a
10.10.0.0/23can cover both
Similarly, if we have a
10.10.2.0/24xxxxxxxx.xxxxxxxx.00000010.00000000
10.10.3.0/24xxxxxxxx.xxxxxxxx.00000011.00000000
We can have the 24th bit as the change bit and prefix as 1 like:

So we can merge into a 10.10.2.0/23 which have
xxxxxxxx.xxxxxxxx.0000001c.cccccccc- where
cis the flexible bit.
IPv6 subnet
The subnet part of the IPv6 address is the S bit in the middle

P bit is normally 32-48 bit
It's going to be 64 - P bit