Much of the day-to-day work of the network manager can be done using simple, and freely available, utility programs (see next few slides).
For more complex monitoring, the Simple Network Management Protocol (SNMP) provides the network manager with the means to observe the performance of every network device.
In IP, the echo request type is supplied by ICMP, the Internet Control Message Protocol, which is required to be "built-in" to every IP implementation. ICMP is internal to IP: few "hooks" are available for users to generate ICMP packets.
The notable exception is provided by the user program
ping
, the "Packet INternet Groper".
Ping generates one (or more, see later) ICMP "echo request" packets (IP datagrams) addressed to a specified remote host. On receipt of such a packet, the remote host is required to send a time-stamped "echo reply" packet to the originating host.
Such a transaction confirms packet delivery (ie, the remote host is "reachable") and is "up" (the remote host's operating system is running, and was able to generate the ping reponse). Ping is the single most important frontline weapon of the intelligent network manager...
This program is intended for use in network testing, measurement and management. Because of the load it can impose on the network, it is unwise to use ping during normal operations or from automated scripts.Even more importantly -- you should only use ping for management purposes within your own network. Repeated pings to external hosts can be interpreted as indicating a Denial-of-Service attack.
traceroute
This program is intended for use in network testing, measurement and management. It should be used primarily for manual fault isolation. Because of the load it could impose on the network, it is unwise to use traceroute during normal operations or from automated scripts.
netstat
netstat -r
prints the kernel
routing table, netstat -a
reports on all current TCP
activity and netstat -C
gives a continually updated
real-time display of most network-related parameters.
netstat
is a very useful piece of
software.
arp
nslookup
, dig
telnet
The key concept in SNMP is the Management Information Base, or MIB. The MIB is formally described using the Abstract Syntax Notation-1 (ASN.1) specification language, and defines all of the information which a nettwork manager would like to measure in the network device.
ASN.1 is used to define what the data items are. A companion standard defines a set of Basic Encoding Rules (BER)[1] which detail how an ASN.1 data entity is encoded for transmission across a network service. Note that for our purposes, ASN.1 is a Read-Only Language -- you will not be required to write ASN.1 specifications, but you will be expected to understand (approximately, at least) definitions given in ASN.1.
The use of ASN.1 illustrates an interesting aspect of the history of the Internet. It was adopted in the 1980s when it was widely believed that the OSI protocols would eventually replace the TCP/IP protocol set -- that the Internet would eventually be replaced by a global OSI-based network. ASN.1 was developed by the OSI standards groups, and the designers of SNMP wanted their protocol to survive the anticipated migration to OSI. In the end, it never happened, and the use of ASN.1 is simply an interesting historical artifact. Nevertheless, we have to deal with it...
[1] In some ASN.1 applications (X.509 certificates in particular), a somewhat "tightened" set of Distinguished Encoding Rules are used, but SNMP uses the original BER, and so shall we! BTW: ASN.1 and BER are International Standards, defined in ISO/IEC 8824:1987 and ISO/IEC 8825:1987
BOOLEAN
(1)
INTEGER
(2)
REAL
(9)
BITSTRING
(3), OCTETSTRING
(4)
NULL
(5)
ENUMERATED
(10)
NB: The numbers given in parentheses, eg (1), are called TAGS, see later this lecture. [2] A Java programmer would probably call these primitive data types; in some other languages they would be called scalars, although most programming languages don't include the "string" types in this category.brainDamaged ::= BOOLEAN numberOfEmployees ::= INTEGER avogadrosNumber ::= REAL(602,10,23) sevenDeadlySins ::= ENUMERATED { pride(1), envy(2), gluttony(3), avarice(4), lust(5), sloth(6), wrath(7) } -- corresponding to OSI 7 layers :-)
SET
(17)
SET OF
(17)
SEQUENCE
(16), SEQUENCE OF
(16)
CHOICE
(11)
ANY
CHOICE
, except containing a list of anything that
can be defined in ASN.1 Some examples are:
messageBodyPart ::= CHOICE { [0] IMPLICIT asciiText, -- note TAG* [1] IMPLICIT telex ...etc... }
There are four classes of tags:
CHOICE
and
ENUMERATED
examples in slides 2 & 3 are an example.
integer
typically reserves 4 bytes (32 bits) of memory in
the program's data area.
Most ASN.1-based applications (eg SNMP) use derived types, which are specified using the sub-range (or sub-type) capabilities of the language[3]. These types usually match up with the storage which the application will reserve for them. Some examples include:
Month ::= INTEGER (1..12) Day ::= INTEGER (1..31) Daily-temperatures ::= SEQUENCE SIZE (31) OF INTEGER Name ::= PrintableString (SIZE (1..20 ))
OCTET STRING
. Amazingly, each of these
keywords can be separated by an optional space character.
Gauge.
Note that in these notes, an attempt will also be made to present all ASN.1
(and other) syntactic elements in the fixed-width courier
typeface. Occasional lapses from this convention may have to be forgiven by the
reader... Examples:
Note also that, where appropriate, we adopt the OSI convention of referring to "octets", instead of "bytes", even though the terms have almost universally identical meaning.MyType ::= TYPE nameOfValue MyType ::= VALUE
[3] These are usually given
APPLICATION-specific tags, as noted earlier,
although some are sufficiently important to be defined in the
standard.
[4] Reminding us of
the quote fromThough
The Looking Glass by Lewis Carroll:
"When I use a word," Humpty Dumpty said in rather a scornful tone, "it
means just what I choose it to mean -- neither more nor less."...