Static IP Address and DHCP Support for non /24 Subnets

Yeah sounds like the app itself not recognizing the extended subnet

1 Like

I have good news to report. The combination of fixing the subnet mask and allowing both the 192.168.10.0 and 192.168.11.0 subnets got me working. For reference, I used https://192.168.11.253/hub/allowSubnets?192.168.10.0,192.168.11.0 to ensure that both were included.

and I used...

https://192.168.11.253/hub/advanced/switchToStaticIp?address=192.168.11.253&netmask=255.255.254.0&gateway=192.168.10.250&nameserver=192.168.10.10&override=yes

to set the static IP, mask, gateway and DNS.

I sincerely thank everyone for the attention and support they provided, it was great!

On a related note, is there a list of all the "endpoints" that can be configured through URL parameters?

Thanks!

6 Likes

Got it. If you're successful you can be wrong and get away with it. Enjoy your world, it's not one I'd want to live in.

2 Likes

That’s not what I said, and we live in the same world.

I’m going to guess that for around 99% of its intended customer base of home consumers, this is a non-issue. Whether or not the hub adheres to a technical standard for basic IP networking.

4 Likes

What? Is Hubitat hardcoded to a /24 network? Even with a DHCP assigned configuration?

I mean ... that can't be right. This is a product for DIY tinkerers and geeks. Surely it actually has a correct implementation of the IP stack, and respects DHCP?

I use a /16 network for various reasons (work and non-IOT home-lab stuff means I easily consume an address space larger than 254). If Hubitat is perpetually locked to a /24 network I need multiple networks and custom routing. Is that really necessary?

Can someone confirm this? I just spent two days trying to identify why certain IoT WiFi devices fail to work correctly with Hubitat. I need to to know if Hubitat is actually non-compliant with basic ethernet standards.

No it isn't. While you cannot configure the subnet mask via the platform gui, you can configure it to be whatever you want via an endpoint.

For details, read this post:

Also, while the mask will change to whatever you want, it will continue to display as being /24 in the gui, but that display bug is irrelevant to its function.

4 Likes

No, DHCP works as it normally does.

Static IP assignment has a UI page where /24 is locked in, but there's also an endpoint to set subnet and other parameters without built-in nanny, as @aaiyar mentioned.

3 Likes

Ok, so to be clear: if I use a static lease in DHCP bound to the MAC address of my two Hubitat units, the DHCP config will be respected with any subnet?

2 Likes

I cannot tell you for sure because I haven't done that. However, that is what others tell me.

2 Likes

I believe so. I use 10.0.0.0 for my house and have a static DHCP lease for the Hubitat hub (among other things). If it were using a /24 subnet mask, a good number of my computers wouldn't be able to talk to it. Since I'm not having that problem, it must be using the /8 subnet mask it gets from DHCP.

4 Likes

"Static DHCP" is an oxymoron. Its either a Static address or a DHCP address. Can't be both.

The correct terminology is "a DHCP Reservation". That is where you configure the DHCP server to reserve a specific IP address for a particular DHCP client (a specific MAC address).

From the client's perspective, the address is still dynamic. It has a lease time which needs to get renewed periodically and could potentially change when it gets renewed. Even though its 'reserved' in the server, to the client its still considered to be a 'dynamic' address and treated as such

3 Likes

Sorry for being sloppy. I should have said "static IP address handed out via a DHCP lease" but I skipped all the middle words.

7 Likes

Well you may have not fully understood my explanation of the terms. Its not a "Static IP address" if the DHCP server issued it. Even though its getting the same address via DHCP Reservation, the address still expires and the client still needs to renew it just like any other dynamic (DHCP) address. And as far as the client is concerned, it could change at the next renewal (lease) period. The client must treat it as a dynamic address even if it happens to get the same IP every time.

2 Likes

I'm well aware of that. I was at the first DHCP working group meeting back in the early 90s.

4 Likes

That's great. Then you will understand why its called a DHCP Reservation and not a Static DHCP (which is an oxymoron)

You are technically correct - the best kind of correct. Having said that, I think this is just one notch too pedantic (said in a positive spirit off course). :slight_smile:

First of all it doesn't make a difference for the discussion at hand. I doubt anyone tinkering with Hubitat doesn't understand basic DHCP, and the core question was if Hubitat is respecting the DHCP configuration assigned to it, and the subnet mask in particular. The answer was yes. Obviously that will be true no matter if the address assigned to Hubitat is a reserved/static lease address or not.

Second, the word "static" in the above posts applies to the DHCP lease, not the IP address and not DHCP itself. You were the only person to say "Static DHCP" or "Static IP". Everybody else said "Static lease" or "Static DHCP lease". The static part here is clearly the lease. In terms of DHCP administration, there is no problem using that term, and I have seen many appliances use it. Along side "Fixed lease", "Reserved IP", "DHCP Reservation" and many others.

Your explanation is not wrong or anything. But you removed or ignored the word "lease" from the posts you quoted, and that word was crucial for the context.

:slight_smile:

5 Likes

Hubitat has a lot of features that appeal to the DIY/tinkerer crowd.

But that doesn’t mean it’s exclusively for power users.

There are many people in this community who have very little knowledge about IP networks.

3 Likes

True. But there is something pedantic in pursuing a perfect description of IP address assignation for a group that does care that their hubs have fixed IP addresses, but not necessarily what to call that process.

4 Likes

Possibly :grinning_face_with_smiling_eyes: As a technical editor for many technical documents where technical accuracy is paramount, I'm much more pedantic than the average person :nerd_face: I openly admit it. :blush:

The problem, IMO, is with Hubitat using a fixed mask for static addresses. Since Hubitat is treating the mask differently, based on whether its a static or dynamic address, I do believe the correct definition of a static address versus a reserved dynamic address makes a difference in the context of this topic. :v:

2 Likes

That's not clear, at all. It could refer to a reservation, or it could refer to an infinite lease. They're two different things, and an infinite lease is much closer to a static address than the address reservation being discussed.

And, to be completely pedantic, what's being called a "reservation" here is actually a "manual assignment" in formal DHCP terminology.

3 Likes