Port Address Translation (PAT) / NAT Overload - Complete Guide
1. What is PAT (NAT Overload)?
Definition: PAT (Port Address Translation), also known as NAT Overload, allows multiple internal devices to share a single public IP address by assigning unique port numbers to each connection.
Key Advantages:
- ✅ Extreme IP Conservation – One public IP supports thousands of internal users.
- ✅ Supports all transport protocols – TCP, UDP, ICMP.
- ✅ Widely used in home routers – Default NAT in most consumer-grade routers.
2. How PAT Works (Many-to-One)
Term | Meaning | Example |
---|---|---|
Inside Local | Private IP of internal device | 192.168.1.10 |
Inside Global | Public IP + port number used externally | 203.0.113.1:5000 |
Port Uniqueness | Each session is tracked by its port | 192.168.1.10:3000 → 203.0.113.1:5000 |
Traffic Flow Example:
- Device A (192.168.1.10) → google.com
- Device B (192.168.1.11) → youtube.com
Router maintains a NAT table:
192.168.1.10:3000 ↔ 203.0.113.1:5000 192.168.1.11:4000 ↔ 203.0.113.1:6000
3. PAT Configuration (Cisco IOS)
Step 1: Define ACL
Router(config)# access-list 1 permit 192.168.1.0 0.0.0.255
Step 2: Configure PAT
Option A – Single Public IP (interface assigned by ISP):Router(config)# ip nat inside source list 1 interface GigabitEthernet0/1 overloadOption B – Pool of Public IPs:
Router(config)# ip nat pool PAT_POOL 203.0.113.1 203.0.113.3 netmask 255.255.255.0 Router(config)# ip nat inside source list 1 pool PAT_POOL overload
Step 3: Set 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
4. Verifying PAT
Show Translations:
Router# show ip nat translations
Sample Output:
Pro Inside global Inside local Outside local Outside global tcp 203.0.113.1:5000 192.168.1.10:3000 142.250.190.46:80 142.250.190.46:80 udp 203.0.113.1:6000 192.168.1.11:4000 8.8.8.8:53 8.8.8.8:53
Show NAT Statistics:
Router# show ip nat statistics
5. Testing PAT
- From internal clients: Open websites, ping external IPs like
8.8.8.8
- From router: Verify translations via
show ip nat translations
- From outside: All traffic appears from the same public IP with different ports
6. PAT Protocol Support
Protocol | PAT Behavior |
---|---|
TCP / UDP | Uses source port for mapping |
ICMP (Ping) | Uses query ID as pseudo-port |
FTP / ESP | Requires NAT helpers (e.g., ip nat service ) |
7. Common PAT Issues
⚠ Port Exhaustion:
Each IP has ~64,000 ports. Too many sessions can exhaust them.
Router(config)# ip nat translation timeout 3600
⚠ Translation Failures:
- Incorrect ACL
- Missing
overload
keyword
Debug:
Router# debug ip nat
8. PAT vs. Static NAT vs. Dynamic NAT
Feature | PAT (Overload) | Dynamic NAT | Static NAT |
---|---|---|---|
Mapping | Many:1 (Port-Based) | Many:Many (IP Pool) | 1:1 (Permanent) |
Public IPs | 1 or few | Requires pool | Dedicated per host |
Port Usage | Yes | No | No |
Use Case | Home/Office Internet | Legacy apps needing real IPs | Servers, CCTV, Remote Access |
9. Practical Example
Scenario:
- Internal:
192.168.1.0/24
(50 devices) - Public IP:
203.0.113.1
Configuration:
access-list 1 permit 192.168.1.0 0.0.0.255 ip nat inside source list 1 interface GigabitEthernet0/1 overload
Result: All 50 internal devices share one public IP using different ports.
10. Summary
- PAT = Many-to-One NAT using ports.
- Ideal for homes, small offices, and NAT-constrained environments.
- Config involves ACL, NAT rule with
overload
, and proper interface roles. - Test using:
ping
,nslookup
,show ip nat translations
.