# Cisco static NAT based on destination

Introduction

The 192.168.1.1 source IP address is translated to 192.168.2.1 if the destination is 192.168.2.2, but if the destination is 192.168.3.3, the source IP address is translated to 192.168.3.1.

Configuration
Router(config)# int fa0/1
Router(config-if)# ip nat inside
Router(config)# int fa0/0
Router(config-if)# ip nat outside
Router(config)# !
Router(config)# ip nat inside source static 192.168.1.1 192.168.2.1 route-map myRM1
Router(config)# ip nat inside source static 192.168.1.1 192.168.3.1 route-map myRM2
Router(config)# !
Router(config)# access-list 102 permit ip host 192.168.1.1 host 192.168.2.2
Router(config)# access-list 103 permit ip host 192.168.1.1 host 192.168.3.3
Router(config)# !
Router(config)# route-map myRM1 permit 10
Router(config-route-map)# match ip address 102
Router(config)# route-map myRM2 permit 10
Router(config-route-map)# match ip address 103

No comments: