cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3941
Views
0
Helpful
3
Replies

Conditional NAT based on source address ?

KeithN123
Level 1
Level 1

Hi

can anyone tell me if it is possible to do a conditional NAT based on the source address ?

i.e.

if source address is 192.168.1.1 and the destination is 10.47.1.50 then NAT 192.168.1.1 to 10.49.5.20

if source address is 192.168.1.2 and the destination is 10.47.1.50 then NAT 192.168.1.2 to 10.49.5.30

many thanks

Keith

1 Accepted Solution

Accepted Solutions

Jon Marshall
Hall of Fame
Hall of Fame

Keith

access-list 101 permit ip host 192.168.1.1 host 10.47.1.50

access-list 102 permit ip host 192.168.1.2 host 10.47.1.50

route-map NAT1 permit 10

match ip address 101

route-map NAT2 permit 10

match ip address 102

ip nat inside source static 192.168.1.1 10.47.1.50 route-map NAT1

ip nat inside source static 192.168.1.2 10.47.1.50 route-map NAT2

Jon

View solution in original post

3 Replies 3

Jon Marshall
Hall of Fame
Hall of Fame

Keith

access-list 101 permit ip host 192.168.1.1 host 10.47.1.50

access-list 102 permit ip host 192.168.1.2 host 10.47.1.50

route-map NAT1 permit 10

match ip address 101

route-map NAT2 permit 10

match ip address 102

ip nat inside source static 192.168.1.1 10.47.1.50 route-map NAT1

ip nat inside source static 192.168.1.2 10.47.1.50 route-map NAT2

Jon

many thanks Jon - I'll give that a try

regards

Keith

many thanks Jon - works perfect

regards

Keith

Review Cisco Networking products for a $25 gift card