NAT
▰ Network address translation
1
[Link] | ezxprt@[Link] | +92-3348-15-15-25 | +92-3178-88-39-79
Public & Private IP address Ranges
✓ PUBLIC IP
▪ It is assigned to your Router by ISP and accessible over the internet
▪ Used over WAN and not free
✓ Private IP address Ranges
▪ Not-routable or allowed on internet
▪ Used inside LAN and free
✓ [Link] to [Link] (16,777,216 IP addresses)
✓ [Link] to [Link] (1,048,576 IP addresses)
✓ [Link] to [Link] (65,536 IP addresses)
2
[Link] | ezxprt@[Link] | +92-3348-15-15-25 | +92-3178-88-39-79
About NAT
✓ WHAT is NAT
▪ Nat is the process to translate multiple private IP of LAN behind DSL into 1 Public IP to
communicate with the internet
▪ It hides the private IP
▪ It was the shorten solution of shortage of ip
✓ Example to Understand
▪ PABX Telephone exchange in office
▪ 1 PSTN number with multiple extensions
▪ Offers extensions like 101, 102, 103
3
[Link] | ezxprt@[Link] | +92-3348-15-15-25 | +92-3178-88-39-79
NAT Terminologies
✓ WAN
▪ Public
▪ Untrusted
▪ Global
▪ Outside)
✓ LAN
▪ Trusted
▪ Local
▪ Inside)
4
[Link] | ezxprt@[Link] | +92-3348-15-15-25 | +92-3178-88-39-79
NAT Terminologies
✓ Inside Local
▪ IP which is assigned to host in Lan
▪ Private ip before
✓ Inside global
▪ Private ip after translation into Public IP
✓ Outside global
▪ Public ip before translation
✓ Outside local
▪ Public ip after translation into Private
5
[Link] | ezxprt@[Link] | +92-3348-15-15-25 | +92-3178-88-39-79
Types of NAT
✓ Static NAT
▪ Used for one to one mapping
▪ 1 private ip bind with 1 Public IP
✓ Dynamic NAT
▪ It require pool to define NAT
✓ NAT Overload
▪ One to Many
▪ Single Public IP share with Multiple Private users
▪ Save Public IPS
▪ Slow down communication
6
[Link] | ezxprt@[Link] | +92-3348-15-15-25 | +92-3178-88-39-79
Static NAT
✓
[Link]-→[Link]
Task:
▪ Translate private ip [Link] into [Link]
✓ Define Inside & Outside Interface
▪ R1(config)# interface fa0/0
▪ R1(config-if)# ip nat inside
▪ R1(config-if)# interface s0/0
▪ R1(config-if)# ip nat outside
✓ Define NAT
▪ R1(config)# ip nat inside source static [Link] [Link]
✓ NAT Verification Commands
▪ R1# ip nat translations
Debug NAT Process 1) R1# debug ip nat 2) R1# u all
▪ R1# ip nat statistics 7
[Link] | ezxprt@[Link] | +92-3348-15-15-25 | +92-3178-88-39-79
Dynamic NAT
Pool ([Link] to [Link])
✓ Define Inside & Outside Interface
▪ As we done in static NAT Lab
✓ Define Pool
▪ R1(config)# ip nat pool ezxprt-lan [Link] [Link] netmask [Link]
✓ Define ACL
pool
[Link]
[Link]
▪ R(config)# access-list 1 permit any [Link]
✓
[Link]
Define Nat using ACL & Pool [Link]
▪ R(config)# ip nat inside source list 1 pool ezxprt-lan
✓ NAT Verification Commands
▪ R1# ip nat translations
▪ R1# ip nat statistics Debug NAT Process 1) R1# debug ip nat 2) R1# u all
8
[Link] | ezxprt@[Link] | +92-3348-15-15-25 | +92-3178-88-39-79
NAT (PAT)
One to Many or Many to One
✓ Define Inside & Outside Interface
▪ R1(config)# interface fa0/0
▪ R1(config-if)# ip nat inside
▪ R1(config-if)# interface s0/0
▪ R1(config-if)# ip nat outside
✓ Define ACL From [Link] to [Link]
▪ R1(config)# access-list 1 permit [Link] [Link]
✓ Define Nat using ACL & Pool
▪ R1(config)# ip nat inside source list 1 interface s0/0 overload
✓ NAT Verification Commands
▪ R1# ip nat translations
Note: All users from [Link] can go out using exit interface ip [Link]
▪ R1# ip nat statistics
9
[Link] | ezxprt@[Link] | +92-3348-15-15-25 | +92-3178-88-39-79
10