Knowledgebase

Configure Static IP on Centos 6

Static IP on Centos 6

## Configure eth0
#
# vi /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=”eth0″
NM_CONTROLLED=”yes”
ONBOOT=yes
HWADDR=A4:BA:DB:37:F1:04
TYPE=Ethernet
BOOTPROTO=static
NAME=”System eth0″
UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03
IPADDR=192.168.1.44
NETMASK=255.255.255.0
## Configure Default Gateway

#
# vi /etc/sysconfig/network

NETWORKING=yes
HOSTNAME=centos6
GATEWAY=192.168.1.1

## Restart Network Interface
#

/etc/init.d/network restart

## Configure DNS Server
#
# vi /etc/resolv.conf

nameserver 8.8.8.8 # Replace with your nameserver ip
nameserver 192.168.1.1 # Replace with your nameserver ip

 

 

Was this answer helpful?

1 Users Found This Useful

Related Articles

SSH Login Email Alerts The examples below send an email when someone logs into your server. For this to work, your server must be able to send mail using the... Monitor Server Logs in Real-Time with "Log.io" Log.io is a small application build on Node.js and Socket.io for monitoring real time Linux server logs through web interface.On... How to configure VPN VPN SETUP To use the VPN on Mac you can use the following steps. Download and install OpenVPN client from... How-to extend a root LVM partition online There is also a quick remedy for the emergency situation when your root partition runs out of disk space. There is a feature specific to... Install Taskwarrior (terminal based todo application) on Ubuntu/Centos   Taskwarrior is Free and Open Source Software that manages your TODO list from your command line. It is flexible, fast, efficient,...