How to create a good IPv4 network?

Following this topic:

to create an IPv4 network where I am the only user running tests for passion, I don’t worry much about the “numbers I set.” I know the standard values.
I realize by myself that things change, in case you have to create (from scratch) a network for an important entity, where setting it up well is the basis of everything.
And here are my questions:

Class A (only approximately):

  1. What IP address would be best to assign to IPFire (green)?
  2. In what RANGE of IPs (green) would it be best to set IPFire’s DHCP server?
  3. Which IPs (green) would be best left out of the RANGE of IPFire’s DHCP server?

Class B (only approximately):
same 3 questions.

Class C (only approximately):
same 3 questions.

I wrote “only approximately” because I know very well that, on a practical level, there can be many technical problems that turn things upside down.
I thank in advance, hoping this will be helpful :wink:.

Read this first. (ignore the Class D and Class E for now)

I can only answer for Class C (since that is what I am familiar with)

I’d pick 192.168.10.1

I’d pick 192.168.10.100 to 192.168.10.199
(I have way less then 100 devices)

Must leave out? I think there are a few (sorry I may not remember them correctly):
192.168.10.0
192.168.10.1 ← I use this for routers.
192.168.10.254 ← this one I cannot remember -sorry
192.168.10.255 ← broadcast

2 Likes

Thank you very much. You have already given me very good clues :smiley:.
192.168.10.254
I think you can use it as a regular IP. I’ve had many routers give me a factory 254 end address.
If the router has .1 I have free .254 or vice versa.

All IPs before 100 and after 199 are not assigned in dhcp.

It is only because of the above. There really is no other reason…

You can pick whatever number of DHCP address you need. If you need 150 then feel free to pick a bigger range.

1 Like

Correct. I think the ones you mentioned are the guideline ones. I happen to find in routers from 100 to 200 almost all the time. By default they are these :+1:.

You have to look carefully at what the netmask is to figure out what IP’s you have available and which are used for network and broadcast.

with a netmask of 255.255.255.0 and an IP of 192.168.72.5 you have the following IP’s

Network address 192.168.72.0
Broadcast address 192.168.72.255
Usable IP’s 192.168.72.1 to 192.168.72.254
Total number of hosts is 256
Total number of usable hosts is 254

Your router IP can come anywhere from the Usable IP’s range. Typically it is taken from one end or the other . @jon uses xx.yy.zz.1 while I typically use xx.yy.zz.254
You could use xx.yy.zz.147 from a technical point of view, it would just be more of a problem to ensure it did not end up in the DHCP Dynamic Range or get assigned as a Fixed Lease. Taking it at one end or the other of the Usable IP’s range ensures clariuty on the other IP’s that can be used.

If you had a netmask of 255.255.0.0 you would have

Network address 192.168.0.0
Broadcast address 192.168.255.255
Usable IP’s 192.168.0.1 to 192.168.255.254
Total number of hosts is 65536
Total number of usable hosts is 65534

So the broadcast address still has 255 as the last octet but 192.168.240.255 would be a usable IP address in the above IP range and not the Broadcast address. Also 192.168.240.0 would also be a usable IP and not a Network address.

If you have a netmask of 255.255.192.0

Network address 192.168.64.0
Broadcast address 192.168.127.255
Usable IP’s 192.168.64.1 to 192.168.127.254
Total number of hosts is 16384
Total number of usable hosts is 16382

So you choose your netmask depending on how many IP’s you need on the subnet you are going to set up.

255.255.255.0 is typically used because it gives a reasonable number of IP’s and it is easy to check that you don’t overlap with another subnet by looking at the third octet to see if it is different from the other subnet defined.

7 Likes

Thank you very much for the valuable clarifications. There are some details that I had ignored. It makes me wonder if it is good to adjust to a standard to set up a DHCP range, or the only important thing is not to create IP conflicts?

arghh, to many numbers.

image

On a slightly ludicrous point I sit here wondering how to make some logical device allocation in my Green IP range.

Router Firewall is 192.168.1.1 . If you stick with 192.168.1.1/24 that is a given. (Btw, why does some apps insist on having to type 192.168.1.0/24? Like UISP?)

Then I have three physical servers each reachable with Out-of-band management (IPMI or ILO and similar) so 2 IP’s each.

Server 1 - 192.168.1.10 for RDP and 192.168.1 11 for OOBM.
Any additional IP’s for virtual machines or such between ..1.11-19.

Server 2 - 192.168.1.20 for RDP and 192.168.1.21 for OOBM.
Any additional IP’s for virtual machines or such between ..1.21-29.

Server 3 - 192.168.1.30 for RDP and 192.168.1.31 for OOBM.
Any additional IP’s for virtual machines or such between ..1.31-39.

But wait.

One of those servers is the IPFire server.
So it already got ..1.1 as Gateway. Soo three IP addresses. Except that I don’t use RDP on that one. So two addresses. One being SSH on 22. Which is on ..1.1:22 .

Historically I always kept my NAS on ..1.100.
And always kept my main FS server on ..1.10
So that is not consistent with what I wrote above. Which leads me to through all numbers outta window and be grateful for Host Alias.

And don’t even get me started on Blue.