Static IP versus DHCP on the Arduino

Choose between DHCP convenience and reserved static IPs for reliable garage JSON endpoints and firewall rules.

The Ethernet shield can request DHCP from the garage router or use a fixed LAN address. DHCP is easier on first boot; static or DHCP reservation prevents the Arduino from jumping addresses after power outages—breaking hard-coded upstream URLs in FastAPI relays until someone notices stale home page readings.

Router diagram comparing DHCP lease churn versus reserved static IP for the Arduino
Reserved DHCP or static IP keeps the probe URL stable for relays and firewall rules.

DHCP with reservation

Many routers map **MAC address → fixed IP** while still using DHCP under the hood. This gives plug-and-play first install plus stability—preferred for most garage builds. Note the Uno MAC from serial boot logs during serial debug.

True static in firmware

  • Hard-code IP, gateway, subnet, and DNS in the sketch.
  • Document values on the enclosure lid—future you will forget.
  • Conflict risk if another device claims the same IP.

Downstream impact

Relays and Docker deployments often store upstream LAN URLs. Pair stable IPs with health checks and watchdog recovery so brief reboots do not require config edits.