This article describes the procedure to enable LSP statistics collection via MPLS MIB OIDs, such as mplsLspOctets and mplsLspInfoOctets.
When using SNMP to poll, by default, MPLS MIB OIDs such as mplsLspOctets and mplsLspInfoOctets always return zero values. However, the show mpls lsp statistics command will show the correct values. For example:
lab@Router> show mpls lsp statistics Ingress LSP: 1 sessions To From State Packets Bytes LSPname 3.3.3.3 222.1.1.13 Up 40378 4387962 pe1-to-pe2 < packet and byte counter values displayed Total 1 displayed, Up 1, Down 0 Egress LSP: 1 sessions To From State Packets Bytes LSPname 222.1.1.13 3.3.3.3 Up NA NA pe2-to-pe1 Total 1 displayed, Up 1, Down 0 Transit LSP: 0 sessions Total 0 displayed, Up 0, Down 0 lab@Router> show snmp mib walk mplsLspInfoOctets mplsLspInfoOctets.80.49.45.80.69.49 = 0 <<-- always returns zero
MPLS statistics collection must be enabled.
In order to populate and query MPLS OID's such as mplsLspInfoOctets and mplsLspInfoPackets , the following procedure should be followed.
lab@Router> edit Entering configuration mode [edit] lab@Router# set protocols mpls statistics file mplsstats [edit] lab@Router# set protocols mpls statistics auto-bandwidth [edit] lab@Router# commit and-quit commit complete
lab@Router> show snmp mib walk mplsLspInfoOctets mplsLspInfoOctets.80.49.45.80.69.49 = 4427454 < values populated lab@Router> show snmp mib walk mplsLspInfoOctets ascii mplsLspInfoOctets."pe1-to-pe2" = 4427454 < values populated