Configuring Network on Centos 6 Minimal Installation

When a system is installed with CentOS 6 minimal version, it's network is not configured initially and has to be manually taken care of. There are two ways of going about this:

  1.  vi /etc/sysconfig/network-scripts/ifcfg-eth0
    • ONBOOT = yes
    • NM_CONTROLLED = no
    • BOOTPROTO = dhcp
  2.  vi /etc/sysconfig/network [Hostname is needed to be specified for DHCP to work]
    • NETWORKING = yes
    • HOSTNAME =
  3.  vi /etc/resolv.conf [Optional]
    • search [ex:]
    • nameserver
  4. Once all the above steps are done, restart the networking service:
    • /etc/init.d/network restart
[For troubleshooting]
You can also consider using "dhclient eth0" to obtain an ip address for eth0 from dhcp server.

Static IP Address
  1. vi /etc/sysconfig/network-scripts/ifcfg-eth0
    • ONBOOT = yes
    • NM_CONTROLLED = no
    • BOOTPROTO = none
    • IPADDR =
    • NETMASK = [for a /24 network it will be]
    • GATEWAY = [Optional]
    •  USERCTL = yes/no [Optional] (yes - allows non-root users to control this device)

Additional configuration parameters are defined in the CentOS documentation


Popular posts from this blog

Solved: Fix for Git clone failure due to GnuTLS recv error (-9)

Openstack : Fixing Failed to create network. No tenant network is available for allocation issue.

QuickBite: Tap Vs Veth