自学笔记,感谢网上各位前辈的分享。
1、设置虚拟机VMware为桥接模式。
2、在虚拟网络编辑器中设置VMnet0为桥接模式,桥接到手动选择电脑的相应网卡。
3、配置虚拟机的IP地址与主机的IP地址为同一网段。
4、配置虚拟机上的Ubuntu中的Netmask、Gatway和DNS servers与主机的相同。
使用sudo vi /etc/network/interface
auto etho
iface etho inet static
address 192.168.1.18
netmask 255.255.255.0
gateway 192.168.1.1
及sudo vi /etc/resolv.conf
添加
nameserver 192.168.1.1
5、重启网络服务
sudo /etc/init.d/networking restart
完成。