Hosting in Europe

Portal Home > Knowledgebase > Linux tutorials > How to configure static IP on Centos 6


How to configure 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 8.8.4.4 # Replace with your nameserver ip


Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read

Language:
CUSTOMER TESTIMONIALS
John Smith
Since i have migrated my website to IPhost I receive quality services and good 24/7 support. In my opinion it's the best host MD Data Center
Bob Mitchel
Much better than my previous company, I also got help with software installation. VPS in Moldova is a good solution