How do you identify the MAC address on a system?
There are multiple ways to identify the MAC address on a system. First and foremost, it depends on the system, primarily the system's OS (Operating System). In my case, I am running Windows 10 Pro (version 20H2) on my system. The most common and practical approach to identifying the MAC address on my system or most Windows 10 Home/Pro operating systems would be within the CMD (Command Prompt). Once the CMD is open, a common command to show your IP (Internet Protocol) configuration is ipconfig /all.
How does a switch identify the MAC address?
My favorite way to view a MAC address of a device connected to my network is by logging into my router and viewing the connected clients/devices. Some routers provide detailed information about the devices connected, such as the OS of the device, the MAC address, the device's uptime, traffic identification, and much more.
According to oreilly.com, "To do this, the switch learns which devices, called stations in the standard, are on which segments of the network by looking at the source addresses in all of the frames it receives. When an Ethernet device sends a frame, it puts two addresses in the frame. These two addresses are the destination address of the device it is sending the frame to, and the source address, which is the address of the device sending the frame.".
Methods used by hackers to circumvent this restriction.
If you recognize an unauthorized device connected to your network, you can blacklist the MAC address associated with that device. Or have a whitelisted only network for furthermore security. However, hackers/individuals can spoof (imitate) certain MAC addresses to obtain access to networks set up this way or bypass network restrictions.