cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
12592
Views
0
Helpful
4
Replies

Clear TCP Connection on routers

I have a specific requirement whereby I want to clear a group of TCP connections using one command. At this moment I can clear a TCP connection mentioning the local address and port and remote address and port. But I would like to clear all the TCP connections from a particular IP or to a particular IP using one command.

Is this possible.

4 Replies 4

jsivulka
Level 5
Level 5

I guess 'clear tcp' command is the only way to clear a TCP connection and this command does not permit you to specify an IP without specifying a port. Guess, what you are trying is not possible.

You can clear the entire table with the command clear tcp tcb *

tblancha
Cisco Employee
Cisco Employee

No, you can only do it one at a time with the

clear tcp tcb #. These session numbers can be gotten from show tcp brief. If you do a clear tcp local , that will clear all tcp sessions to that IP address.

I cannot give clear tcp local with the IP Address and expect it to clear all the TCP connection pertaining to that IP Address.

I have to give

clear tcp local LOCAL-IP LOCAL-PORT REMOTE-IP REMOTE-PORT

Otherwise the command is not accepted. This is where my problem is. I would love to clear all TCP connections specifying only the LOCAL-IP parameter.