Posted: . At: 7:13 PM. This was 8 years ago. Post ID: 9047
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.


Get information about your network connection with netstat on Windows.


Get network information on Windows with netstat

Netstat on Windows can provide a lot of information about your network connection.

This example shows netstat showing Ethernet statistics.

c:\Windows\System>netstat -e
Interface Statistics
 
                           Received            Sent
 
Bytes                    2307072092        27407417
Unicast packets             1757202          320154
Non-unicast packets               0               0
Discards                          0               0
Errors                            0               0
Unknown protocols                 0

Show the routing table with this command.

c:\Windows\System>netstat -r
===========================================================================
Interface List
  6...00 0c 29 84 eb 51 ......Intel(R) 82574L Gigabit Network Connection
  1...........................Software Loopback Interface 1
  4...00 00 00 00 00 00 00 e0 Teredo Tunneling Pseudo-Interface
  3...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #2
===========================================================================
 
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0      172.29.59.1    172.29.59.170     10
        127.0.0.0        255.0.0.0         On-link         127.0.0.1    306
        127.0.0.1  255.255.255.255         On-link         127.0.0.1    306
  127.255.255.255  255.255.255.255         On-link         127.0.0.1    306
      172.29.59.0    255.255.255.0         On-link     172.29.59.170    266
    172.29.59.170  255.255.255.255         On-link     172.29.59.170    266
    172.29.59.255  255.255.255.255         On-link     172.29.59.170    266
        224.0.0.0        240.0.0.0         On-link         127.0.0.1    306
        224.0.0.0        240.0.0.0         On-link     172.29.59.170    266
  255.255.255.255  255.255.255.255         On-link         127.0.0.1    306
  255.255.255.255  255.255.255.255         On-link     172.29.59.170    266
===========================================================================
Persistent Routes:
  None
 
IPv6 Route Table
===========================================================================
Active Routes:
 If Metric Network Destination      Gateway
  1    306 ::1/128                  On-link
  6    266 fe80::/64                On-link
  6    266 fe80::dbe:84ba:c9ad:635c/128
                                    On-link
  1    306 ff00::/8                 On-link
  6    266 ff00::/8                 On-link
===========================================================================
Persistent Routes:
  None

On Linux, this shows simpler output.

[jason@darknet:~] netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         172.29.59.1     0.0.0.0         UG        0 0          0 wlan0
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 wlan0
172.16.42.0     0.0.0.0         255.255.255.0   U         0 0          0 vmnet8
172.16.128.0    0.0.0.0         255.255.255.0   U         0 0          0 vmnet1
172.18.16.15    172.29.59.1     255.255.255.255 UGH       0 0          0 wlan0
172.29.59.0     0.0.0.0         255.255.255.0   U         0 0          0 wlan0

When running CMD as administrator, you also may use this command to show which executable is responsible for each connection.

C:\WINDOWS\system32>NETSTAT.EXE -b
 
Active Connections
 
  Proto  Local Address          Foreign Address        State
  TCP    127.0.0.1:50108        DESKTOP-SUVUQGE:wsd    TIME_WAIT
  TCP    127.0.0.1:50110        DESKTOP-SUVUQGE:wsd    TIME_WAIT
  TCP    127.0.0.1:50112        DESKTOP-SUVUQGE:wsd    TIME_WAIT
  TCP    127.0.0.1:50114        DESKTOP-SUVUQGE:wsd    TIME_WAIT
  TCP    127.0.0.1:50117        DESKTOP-SUVUQGE:wsd    TIME_WAIT
  TCP    172.29.59.170:49733    proxyzsvip:8080        ESTABLISHED
 [Explorer.EXE]
  TCP    172.29.59.170:49966    proxyzuvip:8080        ESTABLISHED
  wuauserv
 [svchost.exe]
  TCP    172.29.59.170:50083    proxyzsvip:8080        ESTABLISHED
 [Explorer.EXE]
  TCP    172.29.59.170:50087    wafww1e4:8080          TIME_WAIT
  TCP    172.29.59.170:50104    proxyzuvip:8080        TIME_WAIT
  TCP    172.29.59.170:50113    wafww1e4:8080          ESTABLISHED
  WinHttpAutoProxySvc
 [svchost.exe]
  TCP    172.29.59.170:50123    proxyzuvip:8080        ESTABLISHED
  DiagTrack
 [svchost.exe]
  TCP    172.29.59.170:50125    proxyzuvip:8080        TIME_WAIT
  TCP    172.29.59.170:50126    proxyzuvip:8080        TIME_WAIT
  TCP    172.29.59.170:50127    proxyzuvip:8080        TIME_WAIT
  TCP    172.29.59.170:50128    proxyzuvip:8080        TIME_WAIT
  TCP    172.29.59.170:50129    proxyzuvip:8080        TIME_WAIT
  TCP    172.29.59.170:50132    proxyzuvip:8080        ESTABLISHED
 [SearchUI.exe]
  TCP    172.29.59.170:50133    proxyzuvip:8080        ESTABLISHED
 [SearchUI.exe]
  TCP    172.29.59.170:50134    proxyzuvip:8080        ESTABLISHED
 [SettingSyncHost.exe]
  TCP    172.29.59.170:50135    proxyzuvip:8080        TIME_WAIT
  TCP    172.29.59.170:50136    proxyzuvip:8080        FIN_WAIT_2
 [SettingSyncHost.exe]
  TCP    172.29.59.170:50137    proxyzuvip:8080        LAST_ACK
 [SettingSyncHost.exe]
  TCP    172.29.59.170:50138    proxyzuvip:8080        SYN_SENT
 [SettingSyncHost.exe]
  TCP    [::1]:50107            DESKTOP-SUVUQGE:wsd    TIME_WAIT
  TCP    [::1]:50109            DESKTOP-SUVUQGE:wsd    TIME_WAIT
  TCP    [::1]:50111            DESKTOP-SUVUQGE:wsd    TIME_WAIT
  TCP    [::1]:50115            DESKTOP-SUVUQGE:wsd    TIME_WAIT
  TCP    [::1]:50116            DESKTOP-SUVUQGE:wsd    TIME_WAIT

The -y parameter shows the TCP connection template for all connections.

C:\WINDOWS\system32>NETSTAT.EXE -y
 
Active Connections
 
  Proto  Local Address          Foreign Address        State           Template
 
TCP    172.29.59.170:49733    proxyzsvip:8080        ESTABLISHED        Internet
TCP    172.29.59.170:49966    proxyzuvip:8080        ESTABLISHED        Internet
TCP    172.29.59.170:50083    proxyzsvip:8080        ESTABLISHED        Internet
TCP    172.29.59.170:50113    wafww1e4:8080          TIME_WAIT          Not Applicable
TCP    172.29.59.170:50123    proxyzuvip:8080        TIME_WAIT          Not Applicable
TCP    172.29.59.170:50135    proxyzuvip:8080        TIME_WAIT          Not Applicable
TCP    172.29.59.170:50136    proxyzuvip:8080        TIME_WAIT          Not Applicable
TCP    172.29.59.170:50138    proxyzuvip:8080        TIME_WAIT          Not Applicable
TCP    172.29.59.170:50141    proxyzuvip:8080        TIME_WAIT          Not Applicable
TCP    127.0.0.1:50142        DESKTOP-SUVUQGE:wsd    TIME_WAIT          Not Applicable
TCP    172.29.59.170:50143    wafww1e4:8080          TIME_WAIT          Not Applicable
TCP    127.0.0.1:50144        DESKTOP-SUVUQGE:wsd    TIME_WAIT          Not Applicable
TCP    127.0.0.1:50152        DESKTOP-SUVUQGE:wsd    TIME_WAIT          Not Applicable
TCP    127.0.0.1:50155        DESKTOP-SUVUQGE:wsd    TIME_WAIT          Not Applicable
TCP    127.0.0.1:50158        DESKTOP-SUVUQGE:wsd    TIME_WAIT          Not Applicable
TCP    127.0.0.1:50159        DESKTOP-SUVUQGE:wsd    TIME_WAIT          Not Applicable
TCP    172.29.59.170:50160    wafww1e4:8080          ESTABLISHED        Internet
TCP    127.0.0.1:50163        DESKTOP-SUVUQGE:wsd    TIME_WAIT          Not Applicable
TCP    127.0.0.1:50164        DESKTOP-SUVUQGE:wsd    TIME_WAIT          Not Applicable

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.