[FC] MacTrack on 3Com Switches

Support questions about the MAC Track plugin

Moderators: Developers, Moderators

Post Reply
gilles184
Posts: 3
Joined: Mon Jul 17, 2006 6:29 pm

[FC] MacTrack on 3Com Switches

Post by gilles184 »

Hi everyone,

i've tried to make Mactrack working with 3com switch.

first of all, i'm not a php developper so be kind :)

for this i've copied get_dot1dTpFdbEntry_ports and get_base_dot1dTpFdbEntry_ports form mactrack_functions.php into
mactrack_3com.php
and modify them renamed as get_3Com_dot1dTpFdbEntry_ports and
get_3Com_base_dot1dTpFdbEntry_ports

i do this because i didn't want to modify mactrack_functions.php and :

1) 3Com 1100 have IfName empty so it is not possible to use "Ports to Ignore"

3Com 1100 have ifDescr instead but names use this format : "RMON:Vx Port Y on Unit z"
as you can see it is not realy simple and use ":" in it which will makes "Ports to Ignore" unusable.
So this script check for IfDescr if IfName are empty
transform it to "PortN/M" where N is stack unit an M port Number
In this way you can specify port to ignore as "PortN/M"
this is true for 3com 1100 and 42xx

2) 3Com 5500 have IfType 117 (Gigabit Ethernet)

Macktrack check IfType as >=6 and <=9
i've just added || == 117

NB: my linux print snmp enums as text so i'v edited /etc/snmp/snmp.conf and added "printNumericEnums 1"

3) in get_base_dot1dTpFdbEntry_ports "Ports to Ignore" looks useless
"if (!in_array($port_number, $ignore_ports)" compare portname to portnumber ?
(Again i'm not a developper so maybe i miss something).


So to use It copy attached file in :
<cactidir>/plugins/mactrack/lib
edit <cactidir>/plugins/mactrack/lib/mactrack_vendors.php
and add

Code: Select all

include_once($config["base_path"] . "/plugins/mactrack/lib/mactrack_3com.php");
then in cacti : Tracking Utilities -> Refresh Scanning Functions


this have been tested on 3com : 1100 4200 4900 and 5500


NB: these switches have 802.1Q but 3com seems to use special mib tree and code mac address in binary in oid as index so i didn't investigate this way too much. (too much headhache:) )

Any comments welcome.

Gilles.

PS: my english is not as good as it shoud be sorry...
Attachments
mactrack_3com.txt
3com scan function rename it as mactrack_3com.php and drop it in
&lt;cactidir&gt;/plugins/mactrack/lib
(11.89 KiB) Downloaded 979 times
cacti_device_type_export-3com.txt
device type
(454 Bytes) Downloaded 1096 times
masterj
Posts: 6
Joined: Mon Dec 05, 2005 7:15 am
Location: Norway

Post by masterj »

Your scripts work fine:)

Has anyone got this to work so mactrack get's the VLAN# from the 3com switches to?
Jo Christian Buvarp
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Gilles,

I have added this script to the 2.0 development. Thanks for your contribution.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Syntax
Posts: 10
Joined: Thu Jul 14, 2011 1:55 am

Re: [FC] MacTrack on 3Com Switches

Post by Syntax »

I figured out that the script doesn't update neither the "mac_track_interfaces" table with the new "ifName" values nor the "mac_track_interface_graps" table, because your function "complete_3com_ifName()" is called after "build_InterfacesTable()". So the bug which result is that, in the interface tab of mactrack, we can't see the graph which is normally associated with an interface.
So I modified your function, I hope you don't mind, here is my file "mactrack_3com.php". You can now see correctly the associated graphs. Hope it will work for everyone else.
Attachments
mactrack_3com.txt
(9.21 KiB) Downloaded 298 times
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: [FC] MacTrack on 3Com Switches

Post by TheWitness »

Cool, thanks. Sending upstream.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
asterixlinux
Posts: 19
Joined: Wed Jul 13, 2011 6:41 am

Re: [FC] MacTrack on 3Com Switches

Post by asterixlinux »

Hi,
i'm configuring mactrack 2.9 for someone switches (Cisco 3750,6509,HP Procurve& 3Com 3870/4400) and is all ok; working fine
But now i have serious problem to configure this plugin for 3Com 4500 ( switches L2/L3)
This is very important for me and my society because i am deployment this mactrack control plugin for about 600 3Com 4500 switches and
i am trying this configuration but without success.
Nothing happen in Device Tracking - MAC to IP Report View and and nothing in Device Tracking - ARP/IP View
This is the configuration
[*]Switch/Router
[*]Vendor snmp Object ID Match -->.1.3.6.1.4.1.43
[*]MAC Address Scanning Function--->get_3com_dot1d
[*]IP Address Scanning Function --->get_standard_arp_table
[*]Serial Number Base OID --->.1.3.6.1.4.1.43.1.16.4.3.31
[*]Serial Number Collection Method
[*] Lw/Hig port ---> 0

Can you help me ?? have you some documentation about this plugin ??
thank

C.
User avatar
XTech
Cacti User
Posts: 59
Joined: Sat May 26, 2012 9:25 pm

Re: [FC] MacTrack on 3Com Switches

Post by XTech »

Try this. This is modified version of mactrack_3com.php script. You need to place it in <mactrack plugin>/lib directory and add a corresponding entry to <mactrack plugin>/lib/mactrack_vendors.php file.

For me, this version works less or more reliably with 3Com 4500/5500/4500G/4200G/5500G and H3C S3600 switches, but it better than nothing.

AFAIR here I added support for dot1q vlans and fixed some incompatibility with switches listed above. Also I removed support for older 3Com interface name remapping.
Attachments
mactrack_h3c.txt
rename it to mactrack_h3c.php
(8.2 KiB) Downloaded 405 times
asterixlinux
Posts: 19
Joined: Wed Jul 13, 2011 6:41 am

Re: [FC] MacTrack on 3Com Switches

Post by asterixlinux »

really, how many times can I say THANK YOU ?!?!?! :lol: :lol: :lol:
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests