I notices in the Network overview of Windows 7 that my switches are found on the path to the gateway, which baffled me completely. The last time I checked they just took the ethernet packages and transported them to the "right" location.
How does this switch detection work? Do switches alter the packages? Do they react on ICMP messages?
I believe it uses the Link Layer Topology Discovery service built in to Windows 7. I believe you need another Windows Vista/7 machine with LLTD enabled on your network for it to work completely. It seems like you already do and that is how it finds your switch.
This Word Document goes into a lot of technical detail on how the discovery process works.
Big brands in networking won't support LLTD on their devices. Windows on the other hand doesn't support LLDP so we seem to have a gap.