Port Address Translation Lab - Zacham17/my-tech-journal GitHub Wiki

How to Configure Port Address Translation(PAT)

To Configure Static NAT on a Cisco Router, I used the following steps:

Set Inside and Outside interfaces

  1. Run the following commands to set an inside interface:
R1(config)#interface serial 0/0/0
R1(config-if)#ip nat inside
R1(config-if)#exit
  • The commands above are used to set inside facing NAT interface. In the example above the serial 0/0/0 interface is being set as the inside interface.
  1. Run the following commands to set an outside interface:
R1(config)#interface fastEthernet 0/0/
R1(config-if)#ip nat outside
R1(config-if)#exit
  • The commands above are used to set outside facing NAT interface. In the example above the fastEthernet 0/0 interface is being set as the outside interface.

Configure PAT

  1. Run the following command to configure an address pool for PAT:
R1(config)#ip nat pool test 30.0.0.120 30.0.0.120 netmask 255.0.0.0
  • The command above creates an address pool named test. The first IP address is the first IP address in the range, and the second IP address is the last IP address in the range. Since they are the same in this command, only the 30.0.0.120 IP address is used.
  1. Use the following command so create an access list:
R1(config)#access-list 1 permit 192.168.0.0 0.0.0.255
  • The access-list command specifies which IP addresses can use the address pool. This example allows addresses from the 192.168.0.0 network with a subnet of 255.255.255.0. (The subnet is reversed in the command)
  1. Use the following command to configure address translation:
R1(config)#ip nat inside source list 1 pool test overload
  • This command makes it so the addresses defined in access list 1 can be translated to the PAT IP set earlier(30.0.0.120), from pool, called test, when going from the "inside" to "outside".

Now that NAT is set up, after making some connections, the command show ip nat translations can be used to view the NAT table