KB ID 0000971
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.
Solution
1. Connect to the router, and got to enable mode, then global configuration mode.
[box]
PetesRouter#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
PetesRouter(config)#
[/box]
2. Setup the WAN (outside facing) interface.
[box]
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
[/box]
3. Setup the LAN (inside facing) interface.
[box]
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
[/box]
4. You will need a ‘default route’ which will be the routers ‘next hop’ towards the internet.
[box]
PetesRouter(config)#ip route 0.0.0.0 0.0.0.0 123.123.123.2
[/box]
5. Create an ACL that wil match any trafic coming from inside (remember permit means match).
[box]
PetesRouter(config)#access-list 100 remark NAT-ACL PetesRouter(config)#access-list 100 permit ip 192.168.1.0 0.0.0.255 any
[/box]
6. Then tie it all together with the following command;
[box]
PetesRouter(config)#ip nat inside source list 100 interface GigabitEthernet 0/0 overload
[/box]
7. Save the changes.
[box]
PetesRouter(config)#exit PetesRouter#write mem Building configuration... [OK] PetesRouter#
[/box]
Related Articles, References, Credits, or External Links
NA