Configurar IP fixo e DNS no CentOS 6.x
via console em modo root
vim /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
TYPE=Ethernet
UUID=0cfe9c92-84e5-4e13-b027-1222e33d3fa3
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=none
IPADDR=192.168.77.130
PREFIX=24
GATEWAY=192.168.77.77
DNS1=8.8.8.8
DOMAIN=8.8.4.4
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME=”System eth0″
HWADDR=08:00:27:F5:FC:AA
LAST_CONNECT=1503014636
Reiniciando a placa de rede:# service network restart
Ou:
# /etc/init.d/network restart
Abrindo o arquivo de configuração do DNS:
# vim /etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 8.8.4.4
outros comandos
route add default gw 192.168.1.1