Cacti / plugin_mactrack

Mactrack Plugin for Cacti
GNU General Public License v2.0
12 stars 25 forks source link

Feature request: Add Port-channel interfaces to MAC/IP Address collection #67

Closed jpobeda closed 5 months ago

jpobeda commented 6 years ago

Following the discussion on this thread

Currently view_interfaces is taking Port-channel interfaces into account.

The view_ips and view_macs are not.

It'll need to be aware of the port-channel members to avoid duplicated data. And maybe also suppress the data from the individual members of the channel.

Not sure at the moment if there is an standard MIB-OID covering the LACP members.

I'll do some research and add info as soon as I can get to it.

netniV commented 6 years ago

I assume you are referring to aggregate ports were you have multiple interfaces as a single grouped port? Terminology is different depending on the router/switch you are using. Let me know what you find and we can look into it.

jpobeda commented 6 years ago

Well, if you look at the original post on that forum thread, the user added this for Cisco only. I suspect more people that don't manage Cisco devices would like to have it as well.

Yes, it's about LAG (802.3 ad).

So far it looks like SNMP is the worst way to go.

Best approach seems to be, parsing ifName or ifDescr looking for "Po[0-999]" or "port-channel[0-999]".

I haven't checked [0-999] the actual maximum on the RFC.

Find the LAG members for Cisco is another pain in the ass. Not all of them support the whole MIB...

But I guess we could work around that by allowing the user to manually specify the members from the list after the first collection. I would do that to avoid duplicated data mainly. If the user doesn't care or wouldn't bother to specify them, fine, but I'd give them the option. Maybe only show them a WARNING that the MAC/IP of the interfaces set as members of a LAG will be suppressed.

It may also worth to add an additional note/warning to indicate that this will only work for devices honoring the naming convention of Po/Port-channel (matching lower or upper case).

Note: we should still be able to have the port-channels and its members under the interfaces view.

Does that make sense?

netniV commented 6 years ago

We use HP 1920 OfficeConnects in places, it's horrible trying to find the LAG/LACP ports on there via SNMP. I am in the process of writing my own extras for mac track to test against them but MacTrack isn't an easy thing to extend.

jpobeda commented 6 years ago

Oh c'mon! I added the uggly dot1x functionality by copying and pasting code from the other functions lol btw it took me weeks which I think it'd take you a lot less haha

netniV commented 6 years ago

Unfortunately, it's partly because the HPs aren't playing nicely by using bitwise masking to identify ports 😱

xxconn commented 5 months ago

PR #221 added this enhancement