This chapter covers the management and configuration tasks for the simple network management protocol (SNMP) agent and management information bases (MIBs) available with the BIG/ip Controller.
The BIG/ip SNMP agent and MIBs allow you to manage the BIG/ip Controller by configuring traps for the SNMP agent or polling the controller with your standard network management station (NMS).
You can configure the BIG/ip SNMP agent to send traps to your management system with the F5 Configuration utility. You can also set up custom traps agent setup by editing several configuration files.
Security options are available that let you securely manage information collected by the BIG/ip SNMP agent, including:
The BIG/ip platform includes a private BIG/ip SNMP MIB. This MIB is specifically designed for use with the BIG/ip Controller. You can configure the SNMP settings in the the F5 Configuration utility, or on the command line.
SNMP management software requires that you use the MIB files associated with the device. You may obtain two MIB files from the BIG/ip directory /usr/contrib/f5/mibs, or you can download the files from the Additional Software Downloads section of the F5 Configuration utility home page.
For information about the objects defined in the LOAD-BAL-SYSTEM-MIB.txt, refer to the descriptions in the object identifier (OID) section of the MIB file. For information about the objects defined in UCD-SNMP-MIB.txt, refer to RFC 1213.
You need to make changes to several configuration files on the BIG/ip Controller before you use the SNMP agent. Once you change these configuration files, you need to restart the SNMP agent.
This file must be present to deny by default all TCP connections to the SNMP agent. The contents of this file are as follows:
ALL : ALL
The /etc/hosts.allow file is used to specify which hosts are allowed to access the SNMP agent. There are two ways to configure access the the SNMP agent with the /etc/host.allow file. You can type in an IP address, or list of IP addresses, that are allowed to access the SNMP agent, or you can type in an IP address and mask to allow a range of addresses in a subnetwork to access the SNMP agent.
For a specific list of address, type in the list of addresses you want to allow to access the SNMP agent. Addresses in the list must be separated by blank space or by commas. The basic syntax is as follows:
daemon: <IP address> <IP address> <IP address>
For example, you can type the following line which sets the SNMP agent to accept connections from the IP addresses specified:
bigsnmpd: 126.96.36.199 188.8.131.52 184.108.40.206
For a range of addresses, the basic syntax is as follows, where daemon is the name of the daemon, and IP/MASK specifies the network that is allowed access:
For example, you might use the following line which sets the bigsnmpd daemon to allow connections from the 220.127.116.11/255.255.255.0 address:
The example above allows the 256 possible hosts from the network address 18.104.22.168 to access the SNMP daemon. Additionally, you may use the keyword ALL to allow access for all hosts or all daemons.
The /etc/snmpd.conf file controls most of the SNMP daemon. This file is used to set up and configure certain traps, passwords, and general SNMP variable names. A few of the necessary variables are listed below:
Note: To change the trap port, the trapport line must precede the trapsink line. If you use more then one trapport line, then there must be one trapport line before each trapsink line. The same follows for trapcommunity. If you use more then one trapcommunity line, then there must be one trapcommunity line before each trapsink line.
The following entry in the /etc/rc.local automatically starts up the SNMP agent when the system boots up (Figure 7.1).
# BIG/ip SNMP Agent
if [ -f /etc/snmpd.conf ]; then
/sbin/bigsnmpd -c /etc/snmpd.conf
If the /etc/snmpd.conf is present on your system, the SNMP agent is automatically started.
This configuration file includes OID, trap, and regular expression mappings. The configuration file specifies whether to send a specific trap based on a regular expression. An excerpt of the config file is shown in Figure 7.2.
# Default traps.
.22.214.171.124.4.1.33126.96.36.199.2.6 ROOT LOGIN
.188.8.131.52.4.1.33184.108.40.206.2.5 REQUEST DENIAL
.220.127.116.11.4.1.3318.104.22.168.2.4 SYSTEM RESET
.22.214.171.124.4.1.33126.96.36.199.2.3 SERVICE UP
.188.8.131.52.4.1.33184.108.40.206.2.2 SERVICE DOWN
#.220.127.116.11.4.1.3318.104.22.168.2.1 Unknown Error
#.22.214.171.124.4.1.33126.96.36.199.2.1 Unknown Failure
Some of the OIDs have been permanently mapped to BIG/ip specific events. The OIDs that are permanently mapped for the BIG/ip Controller include:
You may, however, insert your own regular expressions and map them to the 110.1 OID. The /etc/snmptrap.conf file contains two examples for mapping your own OIDs:
By default, the lines for these files are commented out. Use these OIDs for miscellaneous events. When lines match your expression, they are sent to your management software with the 110.2.1 OID.
You must configure syslog to send syslog lines to checktrap.pl. If the syslog lines make a match the specified configuration in the snmptrap.conf file, a valid SNMP trap is generated. The following lines in the /etc/syslog.conf file require the syslog look at information logged, scan the snmptrap.conf file, and determine if a trap should be generated:
local0.* | exec /sbin/checktrap.pl.
local1.* | exec /sbin/checktrap.pl.
auth.* | exec /sbin/checktrap.pl.
The F5 Configuration utility allows you to enable the BIG/ip SNMP agent, and it allows you to easily define three aspects of the SNMP agent:
The F5 Configuration utility provides sample SNMP settings for your reference. If you want to use the BIG/ip SNMP MIB, you need to replace these sample settings with settings appropriate to your environment and your specific SNMP management software.
The checktrap.pl script reads a set of lines from standard input. The script checks each line against a set of regular expressions. If a line matches the regular expression, an SNMP trap is sent.
snmpd_conf_file=<snmp configuration file>
This is the file that contains the SNMP variables. The checktrap.pl gets trap configuration information from this file. The default is /etc/snmpd.conf.
trapd_conf_file=<snmp trap configuration file>
This is the file that contains the regular expression to SNMP trap OID mappings. It also contains a description string that is added to the trap message. The default is /etc/snmptrap.conf.
trap_program=<snmp trap program>
This is the program that sends the trap. This program should be the snmptrap program included with the BIG/ip Controller. The default is /sbin/snmptrap.
This turns off automatic date stripping. Normally, each input line is expected to begin with a date. Typically, this date is stripped off before the trap is sent. This option keeps the date information in the trap. By default, the date is stripped from the trap.
Prints a usage string.