This post will covers the steps to configure static IP address, default gateway, netmask, DNS server and make a network auto start at boot on centos 6.3. server normally configured with static IP address, so that easier to maintain the configuration on it's client and DNS server will always able to resolve it.
Device = "eth0"Bootproto= "DHCP"Hwaddr= "XX: XX"Nm_controlled= "Yes"Onboot= "No"Type= "Ethernet"UUID= "Xxxxxxxx-05a0-4adf-84fd-850aca6521c7"
1. Configure eth0:
[Root @ centos63 ~] # Vi/etc/sysconfig/network-scripts/ifcfg-eth0
Device = "eth0"Bootproto= "Static"Hwaddr= "XX: XX"Nm_controlled= "Yes"Onboot= "Yes"Type= "Ethernet"UUID= "Xxxxxxxx-05a0-4adf-84fd-850aca6521c7"Ipaddr= 192.168.1.54Netmask= 255.255.255.0
2. Configure Default Gateway:
[Root @ centos63 ~] # Vi/etc/sysconfig/Network
Networking =Yeshostname=Centos63.ehowstuff. localgateway= 192.168.1.1
3. Restart network interface:
[Root @ centos63 ~] # Service network restartshutting down interface eth0: [OK] Shutting Down loopback interface: [OK] Bringing up loopback interface: [OK] Bringing up interface eth0: [OK]
4. Configure DNS Server:
[Root @ centos63 ~] # Vi/etc/resolv. conf
Nameserver 8.8.8.8