Top

IOS: Setting the TCP Timeout on IOS

14 August, 2008 by Greg Ferro      Print Posting

One of my favourite default commands on IOS is “ip tcp synwait 5″. Lets look into this command and why you might like to use it as well.

IOS Manual

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.

Negative Impacts

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.

Please rate this post :    Why ?
Rating: 0.0/10 (0 votes cast)
Share:
  • Reddit
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • StumbleUpon
  • TwitThis
  • LinkedIn

Comments

One Response to “IOS: Setting the TCP Timeout on IOS”

  1. pello on August 16th, 2008 4:20 pm

    Hello Greg,

    In addition to the negative impacts you said. I’ll add the specific bug case where the feature of CRL checking until 12.4(20)T is affected by the synwait timer.

    Indeed, if the server hosting the CRL is temporarily down then you have to wait the synwait time before the IPSEC certificate check continue his work.

    See you
    Francois

Feel free to leave a comment...
and oh, if you want a pic to show with your comment, go get a gravatar!





Bottom