Install virtualbox virtual Windows XP in Ubuntu and set the bridge network connection to access IPv6

Source: Internet
Author: User

Because ubuntu10.04 is installed, some things on Windows cannot be used, and you do not want to install dual systems, so you have installed Windows XP with virtualbox Virtual Machine Software. after the installation, I found that the Network could not be connected. I first set the network adapter to the NAT mode and wanted to share the host Nic. Then I found some articles on the Internet and finally solved the problem, an error occurred while selecting the NIC.

If you want to set the NIC to the NAT mode, you should set the NIC to pcnet-fast III in advanced so that Windows XP can access the Internet.

 

However, although I can access the Internet, I cannot access ipv6.ubuntu because I can access IPv6. after finding some information, I found that the original Nat mode only supports IPv4 and does not support IPv6, you can access IPv6. The advantage of setting it to bridge is that external hosts can directly access the guest system.

 

So I went to the Internet to find information. There are two ways to set the Bridge Mode on the Internet.

One method is:
1. Install UML-utilities and bridge-utils, which contain tunctl and brctl commands respectively.
Apt-Get install UML-utilities bridge-utils
2. generate a new TAP Interface
Tunctl-T tap1-u Username
Here is the user name of the user who wants to start virtualbox using bridge networking
3. Generate a bridge called br0
Brctl addbr br0
4. Set your real Nic to promiscuous mode so that it can receive frames sent to other MAC addresses.
Ifconfig eth0 0.0.0.0 promisc
5. Add your real Nic to the end of bridge br0
Brctl addif br0 eth0
6. Configure your real Nic to br0. For example, my eth0 IP address is 192.168.168.60.
Ifconfig br0 192.168.168.60
If you configure it through DHCP, run dhclient br0.
7. Add the above-generated tap interface to the other end of bridge br0
Brctl addif br0 tap1
8. Activate tap
Ifconfig tap1 up
9. Set the read and write permissions for/dev/NET/tun.
Chmod 0666/dev/NET/TUN

After completing the preceding steps, set the network connection method of your guest system to "bridge adapter" and select br0.0.
Start the guest system to access IPv6.

 

One method is as follows:

1. Download several software packages
Sudo apt-Get install UML-utilities bridge-utils
2. Create a new file named tap. SH and copy the following content to it.
Sudo tunctl-T tap0-u username # create a tap device named tap0 and its owner is Username
Sudo brctl addbr br0 # create a bridge
Sudo ifconfig eth0 0.0.0.0 promisc # enable eth0 to enter promiscuous mode
Sudo brctl addif br0 eth0 # Add eth0 to br0
# Sudo ifconfig br0 192.168.1.12 up # If you want to use a fixed IP address, you can remove the one before the command #
# Sudo route del default
# Sudo route add default GW 192.168.1.149 Dev br0
Sudo ifconfig br0 up # DHCP mode. DHCP mode is used in this method.
Sudo dhclient br0
Sudo brctl addif br0 tap0 # Add tap0 to br0
Sudo ifconfig tap0 up # activate tap0
Sudo chmod A + RW/dev/NET/TUN
3. Set permissions
Chmod U + x tap. Sh
4. Copy tap. Sh to/home/username/. vritualbox
5. Add a startup Item
Sudo gedit/etc/rc. Local
Add/home/username/. virtualbox/TAP. Sh before exit 0.
6. In the network tag of VM setting in virtualbox, set the connection mode to "bridge adapter", and select tap0.
7. Restart or manually run tap. Sh.

 

Finally, set the NIC to pcnet-pci ii in advanced.

Both methods are similar. One is to manually set commands, and the other is to set files for the purpose.

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.