Welcome to the Network Engineering Domain
Pape O. Fall's Blog

NAT – Static NAT

Let’s illustrate how to configure Static NAT. At this point, if you are unfamiliar with NAT then please read this post here first.

We will use the following topology to make our point…

NAT File 6

Here, we have Host A which needs to connect to the web server. Host A IP address is 192.168.1.1 (Inside Local) which is not routable on the Internet. We will statically NAT Host A Private IP address to 108.57.60.240 (Inside Global Address).

Now depending on the direction of the translation, the end interfaces of the NAT enabled router should be configured as either “ip nat inside” or “ip nat outside”.

In our case here, we need to translate Host A IP address to the Inside Local address. In that sense, the interface with the default gateway address should be configured with “ip nat inside” and the interface interfacing with the internet should be configured with “ip nat outside”.

Let’s do that…

NAT File 7

Good ! Now that we have defined our interfaces correctly, we need to instruct the router to perform a static NAT to translate the Inside Local address to the Inside Global address. The commands is as such: ip nat inside source static …

Let’s do that…

NAT File 8

Here observe that we can get very granualar with our configuration as it provides us with many different options which solves different scenarios and designs. For the sake of Static NAT which is also refered as Basic NAT, we only instruct the router to perform a basic “Inside address translation”.

Let’s enable debug on the far end…

NAT File 9

Let’s now ping from the Host to the Web server…

NAT File 10

Let’s check our NAT table on RT01RL…

NAT File 11

Good ! Here you can see that the Inside Global address is statically mapped to the Inside Local address before the icmp traffic. This entry will always exist on the NAT table as it is statically defined.

Notice here how both the Outside Local and Outside Global address has been populated once the ping request passed through the router.

Let’s take a look at our debug output on the far end and see what we can make out…

NAT File 12

What I would like to bring to your attention here is that the Inside Local address is completely unknown to the web server. The IP address in the datagram header has been rewritten as it passes through the router. Hence, the web server received a packet with a source address of 108.57.60.240.

The Web Server then replies with a destination of 108.57.60.240.

That’s all I have for you today. Please let me know if you have any questions.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

A Little About Myself

Hello I'm Pape. My friends call me Pop. I'm CCIE #48357. I enjoy my field and love to share it with others. I love to write so I'm sharing my blog with you.

Sign up to receive notifications and updates whenever new topics or videos are uploaded!

RouteLeak Calendar

September 2024
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
30