snmpnetstat

show network status using SNMP

Syntax:

snmpnetstat host community [-an]
snmpnetstat host community [-inr]
snmpnetstat host community [-s]
snmpnetstat host community [-n] [-I interface] [interval]
snmpnetstat host community [-p protocol]

Options:

-a
Show statistics for all sockets (default is for active sockets only).These statistics consist of the local and remote addresses, protocol, and internal state of the protocol.
-I interface
Show statistics for this interface.
-i
Show statistics for all interfaces.
-n
Show network addresses as numbers. By default, snmpnetstat interprets addresses and attempts to display them symbolically.
-p protocol
Show statistics for this protocol, which is either a protocol's well-known name or its alias. See /etc/protocols for a list of some protocol names and aliases.
-r
Show the routing statistics.
-s
Show statistics for all protocols.
host
An Internet address specified in dot notation or a host name.
community
The community name for the transaction with the remote system.
interval
The number of seconds between successive updates of the interface statistics.

Description:

The snmpnetstat utility displays network-related statistics retrieved from a remote system using the SNMP protocol.

Addresses

The snmpnetstat utility tries to match the host, network, and port with entries in the TCP/IP configuration files. If one of these matches, snmpnetstat displays the corresponding symbolic names. If none of these match or if you specify -n, snmpnetstat displays the addresses numerically.

Interface displays

The interface display shows a table of cumulative statistics on packets transferred, errors, and collisions. It also displays the network addresses of the interface and the maximum transmission unit (MTU). If you specify an interval, snmpnetstat shows a continuous display. The first line of the continuous display is a summary of statistics accumulated since the system was last booted; subsequent lines show values accumulated over the preceding interval.

If you specify:The interface display shows:
[-n] -itable of cumulative stats for all interfaces
[-n] -I interfacetable of cumulative stats for interface
intervalcontinuous column of stats for the primary interface and continuous table of cumulative stats for all interfaces
-I interface intervalcontinuous column of stats for interface and continuous table of cumulative stats for all interfaces

Routing table display

The routing table display shows 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. Direct routes are created for each interface attached to the local host.

This field:Shows:
Destinationdestination host or network
Gatewaygateway to use in forwarding packets
OR
address of the outgoing interface if the route is direct
Flagsstate of the route, where:
D = was created dynamically by a redirect
G = to a gateway
H = destination is a host
M = has been modified by a redirect
U = up
Interfacenetwork interface used for the route

See also:

netstat, snmpd, snmpget, snmpgetnext, snmpstatus, snmptest, snmptrap, snmptrapd, snmpwalk, mib.txt file, /etc/hosts file, /etc/networks file, /etc/protocols file, /etc/services file

RFC 1065, RFC 1066, RFC 1067, ISO 8824 (ASN.1)

Marshall T. Rose, The Simple Book: An Introduction to Internet Management, 2nd ed. (Prentice-Hall, 1994, ISBN 0-13-177254-6)