http://www.cnblogs.com/objectorl/archive/2012/09/27/vmware-ubuntu-nat-static-ip-settings.html
参考以上方式,但是这个版本需要多执行一步
gedit /etc/NetworkManager/NetworkManager.conf
将managed=false 改成true
具体步骤如下:
静态IP设置
查看NAT模式IP
1 gedit/etc/network/interfaces
添加如下内容
iface eth0 inet static
auto eth0
address 192.168.57.134
netmask 255.255.255.0
gateway 192.168.57.2
2 gedit/etc/resolv.conf
nameserver 192.168.57.2
nameserver 202.96.128.86
3、
gedit /etc/resolvconf/resolv.conf.d/base
加入nameserver为你的DNS即可
nameserver 192.168.57.2
nameserver 202.96.128.86
4、执行
gedit /etc/NetworkManager/NetworkManager.conf
将managed=false 改成true
5 重启 或者 sudo /etc/init.d/networking restart
时间: 2024-10-29 10:46:55