NAT Operation
B-2
B.1 NAT Operation
NAT is basically what the acronym implies – a translation of packet IP address.
It is used by the stack when routing, to translate the IP address of a packet to/
from a private LAN from/to a public WAN. NAT is required when the IP address
paradigms on either side of the router are incompatible, for example, virtual
addresses vs. physical addresses, or private vs. public. In the case of a home
LAN, NAT allows multiple clients on the home LAN to use a single ISP account
by sharing the router WAN IP address obtained from the ISP.
B.1.1 Typical Configuration
For the examples that follow, consider the typical configuration illustrated be-
low. The TCP/IP stack is executing as a home router (HR) and connects the
home LAN subnet (192.168.0.x) to the Internet (WAN) via an ISP which has
assigned HR an address of 128.1.2.12. The hosts on the home network (H1
and H2) have obtained their internet addresses from HR via DHCP. The IP of
HR on the home LAN as well as the IP subnet used by the home LAN is pre-
configured in HR. The illustration also shows a host on the public internet (IH)
to which the LAN hosts will connect. Lastly, we assume the home LAN subnet
is virtual, and NAT is required to allow H1 and H2 to share the WAN IP address
assigned to HR by the ISP (128.1.2.12).
Figure B–1. Basic Home Network Configuration
Home Router
(HR)
using NAT
Internet
Host 1
(H1)
Host 2
(H2)
Internet Host
(IH)
Home
LAN
64.1.1.100
192.168.0.33
192.168.0.32
192.168.0.1
128.1.2.12
ISP
WAN
192.168.0.x