Description

This article provides information on how to poll a router to get a subscriber count of a specific routing-instance in an MX Series router.

Symptoms

What configuration is required to perform an SNMP poll of the subscriber count of a routing instance?

Solution


Please use the following configuration to obtain a subscriber count on a specific routing-instance in the MX Series router through SNMP:

jtac@ERX-MX-240-4-RE0# show snmp 
community public {
    authorization read-only;
}

For example, shown below is a router which has five subscribers connected on routing-instance "jtac"

[edit]
jtac@ERX-MX-240-4-RE0# run show subscribers summary routing-instance jtac    

Subscribers by State
   Active: 5
   Total: 5

Subscribers by Client Type
   PPPoE: 5
   Total: 5

Subscribers by LS:RI
   default:jtac: 5
   Total: 5
 

By default, if the command snmpwalk is performed on the OID to get a subscriber count, Junos OS returns a subscriber count only for routing-instance "default":

[root@bngtac-tools ~]# snmpwalk -c public -v 2c 10.204.12.40 .1.3.6.1.4.1.2636.3.64.1.1.3.1
SNMPv2-SMI::enterprises.2636.3.64.1.1.3.1.0 = Counter64: 1
[root@bngtac-tools ~]#

To get the count for a particular instance, the name of the instance must be provided along with a community string, as shown below:

[root@bngtac-tools ~]# snmpwalk -c jtac@public -v 2c 10.204.12.40 .1.3.6.1.4.1.2636.3.64.1.1.3.1
SNMPv2-SMI::enterprises.2636.3.64.1.1.3.1.0 = Counter64: 5
[root@bngtac-tools ~]#