Monday, August 22, 2011

Centos 6 Default networking

SkyHi @ Monday, August 22, 2011
Default GUI Static IP Configuration:
 DEVICE="eth0"
NM_CONTROLLED="no"
ONBOOT="yes"
HWADDR=00:0C:29:44:5B:C2
TYPE=Ethernet
BOOTPROTO=none
IPADDR=192.168.100.183
PREFIX=24
GATEWAY=192.168.100.2
DNS1=192.168.100.2
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth0"
UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03


============================================================================
RHEL/CentOS 6 does not configure network interfaces on default installation. Also, it is configured to use NetworkManager. To enable networking interface and disable NetworkManager please follow instructions below.
The /etc/sysconfig/network-scripts/ifcfg-eth0 content looks as follows on default installation.
DEVICE="eth0"
HWADDR=specifc mac address
NM_CONTROLLED="yes"
ONBOOT="no"

For DHCP, configure the interface as follows.
DEVICE="eth0"
HWADDR=specifc mac address
NM_CONTROLLED="no"
ONBOOT="yes"
BOOTPROTO="dhcp"

Restart the network after configuration.
/etc/init.d/network restart

For Static ip, configure it as follows

DEVICE="eth0"
HWADDR=specifc mac address
NM_CONTROLLED="no"
ONBOOT="yes"
BOOTPROTO="static"
IPADDR=ip address here.
NETMASK=netmask here.

Change the /etc/sysconfig/network to have the GATEWAY.
NETWORKING=yes
HOSTNAME=www1.nixcraft.in
GATEWAY=gateway address here.

Change /etc/resolve.conf
nameserver IP

For example configuration, see Method #3
http://www.cyberciti.biz/faq/rhel-centos-fedoracore-linux-network-card-configuration/
Restart the network after configuration.
/etc/init.d/network restart


NOTE: In order to edit partition, you must use GUI with 512MB RAM. Duh!!

REFERENCES
http://www.convirture.com/ee_wiki/index.php?title=RedHat_6_Networking