As400 SNMP
As400 SNMP
November 1997
November 1997
Take Note!
Before using this information and the product it supports, be sure to read the general information in
Appendix G, “Special Notices” on page 299.
This edition applies to the licensed program IBM Operating System/400, Version 3 Release 2 (Program 5763-SS1)
and OS/400 Version 3 Release 6 (Program 5716-SS1) but the book contents are applicable through OS/400 V4R1.
When you send information to IBM, you grant IBM a non-exclusive right to use or distribute the information in any
way it believes appropriate without incurring any obligation to you.
Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
The Team That Wrote This Redbook . . . . . . . . . . . . . . . . . . . . . . . . . ix
Comments Welcome . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x
Contents v
This soft copy for use by IBM employees only.
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
Contents vii
This soft copy for use by IBM employees only.
Preface
This redbook will help anyone who needs to understand the SNMP support
provided by the AS/400. As an aid to those new to SNMP, the book gives an
overview of SNMP, the type of information made available via SNMP and the
level of management made possible through the AS/400 SNMP agent. The book
includes information on the configuration of the AS/400 SNMP support and
provides examples of the use of an SNMP manager to retrieve SNMP
management information from the AS/400. In showing this, the book not only
shows how this can be done but also provides examples of the type of
information made available to an SNMP manager when querying an AS/400
SNMP MIB. Those familiar with SNMP will find information about the
standard,as well as IBM enterprise and Novell enterprise MIBs supported by the
AS/400 SNMP agent.
Of special value is the information included on how the SNMP set function can
be used to manage AS/400 communications objects, for example, how set can be
used to re-activate a failed line description.
The book also includes information on the SNMP manager and subagent APIs
included in OS/400, how these can be used by third-party applications and how,
in the case of the manager APIs, they are used by IBM-supplied OS/400
applications.
The book is valid for OS/400 releases V4R1, V3R7, V3R6, V3R2 and V3R1. It
should be noted that there were no SNMP enhancements in V4R1.
Bohuslav Endt is a Systems Engineer in IBM Czech Republic working in the Field
Support Center for the AS/400 system. He has 7 years of experience with
AS/400 system. His areas of expertise include the Integrated PC File Server and
PC connectivity to the AS/400 system, especially Client Access, Novell NetWare
and general networking.
Thanks to the following people for the invaluable advice and guidance provided
in the production of this document:
John Pechacek
IBM Rochester
Ed Boden
IBM Rochester
Frank Gruber
IBM Rochester
Alan Olson
IBM Rochester
Lee Hargreaves
IBM UK
Comments Welcome
Your comments are important to us!
The expansion of the Internet drew support from U.S. government organizations
including DARPA, the National Science Foundation (NSF), the Department of
Energy (DOE), and the National Aeronautics and Space Administration (NASA).
Eventually, international research bodies also got involved in the Internet.
During these early stages, network management was of a proprietary nature due
to the fact that networks were constructed with vendor-specific technology. In
recognition of the need for a network management framework suitable for
non-proprietary technology, in the late 1970s, the International Organization for
Standardization (ISO) , together with the International Telephone and Telegraph
Consultative Committee (CCITT) , started a research effort on this subject,
resulting in the Open Systems Interconnection (OSI) protocol suite.
The RFCs that define the SNMP specifications are the following:
• RFC1155 Structure and Identification of Management Information for
TCP/IP-based Internets
• RFC1212 Concise MIB Definition
• RFC1213 Management Information Base for Network Management of
TCP/IP-based Internets: MIB-II
• RFC1157 Simple Network Management Protocol (SNMP)
For further details about the IAB, and RFCs, see Appendix B, “The IAB” on
page 245.
OSI defines a service to be a set of functions that are offered through a Service
Access Point (SAP) . A service is offered through the use of a protocol . OSI
standards are grouped into pairs of service and protocol. A service may also be
comprised of several simpler services from the underlying level to form a more
complex service to offer to the layer above. This is known as layering .
While the OSI model is primarily connection-oriented, services from the lower
layers do use connectionless services to provide connection oriented services to
the upper layers. The upper layers are primarily connection-oriented.
Because the TCP/IP network could consist of more than just one network type,
management applications operate at the application layer. For example, a
TCP/IP network could consist of multiple token rings, Ethernets, and X.25
networks connected through gateways, routers, and bridges. However, network
management applications that operate at the application layer, such as SNMP,
are designed to operate regardless of the network hardware operating in the
lower layers. An advantage of this is that networks can be managed with a
limited set of protocols or commands because the different network elements
would respond to the same set of commands. A disadvantage of managing at
the application layer is that operating becomes dependent on a functional
underlying operating system, IP software, transport protocol, and such. For
example, if the TCP/IP software on a remote gateway were to fail, you would not
be able to contact the managing application at that gateway because in order to
reach this gateway, TCP/IP is required to be operational.
The SNMP manager polls the agents for error and statistical data. The
performance of the network will be dependent upon what the polling interval is
set at. The physical and logical characteristics of network objects make up a
collection of information called a Management Information Base (MIB). The
individual pieces of information that comprise a MIB are called MIB objects, and
they reside on the agent system. These objects can be accessed and changed
by the agent at the manager′s request. Unsolicited data, called traps, can also
be sent from the agent to the manager under certain conditions. This is how
NetView for OS/2 manages network objects. Other SNMP managers could also
access these MIB objects.
Consistent with the goal of minimizing complexity of the management agent, the
exchange of SNMP messages requires a simple datagram service. For this
reason, the preferred transport service for SNMP is the User Datagram Protocol
(UDP), although the mechanisms of SNMP are generally suitable for use with a
wide variety of transport services.
As a transport layer protocol, UDP uses the Internet Protocol (IP) as the
underlying protocol. Two inherent characteristics of UDP provide for its
simplicity. One of them is that UDP is unreliable , meaning that the UDP does not
An agent system can also generate SNMP messages called traps without a prior
request from the managing system. The purpose of a trap message is to inform
the managing system of an extraordinary event that has occurred at the agent
system. It must be noted that all request/response transactions are subject to
the time delays inherent to all networks. The typical SNMP request/response
primitives take place in the following manner:
• Manager polls agent with a REQUEST for information.
• Agent supplies information, which is defined in a MIB, in the form of a
RESPONSE.
Figure 7 on page 12 illustrates two time sequence diagrams. The top diagram
shows a typical SNMP request/response interaction, while the bottom diagram
shows a typical SNMP trap sequence.
In summary, the following steps describe the interactions that take place in an
SNMP-managed network:
• The SNMP agent gathers vital information about its respective device and
networks.
• The SNMP manager polls each agent for MIB information and can display
this information at the SNMP manager station. In this manner, a network
administrator can manage the network from a management station.
• An agent also has the ability to send unsolicited data to the SNMP manager
in the form of a trap. A trap is generally a network condition detected by an
SNMP agent that requires immediate attention by the network administrator.
Requests for the variable(s) that are received by the SNMP agent are passed to
the process acting as a subagent. The subagent then returns an appropriate
answer to the SNMP agent. The SNMP agent eventually sends an SNMP
response with the answer back to the network managing station that initiated
the request. The network management station has no knowledge that the SNMP
agent calls on other processes to obtain an answer. From the viewpoint of the
managing application, the agent is the only network management application on
the managed system.
The agent system makes network and system information available to other
systems by accessing the MIB objects and allowing configuration, performance,
and problem management data to be managed by the SNMP manager.
all new ideas must be proven while under experiment before they can
be proposed for standardization.
The SMI is defined via ASN.1 and comprises a set of rules used to describe
management information in the form of MIB objects. The Internet standard
RFC1155 documents the SMI in detail. Based on the SMI, management objects
can be uniquely identified through the use of an OBJECT IDENTIFIER which
represents a specific object′s name, that is, an OBJECT DESCRIPTOR. An
OBJECT IDENTIFIER can be used for purposes other than naming managed
object types. For example, each international standard has an OBJECT
IDENTIFIER assigned to it for the purpose of identification. In short, OBJECT
IDENTIFIERs are a means for identifying some object, regardless of the
semantics associated with the object. An example would be a network object or
a standards document.
A fully qualified OBJECT IDENTIFIER for a particular MIB object contains all
nodes, starting at the root and traversing the tree to an arbitrary level of depth,
until the desired leaf object is reached. The nodes are concatenated and
separated by periods, in a format known as ASN.1 notation. For example, the
mib-2 subtree is iso.org.dod.internet.mgmt.mib-2, which is concisely written in
ASN.1 notation as 1.3.6.1.2.1.
Note
Do not confuse the ASN.1 notation used by OBJECT IDENTIFIERs with the
format used to identify IP addresses. Although both notations use periods in
their format, they are not the same thing.
The OBJECT IDENTIFIER for the sysContact object contained in the MIB-II is
1.3.6.1.2.1.1.4, as you can see (in Figure 9) by following the labels from the root
down to the leaf object.
The standard MIB-II is registered in the mib-2(1) subtree. Experimental MIBs are
registered in the experimental(3) subtree. Enterprise-specific MIBs are
registered in the private(4) subtree. Each enterprise is assigned a number. IBM
is assigned the enterprise number 2, thus all IBM enterprise-specific MIB objects
have an OBJECT IDENTIFIER starting with 1.3.6.1.4.1.2, corresponding to the tree
structure iso.org.dod.internet.private.enterprises.ibm. Figure 10 on page 18
shows where IBM objects reside within the global tree structure.
For a more detailed explanation on the MIB tree structure, see Appendix A,
“Additional Information on SNMP” on page 235.
The rules for determining the value of the suffix ( y in the previous example)
depend on the type of object. Basically, two types of objects are involved in a
MIB. The following is an explanation of each, and the manner in which the suffix
value is assigned.
Tabular Objects These objects form part of a grouping in the form of a table.
Tables are useful for managing multiple variables that share common
properties but may have different values, within a given device.
For example, a personal computer usually has several different
software entities installed on it. The hrSWInstalledTable object in the
Host Resources MIB (RFC1514) defines an object called
hrSWInstalledName which is used to obtain a textual description of
the software which is installed on a given system.
hrSWInstalledName is a tabular object because it is part of a table,
hrSWInstalledTable, which is also a tabular object itself. The different
objects that make up the hrSWInstalledTable, such as
hrSWInstalledIndex, hrSWInstalledName, and others, make up the
columns of that table. Through the use of the values defined by
hrSWInstalledIndex, which assigns a unique index number to each
piece of software that is installed on the personal computer, it is
possible to identify the instances of hrSWInstalledName. The
instances of the table objects make up the rows of the table.
Figure 11 represents this in a graphical form.
instance then is the suffix for the OBJECT IDENTIFIER of each piece of
software. To show this, the instance of hrSWInstalledName that is
associated with the first software entity is:
hrSWInstalledName.1 or 1.3.6.1.2.1.25.6.3.1.2.1
The suffix then is the same as the instance. In this example it is 1.
By using OBJECT IDENTIFIERs to identify the different instances, it is
possible to create a lexicographic ordering over all the object
variables. This naming strategy admits the fullest exploitation of the
SNMP GETNEXT operation (see 2.9.1.2, “Structure of Management
Information (SMI)” on page 16) because it assigns names for related
variables so as to be contiguous in the lexicographical ordering of all
variable names known in the MIB.
Scalar (non-tabular) Objects These objects do not form part of a table, and there
is only one instance of these objects in a given device. Thus, the only
OBJECT IDENTIFIER suffix, y , for the OBJECT-TYPE, is zero. For
example, the OBJECT IDENTIFIER for OBJECT-TYPE sysUpTime is
simply:
sysUpTime.0 or 1.3.6.1.2.1.1.3.0
We will assume that an SNMP application has extracted the table index and
software type for each entry in the installed software table (hrSWInstalledTable)
of a particular network element. Suppose that this installed software table has
the following three entries:
hrSWInstalledIndex hrSWInstalledType
1.3.6.1.2.1.25.6.3.1.1.3 4 (application)
1.3.6.1.2.1.25.6.3.1.1.1 2 (operatingSystem)
1.3.6.1.2.1.25.6.3.1.1.2 1 (unknown)
As there are no further entries in the table, the SNMP agent returns those
objects that are next in the lexicographical ordering of the known object names.
This response signals the end of the routing table to the management station.
AS/400 support for SNMP was provided at OS/400 Version 3 Release 2 and
Version 3 Release 6 (limited support was included within OS/400 V3R1).
OS/400 SNMP support is comprised of an SNMP Agent and APIs. These APIs
can be used to build SNMP management and SNMP subagent applications.
When using OS/400 AnyNet support, SNMP can also be used over an SNA
network. AnyNet is also a part of OS/400 Version 3 Release 2 and Version 3
Release 6. For a more detailed explanation refer to Chapter 14, “SNMP and
AnyNet” on page 227.
Figure 12. OS/400 SNMP Support over TCP/IP and SNA Network.
The OS/400 SNMP implementations are based on the following Internet RFCs:
• RFC1157 Simple Network Management Protocol (SNMP)
• RFC1155 Structure and Identification of Management Information for
TCP/IP-based Internet.
• RFC1212 Concise MIB Definition
• RFC1213 Management Information Base for Network Management of
TCP/IP-based Internet: MIB-II
The OS/400 SNMP agent support allows configuration, performance and problem
management data to be available to SNMP managers. Typically, the SNMP
agent will keep statistics on the status of its network interfaces, incoming and
outgoing traffic, dropped datagrams and error messages generated. This
information will be requested by an SNMP manager. These units of managed
information that specifically describe an aspect of a system such as system
name, incoming traffic, hardware number, are MIB objects. A collection of
related MIB objects is defined as a MIB. The OS/400 SNMP agent supports the
following standard RFC MIBs, IBM enterprise MIBs and Experimental MIB (for
more information on the different types of MIBs refer to 2.9, “Understanding
MIBs” on page 14). For a complete list of the MIBs supported, see Chapter 9,
“OS/400 Supported MIBs” on page 147.
We will look in more detail at Novell MIBs in 9.5, “Novell Enterprise MIBs” on
page 178.
Refer to A.3.2.5, “The Trap-PDU” on page 243 for a description of the different
traps.
For more detailed information on configuring and using the AS/400 trap support,
see Chapter 11, “AS/400 as a Trap Generator” on page 205.
The SNMP manager APIs provide SNMP management applications the ability to
perform SNMP management functions (GET, GETNEXT, and SET) to local or
remote SNMP agents. Refer to 6.1, “SNMP Manager APIs Overview” on page 75
for more information on the manager APIs.
The trap manager receives traps, parses traps, and then enqueues the traps to
an internal queue. The OS/400 SNMP agent also has the ability to forward traps
to other managers. Trap forwarding is configurable using a CL command
interface. Refer to 6.2, “Trap Manager Overview” on page 78 for more
information on trap forwarding.
The type of protocol used by SNMP to pass data between the SNMP manager
and the SNMP agent is a request/response protocol.
Step 2: The agent gathers the information, requested by the manager, via the
MIB. If the request is for a MIB-II variable there is no need to pass the request
to the subagent and it continues with Step 6.
Step 4: The subagent gathers the information, requested by the agent, via the
MIB.
Step 5: The subagent responds to the agent request with the information
gathered in step 4.
Step 6: The agent responds to the manager request with the information
gathered in step 2 or step 4.
Step 7: Traps are sent from the agent to the manager as unsolicited messages.
A trap sent from the agent to the manager could be an authentication failure.
This chapter is intended to help you configure SNMP on the AS/400. Once the
configuration has been completed, we can then use an SNMP manager, such as
NetView for OS/2, to verify the AS/400 SNMP agent.
The test environment used in the configuration examples is shown in Figure 14.
A quick way to verify the TCP/IP connection between the two systems is to use
the TCP/IP PING command.
To verify the connection between your AS/400 and the remote system (in this
case a PC running NetView for OS/2 and TCP/IP) you will need to obtain the
internet address of that remote system and follow the example below.
PING
Press F4 and enter the internet address of the remote system as shown in
Figure 15.
Bottom
DSPJOBLOG
A successful connection will produce a joblog like the one shown in Figure 16 on
page 33.
If the connection was verified successfully then you should proceed with the
SNMP configuration.
If the connection was not successfully verified then you may have a hardware or,
more likely, a configuration problem which your network administrator should fix
before you proceed with the SNMP configuration.
CFGTCPSNMP
Selection or command
===> 1
More....
Trap managers:
Manager internet address . . . ′9.24.104.186′
Community name . . . . . . . . ′ REDBOOK′
Bottom
The parameters on this screen determine the facilities and behavior of the
AS/400 SNMP agent.
System contact This field should contain the name and contact information of the
person responsible for the operation of this AS/400. The data entered
here can be retrieved by a managing system by viewing the
sysContact MIB object of MIB-II. If you choose to enter *CNTINF in
this field, the managing system will then retrieve the data entered in
the service contact information. You can view this information by
entering the following command:
WRKCNTINF
System location This field should contain the physical location of the AS/400.
The data entered here can be retrieved by an SNMP manager by
viewing the sysLocation MIB object of MIB-II.
Send authentication traps This field enables the AS/400 to report, without any
request from a manager, any authentication failures to the manager.
That is any incoming request from a manager not belonging to a
community that is recognized by the AS/400 SNMP agent is reported.
Note
We suggest you use *YES as it provides a degree of security
auditing.
Automatic start This field determines whether the SNMP agent is started when
TCP/IP is started. If it is not, you must then run the following
command:
STRTCPSVR SERVER(*SNMP)
Object access This field allows you to decide whether SNMP managers that are
part of a recognized community have read only, read and write or no
access rights (*READ, *WRITE or *NONE) to MIB objects on this
system. The value entered here can be either used by, or overridden
by, the same parameter in the community attributes.
Note
The default value in the community attributes is *SNMPATR which
picks up the value you specify here. For security reasons it may
be advisable to specify *NONE in the SNMP attributes and use the
community attributes to grant specific object access rights.
After you have entered your desired values, press Enter to return to the
Configure TCP/IP SNMP screen shown in Figure 20 on page 37.
In this example we first verify the configuration of the community name public
and then we configure a private community to which we grant higher object
access capabilities.
The community name public is system supplied by default and allows any
manager, in the public community, READ access rights to MIB objects on your
system.
Selection or command
===> 2
From the Configure TCP/IP SNMP screen, take option 2 to work with
communities for SNMP.
5 public
Bottom
Bottom
Press Enter to continue.
F3=Exit F12=Cancel
Figure 22. Display Community for SNMP
Using the object access parameter you can specify what rights SNMP managers
using this community name have to the MIB objects on your system. We have
left the community name public with the default *READ access by any (*ANY)
SNMP manager.
Bottom
Bottom
The parameters on this screen determine which SNMP managers, when using
the community name redbook , can gain access to this system′s MIB objects and
what access rights they have to them.
Note
The log set requests and log get requests parameters tell the AS/400 whether to
log these requests from a manager in a system supplied journal QSNMP in
QUSRSYS. We examine this journal more closely in Chapter 12, “Journal for
SNMP Logging” on page 211.
In this chapter we look at some of the options available within NetView for OS/2
and how to use them to retrieve information from an SNMP agent (in this case
an AS/400).
We chose NetView for OS/2 as our SNMP manager in the following examples.
We don′t, however, give a detailed description of NetView for OS/2. We only
give a high level view to introduce you to the functions provided by a typical
SNMP manager.
From the OS/2 Desktop, open the IBM NetView for OS/2 folder by double-clicking
on the icon.
In this book we will only explore the functions behind a few of these icons.
However, below is a summary of the functions that lie behind all these icons.
Developers Toolkit The developer′s toolkit is a collection of application program
interfaces (APIs) that allow the development of management
programs. It includes sample programs and files that can be used by
a developer to create programs for the management desk.
Introduction to NetView for OS/2 The Introduction to NetView for OS/2 folder
provides brief summary of the product and its functions.
NetView for OS/2 Online Books The online books folder, as the title suggests,
provides online documentation about NetView for OS/2. The
documentation includes NetView for OS/2 Installation and Admin
Guide, NetView for OS/2 User Guide, and NetView for OS/2 Agent
Guide.
Readme The Readme file contains tips about such topics as installation and
troubleshooting.
Installation Utility The installation utility is used to: add additional components,
update existing components, reload files or icons that were lost or
remove NetView for OS/2.
Start Host Connection The Host Connection application allows host NetView
(where host NetView refers to NetView for MVS, VM and VSE) to
receive traps from systems managed by NetView for OS/2.
Communications Manager/2 acts as a bridge between NetView for
OS/2 and host NetView.
OS/2 Agent Configuration The OS/2 agent configuration allows you to configure
the system as an SNMP agent. MIB variables such as sysLocation
and sysDesc can be entered here for subsequent retrieval by an
SNMP manager.
Note
Before you can retrieve information from an agent, NetView for OS/2 must first
have ″discovered″ it. Discovered systems are stored in the All Systems folder
which we will come to later.
The discovery process starts by default when NetView for OS/2 is started. To
see which processes are started, go to an OS/2 window and enter the following
command:
SVSTATUS
If the NetView for OS/2 startup icons are not in the startup folder, then you may
receive the following message:
If they were in the startup folder, you will be presented with a screen showing a
list of processes and their current status.
Note
We suggest you consider dragging the two startup icons from the startup
folder and dropping them in the NetView for OS/2 Icon View main folder.
This allows you to control the startup procedure manually.
In this book we will be concentrating on systems using SNMP over TCP/IP and,
therefore, only need to discover systems using TCP/IP; although, it is possible
for NetView for OS/2 to discover systems using IPX and NetBIOS protocols also.
The three processes that NetView for OS/2 uses for discovery are as follows:
tcpipdiscovery This process will discover systems in the network that are using
the TCP/IP protocol. This is the process that we shall be using.
netbiosdiscovery This process will discover systems in the network that are
using the NetBIOS protocol.
netwdiscovery This process will discover systems in the network that are using
the IPX or NetWare protocol.
To start the discovery process, you will first need to start the Process Manager if
you have removed the icons from the startup folder. Go to the IBM NetView for
OS/2 icon view folder and double-click on the IBM NetView for OS/2 Startup icon.
The SVSTATUS command can be used to show the status of NetView for OS/2.
The more extension allows you to scroll through the process status screens. See
Figure 28 for an example screen.
Because there may be, potentially, hundreds of TCP/IP systems that could be
discovered by NetView for OS/2 and take up disk space on the PC, it may be
desirable to limit the discovery of systems to ones that are relevant to your
management domain. Seed files and Masks can be used for this purpose.
Alternatively, you could simply stop the discovery process once all the systems
you want to manage have been discovered (see Figure 29).
Double-click on the Management Desk from the NetView for OS/2 icon view
folder.
You should now see the NetView for OS/2 Product Information screen as shown
in Figure 30 on page 47. Click on the OK button.
You should now see the Management Desk icon view as shown in Figure 32 on
page 48.
Double-click on the Management Collections icon. You should now see the
Management Collections folder as shown in Figure 33.
At the Management Collections icon view double-click on the All Systems icon.
You should now see the All System folder as shown in Figure 34 on page 49.
Once NetView for OS/2 has discovered the agent system, you can use the MIB
Browser to retrieve information from it. In Figure 34 you can see that three
systems were discovered: RALYAS4A, RALYAS4B and the PC running NetView
for OS/2 (AS4PS2A).
Note
The AS/400 icons shown in Figure 34 were hand drawn using the icon editor.
Because the icon becomes associated with the system name, it is possible to
create an individual icon for each individual system. This makes it much
easier to identify the systems on the discovery screen. To use the icon
editor, click on the icon with the right mouse button and open settings. If you
then click on the General page of the settings view you will see the option to
edit the icon.
Figure 35 on page 50 and Figure 36 on page 50 show the AS/400 icon for
RALYAS4A when it is not communicating with the manager and then when
communications have been resumed, that is when the IPL has completed. Once
the discovery process has discovered a system, the manager keeps polling it at
regular intervals to verify that it is still communicating.
Go to the NetView for OS/2 folder and double-click on the MIB Browser icon.
You should be presented with the MIB Browser control panel as shown in
Figure 37 on page 51.
Alternatively you can access the MIB Browser for a specific system, from the All
Systems folder shown in Figure 34 on page 49. Select the system by clicking
once on its icon, using the right mouse button, then click on Application action.
This should present you with a list of applications that can be started. Select
MIB Browser.
The MIB browser allows us to explore the MIB tree (see Figure 9 on page 17) by
selecting a MIB object and using the Plus and Minus symbols. In the example
that follows we will retrieve the value sysContact from system RALYAS4A.
Enter the IP address of the agent. In this case the address of RALYAS4A is
9.24.104.56.
Enter the community name that the AS/400 agent is a member of. In this case
we have *READ authority to the public community on the AS/400. See Figure 22
on page 38.
Click on the mgmt object to expand the view of the mgmt subtree. See
Figure 39 on page 53.
Now click on the mib-2 object to expand the view of the mib-2 subtree. See
Figure 40 on page 54.
Click on the system object. Now you will see the ″leaf″ objects within the system
group such as sysDesc and sysContact . See Figure 41 on page 55.
Return to the MIB browser panel; now select Start query from the submenu.
This will send a request for sysContact information to the system whose IP
address you entered earlier. If all has been configured correctly, you should
receive the value stored in the system contact parameter in the SNMP attributes
of the AS/400. See Figure 43 for the results and for the submenu displayed.
Figure 44. AS/400 SNMP Attributes
Click on the Up tree button until you come to the panel showing the four MIB
objects: directory, mgmt, experimental and private as shown in Figure 37 on
page 51.
From here you will need to click on a sequence of MIB objects to take you down
another branch of the MIB tree.
Click on the Start query button to receive the value at that instant. The value
returned should be divided by 100 to give a true percentage. For example, a
value of 0 : 3850 would equate to 38.5% CPU.
Now, click on the Graph button and you should see a screen like the one in
Figure 45 on page 58.
In the example shown in Figure 46 on page 59, the graph function has been
sampling the system load of RALYAS4B for about 5 minutes.
The time interval between samples in Figure 46 was set to one second and
therefore shows even brief fluctuations in CPU load. It can be seen that the
average CPU load over this five minute period is around 25 percent.
In the next example, shown in Figure 47 on page 60, the sample period starts at
8:09:42pm on the 13th of July and runs throughout the night and following
morning.
It is clear that the processor load is very low for most of the night with the
exception of a spike shortly after 11:09:42pm. Because the time interval between
samples was set to one minute, any deviation in processor load may indicate a
significant period of activity. Using the Time interval setting from the View
pulldown, it is possible to examine instances like this more closely. In Figure 48
on page 61, we set the display width to ten minutes and then looked at the time
period of the spike.
Now it is apparent that the processor load was running at around fifty percent
between 12:03:02am and 12:05:00am. After checking the system history log,
QHST, on the AS/400 we discovered that the system cleanup task was running
during this time. Figure 47 on page 60 shows that the processor load remained
relatively low until around 08:00:00am when users started signing on to the
AS/400.
Now the Set button should have become available. Type the new value in the
SNMP set value field and click on the Set button. See Figure 50 on page 63.
Note
Notice that we are using the community name redbook . This community
allows us *WRITE authority. If you are not using a community that allows you
*WRITE authority then you will get a failure. See Figure 24 on page 39 for
RALYAS4A redbook community configuration.
See Figure 44 on page 57 for the value of the sysContact variable before it is
changed.
You should receive the Set value successful message as shown in Figure 51.
Now click on the Start query button once more to display the new MIB value.
See Figure 52 on page 64.
Figure 53. AS/400 SNMP Attributes Showing Changed sysContact Variable
Go to the IBM NetView for OS/2 icon view folder and double-click on the Data
Collector icon. You will see the Data Collector screen as shown in Figure 54.
The only active button at this stage should be the Add(1) button. Click on this
button so that we can add the MIB variable that we will collect data from.
We are going to monitor the CPU load of RALYAS4A and RALYAS4B using the
MIB variable nv6saComputerSystemLoad . To get to this variable you need to
move down the MIB tree.
Click on private.
Continue this process by clicking on the following objects until you arrive at the
nv6saComputerSystemLoad object as shown in Figure 56.
enterprises→
ibm →
ibmProd →
netView6000SubAgent→
nv6saComputerSystem
Specify the name of a file you would like the data collected to be stored in; we
chose the name redbook but you should consider choosing a more meaningful
name to make it easier to identify a file when you have multiple files.
Specify the MIB instance of the MIB variable. See 2.9.2.1, “Identification of
Object Instances” on page 18 for a description of MIB object instances. Some
MIB objects have several instances. Either type in the specific instance of the
object or use the wildcard character (*) to select all instances of the object. In
this case there is only one instance, so we entered 0. Click on OK.
You will now see the Add Summary screen (see Figure 57).
This is where we will add the address of the system from which we want to
collect data. We can also specify whether to store the data or not and determine
what to do if the value of the data exceeds certain thresholds we set on the
screen.
Enter a user-defined trap number. This trap will be sent to your trap manager
when the threshold conditions are met. We used trap number 1027.
Set the threshold to a value at which you would like a trap sent. We set it to
1500; this equates to 15% CPU load. So when the sampled value of this variable
exceeds 1500, a trap will be sent to the trap manager with a trap number of 1027.
The Rearm value is used to reset the threshold trap and to signal, via another
trap, when the sampled value of this MIB variable has gone below the Rearm
value. We set it to 500 which equates to 5% CPU load. In our example a trap
will be sent when CPU load exceeds 15% and another trap will be sent when the
value drops below 5%. Subsequent threshold traps will not be sent until the
rearm trap has been generated. Using these two values it is possible to call an
OS/2 program or routine when either the threshold or rearm value has been
reached.
Now click on OK. You should now see the Data Collector screen (Figure 58 on
page 68) with your collection file and summary added. Using the Add(2) button
Repeat the procedure you just completed for the second system and click on the
OK button when you have finished. You should now see both systems in the
collection summary panel as in Figure 59 on page 69.
Now click on the Resume button to commence collection of data then click on the
Apply button to set the values you have chosen. After the first collection interval
has elapsed, the Show data button should be revealed. See Figure 60 on
page 70.
Click on the Show data button to view the data that has been collected since
collection was resumed.
Note
To display the data graphically, Click on the Graph button (see Figure 61 on
page 71) to display the data collected so far (as shown in Figure 63).
Unlike the MIB Browser′s graph function, this graph is not automatically updated
at each polling interval. It just plots the data already logged.
We can now see quite easily how the two systems are performing. We can see
the CPU load for RALYAS4A at IP address 9.24.104.56 briefly exceeded 15% at
10:28:59am and 10:32:29am. This should have generated our user-defined trap.
Because the NetView for OS/2 system is set up to send any traps to itself we can
view the traps by clicking on the Event Displayer icon from the IBM NetView for
OS2 folder.
If we specify a time range that includes a period of high CPU on the Events
Display panel and click on the Display button, we see the All Events screen as
shown in Figure 64.
You can see that two traps were generated; trap 1027 was generated when the
CPU exceeded the value we set in Figure 57 on page 67 (15%), and trap 1028
was generated when it dropped below the rearm value (5%).
Using NetView for OS/2 to manage your AS/400s, it is possible to display pop-up
messages when a specific trap is received or even dial someone′s message
pager and leave a textual message reporting the trap. This is done through the
Event Handler function of NetView for OS/2.
This chapter describes how the SNMP manager is enabled for OS/400.
The OS/400 SNMP manager provides a rudimentary base for SNMP management
applications. The OS/400 SNMP manager consists of the following functions:
• SNMP manager application program interface (API)
• Trap manager
For more OS/400 SNMP Manager information refer to the System API Reference
book .
In general, all three APIs are blocked. That is, when the application calls these
APIs, the API constructs a proper SNMP message (see Appendix A, “Additional
Information on SNMP” on page 235 for more information on SNMP message
layout), delivers it to the proper SNMP agent, waits, decodes the response from
the agent, and delivers the information to the application. No processing occurs
in the application until the API delivers this information or times out. See
Figure 65 on page 76.
This simple SNMP manager program does a ″MIB walk″ on an SNMP agent by
doing repeated GETNEXT operations.
/* Necessary include files */
#include <QTOMEAPI.H>
#include <stdio.h>
#include <string.h>
#include <milib.h>
#include <miproces.h>
#include <string.h>
#include <stdlib.h>
_MI_Time time_to_wait;
int hours = 0,
minutes = 0,
seconds = 5,
hundreths = 0;
snmppdu MGRpdu;
snmppdu *MGRpdu_p = &MGRpdu;
char MGRcommunity[6] = {0x70,0x75,0x62,0x6C,0x69,0x63}; /* public */
int rc;
char value[4000];
char oid[100]=″1.3.6.1.2.1.1.3″; /* OID to begin at */
char loopback[10]=″127.0.0.1″; /* loopback address */
char *addr_p = &loopback[0];
/* varbind */
varBind MGRvarbind;
/* loop forever */
do {
/* Init varbind */
MGRvarbind.next = 0; /* ptr to next varbind */
MGRvarbind.oid = &oid[0]; /* OID */
MGRvarbind.asn_type = 0;
MGRvarbind.val_len = 4000;
MGRvarbind.val.str_val = 0;
/* Create PDU */
MGRpdu.varbind = &MGRvarbind;
MGRvarbind.val.str_val=&value[0];
The OS/400 SNMP manager has the following two trap functions:
• Forward a received trap to other SNMP managers
• Deliver a received trap to a data queue
The trap manager receives, parses and then enqueues traps received to an
internal data queue. All traps that are received on an AS/400 system can also
be routed to user-defined data queues. See 6.2.2.1, “Configuring Trap Support
for Data Queue Delivery” on page 84 for more information on how to specify a
user-defined data queue.
If configured to do so, the trap manager then forwards the traps to other SNMP
management destinations as configured in the SNMP attributes. The traps are
forwarded through the SNMP agent that generates and sends the actual trap
PDU. Therefore, traps are sent to all managers that are configured in the SNMP
agent′s trap manager attributes. See 6.2.1, “Trap Forwarding” on page 80 for
more information on how to forward traps.
The commands to start and end the OS/400 trap manager support are the
following:
• STRTRPMGR - Start Trap Manager
• ENDTRPMGR - End Trap Manager
Figure 67. Trap Manager Jobs Running Under QSYSWRK
The CHGSNMPA command should be used to specify the internet address and the
community of those managers the traps should be forwarded to. Up to 300
managers can be specified in the the Trap Manager (TRPMGR) parameter.
Note: Be careful when configuring the trap destinators to avoid trap loops.
Loops are caused when two or more trap managers are configured to forward
traps to each other.
Traps will only be forwarded if the trap manager job is started specifying forward
*YES in the FWDTRP parameter.
STRTRPMGR FWDTRP(*YES)
When the system CATCPIP (configured with the SNMP support provided with
Client Access/400 Optimized for OS/2) starts the SNMP agent, which is part of
Client Access, it will send a coldStart trap to RALYAS4A (as configured in Client
Access). System RALYAS4A will be configured to forward the trap to system
AS4PS2A (our NetView for OS/2 system).
Change SNMP Attributes (CHGSNMPA)
More...
Change SNMP Attributes (CHGSNMPA)
Trap managers:
Manager internet address . . . > ′9.24.104.186′
Community name . . . . . . . . > ′ public′
Bottom
Figure 69. Forwarding Traps to System AS4PS2A
Using the DSPJRN (QUSRSYS/QSNMP) command, if *YES was specified in the LOGTRP
parameter of the SNMP agent attributes, the following entry is logged in the
QSNMP journal of system RALYAS4A.
Display Journal Entry
Object . . . . . . . : Library . . . . . . :
Member . . . . . . . : Sequence . . . . . . : 10870
Code . . . . . . . . : M - Network management data
Type . . . . . . . . : SN - SNMP information
Figure 70. QSNMP Journal Entry for System RALYAS4A
This journal entry indicates that a trap was sent to a trap manager at internet
address 9.24.104.186 (AS4PS2A). There is no community name specified, as this
system (RALYAS4A) is just delivering to system AS4PS2A the trap received from
CATCPIP. Field 39 indicates that the trap type is coldStart (0). Error type and
error index fields are both zero. For more information on journal entries, refer to
Chapter 12, “Journal for SNMP Logging” on page 211. For more information on
trap types, refer to A.3.2.5, “The Trap-PDU” on page 243.
Figure 71 shows the trap received at AS4PS2A (the NetView for OS/2 system).
In the Node field the name of the system forwarding the trap can be seen. In
this case it is system RALYAS4A. The Generic field indicates the kind of trap
received. The zero (0) indicates that a coldStart trap was received. In the
Description field ″ColdStart Trap: Agent Up with possible Changes″ can be seen.
Through this example we have shown how to configure the systems for trap
forwarding and how to monitor them. You can also monitor traps with the use of
user-defined data queues.
To define a user data queue to receive the traps, the data queue name has to be
specified in the SNMP trap support exit point. SNMP trap support uses the exit
point QIBM_QZCA_SNMPTRAP and a data queue you define. Up to 100 data
queues can be specified.
The following steps are required to configure the OS/400 SNMP trap support to
deliver traps received to a data queue:
1. Use the Work with Registration Information (WRKREGINF) command (as follows)
to determine if the QIBM_QZCA_SNMPTRAP exit point exists on your system:
Enter the command WRKREGINF.
Work with Registration Information
Exit
Exit Point
Opt Point Format Registered Text
QIBM_QRQ_SQL RSQL0100 *YES Original Remote SQL Server
QIBM_QTF_TRANSFER TRAN0100 *YES Original File Transfer Fun
QIBM_QVP_PRINTERS PRNT0100 *YES Original Virtual Print Ser
QIBM_QZCA_ADDC ZCAA0100 *YES Add Client exit point
QIBM_QZCA_REFC ZCAF0100 *YES Refresh Client Information
QIBM_QZCA_RMVC ZCAR0100 *YES Remove Client exit point
QIBM_QZCA_SNMPTRAP ZCAT0100 *YES
QIBM_QZCA_UPDC ZCAU0100 *YES Update Client Information
QIBM_QZDA_INIT ZDAI0100 *YES Database Server - entry
QIBM_QZDA_NDB1 ZDAD0100 *YES Database Server - data bas
QIBM_QZDA_NDB1 ZDAD0200 *YES Database Server - data bas
More..
Command
===>
F3=Exit F4=Prompt F9=Retrieve F12=Cancel
Figure 73. Registered Exit Points
2. If the exit point QIBM_QZCA_SNMPTRAP does not exist, the exit point should
be created and registered using the following command:
CALL PGM(QUSRGPT) PARM(′ QIBM_QZCA_SNMPTRAP ′ ′ ZCAT0100′ X′00000000′
X′00000000′)
Note: The first parameter must be 20 characters long.
3. A data queue of 32780 bytes has to be defined. For example, to define a
data queue called TRAPQ in library QGPL, enter the following command:
CRTDTAQ DTAQ(QGPL/TRAPQ) MAXLEN(32780)
4. The following should be done to register the exit program and the exit
program data with QIBM_QZCA_SNMPTRAP exit point:
a. Enter the command WRKREGINF.
Work with Registration Information
Exit
Exit Point
Opt Point Format Registered Text
QIBM_QRQ_SQL RSQL0100 *YES Original Remote SQL Server
QIBM_QTF_TRANSFER TRAN0100 *YES Original File Transfer Fun
QIBM_QVP_PRINTERS PRNT0100 *YES Original Virtual Print Ser
QIBM_QZCA_ADDC ZCAA0100 *YES Add Client exit point
QIBM_QZCA_REFC ZCAF0100 *YES Refresh Client Information
QIBM_QZCA_RMVC ZCAR0100 *YES Remove Client exit point
8 QIBM_QZCA_SNMPTRAP ZCAT0100 *YES
QIBM_QZCA_UPDC ZCAU0100 *YES Update Client Information
QIBM_QZDA_INIT ZDAI0100 *YES Database Server - entry
QIBM_QZDA_NDB1 ZDAD0100 *YES Database Server - data bas
QIBM_QZDA_NDB1 ZDAD0200 *YES Database Server - data bas
More..
Command
===>
F3=Exit F4=Prompt F9=Retrieve F12=Cancel
Figure 74. Working with Registration Information
b. From the Work with Registration Information panel take option 8 (Work
with exit programs) for the QIBM_QZCA_SNMPTRAP exit point and press
Enter.
Work with Exit Programs
Exit
Program Exit
Opt Number Program Library
1
Bottom
Command
===>
F3=Exit F4=Prompt F5=Refresh F9=Retrieve F12=Cancel
Figure 75. Working with Exit Programs
c. From the Work with Exit Programs panel take option 1 (Add) and then
press F10 (additional parameters). The panel as shown in Figure 76 on
page 87 will be presented.
Add Exit Program (ADDEXITPGM)
Additional Parameters
More...
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys
Add Exit Program (ADDEXITPGM)
...
Bottom
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys
Figure 76. Adding an Exit Program
d. Enter the name of the program that will monitor the data queue to
receive the trap information. In this example the program is TRAPPGM
in library QGPL.
e. Enter the name of the data queue created to receive the traps in the
Program data field. In this example the data queue is called TRAPQ.
Note: This configuration only registers the data queue name. The
program name and library that will use this data queue may be specified,
even though this information is not used.
Notes:
1. The program data field on the Add Exit Program (ADDEXITPGM) display (see
Figure 76 on page 87) contains the library name and the data queue name
that will be used by the trap manager. This data must not exceed 21 bytes.
2. The exit program and library do not have to exist when they are added to the
exit point.
3. The library name and data queue must be specified in uppercase on the exit
point.
4. Multiple exit points are supported on the QIBM_QZCA_SNMPTRAP exit point.
Each exit program must contain only one data queue.
5. A ma x i mu m of a hundred data queues can be defined.
6. The data queue names are retrieved from the exit point only when the trap
manager is started. To activate any changes to the data queues, you must
end the trap manager with the End Trap Manager ( ENDTRPMGR) command and
restart the trap manager with the Start Trap Manager ( STRTRPMGR) command.
7. In the preceding scenario, all traps are added to the data queue. If the data
queue is locked, damaged, destroyed, or named incorrectly, the traps are
lost. It is the responsibility of the user to remove traps from the queue. No
messages are sent if the queue is full or traps not removed.
8. The format for the ZCAT0100 trap data queue entry follows. For details about
the SNMP trap, refer to the Internet standard for the trap message described
in RFC1155 or RFC1157. The values for the object type field can be found in
the AS/400 library QSYSINC, file H, member QTOMEAPI.
Table 1 (Page 1 of 2). Format for ZCAT0100 Trap Data Queue Entry
Offset
Dec Hex Type Field
0 0 CHAR(10) Entry type (always *SNMPTRAP)
10 A CHAR(2) Entry ID (currently 01)
12 C BINARY(4) Version (This is the start of the trap header.
All displacements are from the start of the
trap header).
16 10 BINARY(4) Length of community name
20 14 BINARY(4) Displacement to community name
24 18 BINARY(4) Length of enterprise object ID
28 1C BINARY(4) Displacement of enterprise object ID
32 20 BINARY(4) Length of agent address
36 24 BINARY(4) Displacement of agent address
40 28 BINARY(4) Generic trap type
44 2C BINARY(4) Specific trap code
48 30 BINARY(4) Time stamp
52 34 BINARY(4) Number of variable bindings
Table 1 (Page 2 of 2). Format for ZCAT0100 Trap Data Queue Entry
Offset
Dec Hex Type Field
56 38 BINARY(4) Displacement to first variable binding
Note: An array of variable bindings follows.
This fields repeat for each BINARY(4) Length of object name
variable binding
BINARY(4) Displacement of object name
BINARY(4) Length of value
BINARY(4) Displacement to value
BINARY(4) Value type (Values for this field can be found
in AS/400 library QSYSINC, file H, member
QTOMEAPI)
Note: All object names and values follow.
CHAR(*) Object names and values for all variable
bindings.
This chapter describes the SNMP DPI routines supported by OS/400 and the
Application Programming Interface (API) available in OS/400 for constructing an
SNMP subagent.
For more OS/400 SNMP Subagent information refer to the Simple Network
Management Protocol (SNMP) Subagent APIs section of the OS/400 System API
Reference: UNIX Type APIs book (SC41-3875 for V3R2 or SC41-4875 for V3R6).
For additional information refer to RFC1592 (SNMP DPI 2.0 RFC). See B.1.1.1,
“How to Obtain a Copy of an RFC” on page 246 for information on how to obtain
RFCs.
A subagent extends the set of MIB objects provided by the SNMP agent. An
SNMP subagent is the implementation of a network management application on
a managed system, which interfaces with the SNMP agent for the purpose of
expanding the number of MIB objects that an SNMP manager can access. A
subagent allows the addition of other MIB objects and registers them with the
SNMP agent without the need to change or recompile the agent. Whether a MIB
object is referenced by the agent or the subagent, is transparent to the SNMP
manager.
When the agent receives a request for a MIB variable that is not a request for a
MIB-II variable, it passes the request to the subagent. The subagent gathers the
requested information and sends a response to the agent. The agent creates an
SNMP response packet and sends the response to the remote network
management station that initiated the request. The existence of the subagent is
transparent to the network management station.
The only MIB that is implemented within OS/400 SNMP agent is MIB-II. The
other MIBs supported by the OS/400 SNMP such as APPN MIB, Client
Management Inventory and the NetView/6000 Subagent MIB are all implemented
as OS/400 SNMP subagents.
The following charts show a sequence of events starting with the connection
establishment between the subagent and agent through to the closing of the
connection. The flow charts are intended to help in the understanding of SNMP
subagent programming.
Figure 79. SNMP Subagent Wait and Execute Request from SNMP Agent
Figure 79 shows the SNMP subagent waiting and then executing requests from
the SNMP agent.
Figure 80 shows the SNMP subagent unregistering itself from the SNMP agent
and then closing the connection.
Note: All DPI subagent functions are performed within the logical bracket
formed by a CONNECT and DISCONNECT.
Zero opens is not a useful normal condition for a subagent and would occur only
briefly between a DPI CONNECT request and the sending of a DPI OPEN packet.
Zero registrations will only be useful for a subagent that only sends traps and
does not implement any MIB groups.
More than a single subtree registration would be useful for a variety of reasons:
1. Perhaps separate MIBs are being implemented by separate people, but it
was decided to have these MIB implementations all run within a single job.
2. Perhaps a few OIDs within a MIB are known to have a relatively large
overhead, compared to the rest of the subtree, for DPI request type. There
For each DPI request, we will mention which API performs the request, if there is
one available. For a more detailed explanation of each API, refer to the Simple
Network Management Protocol (SNMP) Subagent APIs section of the OS/400
System API Reference: UNIX Type APIs book (SC41-3875 for V3R2 or SC41-4875
for V3R6).
Figure 82 and Figure 83 on page 101 show the sequence of events involved
is DPI set processing between the subagent and agent.
The mkDPIresponse() API is the one that constructs the DPI response packet.
See 7.4.3, “SNMP Subagent Initiated DPI Requests” on page 103 for more
information.
The sendDPIpacket() API sends the response back to the agent. See 7.4.4,
“SNMP Subagent Communication Functions with SNMP Agent” on page 104
for more information.
The mkDPIset() API makes a DPI set structure and adds it to a chained list of
set structures if previous calls have been made.
For more information on DPI COMMIT and DPI UNDO, refer to the following
topics.
• COMMIT
The DPI COMMIT is requested by the agent when it receives a no error DPI
RESPONSE for a DPI SET from that subagent and all the other subagents
specified in the original request. The DPI COMMIT tells the subagent that
the changes requested in the original request can be carried out.
If the subagent encounters an error while processing the COMMIT request, it
creates a DPI RESPONSE packet indicating the error condition.
If there are no errors, the subagent creates a DPI RESPONSE.
• UNDO
The DPI UNDO is issued by the agent when it receives an error condition in
the DPI RESPONSE packet from that subagent or from any other subagent
involved in the original request.
If the subagent encounters an error while performing the UNDO request, the
subagent creates a DPI RESPONSE indicating the error condition.
If there are no errors, the subagent creates a DPI RESPONSE.
• UNREGISTER
A subagent may unregister a previously registered subtree. Going through
the DPI REGISTER request explained in 7.4.3, “SNMP Subagent Initiated DPI
Requests” on page 103 will help you understand the DPI UNREGISTER
request.
A subagent may receive a DPI UNREGISTER packet from the agent. The
following are some reasons this may happen:
The agent is terminating.
A prior DPI packet that the agent sent to the subagent did not get a
response in time, so the agent is unregistering the subagent.
If an SNMP manager sets a subagent MIB OID for this subagent′ s
subtree to invalid (refer to 9.3, “SNMP Subagent MIB” on page 158 for
more information on the subagent MIB) the agent will unregister the
subagent.
For more information on DPI UNREGISTER requests originated by the
subagent, refer to 7.4.3, “SNMP Subagent Initiated DPI Requests” on
page 103.
• CLOSE
A subagent will receive a DPI CLOSE packet from the agent whenever the
following occur:
The DPI OPEN request receives an error.
The mkDPIregister() API is the one that generates the DPI REGISTER packet
that is then sent to the agent.
• UNREGISTER
A subagent may unregistered a previously registered subtree.
Some of the reasons a subagent may want to unregister a previously
registered subtree are:
If the subagent is a proxy agent for yet another program which is no
longer running, to prevent unnecessary traffic the subagent unregisters
it.
To change a registration parameter such as timeout, priority. (the
subagent will unregister and then register again with new values)
Although the mkDPIclose() API implicitly unregisters the subtree, the DPI
UNREGISTER packet can be sent before a DPI CLOSE packet.
Once a subagent has sent a DPI UNREGISTER packet to the agent, it should
expect a DPI RESPONSE packet that informs the subagent about the result of
the request. The packet ID of the RESPONSE packet should be the same as
that of the UNREGISTER packet to which the RESPONSE packet is the reply.
• TRAP
A subagent can request that the SNMP agent generates a trap for it. The
subagent must provide the desired values for the generic and specific
parameters of the trap. It may optionally provide one or more OID, type,
length, or value parameters that will be included in the trap packet.
It may optionally specify an Enterprise ID for the trap to be generated.
The mkDPItrap() API generates the DPI TRAP packet that is then sent to the
agent.
The DPI DISCONNECT request is the logical opposite of the connect function
and is the very last subagent API that is used. It ends or closes the logical
connection between the SNMP agent and subagent.
The disconnectSNMP() API is the one that ends the logical connection
between the subagent and the SNMP agent.
• WAIT
The main purpose for which an SNMP subagent is developed is to provide
additional MIB groups to SNMP manager applications. Therefore, an SNMP
subagent spends most of its time waiting for (and processing) requests that
an SNMP manager has sent to the local SNMP agent.
When a request arrives from the SNMP agent the waitDPIpacket() API will
receive it, verify that it is from the SNMP agent, and if not return it to the
caller. The DPI packet is then parsed using the pDPIpacket() API so that its
content is available.
The waitDPIpacket() API completely handles the subagent′s data queue,
logically doing these steps:
1. Check data queue for incoming messages.
2. When data queue has a message, receive it.
3. Check the message; if it is not from the SNMP agent, return it to the
caller.
4. If the message is from the SNMP agent, copy the DPI packet to the
subagent buffer.
• RECEIVE
The DPI RECEIVE is an alternative way of getting a response and work from
the SNMP agent.
The receiveDPIpacket() API is used to receive responses and work from an
SNMP agent. The difference between the DPI WAIT and the DPI RECEIVE is
that the DPI RECEIVE packet only verifies if the message is from the SNMP
agent and then copies the DPI packet to the buffer. In the case where a DPI
RECEIVE is being used, the subagent application must continuously check
the data queue. When there is a message on the queue, receive it, and
check if the message is from the SNMP agent. If not, return it to caller.
After all these steps have been done, the receiveDPIpacket() API can be
used to process the DPI RECEIVE packet.
• SEND
The DPI SEND packet is used to send any type of DPI packet the subagent
wants to send to the SNMP agent.
The sendDPIpacket() API is the one that sends a copy of the DPI packet to
the SNMP agent (on the same AS/400 as the subagent).
an SNMP MIB group for an RPG or SQL application may be defined, and then
SNMP protocol data units (PDUs) may be used, such as get and set, to
determine status information or to make changes in control variables.
The Distributed Protocol Interface (DPI) is an extension to the SNMP agent that
permits users to dynamically add, delete or replace management variables in
the local MIB without requiring recompilation of the SNMP agent.
Note:
• These functions use header (include) files from the library QSYSINC, which is
optionally installable. QSYSINC is provided with OS/400 (5763-SS1) option 13
(Openness Includes). Make sure QSYSINC is installed on your system
before using any of the functions. All of the SNMP subagent APIs use
header file qtossapi.h. You can see this in source file H, member
QTOSSAPI, in library QSYSINC.
• Programs using the SNMP subagent API must be written in the C language.
ILE C/400 can be used to compile the program with the Create C Module
( CRTCMOD) CL command. After the *MOD object is created, specify
DNDSVRPGM(QTOSSAPI) in the Create Program ( CRTPGM) CL command. For
/* ------------prototypes-------------------------------
*/
static int init_subagent(void),
do_open(void),
do_register(int, char *, int),
do_trap(void),
handle_get(snmp_dpi_hdr *,snmp_dpi_get_packet *),
handle_set(snmp_dpi_hdr *,snmp_dpi_set_packet *),
handle_commit(snmp_dpi_hdr *,snmp_dpi_set_packet *),
handle_undo(snmp_dpi_hdr *,snmp_dpi_set_packet *),
handle_next(snmp_dpi_hdr *,snmp_dpi_next_packet *),
handle_unreg(snmp_dpi_hdr *,snmp_dpi_ureg_packet *),
handle_close(snmp_dpi_hdr *,snmp_dpi_close_packet *),
handle_resp(snmp_dpi_hdr *,snmp_dpi_resp_packet *),
handle_expected_response( int sent_packet_type ),
do_ayt(void),
register_sa(void);
/*********************************************************************/
/* This SAsample′ s OBJECT IDENTIFIERS */
/*********************************************************************/
#define DPI_SIMPLE_INTEGER ″1.0″
#define DPI_SIMPLE_STRING ″2.0″
#define DPI_SIMPLE_OID ″3.0″
#define DPI_SIMPLE_NULL ″4.0″
#define DPI_SIMPLE_IPADDRESS ″5.0″
#define DPI_SIMPLE_COUNTER ″6.0″
#define DPI_SIMPLE_GAUGE ″7.0″ /* dpiSimpleGuage.0 */
#define DPI_SIMPLE_TIMETICKS ″8.0″ /* dpiSimpleTimeticks.0 */
#define DPI_SIMPLE_OPAQUE ″9.0″ /* dpiSimpleOpaque.0 */
/* Integer32 (1.0) */
#define value1 cur_val1
static long int cur_val1 = 1;
static long int new_val1 = 0;
static long int old_val1 = 0;
/* Oid (3.0) */
#define value3_p cur_val3_p
/* Null (4.0) */
#define value4_p cur_val4_p
static char *cur_val4_p = (char *)0;
static char *new_val4_p = (char *)0;
static char *old_val4_p = (char *)0;
/* Ipaddress (5.0) */
#define value5 cur_val5
static unsigned long cur_val5 = 5;
static unsigned long new_val5 = 0;
static unsigned long old_val5 = 0;
/* Counter (6.0) */
#define value6 cur_val6
static unsigned long cur_val6 = 6;
static unsigned long new_val6 = 0;
static unsigned long old_val6 = 0;
/* Gauge (7.0) */
#define value7 cur_val7
static unsigned long cur_val7 = 7;
static unsigned long new_val7 = 0;
static unsigned long old_val7 = 0;
/* Timeticks (8.0) */
#define value8 cur_val8
static unsigned long cur_val8 = 8;
static unsigned long new_val8 = 0;
static unsigned long old_val8 = 0;
/* Opaque (9.0) */
#define value9_p cur_val9_p
static char *cur_val9_p = ″ ) *(@\00#$H\0VOI\n{R%}w04t0″ ;
static char *new_val9_p = (char *)0;
static char *old_val9_p = (char *)0;
enum { Off, On };
static char
msg_area[max_msg_len],
*this_sa_oid = Defaultoid,
*this_sa_subtree = DPI_SIMPLE_MIB,
*this_sa_desc = ″ SAsample DPI subagent description″ ,
*exp_r_buf_p = msg_area;
/*--------------------------------------------------------------------
|
| Name: main for a SAsample DPI subagent
|
| (exception handling has been omitted for simplicity)
|
--------------------------------------------------------------------*/
void main( int argc, char *argv[]) {
int i, j, rc,
trap_flag,
num_msgs_in = 0;
long int respcode;
char *cp1;
snmp_dpi_hdr *dpiheader,
*hdr_p;
init_subagent();
debugDPI(dpitracelevel); /* turn on DPI debugging */
/*--------------------------------------------------------------
first, connect to the local SNMP agent
*/
rc = connectSNMP( This_sa_qname, This_sa_libname, 35 );
if (rc != snmpsa_RC_ok ) {
/* handle exceptions */
return;
}
/*---------------------------------------------------------------
do DPI open
*/
rc = do_open();
if ( rc != snmpsa_RC_ok ) { /* handle exception */ return; }
/*---------------------------------------------------------------
do DPI register of subtree′ s
*/
if ( (rc = do_register( this_sa_register_timeout, this_sa_subtree, 0 ))
!= 0) return;
/*--------------------------------------------------------------
subagent′ s working loop
*/
for (;;) {
if ((rc=waitDPIpacket( this_sa_timeout,
msg_area,
&rcvd_msglen )) == SNMP_ERROR_DPI_noError ) {
/*-----------------------------------------------------------
got a DPI packet ok ... lets process it based on type
of DPI packet
*/
switch(hdr_p->packet_type) { /* handle by DPI type */
case SNMP_DPI_GET:
rc = handle_get(hdr_p, hdr_p->data_u.get_p);
break;
case SNMP_DPI_GETNEXT:
rc = handle_next(hdr_p, hdr_p->data_u.next_p);
break;
case SNMP_DPI_SET:
rc = handle_set(hdr_p, hdr_p->data_u.set_p);
break;
case SNMP_DPI_COMMIT:
rc = handle_commit(hdr_p, hdr_p->data_u.set_p);
break;
case SNMP_DPI_UNDO:
rc = handle_undo(hdr_p, hdr_p->data_u.set_p);
break;
case SNMP_DPI_CLOSE:
rc = handle_close(hdr_p, hdr_p->data_u.close_p);
break;
case SNMP_DPI_UNREGISTER:
rc = handle_unreg(hdr_p, hdr_p->data_u.ureg_p);
break;
case SNMP_DPI_RESPONSE:
rc = handle_resp(hdr_p, hdr_p->data_u.resp_p);
break;
default:
printf(″ Unexpected DPI packet type %d\n″ ,
hdr_p->packet_type);
rc = -1;
} /* endswitch */
if (rc!=0) {
/* decide what to do -- maybe should end this
subagent
*/
printf(″ subagent function %d returned %d\n″ ,
hdr_p->packet_type, rc );
return;
}
} /* waitDPIpacket() was ok*/
/*-----------------------------------------------------------
here if some problem occurred with waitDPIpacket()
*/
else {
/* handle exception */
}
} /* for(ever loop) */
} /* SAsample main() */
/* ----------------------
-------------------- ---------------------------
-------------------- other routines ---------------------------
-------------------- ---------------------------
----------------------
*/
/*-----------------------------------------------------------------------
*/
int init_subagent() {
int rc;
char *cmd =
″ CRTDTAQ DTAQ(″ This_sa_libname ″ / ″ This_sa_qname ″) MAXLEN(80) SEQ(*FIFO)″ ;
/*-----------------------------------------------------------------------
*/
void delete_DTAQ() {
system(″ DLTDTAQ DTAQ(SATEST/SATEST_Q)″ ) ;
return;
}
/*---------------------------------------------------------------------
do the open
*/
int do_open(void) {
snmp_dpi_hdr *hdr_p;
/* send open */
if ((rc = sendDPIpacket(openpacket,DPI_PACKET_LEN(openpacket)))
!=snmpsa_RC_ok) {
return 2;
}
/*---------------------------------------------------------------------
*/
static int do_register(int timeout, char *subtree_root, int garbflag ) {
unsigned char *packet_p;
int rc, len, i;
unsigned long length;
snmp_dpi_hdr *hdr_p;
char *c_p;
if (!packet_p) { return 1; }
/* send it */
if ((rc = sendDPIpacket(packet_p,DPI_PACKET_LEN(packet_p)))
!=snmpsa_RC_ok) {
return 2;
}
/*---------------------------------------------------------------------
send an Are_You_There packet
*/
static int do_ayt(void) {
unsigned char *packet_p;
int rc;
unsigned long length;
snmp_dpi_hdr *hdr_p;
packet_p = mkDPIayt();
if ((rc=sendDPIpacket(packet_p,DPI_PACKET_LEN(packet_p)))
!=snmpsa_RC_ok) {
/* msg */
return rc;
}
/*-------------------------------------------------------------
handle a response DPI packet that is expected back due to
some subagent-initiated DPI packet
*/
int handle_expected_response( int sent_packet_type ) {
int rc, len, i;
unsigned long length;
snmp_dpi_hdr *hdr_p;
/* see what the SNMP agent has to say back (if anything) */
rc = waitDPIpacket( this_sa_timeout, exp_r_buf_p, &length );
if (rc == snmpsa_RC_timedout ) {
/* msg */
return -2;
}
if (rc != SNMP_ERROR_DPI_noError) {
/* msg */
return -3;
}
if (hdr_p->packet_type != SNMP_DPI_RESPONSE) {
/* msg */
return -5;
}
rc = hdr_p->data_u.resp_p->error_code;
if (rc != SNMP_ERROR_DPI_noError) {
return -6;
}
return snmpsa_RC_ok;
}
/*---------------------------------------------------------------------
|
|
| following routines adapted from dpi_sample.c
|
|
*/
/*********************************************************************/
/* Processing a GET request */
/*********************************************************************/
/* */
/* A get request is pretty easy to process. When the DPI packet is */
/* parsed, the snmp_dpi_hdr structure will show in the packet_type */
/* that this is a SNMP_DPI_GET packet. In that case, the data_u field*/
/* contains a ptr to a GET-varBind, which is represented in an */
/* snmp_dpi_get_packet structure: */
/* */
/* struct dpi_get_packet { */
/* char *object_p; / * ptr to OIDstring */
/* char *group_p; / * ptr to subtree */
/* char *instance_p; / * ptr to rest of OID */
/* struct dpi_get_packet *next_p; / * ptr to next in chain */
/* }; */
/* typedef struct dpi_get_packet snmp_dpi_get_packet; */
/* #define snmp_dpi_get_packet_NULL_p ((snmp_dpi_get_packet *)0) */
/* */
/* So, assuming we have registered example subtree dpiSimpleMIB */
/* and a GET request comes in for one variable dpiSimpleInteger.0 */
/* (so that is object 1 instance 0 in our subtree), then the fields */
/* in the snmp_dpi_get_packet would have ptrs that point to: */
/* */
/* object_p -> ″ 1 . 3 . 6 . 1 . 4 . 1 . 2 . 2 . 1 . 5 . 1 . 0 ″ */
/* group_p -> ″ 1 . 3 . 6 . 1 . 4 . 1 . 2 . 2 . 1 . 5 ″ */
/* instance_p -> ″1.0″ */
/* next_p -> snmp_dpi_get_packet_NULL_p */
/* */
/* If there are multiple varBinds in a GET request, then each one */
/* is represented in a snmp_dpi_get_packet structure and all the */
/* snmp_dpi_get_packet structures are chained via the next ptr. */
/* As long as the next ptr is not the snmp_dpi_get_packet_NULL_p */
/* pointer then there are more varBinds in the list. */
/* */
/* Now we can analyze the varBind structure for whatever checking we */
/* want to do. Once we are ready to make a response that contains */
/* the value of the variable, then we first prepare a SET-varBind */
/* which is represented in an snmp_dpi_set_packet structure: */
/* */
/* struct dpi_set_packet { */
/* char *object_p; / * ptr to OIDstring */
/* char *group_p; / * ptr to subtree */
/* char *instance_p; / * ptr to rest of OID */
/* unsigned char value_type; / * SNMP_TYPE_xxxx */
/* unsigned short value_len; / * value length */
/* char *value_p; / * ptr to value itself */
/* struct dpi_set_packet *next_p; / * ptr to next in chain */
/* }; */
/* typedef struct dpi_set_packet snmp_dpi_set_packet; */
/* #define snmp_dpi_set_packet_NULL_p ((snmp_dpi_set_packet *)0) */
/* */
/* We can use the mkDPIset() function to prepare such a structure. */
/* This function expects the following arguments: */
/* - A ptr to an existing snmp_dpi_set_packet structure if the new */
/* varBind must be added to an existing chain of varBinds. */
/* If this is the first (or the only) varBind in the chain, then */
/* pass the snmp_dpi_set_packet_NULL_p ptr to indicate this. */
/* - a ptr to the subtree that we registered. */
/* - a ptr to the rest of the OID, in other words the piece that */
/* follows the subtree. */
/* - the value type of the value to be bound to the variable name. */
/* This is must be one of the SNMP_TYPE_xxx values as defined in */
/* the snmp_dpi.h include file. */
/* - the length of the value (for integer type values this must be */
/* a length of 4. So we always work with 32-bit signed or */
/* unsigned integers (except of course for the Counter64 type, */
/* for those we must point to a snmp_dpi_u64 structure and pass */
/* the length of that structure). */
/* - a ptr to the value. */
/* Memory for the varBind is dynamically allocated and the data */
/* itself is copied. So upon return we can dispose of our own ptrs */
/* and allocated memory as we please. If the call is successful, */
/* then a ptr is returned: */
if (hdr_p == snmp_dpi_hdr_NULL_p ) {
return(-1);
}
if (pack_p == snmp_dpi_get_packet_NULL_p ) {
return(-2);
}
/*---------------------------------------------------------------
| must handle multi-varbinds!!
*/
do {
if (pack_p->instance_p &&
(strcmp(pack_p->instance_p,″1.0″) == 0))
{
varBind_p = mkDPIset( /* Make DPI set packet */
varBind_p, /* ptr to varBind chain */
pack_p->group_p, /* ptr to subtree */
pack_p->instance_p, /* ptr to rest of OID */
SNMP_TYPE_Integer32, /* value type Integer 32 */
sizeof(value1), /* length of value */
&value1); /* ptr to value */
} /* endif */
/*--------------------------------------------------------------
*/
packet_p = mkDPIresponse( /* Make DPIresponse packet */
hdr_p, /* ptr parsed request */
SNMP_ERROR_noError, /* all is OK, no error */
0L, /* index is zero, no error */
varBind_p); /* varBind response data */
/*----------------------------------------------------------------
send it.
*/
if ((rc=sendDPIpacket(packet_p, DPI_PACKET_LEN(packet_p)))
!=snmpsa_RC_ok) {
printf(″ send of a response packet failed, rc=%d\n″ , rc);
}
return rc;
} /* handle_get() */
/*********************************************************************/
/* Processing a GETNEXT request */
/*********************************************************************/
/* */
/* A getnext request is more difficult to process. When a DPI packet */
/* is parsed, the snmp_dpi_hdr structure shows in the packet_type */
/* that this is a SNMP_DPI_GETNEXT packet, and so the data_u field */
/* contains a ptr to a GETNEXT-varBind, which is represented in an */
/* snmp_dpi_next_packet structure: */
/* */
/* struct dpi_next_packet { */
/* char *object_p; / * ptr to OIDstring */
/* char *group_p; / * ptr to subtree */
/* char *instance_p; / * ptr to rest of OID */
/* struct dpi_next_packet *next_p; / * ptr to next in chain */
/* }; */
/* typedef struct dpi_next_packet snmp_dpi_next_packet; */
/* #define snmp_dpi_next_packet_NULL_p ((snmp_dpi_next_packet *)0) */
/* */
/* So, assuming we have registered example subtree dpiSimpleMIB */
/* and a GETNEXT arrives for one variable dpiSimpleInteger.0 */
/* (so that is object 1 instance 0 in our subtree), then the fields */
/* in the snmp_dpi_get_packet structure would have ptrs pointing to: */
/* */
/* object_p -> ″ 1 . 3 . 6 . 1 . 4 . 1 . 2 . 2 . 1 . 5 . 1 . 0 ″ */
/* group_p -> ″ 1 . 3 . 6 . 1 . 4 . 1 . 2 . 2 . 1 . 5 ″ */
/* instance_p -> ″1.0″ */
/* next -> snmp_dpi_get_packet_NULL_p */
/* */
/* If there are multiple varBinds in a GETNEXT request, then each */
/* one is represented in a snmp_dpi_get_packet structure and all */
/* the snmp_dpi_get_packet structures are chained via the next ptr. */
/*---------------------------------------------------------------
| must handle multi-varbinds!!
*/
do {
switch (subid) {
case 1:
varBind_p = mkDPIset( /* Make DPI set packet */
varBind_p, /* ptr to varBind chain */
pack_p->group_p, /* ptr to subtree */
DPI_SIMPLE_INTEGER, /* ptr to rest of OID */
SNMP_TYPE_Integer32, /* value type Integer 32 */
sizeof(value1), /* length of value */
&value1); /* ptr to value */
break;
case 2:
varBind_p = mkDPIset( /* Make DPI set packet */
varBind_p, /* ptr to varBind chain */
pack_p->group_p, /* ptr to subtree */
DPI_SIMPLE_STRING, /* ptr to rest of OID */
SNMP_TYPE_DisplayString,/* value type */
strlen(value2_p),
value2_p); /* ptr to value */
break;
case 3:
varBind_p = mkDPIset( /* Make DPI set packet */
varBind_p, /* ptr to varBind chain */
pack_p->group_p, /* ptr to subtree */
DPI_SIMPLE_OID, /* ptr to rest of OID */
SNMP_TYPE_OBJECT_IDENTIFIER,/* value type */
strlen(value3_p),
value3_p); /* ptr to value */
break;
case 4:
varBind_p = mkDPIset( /* Make DPI set packet */
varBind_p, /* ptr to varBind chain */
default:
varBind_p = mkDPIset( /* Make DPI set packet */
varBind_p, /* ptr to varBind chain */
pack_p->group_p, /* ptr to subtree */
pack_p->instance_p, /* ptr to rest of OID */
SNMP_TYPE_endOfMibView, /* value type */
0L, /* length of value */
(unsigned char *)0); /* ptr to value */
break;
} /* endswitch */
it down.
*/
/*--------------------------------------------------------------
*/
if ((rc=sendDPIpacket(packet_p,DPI_PACKET_LEN(packet_p)))
!=snmpsa_RC_ok) {
printf(″ send failed in handle_next()\n″ ) ;
return rc;
}
return(rc);
} /* handle_next() */
/*********************************************************************/
/* Processing a SET/COMMIT/UNDO request */
/*********************************************************************/
/* */
/* These 3 requests can come in one of these sequences: */
/* - SET, COMMIT */
/* - SET, UNDO */
/* - SET, COMMIT, UNDO */
/* Normal sequence is SET and then COMMIT. When we receive a SET */
/* request, we must make preparations to accept the new value */
/* like check that it is for an existing object and instance, check */
/* the value type and contents to be valid, allocate memory etc), */
/* but we must not yet effectuate the change. */
/* If all goes well, the next request we receive will be a COMMIT */
/* request. It is then that we must effectuate the change, but we */
/* must then also keep enough information such that we can UNDO */
/* the change later if we get a subsequent UNDO request. The latter */
/* may happen if the agent discovers any errors with other */
/* subagents while processing requests that belong to the same */
/* original SNMP SET packet (all the varBinds in the same SNMP */
/* request PDU must be processed ″ as if atomic″ ) . */
/* */
/* When the DPI packet is parsed, the snmp_dpi_hdr structure shows */
/* in the packet_type that this is an SNMP_DPI_SET, SNMP_DPI_COMMIT */
/* SNMP_DPI_UNDO packet. In that case, the data_u field contains a */
/* ptr to a SET-varBind, represented in an snmp_dpi_get_packet */
/* structure (COMMIT and UNDO have same varBind data as SET upon */
/* which they follow): */
/* */
/* struct dpi_set_packet { */
/* char *object_p; / * ptr to OIDstring */
/* char *group_p; / * ptr to subtree */
/* char *instance_p; / * ptr to rest of OID */
/* unsigned char value_type; / * SNMP_TYPE_xxxx */
/* unsigned short value_len; / * value length */
/* char *value_p; / * ptr to value itself */
/* struct dpi_set_packet *next_p; / * ptr to next in chain */
/* }; */
/* typedef struct dpi_set_packet snmp_dpi_set_packet; */
/* #define snmp_dpi_set_packet_NULL_p ((snmp_dpi_set_packet *)0) */
/* */
/* So, assuming we have registered example subtree dpiSimpleMIB */
/* and a GET request comes in for one variable dpiSimpleString.0 */
/* (so that is object 1 instance 0 in our subtree), and also */
/* assuming that the agent knows about our compiled dpiSimpleMIB */
/* so that it knows this is a DisplayString as opposed to just an */
/* arbitrary OCTET_STRING, then the ptrs in the snmp_dpi_set_packet */
/* structure would have ptrs and values like: */
/* */
/* object_p -> ″ 1 . 3 . 6 . 1 . 4 . 1 . 2 . 2 . 1 . 5 . 2 . 0 ″ */
/* group_p -> ″ 1 . 3 . 6 . 1 . 4 . 1 . 2 . 2 . 1 . 5 ″ */
/* instance_p -> ″2.0″ */
/* value_type -> SNMP_TYPE_DisplayString */
/* value_len -> 8 */
/*---------------------------------------------------------------
| must handle multi-varbinds!!
*/
do {
if (!pack_p->instance_p ||
(strcmp(pack_p->instance_p,″ 1 . 0 ″ ) != 0 &&
strcmp(pack_p->instance_p,″ 2 . 0 ″ ) != 0 &&
strcmp(pack_p->instance_p,″ 3 . 0 ″ ) != 0 &&
strcmp(pack_p->instance_p,″ 4 . 0 ″ ) != 0 &&
strcmp(pack_p->instance_p,″ 5 . 0 ″ ) != 0 &&
strcmp(pack_p->instance_p,″ 6 . 0 ″ ) != 0 &&
strcmp(pack_p->instance_p,″ 7 . 0 ″ ) != 0 &&
strcmp(pack_p->instance_p,″ 8 . 0 ″ ) != 0 &&
strcmp(pack_p->instance_p,″ 9 . 0 ″ ) != 0 ))
{
if (pack_p->instance_p &&
(strncmp(pack_p->instance_p,″1.″,2) == 0))
{
error = SNMP_ERROR_notWritable;
} else if (pack_p->instance_p &&
(strncmp(pack_p->instance_p,″2.″,2) == 0))
{
error = SNMP_ERROR_notWritable;
} else if (pack_p->instance_p &&
(strncmp(pack_p->instance_p,″3.″,2) == 0))
{
error = SNMP_ERROR_notWritable;
} else if (pack_p->instance_p &&
(strncmp(pack_p->instance_p,″4.″,2) == 0)) {
error = SNMP_ERROR_notWritable;
}
else if (pack_p->instance_p &&
(strncmp(pack_p->instance_p,″5.″,2) == 0)) {
error = SNMP_ERROR_notWritable;
}
else if (pack_p->instance_p &&
(strncmp(pack_p->instance_p,″6.″,2) == 0)) {
error = SNMP_ERROR_notWritable;
}
else if (pack_p->instance_p &&
(strncmp(pack_p->instance_p,″7.″,2) == 0)) {
error = SNMP_ERROR_notWritable;
}
else if (pack_p->instance_p &&
(strncmp(pack_p->instance_p,″8.″,2) == 0)) {
error = SNMP_ERROR_notWritable;
}
else if (pack_p->instance_p &&
(strncmp(pack_p->instance_p,″9.″,2) == 0)) {
error = SNMP_ERROR_notWritable;
}
else if (pack_p->instance_p &&
(strncmp(pack_p->instance_p,″10.″,2) == 0)) {
error = SNMP_ERROR_notWritable;
}
else {
error = SNMP_ERROR_noCreation;
} /* endif */
if (!packet_p) return(-1);
if ((rc=sendDPIpacket(packet_p,DPI_PACKET_LEN(packet_p)))
!=snmpsa_RC_ok) {
/* msg */
return rc;
}
return(rc);
} /* if checking for *.0 */
/*------------------------------------------------------------------
here if things still look ok for set
*/
if (strcmp(pack_p->instance_p,″ 1 . 0 ″ ) == 0 ) {
memcpy(&new_val1,pack_p->value_p,pack_p->value_len);
}
else if (strcmp(pack_p->instance_p,″ 2 . 0 ″ ) == 0 ) {
if (new_val2_p) free(new_val2_p);
if (old_val2_p) free(old_val2_p);
new_val2_p = (char*) malloc(pack_p->value_len);
/* new value to set */
if (new_val2_p) {
/* If success, then also */
memcpy((char*)new_val2_p, /* copy new value to our */
pack_p->value_p, /* own and newly allocated */
pack_p->value_len); /* memory area. */
}
else { /* Else failed to malloc, */
error = SNMP_ERROR_genErr; /* so that is a genErr */
index = 1; /* at first varBind */
}
}
else if (strcmp(pack_p->instance_p,″ 3 . 0 ″ ) == 0 ) {
if (new_val3_p) free(new_val3_p);
if (old_val3_p) free(old_val3_p);
new_val3_p = (char*)
malloc(pack_p->value_len);
if (new_val3_p) {
memcpy(new_val3_p,
pack_p->value_p,
pack_p->value_len);
}
else {
error = SNMP_ERROR_genErr;
index = 1;
}
}
else if (strcmp(pack_p->instance_p,″ 4 . 0 ″ ) == 0 ) {
else {
error = SNMP_ERROR_noCreation;
index = 0;
}
/*---------------------------------------------------------------
make and send normal response
*/
packet_p = mkDPIresponse( hdr_p, error, index, varBind_p );
if ((rc = sendDPIpacket(packet_p,DPI_PACKET_LEN(packet_p)))
!= snmpsa_RC_ok) {
/* msg */
return rc;
}
return(rc);
} /* handle_set() */
/*------------------------------------------------------------------------
*/
static int handle_commit(snmp_dpi_hdr *hdr_p,
snmp_dpi_set_packet *pack_p) {
snmp_dpi_set_packet *varBind_p;
varBind_p = snmp_dpi_set_packet_NULL_p;
/*---------------------------------------------------------------
| loop to handle multi-varbinds
*/
do {
if (strcmp(pack_p->instance_p,″ 1 . 0 ″ ) == 0 ) {
old_val1 = cur_val1;
cur_val1 = new_val1;
new_val1 = 0;
}
else if (strcmp(pack_p->instance_p,″ 2 . 0 ″ ) == 0 ) {
old_val2_p = cur_val2_p; /* save old value for undo */
cur_val2_p = new_val2_p; /* make new value current */
else {
error = SNMP_ERROR_noCreation;
index = 0;
}
/*---------------------------------------------------------------
make and send normal response
*/
packet_p = mkDPIresponse( hdr_p, error, index, varBind_p );
if (!packet_p) return(-1); /* If it failed, return */
if ((rc=sendDPIpacket(packet_p,DPI_PACKET_LEN(packet_p)))
!=snmpsa_RC_ok) {
/* msg */
return rc;
}
if ((rc=sendDPIpacket( packet_p,DPI_PACKET_LEN(packet_p)))
!=snmpsa_RC_ok) {
/* msg */
return rc;
}
return(rc);
} /*handle_commit()*/
/*------------------------------------------------------------------------
*/
static int handle_undo(snmp_dpi_hdr *hdr_p,
snmp_dpi_set_packet *pack_p) {
varBind_p = snmp_dpi_set_packet_NULL_p;
/*---------------------------------------------------------------
| must handle multi-varbinds!!
*/
do {
if (strcmp(pack_p->instance_p,″ 1 . 0 ″ ) == 0 ) {
cur_val1 = old_val1;
}
else if (strcmp(pack_p->instance_p,″ 2 . 0 ″ ) == 0 ) {
if (new_val2_p) free(new_val2_p); /* free allocated memory */
cur_val2_p = old_val2_p; /* reset to old value */
}
else if (strcmp(pack_p->instance_p,″ 3 . 0 ″ ) == 0 ) {
if (new_val3_p) free(new_val3_p); /* free allocated memory */
cur_val2_p = old_val2_p; /* reset to old value */
}
else if (strcmp(pack_p->instance_p,″ 4 . 0 ″ ) == 0 ) {
/* null oid */
}
else if (strcmp(pack_p->instance_p,″ 5 . 0 ″ ) == 0 ) {
cur_val5 = old_val5;
}
else if (strcmp(pack_p->instance_p,″ 6 . 0 ″ ) == 0 ) {
cur_val6 = old_val6;
}
else if (strcmp(pack_p->instance_p,″ 7 . 0 ″ ) == 0 ) {
cur_val7 = old_val7;
}
else if (strcmp(pack_p->instance_p,″ 8 . 0 ″ ) == 0 ) {
cur_val8 = old_val8;
}
else if (strcmp(pack_p->instance_p,″ 9 . 0 ″ ) == 0 ) {
if (new_val9_p) free(new_val9_p); /* free allocated memory */
cur_val9_p = old_val9_p; /* reset to old value */
}
else {
error = SNMP_ERROR_noCreation;
index = 0;
}
if ((rc=sendDPIpacket(packet_p,DPI_PACKET_LEN(packet_p)))
!=snmpsa_RC_ok) {
/* msg */
return rc;
}
return(rc);
} /*handle_undo()*/
/*********************************************************************/
/* Function to handle a DPI UNREGISTER request */
/*********************************************************************/
/* An agent can send an UNREGISTER packet if some other subagent does*/
/* a register for the same subtree at a higher priority. In this case*/
/* we can decide to keep the connection open, we may regain control */
/* over the subtree if that higher priority registration goes away. */
/* An agent can also send an UNREGISTER if for instance an SNMP */
/* manager tells it to ″ invalidate″ the subagent connection or the */
/* registered subtree. In this case we decide to give up. */
/* */
/* Here is a very simple sample piece of code to handle such a packet*/
/*********************************************************************/
static int handle_unreg( snmp_dpi_hdr *hdr_p,
snmp_dpi_ureg_packet *pack_p) {
/* msg */
if (pack_p->reason_code ==
SNMP_UNREGISTER_higherPriorityRegistered) {
return(0); /* keep waiting, we may regain subtree later */
}
/*********************************************************************/
/* Function to handle a DPI CLOSE request */
/*********************************************************************/
/* An agent can send a CLOSE packet if it encounters an error or for */
/* some other reason. It can also do so if an SNMP MANAGER tells it */
/* to ″ invalidate″ the subagent connection. */
/* */
/* Here is a very simple sample piece of code to handle such a packet*/
/*********************************************************************/
static int handle_close(snmp_dpi_hdr *hdr_p,
snmp_dpi_close_packet *pack_p){
/* msg */
return(-1); /* causes exit in main loop */
} /* handle_close() */
/*------------------------------------------------------------------------
*/
static int handle_resp(snmp_dpi_hdr *hdr_p, snmp_dpi_resp_packet *pack_p)
{
/* msg */
return(0);
} /* handle_resp() */
This chapter describes some AS/400 functions and applications which use the
SNMP support provided by OS/400.
The client system does not necessarily have to be a Client Access/400 Optimized
for OS/2 system. Any client system that supports SNMP with automatic
discovery can be managed. To provide as much information as possible, the
client should support MIB II, the host resources MIB, APPN MIB and DMI MIB.
Traps received by an AS/400 system are processed differently for new clients
(clients that have not been connected to the AS/400 before) than traps received
for existing clients. Traps received from a new client are processed immediately
and the client′s information is retrieved and stored in the AS/400 databases. For
traps received from existing clients, hardware and software information is
refreshed only if it is more than 30 days old. 30 days is the default value. The
default value can be changed to any value between 1 and 365 days. Any other
value will default to 30 days. A data area QZCAREFI in library QUSRSYS should
be created to change the refresh interval. For example:
CRTDTAARA DTAARA(QUSRSYS/QZCAREFI)
TYPE(*DEC) LEN(2 0) VALUE(75)
TEXT(′ Refresh Interval′ )
This example sets the refresh interval at 75 days. The data area must be of type
decimal (integer value). Using this example, a refresh interval of 75 days is used
for all clients that the AS/400 system is managing.
To change the refresh interval to a three digit value having created a data area
with a two digit value, you must first delete the existing data area and then
create a new one specifying a three digit value.
For more details about this task refer to Inside Client Access/400 Optimized for
OS/2 , SG24-2587.
Figure 85 shows how the Client Management MIB can be used via an SNMP
manager to retrieve information from the client management database on the
AS/400. The client management database information having previously been
retrieved from the managed clients via the Host Resources MIB supported by
Client Access/400 Optimized for OS/2 and other PC SNMP agent
implementations. The figure also shows how traps received from the managed
clients can either be handled locally or forwarded to an SNMP manager via the
forward trap (*YES) STRTRPMGR command option.
The format of each of the Client Management databases are presented in the
following sections.
8.1.1.1 QAZCADEV
*** Start of specifications **********************************
*
* File Name: qazcadev
* File Type: physical
*
* Function: Database file where the client device
* information is maintained. The data is obtained
* from the HOST MIB.
*
* ZCAIDX --> Client Index
* ZCADEV --> Device Index
* ZCATYP --> Device Type
* ZCADID --> Device ID
* ZCASTT --> Device Status
* ZCAERR --> Device Errors
* ZCADSC --> Device Description
*
*** End of Specifications ***********************************
UNIQUE
R QZCADEVR
ZCAIDX 12H
ZCADEV 9B
ZCATYP 9B
ZCADID 128A VARLEN(128)
ZCASTT 9B
ZCAERR 9B
ZCADSC 64A VARLEN(64)
K ZCAIDX
K ZCADEV
8.1.1.2 QAZCADIR
*** Start of specifications **********************************
*
* File Name: qazcadir
* File Type: physical
*
* Function: Database file where the basic client directory
* information is maintained.
*
* ZCBIDX --> Client Index
* ZCBCLT --> Client ID
* ZCBDSC --> Client Description
* ZCBCMN --> Community
* ZCBIPA --> IP Address
* ZCBCPN --> CP NetID
*
*** End of Specifications ***********************************
UNIQUE
R QZCADIRR
ZCBIDX 12H
ZCBCLT 255A VARLEN(255)
ZCBDSC 255A VARLEN(255)
ZCBCMN 255A VARLEN(255)
ZCBIPA 15A VARLEN(15)
ZCBCPN 17A VARLEN(17)
K ZCBIDX
8.1.1.3 QAZCADRL
*** Start of specifications **********************************
*
* File Name: qazcadrl
* File Type: logical
*
* Function: Database file where the basic client directory
* information is maintained
*
* ZCBIDX --> Client index
* ZCBCLT --> Client ID
* ZCBDSC --> Client Description
* ZCBCMN --> Community
* ZCBIPA --> IP Address
* ZCBCPN --> CP NetID
*
*** End of Specifications ***********************************
UNIQUE
R QZCADRLR PFILE(QSYS/QAZCADIR)
ZCBCLT 255A VARLEN
ZCBIDX 12H
8.1.1.4 QAZCADSK
*** Start of specifications **********************************
*
* File Name: qazcadsk
* File Type: physical
*
* Function: Database file where the client disk storage
* information is maintained. The data is obtained
* from the HOST MIB.
*
* ZCCIDX --> Client Index
* ZCCDEV --> Device Index
* ZCCACC --> Disk Access
* ZCCMED --> Disk Media
* ZCCRMV --> Disk Media Remove
* ZCCCAP --> Disk Capacity
*
*** End of Specifications ***********************************
UNIQUE
R QZCADSKR
ZCCIDX 12H
ZCCDEV 9B
ZCCACC 9B
ZCCMED 9B
ZCCRMV 9B
ZCCCAP 9B
K ZCCIDX
K ZCCDEV
8.1.1.5 QAZCAFS
*** Start of specifications **********************************
*
* File Name: qazcafs
* File Type: physical
*
* Function: Database file where the client file system
* information is maintained. The data is obtained
* from the HOST MIB.
*
* ZCDIDX --> Client Index
* ZCDFS --> File System Index
* ZCDLMP --> Mount Point
* ZCDRMP --> Remote Mount
* ZCDTYP --> Type
* ZCDACC --> Access
* ZCDBOT --> Bootable
* ZCDSTG --> Storage Index
* ZCDFBK --> Full Backup
* ZCDPBK --> Partial Backup
*
*** End of Specifications ***********************************
UNIQUE
R QZCAFSR
ZCDIDX 12H
ZCDFS 9B
ZCDLMP 128A VARLEN(128)
ZCDRMP 128A VARLEN(128)
ZCDTYP 9B
ZCDACC 9B
ZCDBOT 9B
ZCDSTG 9B
ZCDFBK Z
ZCDPBK Z
K ZCDIDX
K ZCDFS
8.1.1.6 QAZCAMSC
*** Start of specifications **********************************
*
* File Name: qazcamsc
* File Type: physical
*
* Function: Database file where the basic client directory
* information is maintained
*
* ZCBIDX --> Client Index
* ZCBMEM --> Memory size
* ZCBUPT --> Up Time
* ZCBSTT --> System Status
* ZCBMBI --> Support MIBII
* ZCBMBH --> Support HOST MIB
* ZCBMBA --> Support APPN MIB
* ZCBMBX --> Support Extensions
* ZCBHDW --> Hardware Refresh
* ZCBSFW --> Software Refresh
* ZCBCON --> Contact
* ZCBLOC --> Location
* ZCBTYP --> Machine Type
* ZCBMDL --> Machine Model
* ZCBUSR --> User Profile
* ZCBOWN --> Owner
* ZCBPHN --> Owner Phone
* ZCBOFC --> Office
*
*** End of Specifications ***********************************
UNIQUE
R QZCAMSCR
ZCBIDX 12H
ZCBMEM 9B
ZCBUPT 9B
ZCBSTT 9B
ZCBMBI 9B
ZCBMBH 9B
ZCBMBA 9B
ZCBMBX 9B
ZCBHDW Z
ZCBSFW Z
ZCBCON 255A VARLEN(255)
ZCBLOC 255A VARLEN(255)
ZCBTYP 4A VARLEN(4)
ZCBMDL 3A VARLEN(3)
ZCBUSR 10A VARLEN(10)
ZCBOWN 32A VARLEN(32)
ZCBPHN 32A VARLEN(32)
ZCBOFC 32A VARLEN(32)
K ZCBIDX
8.1.1.7 QAZCANET
*** Start of specifications **********************************
*
* File Name: qazcanet
* File Type: physical
*
* Function: Database file where the client network
* information is maintained. The data is obtained
* from the HOST MIB.
*
* ZCEIDX --> Client Index
* ZCEDEV --> Device Index
* ZCENIF --> Network IFIndex
*
*** End of Specifications ***********************************
UNIQUE
R QZCANETR
ZCEIDX 12H
ZCEDEV 9B
ZCENIF 9B
K ZCEIDX
K ZCEDEV
8.1.1.8 QAZCAPRC
*** Start of specifications *********************************
*
* File Name: qazcaprc
* File Type: physical
*
* Function: Database file where the client processor
* information is maintained. The data is obtained
* from the HOST MIB.
*
* ZCFIDX --> Client Index
* ZCFDEV --> Device Index
* ZCFLOD --> Processor Load
* ZCFFRM --> Processor Licensed Internal Code
*
*** End of Specifications ***********************************
UNIQUE
R QZCAPRCR
ZCFIDX 12H
ZCFDEV 9B
ZCFLOD 9B
ZCFFRM 128A VARLEN(128)
K ZCFIDX
K ZCFDEV
8.1.1.9 QAZCAPRT
*** Start of specifications *********************************
*
* File Name: qazcaprt
* File Type: physical
*
* Function: Database file where the client printer
* information is maintained. The data is obtained
* from the HOST MIB.
*
* ZCGIDX --> Client Index
* ZCGDEV --> Device Index
* ZCGSTT --> Status
* ZCGERR --> Error State
*
*** End of Specifications ***********************************
UNIQUE
R QZCAPRTR
ZCGIDX 12H
ZCGDEV 9B
ZCGSTT 9B
ZCGERR 4H VARLEN(1)
K ZCGIDX
K ZCGDEV
8.1.1.10 QAZCAPTN
*** Start of specifications *********************************
*
* File Name: qazcaptn
* File Type: physical
*
* Function: Database file where the client storage partition
* information is maintained. The data is obtained
* from the HOST MIB.
*
* ZCHIDX --> Client Index
* ZCHDEV --> Device Index
* ZCHPTN --> Partition Index
* ZCHSIZ --> Size
* ZCHFSX --> FS Index
* ZCHLBL --> Label
* ZCHID --> Id
*
*** End of Specifications ***********************************
UNIQUE
R QZCAPTNR
ZCHIDX 12H
ZCHDEV 9B
ZCHPTN 9B
ZCHSIZ 9B
ZCHFSX 9B
ZCHLBL 128A VARLEN(128)
ZCHID 128H VARLEN(128)
K ZCHIDX
K ZCHDEV
K ZCHPTN
8.1.1.11 QAZCASFW
*** Start of specifications **********************************
*
* File Name: qazcasfw
* File Type: physical
*
* Function: Database file where the client software
* information is maintained. The data is obtained
* from the HOST MIB extensions.
*
* ZCJIDX --> Client Index
* ZCJSFW --> Software Index
* ZCJTYP --> Software Type
* ZCJSTT --> Software Status
* ZCJID --> Software Id
* ZCJVER --> Software Version
* ZCJOPT --> Software Option
* ZCJFTR --> Software Feature
* ZCJMNF --> Software Manufacture
* ZCJPTH --> Software Path
* ZCJDAT --> Software Date
* ZCJNAM --> Software Name
* ZCJSN --> Software SerialNumber
*
*** End of Specifications ***********************************
UNIQUE
R QZCASFWR
ZCJIDX 12H
ZCJSFW 9B
ZCJTYP 9B
ZCJSTT 9B
ZCJID 128A VARLEN(7)
ZCJVER 64A VARLEN(6)
ZCJOPT 16A VARLEN(4)
ZCJFTR 16A VARLEN(4)
ZCJMNF 64A VARLEN(32)
ZCJPTH 255A VARLEN(128)
ZCJDAT Z
ZCJNAM 64A VARLEN(32)
ZCJSN 64A VARLEN(32)
K ZCJIDX
K ZCJSFW
8.1.1.12 QAZCASFX
*** Start of specifications **********************************
*
* File Name: qazcasfx
* File Type: physical
*
* Function: Database file where the Client software fix
* information is maintained. The data is obtained
* from the HOST MIB extensions.
*
* ZCKIDX --> Client Index
* ZCKSFW --> Software Index
* ZCKSFX --> Software Fix Index
* ZCKFIX --> Software Fix Id
*
*** End of Specifications ***********************************
UNIQUE
R QZCASFXR
ZCKIDX 12H
ZCKSFW 9B
ZCKSFX 9B
ZCKFIX 16A VARLEN(7)
K ZCKIDX
K ZCKSFW
K ZCKFIX
8.1.1.13 QAZCASTG
*** Start of specifications *********************************
*
* File Name: qazcastg
* File Type: physical
*
* Function: Database file where the client storage
* information is maintained. The data is obtained
* from the HOST MIB.
*
* ZCIIDX --> Client index
* ZCISTG --> Storage index
* ZCITYP --> Type
* ZCIDSC --> Description
* ZCIALU --> Allocation Units
* ZCISIZ --> Size
* ZCIUSD --> Used
* ZCIALF --> Allocation Failure
*
*** End of Specifications ***********************************
UNIQUE
R QZCASTGR
ZCIIDX 12H
ZCISTG 9B
ZCITYP 9B
ZCIDSC 128A VARLEN(128)
ZCIALU 9B
ZCISIZ 9B
ZCIUSD 9B
ZCIALF 9B
K ZCIIDX
K ZCISTG
Figure 87 on page 136 and Figure 88 on page 137 show a Client Access/400
Optimized for OS/2 client′s information in two different Client Management
databases. The two example screens are for the QAZCADIR and QAZCAMSC
database files. Once the client′s information has been retrieved by the
managing AS/400 system, you can view the information in the databases by
running a simple AS/400 query command. For example, at the AS/400 command
line, type in the following command and press PF4 the Prompt key:
RUNQRY QRY(*NONE)
Once on the screen shown in Figure 86 on page 136, fill in the File, and Library
(QUSRSYS) fields under Query file: with the appropriate information for the
database you wish to view, and press the Enter key.
Bottom
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys
Figure 86. Prompt Screen for the RUNQRY Command
For the QAZCADIR file, you should see a screen similar to the one shown in
Figure 87. Notice how the ZCBIDX, and ZCBCLT fields contain information about
the client.
Display Report
Position to line . . . . .
Line ....+....1....+....2....+....3....+....4....+....5....+....6....
ZCBIDX ZCBCLT
000001 asH515900470 CATCPIP
****** ******** End of report ********
For the QAZCAMSC file, you should see a screen similar to the one shown in
Figure 88 on page 137. Notice how the information contained in this file
corresponds to the fields defined in the QAZCAMSC database file format
described in 8.1.1, “Client Software Management Database Formats” on
page 129.
Display Report
Position to line . . . . .
Line ....+....1....+....2....+....3....+....4....+....5....+....6....
ZCBIDX ZCBMEM ZCBUPT ZCBSTT ZCB
000001 asH515900470 32,372 32,543 0
****** ******** End of report ********
The clientMgmtSubAgent subtree has three children which form the following
groups:
• clntSystem (clientMgmtSubAgent 1)
• clntHardware (clientMgmtSubAgent 2)
• clntSoftware (clientMgmtSubAgent 3)
clntSWInstalledOption (clntSWInstalledEntry 8)
clntSWInstalledLoad (clntSWInstalledEntry 9)
clntSWInstalledStatus (clntSWInstalledEntry 10)
clntSWInstalledSoftwareName (clntSWInstalledEntry 11)
clntSWInstalledSerialNumber (clntSWInstalledEntry 12)
Before we can query the clientMgmtSubAgent MIB objects we must load this
enterprise MIB into NetView for OS/2. To do this we follow the steps shown in
Chapter 13, “Loading an Enterprise-Specific MIB” on page 219. The MIB to be
loaded is called IBMCLTM and is located in QSYS/QANMMIB file on the AS/400.
Figure 89 on page 140 shows the clientMgmtSubAgent MIB being selected for
querying.
By clicking on the plus symbol (as shown in the picture) we are expanding the
MIB tree.
clntSystem Figure 90 shows the clntSystem group being selected for querying.
Figure 91 shows the results of the query performed on the clntSystem group.
The information shown is from the clntSystemEntry MIB object within the
clntSystemTable from the clntSystem group. Notice how the second line from
the bottom in the MIB values area has been highlighted by placing the mouse
pointer on that line and clicking on it. This puts information about the selected
entry in the SNMP set value box of the screen in preparation for a SET operation.
In Figure 92 we can see part of the list of hardware devices from the client
management database of system 9.24.104.57 (RALYAS4B). Note that if the
Community name browser field is empty, the community name public will be
used by default as specifically entered in Figure 91 on page 142.
We can see from Figure 93 that this client system has the following storage
devices:
• Random access memory
• Two OS/2 fixed disks, identified as C: and D:
• Part of fixed disk D allocated to a virtual memory/disk swap area
In Figure 94 on page 145 we can see the size of each of these storage areas.
We can see from Figure 94, for example, that the client system has 32 MB of
random access memory installed and its C: disk has a size of 102 MB.
The following standard, IBM and Novell enterprise MIBs are supported by the
AS/400:
Standard RFC MIBs
• MIB II (RFC1213)
• Host Resources MIB 1
• Ethernet-like (RFC1398)
• FDDI (RFC1285)
• Frame Relay (RFC1315)
• Token-Ring (RFC1231)
DPI 2.0 (RFC1592)
SNMP subagent MIB
IBM enterprise MIBs
• APPN MIB
• Client management MIB
• NetView for AIX subagent MIB
• AS/400 Remote Workstation MIB 1
Novell enterprise MIBs
• Internetwork Packet Exchange (IPX) MIB 2
Notes:
1Not supported by V3R1 or V3R2
2Not supported by V3R1 or V3R6
Note
The token-ring and Ethernet MIB groups are supported, on the AS/400, only
by the newer IOP hardware. That is the 2619 IOP for token-ring and the 2617
IOP for Ethernet. There is currently no SNMP support for the FSIOP (File
Server IOP) or IPCS (Integrated PC Server).
For an explanation of the various MIB types see 2.9, “Understanding MIBs” on
page 14.
For a summary of the supported MIBs in relation to the OS/400 version see the
following table.
9.1.1 MIB-II
MIB-II describes those objects that are implemented by managed nodes that run
the Internet suite of protocols.
The AS/400 implements MIB-II. The group EGP (Exterior Gateway Protocol) is
not provided by OS/400 SNMP because the AS/400 does not provide Exterior
Gateway Support.
TCP (Transmission Control Protocol) This group contains TCP information such
as the number of TCP segments received and the number of TCP
connections currently established.
UDP (User Datagram Protocol) This group contains UDP related data about the
agent such as number of UDP datagrams delivered to UDP users.
Transmission (Transmission Media Specific) This group contains information
about the various transmission protocols used by the agent system
such as token-ring statistics and Ethernet statistics.
SNMP (SNMP Application entities) This group contains SNMP related data such
as the number of requests received with an unknown community
name.
Note
To retrieve data from the transmission group you must make sure that the
relevant IOP is active. To do this, check the MIB variable IfOperStatus under
the interfaces group of MIB-II. The IOP should be in UP status.
RFC: RFC1213
RFC Noted Exceptions: The egp group is not supported. The set operation is
not supported for the following MIB object (which is defined as having read-write
access):
ifAdminStatus
Note that ifAdminStatus tracks the desired state of a network interface as set
with an OS/400 command (for example, NETSTAT). Therefore, the get operation
can still be used on ifAdminStatus and ifOperStatus to determine if there is a
problem with an interface.
The set operation is accepted for the following MIB objects, which are defined as
having read-write access. However, the values will not change as a result of the
set operation. This behavior allows an SNMP manager to successfully perform a
set operation on an entire row of a table. A subsequent get operation will show
which values have actually changed.
• ipRouteIfIndex
• ipRouteMetric1
• ipRouteMetric2
• ipRouteMetric3
• ipRouteMetric4
• ipRouteAge
• ipRouteMetric5
For some MIB objects, the set operation is not supported for all values that are
defined as being valid. These MIB objects are listed here, along with the values
to which they can be set.
In order to set the value of atNetAddress, its syntax must be encoded as OCTET
STRING, rather than NetworkAddress. Note that it is never necessary to set the
The result of changing the value of a MIB object that is an index to an instance
of that MIB object, is undefined. For example, the result of this operation is
undefined:
set ipRouteDest.9.130.38.28=9.130.38.29.
When adding a row to a table by setting the value of a MIB object, default values
are assigned to the other objects in the row.
• indexes : The value of a MIB object which is an index to an instance of that
MIB object need not be set explicitly. For example, the operation:
set ipRouteNextHop.9.130.38.28=9.130.25.250
will implicitly create the MIB object instance ipRouteDest.9.130.38.28, with the
value 9.130.38.28.
• atPhysAddress : There is no default value for this MIB object. The value of
this MIB object must be set in order to create a new row in the atTable.
• ipRouteNextHop : There is no default value for this MIB object. The value of
this MIB object must be set in order to create a new row in the ipRouteTable.
• ipRouteType : indirect(4).
• ipRouteMask : Corresponds to the network class. For example, the mask of
a class-A network will default to 255.0.0.0.
• ipNetToMediaPhysAddress : There is no default value for this MIB object.
The value of this MIB object must be set in order to create a new row in the
ipNetToMediaTable.
• ipNetToMediaType : static(4).
MIB Subtree Description: This is the management information base for network
management of TCP/IP-based internets.
OS/400 provides support for the following Ethernet-like MIB groups and tables:
RFC: RFC1398
See 5.1.4, “Using the MIB Browser” on page 50 for an example of how to use
the Browser.
Now click on ifDesc and click on the Start query button. This should present you
with the interfaces on the system. Next to the interface will be an index number.
In our case the line TRN2619A has an index number of 2. For subsequent
queries of interface data the index will remain constant and any data retrieved
with an index number of 2 will be associated with TRN2619A.
You can scroll down the MIB tree and perform a query on the MIB object
ifOperStatus. As you can see in Figure 96 on page 153 the index number 2 is in
UP status, meaning that TRN2619A is up, as is the other interface.
Status
Figure 96. Result of Query of ifOperState
Having verified that the interfaces are up, we can run queries on the objects
within the transmission group. The group is accessed by selecting the following
objects:
mgmt →
mib-2 →
transmission
RFC: RFC1285
RFC Noted Exceptions: The Attachment group is not supported. The set
operation is not supported for this MIB.
Figure 97 shows some of the data that can be retrieved using the FDDI MIB.
OS/400 provides support for the following frame relay MIB tables:
• frDlcmiTable (Data Link Connection Management Interface Table)
• frCircuitTable (Circuit Table)
• frErrTable (Error Table)
RFC: RFC1315
RFC Noted Exception: The set operation is supported for only frTrapState.
Figure 98 shows some of the data that can be retrieved from the frame relay
MIB.
RFC: RFC1231
RFC Noted Exception: The dot5TimerTable and the set operation are not
supported for this MIB.
In Figure 99 you can see that we retrieved information from the dot5Entry group.
The MIB value keywords, such as dot5RingSpeed, are all suffixed by a number
(in this case 2). This is the index that is used to associate the value with a
specific interface. See Figure 95 on page 152 for the interface names. In this
case you can see that TRN2619A runs at four megabits (4 Mbps).
In Figure 100 we can see that TRN2619A has logged two soft errors.
Remember that you can use the Describe button to obtain a description of the
variable you selected.
This MIB is implemented by the AS/400 system but is not currently used. For
further details on the DPI 2.0 MIB, see RFC1592.
RFC: RFC1592
saDefaultTimeout
This is the default value for subagents for response timeout.
saMaxTimeout
This is the largest value a subagent may use for response time-out.
saAllowDuplicateIDs
This is the flag to allow duplicate subagent OIDs, or not.
saNumber
This is the number of currently registered subagents.
saAllPacketsIn
This is the total number of subagent packets that are received from all
subagents.
saAllPacketsOut
This is the total number of subagent packets that are sent to all subagents.
RFC: None
Before a browser can access an enterprise MIB, the MIB descripition must be
loaded into the browser. Enterprise MIB descriptions are distributed through the
following mechanisms:
• If you have Internet access with FTP capability, MIB modules can be
obtained from the NetView Association MIB server at netview.cary.ibm.com.
• IBM enterprise MIB modules supported by OS/400 are shipped with OS/400.
Each MIB module is contained in a member of physical file QANMMIB in
library QSYS. The physical file member name for each MIB module is listed
as the MIB module name in the section that describes each enterprise MIB
in this chapter.
• If you have Internet access with FTP capability, MIB modules for vendor MIBs
registered under the enterprises subtree (including IBM MIBs) can be
obtained by anonymous FTP from the Internet Assigned Numbers Authority
(IANA) anonymous FTP server at venera.isi.edu. For example use a Web
browser to: FTP://venera.isi.edu/MIB. For who/what is IANA see B.1.1,
“Request for Comments (RFC)” on page 246.
The OS/400 V3R6 SNMP enhancements include the ability to use SNMP to
change the status (vary off/vary on) of APPC lines and controllers using the set
operation. We will discuss this in detail in 9.4.1.2, “Using the APPN MIB set
function to Manage AS/400 Lines and Controllers” on page 167.
RFC Noted Exceptions: Some groups of RFC1593 are implemented with some
extensions. Refer to the concise MIB description (MIB module) for details.
Browsing the physical file member IBMAPPN in file QSYS/QANMMIB on the
AS/400 provides a useful explanation of this MIB′s function.
APPN MIB Object Groups Supported: The following groups are supported under
the ibmappnNode subtree:
ibmappnGeneralInfoAndCaps
ibmappnNnUniqueInfoAndCaps
ibmappnEnUniqueInfoAndCaps
ibmappnPortInformation
ibmappnLinkStationInformation
ibmappnSnmpInformation
Note
Before we can query the ibmappn MIB objects, we must load this enterprise MIB
into NetView for OS/2. To do this we follow the steps shown in Chapter 13,
“Loading an Enterprise-Specific MIB” on page 219. The MIB to be loaded is
called IBMAPPN and is located in QSYS/QANMMIB.
Note
If the APPN MIB had been used prior to V3R6 then the MIB must be re-loaded
into the SNMP manager before the APPN MIB enhancements can be used.
The NetView for OS/2 commands to unload then re-load the MIB are as
follows:
LOADMIB -UNLOAD APPNMIB
LOADMIB -LOAD APPNMIB
See Chapter 13, “Loading an Enterprise-Specific MIB” on page 219 for
detailed information about loading a MIB file.
Use the MIB Browser to get to the ibmappn MIB group. See 5.1.4, “Using the
MIB Browser” on page 50 for an explanation on how to use the MIB Browser.
To get to the ibmappn MIB you will need to follow this path:
private→
enterprises→
ibm →
ibmProd →
ibm6611→
ibmappn
This will be our starting point, on the MIB tree, for the following examples.
Figure 103. Retrieving the Node Names from the APPN Topology Database
The data returned is a string of ASCII data preceded by a length indicator; in the
example shown, the length is always 16 bytes. The ASCII data is an index as an
identifier of an instance. NetView for OS/2 has translated the data into text.
When we look at a different variable in the group, such as the
ibmappnNnNodeQuiescing variable, the returned value is merely an integer 1 or
2. This is translated by NetView for OS/2 into a yes or no value. To determine
which instance of this value is associated with the corresponding node, the index
value must be used.
In Figure 104 on page 164 you can see that a returned value of no has been
highlighted. The ASCII data to the left is the identifier of the specific instance. If
you look at the highlighted data in Figure 103 you can see that the identifier is
the same; therefore, we can say that the two values are for the same instance
and that the APPN node USIBMRA.RALYAS4A is not quiescing.
Don′t forget that you can click on the describe button for a description of the
variable. See Figure 105.
Once again the ASCII data on the left is used as an identifier of a specific
instance. With this in mind look at Figure 108 on page 167. This shows the
variable ibmappnLocalTgOperational and indicates whether the transmission
group is operational or not.
The examples above showed just a few of the many variables available via the
APPN MIB.
Note
Although we did not have time to have a look at it during the residency that
resulted in this book, Router and Bridge Manager/6000 is able to display the
APPN topology in a more user-friendly way using this same APPN MIB. A
graphical representation is given.
9.4.1.2 Using the APPN MIB set function to Manage AS/400 Lines
and Controllers
The OS/400 V3R6 SNMP enhancements include improved APPN MIB support.
The SNMP set function can now be used to change the status of APPC lines and
controllers via two variables in the ibmappnNode subtree. The
ibmappnNodePortState MIB variable can be used to display and, if necessary
change, the status of APPN capable line descriptions. The ibmappnNodeLsState
MIB variable can be used to display and, if neccessary change, the status of
APPN capable controller description. As an example, let′s look at how we can
use the ibmappnNodeLsState MIB variable to activate (vary on) an inactive
(varied off) controller description. In Figure 109 on page 168 we can see that
the controller state is currently varied off.
Bottom
Parameters or command
===>
F3=Exit F4=Prompt F12=Cancel F23=More options F24=More keys
Figure 109. The Status before Setting the ibmappnNodeLsState Variable
In Figure 112 on page 170 we can see that the APPC controller is now active -
that the set operation was successful.
Bottom
Parameters or command
===>
F3=Exit F4=Prompt F12=Cancel F23=More options F24=More keys
Figure 112. The Status after Setting the ibmappnNodeLsState Variable
RFC: None
RFC: None
The IBM 5494 remote workstation controller is a hardware device that allows
access from remote workstations (terminals, personal computers and printers) to
an AS/400 system over either a LAN or WAN connection.
MIB Module Name: IBMRWS
The AS/400 remote workstation MIB subtree has three children. These are:
• rwsTable
• rwsDevTable
• rwsGeneralInfo
rwsGeneralInfo: This MIB subtree has the only child, it represents the number
of remote workstation controllers attached to the managed AS/400.
Before we can query the RWS MIB objects, we must load this enterprise MIB
into NetView for OS/2. To do this we follow the steps shown in Chapter 13,
rwsTable: First let′s look at information related to the 5494 remote workstation
controller itself. To do this follow this path:
enterprises→
ibm →
ibmprod →
ibmAs400Agent→
ibmAs400Rws →
rwsTable
In Figure 113 we can see the result of a query performed on the rwsTable MIB
group. In this example only one 5494 was attached to the AS/400. Had multiple
5494s been attached, then each would be identified by a unique instance
identifier. The query shows:
• That the name of the remote workstation controller (rwsCtlName) is
RAL5494RMT.
• That its state (rwsOperState) is active.
• That the associated APPC device (rwsAppcDevName) is RAL5494 which is
also active (rwsAppcDevState).
In Figure 114 we can see the result of a query performed on rwsDevTable MIB
group. In this example two devices are attached to the 5494 each with a unique
instance identifier. The query shows:
• That the name of the remote workstation controller (rwsDevCtlName) for both
devices is RAL5494RMT.
• That the device names (rwsDevName) are RAL5DSP18 and RAL4DSP19 and
that both are active (rwsDevOperState).
• That the device serial number (rwsDevSerial) in each case is 23-0048836 (this
was a dual address display).
In this example we will use the rwsAppcDevState MIB variable to activate (vary
on) an inactive (varied off) 5494 APPC device description. In Figure 115 we can
see that the 5494 APPC device state is currently varied off.
Bottom
Parameters or command
===>
F3=Exit F4=Prompt F12=Cancel F23=More options F24=More keys
Figure 115. The Status before Setting the rwsAppcDevState Variable
The rwsAppcDevState MIB variable is located within the rwsTable. To locate the
rwsTable, follow this path:
enterprises→
ibm →
ibmprod →
ibmAs400Agent→
ibmAs400Rws →
rwsTable
Having selected the rwsAppcDevState MIB variable for the appropriate remote
workstation controller (via rwsAppcDevName), we select a set value of active
from the SNMP set value window then press the Set button. Note that SNMP
community test allows write access. If the set operation is successful you will
see the completion message, as shown in Figure 117.
In Figure 118 on page 177 we can see that the 5494 APPC device is now active -
that the set operation was successful.
Bottom
Parameters or command
===>
F3=Exit F4=Prompt F12=Cancel F23=More options F24=More keys
Figure 118. The Status after Setting the rwsAppcDevState Variable
Cause . . . . . : Device RAL5DSP18 was not varied off for one of the
following reasons:
--The device is active.
--The job default wait time was not long enough to allow the vary off
function to complete.
Recovery . . . : Do one of the following:
--Try the request again when the device is not active.
--Use the default maximum wait time (DFTWAIT parameter) in the Change Job
(CHGJOB) command to increase the job default wait time. Then try the Vary
Configuration (VRYCFG) command again.
Bottom
Press Enter to continue.
Although Novell allows set functionality against MIB objects, the OS/400
implementation does not support the use of set against any IPX MIB object.
As an example of the information available via the IPX MIB and how this
compares with information available via AS/400 system commands, let′s look at
the AS/400 RIP and SAP tables via both methods. Looking first at the RIP table,
this can be displayed at the AS/400 by entering the command WRKIPXSTS (*RTE).
Bottom
F3=Exit F5=Refresh F6=Print list F12=Cancel F17=Top F18=Bottom
Figure 120. The Display IPX Route Information Screen
From Figure 120 we can see that there are six IPX networks known to the
AS/400. The networks with a route source of *RIP were discovered via RIP. (The
network with a route source of *CCT represents a network defined on the
AS/400. The network with a route source of *LOCAL represents the AS/400′ s
internal network.)
Now let′s look at this same information via the IPX MIB. The following queries
were performed on MIB variables in ipxDestEntry part of MIB subtree:
private→
enterprises→
novell→
mibdoc →
ipx→
ipxForwarding →
ipxDestTable→
ipxDestEntry
Figure 121 shows the results of a query on the ipxDestNetNum MIB variable.
As can be seen, the right column of variables represents the IPX network
numbers in the same order as they are presented on a native AS/400 screen
(Figure 120 on page 179).
Figure 122 shows the results of a query on the ipxDestHopCount MIB variable.
As can be seen, the right column of variables represents the hop counts in the
same order as they are presented on a native AS/400 screen (Figure 120 on
page 179). The term hop count represents the number of intermediate routers
between the local network and the destination network.
Figure 123 shows the results of a query on the ipxDestTicks MIB variable.
As can be seen, the right column of variables represents the tick counts in the
same order as they are presented on a native AS/400 screen (Figure 120 on
page 179). A tick is equal to 1/18th of a second. It is used to compare route
entries - if two routes entries have the same hop count, the route with the least
tick count is used.
As can be seen, the right column of variables represents the next hop node
address in the same order as they are presented on a native AS/400 screen
(Figure 120 on page 179).
Figure 125 shows the results of a query on the ipxDestProtocol MIB variable.
As can be seen, the right column of variables represents the route source in the
same order as they are presented on a native AS/400 screen (Figure 120 on
page 179).
In the above examples we showed how information from the IPX MIB related to
information from WRKIPXSTS (*RTE), IPX service information can also be obtained
via the IPX MIB. Figure 126 shows how information from the IPX MIB relates to
information from WRKIPXSTS (*SRV).
Bottom
F3=Exit F5=Refresh F6=Print list F12=Cancel F17=Top F18=Bottom
Figure 126. The Display IPX Service Information Screen
Notes:
Figure 126 contains the IPX Service information. The same information
can be displayed using SNMP by quering the following MIB objects:
1 ipxServName
2 ipxServType
3 ipxServNetNum
4 ipxServHopCount
5 ipxServProtocol
All tables in this MIB are linked to an instance of IPX via the system instance
identifier as defined in the IPX MIB.
The ripSysInstance and sapSysInstance entries provide index points to the table
and correlate to ipxSysInstance within the IPX MIB information. In this example
there is only one instance of each protocol running on the system. From
ripSysState we can see that the RIP protocol is currently active and from
ripSysIncorrectPackets we can see that there have been no incorrectly formatted
RIP packets received. From sapSysState we can see that the SAP protocol is
currently active and from sapSysIncorrectPackets we can see that there have
been no incorrectly formatted SAP packets received.
All tables in this MIB are linked to an instance of IPX via the system instance
identifier as defined in the IPX MIB.
Work in Progress
At the time of writting this MIB was not fully implemented on the AS/400. We
did not, therefore, browse the MIB contents.
The host resources MIB subtree has six children which form the following
groups:
hrSystem This MIB group provides system information such as system up time,
number of users and system date.
hrStorage This MIB group provides system storage information such as system
memory size and DASD space available.
hrDevice This MIB group provides information on devices attached to the
system such as whether a disk unit is removable and the status of a
printer.
hrSWRun This MIB group provides information on the software running on the
system such as the name and level of the software running.
hrRunPerf This MIB group provides information on the system′s CPU
performance. This MIB group is not supported by the AS/400.
hrSWInstalled This MIB group provides information on the software installed on
the system such as a table of the software installed and when the
software was last updated.
RFC: 1514
MIB Subtree Object Identifier: host ::= { mib-2 25 }
Prerequisite MIB Modules: RFC1212, RFC1213, RFC1155
The Host Resources MIB subtree: The host resources MIB is the mib-2 group
MIB. Thus the subtree OBJECT IDENTIFIER for the host resources MIB is located
under the mib-2 subtree. The OBJECT IDENTIFIER is
iso.org.dod.internet.mgmt.mib-2.host
or, in concise form: 1.3.6.1.2.1.25
Although the following six MIB objects are defined in RFC1514 as read-write
capable, the current AS/400 implementation does not allow these variables to be
set. The six objects are:
• hrSystemDate
• hrFSlastFullBackupDate
• hrFSlastPartialBackupDate
• hrSystemInitialLoadDevice
• hrSystemInitialLoadParametrs
• hrStorageSize
The following host resources MIB objects are not implemented by the AS/400:
• hrStorage.hrStorageTypes
• hStorageTable.hrStorageEntry.hrStorageAllocationFailures
• hrDevice.hrDeviceTypes
• hrDevice.hrDeviceTable.hrDeviceEntry.hrDeviceErrors
• hrDevice.hrNetworkTable
• hrDevice.hrPrinterTable
• hrDevice.hrFSTable.hrFSEntry.hrFSRemoteMountPoint
• hr.device.hrFSTypes
• hrSWRun.hrSWRunTable.hrSWRunEntry.hrSWRunPath
• hrSWRun.hrSWRunTable.hrSWRunEntry.hrSWRunParameters
• hrSWRunPerf
hrSystem: In Figure 128 you can see the results of a query performed on the
MIB group hrSystem.
From Figure 128 we can see: that the IPL was performed from device 3 (MIB
group hrDevice could be queried for information on device 3), that the IPL was
from load source area B (hrSystemInitialLoadParameters) and that the number
of users at the time the picture was taken was 2.
hrStorage: In Figure 129 you can see the results of a query performed on the
MIB group hrStorage. In this example we have used the MIB browser Save
button save the results to a file.
MIB values :
hrMemorySize.0 : 131072
hrStorageIndex.1 : 1
hrStorageIndex.2 : 2
hrStorageIndex.3 : 3
hrStorageIndex.4 : 4
hrStorageIndex.5 : 5
hrStorageType.1 : .iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTypes.hrStorageFixedDisk
hrStorageType.2 : .iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTypes.hrStorageRam
hrStorageType.3 : .iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTypes.hrStorageRam
hrStorageType.4 : .iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTypes.hrStorageRam
hrStorageType.5 : .iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTypes.hrStorageRam
hrStorageDescr.1 : System ASP
hrStorageDescr.2 : RAM
hrStorageDescr.3 : RAM
hrStorageDescr.4 : RAM
hrStorageDescr.5 : RAM
hrStorageAllocationUnits.1 : 4096
hrStorageAllocationUnits.2 : 4096
hrStorageAllocationUnits.3 : 4096
hrStorageAllocationUnits.4 : 4096
hrStorageAllocationUnits.5 : 4096
hrStorageSize.1 : 2401280
hrStorageSize.2 : 12048
hrStorageSize.3 : 20583
hrStorageSize.4 : 73
hrStorageSize.5 : 64
hrStorageUsed.1 : 2048682
hrStorageUsed.2 : 7540
hrStorageUsed.3 : 7848
hrStorageUsed.4 : 64
hrStorageUsed.5 : 344
In Figure 129 we can see information on the AS/400 storage units. The first row,
hrMemorySize, provides information on the total random access memory on the
system (in KB), that is in our case approximately 131 MB. The items with
instance values 2-5 belong to random access memory while instance 1 is the
system ASP, as can be seen from hrStorageDescr. Instances 2 to 5 represent
memory pools on the AS/400. A memory pool is a dedicated part of random
access memory concurrently used by a group of jobs. The
hrStorageAllocationUnits section provides information on the storage allocation
unit size, that is, 4,096KB for both memory and disk access. The hrStorageSize
and hrStorageUsed values provide information similar to that available via the
WRKSYSSTS command.
hrDevice: In Figure 130 and Figure 131 on page 194 you can see the results of
queries performed on MIB group hrDevice. We have chosen to look at the
hrDeviceDescr and hrDeviceStatus MIB objects. Both objects can be found in
the host MIB subtree by selecting:
host→
hrDevice →
hrDeviceTable →
hrDeviceEntry
In Figure 130 we can see a small part of the list of the hardware devices
installed on the system located at 9.48.1.56. In Figure 131 on page 194 we can
see the status of these same devices.
hrSWRun: In Figure 132 and Figure 133 on page 196 you can see the results of
queries performed on MIB group hrSWRun. We have chosen to look at the
hrSWRunName and hrSWRunStatus MIB variables. Both variables can be found
in the host MIB subtree by selecting:
host→
hrSWRun →
hrSWRunTable →
hrSWRunEntry
In Figure 132 we can see a small part of the list of software running on the
system located at 9.48.1.56. In Figure 133 on page 196 we can see the status of
these same software programs.
From Figure 132 on page 195 and Figure 133 we are able to see, for example,
that the system at address 9.48.1.56 has the Query/400 licensed program loaded
and that is runnable; and that the Application Development Tool Set/400 is
loaded and is currently in use (has a status of running).
hrSWInstalled: In Figure 134 you can see the results of a query performed on
the hrSWInstalledName. The hrSWInstalledName MIB can be reached by
selecting:
host→
hrSWInstalled →
hrSWInstalledTable →
hrSWInstalledEntry→
hrSWinstalledName
In Figure 134 we can see a list of software installed on the system at 9.48.1.56.
This list is as would be shown by option 10 of the command GO LICPGM. Other
information is also available, such as the software type (hrSWInstalledType).
10.2 Host Resources MIB and Client Access Optimized for OS/2
Client Access Optimized for OS/2 also supports the host resources MIB. The
implementation of the host resources MIB in Client Access Optimized for OS/2 is
primarily intended to support the client inventory management functions of the
AS/400 (see 8.1, “Client Inventory Management” on page 127) but can also be
accessed directly from an SNMP manager. To activate the host resources MIB
support on a personal computer running Client Access Optimized for OS/2 you
are required to:
• Have configured Client Access using a protocol supported by SNMP on both
managing and managed systems (native TCP/IP or AnyNet Sockets over
SNA).
• Have enabled SNMP functions on the personal computer. To fulfill this task
you will have to remove two REM commands in the CASERV.CMD file. The
commands to be un-commented are: CALL CASNMP.CMD and DETACH
SIASTART.CMD. See the Inside Client Access/400 Optimized for OS/2 ,
SG24-2587 redbook for more information.
Finally, you have to know what the community name to use. The AS/400
client management functions use a community name of IBMDMI. This can
be seen if you perform a query of the client management MIB on the AS/400
that the Client Access system is connected as shown in Figure 135. The
path to follow to locate this information is:
private→
enterprises→
ibm →
ibmprod →
clientMgmtSubAgent →
clntSystem
In Figure 135 we can see the result of a query of the clntSystem MIB group.
From this we can see that the client is using a community name (clntCommunity)
of IBMDMI. This is the community name that we have to use when querying the
host resources MIB on the Client Access system. We can also see from
Figure 135 that, in addition to supporting the host resources MIB
(clntSupportHostMib), this client supports the APPN MIB (clntSupportAppnMib)
and the DMI MIB (clntSupportDmiMib).
Figure 136 shows the results of a query performed on the hrSystem MIB object.
hrDevice: In Figure 137, Figure 138 on page 201 and Figure 139 on page 202
you can see the results of queries performed on MIB group hrDevice. We have
chosen to look at the hrDeviceDescr, hrDeviceStatus and hrPartitionTable MIB
objects. These objects can be found in the host MIB subtree by selecting:
host→
hrDevice
In Figure 137 we can see a small part of the list of the hardware devices
installed on the system located at 9.24.104.218. In Figure 138 on page 201 we
can see the status of these same devices.
In Figure 138 we can see that all listed devices are currently running (active).
hrSWRun: In Figure 140 you can see the result of a query performed on the MIB
group hrSWRun. We have chosen to look at the hrSWRunName MIB variable.
The variable can be found in the host MIB subtree by selecting:
host→
hrSWRun →
hrSWRunTable →
hrSWRunEntry→
hrSWRunName
In Figure 140 we can see a partial list of the software installed on the Client
Access system. We can see, for example, that the IBM AnyNet Sockets over
SNA for OS/2 product is installed, that its component ID 562232100, its revision is
2.01 and CSD is IP00000. This information would be useful when trying to
resolve a software problem on the PC.
As described in 3.1.6, “Trap Support” on page 27, the AS/400 can be a source of
the following different types of traps:
• ColdStart
• WarmStart
• LinkDown
• LinkUp
• AuthenticationFailure
• EnterpriseSpecific
Traps are unsolicited data messages sent by an SNMP agent to its SNMP
managing system. These messages are usually used to inform the managing
station about a special condition that has occurred either in an agent system or
in the network.
Trap managers:
Manager internet address . . . ′9.24.104.39′ 1
Community name . . . . . . . . ′ PUBLIC′ 2
Bottom
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys
Figure 141. The CHGSNMPA Command
Note:
1 Is the address of the SNMP manager to whom the traps should be
sent.
3 Specifies the character set is to be used for the coding of community
name on the managing system. In most cases this parameter should be
set to *YES.
There are no special configuration requirements for NetView for OS/2 to accept
traps other than that TCP/IP be supported as a management protocol. NetView
for OS/2 does not care about the community name of incoming traps.
The NetView for OS/2 ColdStart trap in Figure 142 provides the following
information to the administrator:
• The date and time the trap was logged in the trap log file.
• The node that generated the trap.
• The generic trap number 0, which indicates a ColdStart trap.
• The specific trap number 0.
• A text trap description.
Bottom
Press Enter to continue.
In Figure 144 we can see the generic trap number 2 indicating a LinkDown trap
and the generic trap number 3 indicating a LinkUp trap.
Bottom
Press Enter to continue.
In Figure 147 we can see the generic trap number 4 indicating an authentication
trap.
All five SNMP operations (GET, GETNEXT, SET, RESPONSE and TRAP) can be
logged in the QSNMP journal for audit purposes.
The logged records are kept in the journal QSNMP in library QUSRSYS. The
DSPJRN (QSNMP/QUSRSYS) command can be used to display the content of the
journal. Each record contains 118 columns of alphanumeric data. An example of
a journal entry using the DSPJRN (QUSRSYS/QSNMP) command is shown in
Figure 148.
Display Journal Entry
Object . . . . . . . : Library . . . . . . :
Member . . . . . . . : Sequence . . . . . . : 10895
Code . . . . . . . . : M - Network management data
Type . . . . . . . . : SN - SNMP information
Bottom
T = TRAP
Column 2-21: Community Name
Column 22-33: Internet Address (IP address of the SNMP manager sending
request or receiving response, or the IP address of the first SNMP manager
receiving a trap).
Column 34: Error Status (specifies the type of error received).
0 = noError
1 = tooBIG
2 = noSuchName
3 = badValue
5 = genErr
The errors have the following meanings:
tooBig This indicates that the response to a request would be too large
to send back in a single packet.
noSuchName This indicates that a request (SET, GET or GETNEXT) contains a
variable that is not accessible.
In the case of a SET, a noSuchName error status will be logged
when the variable to be modified doesn′t exist or when the
variable cannot be modified because it is read only or when the
manager is not allowed to modify those agents′ variables.
In the case of a GET or GETNEXT, a noSuchName error status will
be logged when the agent does not implement the object
associated with the variable or the agent implements the object,
but the variable doesn′t exist.
badValue This indicates that the SET operation contains a value that the
agent doesn′t like because it may be syntactically inconsistent
with the object definition in the MIB or with the values of other
variables in the agent.
genError This is a catch-all error which should only be logged when there
is no other recourse available.
Column 35-38: Error Index
Column 39: Trap Type (indicates the type of trap received by an SNMP
manager).
0: coldStart
1: warmStart
2: linkDown
3: linkUp
4: authenticationFailure
5: egpNeighborLoss
6: enterpriseSpecific
Note: The different type of traps are explained in A.3.2.5, “The
Trap-PDU” on page 243.
Column 40-43: Enterprise Specific Trap. If the Trap Type field has a value of
6 (enterpriseSpecific) this field will indicate the type of enterprise type. If the
trap type field has any other value, then the value of this field will be 0.
Note: If the enterprise specific trap type value is less than -999, it will be
logged as -999. If the enterprise specific trap value is greater than 9999, it
will be logged as 9999.
Column 44-118: Descriptors (specifies the name of the MIB variable).
Example 1:
Display Journal Entry
Object . . . . . . . : Library . . . . . . :
Member . . . . . . . : Sequence . . . . . . : 5811
Code . . . . . . . . : M - Network management data
Type . . . . . . . . : SN - SNMP information
Figure 149. GET Request
This entry indicates that a GET request specifying community name public was
sent by an SNMP manager at internet address 9.18.1.20. The error status, error
index and the trap type fields all have a value of zero. The object descriptor
sysDescr is the one that is being requested.
Display Journal Entry
Object . . . . . . . : Library . . . . . . :
Member . . . . . . . : Sequence . . . . . . : 5812
Code . . . . . . . . : M - Network management data
Type . . . . . . . . : SN - SNMP information
Figure 150. Response to GET Request
This journal entry is the log of the response to the previous GET request. The
only field of this entry that has changed is the log type. The error status and
error index field values are zero, so no error was registered in this GET
operation. The field object descriptor indicates the object returned in response
to the GET request.
Example 2:
Display Journal Entry
Object . . . . . . . : Library . . . . . . :
Member . . . . . . . : Sequence . . . . . . : 5813
Code . . . . . . . . : M - Network management data
Type . . . . . . . . : SN - SNMP information
Figure 151. Incorrect Object ID being Specified in a GET Request
This entry indicates that a GET request specifying community public was sent by
an SNMP manager at internet address 9.18.1.20. The error status, error index
and the trap type fields all have a value of zero. The object descriptor sysDescr
is the one that is being requested, but it was not correctly specified (it should
have been sysDescr.0)
Display Journal Entry
Object . . . . . . . : Library . . . . . . :
Member . . . . . . . : Sequence . . . . . . : 5814
Code . . . . . . . . : M - Network management data
Type . . . . . . . . : SN - SNMP information
Figure 152. Response to an Incorrect GET Request
This journal entry is the log of the response to the previous GET request. The
error status and error index fields show that the noSuchName error was returned
for the object specified in the object descriptor field.
Example 3:
Display Journal Entry
Object . . . . . . . : Library . . . . . . :
Member . . . . . . . : Sequence . . . . . . : 5465
Code . . . . . . . . : M - Network management data
Type . . . . . . . . : SN - SNMP information
Figure 153. GETNEXT Request
This journal entry indicates that a GETNEXT request specifying the community
name public was sent by an SNMP manager at internet address 9.24.104.186.
Error status, error index, and the trap type fields all have the value zero. In this
case we are requesting the content of the next MIB variable of object descriptor
sysContact .
Display Journal Entry
Object . . . . . . . : Library . . . . . . :
Member . . . . . . . : Sequence . . . . . . : 5466
Code . . . . . . . . : M - Network management data
Type . . . . . . . . : SN - SNMP information
Figure 154. Response to GETNEXT Request
This journal entry is the log of the response to the previous GETNEXT request.
The only fields of this entry that have changed are the log type and the object
descriptor. The field object descriptor indicates the object returned in response
to the GETNEXT request.
Example 4:
Display Journal Entry
Object . . . . . . . : Library . . . . . . :
Member . . . . . . . : Sequence . . . . . . : 5467
Code . . . . . . . . : M - Network management data
Type . . . . . . . . : SN - SNMP information
Figure 155. SET Request
This entry indicates that a SET request specifying community name public was
sent by an SNMP manager at internet address 9.24.104.186. The error status,
error index and the trap type fields all have a value of zero. The object
descriptor sysContact is the one that is requested to be modified by the SET
operation.
Display Journal Entry
Object . . . . . . . : Library . . . . . . :
Member . . . . . . . : Sequence . . . . . . : 5468
Code . . . . . . . . : M - Network management data
Type . . . . . . . . : SN - SNMP information
Figure 156. Response to SET Request
This journal entry is the log of the response to the previous SET request. The
only field of this entry that has changed is the log type. The field object
descriptor indicates the object changed in response to the SET request.
Example 5:
Display Journal Entry
Object . . . . . . . : Library . . . . . . :
Member . . . . . . . : Sequence . . . . . . : 5929
Code . . . . . . . . : M - Network management data
Type . . . . . . . . : SN - SNMP information
Figure 157. Modifying a Read-Only Object ID
This entry indicates that a SET request specifying community name public was
sent by an SNMP manager at internet address 9.18.1.20. The error status, error
index and the trap type fields all have a value of zero. The object descriptor
sysUpTime is the one that is requested to be modified by the SET operation.
Display Journal Entry
Object . . . . . . . : Library . . . . . . :
Member . . . . . . . : Sequence . . . . . . : 5930
Code . . . . . . . . : M - Network management data
Type . . . . . . . . : SN - SNMP information
Figure 158. Response to an Incorrect SET Request
This journal entry is the log of the response to the previous SET request. The
error status and error index fields show that the noSuchName error was returned
for the object specified in the object descriptor field. In this case noSuchName
was returned because the object descriptor field sysUpTime is read only so it
cannot be modified.
Example 6:
Display Journal Entry
Object . . . . . . . : Library . . . . . . :
Member . . . . . . . : Sequence . . . . . . : 5443
Code . . . . . . . . : M - Network management data
Type . . . . . . . . : SN - SNMP information
Figure 159. authenticationFailure Trap
This journal entry indicates that a trap was sent to the trap manager at internet
address 9.24.104.186. The trap will be sent to a trap manager only if the trap
manager job is started. For more information, refer to 6.1.1, “SNMP Manager
API Functions” on page 76. Error status and error index are both zero, the trap
type is authenticationFailure. In this case the wrong community name was
specified causing the authenticationFailure trap to be generated.
Internet standard MIBs are supported by all devices that support SNMP. The
standard MIB objects definition, MIB-2, enables you to monitor and control SNMP
devices.
Vendors can also define enterprise-specific MIBs for controlling their own
devices. By loading a MIB description file containing one of these
enterprise-specific MIBs on to an SNMP manager, you can control these devices.
Parameters or command
===> Bottom
F3=Exit F4=Prompt F5=Refresh F6=Create
F9=Retrieve F10=Command entry F23=More options F24=More keys
Figure 160. OS/400 Supplied M I B Modules in File QSYS/QANMMIB
If we select option 5 (display) against member IBMAPPN, the MIB module source
code shown in Figure 161 on page 220 will be displayed.
Note: The MIB source file members marked by 1 are not available in V3R1 or
V3R2.
SEU==>
FMT ** ...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ..
*************** Beginning of data ***************data *******************
0001.00
0002.00 -- Note:
0003.00 -- This text file contains ASN.1 source describing MIB objects for SNMP.
0004.00 -- The enterprise MIB described is subject to change in a future
0005.00 -- release, and support for any object described in this MIB may be
0006.00 -- removed in a future release, as standard MIBs in the management domain
0007.00 -- described by this MIB become defined and published as Internet RFCs.
0008.00
0009.00 IBM-6611-APPN-MIB DEFINITIONS ::= BEGIN
0010.00
0011.00 IMPORTS
0012.00
0013.00 enterprises, Counter, IpAddress,
0014.00 Gauge, TimeTicks
0015.00 FROM RFC1155-SMI
0016.00
This chapter explains how to load one of these enterprise MIB modules on to an
SNMP manager (NetView for OS/2 in this example). We will then use it to
browse information on the AS/400.
The procedures and commands used in the following examples are specific to
NetView for OS/2. Other platforms will almost certainly use slightly different
procedures.
At present we can use the MIB Browser to go down the MIB tree to the MIB
object ibmappn. However, it is not possible to go any further down the tree into
the more granular objects and variables without the framework that the MIB will
provide for the manager.
Note
Clicking on the ibmappn MIB object will not reveal any lower level MIB objects
unless the ibmappn enterprise MIB is loaded.
Here the IP_address is the internet address of the AS/400 (in this example it is
9.24.104.57). See Figure 162.
Enter your AS/400 user ID and password at the prompt. You should then receive
confirmation that you have started an FTP connection and be presented with an
FTP command prompt. At the FTP command prompt enter the following
command:
cd QSYS
This should change your current library to QSYS on the AS/400. See Figure 163
on page 222.
This should copy the AS/400 member IBMAPPN from file QANMMIB in library
QSYS to directory SNMP_MIB on the PC. Check that this directory is reached
via the same path on your PC.
You should receive a message that the data has been transferred successfully.
See Figure 165 on page 223.
You can use a PC text editor to check if the file you received is the same as the
AS/400 file member you displayed earlier in Figure 161 on page 220.
Figure 166 shows the file we received on our PC viewed using a PC text editor.
You should then see the loadmib procedure running. When you receive the
message Command completed successfully the MIB should be loaded. See
Figure 168.
You should now be able to use the MIB Browser to browse the objects in the
ibmappn group and retrieve data from the MIB variables. See Figure 169 on
page 225 which shows the variable ibmappnLocalNodeType (APPN local node
type), in this case a network node.
In this chapter we discuss AnyNet and how SNMP can utilize the functions of
AnyNet.
A customer may have implemented a large and costly SNA network but would
like to use the TCP/IP File Transfer Protocol (FTP) to transfer files between some
systems. AnyNet allows them to use FTP across their existing network without
the need to implement a parallel TCP/IP network.
These are points to consider when you decide whether to implement AnyNet/400
support. Normally, however, the flexibility of the AnyNet/400 product should
outweigh any performance degradation.
In this book we have tended to concentrate on NetView for OS/2 as the SNMP
manager. In this chapter we take a short look at another SNMP manager,
NetView for AIX.
15.1 Overview
NetView for AIX Version 1 was first introduced during 1992. It was solely a
manager for TCP/IP networks, using the SNMP protocol. Many of the features of
the first version have been carried forward, with enhancements, to Versions 2
and 3.
The most noticeable difference between NetView for AIX and NetView for OS/2 is
the former′s graphical user interface. Using information gleaned from SNMP
agents, NetView for AIX can construct network topology maps allowing network
administrators to see, at a glance, the current state of systems on the network.
Most of the features of NetView for OS/2 are present on NetView for AIX such as,
the discovery process, event automation and the MIB browser. The discovery
process, however, when coupled to the graphical user interface, is more
sophisticated.
The process that deals with discovery is called the netmon daemon. It will
discover the following objects:
• The local network segment
• All nodes on the local segment
• All routers and gateways on the segment
• All segments or networks attached to the gateways and routers
Although it will discover these entities, it will initially place them in an
unmanaged state.
Figure 174 shows the home network, 9.24.104, all the bridges, routers and
gateways attached to the home network and networks attached to these devices.
You can see that NetView for AIX has discovered another network , 9.67.32. It
displays this in red (not green) because it cannot reach this network as it has no
route defined. It discovered the existence of this network by retrieving interface
information from the systems attached to it. By using SNMP, NetView for AIX
found that these systems had an interface into the 9.24.104 network and also the
9.67.32 network.
Figure 176 shows just our home LAN segment and the bridges, routers and
gateways attached to it. To see all the systems on our LAN segment, we can
look at a different view. Figure 177 on page 234 shows all the systems attached
to our segment.
You can now see systems RALYAS4A and RALYAS4B on this segment. Because
the graphical display uses a different color to represent each different status of a
system (such as communicating or not communicating) it is very easy to tell
whether a system is online or not. Should any system fail, the status would turn
from green to red. If a gateway failed, many systems on this map may turn red.
It would be a simple matter of viewing the entire network map to see which
gateway, or router, had failed. If you are using a pictorial view of the network,
as shown in Figure 175 on page 233, you would even know which location the
failed device was in and which parts of the country would be affected.
AS/400 systems with an active SNMP agent will be discovered by NetView for
AIX. NetView for AIX Version 3 will recognize the AS/400 sysDescr object and
show the object type as IBM AS/400.
This appendix contains information for further reading relative to SNMP. Some
topics from the preceding chapters are explored in more detail, as well as other
topics relevant to SNMP and the Internet protocol suite in general.
Under the iso(1) node, the ISO has designated one subtree for use by other
international organizations, identified with label org(3). Of the two children
nodes present, two have been assigned to the U.S. National Institute of
Standards and Technology (NIST). One of these subtrees has been transferred
by the NIST to the U.S. Department of Defense (DoD), which is identified by the
label dod(6). To date, the DoD has not indicated how it will manage its subtree
of OBJECT IDENTIFIERs. The IAB assumes that the DoD will allocate a node to
the Internet community to be administered by the IAB as follows:
That is, the Internet subtree of OBJECT IDENTIFIERs starts with the prefix 1.3.6.1.
The SMI standard RFC specifies that the Internet subtree of OBJECT IDENTIFIERs
will contain the following four nodes:
• directory OBJECT IDENTIFIER ::= internet 1
• mgmt OBJECT IDENTIFIER ::= internet 2
• experimental OBJECT IDENTIFIER ::= internet 3
mgmt 1 or 1.3.6.1.2.1
experimental 24 or 1.3.6.1.3.24
The ″99 Flavors, Inc.″ enterprise might then register its ″Vanilla Router″ under
the name of: 1.3.6.1.4.1.59.1.1
The term transport address is used in this section. In the case of UDP, a
transport address consists of an IP address along with a UDP port. Other
transport services may be used to support SNMP. In these cases, the definition
of a transport address should be made accordingly.
Similarly, the top-level actions of a protocol entity which receives a message are
as follows:
1. It performs a rudimentary parse of the incoming datagram to build an ASN.1
object corresponding to an ASN.1 message object. If the parse fails, it
discards the datagram and performs no further actions.
2. It then verifies the version number of the SNMP message. If there is a
mismatch, it discards the datagram and performs no further actions.
3. The protocol entity then passes the community name and user data found in
the ASN.1 message object along with the datagram′s source and destination
transport addresses to the service which implements the desired
authentication scheme. This entity returns another ASN.1 object or signals
an authentication failure. In the latter case, the protocol entity ideally notes
this failure, generates a trap, and discards the datagram (after which no
further actions are performed).
4. The protocol entity then performs a rudimentary parse on the ASN.1 object
returned from the authentication service to build an ASN.1 object
corresponding to an ASN.1 PDU object. If the parse fails, it discards the
datagram and performs no further actions. Otherwise, using the named
SNMP community, the appropriate profile is selected, and the PDU is
processed accordingly. If, as a result of this processing, a message is
returned, then the source transport address that the response message is
sent from shall be identical to the destination transport address that the
original request message was sent to.
Before introducing the PDU types of the SNMP protocol, it is appropriate to recall
that SNMP communications are performed through the exchange of messages.
We know that an SNMP message consists of a version identifier, an SNMP
community name and a PDU. The SNMP operations discussed in 2.10, “SNMP
Operations” on page 20, are processed in the form of a PDU.
Upon the receipt of the GetRequest-PDU, the receiving protocol entity responds
according to any applicable rule in the following list:
1. If, for any object named in the GetRequest-PDU, the object′ s name does not
exactly match the name of some object available for GET operations in the
relevant MIB view, or is an aggregate type as defined in the SMI, then the
receiving entity sends to the originator of the received message a
GetResponse-PDU with the ErrorStatus field set to noSuchName.
2. If the size of the GetResponse-PDU that is generated by the responding
entity exceeds a local limitation, then the receiving entity sends to the
originator of the received message a GetResponse-PDU with the ErrorStatus
field set to tooBig.
3. If, for any object named in the GetRequest-PDU, the value of the object
cannot be retrieved for reasons not covered by any of the foregoing rules,
then the receiving entity sends to the originator of the received message a
GetResponse-PDU with the ErrorStatus field set to genErr.
4. If none of the foregoing rules apply, meaning that the GetRequest-PDU was
able to retrieve all its named objects information successfully, then the
receiving entity sends to the originator of the received message a
GetResponse-PDU such that, for each object named in the GetRequest-PDU,
the object′s variable name and value is included. The ErrorStatus field is set
to noError.
Upon receipt of the GetResponse-PDU, the receiving protocol entity presents its
contents to its SNMP application entity.
Upon receipt of the Trap-PDU, the receiving protocol entity presents its contents
to its SNMP application entity.
As is the case with the other PDUs, the Trap-PDU is comprised of several
components. One of those components is the variable-bindings. The
significance of this component is implementation-specific.
Two other components of the Trap-PDU are the generic-trap, and the
specific-trap. The specific-trap provides additional information for certain cases
of the generic-trap. The following are interpretations of the possible values of
the generic-trap field:
coldStart (0) A coldStart trap signifies that the sending protocol entity is
reinitializing itself such that the agent′s configuration or the protocol
entity implementation may be altered.
warmStart (1) A warmStart trap signifies that the sending protocol entity is
reinitializing itself such that neither the agent configuration nor the
protocol entity implementation is altered.
linkDown (2) A linkDown trap signifies that the sending protocol entity recognizes
a failure in one of the communication links represented in the agent′ s
configuration.
The Trap-PDU of type linkDown contains, as the first element of its
variable-bindings, the name and value of the ifIndex instance for the
affected interface.
linkUp (3) A linkUp trap signifies that the sending protocol entity recognizes that
one of the communication links represented in the agent′ s
configuration has come up.
The Trap-PDU of type linkUp contains as the first element of its
variable-bindings, the name and value of the ifIndex instance for the
affected interface.
authenticationFailure (4) An authenticationFailure trap signifies that the sending
protocol entity is the addressee of a protocol message that is not
properly authenticated. While implementations of SNMP must be
capable of generating this trap, they must also be capable of
suppressing the emission of such traps via an implementation-specific
mechanism.
egpNeighborLoss (5) An egpNeighborLoss trap signifies that an EGP neighbor for
whom the sending protocol entity was an EGP peer has been marked
down and the peer relationship no longer exists.
The Trap-PDU of type egpNeighborLoss contains, as the first element
of its variable-bindings, the name and value of the egpNeighAddr
instance for the affected neighbor.
enterpriseSpecific (6) An enterpriseSpecific trap signifies that the sending
protocol entity recognizes that some enterprise-specific event has
occurred. The specific-trap field identifies the particular trap which
occurred.
The IAB is the coordinating committee for Internet design, engineering and
management. It is formed by researchers and professionals with an interest in
the development of the Internet. The IAB focuses on the TCP/IP protocol suite
and extensions to the Internet system to support multiple protocol suites. All
IAB members are required to have at least one other major role in the Internet
community in addition to their IAB membership. The IAB has a chairman which
serves a term of two years. New members are appointed by the chairman of the
IAB with the advice and consent of the remaining IAB members.
The IAB has the following two primary subsidiary task forces:
1. Internet Engineering Task Force (IETF)
2. Internet Research Task Force (IRTF)
Each of these task forces is led by a chairman and guided by a Steering Group.
The IETF focuses on short and mid-term protocol and architectural issues to
make the Internet function properly. The IETF is a large open community of
network designers, operators, vendors, and researchers, divided into eight
technical areas, each with its own director. Each area has its own Working
Groups to explore situations. The IETF chairman and the eight area directors
make up the Internet Engineering Steering Group (IESG).
Each RFC has a number assigned to it by the RFC Editor who is a member of the
IAB. Each time an existing RFC text is revised, a new RFC number is assigned.
The new RFC then supersedes the older one, and this is clearly noted on the
front of the newer RFC. Another member of the IAB is the Internet Assigned
Numbers Authority (IANA). The IANA is responsible for managing the list of
values which make up the OBJECT IDENTIFIERS used in the Internet protocol
suite. For example, the IANA has assigned the number 1 to the RFC which
defines the Internet standard MIB. Thus the OBJECT IDENTIFIER for this RFC is
mgmt(1), or 1.3.6.1.2.1.
Phone: 1 800-365-3642
1 703-802-4535
Mail: [email protected]
• In electronic form, users may use anonymous FTP (password: guest) to the
host nic.ddn.mil (residing at 192.11.36.5) and retrieve files from the rfc
directory.
• If your site doesn′t have IP connectivity to the Internet community, but does
have electronic mail access, an electronic mail message can be sent to the
electronic mail address:
[email protected]
and in the subject field indicate the RFC number, for example, Subject: SEND
rfcs/rfc1130.txt.
• If you have access to the World Wide Web, the RFCs can be obtained from
the following address:
http://info.internet.isi.edu
again to the IETF for further work. Table 4 on page 248 lists the Internet
protocol state definitions.
Table 5 lists the Internet protocol status definitions mentioned in B.1.1, “Request
for Comments (RFC)” on page 246.
To verify that SNMP has started correctly you can use the command WRKACTJOB.
OS/400 SNMP starts the following jobs:
• QTMSNMP - SNMP agent processing job
• QTMSNPRCV - receives incoming SNMP messages on port 161 and passes
them to QTMSNMP for processing
• QSNMPSA - SNMP subagent job
These jobs can be found running under the QSYSWRK subsystem using the
WRKACTJOB(QSYSWRK) command. See Figure 184 on page 252.
Work with Active Jobs RALYAS4A
07/27/95 16:14:15
CPU %: 8.8 Elapsed time: 00:01:36 Active jobs: 70
Figure 184. SNMP Agent Jobs Running Under QSYSWRK
If you issued the STRTCP command to start SNMP and you cannot see the jobs
QSNMPSA, QTMSNMP and QTMSNMPRCV running under subsystem QSYSWRK,
check the following:
• Verify that the AUTOSTART parameter is set to *YES in the SNMP attributes.
• Make sure that no other application is trying to use UPD port 161. To verify
this, issue the following command:
NETSTAT
Select option 3 (Work with TCP/IP Connections)
Figure 185 on page 253 shows that SNMP is currently active.
Work with TCP/IP Connection Status
System: RALYAS4A
Local internet address . . . . . . . . . . . : *ALL
Figure 185. Working with TCP/IP Connections Status
To see the port numbers associated with each port name you should press
F14. Figure 186 shows the port number associated with SNMP port name.
Work with TCP/IP Connection Status
System: RALYAS4A
Local internet address . . . . . . . . . . . : *ALL
Figure 186. Port Numbers Associated with Port Names
Work with TCP/IP Interface Status
System: RALYAS4A
Type options, press Enter.
5=Display details 8=Display associated routes 9=Start 10=End
12=Work with configuration status
Figure 187. Status of Native TCP/IP Interfaces and AnyNet
You can identify the link by the internet address. If the link is a
native TCP/IP one, the line description name will be displayed in the
Line Description field. If the link is not native TCP/IP (Sockets over
SNA), *IPS will be displayed in the Line Description field. The
Interface Status field shows the status of the link. If the link is not
available (Inactive), option 9 (Start) can be used to make it available.
Another way to verify that the link is active is to use the PING
command. Refer to 4.2, “Verifying a TCP/IP Connection” on page 31
on how to use this command.
− Make sure that the internet address is that of the OS/400 SNMP agent
you intend to send a request to.
− Make sure the SNMP manager does not compare the response PDU
source IP address with the destination IP address in the PDU it sent. The
SNMP agent will send the response PDU to the IP address which sent
the original PDU. If the SNMP agent has more than one link via which to
send a response, it will choose one (maybe not the same IP address that
the request was sent to).
− Make sure OS/400 SNMP is using port 161 to receive requests. The
OS/400 SNMP agent uses UDP port 161 to receive requests from
managers. It doesn′t use UDP port 161 to send response PDUs to those
requests, due to technical reasons. The SNMP management application
should not check the response PDU port number. The SNMP manager
should not compare the source UDP port number in the response PDU
with the destination UDP port number in the request PDU it sent to the
OS/400 SNMP agent.
− Make sure that the SNMP manager is specifying a community name that
is known to the OS/400 SNMP agent. The community names available in
the OS/400 SNMP agent can be displayed using the following command:
CFGTCPSMNP
Select option 2 (Work with Communities for SNMP) and you′ll be able
to display a list of SNMP communities configured.
Considerations about communities:
Community names are case sensitive, so make sure that the
SNMP manager is specifying the community name correctly (for
example: PUBLIC and public are two different communities
names).
If the SNMP manager is an ASCII system, the Translate
Community name (ASCIICOM) parameter for the OS/400
community should be *YES. If the SNMP manager is an EBCDIC
system or the community name has one or more characters that
can not be displayed, the ASCIICOM parameter for the OS/400
community should be *NO. If the community name or the
ASCIICOM parameter needs to be changed, the community must
be removed by using the RMVCOMSNMP command, then add a new
community with the correct values using the ADDCOMSNMP
command. Make sure that the value for the Translate
Community name (ASCIICOM) parameter for the OS/400
community corresponds to the community name being specified
by the SNMP manager.
− Make sure that the IP address of the SNMP manager is defined in the
OS/400 community. The SNMP manager may be specifying a community
name that is known to the OS/400 SNMP agent, but the IP address of the
SNMP manager may not be part of the OS/400 community it specified. If
the system that the manager is running on has multiple IP addresses,
ensure that the IP address used to send UDP packets to the AS/400
agent is the one included in the IP addresses for the community name
configuration intended for the manager. The IP address of the SNMP
manager can be added to the community by using the CHGCOMSNMP
command.
− Make sure that the object access for the community is either *WRITE or
*READ. The object access can be changed using the CHGCOMSNMP
command. If the parameter OBJACC (object access) has a *WRITE value
then SET operations can be issued; if it has a *READ value, then only the
GET and GETNEXT operations can be issued; if it has a *NONE value,
Problem:
• If traps are not being received by an SNMP manager, the following should be
checked:
Solution:
− Make sure that the IP address of the SNMP manager to receive the trap
is specified correctly in the OS/400 SNMP attributes. The IP address of
the SNMP manager can be changed using the CHGSNMPA command. The
correct address should be specified in the TRPMGR parameter.
− Make sure that the trap community name specified is recognized by the
SNMP manager. The trap community name of the SNMP manager can
be changed using the CHGSNMPA command. The correct trap community
name should be specified in TRPMGR parameter.
The SNMP agent has the capability to log traps (in journal QSNMP in
library QUSRSYS). The log trap parameter can by changed using the
CHGSNMPA command. Verify (using the OS/400 SNMP logging capabilities)
that the expected trap PDUs are being sent by the OS/400 SNMP agent to
the correct SNMP manager. See chapter Chapter 12, “Journal for SNMP
Logging” on page 211 for information on how to use this function.
Problem:
• If authenticationFailure traps are not being received by an SNMP manager,
the following should be checked:
Solution:
− Make sure that the IP address of the SNMP manager to receive the trap
is specified correctly in the OS/400 SNMP attributes. The IP address of
the SNMP manager can be changed using the CHGSNMPA command. The
correct address should be specified in the TRPMGR parameter.
− Make sure that the trap community name specified is recognized by the
SNMP manager. The trap community name of the SNMP manager can
be changed using the CHGSNMPA command. The correct trap community
name should be specified in the TRPMGR parameter.
− Make sure that OS/400 SNMP is enabled to send authenicationFailure
traps. To enable OS/400 SNMP to send them, the CHGSNMPA command
should be used. *YES should be specified in the SNDAUTTRP parameter
of the CHGSNMPA command.
Verify (using the OS/400 SNMP logging capabilities) that the expected
trap PDUs are being sent by the OS/400 SNMP agent to the correct
SNMP manager. See Chapter 12, “Journal for SNMP Logging” on
page 211 for information on how to use this function.
Problem:
• If entries are not being made in journal QSNMP in library QUSRSYS for SET
requests received from the SNMP manager, the following should be checked:
Solution:
− Make sure that OS/400 SNMP is enabled to log SET requests. This
capability is enabled by using the CHGCOMSNMP command and specifying
*YES in the LOGSET parameter or by using the CHGCOMSNMP command and
specifying *SNMPATR in the LOGSET parameter and specifying *YES in
the LOGSET parameter for SET requests in OS/400 SNMP attributes by
using CHGSNMPA command.
Problem:
• If entries are not being made in journal QSNMP in library QUSRSYS for GET
or GETNEXT requests received from the SNMP manager, the following should
be checked:
Solution:
− Make sure that OS/400 SNMP is enabled to log GET requests. This
capability is enabled by using the CHGCOMSNMP command and specifying
*YES in the LOGGET parameter or by using the CHGCOMSNMP command and
specifying *SNMPATR in the LOGGET parameter and specifying *YES in
the LOGGET parameter in OS/400 SNMP attributes by using CHGSNMPA
command.
Problem:
• If entries are not being made in journal QSNMP in library QUSRSYS for traps
sent to the SNMP manager, the following should be checked:
Solution:
− Make sure that OS/400 SNMP is enabled to log traps. This capability is
enabled by using the CHGSNMPA command and specifying *YES in the
LOGTRP parameter of the OS/400 SNMP attributes.
Problem:
• If an SNMP agent job is getting numerous TCP4017 messages, then the
following should be checked:
Solution:
− Make sure that the remote name server values are correct.
− Make sure that the complete local domain name is specified for AS/400
(option 12 of CFGTCP).
Problem:
• If SNMP agent job is not starting (with the first error in the job log CPF7003)
then following action should be taken:
Solution:
− Turn off the logging for each SNMP community. Stop then restart the
SNMP agent using the ENDTCPSVR and STRTCPSVR commands. Delete
the journal receivers (DLTJRN JRN(QUSRSYS/QSNMP)) and the journal
(DLTJRNRCV JRNRCV(QUSRSYS/QSNMP*)). To complete the procedure,
use the CFGTCPSNMP command to restart SNMP logging.
− Make sure, that the complete local domain name is specified for the
AS/400 (option 12 of CFGTCP).
− Make sure that the IP address of the trap manager being specified is not
the one of this system. If trap forwarded was specified and the IP
address of the trap manager system specified in the OS/400 SNMP
attributes is the IP address of this system, then you should end the trap
manager by using the ENDTRPMGR command and restart it using the
STRTRPMGR command specifying *NO in the FWDTRP parameter. Or you
can remove the IP address of this system from the SNMP attributes by
using the command CHGSNMPA.
Problem:
• If the SNMP subagent is not able to successfully perform the register
function, the following could be the causes:
Solution:
− The subagent receives a NULL pointer from the mkDPIregister() routine.
A NULL return from the mkDPIregister() indicates some parameter error.
In order to solve this, the subagent′s log should be checked for
exceptions. If any are found, they should be corrected; the subagent
code should be rebuilt and the call should be tried again. If no
exceptions are found, the parameters should be verified.
− The subagent received an SNMP_ERROR_DPI_otherError (101) in the DPI
response packet from the agent. The most common cause of this error
in response to a DPI register packet is that the subtree OID did not end
with ″.″. In order to avoid this, a subtree OID should end with a ″.″.
− The subagent received an SNMP_ERROR_DPI_alreadyRegistered (103) in
the DPI response packet from the agent. The most common cause of
this error is that the subagent attempted to register a subtree that would
cause a protected subtree to be affected. In order to solve this, the
subtree to be registered should not be above, at, or within one of the
SNMP agent′s protected subtrees.
− The subagent received an SNMP_ERROR_DPI_highPriorityRegistered
(104) in the DPI response packet from the agent. In order to solve this,
the subtree registration should be re-requested with a higher priority or
zero (which requests the highest). If the already registered subagent has
priority zero (get the subagent MIB saTstatus for the subtree), then there
is no higher priority to request, so the other subtree should be
unregistered or its subagent ended before the subtree can be registered.
Problem:
• If the SNMP subagent has successfully done contact, open and register, but
does not receive any DPI packets (from the SNMP agent) the following can
be the possible causes:
Solution:
− The SNMP agent job is not running. In order to solve this, the SNMP
agent job (QTMSNMP) should be running under subsystem QSYSWRK
and responding to PDUs in a normal way. This can be verified using the
WRKACTJOB command.
− There have not been any SNMP PDUs for the subtrees registered by the
subagent. In order to avoid this, it should be verified that an SNMP PDU
(GET, GETNEXT or SET) for an OID in the subagent′s subtree has been
sent to the SNMP agent.
− The subagent or the subagent′s subtree registration status is not valid
(1). In order to solve this, the status OIDs in the subagent tree should
have a valid value (1). These OIDs are in the SNMP subagent MIB in the
saTable and saTreeTable, and are the saStatus OID (for the right
subagent) and saTstatus OID (for the right subtree). (The ASN.1
definitions for the subagent MIB can be found in QSYS/QANMMIB,
member IBMSNMPSA.)
Problem:
• If the SNMP subagent works for a while, but then mkDPIset() returns NULL
when trying to build structure for a response packet, this means there is
insufficient memory to build the internal structure for the DPI packet because
it has not been freed after having been dynamically allocated. In order to
solve this, the fDPIset() routine should be called so that memory use does
not monotonically increase while the subagent is running. If some other
exception occurred, messages in the joblogs for the SNMP agent job
(QTMSNMP) and subagent job should be looked for, corrected and the
operation retried again.
Problem:
• If the SNMP subagent works for a while, but then pDPIpacket() returns NULL
when trying to parse a new incoming package, this means there is
insufficient memory to build the internal structure for the DPI packet,
because it has not been freed, after having been dynamically allocated. In
order to solve this, the fDPIparse() routine should be called so that memory
use does not monotonically increase while the subagent is running. If some
other exception occurred, messages in the joblogs for the SNMP agent job
(QTMSNMP) and subagent job should be looked for, corrected and the
operation retried again.
Problem:
• If the SNMP subagent occasionally gets DPI unregister or close packet from
the agent with reason_code of SNMP_UNREGISTER_timeout or
SNMP_CLOSE_timeout, this means the subagent has taken too long to
respond to some SNMP request. That is, longer than the timeout value used
by the subagent in the mkDPIopen() or mkDPIregister() calls. In order to
solve this, re-open or re-register with a longer timeout or a smaller
max_varBinds value used in the mkDPIopen() call.
Important note: the entire SNMP agent waits for up to the timeout value for a
response to each DPI request. If requests for a particular OID or subagent
subtree takes a long time (relatively) for the subagent to process, then
consideration should be given to registering that OID or subtree separately
(by the same subagent), with a appropriately longer timeout.
Problem:
• The SNMP subagent gets snmpsa_RC_err return code which is caused by a
run-time exception, which is not covered by some other, more specific,
return code. In order to solve this, messages in the joblogs for both the
SNMP agent job (QTMSNMP) and the subagent job (that received the
snmpsa_RC_err return code) should be checked for exceptions, corrected
and the subagent API calls retried. (By its nature this return code is fairly
rare, and the cause for the exception is usually obvious in either the agent or
the subagent job.)
This appendix provides syntax diagrams and explanations of the CL commands for AS/400 SNMP.
(P)
──ADDCOMSNMP──COM(──community-name──)──── ─┬────────────────────────┬─────────────────────────────
│ ┌─*YES─┐ │
└─ASCIICOM(──┴─*NO──┴──)─┘
──┬───────────────────────────────────────────────────┬──┬──────────────────────────┬─────────────
│ ┌─*ANY───────────────────────────┐ │ │ ┌─*SNMPATR─┐ │
│ │ ┌──
────────────────────────────┐ │ │ └─OBJACC(──┼─*READ────┼──)─┘
(1)
└─INTNETADR(──┴───manager-internet-address─── ┴─┴──)─┘ ├─*WRITE───┤
└─*NONE────┘
──┬──────────────────────────┬──┬──────────────────────────┬─────────────────────────────────────
│ ┌─*SNMPATR─┐ │ │ ┌─*SNMPATR─┐ │
└─LOGSET(──┼─*YES─────┼──)─┘ └─LOGGET(──┼─*YES─────┼──)─┘
└─*NO──────┘ └─*NO──────┘
Notes:
P
All parameters preceding this point can be specified in positional form.
1
A maximum of 300 repetitions.
D.1.1 Purpose
The Add Community for SNMP ( ADDCOMSNMP) command defines an SNMP
community profile and adds it to the SNMP agent community list. An SNMP
agent uses a community profile to determine whether or not to honor a request
sent by an SNMP manager. The community profile consists of a community
name, an object access specification, and a list of the SNMP managers that are
part of the community. The combination of the community name (COM) and the
translate to ASCII community (ASCIICOM) parameters defines a community.
Multiple community profiles, each having a unique community name, may exist
in the SNMP agent community list at one time. Similarly, the same internet
address may appear in more than one community profile.
The OS/400* SNMP agent does not support community views. A view is a subset
of the objects in the Management Information Base (MIB). Each OS/400
community consists of all of the objects in the MIB.
INTNETADR
Specifies the internet addresses of the SNMP managers that are part of this
community.
*ANY: Allow any SNMP manager to be part of this community.
Manager-internet-address: Specify the internet address of the SNMP
manager. The internet address is specified in the form nnn.nnn.nnn.nnn ,
where nnn is a decimal number ranging from 0 through 255. An internet
address is not valid if it has a value of all binary ones or all binary zeros for
the network identifier (ID) portion or the host ID portion of the address. If the
internet address is entered from a command line, the address must be
enclosed in apostrophes. Up to 300 unique internet addresses may be
specified. The same internet address may appear in more than one
community profile.
OBJACC
Specifies the object access for the community.
*SNMPATR: The object access defined with the Change SNMP Attributes
( CHGSNMPA) command is used for this community.
*READ: Allow SNMP managers that are part of this community to read all
management information base (MIB) objects with GET or GETNEXT requests.
Modification of MIB objects by SNMP managers is not permitted.
*WRITE: Allow SNMP managers that are part of this community to change
all MIB objects that are able to change with SET requests. Specifying
*WRITE implies *READ access.
*NONE: Do not allow SNMP managers that are part of this community any
access to MIB objects.
LOGSET
This specifies whether SET requests from SNMP managers in this community
are logged in journal QSNMP in library QUSRSYS.
*SNMPATR: The value defined with the Change SNMP Attributes ( CHGSNMPA)
command is used for this community.
*YES: SET requests are logged.
*NO: SET requests are not logged.
LOGGET
This specifies whether GET requests and GETNEXT requests from SNMP
managers in this community are logged in journal QSNMP in library
QUSRSYS.
*SNMPATR: The value defined with the Change SNMP Attributes ( CHGSNMPA)
command is used for this community.
*YES: GET requests and GETNEXT requests are logged.
*NO: GET requests and GETNEXT requests are not logged.
This command adds the community ITSO to the SNMP agent community list.
SNMP managers with internet addresses 8.6.5.4 and 8.6.5.3 are the only
managers in the community and are able to change all MIB objects.
Figure 188 on page 270 shows the prompt screen for the ADDCOMSNMP command,
which you can see on the AS/400 by typing the command ADDCOMSNMP at the
command line and pressing PF4 the Prompt key.
Community name . . . . . . . . .
Bottom
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys
Figure 188. ADDCOMSNMP Prompt Panel
──CFGTCPSNMP────────────────────────────────────────────────────────────────────────────────────
D.2.1 Purpose
The Configure TCP/IP SNMP ( CFGTCPSNMP) command is used to display a menu
that allows a user to define or change the Simple Network Management Protocol
(SNMP) configuration. The menu options include:
• Change SNMP Attributes
• Work with Communities for SNMP
It is not necessary to run the CFGTCPSNMP command before using the SNMP agent.
The SNMP agent is shipped with a community that has the following
characteristics:
Community Name public
ASCIICOM *YES
INTNETADR *ANY
OBJACC *READ
LOGSET *NO
LOGGET *NO
See the Change SNMP Attributes ( CHGSNMPA) command for the default values for
SNMP attributes.
Figure 189 on page 272 shows the Configure TCP/IP SNMP menu this command
displays after typing CFGTCPSNMP on the AS/400 command line and pressing the
Enter key.
Selection or command
===>
(P)
──CHGCOMSNMP──COM(──community-name──)──── ─┬────────────────────────┬─────────────────────────────
│ ┌─*YES─┐ │
└─ASCIICOM(──┴─*NO──┴──)─┘
──┬───────────────────────────────────────────────────┬──┬──────────────────────────┬─────────────
│ ┌─*SAME──────────────────────────┐ │ │ ┌─*SAME────┐ │
└─INTNETADR(──┼─*ANY───────────────────────────┼──)─┘ └─OBJACC(──┼─*SNMPATR─┼──)─┘
│ ┌──
────────────────────────────┐ │ ├─*READ────┤
(1)
└───manager-internet-address─── ┴─┘ ├─*WRITE───┤
└─*NONE────┘
──┬──────────────────────────┬──┬──────────────────────────┬─────────────────────────────────────
│ ┌─*SAME────┐ │ │ ┌─*SAME────┐ │
└─LOGSET(──┼─*SNMPATR─┼──)─┘ └─LOGGET(──┼─*SNMPATR─┼──)─┘
├─*YES─────┤ ├─*YES─────┤
└─*NO──────┘ └─*NO──────┘
Notes:
P
All parameters preceding this point can be specified in positional form.
1
A maximum of 300 repetitions.
D.3.1 Purpose
The Change Community for SNMP ( CHGCOMSNMP) command changes an SNMP
community profile in the SNMP agent community list. An SNMP agent uses a
community profile to determine whether or not to honor a request sent by an
SNMP manager. The community profile consists of a community name, an
object access specification, and a list of the SNMP managers that are part of the
community. The combination of the community name (COM) and the translate to
ASCII community (ASCIICOM) parameters defines a community.
INTNETADR
These are the internet addresses of the SNMP managers that are part of this
community.
*SAME: The value does not change.
*ANY: Allow any SNMP manager to be part of this community.
Manager-internet-address: Specify the internet address of the SNMP
manager. The internet address is specified in the form nnn.nnn.nnn.nnn ,
where nnn is a decimal number ranging from 0 through 255. An internet
address is not valid if it has a value of all binary ones or all binary zeros for
the network identifier (ID) portion or the host ID portion of the address. If the
internet address is entered from a command line, the address must be
enclosed in apostrophes. Up to 300 unique internet addresses may be
specified. The same internet address may appear in more than one
community profile.
OBJACC
This specifies the object access for the community.
*SAME: The value does not change.
*SNMPATR: The object access defined with the Change SNMP Attributes
( CHGSNMPA) command is used for this community.
*READ: Allow SNMP managers that are part of this community to read all
management information base (MIB) objects. Modification of MIB objects by
SNMP managers is not permitted.
*WRITE: Allow SNMP managers that are part of this community to change
all MIB objects that can be changed. Specifying *WRITE implies *READ
access.
*NONE: Do not allow SNMP managers that are part of this community to
access any MIB objects.
LOGSET
This specifies whether SET requests from SNMP managers in this community
are logged in journal QSNMP in library QUSRSYS.
*SAME: The value does not change.
*SNMPATR: The value defined with the Change SNMP Attributes
(CHGSNMPA) command is used for this community.
*YES: SET requests are logged.
*NO: SET requests are not logged.
LOGGET
This specifies whether GET requests and GETNEXT requests from SNMP
managers in this community are logged in journal QSNMP in library
QUSRSYS.
*SAME: The value does not change.
*SNMPATR: The value defined with the Change SNMP Attributes ( CHGSNMPA)
command is used for this community.
*YES: GET requests and GETNEXT requests are logged.
*NO: GET requests and GETNEXT requests are not logged.
On the AS/400 you can see the screen for the command CHGCOMSNMP as shown in
Figure 190, by typing the command on the command line and pressing PF4 the
Prompt key.
Community name . . . . . . . . .
Bottom
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys
Figure 190. CHGCOMSNMP Prompt Panel
──CHGSNMPA──┬────────────────────────────────────┬──┬─────────────────────────────────┬──────────
│ ┌─*SAME──────────┐ │ │ ┌─*SAME───────────┐ │
└─SYSCONTACT(──┼─*NONE──────────┼──)─┘ └─SYSLOC(──┼─*NONE───────────┼──)─┘
├─*CNTINF────────┤ ├─*CNTINF─────────┤
└─system-contact─┘ └─system-location─┘
──┬──────────────────────────┬──┬──────────────────────────┬──┬────────────────────────┬──────────
│ ┌─*SAME─┐ │ │ ┌─*SAME─┐ │ │ ┌─*SAME──┐ │
└─SNDAUTTRP(──┼─*YES──┼──)─┘ └─AUTOSTART(──┼─*YES──┼──)─┘ └─OBJACC(──┼─*READ──┼──)─┘
└─*NO───┘ └─*NO───┘ ├─*WRITE─┤
└─*NONE──┘
──┬───────────────────────┬──┬───────────────────────┬──┬───────────────────────┬─────────────────
│ ┌─*SAME─┐ │ │ ┌─*SAME─┐ │ │ ┌─*SAME─┐ │
└─LOGSET(──┼─*YES──┼──)─┘ └─LOGGET(──┼─*YES──┼──)─┘ └─LOGTRP(──┼─*YES──┼──)─┘
└─*NO───┘ └─*NO───┘ └─*NO───┘
──┬────────────────────────────────────────────────────────────────────────────────────┬─────────
│ ┌─*SAME──────────────────────────────────────────────────────────────┐ │
└─TRPMGR(──┼─*NONE──────────────────────────────────────────────────────────────┼──)─┘
│ ┌──
────────────────────────────────────────────────────────────────┐ │
(1)
└───(──manager-internet-address──community-name──┬──────────┬──)─── ┴─┘
│ ┌─*YES─┐ │
└─┴─*NO──┴─┘
Note:
1
A maximum of 300 repetitions.
D.4.1 Purpose
The Change SNMP Attributes ( CHGSNMPA) command changes values and options
used by the OS/400 SNMP agent. The command is also used to specify which
SNMP managers receive traps generated by the local AS/400 system.
The SNMP agent is shipped with the following values for the SNMP attributes.
Keyword Value
SYSCONTACT *NONE
SYSLOC *NONE
SNDAUTTRP *YES
AUTOSTART *NO
OBJACC *READ
LOGSET *NO
LOGGET *NO
LOGTRP *NO
TRPMGR *NONE
SYSLOC
This specifies the physical location of this AS/400 system. This value is used
only by SNMP-specific functions. This value may be read or modified by an
authorized SNMP manager.
*SAME: The value does not change.
*NONE: No system location information exists.
*CNTINF: The value is obtained from the service contact information
specified by using the Work with Contact Information ( WRKCNTINF) command.
The value obtained consists of the mailing address.
System-location: Specify the physical location of the system. All of the
characters specified must be able to be translated into the ASCII character
set.
SNDAUTTRP
This specifies whether the SNMP agent may send any authenticationFailure
traps to any defined SNMP managers. An authenticationFailure trap is sent
by the SNMP agent if a request is received from an SNMP manager that
contains a community name that is not recognized by the SNMP agent. This
trap is only sent when SNDAUTTRP is *YES and when at least one trap
manager has been defined. This value may also be read or modified by an
authorized SNMP manager.
*SAME: The value does not change.
*YES: authenticationFailure traps may be sent.
*NO: authenticationFailure traps are not sent.
AUTOSTART
This specifies whether the SNMP agent is started when the STRTCP command
runs.
*SAME: The value does not change.
*YES: The SNMP agent is started when the STRTCP command runs.
*NO: The SNMP agent is not started when the STRTCP command runs.
OBJACC
This specifies the default object access for SNMP communities.
*SAME: The value does not change.
*READ: Allow SNMP managers that are part of a community to read all
Management Information Base (MIB) objects. Modification of MIB objects by
SNMP managers is not permitted.
*WRITE: Allow SNMP managers that are part of a community to modify all
MIB objects that can be modified. Specifying *WRITE implies *READ access.
*NONE: Do not allow SNMP managers that are part of a community to
modify any MIB objects.
LOGSET
This specifies the default value for whether SET requests from SNMP
managers in a community are logged in journal QSNMP in library QUSRSYS.
*SAME: The value does not change.
*YES: SET requests are logged.
*NO: SET requests are not logged.
LOGGET
This specifies the default value for whether GET requests and GETNEXT
requests from SNMP managers in a community are logged in journal QSNMP
in library QUSRSYS.
*SAME: The value does not change.
*YES: GET requests and GETNEXT requests are logged.
*NO: GET requests and GETNEXT requests are not logged.
LOGTRP
This specifies whether traps are logged in journal QSNMP in library
QUSRSYS.
*SAME: The value does not change.
*YES: Traps are logged.
*NO: Traps are not logged.
TRPMGR
This specifies which SNMP managers receive traps generated by this AS/400
system.
*SAME: The value does not change.
*NONE: No SNMP managers receive traps.
Element 1: Manager internet Address
Manager-internet-address: Specify the internet address of the SNMP
manager. The address must be of the form nnn.nnn.nnn.nnn , where nnn is a
decimal number ranging from 0 to 255. This address is independent of the
manager internet address specified on the ADDCOMSNMP and CHGCOMSNMP
commands.
Element 2: Community Name
Community-name: Specify the SNMP community name to be placed in the
traps sent to this SNMP manager. The community name specified in this
element is independent of the community name specified on the ADDCOMSNMP,
This command changes the system contact information and specifies that the
SNMP agent should not start when the STRTCP command runs. All other values
are unchanged.
This command causes any traps generated by the local AS/400 system to be
sent to SNMP managers that have internet protocol addresses 9.8.7.6 and 9.8.7.5.
Community name TRAPCOMMUNITY is placed in traps sent to 9.8.7.6, and
community name TRAPCOMMUNITY2 is placed in traps sent to 9.8.7.5. For both
managers the community name is translated to ASCII characters before being
placed in the trap.
Figure 191 on page 280 shows the CHGSNMPA command prompt screen, which you
can view by typing CHGSNMPA at the AS/400 command line and pressing PF4.
Notice that the first prompt screen indicates that there is more information on
the next screen.
More...
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys
Figure 191. CHGSNMPA Prompt Panel Part 1
Trap managers:
Manager internet address . . . *NONE
Community name . . . . . . . .
(P)
──ENDTCPSVR──┬─────────────────────────────────┬─── ─────────────────────────────────────────────
│ ┌─*ALL────────────┐ │
│ │ ┌──
───────────┐ │ │
(1)
└─SERVER(──┴──┬─*SNMP───┬┴── ─┴──)─┘
├─*TELNET─┤
├─*FTP────┤
├─*SMTP───┤
├─*LPD────┤
├─*HTTP───┤
├─*WSG────┤
└─*POP────┘
Notes:
1
A maximum of 8 repetitions.
P
All parameters preceding this point can be specified in positional form.
D.5.1 Purpose
The ENDTCPSVR command is used to end the TCP/IP application server jobs that
are specified in the SERVER parameter. If the jobs have any current active
connections, these connections are ended immediately. If the ENDTCPSVR
command is used to end a server that is not active, a diagnostic message is
returned.
This command ends all active TCP/IP application server jobs running in the
QSYSWRK subsystem.
To view the ENDTCPSVR prompt screen shown in Figure 193, type the command at
the AS/400 command line and press PF4.
Bottom
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys
Figure 193. ENDTCPSVR Command Prompt
If PF4 is pressed on this screen while the cursor is placed on the first prompt
line, then the panel shown in Figure 194 on page 283 will be displayed.
Single Values
*ALL
Other Values
*SNMP
*TELNET
*FTP
*SMTP
*LPD
*HTTP
*WSG
*POP
If a ″ + ″ symbol is entered on the prompt line, then the panel in Figure 195 will
be displayed.
Bottom
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys
Figure 195. ENDTCPSVR Command Prompt for Additional SERVER Parameter Values
──ENDTRPMGR─────────────────────────────────────────────────────────────────────────────────────
D.6.1 Purpose
The End Trap Manager ( ENDTRPMGR) command allows you to end the OS/400
SNMP Manager Framework trap manager job.
──STRTCPSVR──┬─────────────────────────────────┬──┬──────────────────────────┬──────────────────
(2)
│ ┌─*ALL──────────┐ │ └─RESTART(──┬─*NONE─┬──)─── ┘
│ │ ┌──
───────────┐ │ │ └─*HTTP─┘
(1)
└─SERVER(──┴──┬─*SNMP───┬┴─┴──)─── ┘
├─*TELNET─┤
├─*FTP────┤
├─*SMTP───┤
├─*LPD────┤
├─*HTTP───┤
├─*WSG────┤
└─*POP────┘
Notes:
1
A maximum of 8 repetitions.
2
This parameter only takes effect if SERVER(*HTTP) is specified and HTTP server is running.
Otherwise it will be ignored.
D.7.1 Purpose
The Start TCP/IP Server ( STRTCPSVR) command is used to start the TCP/IP application servers that are
shipped with the Operating System/400 product or the TCP/IP Connectivity Utilities/400 product. This
command starts TCP/IP jobs in the QSYSWRK subsystem for the application servers specified with the
server (SERVER) parameter. The number of server jobs started by this command is specified, where
appropriate, in the configuration for each TCP/IP application.
All servers have an autostart (AUTOSTART) parameter on the associated configuration command, for
example, Change FTP Attributes ( CHGFTPA). This parameter indicates if the server should be started
when the Start TCP/IP ( STRTCP) command is entered. The STRTCPSVR command ignores the value of a
server′s autostart parameter.
Note: Having more than one FTP server job running can improve the performance of initiating a
session when multiple users attempt to connect to the server in a short period of time.
*SMTP: The Simple Mail Transfer Protocol (SMTP) client and server jobs are started. Additional
SMTP client and server jobs cannot be started. Subsequent usage of the STRTCPSVR SERVER(*SMTP)
command results in a diagnostic message if the SMTP server jobs have already been started.
*LPD: The line printer daemon (LPD) servers are started based on the number of servers
configured with the Change LPD Attributes ( CHGLPDA) command. Subsequent usage of the STRTCPSVR
SERVER(*LPD) command starts one additional LPD server.
*HTTP: The World Wide Web Hyper Text Transfer Protocol (HTTP) servers are started based on the
number of servers specified in CHGHTTPA command. Subsequent use of STRTCPSVR SERVER(*HTTP)
results in a diagnostic message if the HTTP server has already been started.
*WSG: The HTML WSG server is started. Subsequent use of STRTCPSVR SERVER(*WSG) results in a
diagnostic message if the WSG server has already been started.
*POP: The Post Office (POP) Version 3 servers are started, based on the number of servers
configured with CHGPOPA command. Subsequent use of STRTCPSVR SERVER(*POP) results in a
diagnostic message if the POP server has already been started.
Note: LPD works most efficiently when two or more servers are running. Running only one server
works, but no jobs can be received while a current job is running. If a large print job is
running, new jobs have to wait before LPD is ready to accept any new line printer requester
(LPR) requests.
RESTART
Specifies whether to restart the selected server, when STRTCPSVR is issued. The SERVER
parameter specified must be *ALL or *HTTP, or this parameter is ignored (at this time only *HTTP
server is supported with the RESTART parameter).
This command starts all of the TCP/IP application servers that have been configured to be started. For
example, if the Change FTP Attributes ( CHGFTPA) command had previously been used to configure two
FTP servers, both servers would be started when STRTCPSVR is issued. This example is also true for
other TCP/IP application servers.
Where appropriate, the number of servers to start is based on the number of servers configured for the
server being started. The configuration option to automatically start the servers (AUTOSTART) is
ignored by the STRTCPSVR command. The AUTOSTART parameter is used only by the STRTCP command.
This command starts the TCP/IP TELNET application server. If the TELNET server had been previously
started, one additional TELNET server job would be started.
Figure 196 on page 287 shows the prompt screen for the STRTCPSVR command. To view this panel on
your AS/400, type STRTCPSVR on the command AS/400 line and press PF4.
Start TCP/IP Server (STRTCPSVR)
Bottom
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys
Figure 196. STRTCPSVR Command Prompt
If PF4 is pressed on this screen while the cursor is placed on the first prompt line, then the panel
shown in Figure 197 will be displayed.
Specify Value for Parameter SERVER
Single Values
*ALL
Other Values
*SNMP
*TELNET
*FTP
*SMTP
*LPD
*HTTP
*WSG
*POP
If a ″ + ″ symbol is entered on the prompt line, then the panel in Figure 198 on page 288 will be
displayed.
Specify More Values for Parameter SERVER
Bottom
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys
Figure 198. STRTCPSVR Command Prompt for Additional SERVER Parameter Values
──STRTRPMGR──┬──────────────────────┬───────────────────────────────────────────────────────────
│ ┌─*NO──┐ │
└─FWDTRP(──┴─*YES─┴──)─┘
D.8.1 Purpose
The Start Trap Manager ( STRTRPMGR) command allows you to start the OS/400
SNMP Manager Framework trap manager job. An optional Forward Trap
parameter may be specified which enables traps that are received from other
systems to be forwarded to other Network Management stations. The trap
manager uses the trap generation and sending facilities provided in the Simple
Network Management Protocol (SNMP) agent and Distributed Protocol Interface
(DPI).
This command starts the trap manager job. Traps received by the trap manager
are enqueued only.
This command starts the trap manager job. Traps received by the trap manager
are enqueued and forwarded.
Figure 199 on page 290 shows the prompt screen for the STRTRPMGR command.
To view this panel on your AS/400, type STRTRPMGR on the AS/400 command line
and press PF4.
Bottom
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys
Figure 199. STRTRPMGR Command Prompt
(P)
──RMVCOMSNMP──COM(──community-name──)──── ─┬────────────────────────┬────────────────────────────
│ ┌─*YES─┐ │
└─ASCIICOM(──┴─*NO──┴──)─┘
Note:
P
All parameters preceding this point can be specified in positional form.
D.9.1 Purpose
The Remove Community for SNMP ( RMVCOMSNMP) command is used to remove a
Simple Network Management Protocol (SNMP) community profile from the SNMP
agent community list. The community profile consists of a community name, an
object access specification, and a list of the SNMP managers that are part of the
community. The combination of the community name (COM) and the translate to
ASCII community (ASCIICOM) parameters defines a community.
This command removes community OCOEE from the SNMP agent community list.
If you wish to view the prompt screen for the RMVCOMSNMP command, type the
command on the AS/400 command line and press PF4. The resulting screen is
shown in Figure 200 on page 292.
Community name . . . . . . . . .
Bottom
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys
Figure 200. RMVCOMSNMP Prompt Panel
In Chapter 5, “NetView for OS/2” on page 41 we talked about the NetView for
OS/2 discovery process. In this appendix we will explain how to control this
discovery process using a combination of seed files and mask files.
In the following example we will create a seed file to discover the two AS/400s,
RALYAS4A and RALYAS4B.
To create a seed file you need to edit a NetView for OS/2 file called
SEEDLIST.LOG in the \anv2\etc directory; in our case the path was
D:\anv2\etc\seedlist.log.
Edit the file to include those systems you wish to discover at startup. You are
allowed to use a # to comment out unwanted addresses. See Figure 201 for our
resultant seed file.
For the discovery process to start using this seed file we have to edit the
LNTCPIP.LRF file. The path for this on our system is D:\anv2\etc\lrf\lntcpip.lrf.
When you have finished editing the file, save it back to the LRF directory.
SVSTOP tcpipdiscovery
SVADDOBJ LNTCPIP.LRF
SVSTART tcpipdiscovery
Without a mask file, the All Systems folder will become populated with all the IP
systems in your network and become unmanageable. See Figure 203 on
page 295 for an example of our All Systems folder before we started using a
mask file.
To create a mask file you will need to edit file LNTCPIP.MSK. On our system it
is found in path D:\anv2\etc\lntcpip.msk. Once changed, the new mask will take
effect, however, all systems already discovered will remain in the discovery
database.
The default mask is *.*.*.*. That is, all systems are added to the folder.
Appendix F. SNMPv2
F.1 Security
In the original SNMP, the administrative relationship between an agent and one
or more management applications was identified by a community. The
community relationship involved the following three aspects:
• Identification of the entities authorized to request management operations
• Identification of the type of management operation that is allowed (read,
write or none)
• Identification of management information that is available to the operations
(MIB views)
Note: MIB views are not implemented in OS/400 SNMP support.
For more information on how to request RFCs refer to B.1.1, “Request for
Comments (RFC)” on page 246.
Information in this book was developed in conjunction with use of the equipment
specified, and is limited in application to those specific hardware and software
products and levels.
IBM may have patents or pending patent applications covering subject matter in
this document. The furnishing of this document does not give you any license to
these patents. You can send license inquiries, in writing, to the IBM Director of
Licensing, IBM Corporation, 500 Columbus Avenue, Thornwood, NY 10594 USA.
Licensees of this program who wish to have information about it for the purpose
of enabling: (i) the exchange of information between independently created
programs and other programs (including this one) and (ii) the mutual use of the
information which has been exchanged, should contact IBM Corporation, Dept.
600A, Mail Drop 1329, Somers, NY 10589 USA.
The information contained in this document has not been submitted to any
formal IBM test and is distributed AS IS. The use of this information or the
implementation of any of these techniques is a customer responsibility and
depends on the customer′s ability to evaluate and integrate them into the
customer′s operational environment. While each item may have been reviewed
by IBM for accuracy in a specific situation, there is no guarantee that the same
or similar results will be obtained elsewhere. Customers attempting to adapt
these techniques to their own environments do so at their own risk.
Reference to PTF numbers that have not been released through the normal
distribution process does not imply general availability. The purpose of
including these reference numbers is to alert IBM customers to specific
AIX AnyNet
APPN AS/400
AT C/400
Client Access/400 Client Access
IBM NetView
Operating System/400 OS/2
OS/400 RS/6000
400
Microsoft, Windows, Windows NT, and the Windows 95 logo are trademarks
or registered trademarks of Microsoft Corporation.
The publications listed in this section are considered particularly suitable for a
more detailed discussion of the topics covered in this redbook.
For information on ordering these ITSO publications see “How to Get ITSO
Redbooks” on page 303.
This information was current at the time of publication, but is continually subject to change. The latest
information may be found at http://www.redbooks.ibm.com.
Redpieces
For information so current it is still in the process of being written, look at ″Redpieces″ on the Redbooks Web
Site ( http://www.redbooks.ibm.com/redpieces.htm). Redpieces are redbooks in progress; not all redbooks
become redpieces, and sometimes just a few chapters will be published this way. The intent is to get the
information out much quicker than the formal publishing process allows.
IBMMAIL Internet
In United States: usib6fpl at ibmmail [email protected]
In Canada: caibmbkz at ibmmail [email protected]
Outside North America: dkibmbsh at ibmmail [email protected]
• Telephone orders
Redpieces
For information so current it is still in the process of being written, look at ″Redpieces″ on the Redbooks Web
Site ( http://www.redbooks.ibm.com/redpieces.htm). Redpieces are redbooks in progress; not all redbooks
become redpieces, and sometimes just a few chapters will be published this way. The intent is to get the
information out much quicker than the formal publishing process allows.
Company
Address
We accept American Express, Diners, Eurocard, Master Card, and Visa. Payment by credit card not
available in all countries. Signature mandatory for credit card payment.
Index
DPI requests (continued)
A DPI Commit 99, 102
Abstract Syntax Notation.1 (ASN.1) 15 DPI Connect 96
Access mode 239 DPI Get 97
Access policy 239 DPI Getnext 98
ADDCOMSNMP (Add Community for SNMP) DPI Open 96
Command 267 DPI Response 97
Advanced Peer-To-Peer Networking (APPN) MIB 26, DPI Set 98
159 DPI Undo 99, 102
Agent 6, 12, 24 DPI Unregister 102
AnyNet 227 DPI_PACKET_LEN() 106
Application entities 238 Draft Standard Protocol 248
Architecture 9
AS/400 as a trap generator 205
ASN.1 notation 16 E
Authentic SNMP message 238 egpNeighborLoss trap 244
Authentication scheme 238 Elective Protocol 248
Authentication service 238 ENDTCPSVR (End TCP/IP Server) Command 281
authenticationFailure trap 244 ENDTRPMGR (End Trap Manager) Command 284
Enteprise-specific MIBs 14, 159
enterpriseSpecific trap 244
B Ethernet-like Interface MIB 24, 150
bibliography 301 Experimental MIBs 14
Experimental Protocol 248
C
CFGTCPSNMP (Configure TCP/IP SNMP) F
Command 271 FDDI MIB 25, 153
CHGCOMSNMP (Change Community for SNMP) fDPIparse() 106
Command 273 fDPIset() 106
CHGSNMPA (Change SNMP Attributes) Frame Relay MIB 25, 154
Command 276
Client Access Optimized for OS/2 197
Client Management MIB 26, 137, 170 G
CMIP over TCP (CMOT) 4 GET 20
coldStart trap 244 GET-RESPONSE 21
Common Management Information Protocol GETNEXT 20
(CMIP) 2, 4 GetNextRequest-PDU 242
Common Management Information Service (CMIS) 4 GetRequest-PDU 241
Community 6, 238 GetResponse-PDU 243
Community name 238
Community profile 239
Connection-Oriented 3 H
Connectionless 3 Heterogeneous Network 6
connectSNMP() 104, 106 Historic Protocol 248
Host Resources MIB 150, 189
Host Resources MIB and AS/400 189
D Host Resources MIB and Client Access 197
debugDPI() 106
disconnectSNMP() 105, 106
Distributed Protocol Interface (DPI) 91 I
DPI 2.0 MIB 27, 158 IBM Enterprise MIBs 26
DPI REGISTER 103 IBMAPPN 219
DPI requests IBMCLTM 219
DPI Close 102
P
L pDPIpacket() 98, 106
Leaf node 16 Problem Determination 251
Limited Use Protocol 248 Proposed Standard Protocol 248
linkDown trap 244 Protocol 3
linkUp trap 244 Protocol Data Unit 10, 241
Protocol entities 238
Proxy access policy 239
M Proxy Agent 6, 239
Management Information Base (MIB) 6
Manager 6, 13, 27, 75
Manager APIs 75 Q
Mask file 294 QANMMIB 219
Messages 240 QSNMP Journal 211
MIB Object 6
MIB view 238
MIB-II 24, 148 R
mkDPIAreYouThere() 106 receiveDPIpacket() 105, 106
mkDPIclose() 103, 106 Recommended Protocol 248
mkDPIopen() 103, 106 Remote Workstation MIB 26, 171
mkDPIregister() 106 Request For Comments (RFC) 7, 246
mkDPIresponse() 98, 106 Request/Response Protocol 7, 11
mkDPIset() 102, 106 Required Protocol 248
mkDPItrap() 104, 106 RFC1155 3, 16, 23, 172, 178, 189
mkDPIunregister() 106 RFC1157 3, 23
Model 10 RFC1212 3, 23, 172, 178, 189
RFC1213 3, 23, 24, 147, 149, 172, 178, 189
RFC1215 23, 178
N RFC1231 25, 147, 155
netbiosdiscovery 44 RFC1280 23
NetView for AIX 231 RFC1285 25, 147, 153
NetView for AIX Subagent MIB 171 RFC1315 25, 147, 154
NetView for OS/2 41 RFC1340 23
NetView/6000 Subagent MIB 26 RFC1398 24, 147, 151
Netware Link Services Protocol MIB 26 RFC1441 298
netwdiscovery 44 RFC1442 298
Network element (NE) 10 RFC1443 298
Network management station (NMS) 10 RFC1444 298
NLSP MIB 26, 187 RFC1445 298
Not Recommended Protocol 248 RFC1446 298
Novell Enterprise MIBs 26, 178 RFC1447 298
RFC1448 298
RFC1449 298
O RFC1450 298
Object Instance 18 RFC1451 298
Object-identifier 7, 16, 18 RFC1452 298
Object-type 15, 18 RFC1514 25, 189
T
Tabular Objects 19
tcpipdiscovery 44
The Host Resources MIB subtree 189
Token-Ring MIB 25, 155
Transport address 240
TRAP 21
Trap Manager 78
Trap Support 27
Trap-PDU 243
Index 309
This soft copy for use by IBM employees only.
Your feedback is very important to help us maintain the quality of ITSO redbooks. Please complete this
questionnaire and return it using one of the following methods:
• Use the online evaluation form found at http://www.redbooks.com
• Fax this form to: USA International Access Code + 1 914 432 8264
• Send your comments in an Internet note to [email protected]
Please rate your overall satisfaction with this book using the scale:
(1 = very good, 2 = good, 3 = average, 4 = poor, 5 = very poor)
Was this redbook published in time for your needs? Yes____ No____
_____________________________________________________________________________________________________
_____________________________________________________________________________________________________
_____________________________________________________________________________________________________
_____________________________________________________________________________________________________
_____________________________________________________________________________________________________
_____________________________________________________________________________________________________
_____________________________________________________________________________________________________
_____________________________________________________________________________________________________
_____________________________________________________________________________________________________
Printed in U.S.A.
SG24-4504-01