Back
ifcfg-eth0 depends on how that first Ethernet network adapter was configured. For example, look at the situation where networking was configured only for the purpose of installation. If you did not configure networking when configuring the host-name during the GUI installation process, networking will not be configured on the system. In that case, ifcfg-eth0 file would contain the following directives, starting with the name of the device, along with the hardware address.
DEVICE = "eth0"
HWADDR = "F0:DE:F3:06:C6:DB"
By default, RHEL6 uses a device known as Network Manager.If a network card is controlled by that service, the following directive would be set to yes
NM_CONTROLLED = "yes"
The Network Manager is a service, to make sure it's running, execute the /etc/init.d/NetworkManager start command. Of course, if networking were not configured during the installation process, there's no reason for it to be activated during the boot process.
ONBOOT = "no"
The alternative to the Network Manager service is to configure it directly. For that purpose, the configuration file shown
DEVICE = "eth0"
BOOTPROTO = "static"
DNS = "192.168.122.1"
GATEWAY = "192.168.122.1"
IPADDR = "192.168.122.50"
NETMASK = "255.255.255.0"
ONBOOT = "yes"
If you prefer to use a DHCP server, that static network address information would be omitted, and the following directive would be changed.
BOOTPROTO = "dhcp"
ifcfg-eth0 depends on how that first Ethernet network adapter was configured. For example, look at the situation where networking was configured only for the purpose of installation. If you did not configure networking when configuring the host-name during the GUI installation process, networking will not be configured on the system. In that case, ifcfg-eth0 file would contain the following directives, starting with the name of the device, along with the hardware address.
DEVICE = "eth0"
HWADDR = "F0:DE:F3:06:C6:DB"
By default, RHEL6 uses a device known as Network Manager.If a network card is controlled by that service, the following directive would be set to yes
NM_CONTROLLED = "yes"
The Network Manager is a service, to make sure it's running, execute the /etc/init.d/NetworkManager start command. Of course, if networking were not configured during the installation process, there's no reason for it to be activated during the boot process.
ONBOOT = "no"
The alternative to the Network Manager service is to configure it directly. For that purpose, the configuration file shown
DEVICE = "eth0"
BOOTPROTO = "static"
DNS = "192.168.122.1"
GATEWAY = "192.168.122.1"
IPADDR = "192.168.122.50"
NETMASK = "255.255.255.0"
ONBOOT = "yes"
If you prefer to use a DHCP server, that static network address information would be omitted, and the following directive would be changed.
BOOTPROTO = "dhcp"