opensolutions / OSS_SNMP

A PHP SNMP library for people who hate SNMP, MIBs and OIDs!
https://github.com/opensolutions/OSS_SNMP/wiki
Other
108 stars 58 forks source link

Support for Huawei - S6720-54C-EI-48S-AC #72

Closed aredan closed 2 years ago

aredan commented 3 years ago

The SNMP query (snmpwalk) is returning:

.1.3.6.1.2.1.1.1.0 = STRING: "S6720-54C-EI-48S-AC Huawei Versatile Routing Platform Software VRP (R) software,Version 5.170 (S6720 V200R010C00SPC600) Copyright (C) 2007 Huawei Technologies Co., Ltd."

We also edited a little bit the vendor_huawei.php file:

else if( preg_match('/^(S\d+-[A-Z0-9-]+)\s+Huawei Versatile Routing Platform Software\s+VRP (R) software,Version ([0-9.]+) ((S[0-9]+) [A-Z0-9]+)\s+Copyright (C) 2007 Huawei Technologies.*$/',

https://github.com/opensolutions/OSS_SNMP/pull/70/commits/df0c788d8df87d68241cf0e692b53712a8ad77dd

After that change the Switch is being detected, version and model are shown in the portal.

What we're seeing now is the lack of interface detection.

image

Looks like we need a vendor-specific Iface.php file with the OID for Huawei.

barryo commented 3 years ago

What does an snmp walk on .1.3.6.1.2.1.31 reveal?

Feel free to paste here: https://pastebin.ibn.ie/

aredan commented 3 years ago

This is the result:

image

I also uploaded the full snmpwalk to : https://pastebin.ibn.ie/?6a63942ac765143c#3Zt9vNtrdpzUwYAdXZifxPJYujxPc5BmokaE3m8LYAmB

barryo commented 2 years ago

Thanks @aredan - regex updated in master now. Can you check interface discovery with the most recent version of IXP Manager as there was a bug in recent versions around this.

moviedo-sc commented 2 years ago

The Switch is recognized by IXP Manager (V6.2.0), but it is not showing any port. Live port states show:   Could not update switch and switch port details via SNMP poll. Last successful poll: 2022-01-17 22:23:02.   The only logs I see are: [2022-01-17 22:23:00] production.INFO:  [IXP-SW01] Platform: Found Model: S6720-54C-EI-48S-AC  [2022-01-17 22:23:00] production.INFO:  [IXP-SW01] Platform: Found Os: Huawei Versatile Routing Platform Software VRP  [2022-01-17 22:23:00] production.INFO:  [IXP-SW01] Platform: Updating OsDate from  to Unknown  [2022-01-17 22:23:00] production.INFO:  [IXP-SW01] Platform: Found OsVersion: 5.170  [2022-01-17 22:23:00] production.INFO:  [IXP-SW01] Platform: Found SerialNumber: (not implemented)  [2022-01-17 22:23:06] production.INFO:  - IXP-SW01 - found pre-existing port for ifIndex 4  [2022-01-17 22:23:06] production.INFO: [IXP-SW01]: [Index: 4] Updating Name from [] to [MEth0/0/1]    Please let me know what other information could be useful to troubleshoot further.  

moviedo-sc commented 2 years ago

Running IXP Manager V6.2.0.


From: barryo @.> Sent: Tuesday, January 18, 2022 5:03:36 PM To: opensolutions/OSS_SNMP @.> Cc: Mauricio Oviedo @.>; Mention @.> Subject: Re: [opensolutions/OSS_SNMP] Support for Huawei - S6720-54C-EI-48S-AC (#72)

What version of IXP Manager are you using @moviedo-schttps://github.com/moviedo-sc ?

— Reply to this email directly, view it on GitHubhttps://github.com/opensolutions/OSS_SNMP/issues/72#issuecomment-1015202506, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMMQ774BYDA6WJQSU5IERQ3UWUUGRANCNFSM5C5PEHIQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you were mentioned.Message ID: @.***>

barryo commented 2 years ago

What version of IXP Manager are you using @moviedo-sc ?

I can see it's finding the management port fine:

[2022-01-17 22:23:06] production.INFO:  - IXP-SW01 - found pre-existing port for ifIndex 4 
[2022-01-17 22:23:06] production.INFO: [IXP-SW01]: [Index: 4] Updating Name from [] to [MEth0/0/1] 

But the standard ports all look like they should be discovered without issue.

At this line, can you insert the following and paste the results to the pastebin?

Sorry, line is: https://github.com/inex/IXP-Manager/blob/release-v6/app/Models/Switcher.php#L381

dump( $host->useIface()->indexes() );
dump( $host->useIface()->names() );
dump( $host->useIface()->aliases() );
dump( $host->useIface()->descriptions() );
dump( $host->useIface()->speeds() );
dump( $host->useIface()->highSpeeds() );
dump( $host->useIface()->operationStates() );
dd( $host->useIface()->types() );