Which command shows the mac address of stations connected to switchports
You have the answer of Show ARP which maps ip addresses to mac addresses
Surely the answer is sh mac-address?
Arp is Address Resolution Protocol and is what the foundation of the internet.
Firstly, their is not Show Mac-Address command, their is a Show mac-address-table however.
Second, often in these tests they have the multiple correct answers and you must choose the best answer. Both of these commands show similar information but show arp has better information. Show arp shows you the MAC, IP, computer name, and interface. Show Mac-Address-Table is pretty worthless if you don't know what interface the computer is plugged into and the computer name is much easier to get. (Yes, you are full of fail if you don't know what interface it is plugged into.) Only problem I see with Show Arp is that it only supports TCP/IP.
are they asking for ethernet interface or vlan?
LabSwx2924#sh arp
Protocol Address Age (min) Hardware Addr Type Interface
Internet 192.168.1.100 - 0004.ddf8.2d00 ARPA VLAN1
Internet 192.168.1.1 2 0018.0141.69af ARPA VLAN1
Internet 192.168.1.6 0 0013.72c8.f86b ARPA VLAN1
LabSwx2924#sh mac-
LabSwx2924#sh mac-address-table
Dynamic Address Count: 6
Secure Address Count: 0
Static Address (User-defined) Count: 0
System Self Address Count: 47
Total MAC addresses: 53
Maximum MAC addresses: 2048
Non-static Address Table:
Destination Address Address Type VLAN Destination Port
------------------- ------------ ---- --------------------
0013.72c8.f86b Dynamic 1 FastEthernet0/22
0013.c359.82d0 Dynamic 1 FastEthernet0/21
0018.0141.69af Dynamic 1 FastEthernet0/2
0021.1e08.a178 Dynamic 1 FastEthernet0/2
0021.1ea3.3f0e Dynamic 1 FastEthernet0/2
0021.1eac.640e Dynamic 1 FastEthernet0/2