What is the relationship between IP addresses and network interfaces?
An IP address belongs to an interface, not to the machine — so a host with several interfaces (like a router) has several IP addresses.
It's tempting to think "one computer = one IP", but the address is really a property of each interface. A laptop with both Wi-Fi and Ethernet active has two addresses. A router, with one interface per network it joins, has one address per network — which is what lets it sit on (and forward between) all of them.
Consequences:
- an interface can even hold more than one IP address
- routers carry many addresses (one per connected network)
- ordinary PCs usually have 1–2 (wired and/or wireless)
Example — a router with three interfaces:
eth0: 192.168.1.1 (LAN)
eth1: 10.0.0.1 (DMZ)
eth2: 203.0.113.5 (WAN)
Important: the IP address is what places an interface into a particular network. Change the address and you've moved that interface to a different network — the physical hardware is irrelevant to which network it's logically on.