Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1614478
  • 博文数量: 441
  • 博客积分: 20087
  • 博客等级: 上将
  • 技术积分: 3562
  • 用 户 组: 普通用户
  • 注册时间: 2006-06-19 15:35
文章分类

全部博文(441)

文章存档

2014年(1)

2012年(1)

2011年(8)

2010年(16)

2009年(15)

2008年(152)

2007年(178)

2006年(70)

分类: LINUX

2008-07-17 17:50:13

在windows xp下用virtualbox安装ubuntu8.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.
VBOXVM主机载入后,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里其他计算机的网络连接就建立了。

 



阅读(4229) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~