4.1) DHCP and NAT

The fundamental mechanisms for automatic assignment of IP addresses and sharing of the Internet connection.

Introduction to infrastructure services

In modern corporate and domestic networks, two technologies work constantly to simplify connectivity: DHCP and NAT.

Dynamic Host Configuration Protocol (DHCP)

DHCP is the client-server protocol that automatically and dynamically assigns the IP address, gateway, and DNS to each node that connects.

The process develops through four phases known by the acronym DORA.

Phase 1 - Discover: The client sends a broadcast packet on the local network to search for an active DHCP server.

Phase 2 - Offer: One or more DHCP servers respond by proposing an available IP address configuration.

Phase 3 - Request: The client responds by formally accepting the offer received from the specific server.

Phase 4 - Acknowledge: The server confirms the assignment of the address and sends all the configured parameters for the lease time.

Network Address Translation (NAT)

NAT is the technique that allows multiple devices on a private local network to share a single public IP address on the Internet.

It was introduced mainly as an emergency measure to slow down the rapid depletion of available IPv4 addresses.

Static NAT maps a single private address to a single public address permanently.

Dynamic NAT associates a private IP address with a pool of registered public IP addresses from the company in turn.

PAT (Port Address Translation) or NAT overloading, the most widespread, distinguishes packets by also modifying the original TCP/UDP ports.

This mechanism provides an implicit level of security, as it shields internal computers and prevents unwanted connections from the outside.

Conclusions

Thanks to the combined action of DHCP and NAT, configuring and navigating a complex network requires minimal administrative effort today.

🔗 Resources and References

Wikipedia - DHCP Wikipedia - NAT Cisco - How DHCP Works Cloudflare - Network Address Translation