Configure an IP Address
-
Modify the /etc/sysconfig/network-scripts/ifcfgeth0 file and provide a static IP
address as a root user in Redhat.
It should be displayed as follows:
- DEVICE=eth0
- BOOTPROTO=STATIC
- IPADDR=192.168.0.5
- NETMASK=255.255.255.0
- GATEWAY=192.168.0.1
- ONBOOT=yes
-
After saving the file, execute the following commands to restart the network daemon:
$ /etc/init.d/network stop $ /etc/init.d/network startThis will provide the IP address to the eth0 interface and also, theifconfigcommand will list eth0.