SNMP PRI

From NippAero

Jump to: navigation, search

Contents

How to query an ISDN (PRI) interface

When you need to tell if the PRI is up and established. Sometimes the physical interface is up but layer 2 between you and the switch is down causing all calls to be rejected.

OID Information

ISDN Status MIB is part of the isdnSignalingGroup (1.3.6.1.2.1.10.20.1.3).

The isdnLapdOperStatus (1.3.6.1.2.1.10.20.1.3.4.1.2) shows the operational status of this interface. This will return a read only integer of 1-3.

  • 1 : inactive all layers are inactive
  • 2 : l1Active layer 1 is activated, layer 2 datalink not established
  • 3 : l2Active l2Active layer 1 is activated, layer 2 datalink established

Find the Interface Number

First we need to know what the interface number is of the ISDN interface we are interested in monitoring. This is more important when you have multiple interfaces. Walk the top of isdnLapdOperStatus to find the interface. In this case it is 36. The integer 3 means that L1 is activated and L2 has been established successfully.

[root@Punky etc]# snmpwalk -v 1 -c public 10.132.20.18  1.3.6.1.2.1.10.20.1.3.4.1.2 -On
.1.3.6.1.2.1.10.20.1.3.4.1.2.36 = INTEGER: 3

Get the information

Now you can use snmpget to query the router about the interface you are interested in.

[root@lnx01 etc]# snmpget -v 1 -c public hostname 1.3.6.1.2.1.10.20.1.3.4.1.2.36 -On
  • -v 1 is the snmp version we are using. In this case version 1.
  • -c public is the snmp password
  • hostname is the hostname or IP of the router
  • 1.3.6.1.2.1.10.20.1.3.4.1.2.36 is the OID we just found above.
  • -On outputs the OIDs numerically

Example: Layer 1 Up, Layer 2 Up

A snmpget on the MIB returns a 3.

[root@Punky etc]# snmpget -v 1 -c public 10.132.20.18  1.3.6.1.2.1.10.20.1.3.4.1.2.36 -On
.1.3.6.1.2.1.10.20.1.3.4.1.2.36 = INTEGER: 3

If you do a sh isdn status on the router now you get the following output.

router#sh isdn status
Global ISDN Switchtype = primary-ni
ISDN Serial0/0/0:23 interface
       dsl 0, interface ISDN Switchtype = primary-ni
   Layer 1 Status:
       ACTIVE
   Layer 2 Status:
       TEI = 0, Ces = 1, SAPI = 0, State = MULTIPLE_FRAME_ESTABLISHED
   Layer 3 Status:
       0 Active Layer 3 Call(s)
   Active dsl 0 CCBs = 0
   The Free Channel Mask:  0x807FFFFF
   Number of L2 Discards = 0, L2 Session ID = 151
   Total Allocated ISDN CCBs = 0

Example: Layer 1 Up, Layer 2 Down

A snmpget on the MIB returns a 2.

[root@Punky etc]# snmpget -v 1 -c public 10.132.20.18  1.3.6.1.2.1.10.20.1.3.4.1.2.36 -On
.1.3.6.1.2.1.10.20.1.3.4.1.2.36 = INTEGER: 2

A sh isdn status on the router returns the following output.

router#sh isdn status
Global ISDN Switchtype = primary-ni
ISDN Serial0/0/0:23 interface
        dsl 0, interface ISDN Switchtype = primary-ni
    Layer 1 Status:
        ACTIVE
    Layer 2 Status:
        TEI = 0, Ces = 1, SAPI = 0, State = AWAITING_ESTABLISHMENT
    Layer 3 Status:
        0 Active Layer 3 Call(s)
    Active dsl 0 CCBs = 0
    The Free Channel Mask:  0x807FFFFF
    Number of L2 Discards = 0, L2 Session ID = 135
Personal tools