RHEL/CentOS 7 networking deprecated ifconfig

ifconfig networking command has been deprecated in RHEL 7.

Redhat suggest to use "ip" command instead of now legacy ifconfig or use a text user interface "nmtui" to control network manager.

After you have set ip/gateway/dns or dhcp setting in nmtui, you can restart the network as below:

# systemctl restart NetworkManager.service

# ip addr
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 52:54:00:16:ae:0e brd ff:ff:ff:ff:ff:ff
    inet 10.8.8.238/24 brd 10.8.8.255 scope global dynamic eth0
       valid_lft 3576sec preferred_lft 3576sec
    inet6 fe80::5054:ff:fe16:ae0e/64 scope link 
       valid_lft forever preferred_lft forever






Comments

Popular posts from this blog

Linux and AIX user non expiry and force password change at first login

Rebuild your new Yum repository after changing the packages

Running Docker Wildfly/JBoss Application Server in Debug mode via Eclipse