General networking question
What, if any, are the dangers of manually editing the /etc/sysconfig/network-scripts/ifcfg-ethX file on a rhel6.5 system? If changes need to be made to a configuration, should they always be made with either nm-connection-editor or system-config-network, or can they be made manually or with some combination of manual editing and the aforementioned utilities?
Responses
It sort of voids the warranty if you do both tool-based and manual-based editing, but the combination can and does work.
The danger of manual edits is you may introduce a syntax error or some illegal combination, break networking, and need console access to back out of it. On the other hand, there are some things the GUI tools won't do, e.g. setting up multiple sub-interfaces for trunk ports with explicit vlan tagging.
You can go completely manual by setting:
NM_CONTROLLED="no"
in an individual ifcfg-* file, or globally by doing
service NetworkManager stop
chkconfig NetworkManager off
... even if the original configuration was generated from the GUI tools, which I tend to recommend.
On a laptop used for network testing, where I need to be able to rapidly move it between vlan's, I ended up setting up an entire subdirectory of hand-crafted ifcfg-eth0 files below /etc/sysconfig/network-scripts, along with a chooser script to copy one to ifcfg-eth0, and instantiating /sbin/ifup-local so that some of my non-default static routes would get handled properly.
A lot of my servers run without GUI, and I tend to maintain their ifcfg-* files manually. I also find it easier to tune some specialized interfaces like iSCSI manually.
On the other hand, I'd hate to have to set up a WPA2 WiFi interface by hand; for that sort of thing I go straight to the GUI.
What the answer will be a half decade from now, with network configuration moving more into systemd, remains to be seen. Possibly something more like what the Debian family does, where you can specify pre and post actions to run as interfaces come up and down.
-- Jim Leinweber, WI State Lab of Hygiene
Just a quick reply regarding the warranty... I've had administrators who edit the network interface files manually and it does not void the warranty, to include administrators who make typos or other erroneous entries that temporarily botch network function until resolved. Of course I'd also recommend picking one or the other, and not both. Using both would seem to beg for an issue. I would suspect if someone approached Red Hat Support with a network problem that arose from the improper use of both NM and manually editing files, they'd help the victim fix the issue and just say to pick one or the other in the future and not drop one's warranty.
We had a couple of highly unique network configurations that when someone did a typo, we were still able to use Red Hat Support even when mentioning to them that someone typo'd the file(s).
Red Hat Support was disinterested in whether or not we used NetworkManager or manually configured the files, but just helped us with either one method or another based on the best choice for the situation at hand. (i.e. not using NetworkManager for servers, or perhaps using NetworkManager for a laptop)
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
