RHEL 7 How to check ip address for network card


[root@nirvana ~]# ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:56:17:d9 brd ff:ff:ff:ff:ff:ff
inet 192.168.195.135/24 brd 192.168.195.255 scope global dynamic eth0
valid_lft 1176sec preferred_lft 1176sec
inet6 fe80::20c:29ff:fe56:17d9/64 scope link
valid_lft forever preferred_lft forever

Advertisements

RHEL 7 Network Manager how to check the network devices

1.How to check the network card status in RHEL 7 :
[root@nirvana ~]# nmcli dev status
DEVICE  TYPE      STATE      CONNECTION
eth0    ethernet  connected  eno2
lo      loopback  unmanaged  --  

Red Hat Enterprise 7 has concept of network connections associated with network card, network card can have multiple connections but only one connection will be active, see below :

2. Check the network card connections

[root@nirvana ~]#nmcli con show
NAME UUID TYPE DEVICE
eno2 a0d50790-5cc2-443a-bf51-71b3b8994ac6 802-3-ethernet eth0

3. Check only active connections in RHEL 7:

[root@nirvana ~]# nmcli con show –active
NAME UUID TYPE DEVICE
eno2 a0d50790-5cc2-443a-bf51-71b3b8994ac6 802-3-ethernet eth0