cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
982
Views
0
Helpful
1
Replies

EEM counting mac-address for certain vlan

Jarp
Level 1
Level 1

Hello,

I'm trying to make an EEM that would count how many macs are under one vlan.

Something like

Event none

Action 001 cli command "show mac address-table vlan XXX | include XXX"

Action 002 regexp (This is unclear to me but it should take only the amount as number and put it into a variable lets say MacCount)

Action 003 if $MacCount ge (Some number) then do things ---> 

 

If someone can help me out with this i would really appreciate it. Thanks in advance!

1 Reply 1

balaji.bandi
Hall of Fame
Hall of Fame

You can do with regex like below output switch command : (not sure what model of the switch you trying) - but most switch should support.

 

#show mac-address-table count vlan 700
MAC Entries for Vlan 700 :
Dynamic Address Count: 2
Static Address (User-defined) Count: 3
Total MAC Addresses In Use: 5
Total MAC Addresses Available: 65536

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Review Cisco Networking for a $25 gift card