/ iox

How Do I Force Clear IP NAT Translations on Cisco IOS?

If you do this in IOS:

IR809-DM#conf t
IR809-DM(config)#no ip nat inside source static udp 192.168.2.10 9999 interface GigabitEthernet0 9999

And get this:

 %Static entry in use, cannot remove

Do this:

IR809-DM#clear ip nat translation inside 10.132.56.250 192.168.2.10 forced

Another method. Print a list of translations:

# sh ip nat tran

Create this function:

clearnat()
{
  set $(echo $* | tr : ' ')
  echo clear ip nat trans $1 inside $2 $3 $4 $5 outside $6 $7 $8 $9
}

Copy/paste the translation you want to clear as the parameters to the command:

$clearnat udp 10.132.56.150:20099 192.168.2.12:20099 10.132.41.25:58114 10.132.41.25:58114
clear ip nat trans udp inside 10.132.56.150 20099 192.168.2.12 20099 outside 10.132.41.25 58114 10.132.41.25 58114

Copy/paste the command into the IOS command shell.

How Do I Force Clear IP NAT Translations on Cisco IOS?
Share this