COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### Possible IP conflict, bad math, or over thinking. Need clarification.

• Follow

```Hello all,
I'm looking over some subnet math and my brain is telling me there is
a problem, but the force is telling me otherwise.

My main question is: Can you have these two networks living together
and not overlap each other? Part of me says yes because the masks are
different, but the other part says no because the IP's would be
identical and create a conflict on the network. Am I over thinking
this?

non-dhcp range: 10.30.23.128/25
dhcp range: 10.30.23.128/26
Why someone is doing it this way is beyond me; I'm just trying to
figure out the logic. Here is the math that got me to the point I'm
at. Am I on track with the thinking and the math?

range non-dhcp: 10.30.23.128/25
23.128 in binary
128 64 32 16 8 4 2 1 || 128 64 32 16 8 4 2 1
0   0   0   1  0  1 1 1    1   0   0   0  0 0 0 0

128 64 32 16 8 4 2 1 || 128 64 32 16 8 4 2 1 || 128 64 32 16 8 4 2 1
|| 128 64 32 16 8 4 2 1
1   1   1   1  1  1 1 1   1   1   1   1  1  1 1 1      1   1   1
1  1  1 1 1    1   0   0   0  0 0 0 0
255			255			255			128

128 64 32 16 8 4 2 1 || 128 64 32 16 8 4 2 1
0   0   0   1  0  1 1 1   1   0   0   0  0 0 0 0
1   1   1   1  1  1 1 1   1 || 0  0   0  0 0 0 0	 || is visual guide
for the network separation
0   0   0   1  0  1 1 1   1 || 0  0   0  0 0 0 0	= Network ID 		.
23.128
0   0   0   1  0  1 1 1   1 || 0  0   0  0 0 0 1	= First Usable  IP	.
22.129
0   0   0   1  0  1 1 1   1 || 1  1   1  1 1 1 0	= Last usable IP	.
23.254
0   0   0   1  0  1 1 1   1 || 1  1   1  1 1 1 1	= Broadcast		.
23.255
Valid range is: 10.30.23.129 - 10.30.23.254
--------------------------------------------------------------------------------
DHCP range: 10.30.23.128/26
23.128 in binary
128 64 32 16 8 4 2 1 || 128 64 32 16 8 4 2 1
0   0   0   1  0  1 1 1   1   0   0   0  0 0 0 0

128 64 32 16 8 4 2 1 || 128 64 32 16 8 4 2 1 || 128 64 32 16 8 4 2 1
|| 128 64 32 16 8 4 2 1
1   1   1   1  1  1 1 1  1   1   1   1  1  1 1 1      1   1   1   1
1  1 1 1	   1    0   0   0  0 0 0 0
255			255			255			192

128 64 32 16 8 4 2 1 || 128 64 32 16 8 4 2 1
0   0   0   1  0  1 1 1   1   0   0   0  0 0 0 0
1   1   1   1  1  1 1 1   1   1 || 0   0  0 0 0 0	 || is visual
guide for the network separation
0   0   0   1  0  1 1 1   1   0 || 0   0  0 0 0 0	= Network ID 		.
23.128
0   0   0   1  0  1 1 1   1   0 || 0   0  0 0 0 1	= First Usable
IP	.22.129
0   0   0   1  0  1 1 1   1   0 || 1   1  1 1 1 0	= Last usable IP	.
23.191
0   0   0   1  0  1 1 1   1   0 || 1   1  1 1 1 1	= Broadcast		.
23.192
Valid range is: 10.30.23.129 - 10.30.23.191
```
 0

```On Nov 30, 4:33 pm, Chris <chris.bl...@gmail.com> wrote:
> Hello all,
> I'm looking over some subnet math and my brain is telling me there is
> a problem, but the force is telling me otherwise.
>
> My main question is: Can you have these two networks living together
> and not overlap each other? Part of me says yes because the masks are
> different, but the other part says no because the IP's would be
> identical and create a conflict on the network. Am I over thinking
> this?
>
> non-dhcp range: 10.30.23.128/25
> dhcp range: 10.30.23.128/26
> Why someone is doing it this way is beyond me; I'm just trying to
> figure out the logic. Here is the math that got me to the point I'm
> at. Am I on track with the thinking and the math?
>
> range non-dhcp: 10.30.23.128/25
> 23.128 in binary
> 128 64 32 16 8 4 2 1 || 128 64 32 16 8 4 2 1
>   0   0   0   1  0  1 1 1    1   0   0   0  0 0 0 0
>
> Subnet mask /25 in binary.
> 128 64 32 16 8 4 2 1 || 128 64 32 16 8 4 2 1 || 128 64 32 16 8 4 2 1
> || 128 64 32 16 8 4 2 1
>   1   1   1   1  1  1 1 1   1   1   1   1  1  1 1 1      1   1   1
> 1  1  1 1 1    1   0   0   0  0 0 0 0
>         255                     255                     255                     128
>
> Multiply last two octets of the ip address and mask together.
> 128 64 32 16 8 4 2 1 || 128 64 32 16 8 4 2 1
>   0   0   0   1  0  1 1 1   1   0   0   0  0 0 0 0
>   1   1   1   1  1  1 1 1   1 || 0  0   0  0 0 0 0       || is visual guide
> for the network separation
>   0   0   0   1  0  1 1 1   1 || 0  0   0  0 0 0 0      = Network ID            .
> 23.128
>   0   0   0   1  0  1 1 1   1 || 0  0   0  0 0 0 1      = First Usable  IP      .
> 22.129
>   0   0   0   1  0  1 1 1   1 || 1  1   1  1 1 1 0      = Last usable IP        .
> 23.254
>   0   0   0   1  0  1 1 1   1 || 1  1   1  1 1 1 1      = Broadcast             .
> 23.255
> Valid range is: 10.30.23.129 - 10.30.23.254
> --------------------------------------------------------------------------------
> DHCP range: 10.30.23.128/26
> 23.128 in binary
> 128 64 32 16 8 4 2 1 || 128 64 32 16 8 4 2 1
>   0   0   0   1  0  1 1 1   1   0   0   0  0 0 0 0
>
> Subnet mask /26 in binary.
> 128 64 32 16 8 4 2 1 || 128 64 32 16 8 4 2 1 || 128 64 32 16 8 4 2 1
> || 128 64 32 16 8 4 2 1
>   1   1   1   1  1  1 1 1  1   1   1   1  1  1 1 1      1   1   1   1
> 1  1 1 1           1    0   0   0  0 0 0 0
>         255                     255                     255                     192
>
> Multiply last two octets of the ip address and mask together.
> 128 64 32 16 8 4 2 1 || 128 64 32 16 8 4 2 1
>   0   0   0   1  0  1 1 1   1   0   0   0  0 0 0 0
>   1   1   1   1  1  1 1 1   1   1 || 0   0  0 0 0 0      || is visual
> guide for the network separation
>   0   0   0   1  0  1 1 1   1   0 || 0   0  0 0 0 0     = Network ID            .
> 23.128
>   0   0   0   1  0  1 1 1   1   0 || 0   0  0 0 0 1     = First Usable
> IP      .22.129
>   0   0   0   1  0  1 1 1   1   0 || 1   1  1 1 1 0     = Last usable IP        .
> 23.191
>   0   0   0   1  0  1 1 1   1   0 || 1   1  1 1 1 1     = Broadcast             .
> 23.192
> Valid range is: 10.30.23.129 - 10.30.23.191

The short answer is that this is not a good idea whatsoever.  Since
your router IP is the same for both ranges, and presuming you were
using the larger mask to ensure you have coverage for both networks,
this could work if the mask was only different on the nodes
network nodes.  That being said, you definitely cannot have the same
network configured on two different routers (you would have a routing
problem, as the router IPs would be the same but would need to be
split which is impossible), and most routers will not allow you to
have the same IP configured on two different physical or logical
interfaces.

In short, your first instinct is right, you CANNOT have overlap
whatsoever with the same IPs being used by two different networks,
regardless of mask.  You could probably have some really odd
configurations with masks being different on boxes themselves, and
things looking like they are working ok, although certain services
like broadcast, etc, may not be working properly and you just don't
know it because the boxes don't use those services.

You could use a secondary interface on the router and split the
networks up that way.  But in short answer to your question, no you
cannot.  You technically would have 128 - 192 assigned to both
networks, and only the bigger network will have 192-255.  Either way,
the router can't have both without a secondary interface, and without
math is fine, the overlap is what will confuse things.....
```
 0

```On Nov 30, 5:00 pm, Trendkill <jpma...@gmail.com> wrote:
> On Nov 30, 4:33 pm, Chris <chris.bl...@gmail.com> wrote:
>
>
>
> > Hello all,
> > I'm looking over some subnet math and my brain is telling me there is
> > a problem, but the force is telling me otherwise.
>
> > My main question is: Can you have these two networks living together
> > and not overlap each other? Part of me says yes because the masks are
> > different, but the other part says no because the IP's would be
> > identical and create a conflict on the network. Am I over thinking
> > this?
>
> > non-dhcp range: 10.30.23.128/25
> > dhcp range: 10.30.23.128/26
> > Why someone is doing it this way is beyond me; I'm just trying to
> > figure out the logic. Here is the math that got me to the point I'm
> > at. Am I on track with the thinking and the math?
>
> > range non-dhcp: 10.30.23.128/25
> > 23.128 in binary
> > 128 64 32 16 8 4 2 1 || 128 64 32 16 8 4 2 1
> >   0   0   0   1  0  1 1 1    1   0   0   0  0 0 0 0
>
> > Subnet mask /25 in binary.
> > 128 64 32 16 8 4 2 1 || 128 64 32 16 8 4 2 1 || 128 64 32 16 8 4 2 1
> > || 128 64 32 16 8 4 2 1
> >   1   1   1   1  1  1 1 1   1   1   1   1  1  1 1 1      1   1   1
> > 1  1  1 1 1    1   0   0   0  0 0 0 0
> >         255                     255                     255                     128
>
> > Multiply last two octets of the ip address and mask together.
> > 128 64 32 16 8 4 2 1 || 128 64 32 16 8 4 2 1
> >   0   0   0   1  0  1 1 1   1   0   0   0  0 0 0 0
> >   1   1   1   1  1  1 1 1   1 || 0  0   0  0 0 0 0       || is visual guide
> > for the network separation
> >   0   0   0   1  0  1 1 1   1 || 0  0   0  0 0 0 0      = Network ID            .
> > 23.128
> >   0   0   0   1  0  1 1 1   1 || 0  0   0  0 0 0 1      = First Usable  IP      .
> > 22.129
> >   0   0   0   1  0  1 1 1   1 || 1  1   1  1 1 1 0      = Last usable IP        .
> > 23.254
> >   0   0   0   1  0  1 1 1   1 || 1  1   1  1 1 1 1      = Broadcast             .
> > 23.255
> > Valid range is: 10.30.23.129 - 10.30.23.254
> > --------------------------------------------------------------------------------
> > DHCP range: 10.30.23.128/26
> > 23.128 in binary
> > 128 64 32 16 8 4 2 1 || 128 64 32 16 8 4 2 1
> >   0   0   0   1  0  1 1 1   1   0   0   0  0 0 0 0
>
> > Subnet mask /26 in binary.
> > 128 64 32 16 8 4 2 1 || 128 64 32 16 8 4 2 1 || 128 64 32 16 8 4 2 1
> > || 128 64 32 16 8 4 2 1
> >   1   1   1   1  1  1 1 1  1   1   1   1  1  1 1 1      1   1   1   1
> > 1  1 1 1           1    0   0   0  0 0 0 0
> >         255                     255                     255                     192
>
> > Multiply last two octets of the ip address and mask together.
> > 128 64 32 16 8 4 2 1 || 128 64 32 16 8 4 2 1
> >   0   0   0   1  0  1 1 1   1   0   0   0  0 0 0 0
> >   1   1   1   1  1  1 1 1   1   1 || 0   0  0 0 0 0      || is visual
> > guide for the network separation
> >   0   0   0   1  0  1 1 1   1   0 || 0   0  0 0 0 0     = Network ID            .
> > 23.128
> >   0   0   0   1  0  1 1 1   1   0 || 0   0  0 0 0 1     = First Usable
> > IP      .22.129
> >   0   0   0   1  0  1 1 1   1   0 || 1   1  1 1 1 0     = Last usable IP        .
> > 23.191
> >   0   0   0   1  0  1 1 1   1   0 || 1   1  1 1 1 1     = Broadcast             .
> > 23.192
> > Valid range is: 10.30.23.129 - 10.30.23.191
>
> The short answer is that this is not a good idea whatsoever.  Since
> your router IP is the same for both ranges, and presuming you were
> using the larger mask to ensure you have coverage for both networks,
> this could work if the mask was only different on the nodes
> network nodes.  That being said, you definitely cannot have the same
> network configured on two different routers (you would have a routing
> problem, as the router IPs would be the same but would need to be
> split which is impossible), and most routers will not allow you to
> have the same IP configured on two different physical or logical
> interfaces.
>
> In short, your first instinct is right, you CANNOT have overlap
> whatsoever with the same IPs being used by two different networks,
> regardless of mask.  You could probably have some really odd
> configurations with masks being different on boxes themselves, and
> things looking like they are working ok, although certain services
> like broadcast, etc, may not be working properly and you just don't
> know it because the boxes don't use those services.
>
> You could use a secondary interface on the router and split the
> networks up that way.  But in short answer to your question, no you
> cannot.  You technically would have 128 - 192 assigned to both
> networks, and only the bigger network will have 192-255.  Either way,
> the router can't have both without a secondary interface, and without
> that, broadcast would be broken for your smaller network nodes.  Your
> math is fine, the overlap is what will confuse things.....

And to make things clear, masks just divide up the network in
different ranges of sizes.  /24 is 255, /25 is 128 blocks, and /26 is
64 blocks.  You can have /25 on 0-127, and two /26s at 128 and 192.
You can have a /25, a /26, and two /27s on 192 and 224.  You just
can't assign an IP (or range of IPs) to two different masks
(technically may be possible, and may work, but just not advisable as
you will be breaking something somewhere, even if the hardware lets
you configure it).
```
 0

```Thanks for the quick response. I was sure there would be a conflict,
but I just needed to be sure. I know you could probably set the nodes
up to do whatever they want in that subnet, but you are right...it
would break something somewhere and it would be 4pm on a Friday of a
long weekend that someone would want it fixed, traced, documented, and
discussed until who knows when.

Thanks for the awesome explanation too.

Chris.
```
 0

3 Replies
76 Views