Comments

You must log in or register to comment.

michal_hanu_la t1_j6onuon wrote

IP addresses are numbers, each 32 bits long.

A subnet of a given prefix length is a set of addresses for which the first prefix length bits are the same.

So 10.0.0.0/16 means all addresses where the first 16 bits are 00001010 (10) 00000000 (0).

If you wanted a set of addresses with the first 24 bits the same as 10.0.0.64, that would give you all addresses between 10.0.0.0 and 10.0.0.255 (inclusive), which we conventionally call 10.0.0.0/24.

But you already gave 64 of those addresses to someone, so you need to find 256 addreses all with the same first 24 bits and that is 10.0.1.0/24.

3

muwave t1_j6opyzl wrote

You could change your netmask to /22 giving you 4 subnets and 1022 hosts in each, or /23 with 2 subnets of 510 hosts each.

1

DeHackEd t1_j6oqaxs wrote

A router's job is to find a subnet match in its list of routes, and forward data to that destination. It does this at the binary level. In hardware routers, there's a lookup table that has 3 types of "bits": match 0, match 1, and don't care (X). In particular the don't-care bits must be at the right-most edge and grouped.

Your first /26 is, in the router's table as a 32 bit prefix:

00001010 00000000 00000000 00XXXXXX
     (10)   (0)     (0)     (0-63 range)

The tolerable range of bits is:

00001010 00000000 00000000 00000000
   to
00001010 00000000 00000000 00111111

(When writing a subnet, you always have the don't-care bits as 0, and most software will assume that if you set any of them to 1, it's a mistake to be pointed out)

This means the subnet MUST be split along a binary point. So you 10.0.0.64 through 10.0.1.63 subnet (which is actually the size of a /24) doesn't work because the numerical range is:

00001010 00000000 00000000 01000000 (10.0.0.64)
   to
00001010 00000000 00000001 00111111 (10.0.1.63)

Can't put in "don't care" bits to get the coverage you want.

1