netstat tips and tricks

6
 TechRepublic : A ZDNet Tech Communit y Netstat tips and tricks fo r Windows Server admins Date: November 12th, 2010 uthor : Rick Vanover Category : Servers Tags: Fully Qualified Domain Name, Parameter, Administrator, Microsoft Windows Server, Microsoft Windows, Servers, Operating Systems, S oftware, Hardware etstat is a command that some Windows Server admins use every day, while others only use it  when there is a problem. I fall into the latter category; I use netstat  as a diagnosis tool when something has gone awry, or when I am trying to track something down. The 10 parameters to the Windows netstat  command can display scores of additional information for troubleshooting or everyday use. The most common iteration of netstat  is to use the -a parameter, which displays all connections and listening ports. However, netstat  displays useful information even without parameters.  Here are some pointers on using the netstat  command: Fully qu alifi ed domain name:  The -f parameter will display the fully qualified domain name (FQDN) of the foreign address in the netstat  display. This will resolve names internally and externally if p ossible. Figure A  shows the FQDN resolution within netstat . Figure A Net stat tips an d t ricks for Win dows S erver adm ins | Servers and Sto rage ... ht tp://blog s.tec hrep ub lic.com .com /datac ent er/?p=33 71&tag =n l.e040 1 de 6 15/11/2010 15:21

Upload: sacast

Post on 19-Jul-2015

9 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Netstat Tips and Tricks

5/16/2018 Netstat Tips and Tricks - slidepdf.com

http://slidepdf.com/reader/full/netstat-tips-and-tricks 1/6

TechRepublic : A ZDNet Tech Community 

Netstat tips and tricks for WindowsServer admins

Date: November 12th, 2010 Author: Rick VanoverCategory : ServersTags: Fully Qualified Domain Name, Parameter, Administrator, Microsoft Windows Server,Microsoft Windows, Servers, Operating Systems, Software, Hardware

 Netstat is a command that some Windows Server admins use every day, while others only use it when there is a problem. I fall into the latter category; I use netstat as a diagnosis tool whensomething has gone awry, or when I am trying to track something down.

The 10 parameters to the Windows netstat command can display scores of additional informationfor troubleshooting or everyday use. The most common iteration of netstat is to use the -aparameter, which displays all connections and listening ports. However, netstat displays usefulinformation even without parameters. Here are some pointers on using the netstat command:

Fully qualified domain name: The -f parameter will display the fully qualified domain name(FQDN) of the foreign address in the netstat display. This will resolve names internally andexternally if possible. Figure A shows the FQDN resolution within netstat .

Figure A 

etstat tips and tricks for Windows Server admins | Servers and Storage... http://blogs.techrepublic.com.com/datacenter/?p=3371&tag=nl.e040

1 de 6 15/11/2010 15:21

Page 2: Netstat Tips and Tricks

5/16/2018 Netstat Tips and Tricks - slidepdf.com

http://slidepdf.com/reader/full/netstat-tips-and-tricks 2/6

 What process is running on the open port: Tracking down which process identifier (PID)has a port open is quite easy when netstat is run with the -a -n -o combination of parameters.Read my Windows Server 2008 tip on this sequence of commands, and see it in action in FigureB.

Figure B

etstat tips and tricks for Windows Server admins | Servers and Storage... http://blogs.techrepublic.com.com/datacenter/?p=3371&tag=nl.e040

2 de 6 15/11/2010 15:21

Page 3: Netstat Tips and Tricks

5/16/2018 Netstat Tips and Tricks - slidepdf.com

http://slidepdf.com/reader/full/netstat-tips-and-tricks 3/6

 You can take this one step further with the implementation of friendly names for each process with the -b netstat parameter. This parameter requires administrative permissions and is shown inFigure C.

Figure C

etstat tips and tricks for Windows Server admins | Servers and Storage... http://blogs.techrepublic.com.com/datacenter/?p=3371&tag=nl.e040

3 de 6 15/11/2010 15:21

Page 4: Netstat Tips and Tricks

5/16/2018 Netstat Tips and Tricks - slidepdf.com

http://slidepdf.com/reader/full/netstat-tips-and-tricks 4/6

Note that the remote addresses pointing to the 192.168.1.220:3261 address are the Windows iSCSIinitiator service and display differently than the other services listed.

Display routing table: If you need to determine why one system has a different experience thananother on the same network, netstat can display a route of the current system with the -rparameter. Figure D shows this in use (note the persistent routes section that would display any static routes added to the Windows Server).

Figure D

etstat tips and tricks for Windows Server admins | Servers and Storage... http://blogs.techrepublic.com.com/datacenter/?p=3371&tag=nl.e040

4 de 6 15/11/2010 15:21

Page 5: Netstat Tips and Tricks

5/16/2018 Netstat Tips and Tricks - slidepdf.com

http://slidepdf.com/reader/full/netstat-tips-and-tricks 5/6

These four netstat commands can greatly add to the troubleshooting efforts for Windowsadministrators. How else do you use netstat ? Share your tips in the discussion.

Get IT tips, news, and reviews delivered directly to your inbox by subscribing to TechRepublic'sfree newsletters.

 Rick Vanover (MCITP, MCSA, VCP, vExpert) is an IT Infrastructure Manager for a financial services organization in Columbus, Ohio. Rick has years of IT experience and 

 focuses on virtualization, Windows-based server administration, and systemhardware. You can catch Rick on Twitter and read his full profile and full blogger

disclosure.

People who read this, also read...

unable to access UNC share via FQDN - across domainsFQDN

Cannot access FQDN over site-to-site VPN tunnelim wrigting a login script and i want to set the server name to a FQDNNeed help with ExchangeCertificates spelled wrong

etstat tips and tricks for Windows Server admins | Servers and Storage... http://blogs.techrepublic.com.com/datacenter/?p=3371&tag=nl.e040

5 de 6 15/11/2010 15:21

Page 6: Netstat Tips and Tricks

5/16/2018 Netstat Tips and Tricks - slidepdf.com

http://slidepdf.com/reader/full/netstat-tips-and-tricks 6/6

Print/View all PostsComments on this blog

 You learn something new.... NEW kama410@... | 11/15/10

RE: Netstat tips and tricks for Windows Server admins NEW steve@... | 11/15/10

My UpdatesMy Contacts

 Would you like your own dynamic Workspace on TechRepublic?

Take two minutes and set up a TechRepublic member profile.

 Would you like your own dynamic Workspace on TechRepublic?

Take two minutes and set up a TechRepublic member profile.

Popular on CBS sites: US Open | PGA Championship | iPad | Video Game Reviews | Cell Phones

 About CBS Interactive | Jobs | Advertise | Mobile | Site Map

© 2010 CBS Interactive Inc. All rights reserved. | Privacy Policy (updated) | Terms of Use

etstat tips and tricks for Windows Server admins | Servers and Storage... http://blogs.techrepublic.com.com/datacenter/?p=3371&tag=nl.e040

6 de 6 15/11/2010 15:21