If you need to know identity information about the switches in the InfiniBand fabric, you can use the ibswitches command. This command displays the GUID, name, LID, and LMC for each switch. The output of the command is a mapping of GUID to LID for switches in the fabric.
Note - The output for your InfiniBand fabric will differ greatly from that in the example.
# ibswitches Switch : 0x0021283a8389a0a0 ports 36 "Sun DCS 36 QDR switch localhost" enhanced port 0 lid 15 lmc 0 #
Switch Reference, ibhosts command
Switch Reference, ibswitches command