Configuring network on RedHat Enterprise Linux Server
Here is a quick snippet of how to configure network for Red Hat Enterpise Linux for a server.
Here I am trying to configure eth0Â to connect to the network.
First we need to ensure that network interface is turned on :
vi /etc/sysconfig/network-scripts/ifcfg-eth0
Find the line that says ONBOOT and ensure it says ONBOOT=yes  If its no then change it to yes…so it will come online when rebooted.
Now lets start the configuration.
Type setup
select network configuration
Â
select device configuration
select eth0
Normally servers get static ip addresses and if thats the case then remove DHCP .
Fill in the gateway, net mask, DNS information
Click OK and Save. Then select DNS Configuration . Type in all your DNS information there:
Click Save and Save & Quit and Quit. This will exit the setup screen.
Now that we have configured the network, we got couple of more things to do.
Lets now setup the host files
type vi /etc/hosts
add a line
<ipaddress> Â <hostname>Â <hostname.domainname>
eg:
192.1.50.1Â redhat1 Â redhat1.techsatwork.com
Save this file.
Time to restart the network services
type  service network restartÂ
Ensure that all the services and network (eth0 in this case) started OK
Now lets see if the eth0 is all connected and a link is established
type ethtool eth0
and look for Link Detected : Yes
If you see Yes then that means you are now connected to the network.
Try pinging other servers on the network . Your server should now be connected to internet. One other thing you can optionally do is to stop the firewall. To do that:
type  service iptables save
type service iptables stop
type chkconfig iptables off
I hope this helps. Â Please test these steps on a non-prod environment first.
**I do not guarantee or accept any consequences from these steps in any circumstances