Ad Widget

Collapse

Cisco IOS SNMP: Discover IP Addresses of interfaces of devices.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • robertbarrett
    Junior Member
    • Jun 2024
    • 1

    #1

    Cisco IOS SNMP: Discover IP Addresses of interfaces of devices.


    I've added some Cisco ISR4331 devices, using SNNMP.

    By default it doesn't populate IP addresses of interfaces of the routers.

    Looking at the MIBs

    Code:
    $ snmpwalk -v 2c -c <community> <device> .1.3.6.1.2.1.4.20.1.1 -On
    .1.3.6.1.2.1.4.20.1.1.<ip1> = IpAddress: <ip1>
    .1.3.6.1.2.1.4.20.1.1.<ip2> = IpAddress: <ip2>
    .1.3.6.1.2.1.4.20.1.1.<ip3> = IpAddress: <ip3>
    .1.3.6.1.2.1.4.20.1.1.<ip4> = IpAddress: <ip4>
    .1.3.6.1.2.1.4.20.1.1.<ip5> = IpAddress: <ip5>
    .1.3.6.1.2.1.4.20.1.1.1<ip6> = IpAddress: <ip6>
    I see references in this https://www.zabbix.com/integrations/cisco_snmp to walking certain OID and parsing by {#SNMPINDEX}. However this won't work for IP Addresses, as they don't have a {#SNMPINDEX} value.

    I see that this OID returns the equivalent SNMPINDEX VALUES:

    Code:
    [kcm932@yd01nm02 ~]$ snmpwalk -v 2c -c <community> <device> 1.3.6.1.2.1.4.20.1.2 -On
    .1.3.6.1.2.1.4.20.1.2.<ip1> = INTEGER: 7
    .1.3.6.1.2.1.4.20.1.2.<ip2> = INTEGER: 7
    .1.3.6.1.2.1.4.20.1.2.<ip3> = INTEGER: 6
    .1.3.6.1.2.1.4.20.1.2.<ip4> = INTEGER: 9
    .1.3.6.1.2.1.4.20.1.2.<ip5> = INTEGER: 8
    .1.3.6.1.2.1.4.20.1.2.<ip6> = INTEGER: 11
    In python, it'd be quite easy to walk the two OIDs, and combine the data. Is there documentation on how one would achieve this within Zabbix?

    What is a good way to include the IP addresses of a device in the data of that device with the associated interface information (eg ifName, ifAlias, etc)

    By comparison, ifSpeed is automatically populated with the name "Interface <ifName> <IfAlias> Speed". How would populate IP addresses with the name "Interface <ifName> <IfAlias> IP Address"

    (In googling, I've seen other posts suggests have each interface as it's own host. We're migrating to Zabbix from another application where the data is contained within the device, so users for monitoring would prefer to have it within the device context). Is there documentation I should read to further this knowledge?

    Thanks.


Working...