Manoj Reddy's Reference Guide

clear ip nat translation

To clear dynamic Network Address Translation (NAT) translations from the translation table, use the clear ip nat translationEXEC command.

clear ip nat translation {*  |  [inside global-iplocal-ip] [outside local-ipglobal-ip]}

clear ip nat translation protocol inside global-ip global-port local-ip local-port [outside
local-ipglobal-ip]

Syntax Description

*

Clears all dynamic translations.

inside

Clears the inside translations containing the specified global-ip and local-ip addresses.

global-ip 

When used without the arguments protocol,global-port, and local-port, clears a simple translation that also contains the specified local-ipaddress. When used with the arguments protocol,global-port, and local-port, clears an extended translation.

local-ip 

(Optional) Clears an entry that contains this local IP address and the specified global-ip address.

outside

Clears the outside translations containing the specified global-ip and local-ip addresses.

protocol 

(Optional) Clears an entry that contains this protocol and the specified global-ip address, local-ip address, global-port, and local-port.

global-port 

(Optional) Clears an entry that contains this global-port and the specified protocol, global-ip address, local-ip address, and local-port.

local-port 

(Optional) Clears an entry that contains this local-port and the specified protocol, global-ip address, local-ip address, and global-port.

Command Modes

EXEC

Command History

ReleaseModification
11.2

This command was introduced.

Usage Guidelines

Use this command to clear entries from the translation table before they time out.

Examples

The following example shows the NAT entries before and after the UDP entry being cleared:

Router# show ip nat translation
Pro Inside global      Inside local       Outside local      Outside global
udp 171.69.233.209:1220 192.168.1.95:1220 171.69.2.132:53    171.69.2.132:53
tcp 171.69.233.209:11012 192.168.1.89:11012 171.69.1.220:23  171.69.1.220:23
tcp 171.69.233.209:1067 192.168.1.95:1067 171.69.1.161:23    171.69.1.161:23

Router# clear ip nat translation udp inside 171.69.233.209 1220 192.168.1.95 1220
171.69.2.132 53 171.69.2.132 53

Router# show ip nat translation
Pro Inside global      Inside local       Outside local      Outside global
tcp 171.69.233.209:11012 192.168.1.89:11012 171.69.1.220:23  171.69.1.220:23
tcp 171.69.233.209:1067 192.168.1.95:1067 171.69.1.161:23    171.69.1.161:23

Related Commands

CommandDescription
ip nat Designates that traffic originating from or destined for the interface is subject to NAT.
ip nat inside destination Enables NAT of the inside destination address.
ip nat inside source Enables NAT of the inside source address.
ip nat outside source Enables NAT of the outside source address.
ip nat pool Defines a pool of IP addresses for NAT.
ip nat translation Changes the amount of time after which NAT translations time out.
show ip nat statistics Displays NAT statistics.
show ip nat translations Displays active NAT translations.

Printed for apswan@ctr.ap.nic.in on Wed Mar 5 22:32:57 PST 2003

All material in this document copyright 2000 Cisco Systems, Inc. All rights reserved. No material may be reproduced or distributed without written permission of Cisco Systems, Inc.