This is a useful trick for VLAN configuration, or just figuring out which switch port a server is on.
Note: This requires that your server not be in production, or that your server has been tested and confirmed to have a correct redundant network connection.
(config) # debug event
(config) # debug destination session
Then run ‘ifconfig <eth> down’ on the server, or unplug the network cable. Watch the session on the switch and you will see which port has its link status change.
This isn’t a replacement for proper labels, since it involves downing an active network interface, which could cause connectivity issues in a live environment. A better alternative would be to use LLDP to identify which port a server is connected to, but as the title says, this is the lazy way.