
Configuration of Static/Dynamic NAT in Cisco Router
In order to configure NAT we have to understand four basic terms; inside local, inside global, outside local and outside global. These terms define which address will be mapped with which address.
Term : Description
- Inside Local IP Address : Before translation source IP address located inside the local network.
- Inside Global IP Address : After translation source IP address located outside the local network.
- Outside Global IP Address: Before translation destination IP address located outside the remote network.
- Outside Local IP Address : After translation destination IP address located inside the remote network.
To configure IP address in Router1 click Router1 and select CLI and press Enter key.
Two interfaces of Router1 are used in topology; FastEthernet0/0 and Serial 0/0/0.

- Router>enable
- Router# configure terminal
- Router(config)#hostname R1
- R1(config)#interface FastEthernet0/0
- R1(config-if)#ip address 10.0.0.1 255.0.0.0
- R1(config-if)#no shutdown
- R1(config-if)#exit
- R1(config)#exit
- R1#configure terminal
- R1(config)#interface Serial0/0/0
- R1(config-if)#ip address 100.0.0.1 255.0.0.0
- R1(config-if)#no shutdown
- R1(config-if)#exit
- Router>enable
- Router#configure terminal
- Router(config)#hostname R2
- R2(config)#interface FastEthernet0/0
- R2(config-if)#ip address 192.168.1.1 255.255.255.0
- R2(config-if)#no shutdown
- R2(config-if)#exit R2(config)#interface Serial0/0/0
- R2(config-if)#ip address 100.0.0.2 255.0.0.0
- R2(config-if)#no shutdown
- R2(config-if)#exit
1. Define IP address mapping
2. Define inside local interface
3. Define inside global interface
R1 Static NAT Configuration
- R1(config)#ip nat inside source static 10.0.0.10 50.0.0.10
- R1(config)#interface FastEthernet 0/0
- R1(config-if)#ip nat inside
- R1(config-if)#exit
- R1(config)#interface Serial 0/0/0
- R1(config-if)#ip nat outside
- R1(config-if)#exit
- R1(config)#ip nat inside source static 10.0.0.20 50.0.0.20
- R1(config)#ip nat inside source static 10.0.0.30 50.0.0.30
- R2(config)#ip nat inside source static 192.168.1.10 200.0.0.10
- R2(config)#interface FastEthernet 0/0
- R2(config-if)#ip nat inside
- R2(config-if)#exit
- R2(config)#interface Serial 0/0/0
- R2(config-if)#ip nat outside
- R2(config-if)#exit
- R1(config)#ip route 200.0.0.0 255.255.255.0 100.0.0.2
- R2(config)#ip route 50.0.0.0 255.0.0.0 100.0.0.1
Dynamic NAT configuration requires four steps: –
1. Create an access list of IP addresses which need translation
2. Create a pool of all IP address which are available for translation
3. Map access list with pool
4. Define inside and outside interfaces
R1 Dynamic NAT Configuration
- R1#configure terminal
- R1(config)#access-list 1 permit 10.0.0.10 0.0.0.0
- R1(config)#access-list 1 permit 10.0.0.20 0.0.0.0
- R1(config)#access-list 1 deny any
- R1(config)#ip nat pool ccna 50.0.0.1 50.0.0.2 netmask 255.0.0.0
- R1(config)#ip nat inside source list 1 pool ccna
- R1(config)#interface FastEthernet 0/0
- R1(config-if)#ip nat inside
- R1(config-if)#exit
- R1(config)#interface Serial0/0/0
- R1(config-if)#ip nat outside
- R1(config-if)#exit
- R2>enable
- R2#configure terminal
- R2(config)#ip nat inside source static 192.168.1.10 200.0.0.10
- R2(config)#interface Serial 0/0/0
- R2(config-if)#ip nat outside
- R2(config-if)#exit
- R2(config)#interface FastEthernet 0/0
- R2(config-if)#ip nat inside
- R2(config-if)#exit
- R1(config)#ip route 200.0.0.0 255.255.255.0 100.0.0.2
- R2(config)#ip route 50.0.0.0 255.0.0.0 100.0.0.1
- Run ipconfig command.
- Run ping 200.0.0.10 command.
- Run ping 192.168.1.10 command
Comments
Post a Comment