Cisco Router – Configure NAT (NAT Overload)

KB ID 0000971 Dtd 18/07/14

Problem

NAT is the process of taking one or more IP adresses and tranlsating it/them into differnet IP addreses. You may require your router to translate all your internal IP addresses to your public (ISP allocated) IP address. To do that we use a process called NAT Overload.

Cisco NAT Overload

Solution

1. Connect to the router, and got to enable mode, then global configuration mode.

PetesRouter#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
PetesRouter(config)#

2. Setup the WAN (outside facing) interface.

PetesRouter(config)#interface GigabitEthernet0/0
PetesRouter(config-if)#ip address 123.123.123.123 255.255.255.0
PetesRouter(config-if)#ip nat outside
PetesRouter(config-if)#no shutdown
PetesRouter(config-if)#exit

3. Setup the LAN (inside facing) interface.

PetesRouter(config)#interface GigabitEthernet0/1
PetesRouter(config-if)#ip address 192.168.1.1 255.255.255.0
PetesRouter(config-if)#ip nat inside
PetesRouter(config-if)#no shutdown
PetesRouter(config-if)#exit

4. You will need a 'default route' which will be the routers 'next hop' towards the internet.

PetesRouter(config)#ip route 0.0.0.0 0.0.0.0 123.123.123.2

5. Create an ACL that wil match any trafic coming from inside (remember permit means match).

PetesRouter(config)#access-list 100 remark NAT-ACL
PetesRouter(config)#access-list 100 permit ip 192.168.1.0 0.0.0.255 any

6. Then tie it all together with the following command;

PetesRouter(config)#ip nat inside source list 100 interface GigabitEthernet 0/0 overload

7. Save the changes.

PetesRouter(config)#exit
PetesRouter#write mem
Building configuration...
[OK]
PetesRouter#
 

Related Articles, References, Credits, or External Links

NA

Author: Migrated

Share This Post On