Monday, April 27, 2009

Network Address Translation

As I promised Poh Meng in a very boring Sunday, I will post this basic cisco commands for NAT as co-author for this blog, I appreciate Poh Meng for given me the chance to share my semi professional knowledge here, and hope you all find it useful for you.

Normally these IPs are given by ISP, and all these IP are:
WAN IP: (Customer), (ISP) <--- you have here, normally first usable IP of this subnet - is reside to ISP end, and second usable IP of this subnet will allocated to CPE
LAN IP: <--- these IPs are given to customer by ISP as Internet IP address (registered IP)

OK, now we start the Cisco router part:
First we start with assign IP to each interface, both LAN and WAN.
=====Cisco Command=====
interface e0 or interface f0/0 (LAN interface)
ip address <--- assign IP to interface
ip nat inside <--- define boundary of NAT
no shut

interface s0 (WAN interface)
ip address <--- assign IP to interface
ip nat outside <--- define boundary of NAT
no shut

*Sorry for I may confuse you if you don't even know what is IP subnet or subnet mask, behind IP address just a subnet mask for /30 subnet

ip route <--- this is command for default route
access-list 10 permit <---ACL to allow translation from LAN IP to WAN IP
ip nat pool WANIP netmask <--- IP nat pool, Start IP and End IP
ip nat inside source list 10 pool WANIP overload <--- to apply internal IP translation, overload to allow multiple LAN IPs translate to single WAN IP


1 comment:

PohMeng said...

Good JOB future CCIE...
Thanks for post at here.. ^^