cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
878
Views
0
Helpful
5
Replies

IP NAT inside and outside traffic

walu
Level 1
Level 1

Hello together,

my questions sound a little bit strange but these are the demands from our customer.

So here is what we try.

We try to translate the source and the destination address at once. And this just over one Interface (ethernet0).

So the packet arrives at e0 with 192.168.90.250 as source and 192.168.40.51 as destination address- We translate the address to S:172.20.7.11 and D:172.32.27.253. So in one direction it works. (We use Loopback Interfaces, static and dynamis NAT to achieve this).

But if the response of the packet arrives we are not able to retranslate the paktet. The response looked like S:172.32.27.253 and D:172.20.7.11 and should be S:192.168.40.51 and D:192.168.90.250 , but we didn´t achieve this.

We tried this through the use of route maps and dynamic translation and i know that Cisco IOS can support multiple outside NAT tables.

So has anbody a idea to achieve this, that we can translate source and destination address at once in both directions ?

Maybe somebody can provide an Configuration example or some hints for this.

Thanx for your help.

5 Replies 5

mark.vicuna
Level 1
Level 1

there is a good document for nat order of operation - the order of which translation is done is not always as assumed! :-)

http://www.cisco.com/warp/public/556/5.html

jolmo
Level 4
Level 4

Really, it sounds strange.

I supposed you use e0 as inside interface and loopback as outside interface. Anyway, I recommned to use static NAT both inside and outside and configure e0 with 'ip nat inside' command and loopback with 'ip nat outside' command.

I'm managing a router with simultaneous internal and external NAT just like you want to do. So If you want I can post some configs to you

You are exactly right !!

We use e0 as inside interface and loopback as outside interface.

In one direction we use dynamic and in the other static NAT. In one direction it works well, but for the packets that are returning it didn´t work.

So if you are managing a router with simultaneous internal and external NAT just like we needed, it would very nice from you to post me some example configuration just to compare and check what we have done wrong.

Thank you in advance.

Can you provide any details of your current configuration and the routing decision being made on translated packets returning to this router (i.e. next hop points the packet to serial int and gets routed via route map to loopback int)?

First I would like to take a look into your NAT configuration. It would be easier. Anyway I advice you to use static NAT with machines that don't start conversations, this is, servers that replies queries. I mean, if you use dynamic NAT with this machines, NAT probably won't work (maybe this is your problem).