Debugging Infrastructure and Endpoint Connectivity Issues Using PortQryUI

Prev Next

Introduction

Connectivity issues between the HP WXP Collaboration Data Collection agent and infrastructure or endpoints are among the most common challenges faced by local WXP Collaboration administrators. These issues are often diagnosed using a web browser, Telnet, or PuTTY.

While these tools are commonly used, they have several limitations:

  • A web browser may use a proxy by default, and connect when a direct connection will fail.

  • Telnet and PuTTY can verify only TCP connectivity.

  • Telnet does not support or interpret SSH connections.

This article guides you to download, Install, and Use PortQryUI, a Windows Servce network debuggin ulitity.  

Overview of PortQryUI

Earlier versions of Windows Server included a network debugging utility called PortQry. Although PortQry is no longer bundled with Windows Server, it is still available for download.

A graphical version of the tool, PortQryUI, is also available. This article focuses on PortQryUI, though the command-line version is included and may be used if preferred.

You can download PortQryUI from the following Microsoft site:
https://www.microsoft.com/en-gb/download/details.aspx?id=24009

Installation

PortQryUI is distributed as a self-extracting ZIP archive (PortQryUI.exe) and does not require a formal installation.

  1. Run PortQryUI.exe. A dialog box PortQueryUI is displayed to accept the License terms.

  2. On the PortQueryUI dialog box, click Yes to accept the license terms.

  3. Specify the destination folder for extraction. The default location is C:\PortQryUI.

  4. Click Unzip to extract the files.

Once extraction is completed, the tool is ready for use.

Using PortQryUI

To launch PortQryUI:

  1. Go to the folder where the files were extracted.

  2. Run portqueryui.exe

  3. The command-line version (PortQry.exe) is also available in the same directory. Once launched, the interface is straightforward. In most cases, the predefined service options do not provide sufficient detail.

  4. To get the required data, run a custom setting:

    1. Select Manually input query ports.

    2. Enter the required port number.

    3. Enter the IP address or hostname of the target system.

    4. From the dropdown, select TCP or UDP.

  5. Click Query.

For example, to check connectivity to a CUCM API hosted at 192.168.2.20 on port 8443:

  • Enter the IP address.

  • Specify port 8443.

  • Click Query.

The output shows:

  • The IP address was successfully resolved by reverse DNS.

  • Port 8443 could not be reached and is marked as FILTERED.

Understanding PortQry Status Messages

The output may be interpreted as follows: 

  • The IP address was successfully resolved by reverse DNS

  • The port 8443 could not be reached (FILTERED).

Microsoft defines the following PortQry status values:

  • Listening: A process is listening on the specified port. PortQry received a response from the port.

  • Not Listening: No process is listening on the target port. For UDP ports, PortQry received an ICMP “Port Unreachable” message. For TCP ports, PortQry received a TCP reset response.

  • Filtered: The port on the selected computer is filtered. PortQry did not receive a response. A process may or may not be listening on the port. By default, TCP ports are queried three times and UDP ports once before a report indicates the port is filtered. For example, to test SNMP connectivity:

    • Specify port 161.

    • Select UDP as the protocol.

    A successful response confirms SNMP availability and displays detailed output, including resolution status and query results.

    =============================================

    Starting portqry.exe -n 192.168.2.20 -e 161 -p UDP ...


    Querying target system called:

    192.168.2.20

    Attempting to resolve IP address to a name...


    IP address resolved to ip-192-168-2-20.ec2.internal

    querying...

    UDP port 161 (snmp service): LISTENING or FILTERED

    community name for query:

    public

    Sending SNMP query to UDP port 161...

    UDP port 161 is LISTENING
    portqry.exe -n 192.168.2.20 -e 161 -p UDP exits with return code 0x00000000.

    =============================================

Advanced Use

Defining services to use with the Query predefined serviceoption.

If there are queries that are often used these may be specified in the config.xml file that is present in the same folder as the executables. For more information, see the config.xml and PortQueryUI.doc files.

Fine-grained Control Using the Command Line Tool

If it is necessary to change the default behaviour, for instance to set a custom SNMP community string, the PortQry executable may be run in a command window. When running in this manner, there is a convenient interactive mode that gives the fullest control over the tool - this may be used by running PortQry -i

PS C:\PortQryUI> ./portqry -i

PortQry Interactive Mode

Type 'help' for a list of commands

Default Node: 127.0.0.1

Current option values:
end port= 80
protocol= TCP
source port= 0 (ephemeral)
Entering a ? will provide helpful informationPS C:\PortQryUI> ./portqry -i

PortQry Interactive Mode

Type 'help' for a list of commands

Default Node: 127.0.0.1

Current option values:
end port= 80
protocol= TCP
source port= 0 (ephemeral)
> ?

Valid Commands:
===============

help or ? - display info on common commands
phelp or ?p - display list of frequently used ports

node NAME - set default node to query, NAME or IP address

query or q - send query to default node

set OPTION=value

Options:
all - display current option values

port=n - set port number to query
- set port= or set e=

sport=n - set source port number, 0=ephemeral
- set sport= or set sp=

protocol=p - set protocol used for query, TCP, UDP, or BOTH
- set protocol= or set p=

cn=string - set SNMP community name
- default is set to public

nr - toggles reverse name lookups
- enables/disables resolving node IP address to name

sl - toggles slow link delay for UDP queries
- doubles timeout period waiting for UDP responses

query shortcut - sends queries associated with shortcut

Shortcuts:
DNS - queries TCP & UDP port 53
FTP - queries TCP port 21
IMAP - queries TCP port 143
IPSEC - queries UDP port 500
ISA - queries TCP & UDP port 1745
LDAP - queries TCP & UDP port 389
L2TP - queries UDP port 1701
MAIL - queries TCP ports 25,110,143
POP3 - queries TCP port 110
RPC - queries TCP & UDP port 135
SMTP - queries TCP port 25
SNMP - queries UDP port 161
SQL - queries TCP port 1433 & UDP port 1434
TFTP - queries UDP port 69

example: q mail

Therefore, to query SNMP on a system using a different community string, do the following:

PS C:\PortQryUI> ./portqry -i

PortQry Interactive Mode

Type 'help' for a list of commands

Default Node: 127.0.0.1

Current option values:
end port= 80
protocol= TCP
source port= 0 (ephemeral)
> node 192.168.2.20
Default Node: 192.168.2.20

>

> set cn=myCommunityString

SNMP community name set to:

myCommunityString

Reminder: community names are case sensitive

> q snmp

resolving service name using local services file...
UDP port resolved to the 'snmp' service

IP address resolved to ip-192-168-2-20.ec2.internal

querying...

UDP port 161 (snmp service): LISTENING or FILTERED

In order to get a response from the SNMP service, the
community name in the query must match a community
name that the SNMP service is configured to accept
By default PortQry uses the community name: public

Use the 'set cn' command to specify a different name if needed

community name for query:

myCommunityString

Sending SNMP query to UDP port 161...

UDP port 161 (snmp service): FILTERED

Removing PortQryUI

To remove PortQryUI, delete the folder containing the extracted files. The tool is not installed as a Windows application and leaves no system-level components behind.