[lug] Fedora 19 Network Config Q

Maxwell Spangler maxlists at maxwellspangler.com
Thu Nov 21 19:13:56 MST 2013


On Thu, 2013-11-21 at 23:46 +0000, stimits at comcast.net wrote:

> I've had a series of perfect storm failures, where install new network
> cards and trying to reconfigure during an unannounced comcast firmware
> update brought down networking. They did a number of things to the
> cable modem, and at this point my f19 install has decided to put my
> em1 interface permanently into a static IP address on a non-routable
> network which I never asked for...somehow it seems to have messed up
> this while reconfiguring a p2p card, and settings using
> system-config-network fail to hold. Use of service network restart or
> systemctl network.service restart both fail.
> 
> What files can I directly edit and get rid of these stupid network
> tools? With the systemd changes, I'm not sure how the configuration
> changed from the old rc.d scripts, but I am unable to cause any chance
> whatsoever to em1. What is the vi way of setting dhcp on em1? Is there
> a different "tool" I should be using? If I want to restart networking
> after a change, or after comcast fails to see if dhcp is back up, what
> is the new way of doing this (since systemctl and service both seem to
> not work)?
> 
> Or...is there a way I can completely wipe out all network settings,
> and tell the system to configure them as if they are new...as if I
> were just now installing?

Fedora and Red Hat systems use two methods to configure the network:
NetworkManager and the network subsystem and its .cfg config files.

After installing and booting a Fedora/RH system, you'll normally find at
that NetworkManager has created at least a single configuration file for
your primary network device in the standard, traditional sysconfig
directory for network configuration.  On Fedora / Red Hat this
is /etc/sysconfig/network-scripts.  Look for files using the format
ifcfg-<device>.cfg such as ifcfg-em1.cfg.  Within this file you'll find
a set of key-value pairs that are used by the configuration scripts
elsewhere.  These individual files (one for each network device) are the
equivalent of a Debian systems /etc/network/interfaces single file.

The easiest way to modify your configuration is to login on the console
in the GUI desktop and use the NetworkManager applet to make changes.
When you changes things, it should create a new .cfg file in the above
directory if that file doesn't exist, or write your new changes to an
existing file that already exists.  Upon a network system restart or
system reboot, NetworkManager should follow the rules contained in the
files.

You can also edit these files by hand, and and you can copy them and
edit them to make new files for new devices.  If you google the
fedoraproject or Red Hat docs such as "ifcfg fedora network" you should
find high quality documentation about the options contained within these
files.  I find them very comfortable to work with once you learn their
nature.

If I were in your state, I'd try logging in and using NetworkManager to
make the changes.  Changes applied in the NM GUI will be activated
immediately and you'll be able to use a terminal window to test your
setup.

You could also manually edit these files with vim and then do 

# ifdown em1
# ifup em1
# ifconfig em1

to shut down the device, start it back up, and use ifconfig to report on
its status.

Finally, since you asked: You can manually remove your .cfg files
in /etc/sysconfig/network-scripts to clear our your setup.  Don't remove
all of them since ifcfg-lo.cfg is your loopback device and there are
some other useful configuration files present.  But you could manually
do:

# cd /etc/sysconfig/network-scripts
# rm ifcfg-em1.cfg ifcfg-em2.cfg

to remove the config files for two onboard, embedded NICs.

The naming of these NICs, by the way, is done by the udev system, not by
the networking system.  That's another story.

Make some progress and report back what you need help on.  You should be
able to get up and running.  Fedora / Red Hat has a reliable, and
trustworthy networking system.


-- 
Maxwell Spangler
========================================================================
Linux & Open Source Systems Engineer
Fort Collins, Colorado, USA
http://www.maxwellspangler.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20131121/8332653e/attachment.html>


More information about the LUG mailing list