Monday, January 13, 2014

Editing network for centos

/etc/network/interfaces



# vi /etc/sysconfig/network-scripts/ifcfg-eth0
 
DEVICE=eth0
NM_CONTROLLED=no
ONBOOT=yes //very important or your network won't work
HWADDR=00:50:56:37:F1:04
TYPE=Ethernet
BOOTPROTO=none //don't use static
IPADDR=192.168.1.8
NETMASK=255.255.255.0
DNS1=8.8.8.8
DNS2=8.8.4.4
 
## set Default Gateway
# vi /etc/sysconfig/network
 
NETWORKING=yes
HOSTNAME=web.example.com
GATEWAY=192.168.1.1

No comments:

Post a Comment