I will assume the switches are managed switches running LLDP. You should be able to install OpenLLDP to your laptop to query the switch you're attached to. (A well-managed network will block LLDP transmission to edge ports, but I trust you're working with the network administrator and can get around that problem.)
I'm on a Mac so I downloaded and built the software from source. Now I can run sudo /usr/local/sbin/lldpd -i en0
to collect information from my Ethernet port. After a few seconds /usr/local/bin/lldpneighbors
will show me what I'm connected to. Packets are only sent every 30 seconds so sometimes there's a wait. Here's sample output:
Interface 'en0' has 1 LLDP Neighbors: Neighbor 1: Chassis ID: MAC Address - 08 2e 5f 12 34 56 Port ID: Locally Assigned - 3 Time To Live: 120 seconds Port Description: 3 System Name: Victoria_Switch System Description: ProCurve J9137A Switch 2520-8-PoE, revision S.14.30, ROM S.14.03 System Capabiltiies: Bridge/Switch (enabled) Management Address: IPv4 - 192.168.000.000 (ifIndex - 0) (OID: Standard LLDP MIB) End Of LLDPDU: