Related Documentation
- ACX, M, MX, PTX, T Series
- Configuring SNMP on a Device Running Junos OS
- Configuration Statements at the [edit snmp] Hierarchy Level
- M, MX, PTX, QFX, T Series
- Configuring the Interfaces on Which SNMP Requests Can Be Accepted
Filtering Interface Information Out of SNMP Get and GetNext Output
Junos OS enables you to filter out information related to specific interfaces from the output of SNMP Get and GetNext requests performed on interface-related MIBs such as IF MIB, ATM MIB, RMON MIB, and the Juniper Networks enterprise-specific IF MIB.
You can use the following options of the filter-interfaces statement at the [edit snmp] hierarchy level to specify the interfaces that you want to exclude from SNMP Get and GetNext queries:
- interfaces—Interfaces that match the specified regular expressions.
- all-internal-interfaces—Internal interfaces.
Starting with Release 12.1, Junos OS provides an except option (! operator) that enables you to filter out all interfaces except those interfaces that match all the regular expressions prefixed with the ! mark.
For example, to filter out all interfaces except the ge interfaces from the SNMP get and get-next results, enter the following command:
When this is configured, Junos OS filters out all interfaces except the ge interfaces from the SNMP get and get-next results.
![]() | Note: The ! mark is supported only as the first character of the regular expression. If it appears anywhere else in a regular expression, Junos OS considers the regular expression invalid, and returns an error. |
However, note that these settings are limited to SNMP operations, and the users can continue to access information related to the interfaces (including those hidden using the filter-interfaces options) using the appropriate Junos OS command-line interface (CLI) commands.
Related Documentation
- ACX, M, MX, PTX, T Series
- Configuring SNMP on a Device Running Junos OS
- Configuration Statements at the [edit snmp] Hierarchy Level
- M, MX, PTX, QFX, T Series
- Configuring the Interfaces on Which SNMP Requests Can Be Accepted
Published: 2012-12-08
Related Documentation
- ACX, M, MX, PTX, T Series
- Configuring SNMP on a Device Running Junos OS
- Configuration Statements at the [edit snmp] Hierarchy Level
- M, MX, PTX, QFX, T Series
- Configuring the Interfaces on Which SNMP Requests Can Be Accepted