將網卡eth0的IP修改為 102.168.0.1
ifconfig eth0 102.168.0.1 netmask 255.255.255.0
將網關修改為 102.168.0.254
route add default gw 102.168.0.254
Linux命令行修改DNS
echo "nameserver 202.202.202.20 ">> /etc/resolv.conf
重啟網絡服務命令
service network restart # 或 /etc/rc.d/init.d/network restrart