Does `ip link` em1 = p4p1?
I'm trying to remotely manage a Dell server with Ubuntu 14.04. The server has has a 540-BBW Broadcom 5720 QP 1Gb Network Daughter Card. Broadcom docs say it has two PCIe slots with two ethernet ports a piece.
I read through these biosdevname docs and shows p<slot>p<ethernet port>. ip link shows p4p1, p4p2, p6p1, & p6p2. That makes sense. The card must be using slots 4 & 6.
What doesn't make sense to me is ip link also shows em1, em2, em3, em4. These are described as embedded network interfaces. Are these not aliases for the above PCIe ethernet ports? If they are aliases, how do I know which one corresponds to the other? In-other-words, does em1 correspond to the same hardware port as p4p1?
cameron@echo:~$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: em1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000 link/ether 44:a8:42:2b:4c:39 brd ff:ff:ff:ff:ff:ff
3: em2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000 link/ether 44:a8:42:2b:4c:3a brd ff:ff:ff:ff:ff:ff
4: em3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000 link/ether 44:a8:42:2b:4c:3b brd ff:ff:ff:ff:ff:ff
5: em4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000 link/ether 44:a8:42:2b:4c:3c brd ff:ff:ff:ff:ff:ff
6: p4p1: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000 link/ether a0:36:9f:12:11:e8 brd ff:ff:ff:ff:ff:ff
7: p4p2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000 link/ether a0:36:9f:12:11:ea brd ff:ff:ff:ff:ff:ff
8: p6p1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000 link/ether 00:07:43:33:51:00 brd ff:ff:ff:ff:ff:ff
9: p6p2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000 link/ether 00:07:43:33:51:08 brd ff:ff:ff:ff:ff:ff
10: lxcbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/ether 1e:c4:f7:44:50:cd brd ff:ff:ff:ff:ff:ff
11: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default link/ether 02:42:f4:3d:2c:be brd ff:ff:ff:ff:ff:ffUpdate 1. Here is the PCI info if this helps. May be I was wrong about the hardware. It would be great to know which link above corresponds to which of these PCI devices.
cameron@echo:~$ lspci -nn | grep Ethernet
01:00.0 Ethernet controller [0200]: Broadcom Corporation NetXtreme BCM5720 Gigabit Ethernet PCIe [14e4:165f]
01:00.1 Ethernet controller [0200]: Broadcom Corporation NetXtreme BCM5720 Gigabit Ethernet PCIe [14e4:165f]
02:00.0 Ethernet controller [0200]: Broadcom Corporation NetXtreme BCM5720 Gigabit Ethernet PCIe [14e4:165f]
02:00.1 Ethernet controller [0200]: Broadcom Corporation NetXtreme BCM5720 Gigabit Ethernet PCIe [14e4:165f]
04:00.0 Ethernet controller [0200]: Chelsio Communications Inc T520-CR Unified Wire Ethernet Controller [1425:5001]
04:00.1 Ethernet controller [0200]: Chelsio Communications Inc T520-CR Unified Wire Ethernet Controller [1425:5001]
04:00.2 Ethernet controller [0200]: Chelsio Communications Inc T520-CR Unified Wire Ethernet Controller [1425:5001]
04:00.3 Ethernet controller [0200]: Chelsio Communications Inc T520-CR Unified Wire Ethernet Controller [1425:5001]
04:00.4 Ethernet controller [0200]: Chelsio Communications Inc T520-CR Unified Wire Ethernet Controller [1425:5401]
82:00.0 Ethernet controller [0200]: Intel Corporation Ethernet Controller 10-Gigabit X540-AT2 [8086:1528] (rev 01)
82:00.1 Ethernet controller [0200]: Intel Corporation Ethernet Controller 10-Gigabit X540-AT2 [8086:1528] (rev 01) 1 Answer
The answer is no, there are three separate network interfaces. From these docs, I learned that sudo lshw -class network can be used to see which logical names are associated with each pci address.
*-network:0 description: Ethernet interface product: NetXtreme BCM5720 Gigabit Ethernet PCIe vendor: Broadcom Corporation physical id: 0 bus info: pci@0000:01:00.0 logical name: em1 version: 00 serial: 44:a8:42:2b:4c:39 size: 1Gbit/s capacity: 1Gbit/s width: 64 bits clock: 33MHz capabilities: pm vpd msi msix pciexpress bus_master cap_list rom ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation configuration: autonegotiation=on broadcast=yes driver=tg3 driverversion=3.137 duplex=full firmware=FFV7.10.61 bc 5720-v1.36 ip=10.1.14.22 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s resources: irq:89 memory:93330000-9333ffff memory:93340000-9334ffff memory:93350000-9335ffff memory:93700000-9373ffff *-network:0 DISABLED description: Ethernet interface product: Ethernet Controller 10-Gigabit X540-AT2 vendor: Intel Corporation physical id: 0 bus info: pci@0000:82:00.0 logical name: p4p1 version: 01 serial: a0:36:9f:12:11:e8 capacity: 1Gbit/s width: 64 bits clock: 33MHz capabilities: pm msi msix pciexpress bus_master cap_list rom ethernet physical tp 1000bt-fd autonegotiation configuration: autonegotiation=on broadcast=yes driver=ixgbe driverversion=4.2.1-k firmware=0x80000389 latency=0 link=no multicast=yes port=twisted pair resources: irq:90 memory:c8200000-c83fffff memory:c8404000-c8407fff memory:c8600000-c867ffff memory:c8700000-c87fffff memory:c8800000-c88fffff