What are the TCP port used while doing a Discovery?

SandeepKSingh
Kilo Sage

Hi Team,

 

I need to how TCP port works in Discovery and how the new Classes are created while doing a Discovery?

2 ACCEPTED SOLUTIONS

Ravi Gaurav
Giga Sage
Giga Sage

Hi @SandeepKSingh 

During ServiceNow Discovery, the platform uses TCP ports to communicate with target devices. A port acts like a gateway through which network traffic enters or leaves a device.

It scans standard ports (like 135, 22 for SSH, 3389 for RDP) to determine what services are available and what type of device it is (e.g., Linux, Windows).

  • During Discovery, ServiceNow identifies the type of device or software it is discovering based on collected data (like running processes, software installed, and hardware specs). Each device is classified into a Configuration Item (CI) Class, such as Server, Router, or Software.
  • Pattern-Based Discovery: New classes can be created when you extend discovery patterns. For example, if Discovery encounters an application or device type that isn't defined in the CMDB, you can create new CI classes and define a pattern to discover these new types.

 

 

--------------------------------------------------------------------------------------------------------------------------


If you found my response helpful, I would greatly appreciate it if you could mark it as "Accepted Solution" and "Helpful."
Your support not only benefits the community but also encourages me to continue assisting. Thank you so much!

Thanks and Regards
Ravi Gaurav | ServiceNow MVP 2025,2024 | ServiceNow Practice Lead | Solution Architect
CGI
M.Tech in Data Science & AI

 YouTube: https://www.youtube.com/@learnservicenowwithravi
 LinkedIn: https://www.linkedin.com/in/ravi-gaurav-a67542aa/

View solution in original post

PrashantLearnIT
Giga Sage

Hi @SandeepKSingh 

 

ServiceNow Discovery typically uses several TCP ports depending on the protocols and devices it is interacting with. Here are some of the commonly used ports for a ServiceNow Discovery:

  1. ICMP (Ping): Used to check if a device is up.

    • Protocol: ICMP (not TCP/UDP)
    • Port: N/A
  2. SSH (Secure Shell): Used for Unix/Linux discovery.

    • Port: 22 (TCP)
  3. WMI (Windows Management Instrumentation): Used for Windows discovery.

    • Port: 135 (TCP) – for WMI connection
    • Additional Ports: 49152–65535 (dynamic RPC range for WMI connections in Windows)
  4. SNMP (Simple Network Management Protocol): Used for network devices such as routers and switches.

    • Port: 161 (UDP)
  5. HTTP/HTTPS: Used for discovering web services or accessing APIs.

    • Ports: 80 (HTTP), 443 (HTTPS) (TCP)
  6. VMware vCenter: Used for discovering VMware virtual environments.

    • Port: 443 (HTTPS) (TCP)
  7. Oracle DB: For discovering Oracle database instances.

    • Port: 1521 (TCP)
  8. Microsoft SQL Server: For discovering MS SQL databases.

    • Port: 1433 (TCP)
  9. PowerShell Remoting (WinRM): For Windows servers when using PowerShell for discovery.

    • Port: 5985 (HTTP, TCP) and 5986 (HTTPS, TCP)
  10. LDAP (Lightweight Directory Access Protocol): For Active Directory discovery.

    • Port: 389 (LDAP, TCP) and 636 (LDAPS, TCP)
  11. Telnet: In rare cases for network devices.

    • Port: 23 (TCP)

Make sure the appropriate ports are open between the ServiceNow MID Server and the devices being discovered to ensure smooth discovery.

 

 

********************************************************************************************************
Please appreciate the efforts of community contributors by marking the appropriate response as the correct answer and helpful. This may help other community users to follow the correct solution in the future.

********************************************************************************************************
Cheers,
Prashant Kumar
ServiceNow Technical Architect


Community Profile LinkedIn YouTube Medium TopMate
********************************************************************************************************

View solution in original post

4 REPLIES 4

Ravi Gaurav
Giga Sage
Giga Sage

Hi @SandeepKSingh 

During ServiceNow Discovery, the platform uses TCP ports to communicate with target devices. A port acts like a gateway through which network traffic enters or leaves a device.

It scans standard ports (like 135, 22 for SSH, 3389 for RDP) to determine what services are available and what type of device it is (e.g., Linux, Windows).

  • During Discovery, ServiceNow identifies the type of device or software it is discovering based on collected data (like running processes, software installed, and hardware specs). Each device is classified into a Configuration Item (CI) Class, such as Server, Router, or Software.
  • Pattern-Based Discovery: New classes can be created when you extend discovery patterns. For example, if Discovery encounters an application or device type that isn't defined in the CMDB, you can create new CI classes and define a pattern to discover these new types.

 

 

--------------------------------------------------------------------------------------------------------------------------


If you found my response helpful, I would greatly appreciate it if you could mark it as "Accepted Solution" and "Helpful."
Your support not only benefits the community but also encourages me to continue assisting. Thank you so much!

Thanks and Regards
Ravi Gaurav | ServiceNow MVP 2025,2024 | ServiceNow Practice Lead | Solution Architect
CGI
M.Tech in Data Science & AI

 YouTube: https://www.youtube.com/@learnservicenowwithravi
 LinkedIn: https://www.linkedin.com/in/ravi-gaurav-a67542aa/

Daniel Borkowi1
Mega Sage

Hi @SandeepKSingh,

not sure what you need but your Question in the header is different to the question in the message. If you want to know which TCP Ports are used for Discovery the documentation lists all: https://docs.servicenow.com/csh?topicname=r_DiscoveryPortsAndProtocols.html&version=latest

If this wasn't your question, then please rephrase it with more details.

 

Greets
Daniel

Please mark reply as Helpful/Correct, if applicable. Thanks!

PrashantLearnIT
Giga Sage

Hi @SandeepKSingh 

 

ServiceNow Discovery typically uses several TCP ports depending on the protocols and devices it is interacting with. Here are some of the commonly used ports for a ServiceNow Discovery:

  1. ICMP (Ping): Used to check if a device is up.

    • Protocol: ICMP (not TCP/UDP)
    • Port: N/A
  2. SSH (Secure Shell): Used for Unix/Linux discovery.

    • Port: 22 (TCP)
  3. WMI (Windows Management Instrumentation): Used for Windows discovery.

    • Port: 135 (TCP) – for WMI connection
    • Additional Ports: 49152–65535 (dynamic RPC range for WMI connections in Windows)
  4. SNMP (Simple Network Management Protocol): Used for network devices such as routers and switches.

    • Port: 161 (UDP)
  5. HTTP/HTTPS: Used for discovering web services or accessing APIs.

    • Ports: 80 (HTTP), 443 (HTTPS) (TCP)
  6. VMware vCenter: Used for discovering VMware virtual environments.

    • Port: 443 (HTTPS) (TCP)
  7. Oracle DB: For discovering Oracle database instances.

    • Port: 1521 (TCP)
  8. Microsoft SQL Server: For discovering MS SQL databases.

    • Port: 1433 (TCP)
  9. PowerShell Remoting (WinRM): For Windows servers when using PowerShell for discovery.

    • Port: 5985 (HTTP, TCP) and 5986 (HTTPS, TCP)
  10. LDAP (Lightweight Directory Access Protocol): For Active Directory discovery.

    • Port: 389 (LDAP, TCP) and 636 (LDAPS, TCP)
  11. Telnet: In rare cases for network devices.

    • Port: 23 (TCP)

Make sure the appropriate ports are open between the ServiceNow MID Server and the devices being discovered to ensure smooth discovery.

 

 

********************************************************************************************************
Please appreciate the efforts of community contributors by marking the appropriate response as the correct answer and helpful. This may help other community users to follow the correct solution in the future.

********************************************************************************************************
Cheers,
Prashant Kumar
ServiceNow Technical Architect


Community Profile LinkedIn YouTube Medium TopMate
********************************************************************************************************