Networking & IoT · Interview question

Static IP or DHCP for an embedded device, how do you choose?

A strong answer

It's a determinism-vs-convenience tradeoff driven by the deployment. DHCP is the plug-and-play choice: the device runs a DHCP client and is handed an IP, subnet mask, gateway, and DNS automatically via the DORA exchange, with a lease it must renew, great for consumer devices and dynamic networks where you don't control addressing, at the cost of depending on a DHCP server being present and the address potentially changing. A static IP is deterministic: the address is fixed and known, there's no server dependency or lease to renew, and it's easy to firewall or reach at a known address, preferred for fixed infrastructure, industrial gear, and servers, at the cost of manual configuration and the risk of conflicts if managed sloppily. The common pitfalls: a static IP set inside the DHCP pool can be handed to another device, causing duplicate-IP failures, so you reserve static addresses outside the pool or use DHCP reservations (the server always gives that MAC the same IP), which gives you the best of both, stable addressing with central management. Also remember a statically-configured device still needs the correct mask, gateway, and DNS, and a DHCP device must handle lease renewal and DHCP being temporarily unavailable. So: DHCP for dynamic/consumer, static (or DHCP reservation) for infrastructure you must reliably address.

What a weak answer sounds like

You know the answer. Do you know what gets you dinged?

Pro breaks down the answer most candidates actually give to this question — and the specific reason an interviewer marks it down. It’s the difference between sounding correct and sounding senior, on all 472 questions.

From the lesson

IP Addressing

How a packet finds a device: IPv4/IPv6 addresses split into network and host by the subnet mask, the same-subnet-vs-gateway decision, plus DHCP, NAT, and why IoT devices dial out.

More IP Addressing questions

Browse all 472 interview questions
Static IP or DHCP for an embedded device, how do you choose? | EmbeddedPrep.io