默认情况下,Fedora15将网口配置为DHCP模式,如果要设置成静态IP,作如下设置(以eth0为例):

cd /etc/sysconfig/network-scrips

vi ifcfg-eth0 (如果没有ifcfg-eth0将自动创建)

ifcfg-eth0文件添加/修改如下内容:

DEVICE=eth0

IPADDR=192.168.1.111
NETMASK=255.255.255.0
NETWORK=192.168.1.0
# If you're having problems with gated making 127.0.0.0/8 a martian,
# you can change this to something else (255.255.255.255, for example)
BROADCAST=192.168.1.255
ONBOOT=yes
NAME=eth0