Contents of this article
In this article i describe the static network address translation in routers. NAT Network Address Translation defined in router to identify the different devices for different network traffic. NAT Network Address Translation is a method to allow multiple devices to access internet on a single public IP address. To access internet by a device required an unique address known as public IP address.
We know the IP addresses are limited and it is not possible to allot each device a unique IP address. To resolve this problem private IP address used with NAT Network Address Translation. Almost organisations used single Public IP address and allow their multiple users to access internet. This facility provided by NAT Network Address Translation.
The translation of private IP address to a public address done by NAT Network Address Translation. For translation inside local IP address converted to inside Global address . In simple words we can say NAT Network Address Translation allow the local hosts to access internet with single public IP address. Various web services accessible on particular port numbers like FTP on 21. These port numbers of various services helps to access the internet by local hosts. NAT Network Address Translation works on Network layer of OSI or TCP/IP model.
Requirement of NAT Network Address Translation
NAT is mostly used when a LAN required internet access for all devices of LAN. In this case you do not have public IP address for your each device. NAT works fine with single public IP address and provide internet service to all your devices. Another situation is when you want to change your ISP and required to reconfigure your local network. NAT allow to change the ISP without any changing in local network IP address scheme. NAT is also beneficial when two intranet required to merge with duplicate IP addresses.
Static Network Address Translation
The static network address translation is a type of NAT technique used to map the local IP address with Global IP addresses in router. Static network address translation internet access to computers, servers of a private LAN. We know in a LAN we use private IP addresses which are not rout on internet routers. Static network address translation mostly used in the networks where web server installed in local network.
These server required one to one internet access to provide the services. Suppose a LAN have different types of servers to provide the internet services globally. It is not a good idea to keep these servers on public a IP address interface. This will keep the servers unsecured and each server required a unique public IP address. To overcome these problems static network address translation technique used. This technique require to configure static NAT in the router for each server. Static NAT provides security and privacy to internal servers from internet.
Static network address translation provides one to one mapping of private and public IP address. One private IP address mapped with one public IP address at a time. The user on the other end do not recognise the hosting server. He can access the services of local server by accessing the public IP address only.
Static network address translation explained
Static network address translation allow network traffic to access the internet from a static public IP address. Router understand the static routing and land the traffic of a particular service to a local server. The server inside the LAN assigned a unregistered IP address while the WAN interface of router allotted a registered IP address. Static NAT map these unregistered and registered IP with each other to allow internet traffic in the server.
We can say static NAT provides one to one mapping between different IP subnets. The mapping do destination IP address translation in one direction and source IP address translation in opposite direction. In web hosting the web server placed behind the public IP address. A user on internet do not know the IP address of web server. User only surf the public address which is map with the web server by static network address translation. In following configuration you understand static network address translation well.
Configuration of static network address translation.
I give a simple example of static NAT configuration. See the image below. Here a router have two interfaces GigabitEthernet0/0 and 0/1. The local network consist a web server. The network id of local network is 192.168.1.0/24. The IP address assigned to server is 192.168.1.2. the WAN interface of router allotted a public IP address 12.12.12.1.
My requirement is to assign static NAT in router. All traffic on 12.12.12.1 should communicate with the web server 192.168.1.2. First thing i require to assign a local IP address to the interface or router GigabitEthernet0/0. After assigning both IP address, I create a static NAT rule in router and apply it to both interfaces of router. To assign the IP address on the interfaces of router follow the commands as shown in below command window.
Router>en Router#config t Enter configuration commands, one per line. End with CNTL/Z. Router(config)#int Router(config)#interface gig Router(config)#interface gigabitEthernet 0/0 Router(config-if)#ip address 192.168.1.1 255.255.255.0 Router(config-if)#no shut Router(config-if)#exit Router(config)#interface gigabitEthernet 0/1 Router(config-if)#ip address 12.12.12.1 255.255.255.0 Router(config-if)#no shut Router(config-if)#exit Router(config)#do wr Building configuration... [OK] Router(config)#
After assigning the IP address to both interfaces of router. I create a static NAT rule in router as my private IP address is 192.168.1.2 and public IP address is 12.12.12.1. so run the below commands in command window to define static NAT rule in router.
Router(config)#ip nat inside source static 192.168.1.2 12.12.12.1
We have successfully created the static NAT rule in router. Now we have to apply this rule on both interfaces of router so this rule can work for our network. The difference is, on the inside local we define this rule as inside and on inside global interface this rule will be defined as outside rule. See the below commands.
Router(config)#interface gigabitEthernet 0/0 Router(config-if)#ip nat inside Router(config-if)#exit Router(config)#interface gigabitEthernet 0/1 Router(config-if)#ip nat outside Router(config-if)#exit Router(config)#do wr Building configuration... [OK] Router(config)#
By running above commands We have successfully applied the static NAT rules on the router. Now the server 192.168.1.2 is accessible from the internet on public IP 12.12.12.1.
I hope you found this article helpful related to static NAT configuration for CCNA Exam. For any query or suggestions you may Drop a comment below or contact us. Your suggestions are always welcome by us.