How to Configure Static NAT on Cisco Router? – The NAT operation on the Cisco Router is configured to allow computers on the Local network to access the Global network. In this article, after creating a small topology using GNS3, we will configure Static NAT on Cisco Router.
How to Configure Static NAT on Cisco Router?
Before configuring Static NAT on Cisco Router, let’s briefly explain Static NAT. Static NAT operation has two terms inside and outside.
When any computer on the local network wants to access the Internet, the IP package will first access the Internet from the external interface of the Router connected to the ISP Router through the switch on the local network.
When configuring Static NAT according to the network topology, you need to define the local and external interfaces of Router. This is the most important point for Static NAT configuration on Cisco Router.
Before configuring Static NAT on Cisco Router with GNS3, create a network topology as in Step 1. Next, integrate a virtual machine on VMware Workstationinto GNS3. For the network adapter in VMware virtual machine settings, select Ethernet if you are using a laptop and connect your computer to the ADSL modem otherwise you will not be able to configure Static NAT.
When using GNS3, do NAT configuration operations without selecting a WiFi card. Because the VMware virtual machine may not get the IP address from the DHCP server.
To configure Static NAT on Cisco Router with GNS3, follow the steps below in order.
Create the topology as shown the below image by opening the GNS3 for Static NAT configuration on GNS3.
During the Static NAT configuration on Cisco Router, we will not give the Static IP addressto Cisco Router’s interface. Because we will assign the IP address from DHCP to Router to better understand NAT on GNS3.
According to the topology in the GNS3 program, you can use any virtual machine on VMware Workstation.
Configure the IP address settings of the virtual machine according to the network topology and then test the connection by pinging the FastEthernet interface of Cisco Router.
Pinging the FastEthernet 0/1 interface of Cisco Router from the Windows 10 virtual machine will succeed as follows.
Because we used the DHCP command to assign the IP address of the FastEthernet 0/0 interface of Cisco Router, the IP address 192.168.1.103 was obtained from the DHCP server of the ADSL modem. Pinging the FastEthernet0/0 interface of Cisco Router from the Windows 10 virtual machine will succeed as follows.
However, if we ping the Google DNS addresses from the Windows 10 virtual machine, the operation will fail.
Now, open the Cisco Router CLI command prompt and execute the following commands to configure Static NAT.
R1# conf t
R1(config)# interface fastethernet 0/0
R1(config-if)# ip address dhcp
R1(config-if)# no shutdown
R1(config-if)# ip nat outside
R1(config)# interface fastethernet 0/1
R1(config-if)# ip address 192.168.8.1 255.255.255.0
R1(config-if)# ip nat inside
R1(config-if)# no shutdown
R1(config)# ip nat inside source static 192.168.8.10 192.168.1.50
R1(config)# ip name-server 192.168.1.1
R1(config)# ip domain-lookup
R1# copy running-config startup-config
When you ping the Google DNS server via Cisco Router, the result will be as follows.
After applying the commands required to configure Static NAT on Cisco Router, if you ping the Google DNS server from Windows 10 virtual machine, you can see that the process is successful like in the following display.
In Windows 10 Ip configuration, if you leave the DNS server section blank, the web page will not open when you type Google.com in the browser address line.
Open the IP address configuration of the Windows 10 virtual machine and type the IP address of the ADSL modem in the DNS section. If you try to access Google again, you will succeed.
You can view Static NAT records on the Cisco Router with the show ip nat translation command. The show command outputs after accessing Google via the virtual machine is as follows.
You have seen that configuring Static NAT on Cisco Router using GNS3 is very easy. The following image shows how Static NAT works. The 192.168.8.10 IP address on the local network is translated to the 192.168.1.50 IP address on Cisco Router so that the virtual machine will access the internet.
Occasionally, we may need to delete these NAT translations in the Cisco Router CLI console when we encounter problems in the network environment. If we want to delete the NAT records on Cisco Router, we can clear all translated Static NAT records using the clear ip nat translations * command in the Router’s privileged configuration mode.
If you use the show ip nat translation command again in the privileged configuration mode, you will see that all NAT records are deleted as shown in the following image.
For example, if we access Facebook.com, the Static NAT records of Cisco Router will match again.
Cisco Router Static NAT Configuration Show Commands
[su_tab title=”R1# show running-config”]
R1# show running-config
Current configuration : 1050 bytes
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
no aaa new-model
memory-size iomem 5
no ip icmp rate-limit unreachable
ip name-server 192.168.1.1
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
ip tcp synwait-time 5
ip address dhcp
ip nat outside
ip address 192.168.8.1 255.255.255.0
ip nat inside
ip forward-protocol nd
no ip http server
no ip http secure-server
ip nat inside source static 192.168.8.10 192.168.1.50
no cdp log mismatch duplex
line con 0
exec-timeout 0 0
privilege level 15
line aux 0
exec-timeout 0 0
privilege level 15
line vty 0 4
How to Configure Static NAT on Cisco Router using GNS3? ⇒ Video
To configure Static NAT on GNS3, you can watch the video below and also subscribe to our YouTubechannel to support us…
How to Configure Static NAT on Cisco Router in GNS3? – After completing the Cisco NAT configuration, we have looked at the show commands of Static NAT on the Cisco Router CLI console. Thanks for following us!
If this article is helpful, send me feedback by commenting! Thanks in advance, take care of yourself!
Also, you can add to the browser bookmarks by pressing the Ctrl+D to read this article later!
Articles Related to How to Configure Static NAT on Cisco Router