How to determine the installed network interfaces on Linux and Unix platforms.

book

Article ID: 100024584

calendar_today

Updated On:

Resolution

Execute the relevant command for the system platform as indicated below to display installed network interfaces.

AIX platform

Command:  lscfg -v -l en*
Example:
 

# lscfg -v -l en*
  ent0             U789F.001.AAA5940-P1-T1  2-Port 10/100/1000 Base-TX PCI-X Adapter (14108902)

        2-Port 10/100/1000 Base-TX PCI-X Adapter:
        Network Address.............0011257E6C22
        ROM Level.(alterable).......DV0210
        Hardware Location Code......U789F.001.AAA5940-P1-T1

  ent1             U789F.001.AAA5940-P1-T2  2-Port 10/100/1000 Base-TX PCI-X Adapter (14108902)

      2-Port 10/100/1000 Base-TX PCI-X Adapter:
        Network Address.............0011257E6C23
        ROM Level.(alterable).......DV0210
        Hardware Location Code......U789F.001.AAA5940-P1-T2

 

HP-UX platform

Command:  lanscan | egrep -v 'LinkAgg|Hdw|Path' | awk '{ print $5 }'
Example:

# lanscan | egrep -v 'LinkAgg|Hdw|Path' | awk '{ print $5 }'
lan0
lan2
lan3
lan4
lan5
lan1

 

Linux Platforms
RedHat Enterprise Linux (RHEL4 / RHEL5)

Command:  cat /etc/sysconfig/networking/devices/ifcfg-* | grep -v 'DEVICE=lo' | grep DEVICE
Example:
 

# cat /etc/sysconfig/networking/devices/ifcfg-* | grep -v 'DEVICE=lo' | grep DEVICE
DEVICE=eth0
DEVICE=eth1

 

SuSe Linux (SLES9 / SLES10 / SLES11)

Command:  cat boot.msg | grep eth | egrep 'done|unused' | awk '{ print $2 }'
Example:
 

cat boot.msg | grep eth | egrep 'done|unused' | awk '{ print $2 }'
eth0
eth1
eth2
eth3
 

 

Solaris platform
Solaris 9

Command: kstat -p |grep link_up | awk -F: '{ print $3 }'
Example:

 

# kstat -p |grep link_up | awk -F: '{ print $3 }'
ce0
ce1

 

Solaris 10

Command: dladm show-dev
Example:
 

# dladm show-dev
nxge0 link: unknown speed: 100 Mbps duplex: full
nxge1 link: unknown speed: 100 Mbps duplex: full
nxge2 link: unknown speed: 100 Mbps duplex: half
nxge3 link: unknown speed: 0 Mbps duplex: unknown

 

Issue/Introduction

The "ifconfig" command does not show all interfaces that are installed in the system, only interfaces that are in a configured state. It is necessary to determine what interfaces are physically installed on a system so the interfaces may be configured.