What are NAT and PAT? : explained with the configuration of NAT with PAT in Cisco packet tracer. We will also enable PAT as it immensely increases the capability of NAT.
NAT (Network Address Translation) is used to translate the private IP address to a public IP address and vice versa.
Most organizations have a limited amount of public IPs as the companies have to pay for them. So, we generally use a private IP range in the internal networks. However, if the internal network wants to communicate with the public network, it is not possible since the private IP address can’t recognize the public IP address. Hence, it can’t communicate. To overcome this issue, we use NAT. As the traffic goes out of the internal network, all this internal traffic is assigned a public IP address. This is how communication becomes possible with public networks, such as the internet.
Within an organization, a large number of devices access the public network. So even though the public IP addresses are not expensive but it is just not feasible to do one-to-one translation with the public IPs. Besides, organizations would have to buy a large range of public IP addresses for their network. To solve this problem, Nat is often is used with Pat (Port Address Translation). While translating the IP address of the internal network traffic, a port number is assigned to the traffic to distinguish the traffic originating from different systems in the network. This allows multiple systems to access the public network with the use of just one public IP.
So, in this lab, we will configure Nat with Pat.
First of all, we have to label the interfaces of the router with Nat Inside and Nat Outside. This would let us know the interfaces that are handling the traffic from internal as well as the public network. After that, we have to create an access list to allow a range of IP addresses that need to be translated to public IP with the help of NAT. And finally, we will enter a command that will take the IP addresses from the access list to be translated into public IP before communicating with the public network. Using ‘overload’ at the end of the command will enable PAT, and the router will be able to perform port address translation as well.
NAT overload configuration in packet tracer
1. label the interfaces
2. create a access list to allow network 192.168.1.0/24 to be translated
3. Enable NAT with PAT
Router(config)#interface fastethernet 0/0
Router(config)#ip nat inside
Router(config)#interface fastethernet 0/1
Router(config)#ip nat outside
Router(config)#access-list 1 permit 192.168.1.0 0.0.0.255
Router(config)#ip nat inside source list 1 interface fastethernet 0/1 overload