Friday, March 19, 2010

IOS: Setting the TCP Timeout on IOS

August 14, 2008 by Greg Ferro · 1 Comment 

This Post is Part of a Series — click for list on Console Mastery»

IOS Manual

To set a period of time the Cisco IOS soft­ware waits while attempt­ing to estab­lish a TCP con­nec­tion before it times out, use the ip tcp synwait-​​time com­mand in global con­fig­ur­a­tion 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 ses­sion that the con­trol plane on your router cre­ates. Now that could have some far reach­ing impacts on a live networks.

Negative Impacts

Now that we know what the com­mand does, what are the pos­sible neg­at­ive impacts of this com­mand ? The default TCP timeout is thirty seconds and short­en­ing this to five seconds could impact any TCP con­nec­tion. Consider rout­ing pro­to­cols such as BGP, Multicast rout­ing and so on. For example, allow­ing only five seconds for a three way hand­shake on a BGP con­nec­tion just might be a prob­lem in cer­tain SP networks.

In slow net­works such as satel­lite, low speed async or even frame relay, for five seconds to be too short under cer­tain con­di­tions. You should identify this and change the timer to per­haps ten or fif­teen seconds. But for most net­works today, if you can’t get a three way hand­shake in five seconds then its not going to work.

Consider an BGP neigh­bour con­nec­tion that uses TCP, if the con­nec­tion can­not be estab­lished within the con­figured inter­val, the con­nec­tion will be ter­min­ated. Its just pos­sible that a heav­ily loaded BGP peer, using authen­tic­a­tion might need more than five seconds so you should keep this in mind.

Why you want this configured ?

By default, when you tel­net to another device that doesn’t respond, it takes thirty seconds for the con­nec­tion to timeout. All that time you are sit­ting wait­ing for some­thing to hap­pen, or send the break sequence (ctrl-​​shift-​​6, x) to get it to end.

By set­ting the inter­val to five seconds, you save your­self mind­lessly look­ing at the IOS con­sole thus improv­ing your sanity.

Please rate this post:

  Why Rate Posts?
1 Star - It\\\'s Crud2 Stars - It\\\'s Tosh3 Stars - Something\\\'s missing4 Stars - Needs works5 Stars - Good Enough6 Stars - Good7 Stars - Excellent8 Stars - Brilliant9 Stars - Astonishing10 Stars - Awesomely Godlike? (No Ratings Yet)
Loading ... Loading ...

Comments

One Response to “IOS: Setting the TCP Timeout on IOS”
  1. pello says:

    Hello Greg,

    In addi­tion to the neg­at­ive impacts you said. I’ll add the spe­cific bug case where the fea­ture of CRL check­ing until 12.4(20)T is affected by the syn­wait timer.

    Indeed, if the server host­ing the CRL is tem­por­ar­ily down then you have to wait the syn­wait time before the IPSEC cer­ti­fic­ate check con­tinue his work.

    See you
    Francois

Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!