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.

cat /etc/sysconfig/network-scripts/ifcfg-eth0

Output

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

vi /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=”eth0″

Change the Following settings

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″

Now Save and exit

:wq

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

service NetworkManager stop
chkconfig NetworkManager off

Step 3: Assign gateway IP Address

vi /etc/sysconfig/network

Change the Gateway settings according to your network settings.

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

Step 4: Assign DNS server ip address

vi /etc/resolv.conf

Mention the nameserver ip address

nameserver 192.168.1.200

Network OS :
Step 5: Finally Restart Network service

service network restart

That’s all..

 
 
 

2 Responses to How to setup static ip in centos 6.3

Leave Reply

Follow Us
  • Facebook
    Likes
    5585
  • Twitter
    Followers
    46
  • You tube
    Scribers
    1057
Tweet With Us
UserOnline