|
|
netstat [ -s | -g | -m | -p | -f address_family ] [ -P protocol ] [ -n ] [ system ] [ core ]
netstat -i | -I interface [ interval ] [ system ] [ core ]
netstat -r [ -anv ] [ system ] [ core ]
netstat -M [ -ns ] [ system ] ] core ]
netstat displays the contents of various network-related data structures in various formats, depending on the options you select.
The first form of the command displays a list of active sockets for each protocol. The second form selects one from among various other network data structures. The third form displays the routing table and the fourth form the multicast routing table.
The display for each active socket shows the local and remote address, the send and receive queue sizes (in bytes), the send and receive windows (in bytes), and the internal state of the protocol.
The symbolic format normally used to display socket addresses is either:
hostname.port
when the name of the host is specified, or:
network.port
if a socket address specifies a network but no specific host.
The numeric host address or network number associated with the socket is used to look up the corresponding symbolic hostname or network name in the hosts or networks database.
If the network or hostname for an address is not known (or if the -n option is specified), the numerical network address is shown. Unspecified, or ``wildcard'', addresses and ports appear as ``*''. For more information regarding the Internet naming conventions, refer to inet.7p
The possible state values for TCP sockets are as follows:
The form of the display depends upon which of the -i, -g, -m, -p or -s options you select. If you specify more than one of these options, netstat displays the information for each one of them.
The routing table display lists the available routes and the status of each. Each route consists of a destination host or network, and a gateway to use in forwarding packets. The flags column shows the status of the route (U if ``up''), whether the route is to a gateway (G), and whether the route was created dynamically by a redirect (D). If the -a option is specified there will be routing entries with flags for combined routing and address resolution entries (A), broadcast addresses (B), and the local addresses for the host (L).
Interface routes are created for each interface attached to the local host; the gateway field for such entries shows the address of the outgoing interface.
The refcnt column gives the current number of routes that share the same link layer address.
The use column displays the number of packets sent using an combined routing and address resolution (A) or a broadcast (B) route. For a local (L) route this count is the number of packets received, and for all other routes it is the number of times the routing entry has been used to create a new combined route and address resolution entry.
The interface entry indicates the network interface utilized for the route.
The multicast routing table consists of the virtual interface table and the actual routing table.
The kernel's tables can change while netstat is examining them, creating incorrect or partial displays.
|
|
Created by unroff & hp-tools. © by Hans-Peter Bischof. All Rights Reserved (1997).
Last modified 21/April/97