To set a period of time the Cisco IOS software waits while attempting to establish a TCP connection before it times out, use the ip tcp synwait-time command in global configuration mode. To restore the default time, use the no form of this command.
ip tcp synwait-time seconds
no ip tcp synwait-time seconds
So this is global timer that affects every TCP session that the control plane on your router creates. Now that could have some far reaching impacts on a live networks.
Now that we know what the command does, what are the possible negative impacts of this command ? The default TCP timeout is thirty seconds and shortening this to five seconds could impact any TCP connection. Consider routing protocols such as BGP, Multicast routing and so on. For example, allowing only five seconds for a three way handshake on a BGP connection just might be a problem in certain SP networks.
In slow networks such as satellite, low speed async or even frame relay, for five seconds to be too short under certain conditions. You should identify this and change the timer to perhaps ten or fifteen seconds. But for most networks today, if you can’t get a three way handshake in five seconds then its not going to work.
Consider an BGP neighbour connection that uses TCP, if the connection cannot be established within the configured interval, the connection will be terminated. Its just possible that a heavily loaded BGP peer, using authentication might need more than five seconds so you should keep this in mind.
Why you want this configured ?
By default, when you telnet to another device that doesn’t respond, it takes thirty seconds for the connection to timeout. All that time you are sitting waiting for something to happen, or send the break sequence (ctrl-shift-6, x) to get it to end.
By setting the interval to five seconds, you save yourself mindlessly looking at the IOS console thus improving your sanity.
Other Posts in This Series
- Cisco IOS CLI Regex: sh ip bgp in (2nd May 2012)
- IOS CLI Tip: More accurate pipe commands (1st May 2012)
- Cisco Nexus NXOS and Fixing broken “switchto” syntax with alias (18th December 2011)
- show ip eigrp topology all (22nd May 2011)
- Cisco IOS CLI Shortcuts (6th February 2011)
- The poor man's IOS Traffic Generator (19th September 2009)
- IOS: "terminal monitor" on, off - logging to your terminal (17th September 2009)
- IOS: Console, Terminal, Monitor, VTY - what is what ? (16th September 2009)
- IOS: Clearing an interface configuration (13th September 2009)
- IOS: Setting Terminal Window Length (10th September 2009)
- IOS CLI: show run linenum (9th September 2009)
- IOS: Setting the TCP timeout on IOS (14th August 2008)
- IOS: enable and .... disable ? (20th July 2008)
- IOS: Reverse SSH console access - Part 2 (25th June 2008)
- IOS:Open Source Lab DNS and IP addressing (2nd June 2008)
- IOS: Reverse SSH console access (29th May 2008)
- ip tcp timestamp (14th April 2008)
- Cisco ASA and IOS command tip - test aaa-server (18th February 2008)