Configure both host-only and bridge in Virtual Box

Source: Internet
Author: User

The virtual machine has not been used for a long time. Previously, Windows 7 and Ubuntu10.10 were used. However, it is not convenient to switch back and forth the system after graduation. In addition, the notebook memory is upgraded to 8 GB two days ago. There are a lot of reasons. I forgot how to configure the network. I flipped through my previous logs and posted some information on the Internet. 1. The process of configuring and installing the software on host-only is very simple, so you can continue the next step. After installation, the System Network Management Department Branch displays a virtual network card. By default, the Vitual Box network mode is host-only. When installing the CentOS system, select manual network configuration (Mannal) and IP Address: 192.168.0.x (x: select a number between 2 and. I usually select 88, which is auspicious ). Subnet Mask: 255. 255.255.0 Default Gateway: 192.168.0.1. DNS is optional. After the www.2cto.com system is installed, you need to set the host machine, that is, the Windows system. Open Control Panel-> network and sharing center-> change network adapter settings, right-click Local Connection-> properties-> share. Click OK for configuration. At this time, the system will prompt something, just click OK. Next, right-click "VirtualBox Host-Only Ethernet Adapter"-> properties-> IPV4 settings as follows: in this way, communication between the Host and the virtual terminal can be realized. You can use tools such as Putty. The second problem is that virtual machines need to connect directly to the Internet, such as updating some rpm packages. 2. Add a virtual network card and select the Virtual Machine in VitualBox to enable network settings. The first Nic is Host-Only. Click Adapter2. The configuration: Name may be slightly different. This is mainly because your machine's Nic may be different from mine. This may not be enough. You may still be inaccessible if you ping google on the VM. You need to configure the DNS of the NIC of the virtual machine. Www.2cto.com we ifconfig, look at the network configuration: eth1 is the added bridge virtual network card, set DNS: vim/etc/sysconfig/network-scripts/ifcfg-eth1 to add a line: GATEWAY = 192.168.1.1 restart the network. Author wawlian

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.