Is there any way to tell if the computer you are currently working on is connected to a switch (edit: before it goes to a router and the internet)? Preferable on Linux, but I'm interested in answers for Mac and Windows as well.
Of course tracing the cable doesn't count.