In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
How to configure Virtualbox bridging network in Ubuntu, in view of this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and easy way.
1. On Debian-and Ubuntu-based systems, the first step is to install uml-utilities, a tool for building virtual network devices (TAP interfaces), and bridge-utils, a bridge tool:
Sudo apt-get install uml-utilities
Sudo apt-get install bridge-utils
In order for your virtual machine to access the network interface, you must add the user name of the user running the virtual host (usually your ubuntu login user name) to the uml-net user group (replace the "vboxuser" with your user name):
Sudo gpasswd-a vboxuser uml-net
Note: in order for the changes to take effect, please restart your computer.
two。 Describe the virtual network device you want to add to your Debian or ubuntu operating system and edit / etc/network/interfaces:
Sudo vim / etc/network/interfaces
Add the following after the open file, name the virtual network interface "tap0", specify that the interface IP configuration method is manual, and specify the user who uses the interface (please replace the "vboxuser" with your user name):
Auto tap0
Iface tap0 inet manual
Up ifconfig $IFACE 0.0.0.0 up
Down ifconfig $IFACE down
Tunctl_user vboxuser
3. * use the virtual network interface and network bridge you just established to activate:
Sudo / sbin/ifup tap0
Sudo / sbin/ifup br0
This step only needs to be done once, and the interface and bridge will be activated automatically the next time the host restarts.
4. You also need to add the following to / etc/network/interfaces to create a bridge called "br0". The IP configuration of the bridge is configured through DHCP. All network interfaces in the host, including the virtual network interface tap0, will be built on this bridge:
Auto br0
Iface br0 inet dhcp
Bridge_ports all tap0
Here you can make changes according to your network condition, and you can make the network bridge use static IP:
Iface br0 inet static
Address 192.168.1.2
Netmask 255.255.255.0
Network 192.168.1.0
Broadcast 192.168.1.255
Gateway 192.168.1.1
5. Let virtualbox use this virtual network interface, start virtualbox, select the virtual machine that you want to use the virtual network interface just established on the main interface, click "Settings", select "Network" in the pop-up window, select one of the network cards (usually "Network Adapter 0"), select "enable Network Adapter", select "Host Interface" after "Connect to", and select "access Network Cable". Then in the "host network interface name", fill in the name of the virtual network interface you just established, "tap0", and confirm. Similarly, you can use VBoxManage's command line tool (change "My VM" to your virtual machine name):
VBoxManage modifyvm "My VM"-hostifdev1 tap0\
* configure the network of the host and the virtual machine so that the host and the virtual machine are on the same network segment, so that the host and the virtual machine become two machines with the same status in the LAN and can access each other.
This is the answer to the question about how to configure Virtualbox bridging network in Ubuntu. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel to learn more about it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.