An unmanaged switch does not even know what IP is. It will forward IP packets as well as many other protocols without ever understanding what the difference is.
All the switch needs to know in order to decide where a packet goes is the MAC address.
Destination and source MAC are two of the three Ethernet header fields which the higher layer must always provide, the third is EtherType which is a 16 bit number indicating what the higher layer protocol is. Some examples are
0x0800 IPv4
0x0806 ARP
0x86DD IPv6
In general these numbers are opaque to switches and are treated as just data. There are exceptions such as 0x8874 and 0x8899 which some switches (usually managed) will use to detect loops.
Most network analysis tools won't be able to tell the difference between a pair of machines directly connected with an Ethernet cable and a pair of machines connected through 1, 2, or more switches.
By probing a switched network from 4 or more machines with carefully crafted source and destination MAC addresses it is possible to deduce some information about the structure of the network by observing if two network paths are using the same CAM table or not. It may also be able to measure roughly the size of the CAM table and how quickly entries are timed out.
Based on such metrics it may be possible for sophisticated network analysis tools to say how many switches are on your network and maybe even make some guesses about the chips used in those switches.
13Switches are transparent network devices. – Ron Maupin – 2018-02-25T01:22:30.657
8Even smart switches don't necessarily have IP address. I think there used to be switches configurable through RS-232 serial port. – el.pescado – 2018-02-25T10:18:24.180
4@Ron They're transparent to forwarded traffic, but that doesn't prevent them from sending and receiving on their own. – user1686 – 2018-02-25T11:19:50.997
@el.pescado: Most are still configurable through RS-232, but yes, I've also seen some old ones where console was the only option (no IP support). – user1686 – 2018-02-26T05:58:25.290