1 of 14

Network Address Translation�and DHCP

Enterprise Network 101 Workshop

2 of 14

Network Address Translation

• NAT has become a commonly used technique for prolonging the

use of IPv4 on today’s Internet

– Originally designed as a means of allowing isolated networks to connect to Internet without renumbering into public IP address space

3 of 14

Network Address Translation

• NAT is translation of one IP address into another IP address

• NAPT (Network Address & Port Translation) translates multiple IP

addresses into one other IP address

– TCP/UDP port distinguishes different packet flows

• NAT-PT (NAT – Protocol Translation) is a particular technology

which does protocol translation (v4 to v6) in addition to address

translation

– NAT-PT is has long been made obsolete by the IETF

4 of 14

Carrier Grade NAT (CGN)

• Service Provider version of subscriber NAT

– Subscriber NAT can handle only hundreds of translations

– ISP NAT can handle millions of translations

– Expensive high-performance hardware

• Not limited to just translation within one address family, but does

address family translation as well

• Sometimes referred to as Large Scale NAT (LSN)

5 of 14

How NAPT works

• NAPT allows mapping of multiple internal addresses to one

external address.

– Each TCP or UDP session is mapped to one TCP or UDP port of an

external address

– There are ~64000 unprivileged TCP and UDP ports

– Typical end user device consumes ~400 TCP and UDP ports at any one time

– Which allows around 150 end user devices per public IP address

• One /29 would allow only 900 simultaneous fully active end user

devices

6 of 14

Avoid multiple layers of NAT!

7 of 14

DHCP

8 of 14

DHCP (Dynamic Host Configuration Protocol)

  • DHCP provides administrators with a mechanism to dynamically allocate IP addresses, and other network configuration parameters like ( Default Gateway, Subnet mask, DNS server) to the DHCP Clients.
  • DHCP eliminates the need for individual to configure the network parameters on the networking devices, enabling the ability to join a network without knowing the details of it.

9 of 14

10 of 14

DHCP DORA Process

11 of 14

DHCP DORA Process

  • DHCP DISCOVER:
    • When a client first boots up, it broadcasts a DISCOVER message using UDP port 67 looking for a DHCP server to offer it an IP address.
  • DHCP OFFER:
    • After receiving the discover message, the DHCP server will offer the requesting client with an unallocated IP address and other network parameters such as subnet mask, default gateway, IP address lease time etc. configured by the administrator.

​

12 of 14

DHCP DORA Process

  • DHCP REQUEST:
    • If the client is willing to use the IP address offered by the DHCP server, it sends a REQUEST to the server “ I want to use this IP address”.�
  • DHCP ACK:
    • After receiving the REQUEST message, the DHCP server will send a DHCP ACK to the client and maintain the record for the leased IP address.
    • A client will usually keep the same address by periodically contacting the DHCP server to renew the lease before the lease expires.

​

  • DHCP Relay Agent:
    • A DHCP relay agent is any host that forwards DHCP packets between clients and servers.

​

​

13 of 14

QUESTIONS?

14 of 14