Ubuntu 7.04下Virtualbox安装及网络桥接

豆豆网   技术应用频道   2007年08月20日    社区交流

内容摘要:Ubuntu 7.04下Virtualbox安装及网络桥接

  4. Another entry must be added to the file /etc/network/interfaces to describe the bridge. The following sample entry creates a bridge called br0, adds to it all ethernet interfaces on the host as well as the TAP interface created above and tells it to obtain an IP address using DHCP so that the host remains able to access the network.

  auto br0

  iface br0 inet dhcp

  bridge_ports all tap0

  Again, you will probably want to change this to suit your own networking needs. In particular, you may want to assign a static IP address to the bridge, or if you are using TAP interfaces created by VirtualBox (these are described later), you will want to remove tap0 from the last line. On the host, you will find more documentation in the files

  a) /usr/share/doc/bridge-utilities/README.Debian.gz and

  b) /usr/share/doc/ifupdown/examples/network-interfaces.gz.

  5. To tell VirtualBox to use the interface, select the virtual machine which is to use it in the main window of the VirtualBox application, configure one of its network adaptors to use Host Interface Networking (using "Settings", "Network",“Attached to”) and enter “tap0” into the “Interface name” field. Alternatively, you can use the VBoxManage command line tool (in this example we are attaching the interface to the first network card of the virtual machine ("My VM"):

  VBoxManage modifyvm "My VM" -hostifdev1 tap0

责编:豆豆技术应用

正在加载评论...