Im am setting up a static NAT with route-map for a client. I want this address to be NAT'd to a specific address based on destination. Now, I know how to setup the NAT and the Route-Map but my question is will this work backwards? So for example say I have this configuration.
ip address 10.10.2.1 255.255.255.0
ip nat inside
ip address 172.25.20.1 255.255.255.0
ip nat outside
ip nat inside source static 10.10.2.140 172.25.20.10 route-map MYMAP
route-map MYMAP permit 10
match ip address 101
access-list 101 permit ip host 10.10.2.140 172.25.19.0 255.255.255.0
Will this only work for translation going from inside to outside? Or will I need to make a reverse config for outside to inside?
It is a strange thing about ip nat inside source, that it is also the command you use to translate the destination address for packets coming in from the outside. So yes, it should work.
I am struggling with the access-list at the moment. I would try starting with an "any any" access list, get the translation working, and experiment from there.
I believe the access list needs to pair the outside global source address with the outside global destination address. In other words, access-list 101 permit ip any host 172.25.20.10. Which actually is not really needed since your translation command is 1-to-1 anyway.
But please correct me if I am wrong, someone with more familiarity with NAT.
Really what Im trying to do is to use this like you would use Policy NAT (based on destination) on a PIX. So Im trying to NAT an address only based on destination. Would this work this way? And also you think that I need to used the global outside address in my access-list?
But without the route-map wouldnt that be a static 1 to 1 translation for the inside interface to the outside interface? I only want it to nat if Im trying to hit a certain outside subnet...thanks for you continued help
OK, I think I begin to understand what you are trying to do. Let me paraphrase it to see if I got it right.
There is some remote network with address 172.25.19.0/24. You want them to be able to send you packets to address 172.25.20.10. When they do so, you want them to be redirected to your inside server at 10.10.2.140. And of course, for the return packets to be translated correspondingly.
If that is so, then I think your access-list is correct because it has to be seen from the point of view of the outgoing packets. My only doubt is whether the host part should be 10.10.2.140 or 172.25.20.10.
I am learning! I set up something like your scenario, but with the addresses changed to fit in with a lab I happened to have loaded on my rack. It set up exactly your configuration, but with the mask in the access list changed to 0.0.0.127. I shall translate addresses into your scenario for clarity.
I put ICMP debug on the source and destination (routers), and pinged your 172.25.20.10 address. A ping from 172.25.19.64 to 172.25.20.10 arrived at the destination 10.10.2.140 looking like it came from 172.25.19.64 to 10.10.2.140. The reply packet was translated in the other direction, i.e. it was S=172.25.20.10, D=172.25.19.64. So far so good - the translation was working.
I then pinged from an address that was off the access list: (S=172.25.19.164, D= 172.25.20.10). It arrived at the destination looking like S=172.25.19.164, D=10.10.2.140. That is, although the source was off the route map, the translation still took place. The destination reply in the normal way. But when the reply packet got back, it was S=10.10.2.140, D=172.25.19.164. So in other words, the route map did not prevent the translation of the incoming ping, but did prevent the translation of the reply.
IOS 12.2(15)T17 throughout.
That is not really what you want. I shall go back to the drawing board. Sorry.
Going the other way, generating the ping from inside, work perfectly. If I pinged something covered by the route map, then my source address was translated OK, and the destination of the reply accordingly. If I pinged something off the access-list, then no translation took place in either direction.
(Thinking about it, maybe that was what you were after in the first place!)
That is exactly what I was looking for....only translation based on the access-list. I did notice I put the mask in incorrectly, Im used to PIX! I did get this working for the client. Thanks for your diligent work on this, I guess though you were doing it for the same reason I was asking, to learn something new, thats what keeps this interesting. Thanks Again
Question We run asr9001 with XR 6.1.3, and we have a very long delay to
login w/ SSH 1 or 2 to the device compare to IOS device. After
investigation, the there is 1s delay between the client KEXDH_INIT and
the server (XR) KEXDH_REPLY. After debug ssh serv...
Introduction The purpose of this document is to demonstrate the Open
Shortest Path First (OSPF) behavior when the V-bit (Virtual-link bit) is
present in a non-backbone area. The V-bit is signaled in Type-1 LSA only
if the router is the endpoint of one or ...
Hi, I am seeing quite a few issues with patch install and wanted to
share my experience and workaround to this. Login to admin via CLI, then
access root with the “shell” command Issue “df –h” and you’ll probably
see the following directory full or nearly ...