w7 2 Lab10 Netstat Utility2 (NonCisco)
w7 2 Lab10 Netstat Utility2 (NonCisco)
Learning Objectives
Background
netstat is an abbreviation for the network statistics utility, available on both Windows and
Unix / Linux computers. Passing optional parameters with the command will change output
information. netstat displays incoming and outgoing network connections (TCP and UDP),
host computer routing table information, and interface statistics.
For packets to travel across a network, a device must know the route to the destination network.
This lab will compare how routes are used in Windows computers. Some routes are added to
routing tables automatically, based upon configuration information on the network interface. The
device considers a network directly connected when it has an IP address and network mask
configured, and the network route is automatically entered into the routing table. For networks
that are not directly connected, a default gateway IP address is configured that will send traffic to
a device that should know about the network.
Scenario
In this lab the student will examine the netstat command on a pod host computer, and adjust
netstat output options to analyze and understand TCP/IP Transport Layer protocol status.
Open a terminal window by clicking on Start | Run. Type cmd, and press OK.
To display help information about the netstat command, use the /? options, as shown:
Use the output of the netstat /? command as reference to fill in the appropriate option that best
matches the description:
1
Option Description
Display all connections and listening ports.
Display addresses and port numbers in numerical
form.
Redisplay statistics every five seconds. Press
CTRL+C to stop redisplaying statistics.
Shows connections for the protocol specified by
proto; proto may be any of: TCP, UDP, TCPv6, or
UDPv6. If used with the –s option to display
per-protocol statistics, proto may be any of:
IP, IPv6, ICMP, ICMPv6, TCP, TCPv6, UDP, or
UDPv6.
When netstat statistics are displayed for TCP connections, the TCP state is displayed. During
the life of a TCP connection, the connection passes through a series of states. The following
table is
a summary of TCP states, compiled from RFC 793, Transmission Control Protocol, September,
1981, as reported by netstat:
IP Address Description
127.0.0.1 This address refers to the local host, or this computer.
0.0.0.0 A global address, meaning “ANY”.
The address of the remote device that has a
Remote with this computer.
connection
Address
2
Task 2: Use netstat to Examine Protocol Information on a Pod Host
Computer.
A table will be displayed that lists protocol (TCP and UDP), Local address, Foreign address, and
State information. Addresses and protocols that can be translated into names are displayed.
The –n option forces netstat to display output in raw format. From the terminal
window, issue the command netstat –an:
C:\>netstat–an
Use the window vertical scroll bar to go back and forth between the outputs of the
two commands. Compare outputs, noting how well-known port numbers are changed to
names. Write down three TCP and three UDP connections from the netstat –a output,
and the corresponding translated port numbers from the netstat –an output. If there are
fewer than three connections that translate, note that in your table.