cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
199
Views
1
Helpful
2
Replies

NATing For Different Destinations

Ali Hazim
Level 1
Level 1

Hello Everyone, 

I want to create different NAT rules for the same source based on the destination. 

Assume that I have the private range 10.0.0.0/8 and I want to create two NAT rules as follows:
if range 10.0.0.0/8 wants to reach ACL1 then use the public IP pool X
if range 10.0.0.0/8 wants to reach ACL2 then use the public IP pool Y

I've tried to create two "ip nat inside ..." statements, but it has no effect

How can I achieve this on an ASR1006 

2 Replies 2

balaji.bandi
Hall of Fame
Hall of Fame

Can post full config related to NAT config and let us know what IOS XR code running :

basic config should work as below :

https://www.certificationkits.com/cisco-certification/ccna-articles/cisco-ccna-network-address-translation-nat/static-nat-dynamic-nat-nat-overload-pat-a-configurations/

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Hello


@Ali Hazim wrote:
Assume that I have the private range 10.0.0.0/8 and I want to create two NAT rules as follows:
if range 10.0.0.0/8 wants to reach ACL1 then use the public IP pool X
if range 10.0.0.0/8 wants to reach ACL2 then use the public IP pool Y

Example1 - single wan interface:
ip access-list extended ACL1
permit ip 10.0.0.0 0.255.255.255 x.x.x.x
ip access-list extended ACL2
permit ip 10.0.0.0 0.255.255.255 y.y.y.y

ip nat pool NAT_ACL1 x.x.x.x  x.x.x.x prefix-length xx <type match-host>
ip nat pool NAT_ACL2 x.x.x.x  x.x.x.x prefix-length xx <type match-host>

ip nat inside source list ACL1 pool NAT_ACL1 <overload >
ip nat inside source list ACL2 pool NAT_ACL2 <overload >

Example2 - Dual wan interface:
route-map NAT1

match ip address ACL1
match interface (wan1)

route-map NAT2
match ip address ACL2
match interface (wan2)

ip nat inside source route-map NAT1 pool NAT_ACL1
ip nat inside source route-map NAT2 pool NAT_ACL2

Note:
overload =
Applicable if to reuse nat pool addressing
type match-host  = Applicable if 1-2-1 matching of inside/outside addressing is required


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul
Review Cisco Networking for a $25 gift card