144.45.24.0/21

Subnet mask: 255.255.248.0

Valid Host IP Range 144.45.24.1 - 144.45.24.254

140.10.10.0/23

Subnet mask: 255.255.254.0

Valid Host IP Range 140.10.10.1 - 140.10.11.254

20.0.0.0 subnet 255.254.0.0

20.0.0.0/15

Valid Host IP Range 20.0.0.1 - 20.1.255.254

The rational behind the slash notation "/" is the number of bits of the binary representation of the IP address are used to determine the subnet address.

"/24" is easy because it uses all of the first three octets to determine the subnet leaving you with just the last octet for hosts, x.x.x.1 - x.x.x.254

i.e. 255.255.255.255 = 11111111.11111111.11111111.11111111

so a "/15" subnet means that the first 15 bits are the network address and the rest is used for determining host addresses.

so for the 20.0.0.0 example:

"00010100.0000000"0.00000000.00000000 = 20.0.0.0/15 the quoted portion is the bits used for the subnet.

So the valid host IP range will be from 0.00000000.00000000 to 1.11111111.11111111

convert from binary and you get x.0.0.1 to x.1.255.254 (excluding the all 0s and all 1s as those addresses are used for the network address and broadcast address)

The first 15 bits being the subnet gives you the subnet mask:11111111.11111110.00000000.00000000 = 255.254.0.0

This is a really abbreviated explanation and relies on an understanding of how to count in binary, or at least convert from binary to decimal and back again.

Hope this helps. You can do a search online for Subnet calculators that will take the work out of calculating the subnet masks and valid hosts for a giving ip/#

Subnet mask: 255.255.248.0

Valid Host IP Range 144.45.24.1 - 144.45.24.254

140.10.10.0/23

Subnet mask: 255.255.254.0

Valid Host IP Range 140.10.10.1 - 140.10.11.254

20.0.0.0 subnet 255.254.0.0

20.0.0.0/15

Valid Host IP Range 20.0.0.1 - 20.1.255.254

The rational behind the slash notation "/" is the number of bits of the binary representation of the IP address are used to determine the subnet address.

"/24" is easy because it uses all of the first three octets to determine the subnet leaving you with just the last octet for hosts, x.x.x.1 - x.x.x.254

i.e. 255.255.255.255 = 11111111.11111111.11111111

so a "/15" subnet means that the first 15 bits are the network address and the rest is used for determining host addresses.

so for the 20.0.0.0 example:

"00010100.0000000"0.000000

So the valid host IP range will be from 0.00000000.00000000 to 1.11111111.11111111

convert from binary and you get x.0.0.1 to x.1.255.254 (excluding the all 0s and all 1s as those addresses are used for the network address and broadcast address)

The first 15 bits being the subnet gives you the subnet mask:11111111.11111110.000

This is a really abbreviated explanation and relies on an understanding of how to count in binary, or at least convert from binary to decimal and back again.

Hope this helps. You can do a search online for Subnet calculators that will take the work out of calculating the subnet masks and valid hosts for a giving ip/#