How does discovery classify network gears?

Amit Sharma4
Mega Expert

Hi All,

While working on some issue with network gear discovery, i got stuck on a point   which is "How does discovery classify network gears?"...

As far as i know, for Classification SNMP OIDs (sysObject ID OID) will be used and when there is a match, it'll classify the device accordingly. In case discovery does not find sysObject ID OID, it will use the classification criteria like "Switching equals true" For Switches "Routing equals true

find_real_file.png

I am wondering where in   SNMP classification XML pay load , discovery finds the "Switching" property status?

Please guide.

Thanks

Amit

1 ACCEPTED SOLUTION

Dave Ainsworth
ServiceNow Employee
ServiceNow Employee

Hi Amit,



If you look in the SNMP - Classify sensor, you will see the code that it uses to determine the 'switching' value.



                  // is this thing a switch?


                  var ports = snmp.getOIDInt( oid_dot1dBridge + 'dot1dBase.dot1dBaseNumPorts' );


                  var isSwitch = ports > 0;


                  ...


                  ...        


                  capabilities['switching'] = '' + isSwitch;



If you look at the script, there are a few more lines than above but the main way this is set is when dot1dBaseNumPorts is greater than 0. You should be able to see the value for this in the SNMP classify payload returned.



Regards,



Dave


View solution in original post

2 REPLIES 2

Dave Ainsworth
ServiceNow Employee
ServiceNow Employee

Hi Amit,



If you look in the SNMP - Classify sensor, you will see the code that it uses to determine the 'switching' value.



                  // is this thing a switch?


                  var ports = snmp.getOIDInt( oid_dot1dBridge + 'dot1dBase.dot1dBaseNumPorts' );


                  var isSwitch = ports > 0;


                  ...


                  ...        


                  capabilities['switching'] = '' + isSwitch;



If you look at the script, there are a few more lines than above but the main way this is set is when dot1dBaseNumPorts is greater than 0. You should be able to see the value for this in the SNMP classify payload returned.



Regards,



Dave


Thanks David. This one helps me a lot.