cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
556
Views
5
Helpful
3
Replies

current number of mac addresses in a catalyst switch

Ditter
Level 4
Level 4

Hi to all,

i am trying to recall a show command that shows current count of mac addresses in a catalyst switch (IOS). I am not referring to command "show mac address-table) but a command that shows how many MAC addresses are active on FastEthernet 0/3 , FastEthernet 0/4 e.t.c.

 

I issued this command in the past but now i forgot it.

 

Thank you,

 

Ditter

3 Replies 3

Joel
Level 1
Level 1

You have the following to find out per interface

show mac address-table interface fa0/1

 

Or you could use pipe to take the output from show mac address-table to the input of include and limit to interface

sh mac address-table | include Fa0/1

 

Finally, you have count for each VLAN

show mac address-table count

 

Joel

andresfr
Cisco Employee
Cisco Employee

Hello, are you referring to the following command?

 

show interfaces GigabitEthernet X/Y/Z mac-accounting

 

It requires the ip accounting mac-address to be configured at interface configuration level.

 

And the output is like this:

 

router#show interfaces GigabitEthernet X/Y/Z mac-accounting
GigabitEthernetX/Y/Z
  Input(494 free) 
    0000.0c5d.92f9(58 ):  1 packets, 106 bytes, last: 4038ms ago
    0004.c059.c060(61 ):  0 packets, 0 bytes, last: 2493135ms ago
    00b0.64bc.4860(64 ):  1 packets, 106 bytes, last: 20165ms ago
    0090.f2c9.cc00(103):  12 packets, 720 bytes, last: 3117ms ago 
                  Total:  14 packets, 932 bytes 
  Output (511 free)
    0090.f2c9.cc00(103):  8 packets, 504 bytes, last: 4311ms ago 
                  Total:  8 packets, 504 bytes

 

Regards,

Thank you all for your replies,

 

i was looking for a single command  to provide all this info, for example in a catalyst 4500 with 192 ports it would be easier with one command to have the concurrent MAC addresses per port.

 

I finally recalled the way i did it in the past, but it is not so straight forward. First step is to activate port-security on per interface basis and then issue the command show port-security.

 

sw1#sh port-security
Secure Port MaxSecureAddr CurrentAddr SecurityViolation Security Action
(Count) (Count) (Count)
---------------------------------------------------------------------------
Gi2/21 10 1 0 Shutdown
Gi2/22 10 0 0 Shutdown
Gi2/23 10 0 0 Shutdown
Gi2/24 10 1 0 Shutdown
Gi2/25 10 1 0 Shutdown

 

Thank you all.

Review Cisco Networking for a $25 gift card