Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Removing static NAT entries - Cisco 2514

Status
Not open for further replies.

andrew4728

Technical User
Jul 6, 2004
61
0
0
US
Hey all, I have been playing with my cisco 2514 (Version 12.2(13)T) (for mainly educational purposes) and have been playing with static NAT (port forwarding for game servers and such).

When I setup a temporary game server for me and my friends, I setup port forwarding to my game server and all works fine.

let's say my Servs ip address is a.b.c.d and Ethernet0 is my cable modem connection.

I use the following command to forward udp port 28960(for example) to my game server, and it works perfectly :
ip nat inside source static udp a.b.c.d 28960 interface Ethernet0 28960

This game server is broadcasted to this specific games online gaming menu, which generates connections from other players to my server.

Once I am done and want to shutdown the server and kill the port translation, it won't allow me to.

States static route is currently in use. Even when I use the FORCED command after it (which seems pretty worthless unless I am using it incorrectly)

Now before I go further, I want to side note that I have read the forums, and found a couple situations similar to mine where the only conclusion is that you can clear your entire nat translation table and then delete the route. This works. Also shutting down the interface works as well.

My question is :
Why won't it let me manually delete the NAT translations with udp port 28960 ONLY then clear it out?

When I type the following command :
clear ip nat translation udp inside <cable modem IP Address> 28960 a.b.c.d 28960
and hit enter, it states "%Translation not dynamic"

So I'm stuck at a point where I can't delete the static route because it's in use, but I can't delete the translations that are in use, because they are static!

There has got to be a way to do this without shutting down the interface, or killing ALL nat translations!

If this was in a large business environment, that could cause some problems.

Also, I have tried

Anybody have any ideas? Am I doing the commands correctly?

Thanks!

Andrew
 
Try this:

Router(config)#no ip nat inside source static udp a.b.c.d 28960 interface Ethernet0 28960

That removes the static xlate.
 
I'm sorry, I forgot to mention that is the command that I attempt to use to remove the static entry.
After I enter that command, it states the static route is in use and will not delete it.
 
try...

#>clear ip nat translations *
then go into config mode and delete that entry

it won't let you remove it while there is a translation in the nat database.. worst case yo might have to shut your outgoing interface.. clear the nat table then remove it.
 
I understand you can do both of those methods. I am looking for a way to clear a static entry without disabling the internet, or disconnecting all current connections. I can do it with a linksys, is there not a way to do it with a cisco!?

Thanks all!
 
I'd put those two in a text file, so they can be pasted in. Sometimes after clearing the translations, you get another one before you can type fast enough to remove the static.

something like this

==== copy paste together ========

clear ip nat translations *
no ip nat inside source static udp a.b.c.d 28960 interface Ethernet0 28960
!

I always throw in a "!" at the end to make sure I get a Return at the end of the last command. Timing in clearing a translation is very short, and you don't want it sitting there waiting for you to hit the Enter key.

You can clear all the translations without too much worry. 99% of the time, nobody will notice. A new translation for the user will appear asap. You won't have to shutdown the interface, because pasting the commands in together is very fast. The translations will clear and renew so quickly it won't be noticed.

BierHunter
CNE, MCSE, CCNP
 
I understand you can clear the translation table and delete the static route, and you can turn off the interface and delete the static route.

It would appear there is no way to delete a static route any other way in a cisco device? I would think that if you typed the command to delete the static route, it would stop any NEW translations from occuring, but let the current translations bleed off..

And yes, when you clear your nat translation table (when you only have 1 external IP overloaded to multiple PCs) it stops all connections and you have to reconnect your programs.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top