Thursday, March 18, 2010

Putty — Recommended Default Settings for a Network Engineer

September 21, 2009 by Greg Ferro · 5 Comments 

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

Putty is is a great piece of soft­ware. Because it works and it’s free I find it installed on most cor­por­ate desktops as the default soft­ware for ter­minal cli­ent on Windows.1. Not many people seems to real­ise that Putty is highly cus­tom­is­able and has a num­ber of fea­tures that will improve your work­ing environment.

Set the Rows & Scrollback Lines

By default Putty only keeps the last 200 lines of text dis­played on your screen in the scroll­back buf­fer. For a typ­ical net­work engin­eer, this isn’t enough to show the con­fig­ur­a­tion, must less any decent amount of text. Typically I would set the default to be 20000 lines. And since most screens allows more than 25 rows, I would increase the Window Rows to forty. If you change the Windows Rows to forty, then you should also change your device ter­minal set­tings to use forty lines as well. See IOS — Setting the Terminal Windows Length for a good-​​ish descrip­tion of this.

Note that every Putty ses­sion will alloc­ate a block of memory suf­fi­cient to hold those lines in a buf­fer. Making it too large may impact your com­puter by redu­cing the amount of memory available.

Setting the SCROLLBACK to 20000 lines

Setting the SCROLLBACK to 20000 lines

Using Font Aliasing

The choice to use Antialiased or aliased fonts is a bit com­plic­ated, but its a ser­i­ous decision affect­ing how easy on the eyes ad how quickly you can read the screen. Less read­ing errors res­ults in bet­ter work performance.

The best choice here is ClearType.

Cleartype Font Aliasing

Cleartype Font Aliasing

Window Names/​Title

It’s com­mon for me to have more than ten putty ses­sions open at a single time. With that many win­dows you need a way to tell them apart, thus, some names on the box would be use­ful in identi­fy­ing. them.

Window Title

Window Title

And the res­ult will look some­thing like this:

Title of the Window for Putty

Title of the Window for Putty

Keepalives and enabling Nagle’s Algorithm


TCP Keepalives and Nagles algorithm

Nagle’s Algorithm and Keepalives

Nagles Algorithm

Nagle’s algorithm is par­tic­u­larly use­ful when attempt­ing to trans­fer a lot of inform­a­tion in the ter­minal. For example, when log­ging at high speed or past­ing large con­fig­ur­a­tions to your con­sole (there are many other cri­teria that affect this, but this is one of them).

Wikipedia — http://en.wikipedia.org/wiki/Nagle’s_algorithm

Nagle’s algorithm, named after John Nagle, is a means of improv­ing the effi­ciency of TCP/​IP net­works by redu­cing the num­ber of pack­ets that need to be sent over the net­work.
Nagle’s doc­u­ment, Congestion Control in IP/​TCP Internetworks (RFC896) describes what he called the ‘small packet prob­lem’, where an applic­a­tion repeatedly emits data in small chunks, fre­quently only 1 byte in size. Since TCP pack­ets have a 40 byte header (20 bytes for TCP, 20 bytes for IPv4), this res­ults in a 41 byte packet for 1 byte of use­ful inform­a­tion, a huge over­head. This situ­ation often occurs in Telnet ses­sions, where most keypresses gen­er­ate a single byte of data which is trans­mit­ted imme­di­ately. Worse, over slow links, many such pack­ets can be in transit at the same time, poten­tially lead­ing to con­ges­tion collapse.

Keepalives

Keepalives are most use­ful when run­ning ter­minal ses­sions through fire­walls. If a telnet/​ssh ter­minal doesn’t keep traffic flow­ing then it will mark the ses­sion for timeout. Once the ses­sion times out you will need to recon­nect and go through the login pro­ced­ure again.

SSH Options

Lets looks at some of the SSH Connection Options and which items you should think about.

SSH Connections Options

SSH Connections Options

SSH Version

Putty has a default that selects SSH Version 2 but will fall­back to SSH Version 1 if needed. This is the best choice for defaults and recom­mend that you do NOT change this.

Note that early ver­sions of IOS did not sup­port Version 2 (SSHv2 was intro­duced in June 2007 in IOS Version 12.1.19E, SSHv1 was Sep 2005 around IOS Version 12.1.3T ), and only Version 1 and some ver­sions of Putty did not fall back grace­fully. For these cases, you would need to con­fig­ure the ver­sion for that ses­sion only, not as a default for your global default.

Encryption Algorithms

It’s gen­er­ally accep­ted that DES is insec­ure (for prac­tical pur­poses). However, if you have a Cisco device that doesn’t have an Strong Encryption license (it is free, all you have to do is sup­ply the serial num­ber and fill out the form on Cisco’s web site to meet the US gov­ern­ment require­ments that says you aren’t a ter­ror­ist — www​.cisco​.com/​go/license) then you might want to set this for a single ses­sion. I wouldn’t set this as a global default.

SSH Compression

SSH Secure Shell uses GNU ZLIB (LZ77) for com­pres­sion. The “zlib” com­pres­sion is described in RFC 1950 and in RFC 1951.

The cli­ent can request a com­pres­sion level with a num­ber after +C (from +C1 to +C9). In this case, the com­pres­sion level is between the levels reques­ted by the cli­ent and offered by the server. For example, if the server offers level 6 (the default) and the cli­ent asks for level 1, level 2 is used.

Compression is worth using if your con­nec­tion is slow (for example a modem con­nec­tion). The effi­ciency of the com­pres­sion depends on the type of the file, and var­ies widely. It is close to 0% for already com­pressed files like zip and often 50% or even more for text files.((http://​www​.ssh​.com/​s​u​p​p​o​r​t​/​d​o​c​u​m​e​n​t​a​t​i​o​n​/​o​n​l​i​n​e​/​s​s​h​/​a​d​m​i​n​g​u​i​d​e​/​3​2​/​C​o​m​p​r​e​ssion.html))

As far as I can tell, Cisco IOS does not sup­port com­pres­sion. I believe that it wouldn’t make any dif­fer­ence since trans­fer­ring large volumes of data is not the nor­mal con­di­tion when con­nect­ing to ter­minal sessions.

Can be safely left alone.

Serial Settings

Putty did not always have serial cap­ab­il­ity. If it doesn’t show then you need to down­load a later ver­sion and get it installed. Putty Home Page.

Putty Serial Console settings

Putty Serial Console settings

Since 9600,N,8,1 is the default serial con­fig­ur­a­tion for Cisco equip­ment, I would not change this. I have seen some com­pan­ies who have a stand­ard con­fig­ur­a­tion for IOS devices that set the serial port bit rate to 38400, how­ever, I would still not change the global default.

Saving the Global Default

This post cov­ers sav­ing these default set­tings for every new con­nec­tion that you make with putty.

Wrapup

That’s enough for this post I think, I have some more things that I think are worth doc­u­ment­ing, but I will do them later on. You can see all the posts by check­ing the Console Mastery series but­ton at the top of the page, which lists all the post in the Console Mastery series.

If you have any tips or tricks for putty, either get in con­tact via the Contact Form or drop me an email myether­e­al­mind -£$- gmail dot com.

Footnotes

  1. After all, Microsoft doesn’t sup­ply any SSH in Windows or even tel­net cap­ab­il­ity in Vista [back]

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? (3 votes, average: 9.00 out of 10)
Loading ... Loading ...

Comments

5 Responses to “Putty — Recommended Default Settings for a Network Engineer”
  1. MCL.Nicolas says:

    Awesome !
    Already have a few of your tips in my saved con­fig ;)

    THanks greg !

  2. Vista comes w/​ the Microsoft tel­net cli­ent, it just isn’t installed by default.

    Besides, every­one knows that SecureCRT > * anyway. =)

  3. David Farrell says:

    I’ve found chan­ging the default paste beha­viour helps, for those moments you acci­dent­ally catch the right mouse but­ton with a paste buf­fer full of config!!

  4. Andrew Short says:

    Serial set­tings: Turn off flow con­trol. Cisco serial ter­min­als don’t use it and that’s about 95% of the my use of the serial port.

    I also change the color of the font to a bright yel­low or green and increase the size of the font to make it more read­able. Not just to me, but a lot of times I am ask­ing someone to watch over my shoulder.

    Now that I’ve said “yel­low or green” I’m think­ing of going amber for a while.

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!