Ok, I am not a mathgician. But I already did some subnetting in my life and thats how I do it:
Check if the task is possible:255.254.0.0 = 11111111.11111110.00000000.00000000 = 2^17 (count of 0's) = 131072 addresses available
15000 + 2000 + 1024 + 500 + 200 + 10000 + 30 + 17000 = 45754
131072 > 45754 (means its possible)
First Subnet1 .How many bits do you need for 15000 hosts:
11111111 111111 = 2^14 = 16384 (means we need 14 bits in our subnetmask for the host part -> the host parts are 0's in the netmask)
11111111 11111111 11000000 00000000 = 255.255.192.0
2 . Calculate first and last address:
first = (addr && netmask)
last = (addr && netmask) + !netmask
First:
123.64.0.0 = 01111011 01000000 00000000 00000000
255.255.192.0 = 11111111 11111111 11000000 00000000
01111011 01000000 00000000 00000000
&& 11111111 11111111 11000000 00000000
01111011 01000000 00000000 00000000 = 123.64.0.0
Last:
01111011 01000000 00000000 00000000
+ 00000000 00000000 00111111 11111111
01111011 01000000 00111111 11111111 = 123.64.63.255
The Answer for the first subnet:
2.1.1 = 123.64.0.0
2.1.2 = 255.255.192.0
2.1.3 = 123.64.63.255
CIDR = /18
Host = 123.64.0.1 - 123.64.63.254
Second subnet:starting point: 123.64.64.0
1. How many bits do you need for 2000 Hosts:
11111111 111 = 2^11 = 2048
11111111 11111111 11111000 00000000 = 255.255.248.0
First:
123.64.64.0 = 01111011 01000000 01000000 00000000
255.255.248.0 = 11111111 11111111 11111000 00000000
01111011 01000000 01000000 00000000
&& 11111111 11111111 11111000 00000000
01111011 01000000 01000000 00000000 = 123.64.64.0
Last:
01111011 01000000 01000000 00000000
+ 00000000 00000000 00000111 11111111
01111011 01000000 01000111 11111111 = 123.64.71.255
The answer for the second subnet:
2.1.1 = 123.64.64.0
2.1.2 = 255.255.248.0
2.1.3 = 123.64.71.255
CIDR = /21
Host = 123.64.64.1 - 123.64.71.254
Now go on and build the next subnets
Hope that helps!