X

Setup Static IP Address On CentOS 6.5

If you already installed CentOS 6.5 on your virtual machine. Now you can see can’t be get IP address from your dhcp server. Now you need to configure static ip address on your centos 6.5.

I have install CentOS 6.5 into my XEN server.

Send Mail Notification From Zabbix Server Using Gmail
How To Add Windows Host In Zabbix Server

Installation requirements

My installation  RAM  2GB and HardDisk  50GB.
If your want to change your hostname.

[root@Cloud-technologyrss:~]# vi /etc/hosts

Insert your choose-able host name. Open another file insert host name.

[root@Cloud-technologyrss:~]# vi /etc/hostname

Configure static IP on centos 6.5. Make sure your machine connected on LAN eth0 or eth1. So you can setup static ip any LAN.

Open static ip config file via any editor.

[root@Cloud-technologyrss:~]#  vi /etc/sysconfig/network-scripts/ifcfg-eth0

Insert below line then save config file and service restart.

DEVICE=eth0
HWADDR=C2:EE:64:E4:75:E2
TYPE=Ethernet
UUID=45801e43-18d4-474b-8b4f-0c365ef520fd
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=static
IPADDR=10.20.40.80
NETMASK=255.255.0.0
GATEWAY=10.20.40.1
DNS1=4.2.2.2

Then run restart command

[root@Cloud-technologyrss:~]# service network restart

Test your internet connection.

[root@Cloud-technologyrss:~]# ping 8.8.8.8

You can see all ping is ok.

If you can’t enable ping then open resolv.conf file insert google public name sever.

[root@Cloud-technologyrss:~]#  vi  /etc/resolv.conf

nameserver 4.2.2.2

Again test ping.

0 0 votes
Article Rating
Admin: I am system administrator as Windows and Linux platform. I have 4 years skilled from the professional period. I have to configure Linux based system such as an Asterisk VOIP system, Network monitoring tools (ZABBIX), Virtualization (XEN Server), Cloud computing (Apache CloudStack) etc. Now share my professional skill each interested person. Thanks to all.
Leave a Comment