Saturday, September 18, 2010

Cisco IOS Destination-NAT

Throughout my career in networking, I’ve often implemented Source-NAT translation on Cisco routers (the practice of replacing the source IP address in packets) to either hide the private address or because the subnet overlapped with another location.  However, I’ve rarely implemented Destination-NAT (the practice of replacing the destination IP address in packets).  Destination-NAT, it turns out is not as self-explanatory as Source-NAT when it comes to CLI commands.  And, the materials I found on CCO and Google searches did not clearly explain how to do this simple task in Cisco IOS.  So, I think it warrants a quick article in case others need!

Why would you want to Destination-NAT?  It is needed when a service provider assigns private addressing (RFC 1918) to a service you need to target and you already have a route in your network for that subnet, which goes elsewhere.  Or, you need to direct certain lines of business (LOB) to use one circuit over another, to reach the same service.  In this case, you can have one LOB target the real IP to reach the service over a specific circuit, and another LOB would target the Destination-NAT IP.  This way, the two LOBs don’t have to share the circuit.

If you are translating one IP to one IP, there is no need for a pool, or an ACL, for either source OR destination-NAT.  You would use the “ip nat inside source static” or “ip nat outside source static”.  I’ll explain which one to use for which scenario.  I just depends of the direction the session is initiated.  I usually assign the interface for my network (the one closer to the network core) as the “inside” interface using the “ip nat inside”.  And the interface facing the other network as “outside” using the “ip nat outside” command.  This also happens to be the way zone based firewalls work, although NAT has nothing to do with security or firewalls, and you could very well do the opposite.

Before I give a Destination-NAT example, let’s do a Source-NAT because that’s more common.  Here is the topology:

Core network where sessions get initiated ( –> NAT router –> Other network (

In this scenario, we hide the core network’s real host IP address ( for that flow with the NAT range IP address of  So, the “other network” sees our traffic coming from the NAT address.

The IOS CLI command to do this is:

ip nat inside source static

Of course, you have to ensure there is a route for the translated address in the routing tables along the path for any router to reach that destination. 

Now, let’s say we also need to use this NAT router to translate the destination of our packet.  In other words, there is a LOB who needs to reach via a different path, or we simply cannot advertise into our core, for various reasons.  We need the host on our core to be able to target by using destination address

At the NAT router, you can’t use “ip nat inside destination static” because there is no such command in IOS.  Instead, you would use the following:

ip nat outside source static add-route

As you can see, we are dealing with the outside NAT interface, which means we NAT in the return direction, which is why we have to reverse the order of the translation and use “source” instead of “destination”!

The “add-route” keyword may be needed if there is no route (or a route with an incorrect next-hop) in the routing table for the old “not-translated” destination.

Again, you have to ensure the route is advertised inside your core, so the hosts can reach it.

Note- not all applications are tolerant to NAT, so make sure you test!


  1. Thank you so much.. (Commented even before trying....) I have been looking for article like yours the whole day.

    Just as a question, wouldn't the "ip nat inside destination" do the same thing?

    I have been trying th=o get that one setup for a long time now..!

    1. @akshayd2006, you are welcome! I am glad this article helped. "ip nat inside destination list" (list is a required keyword) requires an address pool, which isn't what we want here.

  2. Thanks for the article, helped me a lot to find the right syntax for destination nat.

  3. Thanks so much. This helped me out. I couldn't find the correct solution anywhere else. This made my day!

  4. Hi Thanks for the article. And I found that when I ping from inside to outside, I do not see in the debug that translation occurs. May it be true that translation only occurs when traffic from outside initiated?

  5. Please help not sure doing it correctly, I could not get CLI 'ip nat outside source static add-route' to work.

    (INT router –> ( NAT router –> ( EXT router)

    CLI added for 'ip nat inside source static'
    From Ext router when I ping destination is translated to

    CLI added for 'ip nat outside source static add-route'
    From Ext router I could not ping to NAT Router and from NAT router I could not ping to Ext router

  6. CLI added for 'ip nat inside source static'
    From Ext router when I ping destination is translated to (Where I am accessing INT from EXT)

    I am confused is this source NAT? As based on the definition I found for Juniper SRX (see below) it seems to be Destination NAT.

    Destination NAT is a type of NAT that is configured when you want to get access to your internal network from outside. This type of NAT is also called destination PAT because in this type of NAT, you simply translate different ports to reach various services with same IP address.

  7. Thanks for sharing a great article.Arlo Login is the most common issue faced by people who are using Netgear’s Arlo security cameras. The login usually occurs due to the wrong username/email and password.If you need any assistance regarding Arlo Login Installation or Troubleshooting, Contact support Team at +1-844-456-4180.

  8. Advaita yoga studio is one of the most reportable yoga studios in Chandigarh sector 38. you can get different sessions and therapies to enhance your spiritual, professional and personal life.Check our website:

  9. I was very pleased to find this site. I wanted to thank you for this great read!! I definitely enjoyed every little bit of it and I have you bookmarked to check out the new stuff you post.
    Kindle Fire not working |
    Kindle Fire won’t turn on |
    Kindle Fire keeps losing WiFi connection |
    Kindle Won’t Connect to WiFi |
    Kindle Paperwhite Frozen Screen |
    Kindle Paperwhite troubleshooting |
    kindle won't charge |
    kindle fire won't charge |
    kindle app not working |

  10. We provide support for login,my arlo login, myarlo login, arlo pro 2 login, arlo login my account, arlo log in issues. Our highly qualified team is always happy to assist you.
    arlo camera login

  11. The camera's led flashes blue and amber alternately while a firmware upgrade is in progress. Do not turn off your smarthub or base station while the firmware upgrade is in progress. For your home, Arlo security cameras and systems are great. Firmware upgrades for base stations are usually automatic, but you may need to manually upgrade the arlo firmware if your base station is offline during the update or if you are adding a device. arlo pro, arlo q, arlo camera firmware update

  12. Being a well-known and well-respected brand, however, does not guarantee that there will be no problems with the printers. It has been observed that the majority of Canon printer users find it difficult to resolve the issue and are stuck at the setup Canon printer stage. That is why they seek out information on how to connect a Canon printer to a computer in order to complete the process correctly. how to reset printer canon

  13. replica bags paypal accepted hermes fake m2n26g3i70 replica zara bags view publisher site d8z90y9f44 replica louis vuitton replica evening bags look at this web-site a1r46l4y43 replica bags online replica bags los angeles

  14. This provide 1xbet will get you a 250% match bonus as much as} $2,500 on your first deposit with 50 spins on the cheeky and tropical Wild Hog Luau slot title. $/€1 deposit also provides players an excellent opportunity to see if the site is really to their tastes and preferences. You can head in, make a minimal deposit, and take your time exploring the slots and desk games on provide. Rather than spending large sums and discovering that there's nothing to properly with|swimsuit} you, you can start small and spend longer trying out different games and choices till would possibly be} actually happy.