1.vi /etc/sysconfig/network-script/ifcfg_eth0
2.DEVICE=eth0
BOOTPROTO=static(dhcp) (获取IP方式:静态、动态)
BROADCAST=192.168.1.255(广播地址)
IPADDR=192.168.1.101(IP地址)
NETWORK=网络地址
NETMASK=255.255.255.0(子网掩码)
GATEWAY=192.168.1.1(网关)
DNS1 = 159.226.23.1(DNS--设置连接网络 或 vi /etc/resolv.conf nameserver 159.226.23.1)
HWADDR=00:0C:29:69:76:CA(MAC地址)
ONBOOT=yes(是否激活)
TYPE=Ethernet