In this post I will try to explain how NAT works. For this article I used the network-diagram below. The network represented is just a very basic network, I used RIPv2 in this example.

For this NAT example I used the loopback-address of router’s R1 and NATted it to ip-address 23.23.23.1 on router R2. This means that router R3 will be able to reach router R1’s loopback address by using the ip-address 23.23.23.1 instead of 1.1.1.1.
For NAT to work we need to specify an “ip nat inside” and an “ip nat outside” interface. For this example where we are going to NAT router’s R1 loopback ip-address to router R3 we should specify Fa3/0 on router R2 as the “ip nat outside” interface and router’s R2 fa2/0 interface as “ip nat inside”
For router R2 to be able to reach router’s R1 loopback ip-address we specified a static route to the loopback ip-address of router R1 (ip route 1.1.1.1 255.255.255.255 12.12.12.1).
The relevant portion of the router’s configs :
R1 :
|
R2 :
|
R3 :
|
Now let’s ping 23.23.23.1 from router R3 and look at router’s R2 NAT table to see the NAT translations :
R3 :
|
The NAT table on router R2 :
R2 :
|
As you can see above the ip-address 23.23.23.1 is in this case the “inside global” ip-address and the 1.1.1.1 is the “inside local” ip-address here.
The next NAT post will be about PAT also known as NAT-overload