Linux 配置网络

1、vi  /etc/sysconfig/network-scripts/ifcfg-eth0

2、

# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]
DEVICE=eth0
BOOTPROTO=none
TYPE=ether
HWADDR=00:0C:29:3F:41:F2
IPADDR=192.168.1.10
NETMASK=255.255.255.0
#BROADCAST=192.168.1.255
#NETWORK=
GATEWAY=192.168.1.1
ONBOOT=yes
IPV6INIT=no
USERCTL=no
PEERDNS=yes
DNS1=192.168.1.1
DNS2=8.8.8.8

3、配置完以后重启动服务

service network restart

你可能感兴趣的:(linux)