注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

php开发lamp

《西安--木木》-经历丰富了生活。 架构师QQ群: 246695517

 
 
 

日志

 
 

VirtualBox中Linux和Windows建立桥接  

2013-06-21 14:48:03|  分类: linux |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

 

在Windows XP下用VirtualBox安装Ubuntu 8.04后,默认的是NAT连接方式,不需要做任何更改就可以上网,但是这种方式很不灵活,你无法像访问局域网中的其他主机一样访问Linux,为此,可以建立桥接,让你的Windows XP和Linux在网络中具有同等的地位。

具体方式步骤如下:(下面是在Ubuntu论坛上的文章设置方法)

The installation of VBox, creation of the guest and installation of Debian Etch was done in the normal fashion. Once that was completed I followed the following steps to setup networking.

以正常方式完成VBox的安装,Guest系统的创建以及Debian的安装之后,按照以下步骤来设置网络

I. Create Network Connection in VBox
1. Network;à SettingsàOpen VBox??
2. Click on “Attached to” and then select “Host Interfaces”;
3. In Host Interfaces click Add;
4. Type "VirtualBox Host Interface #" without the quotation marks where the # represents a number for the interface, usually 1 (on one computer the name of the virtual box host interface appeared automatically, on the other computer I had to type the information);
5. Click OK, and
6. Close VBox
在虚拟机中创建网络连接

1. 虚拟主机设置 -〉网络 –〉网络连接方式

2. 选择“Host Interface”

3. 在Host Interface 点击“添加”

4. 输入“VirtuakBox Host Interface #”(注:不输入引号,#号代表接口的数字,通常为1)

5. 点击OK

6. 关闭虚拟主机设置

II. Create a Network Bridge
Network Connections;à1. Open Control Panel
2. While holding down Ctrl select the Local Area connection and click on the VirtualBox Host Interface;
3. Right click on one of the selected connections; and
4. From the drop-down menu select Create Network Bridge
II.创建一个网桥

1. 打开控制面板-〉网络连接

2. 按下“Ctrl”键的同时选择“本地连接”和“VirtualBox Host Interface”

3. 在其中一个选择的连接上,点右键

4. 从下拉菜单里选择,创建网桥

Since I am using static IP’s on my network set up I had to configure the TCP/IP properties for the Network Bridge.
注:由于我的网络使用的是静态IP设置,因此必须配置网桥的TCP/IP属性
5. Right click on the Network Bridge that was just created;
6. Select TCP/IP;
7. Click on Properties;
8. Set the Static Connection Values; and
9. Close Network Connection.

5. 在刚刚创建的网桥上右击,选择属性

6. 选择TCP/IP

7. 点击属性

8. 设置静态IP地址的值

9. 关闭网络连接

III. Set Network Adapters to promiscuous mode
III.设置网卡为混杂模式
When VBox and the guest VM load Windows XP should put the network adapters into promiscuous mode, but sometimes this does not happen. Therefore, I think it is best to force the adapters into promiscuous mode. It is only necessary to do this once.
当VBOX和VM主机载入后,XP应该自动使网卡处于混杂模式,但有时候并未实现。因此,最好手工强制网卡处于混杂模式。只需按以下步骤操作。

1. Open a Run and type "CMD" without the quotes and pressàWindows command prompt (Start ENTER;

2. Type "netsh bridge show adapter";

3. There will be a line of information displayed for each network adapter in the Bridge. Look for any adapter that is listed as disabled, note the number of the adapter and go to step four.

4. Type "netsh bridge set adapter # forcecompatmode=enable" for each adapter that was listed as disabled, inserting the number of the adapter for the #;

5. Type "netsh bridge show adapter" once again to check to see if your adapters have been enabled;

6. Exit the command prompt; and

7. Reboot the computer.

1. 开始 –〉运行 –〉输入”CMD”

2. 输入“netsh bridge show adapter”

3. 网桥中的每张网卡会有一行信息显示。注意显示为“未应用”的每张网卡,记下网卡的数值然后看第4步

4. 输入“netsh bridge set adapter # forcecompatmode=enable”为每张显示为未应用的网卡,输入相应的网卡号,并运行一遍命令

III. Configure the TCP/IP Properties for the Debian guest

为VM客户机操作系统配置TCP/IP属性
Again, this is necessary because I am using static IP's in my LAN.
同样,这是必须的,应为我的LAN使用静态IP

1. Open VBox;

2. Start Debian;

3. Since I have installed GNOME Networking;àAdministrationàdesktop I will open Networking by clicking Desktop

4. Select Ethernet Connection eth0;

5. Click on Properties;

6. Set the static configuration for the Debian VM;

7. Close Networking; and

8. Reboot Debian.

1. 打开虚拟机

2. 启动Debian

3. 由于我安装可Gnome,我将通过桌面打开网络

4. 选择网络连接eth0

5. 点击属性

6. 设置静态IP地址

7. 关闭网络

8. 重起Debian

After Debian has rebooted LAN connections with the host and any other computers

on the network should have been established.

Debian重起之后,虚拟主机与LAN里其他计算机的网络连接就建立了。


  评论这张
 
阅读(1005)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017