I am French: sorry for my English.

I have a server with several virtual machines with failover IP (OVH).

Everything works fine, well, almost ...

My machines are connected in bridge:

  • bridge name bridge id STP enabled interfaces
  • xenbr0 8000.4c72b9d2cdd1 yes ENO1
  • vnet0
  • vnet1
  • vnet2

But the problem is: when my VM1 "talks" with my "VM2", the traffic goes through an external switch ... So I have a limited bandwidth ...

How can I make my virtual machines communicate directly without going through the external switch?

Is it possible? Is there an option?


You don't have to connect the external network interface to the bridge. This will create a Host-Only network that will not go through the network adapter, but via the local host.

This will mean that the VMs will not have access to the internet. Should you wish such access, you may connect them to two bridges, Host-Only and NAT, and add appropriate rules to their routing tables.

For details see the article KVM Networking - NAT & Host-Only.

| improve this answer | |
  • Thank you for your reply. In the link you give me (KVM Networking - NAT & Host-Only.), There is the type of network: bridged. Can't we do with this? My server behaves here as if I was using MacVTap with VEPA mode. I would prefer to keep only one interface for each VM. It's possible? – Vincent L. Feb 17 at 10:58
  • Yes, if the VMs don't need internet access. – harrymc Feb 17 at 11:00
  • Erf... VMs need internet acces. I never test MacVTap... You know if MacVTap (bridge mode) solve my problem? – Vincent L. Feb 17 at 11:03
  • You don't have too many options: (1) Interface that goes through the network adapter, (2) Host-only, (3) Both connected to same VM. – harrymc Feb 17 at 11:06
  • My vm must keep the public ip but if my vm wishes to speak with another vm, my vm must not go outside to come back ... It must be transparent for my vm ... Is it compatible with Host-Only and NAT? Sorry I have poor knowledge in network-bridge ... – Vincent L. Feb 17 at 11:15

OK i found answer... Problem is : gateway... 4days of research for that...

my vms used the gateway of the switch so they go out....

Modify my gateway (to my host) and enabling forwarding of the host solve my problem...

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.