Telnet is one of the greatest network troubleshooting tools available to us. Unfortunately the telnet client is not installed inherently anymore in Server 2008, Vista, or windows 7. You can however still install and enable this feature. (See “Telnet Client Not Included”)

What is the Telnet Client?

The telnet client allows the computer to make a remote connection to another device on the network. Its primary function is to allow remote execution to a telnet server setup for that purpose. More commonly it is a fantastic troubleshooting application allowing you to test network connections between hosts, far more reliably than does ping or traceroute. This is because while ping can only test if there is a routable connection to ICMP (not commonly used to provide services to the network), telnet can actually open up a TCP connection to the remote server on any port you may specify. So if you had a problem copying files to a another computer and wanted to make sure that the computer was at least listening for SMB traffic (the networked protocol for file sharing in windows and most others) you would simply invoke the telnet client to connect to the TCP 445 port on the remote server. A connection not only means that there is a routable path, but that the server on the other end is listening. Additionally, ICMP, used by “ping” and “traceroute”, is unreliable, both because it is a connectionless protocol, and because it is usually one of the first things that network administrators block. This then implies that if a ping to a server gets a response you know that it is running, but if it does not, you know nothing more than that. TCP is connection oriented, so it ensures that the server is up and running, listening to the network port and allowing new connections. If you get a response from it, you know pretty well that the service opened a listening port, and that the server will accept data sent to that port. If you do not get a response you know that the server is not providing service over that port, either because the whole server is down, or just that service.

Sample Command

The telnet client requires a bit of familiarity. Some services/applications listening on a port have telnets servers inherent to them. For example if you connect to most SMTP mail applications via telnet you will get a prompt of some sort. This is because the application is listening for the telnet frame. Most applications however do not give you, you instead get a blank screen. For instance, I use TCP ports 135 and 445 as standard ports to check to see if a server is alive, mostly because all windows operating systems since 2000, and most others listen on these ports by default. So let’s take a connection to “jareds-pc” over TCP port 445 as an example (Really I would first resolve the name to IP, because I want to make sure any issues are network related, not DNS related). At a command prompt (after installing the telnet client if needed. See “Telnet Client Not Included”) I would enter:

telnet <IP or name> <TCP port>
or
telnet 11.11.11.100 445

If it worked and there was no telnet server listening on TCP 445 (normal) I would get the following response:

telnet_client_install

Just a blank screen. This is what I mean when I say it takes a little bit of familiarity. This result is true of most telnet connections that do not have a service listing for the telnet connection (otherwise you will get some kind of prompt), but allow the connection to TCP. This also indicates why this is not a security issue.

Telnet Client Not Included

As mentioned earlier, the telnet client is no longer include in Windows starting with Server 2008, Vista, and Windows 7. You can however install the client.

In Server 2008:

– Start -> “Server Manager”
– Select “Features” in the left pane, then click on “Add Features” in the upper right
– Select the box next to “Telnet Client” then click “Next” then “Install”

In Vista/Windows 7

– Go to “Start” then “Control Panel”
– Select “Programs” then “Turn Windows features on or off”
– A window will popup called “Windows Features”. Check the box next to “Telnet Client” then click “OK”
– The telnet client will then install