Testing network connections with PortQry

A handy utility for troubleshooting/verifying network connectivity is Microsoft's PortQry utility. As a basic command-line utility or with an optional GUI, PortQry can be used to verify TCP and/or UDP connections between hosts.

The complete syntax of command-line PortQry is available simply by running portqry from the command-line. The typical syntax would be something like this:

portqry -n computername -p protocol -e ports

Where:

  • computername is the name or IP address of the system you wish to query
  • protocol is either TCP, UDP, or BOTH depending on which ports you wish to test
  • ports is a comma-separated list of ports or port ranges that will be queried.

e.g. To query common NetBIOS ports or test NetBIOS connectivity between the host running PortQry and a computer called SERVER1, you could run:

portqry -n SERVER1 -p both -e 135,137-139

PortQry will return the result of each port indicating if it is LISTENING, NOT LISTENING, or FILTERED (that is, not responding, but may still be open).

The GUI offers a number of pre-set network "service" queries for troubleshooting common network problems. The predefined service queries are: Domains and Trusts, IPSec, Networking, SQL Service, WEB Service, Exchange Server, Netmeeting, and Miscellaneous (which queries the local host for a Terminal Services listener on port 3389).

This Cable Guy article contains more information on PortQry and other helpful network testing utilities.


Author: ASAK
Created: Mar 24 2006
Categories: Utilities
TechByte #129

Warning: By visiting this site and/or by using any information contained herein, you agree to the Techbytes.ca terms of use.



Add a comment about this TechByte

If you wish to add a comment regarding this TechByte, please use the form below. Please note that by submitting comments using this form you are allowing all of the information submitted to be visible on this website. Any comments submitted using this form will only be shown on the website if they are approved by the administrators of this site. IF APPROVED, COMMENTS MAY TAKE SEVERAL DAYS TO BE POSTED.

Posted By: (Optional)

Comments:


Other TechBytes: