RHEL 6 : Network configuration

Network configuration under RHEL 6 has slightly changed. No configuration found if you perform an minimum installation.Networking is managed with NetworkManager by default. On a server, using GUI tools is best to avoid when possible.

To make your networking work out of the box, some changes are needed in a few files.
To make the network interface to configure available with the right information, add any changes in /etc/sysconfig/networking-scripts/ifcfg-eth0. This file should contain at least the following lines :

DEVICE=eth0
HWADDR=MAC_ADDRESS
IPADDR=IP address server
NETMASK= its netmask
BROADCAST= its broadcast
BOOTPROTO=static
ONBOOT=yes
NM_CONTROLLED=no

NM_CONTROLLED set to no just tells the system not to use NetworkManager as default networking management tool.

Next step, add the following information in /etc/sysconfig/network :

NETWORKING=yes
GATEWAY= default gateway for the server
HOSTNAME=FQDN of the server

Do not forget to populate /etc/hosts file with localhost, your server’s IP address, its FQDN and aliases

Add the IP addresses of your DNS servers in /etc/resolv.conf :

cat /etc/resolv.conf

search your_domain
nameserver DNS_server1_IP_Address
nameserver DNS_server2_IP_Address

After any changes on the networking configuration, restart the related service :

root@localhost:~#service restart network

To check that the requested network interfaces are up and well configured, check their status :

root@localhost: ~#service status network

If you need to add more parameters to the configuration files above, have a look at this document available on your server :

cat /usr/share/doc/initscripts-9.03.31/sysconfig.txt

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s