5.1 NAT Overview
NAT enables hosts on a private network to access the public network.
Private Network Address and Public Network Address
A private network address, which is also called a private address, is the IP address of an internal
network or host. A public network address, which is also called a public address, is a unique IP
address on the Internet. The Internet Assigned Number Authority (IANA) defines the following
IP addresses as private addresses:
l
Class A: 10.0.0.0-10.255.255.255
l
Class B: 172.16.0.0-172.31.255.255
l
Class C: 192.168.0.0-192.168.255.255
After planning the scale of the intranet, an enterprise chooses the proper private address segment.
The private address segments of enterprises can overlap each other. If an intranet does not use
the IP address in the defined private address segments, errors may occur during communication
with other networks.
Principle of NAT
As shown in
, the private address must be translated when a host on a private network
accesses the Internet or interworks with the hosts on a public network.
Figure 5-1
Networking of NAT
PC
WWW client
PC
10.1.1.10
10.1.1.48
........
Internal network
External network
203.196.3.23
WWW Server
202.18.245.251
Router
The private network uses network segment 10.0.0.0 and its public address is 203.196.3.23. The
host 10.1.1.48 on the private network accesses the server 202.18.245.251 on the public network
in Web mode.
The host sends a data packet, and uses port 6084 as the source port and port 80 as the destination
port. After the address is translated, the source address/port of the packet is changed to
203.196.3.23:32814, and the destination address/port remains unchanged. The AR150/200
maintains a mapping table between addresses and ports.
Huawei AR150&200 Series Enterprise Routers
Configuration Guide - IP Service
5 NAT Configuration
Issue 02 (2012-03-30)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
105