Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Tue Apr 23, 2019 5:09 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: Mactrack does not display MAC addresses
PostPosted: Wed May 31, 2017 8:55 am 
Offline

Joined: Wed Apr 26, 2017 4:35 am
Posts: 17
Hi all,
I'm a new user of Cacti since one month and I decide to add Mactrack plugin at my cacti system. So I install it proprely and I had my devices.
But the problem taht I have is Mactrack not display MAC adresses. It refers juste few adresses while all devices are UP and thez are configured the same. But all interfaces are viewed.



I'm working on a Centos7, Cacti-0.8.8h, Mactrack 2.9.

If someone have an issue or have idea to make it functional

Thanks in advance, cordially.


Attachments:
Sans titre2.png
Sans titre2.png [ 40.3 KiB | Viewed 1304 times ]
Sans titre.png
Sans titre.png [ 30.46 KiB | Viewed 1306 times ]
Top
 Profile  
 
 Post subject: Re: Mactrack does not display MAC addresses
PostPosted: Thu Jun 01, 2017 3:38 am 
Offline
Cacti User
User avatar

Joined: Sat May 26, 2012 9:25 pm
Posts: 59
Looks like you used incorrect scanning function for your Procurve devices, because there are no active user ports in mactrack output. The procurve scanning functions in mactrack are quite old and couldn't work properly with modern switches. Try to use generic scanning function instead.


Top
 Profile  
 
 Post subject: Re: Mactrack does not display MAC addresses
PostPosted: Thu Jun 01, 2017 3:57 am 
Offline
User avatar

Joined: Tue May 30, 2017 3:50 am
Posts: 8
tyrr, in searching of right "MAC Address Scanning Function", you can try also scanning in debug mode (choose one of your devices and use it in parameter "-id="):
Code:
cd /usr/share/cacti/plugins/mactrack
php -q mactrack_scanner.php -id=2 -d

Change scan-function in "Device types" and start again this command.
I hope it will help you.


Top
 Profile  
 
 Post subject: Re: Mactrack does not display MAC addresses
PostPosted: Thu Jun 01, 2017 4:07 am 
Offline

Joined: Wed Apr 26, 2017 4:35 am
Posts: 17
Wow, fantastic, the first answer is the right one. I change to generic scanning function and it works corectly !

Thank you XTech and jrush for taking the time to respond !


Top
 Profile  
 
 Post subject: Re: Mactrack does not display MAC addresses
PostPosted: Thu Jun 01, 2017 4:40 am 
Offline

Joined: Wed Apr 26, 2017 4:35 am
Posts: 17
Hum, so now I have Mac addresses, but haven't Vlan ID's. Have you an idea for what ?


Attachments:
Sans titre3.png
Sans titre3.png [ 19.21 KiB | Viewed 1253 times ]
Top
 Profile  
 
 Post subject: Re: Mactrack does not display MAC addresses
PostPosted: Thu Jun 01, 2017 4:54 am 
Offline
Cacti User
User avatar

Joined: Sat May 26, 2012 9:25 pm
Posts: 59
Yes, the generic scanning function didn't know how to acquire VLAN data. Generic dot1q function knows how acquire the VLAN data from SNMP, but almost all of the vendors did not follow the standards.
Some time ago I wrote mactrack scanning function, which should work with VLAN data, but it is untested yet.


Top
 Profile  
 
 Post subject: Re: Mactrack does not display MAC addresses
PostPosted: Thu Jun 01, 2017 5:22 am 
Offline
User avatar

Joined: Tue May 30, 2017 3:50 am
Posts: 8
Just for info:
In my case, for example for Edgecore switch, i use function "get_dell_dot1q_switch_ports".
In "Devices" Table(Tab) on Mactrack Tab, for my Edgecore switch, i see Total VLAN's = 0.
But in "MAC Addresses" Table(Tab) for Edgecore i see all my vlans (cca 25 vlans) beside of MAC addresses.


Top
 Profile  
 
 Post subject: Re: Mactrack does not display MAC addresses
PostPosted: Thu Jun 01, 2017 5:33 am 
Offline
Cacti User
User avatar

Joined: Sat May 26, 2012 9:25 pm
Posts: 59
Yes, but I'm talking about get_generic_dot1q_switch_ports function. Some vendor-specific functions works quite good (for example, Cisco, D-Link), but some not (for example, most of Procurve), and get_generic_dot1q_switch_ports didn't work for most of switches because most vendors didn't use dot1qTpFdbAddress in Q-Bridge SNMP table on which generic_dot1q function is based.

jrush wrote:
Just for info:
In my case, for example for Edgecore switch, i use function "get_dell_dot1q_switch_ports".
In "Devices" Table(Tab) on Mactrack Tab, for my Edgecore switch, i see Total VLAN's = 0.
But in "MAC Addresses" Table(Tab) for Edgecore i see all my vlans (cca 25 vlans) beside of MAC addresses.


Top
 Profile  
 
 Post subject: Re: Mactrack does not display MAC addresses
PostPosted: Thu Jun 01, 2017 6:29 am 
Offline

Joined: Wed Apr 26, 2017 4:35 am
Posts: 17
Thank you for your answer !
In my case, i monitor Procurve 2530,2610 and 5308. I had try with get_generic_dot1q_switch_ports like you say XTech but it don't work.

jrush, for me, in device view (in Mactrack tab), I see Total VLAN's=0 but in Mac addresses tab, i see Vlan ID = N/A and Vlan Name = N/A for all my devices.
So I had try to use get_dell_dot1q_switch_ports like you say but without success

So if I understand corerctly, i can't have Vlan ID cause of my equipment ?

Thank a lot for your time


Top
 Profile  
 
 Post subject: Re: Mactrack does not display MAC addresses
PostPosted: Thu Jun 01, 2017 7:08 am 
Offline
User avatar

Joined: Tue May 30, 2017 3:50 am
Posts: 8
I just had a luck with experiments with different functions, when i found this "dell" function.
You can try another functions, also for luck, or read, analyze and change source code from one of functions...
I know, for example for Cisco, it's not easy to get this mactable with vlans, script will read more than one MIB tree branches and join them together in one table:
And different vendors can have their own methods for this operation...


Top
 Profile  
 
 Post subject: Re: Mactrack does not display MAC addresses
PostPosted: Thu Jun 01, 2017 7:14 am 
Offline

Joined: Wed Apr 26, 2017 4:35 am
Posts: 17
Thank you for your answer,
I will try others function and try to change source code for one..
I will post here if I find an issue for HP Procurve.

Thanks a lot


Top
 Profile  
 
 Post subject: Re: Mactrack does not display MAC addresses
PostPosted: Thu Jun 01, 2017 8:07 am 
Offline
Cacti User
User avatar

Joined: Sat May 26, 2012 9:25 pm
Posts: 59
I uploaded a file with my get_common_dot1q_switch_ports function. It should be placed in <mactrack dir>/lib directory and renamed from .txt to .php
Also you should modify mactrack_vendors.php file in this directory, adding the following string to the end of file:
Code:
include_once(dirname(__FILE__) . "/mactrack_dot1q.php");

and, finally in web interface do Tracking Utilites->Refresh Scanning Functions.
Now you can try my scanning function on your equipment.

Sorry, I can't test it by myself, because at this moment I have no Procurve with active vlan ports in my network.

If this function will work for you, please report.


Attachments:
File comment: get_common_dot1q_switch_ports
mactrack_dot1q.txt [9.06 KiB]
Downloaded 105 times
Top
 Profile  
 
 Post subject: Re: Mactrack does not display MAC addresses
PostPosted: Thu Jun 01, 2017 9:00 am 
Offline
User avatar

Joined: Tue May 30, 2017 3:50 am
Posts: 8
Did you try all of these functions?
    get_procurve_ng_switch_ports
    get_procurve_ngi_switch_ports
    get_norbay_ng_switch_ports

Similar thread is here:
http://forums.cacti.net/post-92932.html

Look also here:
http://support.pathsolutions.com/support/solutions/articles/14000026640-hp-procurve-switch-snmp-vlan-queries
https://serverfault.com/questions/540507/get-port-vlan-tag-via-snmp-on-hp-procurve

Maybe you need these OIDs:
.1.3.6.1.2.1.17.7.1.4 (Q-BRIDGE-MIB / dot1qVlan) - found it in scripts:
    mactrack_hp_ng.php / get_procurve_ng_switch_ports() - ".1.3.6.1.2.1.17.7.1.4.3.1.1"(dot1qVlanStaticName), ".1.3.6.1.2.1.17.7.1.4.5.1.1"(dot1qPvid)
    mactrack_hp_ngi.php / get_procurve_ngi_switch_ports() - ".1.3.6.1.2.1.17.7.1.4.3.1.1"(dot1qVlanStaticName), ".1.3.6.1.2.1.17.7.1.4.5.1.1"(dot1qPvid)
    mactrack_dlink.php / get_dlink_l2_dot1dTpFdbEntry_ports() - ".1.3.6.1.2.1.17.7.1.4.3.1.1"(dot1qVlanStaticName)
    mactrack_enterasys_N7.php / get_enterasys_N7_switch_ports() - ".1.3.6.1.2.1.17.7.1.4.3.1.1"(dot1qVlanStaticName)
    mactrack_dell.php / get_base_dell_dot1qFdb_ports() - ".1.3.6.1.2.1.17.7.1.4.3.1.1"(dot1qVlanStaticName)
----
.1.3.6.1.4.1.11.2.14.11.5.1.3 (MIB HP-VLAN / hpVLAN) - found it in script:
    mactrack_hp.php / get_procurve_switch_ports() - ".1.3.6.1.4.1.11.2.14.11.5.1.3.1.1.4.1.2"(hpVlanIdentName), ".1.3.6.1.4.1.11.2.14.11.5.1.3.1.1.8.1.1.1"(hpVlanMemberTagged2??), ".1.3.6.1.4.1.11.2.14.11.5.1.3.1.1.5.1.2"(hpVlanMemberIndex)
.1.3.6.1.4.1.11.2.14.11.5.1.7 (CONFIG-MIB / hpConfig) - in:
    mactrack_norbay_ng.php / get_norbay_ng_switch_ports()
    mactrack_hp_ng.php / get_procurve_ng_switch_ports()
    mactrack_hp_ngi.php / get_procurve_ngi_switch_ports()
.1.3.111.2.802.1.1.4.1.4.2 (IEEE8021-Q-BRIDGE-MIB / ieee8021QBridgeVlanCurrentTable) - not found in MacTrack scripts.


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

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


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