Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

What's the use of /etc/sysconfig/network-scripts/ifcfg-eth* files ? In some cases ifconfig lists the interface eth0 but I don't find the corresponding ifcfg-eth0 file whereas in other instances if I create the ifcfg-eth1 file and restart the network like service network restart - this interface is not listed in ifconfig ??

share|improve this question
    
first check in ifconfig -a then it will show all interfaces, then configure accordingly –  Rahul Patil Mar 18 '13 at 8:47
    
What I am trying to understand here is that does ifconfig use these files ? Who else uses these ifcfg-eth* files ? –  Shraddha Mar 18 '13 at 8:53
    
@Shrddha I have updated and explain ans –  Rahul Patil Mar 18 '13 at 8:57
    
for more info run man ifconfig –  Rahul Patil Mar 18 '13 at 8:58
add comment

1 Answer 1

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

to active interface below option is must be in /etc/sysconfig/network-scripts/ifcfg-eth*

ONBOOT=yes

Or you can up interface using

ifup eth1
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.