Static NAT is a one-to-one mapping between an inside address and an outside address. Static NAT allows external devices to initiate connections to internal devices using the statically assigned public address. For instance, an internal web server may be mapped to a specific inside global address so that it is accessible from outside networks.
Figure 1 shows an inside network containing a web server with a private IPv4 address. Router R2 is configured with static NAT to allow devices on the outside network (Internet) to access the web server. The client on the outside network accesses the web server using a public IPv4 address. Static NAT translates the public IPv4 address to the private IPv4 address.
There are two basic tasks when configuring static NAT translations.
Step 1. The first task is to create a mapping between the inside local address and the inside global addresses. For example, the 192.168.10.254 inside local address and the 220.127.116.11 inside global address in Figure 1 are configured as a static NAT translation.
Step 2. After the mapping is configured, the interfaces participating in the translation are configured as inside or outside relative to NAT. In the example, the Serial 0/0/0 interface of R2 is an inside interface and Serial 0/1/0 is an outside interface.
Packets arriving on the inside interface of R2 (Serial 0/0/0) from the configured inside local IPv4 address (192.168.10.254) are translated and then forwarded towards the outside network. Packets arriving on the outside interface of R2 (Serial 0/1/0), that are addressed to the configured inside global IPv4 address (18.104.22.168), are translated to the inside local address (192.168.10.254) and then forwarded to the inside network.
Figure 2 outlines the commands needed to configure static NAT.
Figure 3 shows the commands needed on R2 to create a static NAT mapping to the web server in the example topology. With the configuration shown, R2 translates packets from the web server with address 192.168.10.254 to public IPv4 address 22.214.171.124. The Internet client directs web requests to the public IPv4 address 126.96.36.199. R2 forwards that traffic to the web server at 192.168.10.254.
Use the Syntax Checker in Figure 4 to configure an additional static NAT entry on R2.