ios router multiple subnets assigned to one nat pool

Unanswered Question

I have a 2821 Router with two gigabitethernet interfaces. I am currently using PAT for inside to outside translations. The link is to an application vendor and we have been experience some diffuculities. They want me to stop using PAT and switch to dynamic nat. I have two class c subnets that we need to assign to a pool so that each internal client will dynamically map to one of the class c public ip's.

How can i have multiple subnets in one pool statement or is this even possible? I know with nat on the PIX it is, but with nat on a router I am unsure.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
Georg Pauwen Mon, 11/21/2005 - 23:59
User Badges:
  • Purple, 4500 points or more
  • Cisco Designated VIP,

    2017 WAN

Hello,


indeed you cannot use multiple subnets in a single pool. You could try the following approach: define two pools and configure route maps. Let´s say your two internal subnets are 192.168.1.0/24 and 192.168.2.0/24, and you want to translate those to 212.136.1.0/24 and 212.136.2.0/24, respectively; the configuration would look like this:


ip nat pool POOL1 212.136.1.1 212.136.1.254 prefix-length 24

ip nat pool POOL2 212.136.2.1 212.136.2.254 prefix-length 24

!

ip nat inside source route-map MAP1 pool POOL1

ip nat inside source route-map MAP2 pool POOL2

!

access-list 101 permit ip 192.168.1.0 0.0.0.255 any

access-list 102 permit ip 192.168.2.0 0.0.0.255 any

!

route-map MAP1 permit 10

match ip address 101

!

route-map MAP2 permit 10

match ip address 102


Obviously the IP addresses used in this example are probably not yours, so change them accordingly...

Can you try and see if this works for you ?


Regards,


GP

Actions

This Discussion