Juniper screenos device not getting ARP table, how to create a custom MIB for it?

Hello,

We have some Juniper devices which uses ScreenOS that are not getting the right information about the ARP table.

The problem is that the devices does not have the information for the object ipNetToPhysicalPhysAddress, only for the object ipNetToMediaPhysAddress

SNMP[/bin/snmpbulkwalk -v2c -c COMMUNITY -OQUsetX -m IP-MIB -M /opt/librenms/mibs:/opt/librenms/mibs/screenos udp:HOSTNAME:161 ipNetToPhysicalPhysAddress]
ipNetToPhysicalPhysAddress = No Such Object available on this agent at this OID

But investigating further, I can find the information for the ports, ips and mac on the firewall using other OID.s

The OID 1.3.6.1.4.1.3224.9.1.1.2 will give me the name of the ports, as show below:

enterprises.3224.9.1.1.2.1 = "serial0/0"
enterprises.3224.9.1.1.2.2 = "ethernet0/0"
enterprises.3224.9.1.1.2.3 = "ethernet0/1"
enterprises.3224.9.1.1.2.4 = "ethernet0/2"
enterprises.3224.9.1.1.2.5 = "ethernet0/3"
enterprises.3224.9.1.1.2.6 = "ethernet0/4"
enterprises.3224.9.1.1.2.7 = "ethernet0/5"
enterprises.3224.9.1.1.2.8 = "ethernet0/6"
enterprises.3224.9.1.1.2.9 = "ethernet0/6.1"
enterprises.3224.9.1.1.2.10 = "ethernet0/6.2"
enterprises.3224.9.1.1.2.11 = "ethernet0/6.3"
enterprises.3224.9.1.1.2.12 = "ethernet0/6.4"
enterprises.3224.9.1.1.2.13 = "ethernet0/6.5"
enterprises.3224.9.1.1.2.14 = "bgroup0"
enterprises.3224.9.1.1.2.15 = "bgroup1"
enterprises.3224.9.1.1.2.16 = "bgroup2"
enterprises.3224.9.1.1.2.17 = "bgroup3"
enterprises.3224.9.1.1.2.18 = "tunnel.1"
enterprises.3224.9.1.1.2.19 = "vlan1"

The OID 1.3.6.1.4.1.3224.9.1.1.21 will give me an internal id used by the device for each port, as show below:

enterprises.3224.9.1.1.21.1 = 1848
enterprises.3224.9.1.1.21.2 = 0
enterprises.3224.9.1.1.21.3 = 440
enterprises.3224.9.1.1.21.4 = 528
enterprises.3224.9.1.1.21.5 = 616
enterprises.3224.9.1.1.21.6 = 704
enterprises.3224.9.1.1.21.7 = 792
enterprises.3224.9.1.1.21.8 = 880
enterprises.3224.9.1.1.21.9 = 888
enterprises.3224.9.1.1.21.10 = 896
enterprises.3224.9.1.1.21.11 = 904
enterprises.3224.9.1.1.21.12 = 912
enterprises.3224.9.1.1.21.13 = 920
enterprises.3224.9.1.1.21.14 = 968
enterprises.3224.9.1.1.21.15 = 1056
enterprises.3224.9.1.1.21.16 = 1144
enterprises.3224.9.1.1.21.17 = 1232
enterprises.3224.9.1.1.21.18 = 1768
enterprises.3224.9.1.1.21.19 = 1320

The IP address and the MAC address is recovered using, the following two OIDs:

  • 1.3.6.1.4.1.3224.17.1.3.1.2 (ip address)
  • 1.3.6.1.4.1.3224.17.1.3.1.3 (mac address)

And the OID 1.3.6.1.4.1.3224.17.1.3.1.5 brings me the internal id used by the device for each port.

So, I have all the information that is needed to associated each port with its name and to the ip address and mac address being used and create the arp table, but I don’t know how to combine the information, could you give my a direction?

What do I have to do? Which script should I look into to try to create a custom code or MIB to associated the information from those OIDs?

After talking on Discord, the issue will be solved by the PR #8273

https://github.com/librenms/librenms/pull/8273