1、 设置IP sudo ifconfig eth0 203.171.239.155 netmask 255.255.255.224 这样就算设置好了网卡eth0的IP地址和子网掩码

2、 设置网关 sudo route add default gw 203.171.239.129

3、 设置DNS 修改/etc/resolv.conf,在其中加入 nameserver DNS的地址1 nameserver DNS的地址2 完成。不过,这样设置之后,下次开机时候似乎IP又不存在了。