clear ip nat translation
To clear dynamic Network Address Translation (NAT) translations from the translation table, use the clear ip nat translation command in EXEC mode.
Syntax Description
| * |
Clears all dynamic translations. |
| inside |
Clears all inside translations containing the specified global-ip and local-ip addresses. |
| global-ip |
Global IP address. |
| local-ip |
Local IP address. |
Command Modes
EXEC
Command History
| Release | Modification |
|---|---|
| Cisco IOS XE Gibraltar 16.10.1 |
This command was introduced. |
|
Cisco IOS XE 26.1.1 |
The inside keyword 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 User Datagram Protocol (UDP) entry is cleared:
Device# clear ip nat translation inside 10.8.8.54 10.5.5.5
Device# show ip nat translations
Pro Inside global Inside local Outside local Outside global
tcp 10.8.8.50:1024 10.5.5.1:1024 10.2.2.3:1024 10.2.2.3:1024
udp 10.8.8.50:1024 10.5.5.1:1024 10.2.2.3:1024 10.2.2.3:1024
--- 10.8.8.50 10.5.5.1 --- ---
tcp 10.8.8.51:1024 10.5.5.2:1024 10.2.2.3:1024 10.2.2.3:1024
udp 10.8.8.51:1024 10.5.5.2:1024 10.2.2.3:1024 10.2.2.3:1024
--- 10.8.8.51 10.5.5.2 --- ---
tcp 10.8.8.52:1024 10.5.5.3:1024 10.2.2.3:1024 10.2.2.3:1024
udp 10.8.8.52:1024 10.5.5.3:1024 10.2.2.3:1024 10.2.2.3:1024
--- 10.8.8.52 10.5.5.3 --- ---
tcp 10.8.8.53:1024 10.5.5.4:1024 10.2.2.3:1024 10.2.2.3:1024
udp 10.8.8.53:1024 10.5.5.4:1024 10.2.2.3:1024 10.2.2.3:1024
--- 10.8.8.53 10.5.5.4 --- ---
Device# clear ip nat translation inside 10.8.8.53 10.5.5.4
Device# show ip nat translations
Pro Inside global Inside local Outside local Outside global
tcp 10.8.8.50:1024 10.5.5.1:1024 10.2.2.3:1024 10.2.2.3:1024
udp 10.8.8.50:1024 10.5.5.1:1024 10.2.2.3:1024 10.2.2.3:1024
--- 10.8.8.50 10.5.5.1 --- ---
tcp 10.8.8.51:1024 10.5.5.2:1024 10.2.2.3:1024 10.2.2.3:1024
udp 10.8.8.51:1024 10.5.5.2:1024 10.2.2.3:1024 10.2.2.3:1024
--- 10.8.8.51 10.5.5.2 --- ---
tcp 10.8.8.52:1024 10.5.5.3:1024 10.2.2.3:1024 10.2.2.3:1024
udp 10.8.8.52:1024 10.5.5.3:1024 10.2.2.3:1024 10.2.2.3:1024
--- 10.8.8.52 10.5.5.3 --- ---
Device# clear ip nat translation inside 10.8.8.52 10.5.5.3
Device# show ip nat translations
Pro Inside global Inside local Outside local Outside global
tcp 10.8.8.50:1024 10.5.5.1:1024 10.2.2.3:1024 10.2.2.3:1024
udp 10.8.8.50:1024 10.5.5.1:1024 10.2.2.3:1024 10.2.2.3:1024
--- 10.8.8.50 10.5.5.1 --- ---
tcp 10.8.8.51:1024 10.5.5.2:1024 10.2.2.3:1024 10.2.2.3:1024
udp 10.8.8.51:1024 10.5.5.2:1024 10.2.2.3:1024 10.2.2.3:1024
--- 10.8.8.51 10.5.5.2 --- ---
Device# clear ip nat translation inside 10.8.8.51 10.5.5.2
Device# clear ip nat translation inside 10.8.8.50 10.5.5.1
Device# show ip nat translations


Feedback