Mac Address per Port
Moderators: Developers, Moderators
Mac Address per Port
Is it possible to count the number of mac addresses for a given port on a Cisco device and graph it over time? I'm trying to find rouge hubs before I turn on port security and limit to 1 per port.
RC
RC
- TheWitness
- Developer
- Posts: 17059
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
That's an interesting thought...
TheWitness
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?
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?
- TheWitness
- Developer
- Posts: 17059
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Yes, it lines up with a port inventory feature that I have been convinced is appropriate method to extend the capabilities of the system. However, my creative juices are a bit drained at the moment.
Looking for more inspiration.
TheWitness
Looking for more inspiration.
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?
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?
Re: Mac Address per Port
Another way to do this is to turn on switchport port-security and use the restrict mode , it will generate snmp (IOS deps) and you can capture it in the logs. We do this and make use of the alerts feature in the syslog plugin to send emails whenever port security gets tripped.VonRC wrote:Is it possible to count the number of mac addresses for a given port on a Cisco device and graph it over time? I'm trying to find rouge hubs before I turn on port security and limit to 1 per port.
RC
[/code]
- Attachments
-
- What the email alert looks like
- portsecemail.jpg (29.8 KiB) Viewed 10642 times
Cacti1 OS: CentOS 5.6 | 300+ devices
Cacti2 OS: CentOS 5.6 | 300+ devices
King of the Elves
Local Anarchists Union #427
"Anarchism is founded on the observation that since few men are wise enough to rule themselves, even fewer are wise enough to rule others." -Edward Abbey
Cacti2 OS: CentOS 5.6 | 300+ devices
King of the Elves
Local Anarchists Union #427
"Anarchism is founded on the observation that since few men are wise enough to rule themselves, even fewer are wise enough to rule others." -Edward Abbey
A few obvious things:
1. The CAM table has a list of all the MAC addresses and the port number they were learned on.
2. Port security has a method to track the MAC count to enforce the security policy.
Its easy to get the CAM table via SNMP but does port security have an entry in the tree somewhere or does it just calculate the number from the CAM table?
Help me out here. I
1. The CAM table has a list of all the MAC addresses and the port number they were learned on.
2. Port security has a method to track the MAC count to enforce the security policy.
Its easy to get the CAM table via SNMP but does port security have an entry in the tree somewhere or does it just calculate the number from the CAM table?
Help me out here. I
- TheWitness
- Developer
- Posts: 17059
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
This information is already scanned in the current product.
TheWitness
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?
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?
I can't get my post up on the system... It keeps cutting me off. One more try only I will type it in rather than copy paste...
A few obvious things:
1. The CAM table has a list of all the MAC addresses and the port number they were learned on.
2. Port secruity has a method to track the MAC count to enforce the security policy.
It's easy to get the CAM table fiaq SNMP but doesn port security have an entry in the tree somewhere or does it just calculate the number from the CAM table?
Help me out here. I'm not sure if I'm gong to make this understandable.
We can get the CAM table and put it in a Temp SQL table and run a query something like this on it;
select port_id
count (port_id) AS NumOccurrences
from temptable
group by port_id
Once we have the NumOccurrences we could shove that in to a real table in the SQL server with a time stamp and switch id. From there it would be just a matter of getting the data back out and graphing it.
The problem is I just don't know how to put it all together and make it work.
RC
A few obvious things:
1. The CAM table has a list of all the MAC addresses and the port number they were learned on.
2. Port secruity has a method to track the MAC count to enforce the security policy.
It's easy to get the CAM table fiaq SNMP but doesn port security have an entry in the tree somewhere or does it just calculate the number from the CAM table?
Help me out here. I'm not sure if I'm gong to make this understandable.
We can get the CAM table and put it in a Temp SQL table and run a query something like this on it;
select port_id
count (port_id) AS NumOccurrences
from temptable
group by port_id
Once we have the NumOccurrences we could shove that in to a real table in the SQL server with a time stamp and switch id. From there it would be just a matter of getting the data back out and graphing it.
The problem is I just don't know how to put it all together and make it work.
RC
- TheWitness
- Developer
- Posts: 17059
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Did you not read my prior post?
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?
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?
- TheWitness
- Developer
- Posts: 17059
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
lol. The forum's been having issues lately. Looks like the site was down for a little bit today. Although, truth be known, I think there were some DNS issues on the web this morning.
TheWitness
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?
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?
Who is online
Users browsing this forum: No registered users and 1 guest