码迷,mamicode.com
首页 > 系统相关 > 详细

VMware三种网络配置方式

时间:2015-05-12 15:00:05      阅读:162      评论:0      收藏:0      [点我收藏+]

标签:

 

VMware是很受欢迎的虚拟机,在我们平时的工作中需要经常用到,此文简单总结了平时使用的三种网络配置方式,具体的原理没有去深究。

虚拟机系统安装的是Linux系统。

首先,我们在本机上查看所有网络配置连接,使用命令:ipconfig

  1. C:\Documents and Settings\user>ipconfig
  2. Windows IP Configuration
  3. Ethernet adapter VMware Network Adapter VMnet8:
  4. Connection-specific DNS Suffix . :
  5. IP Address. . . . . . . . . . . . : 192.168.74.1
  6. Subnet Mask . . . . . . . . . . . : 255.255.255.0
  7. Default Gateway . . . . . . . . . :
  8. Ethernet adapter VMware Network Adapter VMnet1:
  9. Connection-specific DNS Suffix . :
  10. IP Address. . . . . . . . . . . . : 192.168.2.1
  11. Subnet Mask . . . . . . . . . . . : 255.255.255.0
  12. Default Gateway . . . . . . . . . :
  13. Ethernet adapter 无线网络连接:
  14. Connection-specific DNS Suffix . :
  15. IP Address. . . . . . . . . . . . : 192.168.1.209
  16. Subnet Mask . . . . . . . . . . . : 255.255.255.0
  17. Default Gateway . . . . . . . . . : 192.168.1.1
  18. Ethernet adapter 本地连接:
  19. Media State . . . . . . . . . . . : Media disconnected
  20. Ethernet adapter VirtualBox Host-Only Network:
  21. Connection-specific DNS Suffix . :
  22. IP Address. . . . . . . . . . . . : 192.168.154.1
  23. Subnet Mask . . . . . . . . . . . : 255.255.255.0
  24. Default Gateway . . . . . . . . . :
  25. C:\Documents and Settings\user>
上面内容中,我们可以看到本地连接及其它虚拟连接,其中VMware Network Adapter VMnet8、VMware Network Adapter VMnet1和本地连接是我们在各种模式下要使用的不同连接网络配置。

本地连接:是本机用Bridge方式与虚拟机交互时使用的主机网卡;

VMware Network Adapter VMnet1:是本机用Host-Only方式与虚拟机交互时使用的虚拟网卡;

VMware Network Adapter VMnet8:是本机用NAT方式与虚拟机交互时使用的虚拟网卡;

接下来是试验结论:

1、Bridge模式:

Bridge模式使用的网卡是:本地连接,及物理网卡 
设置方法: 
a.在命令行使用ipconfig命令,获取本地连接的网络IP地址,如上为:172.16.2.41; 
b.设置虚拟机的IP地址与本地连接的IP地址在同一网段,如172.16.2.241;

c.使用service network restart命令重启网络配置;

d.使用ping 命令检查网络是否畅通,如:ping 172.16.2.41。

2、Host-Only模式:

Host-Only模式使用的网卡是:VMware Network Adapter VMnet1 
设置方法: 
a.在命令行使用ipconfig命令,获取主机上VMware Network Adapter VMnet1的网络IP地址,如上为:192.168.2.1; 
b.设置虚拟机的IP地址与VMware Network Adapter VMnet1的IP地址在同一网段,如192.168.2.241;

c.使用service network restart命令重启网络配置;

d.使用ping 命令检查网络是否畅通,如:ping 192.168.2.1。

3、NAT模式:

NAT模式使用的网卡是:VMware Network Adapter VMnet8 
设置方法: 
a.在命令行使用ipconfig命令,获取主机上VMware Network Adapter VMnet8的网络IP地址,如上为:192.168.74.1; 
b.设置虚拟机的IP地址与VMware Network Adapter VMnet8的IP地址在同一网段,如192.168.74.241;

c.使用service network restart命令重启网络配置;

d.使用ping 命令检查网络是否畅通,如:ping 192.168.74.1。

VMware三种网络配置方式

标签:

原文地址:http://www.cnblogs.com/rcpalc/p/4497047.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!