Monday, April 2, 2012

Configuring Network Interfaces on Linux

Most of the Linux distros are derivative from one of these mainstream distributions
  1. RedHat e.g. ScientificLinux, CentOS, Rocks, Fedora
  2. Debian e.g. Ubuntu, Linux Mint
 Despite their common root (Linux) the way how they configure devices and services varies dramatically.
On RedHat systems, the main configuration files are /etc/sysconfig/network and /etc/sysconfig/network-scripts/ifcfg-ethN. Here you can find data and syntax of these files.
On Debian, the main file is /etc/network/interfaces. How to populate that file can be found here.
When modifications have been done, the way how the changes are taken is as follows
  1. On RedHat run sudo /etc/init.d/network restart
  2. On Debian-based run sudo /etc/init.d/networking restart
 When major changes are performed additional steps could be required, for instance, when a new network interface is "inserted".