Static NAT requirment

Answered Question
Feb 29th, 2012
User Badges:

Dear boss


I have a IP 192.168.0.1 and  i NAT it to 172.25.40.1

like  ip nat inside source static 192.168.0.1 172.25.40.1 as outsider can get 172.25.40.1.


Now i want to NAT 192.168.0.1 to 172.30.40.1  as both 172.30.40.1 and 172.25.40.1 get 192.168.0.1.


How can i do it  ?


Thanking You


shahid

Correct Answer by Vivek Ganapathi about 5 years 5 months ago

Yes you can. But depends on what version of IOS you are running. NAT with route-maps was introduced in 12.4(T) i believe.


access-list 101 permit ip host 192.168.0.1 host x.x.x.x

access-list 102 permit ip host 192.168.0.1 host y.y.y.y


route-map NAT_25 permit 10

match ip address 101


route-map NAT_30 permit 10

match ip address 102


ip nat inside source static 192.168.0.1 172.25.40.1 route-map NAT_25

ip nat inside source static 192.168.0.1 172.30.40.1 route-map NAT_30


Test this out & let me know. Replace the x.x.x.x with the destination X & replace y.y.y.y with destination y


Hope you got it.


Vivek.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Correct Answer
Vivek Ganapathi Wed, 02/29/2012 - 23:40
User Badges:
  • Silver, 250 points or more

Yes you can. But depends on what version of IOS you are running. NAT with route-maps was introduced in 12.4(T) i believe.


access-list 101 permit ip host 192.168.0.1 host x.x.x.x

access-list 102 permit ip host 192.168.0.1 host y.y.y.y


route-map NAT_25 permit 10

match ip address 101


route-map NAT_30 permit 10

match ip address 102


ip nat inside source static 192.168.0.1 172.25.40.1 route-map NAT_25

ip nat inside source static 192.168.0.1 172.30.40.1 route-map NAT_30


Test this out & let me know. Replace the x.x.x.x with the destination X & replace y.y.y.y with destination y


Hope you got it.


Vivek.

shahid_duet Thu, 03/01/2012 - 01:51
User Badges:

Thanks a lot Mr. Vivek


It is taking the command. I will wait for ur response when i face difficulties in real implementation.


Thanks.

Actions

This Discussion