Computer Networks/Netstat/All

From Wikiversity
Jump to navigation Jump to search

Netstat is a command-line tool that displays network statistics on a variety of operating systems. This activity will show you how to use the netstat command to display all active connections (TCP and UDP)

Preparation[edit]

To prepare for this activity:

  1. Start your operating system.
  2. Log in if necessary.

Activity 1 - Display All Active Connections[edit]

To display all active connections:

  1. Open a command prompt.
  2. Type netstat -a.
  3. Press Enter.
  4. Observe active TCP and UDP connections and listening ports, the local address and port number, the remote name or address and port number if a connection is established, and the connection status.

Activity 2 - Display All Active Connections by Number[edit]

To display all active connections by number (IP address) instead of by host name:

  1. Type netstat -a -n.
  2. Press Enter.
  3. Observe active TCP and UDP connections and listening ports, the local address and port number, the remote name or address and port number if a connection is established, and the connection status.
  4. Close the command prompt to complete this activity.

Readings[edit]

References[edit]