Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Mon Apr 24, 2017 2:08 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: MAC Track getting malformed MAC addresses
PostPosted: Mon Sep 09, 2013 3:20 pm 
Offline

Joined: Mon Sep 09, 2013 3:04 pm
Posts: 1
Hello

I've recently installed cacti 0.8.8a via the all-in-one installer on a 2008 r2 server with the Mactrack plugin and so it has been able to pull the interface data from the test switch i've entered into it, unfortunately however it's giving me all kinds of issues with the MAC addresses, i've attached an image that shows the problem. Wasn't sure if anybody had ran into this before or not and could provide me any help with this, pretty much tried everything I know to do without any success.

Thanks!


Attachments:
Cacti Issue Example.png
Cacti Issue Example.png [ 61.75 KiB | Viewed 2990 times ]
Top
 Profile  
 
 Post subject: Re: MAC Track getting malformed MAC addresses
PostPosted: Tue Dec 24, 2013 5:32 am 
Offline

Joined: Tue Dec 24, 2013 4:29 am
Posts: 1
Hallo,

Same problem here.
Cacti version in my case is 0.8.7.g

I have tested as much as possibile different device type configuration, but without success.
Clearing the db and rescanning show many mac address correctly, but also lots of malformed and the output is very similar to the previous screenshot.
Maybe it is not related to the device type options...
Is there any debug/command that could be helpful in this particular case to help to find the solution?

Regards!

[EDIT] [SOLVED]

MAC Track now shows all mac addresses correctly.
Unfortunately I do not have pinpointed exactly what could be the cause which originated the malformed output, but in my case i have just decreased to 2 the number of concurrent processes. It took some hours and then I noticed the tables were correctly populated.
Do not know if that was the change in the config which addressed the problem, since i was not able to understand exactly what was going wrong.

HTH.


Top
 Profile  
 
 Post subject: Re: MAC Track getting malformed MAC addresses
PostPosted: Fri May 23, 2014 8:29 am 
Offline

Joined: Wed May 21, 2014 8:00 am
Posts: 4
Hello,

we have the same problem: Windows Server 2003, Cacti 0.8.8b, Mactrack 2.9

I couldn´t solve the problem, so i tried to fix the symptom.

In mactrack_functions.php find the function xform_mac_address($mac_address) and replace

Code:
   return $mac_address;

with
Code:
   /* ############ Patch ################ */
   /* Is $mac_address malformed ??        */
   /* ----------------------------------- */
   if (strlen($mac_address) == 17){
      /* $mac_address looks right */
   }else{
      /* $mac_address looks wrong */
      $mac_address = "NOT USER";
   }
   /* ################################### */

   return $mac_address;

The malformed mac addresses won´t show up on the tab "MAC Addresses", but there will be "NOT USER" mac addresses on "IP Addresses" tab.


Top
 Profile  
 
 Post subject: Re: MAC Track getting malformed MAC addresses
PostPosted: Wed May 28, 2014 5:14 am 
Offline

Joined: Wed May 21, 2014 8:00 am
Posts: 4
Hello,
I investigated the problem a little further:

HP Switch:
Type: HP J9574A 3800-48G-PoE+-4SFP+ Switch
Firmware: Software revision KA.15.09.0012

Net-SNMP:
Version 5.6.1.1

Cacti OS:
Windows 2003

Command (default):
snmpwalk.exe -v 2c -c secret 10.10.10.1 .1.3.6.1.2.1.17.4.3

Output:
SNMPv2-SMI::mib-2.17.4.3.1.1.244.206.70.50.126.23 = Hex-STRING: F4 CE 46 32 7E 17
SNMPv2-SMI::mib-2.17.4.3.1.1.244.206.70.55.195.180 = STRING: "ôÎF7ô"
SNMPv2-SMI::mib-2.17.4.3.1.1.244.206.70.59.213.98 = STRING: "ôÎF;Õb"
SNMPv2-SMI::mib-2.17.4.3.1.1.244.206.70.63.197.149 = STRING: "ôÎF?Å•"
SNMPv2-SMI::mib-2.17.4.3.1.1.244.206.70.81.123.73 = STRING: "ôÎFQ{I"

SNMPv2-SMI::mib-2.17.4.3.1.1.248.15.65.89.247.197 = Hex-STRING: F8 0F 41 59 F7 C5
SNMPv2-SMI::mib-2.17.4.3.1.1.248.102.242.201.98.128 = Hex-STRING: F8 66 F2 C9 62 80


Command (strings as ascii):
snmpwalk.exe -O a -v 2c -c secret 10.10.10.1 .1.3.6.1.2.1.17.4.3

Output:
SNMPv2-SMI::mib-2.17.4.3.1.1.244.206.70.50.126.23 = STRING: "ôÎF2~."
SNMPv2-SMI::mib-2.17.4.3.1.1.244.206.70.55.195.180 = STRING: "ôÎF7ô"
SNMPv2-SMI::mib-2.17.4.3.1.1.244.206.70.59.213.98 = STRING: "ôÎF;Õb"
SNMPv2-SMI::mib-2.17.4.3.1.1.244.206.70.63.197.149 = STRING: "ôÎF?Å•"
SNMPv2-SMI::mib-2.17.4.3.1.1.244.206.70.81.123.73 = STRING: "ôÎFQ{I"

SNMPv2-SMI::mib-2.17.4.3.1.1.248.15.65.89.247.197 = STRING: "ø.AY÷Å"
SNMPv2-SMI::mib-2.17.4.3.1.1.248.102.242.201.98.128 = STRING: "øfòÉb."


Command (strings as hex):
snmpwalk.exe -O x -v 2c -c secret 10.10.10.1 .1.3.6.1.2.1.17.4.3

Output:
SNMPv2-SMI::mib-2.17.4.3.1.1.244.206.70.50.126.23 = Hex-STRING: F4 CE 46 32 7E 17
SNMPv2-SMI::mib-2.17.4.3.1.1.244.206.70.55.195.180 = Hex-STRING: F4 CE 46 37 C3 B4
SNMPv2-SMI::mib-2.17.4.3.1.1.244.206.70.59.213.98 = Hex-STRING: F4 CE 46 3B D5 62
SNMPv2-SMI::mib-2.17.4.3.1.1.244.206.70.63.197.149 = Hex-STRING: F4 CE 46 3F C5 95
SNMPv2-SMI::mib-2.17.4.3.1.1.244.206.70.81.123.73 = Hex-STRING: F4 CE 46 51 7B 49

SNMPv2-SMI::mib-2.17.4.3.1.1.248.15.65.89.247.197 = Hex-STRING: F8 0F 41 59 F7 C5
SNMPv2-SMI::mib-2.17.4.3.1.1.248.102.242.201.98.128 = Hex-STRING: F8 66 F2 C9 62 80

Some MAC addresses are treated as STRING (they show up malformed in MAC Track) and the others as Hex-STRING.

So I patched MACTrack to always use snmpwalk.exe with parameter "-O x" except when retrieving ifName, ifAlias and ifDescription (we don´t want these strings as hex !). mactrack_functions.php also includes the changes from this post http://forums.cacti.net/viewtopic.php?f=15&t=50875 .

This patch is not tested with vlans !
This patch only works with cacti installed on Windows with Net-SNMP !

This patch might not work for you !


Attachments:
mactrack_functions.zip [28.78 KiB]
Downloaded 104 times
Top
 Profile  
 
 Post subject: Re: MAC Track getting malformed MAC addresses
PostPosted: Tue Jan 20, 2015 2:48 pm 
Offline

Joined: Thu Sep 10, 2009 6:46 am
Posts: 9
I know people hate bringing up old threads but thanks for the fix on malformed mac addresses.

I still don't understand why the snmp query responds with a mixture of STRING and Hex-STRING ?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group