NETSTAT.exe

Display current TCP/IP network connections and protocol statistics.


syntax
   NETSTAT [options] [-p protocol] [interval]
key   -a           Display all connections and listening ports.
   -e           Display Ethernet statistics. (may be combined with -s)
   -n           Display addresses and port numbers in numerical form.
   -r           Display the routing table.

   -o           Display the owning process ID associated with each connection.
                (XP only)

   -p protocol  Show only connections for the protocol specified; 
                may be either: TCP or UDP.
                Windows 2K/XP also allow: TCPv6 or UDPv6.  
                If used with the -s option then the following protocols
                may also be specified: IP, IPv6, ICMP,or ICMPv6.

   -s           Display per-protocol statistics.  By default, statistics are
                shown for IP, ICMP, TCP and UDP.
                Windows 2K/XP will also display: IPv6, ICMPv6, TCPv6 and UDPv6 
                The -p option may be used to specify a subset of the default.

   interval     Redisplay statistics, pausing interval seconds between
                each display. (default=once only) Press CTRL+C to stop.


Get domain, browser and PDC info.

syntax:

 BROWSTAT sta                 : Status Displays Transport,Primary DNS 
                                and Backup DNS servers.

 BROWSTAT sta -v domain       : Status Display (Verbose): includes Server OS 
                                and active browsers.

 BROWSTAT gp Transport Domain : List the PDC name (using NetBIOS)
 BROWSTAT gm Transport Domain : List the remote Master Browser name(using NetBIOS)
 BROWSTAT gb Transport        : List list of backup DNS Servers
 BROWSTAT wfw                 : List WFW servers that are running browser.

 BROWSTAT sts \\ServerName    : Dump browser statistics

 BROWSTAT TICKLE : Force remote master to stop.
 BROWSTAT ELECT  : Force election on remote domain

The VIEW options below can enumerate all the server services
running across a server or domain:

 BROWSTAT vw Transport
 BROWSTAT vw Transport domain
 BROWSTAT vw Transport \\Server
 BROWSTAT vw Transport \\Server /DOMAIN DomainToQuery

In the list displays, the following flags are used:

 W  = Workstation             NT  = Windows NT
 S  = Server                  W95 = Windows95
SQL = SQLServer               WFW = WindowsForWorkgroups
SS  = StandardServer          MFPN= MS Netware
PDC = PrimaryDomainController NV  = Novell
BDC = BackupDomainController  XN  = Xenix

TS=TimeSource
MBC=MemberServer
PQ=PrintServer
DL=DialinServer
AFP=AFPServer
OSF=OSFServer
VMS=VMSServer

PBR=PotentialBrowser
BBR=BackupBrowser,
MBR=MasterBrowser
DMB=DomainMasterBrowser
DFS=DistributedFileSystem


