network config on centos

edit /etc/sysconfig/network-scripts/ifcfg-eth0 (first network card, ifcfg-eth1 is the second)

DEVICE=eth0

BOOTPROTO=static

IPADDR=192.168.3.110

NETMASK=255.255.255.0

ONBOOT=yes

DHCPCLASS=

edit /etc/sysconfig/network

NETWORKING=yes

HOSTNAME=xxx

GATEWAY=192.168.3.1

edit /etc/resolv.conf

nameserver 8.8.8.8

/etc/init.d/network restart

猜你喜欢

转载自mathgl.iteye.com/blog/2040337