What are the two ways to configure an IP address on an end device?
Manually (static — admin enters address, mask, gateway) or automatically via DHCP (IPv4) / SLAAC (IPv6); most end devices default to DHCP.
An end device needs an IP address before it can communicate, and there are two ways to give it one — the choice is a trade-off between control and effort.
1. Manual (static) configuration — an administrator types the IP address, subnet mask, and default gateway into the device by hand. This guarantees the device always has the same address, which is why it's used for servers, printers, and anything other devices need to find at a fixed location. The cost is that it doesn't scale: configuring and tracking every address manually is error-prone across many devices.
2. Automatic (dynamic) configuration — the device asks the network for its settings, so no manual entry is needed:
- DHCP (Dynamic Host Configuration Protocol) — a server hands out IPv4 addresses (plus mask, gateway, DNS) on request and reclaims them when devices leave
- SLAAC (Stateless Address Autoconfiguration) — IPv6 devices build their own address from information in router advertisements, no server required
Because it's so much less work, most end devices use DHCP by default.
Go deeper:
Dynamic Host Configuration Protocol (Wikipedia) — how the DORA exchange leases an IPv4 address, mask, gateway and DNS to a host.
IPv6 — SLAAC (Wikipedia) — the stateless autoconfiguration mechanism IPv6 hosts use instead of (or alongside) DHCP.