Mactrack does not display MAC addresses

Support questions about the MAC Track plugin

Moderators: Developers, Moderators

Post Reply
tyrr
Posts: 17
Joined: Wed Apr 26, 2017 4:35 am

Mactrack does not display MAC addresses

Post by tyrr »

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 15712 times
Sans titre.png
Sans titre.png (30.46 KiB) Viewed 15714 times
User avatar
XTech
Cacti User
Posts: 59
Joined: Sat May 26, 2012 9:25 pm

Re: Mactrack does not display MAC addresses

Post by XTech »

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.
User avatar
jrush
Posts: 8
Joined: Tue May 30, 2017 3:50 am

Re: Mactrack does not display MAC addresses

Post by jrush »

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: Select all

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.
tyrr
Posts: 17
Joined: Wed Apr 26, 2017 4:35 am

Re: Mactrack does not display MAC addresses

Post by tyrr »

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 !
tyrr
Posts: 17
Joined: Wed Apr 26, 2017 4:35 am

Re: Mactrack does not display MAC addresses

Post by tyrr »

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 15661 times
User avatar
XTech
Cacti User
Posts: 59
Joined: Sat May 26, 2012 9:25 pm

Re: Mactrack does not display MAC addresses

Post by XTech »

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.
User avatar
jrush
Posts: 8
Joined: Tue May 30, 2017 3:50 am

Re: Mactrack does not display MAC addresses

Post by jrush »

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.
User avatar
XTech
Cacti User
Posts: 59
Joined: Sat May 26, 2012 9:25 pm

Re: Mactrack does not display MAC addresses

Post by XTech »

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.
tyrr
Posts: 17
Joined: Wed Apr 26, 2017 4:35 am

Re: Mactrack does not display MAC addresses

Post by tyrr »

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
User avatar
jrush
Posts: 8
Joined: Tue May 30, 2017 3:50 am

Re: Mactrack does not display MAC addresses

Post by jrush »

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...
tyrr
Posts: 17
Joined: Wed Apr 26, 2017 4:35 am

Re: Mactrack does not display MAC addresses

Post by tyrr »

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
User avatar
XTech
Cacti User
Posts: 59
Joined: Sat May 26, 2012 9:25 pm

Re: Mactrack does not display MAC addresses

Post by XTech »

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: Select all

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
mactrack_dot1q.txt
get_common_dot1q_switch_ports
(9.06 KiB) Downloaded 448 times
User avatar
jrush
Posts: 8
Joined: Tue May 30, 2017 3:50 am

Re: Mactrack does not display MAC addresses

Post by jrush »

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/suppor ... an-queries
https://serverfault.com/questions/54050 ... p-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.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest