Site/SunNet/Domain Manager for Solaris 1.1.1/SPARC Installation Guide
검색에만이 책은
PDF로 이 문서 다운로드

Installing SNMP Version 2

5


SNMP Version 2 Supportpage 5-1
Installing SNMPv2page 5-2
Deinstalling SNMPv2page 5-3
Adding SNMPv2 to the NIS/NIS+ Mapspage 5-4
SNMPv2 Community Stringspage 5-4

SNMP Version 2 Support

Site/SunNet/Domain Manager provides a proxy agent that supports the Simple Network Management Protocol Version 2 (SNMPv2). The SNMPv2 proxy agent allows you to get data and event information from and set attribute values for devices that are managed via SNMPv2.
Site/SunNet/Domain Manager also provides an SNMP agent for Sun workstations called the snmpv2d daemon. The Console communicates with the snmpv2d daemon through the SNMP proxy agent. The snmpv2d daemon also allows Sun workstations to be managed by other SNMPv2 and SNMP stations. For more information about the snmpv2d daemon, see the snmpv2d (8) manual page.

Note - Support for SNMPv2 functionality is discussed in the Administration Guide. This chapter describes installation and removal of SNMPv2 software.

SNMPv2 can be installed as an agent (snmpv2d), a manager (na.snmpv2), or both. Before installing SNMPv2, you must first install the product. After the product has been succesfully installed, you must create the three configuration files needed by the v2install script. These configuration files are:
  • agents -- contains the names of the hosts on which the snmpv2d agent will be installed.
  • mgrs.v1 -- contains the names of the hosts that will be running SNMPv1 managers (na.snmp).
  • mgrs.v2 -- contains the names of the hosts that will be running SNMPv2 managers (na.snmpv2).
See the v2install(1) man page for detailed information about these files.

Installing SNMPv2

As root, create the configuration files in the agents directory where the product was installed. By default, this is the /usr/snm/agents directory. The following is an example of the commands to create the configuration files:

  hostname# cd /usr/snm/agents  
  hostname# vi agents mgrs.v1 mgrs.v2  

Run the v2install script as shown below, where <hostname> refers to the name of the machine where the SNMPv2 manager resides.

  hostname# usr/snm/agents/v2install <hostname>  

Invoking the v2install script creates the configuration files needed by snmpv2d and na.snmpv2 for authentication. The files will be created in the ./configs/<nodename>/agent and ./configs/<nodename>/manager directories, where <nodename> refers to the name of the machine where the v2install script is invoked. The v2install script copies the current hosts configuration files into the /etc/snm/agent and /etc/snm/manager directories, and then, if the current host is in the agents configuration file, starts up snmpv2d. You then need to copy the configuration files to all
machines that will be using SNMPv2. The following example assumes that /etc/snm has been exported on all of the necessary machines and that the automounter is running.

  hostname# ls configs  
  augusta  poppyhills  pebblebeach  spyglass  
  hostname# ls configs/poppyhills  
  agent  manager  
  hostname# cp -r configs/augusta/* /net/augusta/etc  
  hostname# cp -r configs/pebblebeach/* /net/pebblebeach/etc  
  hostname# cp -r configs/spyglass/* /net/spyglass/etc  

You should now install na.snmpv2 and snmpv2d on each of the machines. You should not run the v2install script again, as it creates a random string which is used between machines for authentication. Make sure you use the configuration files created by one execution of v2install.
On the machines where the above files were installed, as root, run the following commands to start snmpv2d:

  hostname# /etc/init.snmpd stop  
  hostname# /etc/init.snmpd start  
  Starting snmpv2d ...  

Deinstalling SNMPv2

After SNMPv2 has been installed on a system, the snmpv2 daemon will be run each time the system is restarted. If you wish to run the SNMPv1 daemon, there are two ways this can be accomplished. If you just want to temporarily disable SNMPv2, but want to keep the configuration, then all you need to do is rename the snmpv2d.conf file, and start snmpd, as follows:

  hostname# cd /etc/snm/agent  
  hostname# mv snmpv2d.conf <snmpv2d.conf.temp>  
  hostname# /etc/init.snmpd stop  
  hostname# /etc/init.snmpd start  

When the snmp startup script is run, it checks for the existence of the snmpv2d.conf file. If it finds it, then it runs snmpv2d, otherwise it will run snmpd. If you want to completely remove SNMPv2 support, a script (v2deinstall) has been included to deinstall SNMPv2. The v2deinstall script will remove all SNMPv2 configuration files, and restart snmpd. To run the script, type the following:

  hostname# cd /usr/snm/agents  
  hostname# v2deinstall  

Adding SNMPv2 to the NIS/NIS+ Maps

In order to use SNMPv2, the rpc.bynumber NIS/NIS+ maps/tables must be updated to include the following entry for SNMPv2:

  snmpv2      100138     na.snmpv2  

Refer to Chapter 3, "Installing the Software," for information on how to update the NIS/NIS+ maps/tables.

SNMPv2 Community Strings

The SNMP read and write community strings are used to distinguish between SNMPv1 and SNMPv2 requests. When the v2install script is run, its configuration file mgrs.v1 is used to determine the v1 community strings. These by default were read: public/group, and write: private/secret/ TopSecret.
When these strings are setup in a components properties sheet, SNMPv1 requests will be sent and received.
To use SNMPv2 requests, the properties sheet needs to specify the v2 clustername to be used for the request. By default with the v2install script, the clustername will be the hostname of the machine that is responding to the request. The cluster records can be found in the /etc/snm/manager/mgr.cnf file.