Search Topic

How to setup static ip in centos 6.3

In this post will show how to setup static ip address in centos 6.3. After fresh install of centos 6.3 system will not get ip address automatically and network interface will be down by default. You need to configure ip setting automatic or static in a configuration file.

See below the default Centos 6.3 network card configuration file.

[root@lx /]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
BOOTPROTO="dhcp"
HWADDR="00:1C:C4:48:6C:ED"
NM_CONTROLLED="yes"
ONBOOT="no"
TYPE="Ethernet"
UUID="2cb817b1-2553-4cf6-9d16-48a0ef32d3b2"

Here are steps to configure static ip address and auto start of network card once system rebooted.

Step 1: Configure Static IP

[root@lx /]# vi /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE="eth0"

BOOTPROTO="static"
IPADDR=192.168.1.1
NETMASK=255.255.255.0
HWADDR="00:1C:C4:48:6C:ED"
NM_CONTROLLED="no"
ONBOOT="yes"
TYPE="Ethernet"
UUID="2cb817b1-2553-4cf6-9d16-48a0ef32d3b2"
Save and exit 
:wq

Step 2: Stop and off in startup if Network Manager service is running.

[root@lx /]# service NetworkManager stop 
[root@lx /]#chkconfig  NetworkManager off

Step 3: Assign gateway ip address

[root@lx /]#vi /etc/sysconfig/network

NETWORKING=yes
HOSTNAME=lx.broexperts.com
GATEWAY=192.168.1.100

Step 4: Assign DNS server ip address

[root@lx /]#vi /etc/resolv.conf
nameserver 192.168.1.200

Network OS :
Step 5: Finally Restart Network service

[root@lx /]# service network restart

That’s all..

One Response to How to setup static ip in centos 6.3

Leave Reply

Follow Us
  • Facebook
    Likes
    884
  • Twitter
    Followers
    13
  • You tube
    Scribers
    755
UserOnline