New user Not sure if it is working - asks for login and password.

Started by foxint, April 16, 2024, 09:05:54 AM

Previous topic - Next topic
If you define the range from .10 to .245 you cannot have fixed reservations inside that range. So if you insist on using .144 for one PC then

- change the range to e.g. .200 - .254
- create a static entry with .144 and your PC's MAC address
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Hi Patrick

That is very confusing.

"If you define the range from .10 to .245 you cannot have fixed reservations inside that range. So if you insist on using .144 for one PC then"

As I wrote previously I "thought my IP range was 192.168.1.1 to 192.168.1.254."

Is this the same as you saying ".10 to .245?

Surely 144 is within the .1 to .254 range. I have 7 items in the 100 to 124 range. Surely 144 is not too far away and within 10 – 254.

So if 144 is not in the 1 – 245 range, and I cannot logically understand, then what is the biggest number in the 1 - 245 range, if it is not 245?

Sorry for being stupid. I am just looking at the numbers??

In this picture that you postet the range is defined as .10 to .245:


This range is used for dynamic assignments within the 192.168.1.0/24 network. That network has got addresses from .1 to .254 - correct. And repeating myself the range above is the dynamic pool. So static assignments must be in ranges .2 to .9 and .246 to .254, respectively because static and dynamic addresses must not overlap.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Hi Patrick,

I am not understanding.

Tell it to me as if I am a 5-year old.

Is the range is 192.168.1.1 to 192.168.1.245 – I am not even sure this is correct.

So what is the range (in whole numbers as the abbreviations are doing my head in) I have to work in. Bearing in mind I have devices from 192.168.1.100 to 192.168.124.

I cannot understand .2 to .9 and .246 to .254. That is 8 if you include the .2 and the .9 and that is 9 if you include the ..246 and .254. This seems very restrictive. And there is no mention of my devices between 192.168.1.100 to 192.168.124.

I am a student of the humanities and not a computer scientist.

Your network is 192.168.1.0/24.

That means you can use addresses from 192.168.1.1 to 192.168.1.254.
OPNsense has 192.168.1.1 so client devices are limited to .2 to .254.

With me so far?

Now there is a mechanism named DHCP that hands out addresses to client devices. This service has two different ways to pick an IP address for a device that asks for one.

- a static assignmen - "this device identified by this MAC adddress always gets this IP address"
- a dynamic pool - "whenever a device asks for an address pick a free one from some defined range"

If you look at your screen shot you see next to the word "Range" that the range is defined as .10 to .245.
This is something you can set.

Whenever some device ask for an address it will get a more or less random one somewhere from .10 to .245.

But you want to set a static assignment for a particular PC to .144, right?

With the range defined as above this is not possible. Because static assignments must be outside the dynamic range. This is a property of the DHCP server in OPNsense. You cannot use any address from .10 to .245 for static assignments.

That leaves .2 to .9 and .246 to .254 as free for static assignments.

If you want to use .144 for a static assignment you must redefine the dynamic range ("Range" setting in the screen shot) to not include .144.

How you do that is up to you.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Hi Patrick,

While I really appreciate what you are saying, I am not understanding it at all. Especially with the abbreviated numbers.

You lost me on line 3.

Can we limit our discussion to static IP assignment.

To confirm (I think I may/possibly/may not understand):

1.   The scope or range of IP addresses is from 192.168.1.1 to 192.168.1.254. Meaning in my confused mind is 255 possible IP addresses including 192.168.1.1 through and including 192.168.1.254.
2.   If I my understanding in (1) is correct there are 255 possible IP addresses within that range.
3.   Then why is 192.168.1.144 outside this range?
4.   192.168.1.124 is a static IP address that works with one of my PC's.
5.   If 192.168.124 works what is the largest number than works in the scope/range as defined in (1). My dim-witted brain says 192.168.1.144 is within this range – why not.
6.   What is the largest number I can assign as an IP address within the range in (1). In my experience I have reached 192.168.1.124.... can I go to 192.168.1.125 or more?

I do not understand: "That leaves .2 to .9 and .246 to .254 as free for static assignments." If we can work through 1 – 6, do I need to know what "That leaves .2 to .9 and .246 to .254 as free for static assignments" means. As I said I am confused by not using the complete number. As I said I am not sure we need to go here yet.

In summary I did not understand a word of what you wrote.

Please look at that screenshot.

It reads:

Available Range: 192.168.1.1-192.168.1.254

You are correct. These are all addresses you can use in your network.

Below that line there is another entry:

Range: from 192.168.1.10 to 192.168.1.245

This is the range that DHCP will actually use to hand out IP addresses. It won't hand out anything < 10 or anything > 245. This is called the "pool" or "dynamic range".

Now if you want to have any PC configured with a static assignment that static assignment must lie outside this dynamic pool. Because you give e.g. .144 to your PC then some day you plug some other device into your network, that requests an address, DHCP thinks "hey, I have not yet handed out .144, so here you go" - any you end up with duplicate addresses.

It is your duty as the administrator to say, e.g.

- this PC will get .144
- that PC will get .145
- all devices where I don't care will get anything from e.g. .10 to .140

You must make sure that the last range does not include the two statically defined PCs above. There's nothing "technical" about that - you have to manually manage your IP addresses. Two devices must not have the same address. So if .144 is assigned to PC 1 you cannot have .144 as part of the dynamic pool, too.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Another try. Not taking anything away from Patrick's explanation.

- Network is 192.168.1.0/24 - that makes it WHOLE range from 1 to 255. Typically first and last taken up i.e. 1 and 255.
- You define your DHCP DYNAMIC pool now: say from 100 to 200. A range carved out of the WHOLE.
That means static leases must not be overlapping with between 100 to 200.
Therefore your static leases can be issued between 2 and 99; and 201 and 254.

- To be precise on that above: dynamic from 192.168.1.100 to 192.168.1.200.
Statics: from 192.168.1.2 to from 192.168.1.99 AND from from 192.168.1.201 to from 192.168.1.254

Hi Patrick and Cookiemonster.

Thank you.

I am still confused.

There are 2 ranges:

1.   192.168.1.1 to 192.168.1.254 and
2.   A subset of the above 192.168.1.10 to 192.168.1.254.

The Dynamis range is #2 192.168.1.10 to 192.168.1.254.

Patrick said: "Now if you want to have any PC configured with a static assignment that static assignment must lie outside this dynamic pool".

Then, and I do not understand, why do I have static IP addresses within the Dynamic Range, is the Dynamic Range is off limits for static IP addresses.

I have:

192.168.1.105
192.168.1.105
192.168.1.115
192.168.1.118 and
192.168.1.124

All of which are in the Dynamic Range, that is not supposed to happen.

But why? This is in contradiction to your words.

See why I get confused.

These are not static. These are dynamic. They can change.
You plug in any device. DHCP will hand out any IP address from the dynamic range. You switch off the device. You switch it on a couple of days later. It will get another address from the dynamic pool.

If you manually set any address as static you must do this so that this static address is not inside the dynamic range.

If you don't, any new device you plug in or power on might get that same address from the dynamic pool that you already defined as static for a different device.

If you did not define any static addresses then everything will just work.

But you said you wanted to assign .144 statically to a particular PC. That's why I mentioned that you must not do that as long as the dynamic range also covers .144 or any time another device might get that same address.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Hi Patrick,

Thank you.

You are doing a super job at confusing me.

I will add a photo of my "static IP's" in OPNsense and I will add a photo of the actual IP address all but 144 that has changed to 100 have the static IP address that I assigned.

Mais pourquoi ??? But WHY ?? In one sentence you say that 192.1681.1 to 192.168.1.254 are NOT available for static IP, yet I have them

You are doing my head in...

April 19, 2024, 09:20:57 AM #56 Last Edit: April 19, 2024, 09:25:02 AM by Patrick M. Hausen
You have all these static IPs. Fine.

You also have a dynamic range from .10 to .245. Still with me?

If you bring in two hundred new devices without static reservations, DHCPd will eventually hand out one of your static IPs to one of these new devices. Because the dynamic range includes your static IPs. DHCPd does not manage that for you. You tell it to use any address from .10 to .245 for dynamic assignments and it will happily do that no matter what you also defined statically. It is old school "do as I tell you" software, not "try to think for me" software.

We are just advising you that you might end up with duplicate IP address assignments if you do not manually take care that the dynamic range and the static assignments do not overlap.

Repeating: everything is fine. You can do all you did. Your network is fine at the moment.

It just so might happen one day that you connect a device and it will get an IP address that you already assigned as "static" to another device. And then some things won't work anymore. At least for the two devices in question.

QuoteIn one sentence you say that 192.1681.1 to 192.168.1.254 are NOT available for static IP, yet I have them

I said that .10 to .245 are not available for static assignments. Of course all addresses must lie in the .1 to .254 range. But the dynamic pool (.10 to .245) and the static assignments must not overlap.

The fact that the software does let you enter these does not change the fact! DHCPd does not do a consistency check! It lets you configure whatever you want even if it might breaks things. That's why we are repeatedly warning you not to configure your settings that way. You must manually ensure that the static assignments are outside the dynamic range. You must do this. DHCPd neither checks nor cares and will start to hand out duplicate addresses because you configured it that way.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

I Partick,

Thank you.

But I DO NOT UNDERSTAND.

You still have not explained why ALL my static IP's have been OK and one (144) and been reassigned to 100) and NO other device in my network is on 100.

It might happen in the future that some new device will get the same IP as one of your existing static entries. It just might happen. Because the dynamic pool for unknown devices overlaps with your static entries.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Hi Patrick,

Thank you.

My apologies for not understanding.

But you have not said this, but can I understand THAT:

In my configuration - The labelling under Servies: DHCPv4: [LAN] (as I have attached):

Enable               tick
Deny unknow clients         no tick
Ignore Client UID         no tick
Subnet               192.168.1.0
Subnet mask
Available range            192.168.10. – 192.168.1.254
Range
      From            to
      192.167.1.10         192.167.1.245


Does RANGE mean pool of CASUAL IP's that can be allocated?

Do I have to reduce range to say 192.168.1.10 to 192.168.1.100 so I can have static IP's above 192.168.1.100?