11-26-2008 09:12 PM - edited 03-06-2019 02:42 AM
I have 4 switches connected like: Router->A->B->C->D. I need to get Mac-Address of machines connected to only switch-B ports.
When I do
Switch-B#show Mac-address
It will showing all the mac-address of other switches connected machine IP address.
Thanks in Advance
11-26-2008 10:03 PM
Use this command on switch B
show mac-address-table interface fastEthernet
OR just
show mac-address-table
and make note of ports that are connected to another switch
11-26-2008 11:35 PM
in addition to the show mac-address-table interface, in switch B do a show cdp neighbor to know the interface connections of your peer devices (if it's cisco).
11-27-2008 07:15 AM
Hi Ranga,
Do "show arp" it will show you tha Mac and IP address
HTH
DAK
11-27-2008 01:05 PM
DAK
Assuming that these are layer 2 switches, then show arp will only show addresses (IP and MAC) of devices that have been accessed by the management interface of that switch). This is likely to be much less than all the switches connected to B. And it would show any address on A or C or D that had been accessed by the management interface.
Ranga
If these switches are daisy chained as shown in your post (through A to get to B, through A and B to get to C, through A and B and C to get to D) then it is in the nature of layer 2 switching that the mac address table on B will include all devices connected to any of the switches. The only thing you can do is show mac-address-table and exclude any address that is associated with the interface to A or to C. I do not know an automated way to do this.
HTH
Rick
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: