I have a virtualized router running JUNOS 14.1R1.10 (Juniper).
I enabled SNMP on it but I want it to 'hide' some of its interfaces: means that upon snmp-walk on the interfaces list it will not reply with value on certain interface(s).
example: while walking the below specific entry, instead of getting 2 interfaces I want to 'hide' the 1st one and get response on the 2nd one alone.
instead of: root@docker2s:~# snmpbulkwalk -v 3 -u sedona 10.22.175.84 .1.3.6.1.2.1.31.1.1.1.5 iso.3.6.1.2.1.31.1.1.1.5.38 = Counter32: 0 iso.3.6.1.2.1.31.1.1.1.5.39 = Counter32: 0 root@docker2s:~#
I wish to get: root@docker2s:~# snmpbulkwalk -v 3 -u sedona 10.22.175.84 .1.3.6.1.2.1.31.1.1.1.5 iso.3.6.1.2.1.31.1.1.1.5.39 = Counter32: 0 root@docker2s:~#
is there a way to configure JUNOS to act like that?
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.
snmp { filter-interfaces { interfaces { interface-name 1; interface-name 2; } all-internal-interfaces; } }
Please refer: https://www.juniper.net/techpubs/en_US/junos15.1/topics/task/configuration/snmp-filter-interfaces-configuring-junos-nm.html
junos-snmp