CentOS/RHEL: How To Check The Different Properties Of Network Interface

I would like to check the name of network interface on my Linux operating system. How do I get the detailed information of NIC under CentOS 7/6.5 or RHEL 7/6.5 linux? How To get the name of network interface on your linux system? How to get the MAC address of network interface? How to check the network interface manufacture information? How to get the speed of network interface? this post will guide you how to get different properties of network interface on your centos system.

CentOS/RHEL Check The Name Of Network Interface


To get all of network interface name on your linux system, you need to run the following comand, type:

ifconfig | cut -c1-7| sort -u| awk -F : '{print $1}'

outputs:

[root@devops ~]# ifconfig | cut -c1-7| sort -u| awk -F : '{print $1}'

  enp0s3

lo

CentOS/RHEL Check Network interface speed


Issue the following command to get the speed of network interface on your linux systmem,type:

ethtool enp0s3 | grep Speed

outputs:

[root@devops ~]# ethtool enp0s3 | grep Speed

Speed: 1000Mb/s

CentOS/RHEL Get MAC Address OF A NetWork interface Card


To get the MAC address of a given network interface card, issue the following command:

ethtool -P <network interface name>

ethtool -P enp0s3

outputs:

[root@devops ~]# ethtool -P enp0s3

Permanent address: 08:00:27:ea:92:ea

CentOS/RHEL Get IP Address OF One Network interface


To Get the ip address of one network interface, just issue one of below commands:

ifconfig <network interface name>

ip link show <network interface name>

ifconfig enp0s3

OR

ip addr show  enp0s3 | grep 'inet '

outputs:

[root@devops ~]# ip addr show  enp0s3 | grep 'inet '

    inet 10.0.2.15/24 brd 10.0.2.255 scope global dynamic enp0s3

[root@devops ~]# ifconfig enp0s3

enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 10.0.2.15  netmask 255.255.255.0  broadcast 10.0.2.255

        inet6 fe80::a00:27ff:feea:92ea  prefixlen 64  scopeid 0x20<link>

        ether 08:00:27:ea:92:ea  txqueuelen 1000  (Ethernet)

        RX packets 44  bytes 5064 (4.9 KiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 105  bytes 10955 (10.6 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

CentOs/RHEL Check Detailed Information Of Network interface Driver


To get the driver information for network interface, you still need to use ethtool utility, issue the following command:

ethtool -i <network interface name>

ethtool -i enp0s3

outputs:

[root@devops ~]# ethtool -i enp0s3

driver: e1000

version: 7.3.21-k8-NAPI

firmware-version: 

bus-info: 0000:00:03.0

supports-statistics: yes

supports-test: yes

supports-eeprom-access: yes

supports-register-dump: yes

supports-priv-flags: no

CentOS/RHEL Get Manufacture information Of Network Interface


To get the manufacture information for a given network interface card, issue the following command:

lspci -v | grep Ether

outputs:

[root@devops ~]# lspci  -v | grep Ether

00:03.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet Controller (rev 02)

 

You might also like:

Sidebar



back to top