Re: Who edits my ifcfg-eth0 ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tim wrote:
Timothy Murphy:
Some program re-writes /etc/sysconfig/network-scripts/ifcfg-eth?
when I re-boot.

Matthew Saltzman:
I don't think the DHCP client changes anything in /etc/sysconfig/ifcfg-eth0. It may set the contents of /etc/resolv.conf.

I just had another look at this.  There is no /etc/sysconfig/ifcfg-eth0
file, do you have something extra?

# locate ifcfg-eth0
/etc/sysconfig/network-scripts/ifcfg-eth0
/etc/sysconfig/networking/devices/ifcfg-eth0
/etc/sysconfig/networking/profiles/default/ifcfg-eth0

They're all the same:

# Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+
DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=00:02:44:70:81:A8
ONBOOT=yes
DHCP_HOSTNAME=serge
TYPE=Ethernet
USERCTL=no
IPV6INIT=no
PEERDNS=yes

This box does use DHCP to set the IP address, and all those files have a
file date from last December.  I can never remember how to tell, but I
seem to recall reading that they're all the same file, two of them are
links to the other.

Thinking more about the original poster's question, I'm wondering if
they have kudzu running each bootup, and whether it does it.


I'm running several boxes with older Fedora versions (FC4 FC5)
without network manager.  Doing research in network performance
generally requires more control over what's happening so I use
the old system-config-network (and system-config-network-cmd)
system to control the interfaces on the machine.

FC4 and FC5 also use the old "init scripts" when booting.  There's
talk of replacing those, so this information may go out of date.

However, here's how the systems work that I administer.

When ooting, the init scripts look in /etc/sysconfig/network-scripts/
for all files named ifcfg-xxxx, where xxxx is some interface name.
Each of these holds the configuration parameters for one interface.
These parameters (actually bash environment variables, if you are
familiar with those) are used to initialize each of the named
interfaces.

The /etc/sysconfig/networking/profiles contains a directory for
each networking "profile".  Basically you canuse system-config-network
(or system-config-network-cmd), possibly as invoked from the
"administration" menu of the desktop, to change profiles.  When
you do that, the ifcfg-xxxx files currently in
/etc/sysconfig/network-scripts/ are replaced by those from
/etc/ssconfig/networking/profiles/profilename/,  where profilename
is the name of the selected profile.  Thus you can set it up
so that you have different interface configurations for use in
the office, in the home, in the coffee shop, etc.

Since you apparently have only a "default" in the profile directory,
you have never set up any alternate profiles.

/etc/sysconfig/networking/devices/ have all the "interfaces"
that you have configured in any profile; this allows the
GUI version of system-config-network to allow you to select
from any of these when creating a profile.

A confusing thing is that you can have several differently
named interfaces, e.g. xxxx and yyyy that refer to the same
physical interface, but have different parameter setups, e.g.
wireless SSID.  Thus you might have OfficeWireless and HomeWireless.

Finally, when booting, the scripts use what is in
/etc/sysconfig/network-scripts/ to initialize the network
interfaces.  However, you can add "netprofile=profilename" as
a boot command argument.  This causes the boot scripts to
invoke system-config-network-cmd to switch profiles (and therefore
what is in /etc/sysconfig/network-scripts/) just before
bringing up the network scripts.

I find this very useful because when making network measurements,
I want to be sure that I am firmly connected to a specific network.

It seems that the way of the future is the network manager.  For
me, it will be essential that I have control.  I don't want
it to select the neighbor's network (or one of the alternate
networks here at work) when I am trying to analyze a specific
network.  Presumably network manager has (or will have) this
capability.  Otherwise we will either not use it, or hand craft
it to satisfy our requirements.


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux