NAT (PAT) Configuration - RigPig/NET-330 GitHub Wiki

PAT (Port Address Translation) allows multiple private IP addresses (e.g., 192.168.0.x) to share one public IP address (30.0.0.120) by differentiating traffic using port numbers.

It’s also known as NAT overload — a common method used by home routers and enterprises with limited public IPs.


Internal Network: 192.168.0.0/24

Public IP Address: 30.0.0.120

Router1: Acts as the NAT device

Router2: Represents the external (public/internet) router

  1. Interfaces

r1:

interface fa0/0

ip address 192.168.0.1 255.255.255.0

ip nat inside

no shutdown

interface s0/0/0

ip address 30.0.0.1 255.0.0.0

ip nat outside

no shutdown

  1. Default Route

Router1 sends unknown traffic toward Router2

ip route 0.0.0.0 0.0.0.0 30.0.0.2

  1. Define inside and outside NAT interfaces, set NAT pool

ip nat pool test 30.0.0.120 30.0.0.120 netmask 255.0.0.0

  1. Create access list

which private addresses can use the configured public addresses?

access-list 1 permit 192.168.0.0 0.0.0.255

  1. Enable PAT

linking the access list with the pool

ip nat inside source list 1 pool test overload


IP NAT Table