[Xen] xen4.1 use xend to configure the bridging Network

Source: Internet
Author: User

There are a lot of online materials. Here I am writing a purely personal lesson... I am suffering a day, shit!

At first, I tried to use the new XL tool stack to configure Bridging networks. As a result, due to lack of experience in network management, after manual bridging, dom0 would not be able to access the network! Later, I tried to use the NAT method. As a result, although dom0 is not affected, domu cannot work, static IP allocation, and Mac won't work...

Helpless, return xend, it will automatically configure the bridge network, At the beginning I thought XL will execute/etc/xen/xend-config.sxp configuration file, in fact not, only xend will use it, mistakes, mistakes...

After xend is started, it will generate a bridge. You can use the brctl show command to see:

 

Bridge name bridge id stp enabled Interfaces

Eth0 8000.78acc0af8a27 no peth0

In addition, the real Nic is named peth0, and the virtual Nic of dom0 is named eth0,

 

Add the following line to the virtual machine configuration file:

VIF = ['Type = ioemu, MAC = 00: C0: 9f: 78: 35: A7, bridge = eth0']

Mac can certainly not be set, but I need to bind the IP address to the Mac here, not to configure a real Mac...

Start the virtual machine. I use Ubuntu 10.04. In the virtual machine, ifconfig is used to view the virtual network card. Because no Mac is allocated at the beginning, the name of the system virtual network card is changing every time I enter the system, the NIC name in my VM is eth14, so it is recommended to assign a fake mac to prevent ETH rename...

In this case, if you view the NIC configuration in dom0, you can see two new interfaces: tap5.0 and vif5.0,It should be the backend driver, but it is not clear for the moment, 5 refers to domid, 0 refers to the number of virtual NICs in the domain, and the frontend and backend correspond one to one. At the same time, you can see that tap5.0 and vif5.0 are displayed under the interfaces column (Prove that the bridge is successful?)

Enable/etc/Network/interfaces in domu to configure IP, enable/etc/resolv. conf to configure DNS, and then sudo IFUP eth14

I can access the Internet at last...

 

Let's take a look at this article. This article and this article are very good. In the beginning, I thought virbr0 provided by qemu was a bridge, but it was actually a NAT + DHCP method. The second article is very clear. I suggest you take a look at it...

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.