[root@xxx ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth0
注意大小写
# Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet
DEVICE=eth0
BOOTPROTO=static
BROADCAST=192.168.0.255
HWADDR=00:22:19:68:83:E8
IPADDR=192.168.0.4
NETMASK=255.255.255.0
NETWORK=192.168.0.0
ONBOOT=yes
[root@xxx ~]# vim /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=xxx
GATEWAY=192.168.0.1
最后
[root@xxx ~]# service network restart
阅读(892) | 评论(0) | 转发(0) |