11-27-2012 02:36 AM - edited 03-04-2019 06:15 PM
Can anyone confirm if you can re-order the "IP NAT Inside" statements on a Cisco router.
For example I have a router with lots of NAT Statements as below:
ip nat pool cust1Mail 8.8.8.8 8.8.8.8 netmask 255.255.255.248
ip nat inside source list DEFAULT_NAT interface GigabitEthernet0/0.112 vrf cust1
ip nat inside source list DEFAULT_NAT interface GigabitEthernet0/0.116 vrf cust2
ip nat inside source list DEFAULT_NAT interface GigabitEthernet0/0.114 vrf cust3
ip nat inside source list cust-Mail-Server pool BroraMail vrf cust3 overload
ip access-list extended DEFAULT_NAT
permit ip any any
ip access-list extended cust-Mail-Server
permit ip host 192.168.16.137 any
Now I want the router to nat the "192.168.16.137" IP out of the "8.8.8.8" address but to do this I would guess I need to make sure the "
"ip nat inside source list cust-Mail-Server pool BroraMail vrf cust3 overload" statement is before the "ip nat inside source list DEFAULT_NAT interface GigabitEthernet0/0.114 vrf cust3" statement.
Is there an easy way to re-order the ip nat inside source statements to make sure this is the case?
Thanks
11-27-2012 02:50 AM
Hi,
why don't you just do like this:
ip access-list extended DEFAULT_NAT
deny ip host 192.168.16.137 any
permit ip any any
Regards.
Alain
Don't forget to rate helpful posts.
11-27-2012 03:01 AM
I was waiting for that reply
This won't work in this case due to the VRF's Each VRF refer's to a seperate routing table and each routing table could have it's own 192.168.16.137 IP address so this would stop every instance of 192.168.16.137 natting out in each routing table. I could create seperate NAT Access-lists for each VRF and this is in fact what I've done to resolve the issue but I wanted to see if there was specifically a way to re-order the ip nat inside statements to resolve it this way as well.
Thanks
Andy
11-27-2012 03:32 AM
Hi,
yes you're right if you use same ACL for all VRFs then it won't work. I've never heard about NAT statement reordering method.
Regards.
Alain
Don't forget to rate helpful posts.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide