We help IT Professionals succeed at work.

change from static nat to Dynamic NAT

Lowell Switzer
on
I need to change from static nat to Dynamic, here is our running config, can someone please give me set by set to do so.

Also I need to add a new route. Basic Example Please.

interface Serial0/0
ip address 192.168.95.1 255.255.255.0
ip nat outside
!
ip classless
ip route 167.10.0.0 255.255.0.0 192.168.95.254
ip route 172.21.49.172 255.255.255.255 192.168.95.254
ip route 192.168.1.151 255.255.255.255 63.197.134.93
ip route 192.168.94.0 255.255.255.0 192.168.95.254
!
no ip http server
ip nat inside source static 192.168.1.152 192.168.95.2
ip nat inside source static 192.168.1.211 192.168.95.3
ip nat inside source static 192.168.1.220 192.168.95.4
ip nat inside source static 192.168.1.201 192.168.95.5
ip nat inside source static 192.168.1.247 192.168.95.6
ip nat inside source static 192.168.1.202 192.168.95.7
ip nat inside source static 192.168.1.203 192.168.95.8
ip nat inside source static 192.168.1.205 192.168.95.9
ip nat inside source static 192.168.1.207 192.168.95.10
ip nat inside source static 192.168.1.250 192.168.95.11
ip nat inside source static 192.168.1.209 192.168.95.12
ip nat inside source static 192.168.1.204 192.168.95.13
ip nat inside source static 192.168.1.218 192.168.95.14
ip nat inside source static 192.168.1.221 192.168.95.15
!
snmp-server

Comment
Watch Question

Lowell SwitzerCTO / Systems Engineer

Author

Commented:
Correction: can someone please give me step by step to do so.
Top Expert 2007

Commented:
   Create a pool of addresses

        Router(config)#ip nat pool MYPOOLEXAMPLE
        192.168.95.2 192.168.95.15 netmask 255.255.255.248

    Create an access-list for the inside networks that has to be mapped

        Router(config)#access-list 100 permit ip
        host 192.168.1.152 any
         host 192.168.1.211 any
         .
         .


    Associate the access-list 100 that is selecting the internal network to be natted to the pool MYPOOLEXAMPLE and then overload the addresses.

        Router(config)#ip nat inside source list 100 pool
                    MYPOOLEXAMPLE overload

Lowell SwitzerCTO / Systems Engineer

Author

Commented:
How do I remove the one to one nat? I work with alot of routers except the older cisco's like this one, so could you give me a step by step example for this.

Thanks,
Top Expert 2007

Commented:
in configure terminal mode (Which is like youroutername(config)#) type the existing command with a preceeding no

such as
no ip nat inside source static 192.168.1.152 192.168.95.2
Lowell SwitzerCTO / Systems Engineer

Author

Commented:
This is what I get:
Static entry in use, do you want to delete child entries [no]:
Please advise
Top Expert 2007
Commented:
Say yes and continue. Keep in mind that existing connections will drop and they wont work till you reconfigure dyn nat.
If you still can not remove static entries after deleting child entries, go to interface 192.168.1.x, then issue "no ip nat inside" . After you configure your dyn nat, go back to interface and issue ip nat inside
Lowell SwitzerCTO / Systems Engineer

Author

Commented:
Saying Yes worked perfect! I was able to remove all and then do just as you advised for Dynamic nat.
I have tested and everything is good. Is there any thing else besides ctrl z I should do to make sure this configuration is permently saved.

Can you give me an example for adding a static route.

Thanks for all you help with this, You have more than earned the full points
Top Expert 2007

Commented:
You are welcome. You have to issue wr mem in order to make your config permanent
An example static route

ip route 172.16.5.0 255.255.255.0 192.168.1.5

What above means is route traffic destined to 172.16.5.0/24 to gateway 192.168.1.5
Lowell SwitzerCTO / Systems Engineer

Author

Commented:
dumb question: do I issue the wr mem after I am in config?
Top Expert 2007

Commented:
if you are in config, you have to type do wr mem
if you are in user mode (Just # not (conf)#  ) then wr mem will work alone
Lowell SwitzerCTO / Systems Engineer

Author

Commented:
thanks, done.
Lowell SwitzerCTO / Systems Engineer

Author

Commented:
Thanks for Experts-Exchange, and People like MrHusy,

Thanks Again.
Top Expert 2007

Commented:
You are most welcome :)