Static NAT (Network Address Translation) - Complete Guide
1. What is Static NAT?
Definition: Static NAT is a one-to-one permanent mapping between a private IP (internal) and a public IP (external). Unlike Dynamic NAT or PAT, it does not change dynamically or share IPs.
Purpose & Use Cases:
- Hosting Public Servers: e.g., 192.168.1.10 → 203.0.113.5
- Remote Access: e.g., DVR at 10.0.0.100 accessed via public IP
- Legacy Systems: Requiring consistent public IPs
2. How Static NAT Works (1:1 Mapping)
Key Terms:
Term | Meaning | Example |
---|---|---|
Inside Local | Private/internal IP | 192.168.1.10 |
Inside Global | Public-facing IP | 203.0.113.5 |
Outside Global | Public IP of external device | 8.8.8.8 |
Traffic Flow:
- User accesses
203.0.113.5
- Router translates it to
192.168.1.10
- Server replies → router translates back to
203.0.113.5
3. Static NAT Configuration (Cisco IOS)
Step 1: Identify Inside & Outside Interfaces
Router(config)# interface GigabitEthernet0/0 Router(config-if)# ip nat inside Router(config-if)# exit Router(config)# interface GigabitEthernet0/1 Router(config-if)# ip nat outside Router(config-if)# exit
Step 2: Static Mapping
Router(config)# ip nat inside source static 192.168.1.10 203.0.113.5
Step 3: Verify NAT
Router# show ip nat translations
Sample Output:
Pro Inside global Inside local Outside local Outside global --- 203.0.113.5 192.168.1.10 --- ---
4. Testing Static NAT
- From Outside:
ping 203.0.113.5
orhttp://203.0.113.5
- From Inside: Access
192.168.1.10
5. Limitations of Static NAT
- ⚠ Requires one public IP per device
- ⚠ No port sharing like PAT
- ⚠ Not scalable for large networks
6. Security Considerations
- ✅ Only explicitly mapped devices are accessible
- ❌ Entire IP is exposed (no port-level control)
- 🔒 Use Access Control Lists (ACLs) to filter access
7. Static NAT vs. Dynamic NAT vs. PAT
Feature | Static NAT | Dynamic NAT | PAT (Overload) |
---|---|---|---|
Mapping | 1:1 (Permanent) | Pool-based (Temporary) | Many:1 (Port-based) |
IP Usage | One public IP per device | From a pool | Single IP |
Use Case | Servers, CCTV | Internal devices going out | Internet sharing |
8. Troubleshooting Static NAT
Common Issues:
- ❌ No translation → Check interfaces, NAT config
- ❌ Port not accessible → Verify service is running
- ❌ Wrong public IP → Ensure ISP routes it to you
Debug Commands:
Router# debug ip nat Router# show ip nat statistics
9. Static NAT in IPv6
Usually not required in IPv6 due to abundant addresses. NAT64 is used for IPv6 to IPv4 translation where needed.
10. Practical Example
Scenario: Internal web server at 192.168.1.100 → Public IP 203.0.113.10
ip nat inside source static 192.168.1.100 203.0.113.10
Users browsing http://203.0.113.10
will reach the internal server.
11. Summary
- Static NAT = Permanent 1:1 mapping
- Used for servers that need consistent public access
- Requires interface tagging and static mapping command
- Combine with ACLs for enhanced security