gilles184
Joined: 17 Jul 2006 Posts: 3
|
Posted: Mon Apr 23, 2007 7:41 pm Post subject: MacTrack on 3Com Switches |
|
|
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...
| Description: |
|
 Download |
| Filename: |
cacti_device_type_export-3com.txt |
| Filesize: |
454 Bytes |
| Downloaded: |
384 Time(s) |
| 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: |
305 Time(s) |
|
|