Fat-finger moments at the CLI

31 01 2007

I always seem to be mis-typing things in IOS. Either one hand is faster than the other, or I just hit a neighbouring key and bog up the command. Doesn’t it drive you mad when you type “shwo itnerface” and it tries to telnet to a destination called “shwo”? It is quite handy to be able to telnet to somewhere from the CLI without typing the word “telnet” in front of the destination, but irritating that any old typo becomes an attempt to telnet somewhere…

There are a few things you can do to stop this happening. The first is pretty obvious – turn off DNS lookups. This is fairly common knowledge, but it basically stops the router trying to resolve the name to an IP address (and taking 20 or 30 seconds to fail to do so):
R1(config)# no ip domain-lookup

The reason this happens is because IOS defaults to telnet as the preferred transport at both the CLI and on VTY telnet sessions. If the user doesn’t specify a transport (such as rlogin, telnet or v120 for example), telnet is what is assumed by default. So, another way around the problem is to tell IOS not to assume anything:

R1(config)# line con 0
R1(config-line)# transport preferred none
R1(config-line)# line vty 0 5
R1(config-line)# transport preferred none

So how about when you do actually want to telnet to somewhere, but you get the IP address wrong? The CLI tries for 30 seconds to get to that destination by default, and there’s nothing you can do about it. So what you need in this case is to reduce the amount of time the router waits for a SYN-ACK flag in response to the initial SYN. Want to make the router only wait 5 seconds for a SYN-ACK? Try this:

R1(config)#ip tcp synwait-time 5

Any other suggestions on this topic would be gratefully received…




Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: