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..

2 Responses to How to setup static ip in centos 6.3

Leave Reply

Follow Us
  • Facebook
    Likes
    3222
  • Twitter
    Followers
    20
  • You tube
    Scribers
    918
$1.99/Mo. for 12 months of Economy Hosting at GoDaddy.com
Best Sellings OS
CentOS 7 Order Now
Ubuntu Order Now
Linux Mint Order Now
Puppy Order Now
Netrunner Order Now
Debian Order Now
Robolinux Order Now
Zorin OS Order Now
Linux Lite Order Now
Manjaro Order Now
Bodhi Order Now
Kali Order Now
Simplicity Order Now
PCLinuxOS Order Now
Tails Order Now
Rocks Cluster Order Now
openSUSE Order Now
Lubuntu Order Now
Fedora Order Now
online poll by Opinion Stage
UserOnline