cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
780
Views
1
Helpful
8
Replies

mac address for each access port in catalyst switch

13jobsp90
Level 1
Level 1

Is there any command to get mac address for all access ports in a particular  Cisco Catalyst 2960 switch. sh mac address table command shows the learned mac id of all ports of the neighboring  switch also. How do i get the mac address for only the connected access ports of that particular switch only not the neighboring  switch?

8 Replies 8

Leo Laohoo
Hall of Fame
Hall of Fame
sh mac address | include F

13jobsp90
Level 1
Level 1

Not working in Cisco 2960 model catalyst switch.What is the exact command?

show ip arp


@13jobsp90 wrote:

Not working in Cisco 2960 model catalyst switch.What is the exact command?


What, exactly, is the model of the 2960 switches? 

Try this: 

sh mac address-table | exclude G|CPU|Vl

what is G, cpu, V1?

Joseph W. Doherty
Hall of Fame
Hall of Fame

An L2 port does not have a MAC.

Rereading your OP, I believe I misunderstood your question.  I thought you were asking for the MACs of the access ports, themselves.

Are you trying to just obtain the MACs of hosts only directly connected to access ports of a switch?  If so, there's no single command that will provide just those MACs.  If fact, L2 being what L2 is, even using multiple commands, I don't believe there's a guaranteed method to determine such hosts.  That's not to say, using multiple commands, you might be able to make some probability of whether a MAC might be a directly connected host, but again, if many cases, don't believe it can be guaranteed.

If the switch and host support CDP and/or LLDP, "seeing" a CDP/LLDP relationship, would probably be the best indicator, but even that could be incorrect.

 

if I give sh mac address table interface, it will show the mac address of that particular port.