Policy based NAT on router
Here is my requirement:
I want to NAT the traffic coming from 10.2.2.0 0.0.0.255 going to 2.2.2.2
I want my source IP to change to 192.168.2.0/24 subnet, how do I do that?
1. Create an access list to define your actual traffic:
ip access-list extended ACL1
permit ip 10.2.2.0 0.0.0.255 host 2.2.2.2
2. Create a route map and call this ACL
route-map mymap permit 10
I want to NAT the traffic coming from 10.2.2.0 0.0.0.255 going to 2.2.2.2
I want my source IP to change to 192.168.2.0/24 subnet, how do I do that?
1. Create an access list to define your actual traffic:
ip access-list extended ACL1
permit ip 10.2.2.0 0.0.0.255 host 2.2.2.2
2. Create a route map and call this ACL
route-map mymap permit 10
match ip add ACL1
3. Now create a pool for the IP range (NATed range)
ip nat pool NAT1 192.168.2.1 192.168.2.254 prefix-length 24
4. Create your NAT statement now:
ip nat inside source route-map mymap pool NAT1