Use of /etc/sysconfig/network-scripts/ifcfg-eth* files
In RHEL/CentOS based system,
all Interface/Ipaddress settings saved in /etc/sysconfig/network-scripts/ifcfg-eth*
the same you can find /etc/network/interfaces
in debain/ubunt based OS
ifconfig
If no arguments are given, ifconfig displays the status of the currently active interfaces, you can list all interface by using /sbin/ifconfig -a
command and configure it.
when you restart service then it will reload settings from /etc/sysconfig/network-scripts/ifcfg-eth*
and shows in ifconfig
if you are able to configure it , then just use ncurses tools using below command
neat-tui
Note:- if neat-tui
not work then you need to install system-config-network-tui
package.
or from GUI login system-config-network
Make sure you add the following option in /etc/sysconfig/network-scripts/ifcfg-eth*
ONBOOT=yes
If you don't, the interface will not activate.
You can also up the interface using
ifup eth1
Related videos on Youtube
Shraddha
Updated on September 18, 2022Comments
-
Shraddha almost 2 years
What's the use of
/etc/sysconfig/network-scripts/ifcfg-eth*
files ? In some cases ifconfig lists the interfaceeth0
but I don't find the correspondingifcfg-eth0
file whereas in other instances if I create theifcfg-eth1
file and restart the network likeservice network restart
- this interface is not listed inifconfig
??-
Rahul Patil over 11 yearsfirst check in
ifconfig -a
then it will show all interfaces, then configure accordingly -
Shraddha over 11 yearsWhat I am trying to understand here is that does ifconfig use these files ? Who else uses these ifcfg-eth* files ?
-
Rahul Patil over 11 years@Shrddha I have updated and explain ans
-
Rahul Patil over 11 yearsfor more info run
man ifconfig
-
-
fbicknel about 4 yearsAfter you've edited the file, then
# systemctl restart NetworkManger
to make it so. (RHEL/CentOS) -
fbicknel about 4 years
neat-tui
is deprecated. Usenmtui
, which is in theNetworkManager-tui
package.