When you install a CentOS 6.0, 6.1, or 6.2 server, the network is not automatically configured for DHCP or static IP addressing. In CentOS 6.3 and higher, the serverĀ is set for DHCP, but it is not set to automatically start on bootup. In CentOS 6.3, you must configure ONBOOT=yes in the /etc/sysconfig/network-scripts/ifcfg-eth0 file.
Static IP Address
In this example, our network has a 10.0.1.1 gateway, a DNS server at 10.0.1.2, another DNS server at 10.0.1.3, and we want to set the server to an address of 10.0.1.10. Modify values as appropriate for your setup.
Use vi or your editor of choice to make the following changes.
Edit /etc/sysconfig/network-scripts/ifcfg-eth0 and add the following parameters:
DEVICE=eth0 BOOTPROTO=static ONBOOT=yes IPADDR=10.0.1.10 NETMASK=255.255.255.0 BROADCAST=10.0.1.0 GATEWAY=10.0.1.1 DNS1=10.0.1.2 DNS2=10.0.1.3
Edit /etc/sysconfig/network and add the following to enable the network:
NETWORKING=yes
OPTIONAL: If you find that your server is not correctly resolving addresses on your domain, edit /etc/resolve.conf and added the following so that it searches your base domain.
search domain.com
DHCP IP Address
Modify values as appropriate for your setup.
Use vi or your editor of choice to make the following changes.
Edit /etc/sysconfig/network-scripts/ifcfg-eth0 and add the following parameters:
DEVICE=eth0 BOOTPROTO=DHCP ONBOOT=yes
Edit /etc/sysconfig/network and add the following to enable the network:
NETWORKING=yes
OPTIONAL: If you find that your server is not correctly resolving addresses on your domain, edit /etc/resolve.conf and added the following so that it searches your base domain.
search domain.com
References: http://www.pwrusr.com/system-administration/solved-centos-6-networking-and-hyper-v
my domain is voicetune.com
my centos server hostname is server1.voicetune.com
my isp dns is 111.222.333.444
my isp dns2 is 111.222.333.445
my isp dns domain is tx.net.it
search “domain.com”
what should i replace “domain.com”?
voicetune.com, server1.voicetune.com or tx.net.it???
You should set it to “search voicetune.com”.