Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


MacTrack on 3Com Switches

 
Post new topic   Reply to topic    Cacti Forum Index -> Plugin: (MAC Track)
Author Message
gilles184



Joined: 17 Jul 2006
Posts: 3

PostPosted: Mon Apr 23, 2007 7:41 pm    Post subject: MacTrack on 3Com Switches Reply with quote

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:
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...



cacti_device_type_export-3com.txt
 Description:
device type

Download
 Filename:  cacti_device_type_export-3com.txt
 Filesize:  454 Bytes
 Downloaded:  328 Time(s)


mactrack_3com.txt
 Description:
3com scan function rename it as mactrack_3com.php and drop it in
<cactidir>/plugins/mactrack/lib

Download
 Filename:  mactrack_3com.txt
 Filesize:  11.89 KB
 Downloaded:  256 Time(s)

Back to top
masterj



Joined: 05 Dec 2005
Posts: 6
Location: Norway

PostPosted: Thu Apr 24, 2008 8:54 am    Post subject: Reply with quote

Your scripts work fine:)

Has anyone got this to work so mactrack get's the VLAN# from the 3com switches to?
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Plugin: (MAC Track) All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group