Previous Table of Contents Next


Chapter 6
Lower Layer Support for SNMP

So far, this book has discussed network management applications and the languages and protocols, such as ASN.1 and SNMP, that manage complex internetworks. An underlying communication infrastructure is also necessary for the manager and agent to communicate network management information. This infrastructure exists at the OSI Transport, Network, and Data Link layers (review Figure 4-1a), or at the ARPA Host-to-Host, Internet, and Network Interface layers.

SNMP messages fit inside the OSI Data Link layer or ARPA Local Network layer frame. To send SNMP messages, the system requires the User Datagram Protocol (UDP) and the Internet Protocol (IP), as shown in Figure 6-1. Together, the SNMP message, plus UDP and IP headers, comprise an IP datagram. This chapter discusses these supporting protocols.


Figure 6-1.  An SNMP message within a transmission frame

6.1 User Datagram Protocol (UDP)

UDP provides a connectionless host-to-host communication path for the SNMP message. A connectionless path is one in which the communication channel is not established prior to the transmission of data. Instead, the network transmits the data in a package called a datagram. The datagram contains all of the addressing information necessary for the SNMP message to reach its intended destination. UDP is described in RFC 768 [6-1] and is an ARPA Host-to-Host (or OSI Transport layer) protocol. UDP assumes that IP, which is also connectionless, is the underlying ARPA Internet (or OSI Network Layer) protocol.

The UDP service requires minimal overhead, and therefore uses the relatively small UDP header shown in Figure 6-2. Note in the figure that each horizontal group of bits, called a word, is 32 bits wide. The first two fields in the UDP header are the Source and Destination Port numbers (each 2 octets in length) that identify the higher-layer protocol process that the datagram carries. Port number 161 (decimal) identifies SNMP messages, and port number 162 identifies SNMP traps. (Note that the SNMP agent processes use these defined ports; the manager may use these ports or any other port. Thus, multiple managers can address the same agent process.) The Source Port field is optional, and when not used contains all zeros. The Length field (2 octets) is the length of the UDP datagram, which has a minimum value of 8 octets. The Checksum field (2 octets) is also optional, and is filled with all zeros if the upper layer protocol (ULP) process does not require a checksum. The checksum is calculated by using the Pseudo Header, which includes the source and destination IP addresses, the Protocol field obtained from the IP header, and the length of the UDP datagram. The use of the IP address to calculate the Pseudo Header assures that the UDP datagram is delivered to the correct destination network and host.


Figure 6-2.  The User Datagram Protocol (UDP) header

Other host processes that use UDP as the Host-to-Host protocol include the Time protocol, port number 37; the Domain Name Server (DNS), port number 53; the Bootstrap Protocol (BOOTP) server and client, port numbers 67 and 68, respectively; the Trivial File Transfer Protocol (TFTP), port number 69; and the Sun Microsystems Remote Procedure Call (SunRPC), port number 111. All of these applications are designed with the assumption that if the Host-to-Host connection fails, some higher-layer process (such as the network management application itself) would recover. Other applications require more reliable end-to-end data transmissions, and therefore use the more rigorous Transmission Control Protocol (TCP), which is discussed in detail in the companion volume Troubleshooting TCP/IP [6-2].

6.2 Internet Protocol (IP)

IP, as defined in RFC 791 [6-3], works closely with UDP. IP handles datagram delivery. In other words, the IP destination address routes the datagram to the correct host on the specified network. The UDP port address then routes the datagram within the host to the correct host process.

To deliver datagrams, IP deals with two issues: addressing and fragmentation. The address assures that the datagram arrives at the correct destination. Datagram transmission is analogous to mailing a letter. When you mail a letter, you write a source and destination address on the envelope, place the information to be sent inside, and drop the resulting message in a mailbox. With the postal service, the mailbox is a blue (or red, depending on where you live) box. With the Internet, the mailbox service is the node where you enter the network.

Fragmentation is necessary because the sequence of LANs and WANs that any particular datagram may traverse can have differing frame sizes, and the IP datagram must fit within these varying frames (see Figure 6-1). For example, if the endpoint is attached to an IEEE 802.3 LAN with a maximum data field size of 1500 octets, IP must fragment the large IP datagram into smaller pieces (fragments) that will fit into the constraining frame. The distant node then reassembles the fragments back into a single IP datagram (sort of a reverse Humpty-Dumpty).

As you can see in Figure 6-3, the IP header contains at least 20 octets of control information. Version (4 bits) defines the current version of IP and should be equal to four. Internet Header Length (IHL, 4 bits) measures the length of the IP header in 32-bit words. (The minimum value would be five 32-bit words, or 20 octets.) The IHL also provides a measurement (or offset) for where the higher-layer information, such as the TCP header, begins within the datagram. The Type of Service (8 bits) tells the network the quality of service requested for this particular datagram. Values include:


Figure 6-3.  Internet Protocol (IP) header

Bits 0-2: Precedence (for relative importance of this datagram)
  111 Network Control
  110 Internetwork Control
  101 CRITIC/ECP
  100 Flash Override
  011 Flash
  010 Immediate
  001 Priority
  000 Routine
Bit 3: Delay, 0 = Normal, 1 = Low
Bit 4: Throughput, 0 = Normal, 1 = High
Bit 5: Reliability, 0 =Normal, 1 = High
Bits 6-7: Reserved for future use (set to 0)


Previous Table of Contents Next