centos系统:
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR=00:0C:29:63:90:89
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.1.239
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
DNS1=8.8.8.8
DNS2=202.106.46.151
DNS3=202.106.0.20
重启 : service network restart
Ubuntu系统:
vim /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.1.200
netmask 255.255.255.0
gateway 192.168.1.1
vim /etc/resolvconf/resolv.conf.d/base
nameserver 202.96.134.133
nameserver 202.106.0.20
重启系统
1153




被折叠的 条评论
为什么被折叠?



