What Port Is My Windows Service Running On
Kickoff published on TECHNET on Aug 26, 2008
Nosotros deal with application and service issues on a daily basis. Normally the issues relate to applications not performing as expected, hanging or crashing. However, every and then often someone volition inquire us what network port a service is using. Unless we are talking about i of the well known services such as SMTP, FTP, HTTP, RDP, LDAP, basic RPC etc, the ports being used are potentially subject to change. That does make life a little more challenging – but information technology'south nothing that we tin't figure out using some unproblematic tools.
When considering network port numbers, the numbers are divided into three ranges: the Well Known ports, the Registered ports and the Dynamic (Private) ports. The Cyberspace Assigned Numbers Authorization (IANA) is responsible for the global coordination of the port assignments. The Well Known port range is from 0 – 1023, Registered ports run from 1024 – 49151, and the Dynamic ports run from 49152 – 65535.
So how exercise nosotros determine the port that a service is using? Without using Network Monitor, Wireshark or a similar utility, there are a couple of very handy utilities provided with the operating system that nosotros can use – NETSTAT.EXE and TASKLIST.EXE. Most administrators are familiar with NETSTAT.EXE already, but for those who are not, you tin can utilise NETSTAT.EXE to identify what ports are being used by a item process. The syntax that we will exist using for NETSTAT.EXE is equally follows: netstat.exe –a –northward –o . The switches we are using provide the following:
- -a: listing of all connections and listening ports
- -northward: brandish accost and port numbers in numerical grade
- -o: brandish the owning PID associated with each connexion
When the command is run, you volition encounter output similar to what is below. Something to proceed in heed is that in the Proto column, the protocol may be TCP or UDP.
If there is a specific port in use that we want to examine, we need the PID of the owning process, and TASKLIST.EXE. Turning our attending to TASKLIST.EXE, nosotros covered some of the functionality in our post, Getting Started with SVCHOST.EXE Troubleshooting . The command that nosotros apply to dump out all of the processes and their PID's is simply tasklist.exe . When I run this command, this is what the output looks like:
So, looking at the output from these two utilities, I tin can take the port number, and and then map the PID to a specific procedure. If the process that you are looking at is an instance of SVCHOST.EXE – let'due south use PID 4784 as our example, and so yous volition demand to use slightly different switches for TASKLIST.EXE equally shown below:
And thus I tin tell exactly what services are running in that instance of SVCHOST.EXE.
And with that, nosotros've reached the end of our mail service. Until adjacent fourth dimension …
Additional Resources:
- IANA Port Assignments
- Microsoft KB Article 832017: Service Overview and Network Port Requirements for the Windows Se...
- Microsoft KB Commodity 319553: How to restrict FRS (File Replication Service) replication traffi...
- Microsoft KB Commodity 224196: Restricting Active Directory replication traffic and client RPC t...
- CC Hameed
| Share this mail service : | | | | | |
What Port Is My Windows Service Running On,
Source: https://techcommunity.microsoft.com/t5/ask-the-performance-team/what-port-is-that-service-using/ba-p/373292
Posted by: boydreste1954.blogspot.com

0 Response to "What Port Is My Windows Service Running On"
Post a Comment