When troubleshooting connectivity issues, one item a user should check is whether the necessary application port is open on the server. An easy way to do this without having to install any additional software is using the familiar Telnet command.
You can check if a port is open on a device by issuing the telnet command. If it is open, you will see a blank screen after issuing the command:
telnet [domainname or ip] [port]
- [domainname or ip] is the domain name or IP address of the server to which you are trying to connect
- [port] is the port number where the server is listening
If the port is open, you will see a blank screen. This means that the connection is successful. If the port is closed, you will receive a Connect failed message.
For example, if I wanted to test whether the device 192.168.1.100 had it’s webserver (port 80) running:
telnet 192.168.1.100 80
We see a blank screen so we know that port 80 is open on this device.
Now, let’s see if the device is listening for Modbus TCP connections (port 502):
Here we see the Connect failed message which tells us this device is NOT open on port 502.
Note, in Windows Vista and Windows 7 you may need to enable telnet first:
- Go to Start -> Control Panel -> Programs
- Under Programs and features, click Turn Windows features on or off
- Check the box for Telnet Client
- Click OK
Links of Interest