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    


Ignore Ports
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Cacti Forum Index -> Plugin: (MAC Track)
Author Message
TheWitness
Developer


Joined: 14 May 2002
Posts: 9689
Location: MI, USA

PostPosted: Fri Aug 18, 2006 1:46 pm    Post subject: Reply with quote

YOU NEED TO REMOVE THE SINGLE QUOTES FROM AROUND THE PORTS TO IGNORE!!

TheWitness
Back to top
ddonohue
Cacti User


Joined: 10 Jul 2006
Posts: 75

PostPosted: Fri Aug 18, 2006 8:26 pm    Post subject: Reply with quote

Sorry, used the wrong picture


blah.JPG
 Description:
 Filesize:  119.53 KB
 Viewed:  2423 Time(s)

blah.JPG


Back to top
TheWitness
Developer


Joined: 14 May 2002
Posts: 9689
Location: MI, USA

PostPosted: Fri Aug 18, 2006 8:53 pm    Post subject: Reply with quote

You will have to show me on-line. I have reviewed the code and can not reproduce without the "I saw it break by myself" factor.

TheWitness
Back to top
ddonohue
Cacti User


Joined: 10 Jul 2006
Posts: 75

PostPosted: Sat Aug 19, 2006 5:27 pm    Post subject: Reply with quote

The only place i've seen it broken is in interfaces where there is 3 numbers, ie.

2/0/1
Back to top
TheWitness
Developer


Joined: 14 May 2002
Posts: 9689
Location: MI, USA

PostPosted: Sat Aug 19, 2006 8:14 pm    Post subject: Reply with quote

You should debug by placing some print logic in plugins/mactrack/lib/mactrack_functions.php. The function is something like "get.. dot1d ..ports". Look for the word "Ignore" and then print the ifName for each as it does the compare and see what is going on. It might also be good to print out the Ignore ports array with the function var_dump($ignore_ports);

Then, once you have made the mod, run the scanner in Debug mode.

TheWitness
Back to top
Grogman
Cacti User


Joined: 21 Feb 2006
Posts: 52
Location: Spain

PostPosted: Wed Sep 06, 2006 9:04 am    Post subject: Reply with quote

Hi to everyone,

I had the same problem with cisco devices. It was solved when I introduced the dot1dBasePortIndex instead of the port descriptor. For example, if the port you want to ignore is Fa1/1, you can obtain the interface index in the iftable of your device (oid .1.3.6.1.2.1.2.2.1.2) and the relation between that index and the dot1dBasePortIndex in the dot1dBasePortTable (oid .1.3.6.1.2.1.17.1.4.1.2). In that last table, you have to search the interface index in the results of the snmpwalk, and the dot1dBasePortIndex you have to introduce in the ignore field is the last number of the oid in which you found the interface index. Remember that if you want to gather this information in a cisco device, you'll probably have to do community indexing with the vlan id in which the port you want to ignore is assigned.

Hope this helps you


Witness: Is the ignore field supposed to work this way, or is there any particular problem ignoring ports with cisco devices that can be worked around introducing the dot1dBasePortIndex instead of the port numbers?
Back to top
jafne



Joined: 17 Aug 2006
Posts: 4

PostPosted: Wed Nov 15, 2006 3:17 pm    Post subject: Reply with quote

I'm using this against a Cisco 3500XL and I'm unable to ignore the ports, too. From reading this thread, I did an snmpwalk against the switch and there is no "ifName" variable. I'd really like to ignore the Gi0/1 port because I've got several Cisco 3500XLs stacked and don't want the info from Switch #2 being reported as part of Switch #1.

If you need screenshots or the results of the snmpwalk, let me know. Any help would be appreciated.

Running cacti 0.8.6i, mactrack 0.0.1b


Last edited by jafne on Thu Nov 16, 2006 9:20 am; edited 1 time in total
Back to top
Grogman
Cacti User


Joined: 21 Feb 2006
Posts: 52
Location: Spain

PostPosted: Thu Nov 16, 2006 3:09 am    Post subject: Reply with quote

Hi Jafne,

You should try something like this:

First of all, issue a snmpwalk of the oid .1.3.6.1.2.1.2.2.1.2 , you should obtain something equivalent to this in your switch:
.....
IF-MIB::ifDescr.447 = STRING: FastEthernet9/1
IF-MIB::ifDescr.448 = STRING: FastEthernet9/2
IF-MIB::ifDescr.449 = STRING: FastEthernet9/3
IF-MIB::ifDescr.450 = STRING: FastEthernet9/4
IF-MIB::ifDescr.451 = STRING: FastEthernet9/5
IF-MIB::ifDescr.452 = STRING: FastEthernet9/6
IF-MIB::ifDescr.453 = STRING: FastEthernet9/7
IF-MIB::ifDescr.454 = STRING: FastEthernet9/8
IF-MIB::ifDescr.455 = STRING: FastEthernet9/9
.....

Supose we want to ignore port FastEthernet9/5, this is index number 451. Now we issue a snmpwalk of oid .1.3.6.1.2.1.17.1.4.1.2 with community indexing (using the vlan of FastEthernet9/5) and we obtain something like this:
.....
SNMPv2-SMI::mib-2.17.1.4.1.2.1026 = INTEGER: 448
SNMPv2-SMI::mib-2.17.1.4.1.2.1027 = INTEGER: 449
SNMPv2-SMI::mib-2.17.1.4.1.2.1028 = INTEGER: 450
SNMPv2-SMI::mib-2.17.1.4.1.2.1029 = INTEGER: 451
SNMPv2-SMI::mib-2.17.1.4.1.2.1030 = INTEGER: 452
SNMPv2-SMI::mib-2.17.1.4.1.2.1031 = INTEGER: 453
SNMPv2-SMI::mib-2.17.1.4.1.2.1032 = INTEGER: 454
SNMPv2-SMI::mib-2.17.1.4.1.2.1033 = INTEGER: 455
....

Now you see that index 451 corresponds to oid mib-2.17.1.4.1.2.1029, so 1029 should be your number. Introducing 1029 in the ignore ports field should work...

If you need more help, please send the snmpwalk outputs of the above oid's so we can take a look
Back to top
jafne



Joined: 17 Aug 2006
Posts: 4

PostPosted: Thu Nov 16, 2006 9:09 am    Post subject: Reply with quote

Solved! Thank you very much!
Back to top
TheWitness
Developer


Joined: 14 May 2002
Posts: 9689
Location: MI, USA

PostPosted: Tue Jan 02, 2007 12:19 am    Post subject: Reply with quote

I am currently working on a new release. I will add this enhancement to the list. Please follow my sticky in the mactrack section of the forum for more details.

Your feedback would be highly desirable.

TheWitness
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
Goto page Previous  1, 2
Page 2 of 2

 



Powered by phpBB © 2001, 2005 phpBB Group