Networking is easy to configure in Red Hat Linux / Fedora
Following is network configuration files for Fedora / Red Hat Linux
Ifcfg-XXX where XXX is type of adapter e.g ifup-ethX, ifup-wireless, ifup-ppp. This file has information of gateway used and hostname. This file is used during boot process. Typical configuration of this file is as below
DEVICE=eth0 BOOTPROTO=none ONBOOT=yes PREFIX=24 IPADDR=10.0.1.27
File contents are simple
- DEVICE provides device name, exception to this ppp which is dynamically allocated
- BOOTPROTO provides for protocol which can be
- none — No boot-time protocol should be used
- bootp — The BOOTP protocol should be used.
- dhcp — The DHCP protocol should be used.
- ONBOOT is logical if yes device is activated at time of boot and if no nothing is done at time of boot.
- PREFIX is bits of subnet mask. A 24 bit subnet mask is equivalent to 255.255.255.0
- IPADDR is static ip address for device
/etc/init.d/network reads file during boot process and checks status of adapter which has ONBOOT=yes. If its running nothing is done, else adapter is started by calling ifup script for that device. /etc/init.d/network does not react to changes which are done after boot for that you have to manually run ifdown and ifup.