Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Webcast-Catalyst9k
New Member

Static NAT based on destination subnet

I need a Cisco 1841 router to perform Static NAT only for a given remote destination.

For example, we have

Site A

192.168.1.0/24

Site B

192.168.2.0/24

Site C

10.9.0.0/16

Site A <==> Site B <==> Site C

When Site A talks to Site B I don't need a NAT translation. But when Site A talks to Site C, I need the router at Site B to NAT 192.168.1.0/24 to 10.40.1.0/24. When Site C talks to 10.40.1.0/24 I need it to NAT to 192.168.1.0/24.

I've been able to get it to work using route-maps and dynamic NAT pools, but it's not the way I need it. For example, 192.168.1.158 is being NATTED to 10.40.1.1 instead of 10.40.1.158 and the return traffic isn't making it back.

I sure hope this makes sense.

Denny

4 REPLIES

Re: Static NAT based on destination subnet

try this on router B:

access-list 100 permit 192.168.1.0 0.0.0.255 10.40.1.0 0.0.0.255

route-map nat1 permit 10

match ip address 100

ip nat inside source static 192.168.1.0 10.40.1.0 route-map nat1

and apply ip nat inside on the interface facing site A and ip nat outside on the interface faceing site C

and have a look at the following link as well:

http://www.cisco.com/en/US/docs/ios/12_2t/12_2t4/feature/guide/ftnatrt.html

good luck

if helpful Rate

New Member

Re: Static NAT based on destination subnet

This kind of worked. The IP Nat inside source static only did a one to one translation.

I need

ip nat inside source static network 192.168.1.0 10.40.1.0 /24

but it won't let me reference a route-map. I suppose I can manually create 254 one to one translations.

Thanks,

Denny

Bronze

Re: Static NAT based on destination subnet

Can I ask why the need for NAT? It seems like you should just be able to turn on ospf or eigrp and route the traffic accordingly? I don't want to oversimplify, however doing a one to one nat for 254 hosts, sounds pretty cumbersome.

New Member

Re: Static NAT based on destination subnet

Overlapping subnets.

Site C bought us out and assigned us a block of private addresses. We haven't renumbered Site A yet but need the connectivity right away. Somewhere on the Site C network they have an overlap and mandated we change our end.

Since Site B was ours to begin with, all their hosts are currently configured to access Site A resources on the old subnet.

The good news is the one to one configuration went pretty quick using Excel and notepad and pasting the configuration into the router.

695
Views
4
Helpful
4
Replies
CreatePlease to create content