Static NAT Configuration
Every device that communicates across the internet needs a globally routable public IP address. Private IP address ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) are not routable on the internet — routers on the public network drop packets with private source addresses. NAT (Network Address Translation) sits at the boundary between the private internal network and the public internet, translating private addresses to public ones so that internal hosts can communicate externally.
Static NAT creates a permanent, one-to-one mapping between a specific private IP address and a specific public IP address. The mapping is always active — both inbound and outbound traffic is translated. This makes static NAT ideal for internal servers (web servers, mail servers, FTP servers) that must be reachable from the internet at a predictable, fixed public address at all times.
Before starting, complete Basic Interface Configuration and Static Route Configuration to understand routing to the ISP, and Default Route Redistribution into OSPF for distributing the internet default route to internal routers. For NAT concepts and theory see NAT Overview. For dynamic address sharing see Dynamic NAT & PAT Configuration. For ACL concepts used in extended NAT see ACL Overview. For common port numbers used in port forwarding see Common Port Numbers.
1. NAT — Core Concepts and Terminology
NAT Address Types
Cisco uses a four-part terminology to describe addresses in a NAT
environment. Understanding each term is essential for reading
show ip nat translations output correctly:
| Term | Definition | Example |
|---|---|---|
| Inside Local | The private IP address of the internal host — as configured on the device itself | 192.168.10.10 (web server's real IP) |
| Inside Global | The public IP address that represents the internal host on the internet — what the outside world sees | 203.0.113.10 (public IP mapped to the server) |
| Outside Global | The public IP address of the external host — as configured on the remote device | 8.8.8.8 (Google DNS server) |
| Outside Local | The IP address used to represent the external host inside the network — only relevant in double-NAT or policy NAT scenarios | Usually same as Outside Global in standard NAT |
NAT Types — Comparison
| NAT Type | Mapping | Direction | Best Used For |
|---|---|---|---|
| Static NAT | One private IP ↔ one public IP (permanent) | Both inbound and outbound | Internal servers needing a fixed public IP (web, mail, FTP) |
| Dynamic NAT | Private IP → one of a pool of public IPs (temporary) | Outbound only — no inbound unless a mapping exists | Multiple internal hosts sharing a small pool of public IPs |
| PAT / NAT Overload | Many private IPs → one public IP (port multiplexing) | Outbound only — port number differentiates flows | Entire LAN sharing a single public IP (most common — home/branch) |
Inside and Outside Interfaces
Every NAT configuration requires identifying which router interfaces face the private (inside) network and which face the public (outside) network. NAT translation only occurs when a packet crosses the inside/outside boundary:
| Interface Role | IOS Command | Faces | Typical Interface |
|---|---|---|---|
| Inside | ip nat inside |
The private LAN — hosts with RFC 1918 addresses | LAN-facing GigabitEthernet, sub-interface, or SVI |
| Outside | ip nat outside |
The public internet or ISP network | WAN-facing interface connected to the ISP |
ip nat inside
without ip nat outside), no translation occurs — packets
are forwarded unchanged. Both interface roles must be configured for
NAT to function.
How Static NAT Translation Works — Packet Walk
| Direction | Original Packet | After NAT | Translation |
|---|---|---|---|
| Outbound (inside → outside) | Src: 192.168.10.10 → Dst: 8.8.8.8 | Src: 203.0.113.10 → Dst: 8.8.8.8 | Inside Local replaced with Inside Global |
| Inbound (outside → inside) | Src: 8.8.8.8 → Dst: 203.0.113.10 | Src: 8.8.8.8 → Dst: 192.168.10.10 | Inside Global replaced with Inside Local |
2. Lab Topology & Scenario
NetsTuts_R1 is the edge router with one interface facing the private LAN (192.168.10.0/24) and one facing the ISP (203.0.113.0/30). Three internal servers require fixed public IP addresses so they can be reached from the internet — a web server, a mail server, and an FTP server. Each gets a permanent one-to-one static NAT mapping.
Internet / ISP
203.0.113.1 (ISP Gateway)
|
Gi0/0 (OUTSIDE)
203.0.113.2 /30
┌──────────────────────┐
│ NetsTuts_R1 │
│ NAT Router │
│ Static NAT: │
│ .10.10 ↔ .113.10 │
│ .10.11 ↔ .113.11 │
│ .10.12 ↔ .113.12 │
└──────────────────────┘
Gi0/1 (INSIDE)
192.168.10.1 /24
|
═══════════════════════════
192.168.10.0/24
|
┌────────────────┼────────────────┐
192.168.10.10 192.168.10.11 192.168.10.12
[Web Server] [Mail Server] [FTP Server]
Public: .113.10 Public: .113.11 Public: .113.12
| Server | Inside Local (Private) | Inside Global (Public) | Service |
|---|---|---|---|
| Web Server | 192.168.10.10 | 203.0.113.10 | HTTP/HTTPS (TCP 80/443) |
| Mail Server | 192.168.10.11 | 203.0.113.11 | SMTP/IMAP (TCP 25/143) |
| FTP Server | 192.168.10.12 | 203.0.113.12 | FTP (TCP 20/21) |
3. Step 1 — Configure Interface Addressing
Assign IP addresses to both interfaces and bring them up before configuring NAT. The WAN interface (Gi0/0) uses the public IP assigned by the ISP. The LAN interface (Gi0/1) uses the private gateway IP:
NetsTuts_R1>en NetsTuts_R1#conf t Enter configuration commands, one per line. End with CNTL/Z. ! ── WAN interface — facing ISP ─────────────────────────── NetsTuts_R1(config)#interface GigabitEthernet0/0 NetsTuts_R1(config-if)#description WAN-to-ISP NetsTuts_R1(config-if)#ip address 203.0.113.2 255.255.255.252 NetsTuts_R1(config-if)#no shutdown NetsTuts_R1(config-if)#exit ! ── LAN interface — facing internal servers ────────────── NetsTuts_R1(config)#interface GigabitEthernet0/1 NetsTuts_R1(config-if)#description LAN-Internal-Servers NetsTuts_R1(config-if)#ip address 192.168.10.1 255.255.255.0 NetsTuts_R1(config-if)#no shutdown NetsTuts_R1(config-if)#exit ! ── Default route toward ISP ───────────────────────────── NetsTuts_R1(config)#ip route 0.0.0.0 0.0.0.0 203.0.113.1
4. Step 2 — Define NAT Inside and Outside Interfaces
Mark each interface with its NAT role. This step is mandatory — without these markings, IOS does not know which direction to translate packets and all NAT translations are silently ignored:
! ── Mark WAN as NAT outside ────────────────────────────── NetsTuts_R1(config)#interface GigabitEthernet0/0 NetsTuts_R1(config-if)#ip nat outside NetsTuts_R1(config-if)#exit ! ── Mark LAN as NAT inside ─────────────────────────────── NetsTuts_R1(config)#interface GigabitEthernet0/1 NetsTuts_R1(config-if)#ip nat inside NetsTuts_R1(config-if)#exit
5. Step 3 — Configure Static NAT Mappings
Each ip nat inside source static command creates a permanent
bidirectional mapping. The syntax is always:
private IP first, then public IP. These mappings are
immediately active — no traffic is required to create them:
! ── Static NAT: Web Server ─────────────────────────────── NetsTuts_R1(config)#ip nat inside source static 192.168.10.10 203.0.113.10 ! ── Static NAT: Mail Server ────────────────────────────── NetsTuts_R1(config)#ip nat inside source static 192.168.10.11 203.0.113.11 ! ── Static NAT: FTP Server ─────────────────────────────── NetsTuts_R1(config)#ip nat inside source static 192.168.10.12 203.0.113.12 NetsTuts_R1(config)#end NetsTuts_R1#wr Building configuration... [OK] NetsTuts_R1#
ip nat inside source static [inside-local]
[inside-global]. "Inside source" means we are translating the source
address of packets coming from the inside. "Static" means the mapping is
permanent. Each command creates one entry in the NAT translation table that
persists even when no traffic is active — unlike dynamic NAT and PAT entries
which timeout. After completing configuration save with
write memory.
Static NAT Command Breakdown
| Command Element | Meaning | Example Value |
|---|---|---|
ip nat |
Enters the NAT configuration context | — |
inside source |
Translates source addresses of packets originating from the inside network | — |
static |
Creates a permanent one-to-one mapping — always active regardless of traffic | — |
192.168.10.10 |
Inside Local — the private IP address of the internal server | Web server's LAN IP |
203.0.113.10 |
Inside Global — the public IP address the internet uses to reach this server | ISP-assigned public IP for the web server |
6. Step 4 — Static NAT with Port Forwarding (Optional)
Standard static NAT maps an entire IP address — all ports on the public IP go to the same private server. Port Address Translation (Static PAT) refines this by mapping a specific public IP and port to a specific private IP and port. This allows multiple internal servers to share a single public IP, each reachable on a different port:
! ── Single public IP, multiple internal servers via ports ─ ! ── HTTP (port 80) → Web Server at 192.168.10.10 ───────── NetsTuts_R1(config)#ip nat inside source static tcp 192.168.10.10 80 203.0.113.2 80 ! ── HTTPS (port 443) → Web Server ──────────────────────── NetsTuts_R1(config)#ip nat inside source static tcp 192.168.10.10 443 203.0.113.2 443 ! ── SMTP (port 25) → Mail Server at 192.168.10.11 ──────── NetsTuts_R1(config)#ip nat inside source static tcp 192.168.10.11 25 203.0.113.2 25 ! ── FTP (port 21) → FTP Server at 192.168.10.12 ───────── NetsTuts_R1(config)#ip nat inside source static tcp 192.168.10.12 21 203.0.113.2 21
Port Forwarding Command Syntax
| Element | Meaning |
|---|---|
tcp / udp |
The transport protocol to translate |
192.168.10.10 80 |
Inside Local IP and port — private server address and service port |
203.0.113.2 80 |
Inside Global IP and port — public IP and the port internet users connect to |
7. Verification
show ip nat translations
NetsTuts_R1#show ip nat translations Pro Inside global Inside local Outside local Outside global --- 203.0.113.10 192.168.10.10 --- --- --- 203.0.113.11 192.168.10.11 --- --- --- 203.0.113.12 192.168.10.12 --- ---
--- for full IP
translations (not port-specific). Inside global = public
IP. Inside local = private IP. The Outside columns show
--- because no active sessions exist yet — static entries
show only the two sides of the mapping until traffic flows.
show ip nat translations — After Active Traffic
NetsTuts_R1#show ip nat translations Pro Inside global Inside local Outside local Outside global tcp 203.0.113.10:80 192.168.10.10:80 8.8.8.8:45231 8.8.8.8:45231 tcp 203.0.113.10:443 192.168.10.10:443 1.2.3.4:52100 1.2.3.4:52100 --- 203.0.113.10 192.168.10.10 --- --- --- 203.0.113.11 192.168.10.11 --- --- --- 203.0.113.12 192.168.10.12 --- ---
show ip nat translations verbose
NetsTuts_R1#show ip nat translations verbose
Pro Inside global Inside local Outside local Outside global
--- 203.0.113.10 192.168.10.10 --- ---
create 00:15:32, use 00:02:11, timeout:never,
Map-Id(In): 1, Flags: static, use_count: 2
--- 203.0.113.11 192.168.10.11 --- ---
create 00:15:32, use 00:15:00, timeout:never,
Map-Id(In): 2, Flags: static, use_count: 0
verbose option shows additional detail per entry:
timeout:never — static entries never expire (unlike dynamic
NAT which has a 24-hour timeout). Flags: static — confirms
this is a permanent mapping. use_count: 2 — two active
sessions currently using this NAT entry.
show ip nat statistics
NetsTuts_R1#show ip nat statistics Total active translations: 5 (3 static, 2 dynamic; 2 extended) Peak translations: 8, occurred 00:10:21 ago Outside interfaces: GigabitEthernet0/0 Inside interfaces: GigabitEthernet0/1 Hits: 142 Misses: 3 CEF Translated packets: 139, CEF Punted packets: 3 Expired translations: 0 Dynamic mappings: Dynamic in use: 0
Verify Interface NAT Roles
NetsTuts_R1#show ip interface GigabitEthernet0/0 GigabitEthernet0/0 is up, line protocol is up Internet address is 203.0.113.2/30 NAT: Outside interface ... NetsTuts_R1#show ip interface GigabitEthernet0/1 GigabitEthernet0/1 is up, line protocol is up Internet address is 192.168.10.1/24 NAT: Inside interface ...
show ip interface confirms the NAT role of each interface —
NAT: Outside interface and NAT: Inside interface.
If either shows "NAT: disabled", the ip nat inside or
ip nat outside command was not applied to that interface.
Test Inbound Connectivity — Internet → Web Server
! ── Simulate internet client connecting to public IP ───── ! ── From an external host (or simulated with ping) ─────── NetsTuts_R1#ping 203.0.113.10 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 203.0.113.10, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms NetsTuts_R1# ! ── Check translation table after ping ─────────────────── NetsTuts_R1#show ip nat translations Pro Inside global Inside local Outside local Outside global icmp 203.0.113.10:1 192.168.10.10:1 203.0.113.2:1 203.0.113.2:1 --- 203.0.113.10 192.168.10.10 --- --- --- 203.0.113.11 192.168.10.11 --- --- --- 203.0.113.12 192.168.10.12 --- ---
Verification Command Summary
| Command | What It Shows | Primary Use |
|---|---|---|
show ip nat translations |
All NAT entries — static mappings and active session entries with full five-tuple | Primary NAT verification — confirm mappings exist and sessions are translating |
show ip nat translations verbose |
Extended detail — timeout, flags (static/dynamic), use count per entry | Confirm static entries never expire and check session count |
show ip nat statistics |
Translation counts, inside/outside interfaces, hits/misses, dynamic pool usage | Verify interface roles and check for translation failures (misses) |
show ip interface [int] |
Per-interface NAT role — "NAT: Inside interface" or "NAT: Outside interface" | Confirm ip nat inside/outside was applied correctly |
clear ip nat translation * |
Removes all dynamic NAT entries — static entries are not affected | Reset active sessions during troubleshooting without losing static mappings |
show ip route |
Verify the default route toward the ISP exists — required for translated traffic to exit | Confirm routing is intact before troubleshooting NAT |
8. Troubleshooting Static NAT Issues
| Problem | Symptom | Cause | Fix |
|---|---|---|---|
| No translation entries in table | show ip nat translations shows no output — not even static entries |
Static NAT mappings not configured, or inside/outside interface roles not set | Verify show running-config | include ip nat — confirm static statements exist and both interfaces have ip nat inside/ip nat outside |
| Static entries exist but sessions fail | NAT table shows static base entries but no active session entries — traffic not flowing | Routing issue — no default route to ISP, or the public IP (Inside Global) is not reachable from the internet. Also check firewall rules on the ISP side. | Verify show ip route — confirm 0.0.0.0/0 default route exists. Ping the ISP gateway (203.0.113.1) from R1. Confirm the public IP range is advertised by the ISP. |
| Inbound connections fail — outbound works | Internal server can reach internet but external hosts cannot reach the server's public IP | Static NAT missing or reversed — command may have inside local and inside global swapped. Or the outside interface is not marked with ip nat outside |
Verify the mapping: show ip nat translations — confirm Inside Global = public IP and Inside Local = private IP. Check the WAN interface has ip nat outside with show ip interface Gi0/0 |
| Translations incrementing but connectivity fails | show ip nat statistics Hits counter increases but ping/connection still fails |
NAT is translating correctly but the internal server is unreachable (host down, firewall on server, incorrect default gateway on server) | Verify the server's default gateway is set to R1's LAN IP (192.168.10.1). Ping the server directly from R1: ping 192.168.10.10. Check server firewall. |
| NAT miss counter increasing | show ip nat statistics shows Misses counter rising — some traffic not translated |
Traffic from an inside host whose IP is not covered by any NAT mapping — hitting the router but finding no matching NAT entry | Check debug ip nat to identify which source IPs are missing translations. Add static NAT entries or configure PAT / Dynamic NAT to cover remaining hosts. See also Troubleshooting Layer 3 Routing. |
| Cannot delete a static NAT entry | no ip nat inside source static returns an error — entry in use |
Active sessions are using the static mapping — IOS prevents deletion while sessions exist | Clear active sessions first: clear ip nat translation * then remove the static mapping with no ip nat inside source static [local] [global] |
Key Points & Exam Tips
- Static NAT creates a permanent one-to-one mapping between a private IP (Inside Local) and a public IP (Inside Global). The mapping is always active — both inbound and outbound traffic is translated automatically.
- NAT requires both
ip nat insideon the LAN interface andip nat outsideon the WAN interface. If either is missing, no translation occurs regardless of the static mapping configuration. - The command syntax is always private IP first, public IP second:
ip nat inside source static [inside-local] [inside-global]. - Inside Local = private IP on the device. Inside Global = public IP seen by the internet. These are the two most important terms for reading
show ip nat translationsoutput. - Static NAT entries appear in
show ip nat translationsimmediately after configuration — no traffic is required. They also never expire (timeout:neverin verbose output). - Port-based static NAT (Static PAT) extends the concept by mapping a specific public IP:port to a specific private IP:port — allowing multiple internal servers to share a single public IP on different ports.
show ip nat statisticsis the best single-command overview — it confirms inside/outside interface roles, shows hit/miss counters, and displays the total translation count broken down by static vs dynamic.- A high Misses counter in
show ip nat statisticsindicates packets are traversing the NAT boundary without matching any translation entry — investigate withdebug ip nat. - To remove a static NAT entry, active sessions must be cleared first with
clear ip nat translation *— IOS refuses to delete a mapping that is actively in use. - On the CCNA exam: know the four NAT address types (Inside Local, Inside Global, Outside Local, Outside Global), the difference between static/dynamic/PAT, the mandatory inside/outside interface configuration, and what each column in
show ip nat translationsrepresents.