How does nat selectoin work when more than one nat command?

Answered Question
Feb 4th, 2007

My router's configuration contains two ip nat inside source commands with route maps. One command is a static translation and one is a dynamic. Is this the way processing works:

The inside packet source address is processed against one of the command's route map (which command?). If that route map permits the address, then the source address is natted.

However, if the first route map denies the address, then the router continues on to the second ip nat inside source command and processes the address against its route list.

Right?

I have this problem too.
0 votes
Correct Answer by Jon Marshall about 9 years 8 months ago

Hi

Basically yes, the router will compare the packet against all route-maps until it finds a match (if any) and then apply the NAT.

If you think about it logically it shouldn't matter which order it applies them because if you are statically mapping one address to another you would ensure that this address is never matched in your dynamic NAT setup otherwise you could get very unpredictable results.

HTH

Jon

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 3 (1 ratings)
Loading.
Correct Answer
Jon Marshall Sun, 02/04/2007 - 13:30

Hi

Basically yes, the router will compare the packet against all route-maps until it finds a match (if any) and then apply the NAT.

If you think about it logically it shouldn't matter which order it applies them because if you are statically mapping one address to another you would ensure that this address is never matched in your dynamic NAT setup otherwise you could get very unpredictable results.

HTH

Jon

Actions

This Discussion