0

I have 3 VMs running on Xen hypervisor with Ubuntu 14 DomU.I want to configure my network in such a way that traffic to and from Vm1 goes out via eth1, vm2 via eth2 and so on.

For this i need to use OVS. I had a few questions regarding that:

  1. When setting up Xen, i created a bridge named xenbr0 connect to only eth0. Now when I am connecting eth1 to the network, ip link command shows that eth1 is not UP. Does not been that ethX port has to always to connected to xenbr0 for it to be up ?

  2. As ethX is not up, I don't have an IP address for my physical interfaces. But even if i somehow manage to bring it up, it won't be have same IP all the time because I don't have a static IP to allocate to it. So each time I will get a separate IP for my physical ports. How can I make sure that my OVS bridge always routes the traffic to correct VM. Can i use ethX mac address in some way ?

  3. How do i create this configuration, where each VM behaves like a completely independent system with its own physical port.

  • Why bother with complicated networking? If each VM is always to have the same NIC, then just [pass it through](https://wiki.xen.org/wiki/Xen_PCI_Passthrough). – Michael Hampton Oct 23 '16 at 20:01

1 Answers1

0

You need to create three bridges in your setup, one for each outgoing interface. Then you use each each bridge in the corresponding VM configuration for the network setup.

  1. If ip link shows that an interface is not up, it means that either the cable is not connected anywhere or that the switch port on the other end of the cable is closed. You need to ask your provider about this.

  2. If you have dynamic IP addresses allocated with DHCP, then you simply need to enable DHCP on your virtual machines. Since the VM interface is always bound to a specific host Ethernet interface, the traffic will always go to the proper VM.

  3. You need to have the networking mode for each VM set to bridged, and then put the bridge interface to the configuration.

Tero Kilkanen
  • 36,796
  • 3
  • 41
  • 63