I have two openbsd servers with 6 NIC cards each.
>lspci | grep -i ether
01:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet (rev 20)
01:00.1 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet (rev 20)
02:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet (rev 20)
02:00.1 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet (rev 20)
04:00.0 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01)
04:00.1 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01)
Out of these, one nic on the first one, and two on the second one are unplugged, and the remaining nics except one is connected via a switch. The last nic on server1 is connected to the second server directly via a crossover cable.
How do I identify which interface is the one that is connected directly to the other server, and not via switch? I tried arping and ping and analyzing the tcpdump, hoping the ones connected to switch would show the switch's mac-id, but everything showed the machine's nic mac-id.