What's the difference between DHCP and NAT? Are they mutually exclusive?

NAT is a way to translate traffic in several ways. The simplest in home routers is to make everything seem like they’re behind the same IP address. This means any outbound connection from the local network is taken in, its source address is set to the router’s public address, a new port is allocated and the modified packet is sent forward. When there’s a packet back the same thing is done in reverse and the packet is sent to the original device.

NAT doesn’t need to be between private and public networks. It can also be between two public networks or two private ones. It just diverts traffic and doesn’t know anything about public or private.

DHCP is completely unrelated to this. It is a way for devices to shout to the local network asking for an IP address and other related information (like the gateway address, name servers etc) to be given to them. Again, a home router usually has a server to serve the clients in the local network. Without a DHCP server you’d need to set all IP addressed by hand to each device (or use the automatic IP system in Windows, for example, but that is only for local networks, not internetworking). The devices can not communicate using IP unless they have IP addresses and since practically all communications is over IP it’s needed.

The IP address given isn’t necessarily public. Maybe this causes the confusion to you. It’s any address that’s defined in the DHCP pool, or maybe even a static one for that specific device.

So you can have DHCP allocating IP addresses and never use a NAT. It just gives IPs from the pool and that’s that. You can also have NAT without DHCP. You can set fixed IPs, or you can use NAT to divert traffic through a firewall to some other machine etc. It doesn’t need anything from DHCP.

In home networks both are useful since there’s pretty much always only one external IP and users don’t want to manually set fixed IP addresses. So DHCP gives them local private IPs and NAT translates connections so that they look like they come from the same address.


DHCP is a protocol for configuring hosts, and runs periodically to keep their addresses and other configuration up to date. NAT a process is for rewriting packets as they are forwarded across a router. To be more specific it does translate the addresses and sometimes the ports.


  • DHCP takes a pool of IPs and assigns them upon request. Could be public or private

  • NAT (typically) takes routable IP data and sends it through to a non-routable IP (like the ubiquitous 192.168.0.0 block)

In other words, they're not the same thing. It's like engines and tires: they both belong on a car and help make it run, but they do VERY different things.

What's probably tripping you up is that most of the Internet runs on NAT (and often IPv4 NAT). If you're using NAT, the default configuration there is you take a public IP and then DHCP your non-routing block to whatever devices connect behind the router. The trick there is you don't HAVE to DHCP NAT. You can actually assign all your devices a local, non-routing IP. In fact, most residential routers have some block they don't DHCP for that reason, so you can assign, say, a network printer a fixed IP.

It would be a pain to have someone come to your house and go "What's your Wifi password?" only to have you respond "Wait, let me assign your device an IP. What's your MAC address?" Not only will you get a blank stare (and your parents will disown you for asking them to tech), but this is a massive pain for you too. As such, nobody runs their network like this because DHCP is really convenient. I mean Adam Jacobs from Chef (DevOps company) told this story about a company that thought they couldn't use DHCP. Which immediately raised eyebrows among technology professionals.