Cisco PAT Configuration and NAT Overload
Learn Cisco IOS PAT configuration using an outside interface or NAT pool, including ACLs, verification commands, troubleshooting, and design limits.
What PAT Does
Port Address Translation (PAT) is a form of dynamic Network Address Translation (NAT) that allows many private IPv4 hosts to share one or more public IPv4 addresses. Cisco IOS commonly calls PAT NAT overload because the router overloads a public address by using different source port mappings for separate connections.
Private addresses, such as 192.168.10.0/24, 172.16.0.0/12, and 10.0.0.0/8, are intended for internal networks and are not routed across the public Internet. A public address, such as an address assigned by an ISP, is globally routable. PAT translates private source addresses and ports into a public source address and unique translated ports before traffic leaves the network.
PAT is commonly used when a small office, branch network, or lab has many internal devices but only one public IPv4 address. It provides outbound IPv4 connectivity and conserves public address space. PAT is not, by itself, a complete firewall or security policy.
How Address and Port Sharing Works
Suppose two inside hosts start simultaneous TCP sessions to an external server. The router can translate both source addresses to the same public address while assigning different source ports:
Host A: 192.168.10.10:49152 -> 203.0.113.2:30001
Host B: 192.168.10.11:49153 -> 203.0.113.2:30002The translation table records each mapping. When return traffic arrives at 203.0.113.2 and a translated port, the router uses the table to send the packet to the correct private host and original port. TCP and UDP sessions use transport-layer port numbers. For ICMP, the router can use an ICMP identifier when creating a translation.
NAT Terminology and Traffic Direction
NAT terminology describes an address from the perspective of the inside or outside network. “Local” means the address as seen from the local side, while “global” means the address used on the other side of the NAT boundary.
The interface connected to the private LAN is marked with ip nat inside. The interface connected to an ISP, upstream router, or other external network is marked with ip nat outside. These labels describe the NAT boundary; they do not replace normal routing.
Translations are normally created when traffic travels from an inside interface toward an outside interface and matches the NAT rule. Return traffic is matched against the translation table. The router reverses the address and port changes, then forwards the response toward the inside host.
Prerequisites Before Configuring PAT
PAT depends on working addressing, interfaces, and routing. Configure and test those foundations first.
- Give each host a correct IPv4 address and subnet mask.
- Set the NAT router's inside interface as the hosts' default gateway.
- Configure the router's inside and outside interface addresses.
- Activate the interfaces with
no shutdown. - Ensure the router can reach the inside LAN and the upstream next hop.
- Install a default route toward the upstream router or ISP.
- Test basic connectivity before enabling NAT.
interface GigabitEthernet0/0
ip address 192.168.10.1 255.255.255.0
no shutdown
interface GigabitEthernet0/1
ip address 203.0.113.2 255.255.255.252
no shutdown
ip route 0.0.0.0 0.0.0.0 203.0.113.1In this example, an inside host should use 192.168.10.1 as its default gateway. The router's default route sends destinations that are not in its routing table to 203.0.113.1.
Using a Standard ACL to Select Inside Hosts
A standard IPv4 ACL matches source addresses. For PAT, it identifies which inside sources are eligible for translation. It does not necessarily act as an interface traffic-filtering policy. The ACL is referenced by the NAT rule, so its purpose here is source selection.
A wildcard mask uses the opposite logic of a subnet mask: a zero bit must match, and a one bit may vary. Therefore, the wildcard mask for a /24 network is 0.0.0.255.
access-list 1 permit 192.168.10.0 0.0.0.255A named standard ACL is easier to maintain and can include multiple inside networks:
ip access-list standard NAT_INSIDE
permit 192.168.10.0 0.0.0.255
permit 192.168.20.0 0.0.0.255Only include networks that should use this NAT policy. Check the actual client addresses rather than assuming that the client is in the expected VLAN or subnet.
Configure PAT with the Outside Interface Address
Interface-based PAT uses the public IPv4 address currently configured on the outside interface. This is convenient when the ISP assigns one public address directly to the router or when the outside address can change.
- Match inside source addresses with a standard ACL.
- Mark every LAN-facing interface with
ip nat inside. - Mark the WAN-facing interface with
ip nat outside. - Reference the ACL and outside interface in an overload rule.
access-list 1 permit 192.168.10.0 0.0.0.255
interface GigabitEthernet0/0
ip nat inside
interface GigabitEthernet0/1
ip nat outside
ip nat inside source list 1 interface GigabitEthernet0/1 overloadFor two internal networks, use the named ACL created earlier:
ip nat inside source list NAT_INSIDE interface GigabitEthernet0/1 overloadThe complete rule means: translate inside sources permitted by the ACL, use the address on GigabitEthernet0/1, and allow many translations to share that address through port translation.
Configure PAT with a NAT Pool
A NAT pool is a range of public IPv4 addresses that the router can use for translations. Pool-based PAT is appropriate when an organization has several public addresses and wants to distribute translations across them, or when the public addresses are separate from the interface address.
ip nat pool PUBLIC_POOL 198.51.100.10 198.51.100.14 netmask 255.255.255.248
access-list 10 permit 10.10.10.0 0.0.0.255
ip nat inside source list 10 pool PUBLIC_POOL overloadThe pool has a start address, an end address, and a subnet mask. The ACL selects 10.10.10.0/24. The overload keyword permits multiple hosts and sessions to share the addresses in the pool. Without overload, the available addresses are allocated as ordinary dynamic NAT mappings and can be exhausted by concurrent hosts.
Verifying PAT Operation
Translations are generally created only after matching inside-to-outside traffic is generated. Start a ping, DNS lookup, web request, or another permitted application session from an inside host. Then inspect the router.
A representative translation might look conceptually like this:
Protocol Inside global Inside local Outside local Outside global
tcp 203.0.113.2:30001 192.168.10.10:49152 198.51.100.20:443 198.51.100.20:443Read the entry from left to right for the translated outbound flow. The inside local value is the original private host and port. The inside global value is the public address and translated port. The outside local and outside global values identify the remote host as viewed on each side of the NAT boundary.
Ping is useful for a basic test, but ICMP does not behave exactly like TCP or UDP. A successful ICMP test does not prove that every application will work, and a failed ping may reflect ICMP filtering rather than a PAT failure. Test the actual TCP or UDP application when possible.
Troubleshooting PAT
Ordered Diagnostic Method
- Check host addressing, subnet mask, and default gateway.
- Use
show ip interface briefto confirm that inside and outside interfaces are up and have the expected addresses. - Confirm each LAN-facing interface has
ip nat insideand the external interface hasip nat outside. - Compare the actual client source subnet with the NAT ACL and wildcard mask.
- Confirm the NAT rule contains
overload. - Confirm the outside interface has a usable address, or confirm that the NAT pool is valid and available.
- Use
show ip routeto verify the default route and test the upstream next hop. - Generate new inside-to-outside traffic and check whether translations are created.
- Inspect ACL counters and NAT statistics. An ACL with zero matches usually indicates a source-address, wildcard-mask, VLAN, or forwarding-path problem.
- For controlled testing after configuration changes, remove dynamic entries with
clear ip nat translation *, then generate fresh traffic.
Practical Scenarios
One Private LAN and One Public Address
For 192.168.10.0/24 behind a router whose outside address is 203.0.113.2, use an ACL for the private subnet and an interface-based overload rule. All eligible hosts share 203.0.113.2, while their translated ports keep sessions distinct.
Multiple Inside Networks
When both 192.168.10.0/24 and 192.168.20.0/24 need outbound access, add both networks to a standard named ACL. Ensure both LAN interfaces are marked inside. One outside-interface PAT rule can then translate both networks.
ACL Mismatch
If clients actually use 192.168.10.0/24 but the ACL permits 192.168.1.0 0.0.0.255, the ACL counter remains at zero and no translations are created. Correct the ACL to match the real source subnet and test again.
Missing Default Route
A translation can exist even when the remote network is unreachable. If show ip nat translations contains entries but users cannot reach external destinations, separate NAT from routing: verify the default route, outside interface state, next-hop reachability, and upstream return behavior.
PAT Limitations and Design Considerations
- PAT depends on available transport ports and router resources. A very large user population or many simultaneous sessions may require multiple public addresses, additional routers, or another architecture.
- Some protocols and applications carry IP addresses or port information inside their payloads. Such applications may need application-aware translation, a gateway, or special configuration.
- PAT primarily conserves IPv4 addresses and hides internal addresses. It should not be treated as a substitute for firewall rules, segmentation, authentication, or endpoint security.
- Outbound PAT is different from inbound static NAT or port forwarding. Publishing an internal web server or other service normally requires a static mapping or destination port-forwarding rule.
- Document inside networks, public pools, interface roles, and exceptions. Avoid overlapping inside and outside address ranges because ambiguous addressing can prevent correct routing and translation.
Related Cisco IOS Topics
Review computer networking fundamentals for forwarding concepts, router-on-a-stick configuration for multiple VLAN interfaces, and OSPF configuration for dynamic routing that may provide internal reachability. Static NAT and inbound service publishing should be studied separately from outbound PAT.