[NCLUG] Fedora 6 and the RaLink rt2500 wireless card

Sean Reifschneider jafo at tummy.com
Tue Dec 12 08:29:50 MST 2006


On Mon, Dec 11, 2006 at 10:34:50AM -0700, Chad Perrin wrote:
>encouraging use of distro-specific configuration tools:
>  system-config-network

These tools just modify the normal flat-files, much in the same way that
the Debian and Ubuntu distro-specific configuration tools do.  So why is
this a Fedora problem?  Tools to modify
/etc/sysconfig/network-scripts/ifcfg-* don't seem that different from tools
to modify /etc/network/interfaces...

>changing behavior for network configuration:
>  netconfig (formerly preferred network configuration tool, also
>             distro-specific)
>  rhncfg-client (also formerly preferred, but older than netconfig)
>  netcfg (ditto)

First of all, "rhncfg-client" has absolutely nothing to do with system
network configuration.  The "rhn" tools are used to manage the Red Hat
Network, Red Hat's system for centrally managing packages on a bunch of
machines ("I want all company desktops to install Beagle.").

The other two must be ancient history, or not commonly used, because I
don't recall anything about them.  I've been using Red Hat systems since
3.0.3, and I don't recall those tools.

>discouraging avoidance of distro-specific tools:
>  /etc/sysconfig/network-scripts/ifcfg-eth0
>  /etc/sysconfig/network-scripts/ifcfg-eth1
>  and so on . . .

I've never felt particularly discouraged...  I tend to do network installs,
so the installer is where my primary network configuration is done.  After
that, I entirely manage the network configuration via modification of the
files in /etc/sysconfig/network-scripts, unless it's an HA cluster.

That said, Fedora really should include a "man ifcfg" like Mandrake does,
and like Debian does for "man interfaces".  Whenever I need to do anything
fancy like bonding, VLANs, assigning a bunch of IPs to aliases, I have to
search google or read "ifup" to see what it's expecting.  However, most of
these functions aren't available via the system-config programs, so I
wouldn't say it's related to Fedora discouraging use of the flat files so
much as just not having the documentation.

>I'd comment on how the location of the paths and filenames for network
>configuration files has changed, but there's such a culture of

I'm not aware of that.  I've been using /etc/sysconfig/network-scripts to
configure the networking, IIRC, since I first started using Red Hat 3.0.3
in the <gasp> mid-90s.

In general I like Debian's /etc/network/interfaces, but it's MUCH more
limited than the Fedora network-scripts.  You can do most things via the
"pre-up", "up", "post-up" config directives, allowing you to run arbitrary
commands.  However, that puts all the burden on the user to remember how to
correctly configure, for example, a VLAN, Bridge, or bonding group.  For
example, setting up a bridged interface in Fedora you just say "BRIDGE=br0"
in the config script, and it knows to "ip addr flush", "ip link set dev
up", and also restart radvd if it's running.  Just dropping a "pre brctl
addif br0 eth0" in the interfaces config may work in some situations, but
isn't as robust (for example, if the Interface got an IP address already).

>anti-file-editing for configuration in the Red Hat and Fedora users
>community that all any of the websites that discuss network
>configuration for Fedora and RHL actually address is the
>RH/Fedora-specific configuration scripts and GUI tools.

I don't know about that, when I've searched for help with doing less common
tasks I've always been pointed at the directives for the config files.  Of
course, part of that may be how I'm searching, but most of it is probably
that (last I knew) the more unusual configs tend not to be supported in the
GUI tools.

I did a search for ``fedora "network configuration"'' on Google, and the
top hit discusses mostly the scripts, and also mentions the programs.  Then
there is:

   The "project" page for the system-config-network program.
      (which doesn't even discuss configuring the network)
   Documentation on configuring the network interface at install-time.
   Another page discussing both the files and the programs.
   A page discussing only the programs, oriented towards Windows users.

So, in the top 5 hits for this search string, I'm not sure it's fair to say
that websites only discuss using the GUI tools...

Hmm, let's try the same for ``debian "network configuration"''.  Wow, the
first hit is a debian.org "doc/manuals/reference" page which, 17 "Page
Downs" (in my browser), documents configuring your network for DHCP with:

   # ifdown eth0
   # editor /etc/network/interfaces  # tweak as you wish
   # ifup eth0

That seems to be the first mention of "/etc/network/interfaces" on that
page, but maybe I missed one.

Ok, so that page doesn't mention a single "GUI" tool on it...  However, I'm
not sure that's an improvement.  Does a user really need to know about
"ifconfig" and "ip addr" before they can get their computer to request an
IP via DHCP?

Obviously, that's not exactly the state, because the Debian installer
will allow you to configure the interface via it's own GUI.

I am totally ok with having GUi tools that make users lives easier.  It'd
be best if they just poked the back-end flat files so that it remains the
canonical location, obviously...

The remainder of the top-5 Debian hits include a post about having to
modify /etc/rc*.d/S*network to change IPs in Debian Slink, another
(briefer) /etc/network/intefaces document (not debian.org), and two hits
for "netconf", a "Next Generation" network configuration program which is
in the planning stages, but hasn't been touched for nearly two years.

Searching for ``ubuntu "network configuration"'' has as it's top hit a
mailing list post about using the menu to start the GUI (then going on to
winge about how "/etc/network/interfaces" is much more "modern" than
ifcfg-*...  Cute, the third hit is an article mentioning Brian's "gtkwifi".
Next is a refernce to "whereami".  So, the top 5 hits for Ubuntu mention 3
different GUI tools.

Ubuntu has out Fedoraed Fedora.  :-)

>Speaking of SuSE, and adding in Mandrake, they get into the
>distro-specific tools by discouraging use of anything that doesn't have
>YAST or drak (respectively) in the name.

No idea, I've only done a little bit of configuration of SuSE systems, and
I think I've dealt with <5 Mandrake systems in the last decade.

>In all three, documentation of the underlying configuration file system
>and distro-agnostic toolsets is lacking, distro-specific toolsets are

Absolutely.  Mandrake does seem to have a man page for ifcfg, at least.
Fedora does not have a man page for either ifcfg nor system-config-network,
so I guess at least they're consistent there.  ;-/  Debian is probably the
winner here, with "man interfaces" showing the full functionality
available, though to be fair it's got much less functionality to document.

>emphasized, and the tools and configuration files have a history of
>migrating from one state to another as new OS release versions are
>produced.  At least, that's my experience.

I'm not sure what you mean by the migrating of state.  As I said, I've been
using the ifcfg scripts to configure networking since I started using Red
Hat in the mid '90s.

>I don't want anyone to read this and think I'm specifically
>anti-RH/Fedora, anti-Mandr(ake|iva), and/or anti-SuSE.  I found that the

Indeed, but I'm not sure it's quite as bad as you are saying it is.
Documentation of the config files could definitely be better on Fedora.  I
really have no idea about configuration tools on Debian

>I'm still not really clear on how putting configuration files in scripts
>directories provides any benefits, however,

I totally agree there.  It gets a bit difficult with having
"ifup-pre-local" and "ifup-local", should those be in the config directory
or the script directory?  Worse, in that same directory there is "ifup",
which is different than the "ifup" command (in /sbin).  I don't
particularly like the decision, but I do end up making use of it to see
exactly what is happening when I specify particular directives in the
config scripts.

>or why they should be three levels deep in the filesystem hierarchy,

Interesting.  I wonder why in Debian it ISN'T.  I mean, why
/etc/network/interfaces?  Why not /etc/defaults/network/interfaces?  The
reason it is 3 in Fedora is that the configurations are split out into
multiple files, and they put them under "/etc/sysconfig" where most of the
other configuration goes.  So they put them in a directory called
"network-scripts", I can understand that.  I guess they could have put
ifcfg-* in /etc/sysconfig...  Not sure that gets you anything, but it could
have been done.

>or what benefit there is to
>breaking up a single, relatively simple configuration into several
>separate files.

Oh, there are huge benefits.  If you write a script in Debian that wants
to display the configured IP address for eth0, how would you do it?
In Fedora it's ". /etc/sysconfig/network-scripts/ifcfg-eth0; echo $IPADDR"
Similarly for setting the IP address from a script
"sed -i 's/^IPADDR=.*/IPADDR=10.9.8.7/'
/etc/sysconfig/network-scripts/ifcfg-eth0".

In Debian they designed their own config file format, and so any tools
dealing with it have to use a customized parser for it.  In Fedora, they
used shell environment definitions and use the shell to parse it.  A good
decision, IMHO.

Sean
-- 
 Nearly all men can stand adversity, but if you want to test a man's
 character, give him power.  -- Abraham Lincoln
Sean Reifschneider, Member of Technical Staff <jafo at tummy.com>
tummy.com, ltd. - Linux Consulting since 1995: Ask me about High Availability




More information about the NCLUG mailing list