4

I'm not very familiar with routers, and my searches have proven a bit futile currently. I was tasked to create a monitor for our router. I've used the following OID's to obtain the relevant information on the different interfaces I wanted to monitor

1.3.6.1.2.1.2.2.1.10
1.3.6.1.2.1.2.2.1.16
1.3.6.1.2.1.2.2.1.2

I figured out that you have to add the interface index at the end of the OID to get a specific interface's information (eg. 1.3.6.1.2.1.2.2.1.10.2)

My problem that I'm having at this point is that the interface of the other router I have to monitor have subinterfaces configured on a physical interface. When I sh int I can see the subinterfaces on the interface. Here is the information

FastEthernet0/0/0 is up, line protocol is up
  Hardware is FastEthernet, address is
  MTU 1500 bytes, BW 100000 Kbit/sec, DLY 100 usec,
     reliability 255/255, txload 1/255, rxload 6/255
  Encapsulation 802.1Q Virtual LAN, Vlan ID  1., loopback not set
  Keepalive set (10 sec)
  Full-duplex, 100Mb/s, 100BaseTX/FX
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input 00:00:01, output 00:00:00, output hang never
  Last clearing of "show interface" counters never
  Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
  Queueing strategy: fifo
  Output queue: 0/40 (size/max)
  5 minute input rate 2505000 bits/sec, 364 packets/sec
  5 minute output rate 631000 bits/sec, 282 packets/sec
     5907895 packets input, 630428948 bytes
     Received 8168 broadcasts (0 IP multicasts)
     0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     0 watchdog
     0 input packets with dribble condition detected
     5162711 packets output, 1548903164 bytes, 0 underruns
     0 output errors, 0 collisions, 2 interface resets
     1135 unknown protocol drops
     0 babbles, 0 late collision, 0 deferred
     1 lost carrier, 0 no carrier
     0 output buffer failures, 0 output buffers swapped out
FastEthernet0/0/0.10 is up, line protocol is up
  Hardware is FastEthernet, address is 
  Description: VodacomPTP
  Internet address is 
  MTU 1500 bytes, BW 100000 Kbit/sec, DLY 100 usec,
     reliability 255/255, txload 1/255, rxload 6/255
  Encapsulation 802.1Q Virtual LAN, Vlan ID  10.
  ARP type: ARPA, ARP Timeout 04:00:00
  Keepalive set (10 sec)
  Last clearing of "show interface" counters never
FastEthernet0/0/0.20 is up, line protocol is up
  Hardware is FastEthernet, address is 
  Description: Vodacom2Mbps
  Internet address is 
  MTU 1500 bytes, BW 100000 Kbit/sec, DLY 100 usec,
     reliability 255/255, txload 1/255, rxload 6/255
  Encapsulation 802.1Q Virtual LAN, Vlan ID  20.
  ARP type: ARPA, ARP Timeout 04:00:00
  Keepalive set (10 sec)
  Last clearing of "show interface" counters never
FastEthernet0/0/0.30 is up, line protocol is up
  Hardware is FastEthernet, address is 
  Description: Vodacom4Mbps
  Internet address is 
  MTU 1500 bytes, BW 100000 Kbit/sec, DLY 100 usec,
     reliability 255/255, txload 1/255, rxload 6/255
  Encapsulation 802.1Q Virtual LAN, Vlan ID  30.
  ARP type: ARPA, ARP Timeout 04:00:00
  Keepalive set (10 sec)
  Last clearing of "show interface" counters never

I found in MIB on this forum for ifHCInOctets and ifHCOutOctets, but I'm not sure how I should interrogate this. Because to start the MIB is already longer than the normal ifInOctets MIB.

Do I have to enable SNMP for say FastEthernet0/0/0.20. What MIB do I have to use to get the InOctets information for instance. And lastly do I still have to add a .1 in the index for the 1.3.6.1.2.1.31.1.1.1.6 MIB.

1
  • I would recommend you get a tool to browse snmp on the device. On linux you could use snmp-walk. When you browse the device/mib you will find the interface names and there index's.
    – Pieter
    Jul 17, 2015 at 21:19

1 Answer 1

5
rtr1841#show snmp mib ifmib ifindex 
Loopback1: Ifindex = 10
Tunnel0: Ifindex = 5
Serial0/0/0: Ifindex = 7
FastEthernet0/1: Ifindex = 2
FastEthernet0/0.2: Ifindex = 8
Loopback0: Ifindex = 6
Null0: Ifindex = 3
NVI0: Ifindex = 4
FastEthernet0/0: Ifindex = 1
FastEthernet0/0.3: Ifindex = 9

That's the quickest way to find the correct ifIndex for an interface on an IOS router. (That information is also found in the IF-MIB tables.)

Note: make sure snmp-server ifindex persist is in your config, or the indexs could change after a reload.

1
  • Thank you very much Ricky for this information. I was able to pick up the FastEthernet0/0/0.10, .20, and .30. I don't see any real data yet, but I was just told that we have a problem with the provider. Will monitor it, but It seems like this gave me the solution.
    – Jaques
    Jul 20, 2015 at 6:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.