Identify physical port given a network interface name on Dell PowerEdge servers?

Freddie Cash fjwcash at gmail.com
Wed Mar 30 01:58:07 UTC 2016


4:0:0 vs 4:0:1

Looks to me like ix0 would be port 0, and ix1 would be port 1.
On Mar 29, 2016 5:27 PM, "Pallav Bose via freebsd-net" <
freebsd-net at freebsd.org> wrote:

> Thank you, John. Yes, dmidecode works perfectly for onboard NICs, but I
> wasn't able to obtain precise information about a NIC connected via a PCI
> slot. All I can see is that the PCI bus is in use and its address.
> In the output below, there is an Intel 10G NIC in PCI slot 6.
>
> # dmidecode -t slot
> # dmidecode 2.10
> SMBIOS 2.8 present.
>
> Handle 0x0900, DMI type 9, 17 bytes
> System Slot Information
>         Designation: PCIe Slot 1
>         Type: x8 <OUT OF SPEC>
>         Current Usage: Available
>         Length: Long
>         Characteristics:
>                 3.3 V is provided
>                 PME signal is supported
>
> Handle 0x0901, DMI type 9, 17 bytes
> System Slot Information
>         Designation: PCIe Slot 2
>         Type: x8 <OUT OF SPEC>
>         Current Usage: Available
>         Length: Long
>         Characteristics:
>                 3.3 V is provided
>                 PME signal is supported
>
> Handle 0x0902, DMI type 9, 17 bytes
> System Slot Information
>         Designation: PCIe Slot 3
>         Type: x8 <OUT OF SPEC>
>         Current Usage: Available
>         Length: Long
>         Characteristics:
>                 3.3 V is provided
>                 PME signal is supported
>
> Handle 0x0903, DMI type 9, 17 bytes
> System Slot Information
>         Designation: PCIe Slot 4
>         Type: x8 <OUT OF SPEC>
>         Current Usage: In Use
>         Length: Long
>         Characteristics:
>                 3.3 V is provided
>                 PME signal is supported
>         Bus Address: 0000:82:00.0
>
> Handle 0x0904, DMI type 9, 17 bytes
> System Slot Information
>         Designation: PCIe Slot 5
>         Type: x8 <OUT OF SPEC>
>         Current Usage: Available
>         Length: Long
>         Characteristics:
>                 3.3 V is provided
>                 PME signal is supported
>
> Handle 0x0905, DMI type 9, 17 bytes
> System Slot Information
>         Designation: PCIe Slot 6
>         Type: x8 <OUT OF SPEC>
>         Current Usage: In Use
>         Length: Long
>         Characteristics:
>                 3.3 V is provided
>                 PME signal is supported
>         Bus Address: 0000:04:00.0
>
> # pciconf -bclv | grep -E "ix|bge"
> ix0 at pci0:4:0:0: class=0x020000 card=0x50038086 chip=0x15288086 rev=0x01
> hdr=0x00
> ix1 at pci0:4:0:1: class=0x020000 card=0x50038086 chip=0x15288086 rev=0x01
> hdr=0x00
> bge0 at pci0:2:0:0:        class=0x020000 card=0x1f5b1028 chip=0x165f14e4
> rev=0x00 hdr=0x00
> bge1 at pci0:2:0:1:        class=0x020000 card=0x1f5b1028 chip=0x165f14e4
> rev=0x00 hdr=0x00
> bge2 at pci0:1:0:0:        class=0x020000 card=0x1f5b1028 chip=0x165f14e4
> rev=0x00 hdr=0x00
> bge3 at pci0:1:0:1:        class=0x020000 card=0x1f5b1028 chip=0x165f14e4
> rev=0x00 hdr=0x00
>
>  I can't tell whether ix0 at pci0:4:0:0 is the first port on the Intel card
> or the second.
>
> Regards,Pallav
>
>     On Tuesday, March 29, 2016 3:56 PM, John Nielsen <lists at jnielsen.net>
> wrote:
>
>
>
> > On Mar 29, 2016, at 4:44 PM, John Nielsen <lists at jnielsen.net> wrote:
> >
> >
> >> On Mar 29, 2016, at 3:42 PM, Pallav Bose via freebsd-net <
> freebsd-net at freebsd.org> wrote:
> >>
> >> Is there a way for me to identify which physical port corresponds to a
> given interface name? For example, the input to my script/program is the
> network interface name, like bge0/ix0, and the output is the physical port
> which maps to this interface, like, LOM1/LOM2 or NIC1 port 1 (in case a NIC
> card is attached via the PCI bus). This program/script will run on a Dell
> PowerEdge server.
> >>
> >> LOM stands for LAN On Motherboard.
> >
> > It sounds like you're looking for something like Dell's biosdevname for
> Linux. I don't think such a thing exists on FreeBSD, but if you can figure
> out how to get it the same data should be available from the BIOS. I would
> start by scrutinizing the output of "dmidecode"; if it's in there then you
> can just parse it out for your script. If not, you can always dive through
> the source of biosdevname:
> >
> > http://linux.dell.com/git/biosdevname.git/
>
> See also:
>
> https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Networking_Guide/sec-Consistent_Network_Device_Naming_Using_biosdevname.html#sec-Consistent_Network_Device_Naming-System_Requirements
>
> I don't have access to a Dell box running FreeBSD but on a PowerEdge
> server running CentOS 6 this command looks like it returned all the raw
> info you would need to implement your own "biosdevname-lite". Specifically
> you could map the NIC number from the "Reference Designation" to its PCI
> bus address and then call it whatever you wanted:
>
> # dmidecode -t 41
> # dmidecode 2.12
> SMBIOS 2.6 present.
>
> Handle 0x2900, DMI type 41, 11 bytes
> Onboard Device
>     Reference Designation: Embedded NIC 1
>     Type: Ethernet
>     Status: Enabled
>     Type Instance: 1
>     Bus Address: 0000:01:00.0
>
> Handle 0x2901, DMI type 41, 11 bytes
> Onboard Device
>     Reference Designation: Embedded NIC 2
>     Type: Ethernet
>     Status: Enabled
>     Type Instance: 2
>     Bus Address: 0000:01:00.1
> [...]
>
>
>
> _______________________________________________
> freebsd-net at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"


More information about the freebsd-net mailing list