日期:2014-05-16  浏览次数:20756 次

Linux 设置静态IP

固定服务器IP,设置/etc/sysconfig/network-scripts/ifcfg-em1

配置如下:

DEVICE="em1"
BOOTPROTO="static"
NM_CONTROLLED="yes"
ONBOOT=yes
TYPE="Ethernet"
UUID="3dcce70e-db8b-4bb5-a455-87c89de9c850"
HWADDR=D4:AE:52:A3:66:D5
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System em1"
IPADDR=192.168.1.109
NETMASK=255.255.255.0
GATEWAY=192.168.1.1

?