esphome / esphome/feature-requests

Check that a manually default Default Gateway is on the same subnet as the IP address

Open
#719 5 comments 0 reactions 0 assignees View on GitHub
Project: Dashboard
Dominant language
No language data
Stars
450
Forks
29
PR merge metrics
No merged PRs in 30d

Description

**Describe the problem you have/What new integration you would like**
Is it possible to verify that the default gateway is in the same subnet as the manual static_ip

**Please describe your use case for this integration and alternatives you've tried:**

I am segmenting my home network to put "IoT" devices on their own SSID - which means a different subnet and needs a default gateway.

Unfortunately, I modified the device's IP address (6 devices) and forgot to change their Default Gateways to the new subnet.

The only way to get things back to normal was to shutdown the new IoT Wifi, wait for all of the devices to enable their fallback APs and reconfigure using their captive portals (many thanks for that feature!)

If Manual_IP then
is Gateway set AND is Gateway the same as (static_ip AND subnet mask)
else
warn the end user that they could be doing something wrong
end

**Additional context**
Obviously this isn't an issue for DHCP users, but I'm not sure if the logic works for all use cases - but this would've saved me ~2 hours work today :)

Thanks for the great work

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the configuration validation for manual static_ip and the default gateway. Test manual configurations where the gateway is inside and outside the static IP subnet, and verify that DHCP users are unaffected; done means a mismatch produces a warning or validation error.

Written by the indexing model from the issue text.

Assessment

Domain
embedded-iot, networking
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.