본문 바로가기
IT/LINUX

[LINUX] 리눅스에서 NIC Slot 위치 찾기

by 양눈 2020. 12. 19.

리눅스에서 사용하고 있는 Device(ethX, ensX)의 슬롯 위치를 찾기위해 lshw 명령어를 사용하면 찾기가 쉬워진다. 

lshw 명령은 설치 기본 설치이미지의 ISO파일에 포함이 되어있다 먼저 패키지를 설치하고 명령어로 확인해보자 

 

NIC Device name 별 bus 주소확인

lshw명령으로 Device 별 버스정보를 먼저 확인 한다. 

#  lshw -c network -businfo
Bus info          Device      Class          Description
========================================================
pci@0000:03:00.0 ens0      network        I350 Gigabit Network Connection
pci@0000:03:00.1 ens1      network        I350 Gigabit Network Connection
pci@0000:03:00.2 ens2      network        I350 Gigabit Network Connection
pci@0000:03:00.3 ens3      network        I350 Gigabit Network Connection
pci@0000:05:00.0  eno1        network        OneConnect NIC (Skyhawk)
pci@0000:05:00.1  eno2        network        OneConnect NIC (Skyhawk)
pci@0000:05:00.2  eno3        network        OneConnect NIC (Skyhawk)
pci@0000:05:00.3  eno4        network        OneConnect NIC (Skyhawk)
                  bond0       network        Ethernet interface
                  virbr0-nic  network        Ethernet interface
                  virbr0      network        Ethernet interface

 

슬롯위치 확인

# dmidecode -t slot
# dmidecode 3.0
Getting SMBIOS data from sysfs.
SMBIOS 3.0 present.

Handle 0x001A, DMI type 9, 17 bytes
System Slot Information
        Designation: SLOT 01
        Type: x16 PCI Express 3 x16
        Current Usage: In Use
        Length: Other
        ID: 1
        Characteristics:
                3.3 V is provided
                PME signal is supported
        Bus Address: 0000:01:00.0

Handle 0x001B, DMI type 9, 17 bytes
System Slot Information
        Designation: SLOT 02
        Type: x16 PCI Express 3 x16
        Current Usage: In Use
        Length: Other
        ID: 2
        Characteristics:
                3.3 V is provided
                PME signal is supported
        Bus Address: 0000:04:00.0

Handle 0x001D, DMI type 9, 17 bytes
System Slot Information
        Designation: SLOT 04
        Type: x8 PCI Express 3 x8
        Current Usage: In Use
        Length: Other
        ID: 4
        Characteristics:
                3.3 V is provided
                PME signal is supported
        Bus Address: 0000:02:00.0

Handle 0x001E, DMI type 9, 17 bytes
System Slot Information
        Designation: SLOT 05   --> 슬롯위치 
        Type: x8 PCI Express 3 x8
        Current Usage: In Use
        Length: Other
        ID: 5
        Characteristics:
                3.3 V is provided
                PME signal is supported
        Bus Address: 0000:03:00.0 --> 버스주소

Handle 0x0020, DMI type 9, 17 bytes
System Slot Information
        Designation: SLOT 07
        Type: x16 PCI Express 3 x16
        Current Usage: In Use
        Length: Other
        ID: 7
        Characteristics:
                3.3 V is provided
                PME signal is supported
        Bus Address: 0000:01:00.0

Handle 0x0021, DMI type 9, 17 bytes
System Slot Information
        Designation: SLOT 08
        Type: x16 PCI Express 3 x16
        Current Usage: In Use
        Length: Other
        ID: 8
        Characteristics:
                3.3 V is provided
                PME signal is supported
        Bus Address: 0000:04:00.0

Handle 0x0022, DMI type 9, 17 bytes
System Slot Information
        Designation: SLOT 09
        Type: x16 PCI Express 3 x16
        Current Usage: In Use
        Length: Other
        ID: 9
        Characteristics:
                3.3 V is provided
                PME signal is supported
        Bus Address: 0000:02:00.0


위와 같이 dmidecode 명령으로 버스주소에 해당되는 위치의 슬롯 번호를 확인하면 Device에 대한 슬롯위치를 확인할 수 있다. 

 

 

댓글