Install and configure dual-nic in the XenServer Virtual Machine

Source: Internet
Author: User

Install and configure dual-nic in the XenServer Virtual Machine

When installing OpenStack, my network node is configured with only one nic, so whenConfigure the Open vSwitch (OVS) ServiceAfter running the command

# service openvswitch-switch restart# ovs-vsctl add-br br-ex# ovs-vsctl add-port br-ex eth0

Then, I will not be able to access it through the external IP address on eth0, and the Management IP address will not be accessible. Therefore, the official document requires the network node to have three NICs.

There is no way. I can only create one vm to install the network. This process still encountered problems.

Because my XenServer has two NICs, I created two virtual NICs and mapped them to the two NICs respectively. After the vm is started, I configure the network as follows:

# The primary network interfaceauto eth0iface eth0 inet staticaddress 192.168.234.205netmask 255.255.255.0gateway 192.168.234.1#management interfaceauto eth1iface eth1 inet staticaddress 10.0.0.21netmask 255.255.255.0#gateway 10.0.0.1#Instance tunnels interface.auto eth1:1iface eth1:1 inet staticaddress 10.0.1.21netmask 255.255.255.0

That is, set the Internet IP address on eth0 and the management IP address and tunnels IP address on eth1. However, I found that I could not access the vm through the management on eth1. After a long time, I realized that Nic 2 on XenServer should not be plugged in. This reminds me that if there are two NICs on the host, you must be sure to work.

If you know the problem, you can solve it. If the two virtual network cards are mapped to the same physical network card, the problem will be solved.

Of course, after running the above command, you still cannot access it through the IP address on eth0. This post describes the solution, that is, clearing the IP address of eth0, bind the Internet IP address to the br-ex.

ifconfig eth0 0.0.0.0 ifconfig br-ex 192.168.234.205

You will ask, How can I perform this operation if I cannot connect to this virtual machine?

Of course, the IP address of the management segment of the network node is used for this purpose ,:).

 

This article permanently updates the link address:

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.