0

Let's say, we are given a range of 192.168.101.64 - 192.168.102.128.

What is the easiest way to find the largest possible IPv4 network within specified range, including network address, subnet mask and broadcast address?

Same thing for 192.168.104.31 - 192.168.106.127.

In the first case I think it would be network for 127 hosts:

Network address: 192.168.102.0

Subnet mask: 255.255.255.0

Broadcast: 192.168.102.128

But I'm not sure about this and does not have any idea for the second case.

4
  • 1
    Normally, IP addresses are assigned either individually (one by one, per host; not per network) or in subnet blocks (in which case your question is moot). Either way, your question appears to not match the way things are done in the real world. What is the real problem you are trying to solve, here? There might exist a much easier solution that accomplishes your actual goal.
    – user
    May 23, 2014 at 14:02
  • 2
    This question appears to be off-topic because it does not appear to be about an actual problem. See What types of questions should I avoid asking?.
    – user
    May 23, 2014 at 14:03
  • @MichaelKjörling The problem is, some addresses are assigned to existing subnets and I have to create another subnet in some weird range of addresses (between these existing ones) for as many hosts as possible. May 23, 2014 at 14:22
  • Really this all comes down to CIDR principles. You can use a subnet calculator to figure it out if you don't want to learn all the math involved. Here is a good reference for manually calculating it out based on an IP address and subnet mask: wikihow.com/Calculate-Network-and-Broadcast-Address - otherwise, there are dozens of subnet calculators such as this one: subnetmask.info
    – MaQleod
    May 23, 2014 at 15:58

2 Answers 2

1

For 192.168.101.64-192.168.102.128: You have two /25 ranges as largest: 192.168.101.128/25, 192.168.102.0/25

For 192.168.104.31 - 192.168.106.12: The largest is a /24: 192.168.105.0/24 You also have two /25 ranges as second largest: 192.168.104.128/25, 192.168.106.0/25.

1
  • This. I think that's about the best one can do with the ranges given. Note that these are separate subnets, so without some sort of bridging or routing, hosts on one side of the /25 boundary aren't going to be able to talk to hosts on the other side of the boundary.
    – user
    May 23, 2014 at 18:30
0

I believe that this would be a 192.168.104.0/22 network

This would encompass host ranges from 192.168.104.1 - 192.168.107.254 Broadcast of 192.168.107.255 Subnet 255.255.255.252 Ammt of hosts would be 762

If u were to go to a /23 subnet your range of hosts would only go up to 192.168.105.254

1
  • 2
    I think he is asking about the largest sections within those specified and not looking for one including them.
    – Bgs
    May 23, 2014 at 15:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .