Networking

netstat -r

The netstat -r command is often used to view the routing table for a system. A system uses a routing table to determine routing information for TCP/IP traffic. The following is an example of the netstat -r command from a Windows Me system:

C:\WINDOWS\Desktop>netstat -r
Route table
===========================================================================
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0      24.67.179.1    24.67.179.22       1
      24.67.179.0    255.255.255.0     24.67.179.22    24.67.179.22       1
     24.67.179.22  255.255.255.255        127.0.0.1       127.0.0.1       1
   24.255.255.255  255.255.255.255     24.67.179.22    24.67.179.22       1
        127.0.0.0        255.0.0.0        127.0.0.1       127.0.0.1       1
        224.0.0.0        224.0.0.0     24.67.179.22    24.67.179.22       1
  255.255.255.255  255.255.255.255     24.67.179.22               2       1
Default Gateway:       24.67.179.1
===========================================================================
Persistent Routes:
  None


netstat -s

The netstat -s command displays a number of statistics related to the TCP/IP protocol suite. Understanding the purpose of every field in the output is for your reference, sample output from the netstat -s command is shown here:

C:\>netstat -s
IP Statistics
  Packets Received                   = 389938
  Received Header Errors             = 0
  Received Address Errors            = 1876
  Datagrams Forwarded                = 498
  Unknown Protocols Received         = 0
  Received Packets Discarded         = 0
  Received Packets Delivered         = 387566
  Output Requests                    = 397334
  Routing Discards                   = 0
  Discarded Output Packets           = 0
  Output Packet No Route             = 916
  Reassembly Required                = 0
  Reassembly Successful              = 0
  Reassembly Failures                = 0
  Datagrams Successfully Fragmented  = 0
  Datagrams Failing Fragmentation    = 0
  Fragments Created                  = 0
ICMP Statistics
                            Received    Sent
  Messages                  40641       41111
  Errors                    0           0
  Destination Unreachable   223         680
  Time Exceeded             24          0
  Parameter Problems        0           0
  Source Quenches           0           0
  Redirects                 0           38
  Echos                     20245       20148
  Echo Replies              20149       20245
  Timestamps                0           0
  Timestamp Replies         0           0
  Address Masks             0           0
  Address Mask Replies      0           0
TCP Statistics
  Active Opens                        = 13538
  Passive Opens                       = 23132
  Failed Connection Attempts          = 9259
  Reset Connections                   = 254
  Current Connections                 = 15
  Segments Received                   = 330242
  Segments Sent                       = 326935
  Segments Retransmitted              = 18851
UDP Statistics
  Datagrams Received    = 20402
  No Ports              = 20594
  Receive Errors        = 0
  Datagrams Sent        = 10217