cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1379
Views
0
Helpful
1
Replies

Remove static entry with tcl + ios_config when in use

iherreros1
Level 1
Level 1

Hi all.

We are using a TCL script to to change NAT entries. It works fine but when the entry is in use, the delete entry command ios_config "no ip nat inside source static tcp <local ip> <local port> <global ip> <global port> extendable" "end" returns :

Static entry in use, do you want to delete child entries? [no]:
%: Error: static entry in use, cannot remove

Is it possible to 'interact' inside the TCL script so when the ios_config command returns 'Static entry in use, do you want to delete child entries? [no]:' the script could send 'Y' to remove the entries?

Thanks in advance.

1 Accepted Solution

Accepted Solutions

iherreros1
Level 1
Level 1

We've solved using forced in spite of extendable, so :
 

ios_config "no ip nat inside source static tcp <local ip> <local port> <global ip> <global port> forced"

View solution in original post

1 Reply 1

iherreros1
Level 1
Level 1

We've solved using forced in spite of extendable, so :
 

ios_config "no ip nat inside source static tcp <local ip> <local port> <global ip> <global port> forced"

Review Cisco Networking for a $25 gift card