NATing For Different Destinations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2024 02:08 AM
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
- Labels:
-
ASR 1000 Series
-
WAN
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2024 02:54 AM
Can post full config related to NAT config and let us know what IOS XR code running :
basic config should work as below :
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2024 04:20 AM - edited 03-12-2024 04:21 AM
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
