My vm's don't communicate directly

1

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?

Vincent L.

Posted 2020-02-17T09:48:30.323

Reputation: 11

Answers

0

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...

Vincent L.

Posted 2020-02-17T09:48:30.323

Reputation: 11

Self-answered post, I suggest to take care more than usual. – peterh - Reinstate Monica – 2020-02-18T20:11:16.960

0

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.

harrymc

Posted 2020-02-17T09:48:30.323

Reputation: 306 093

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. – 2020-02-17T10:58:51.547

Yes, if the VMs don't need internet access. – harrymc – 2020-02-17T11:00:25.733

Erf... VMs need internet acces. I never test MacVTap... You know if MacVTap (bridge mode) solve my problem? – Vincent L. – 2020-02-17T11:03:31.533

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 – 2020-02-17T11:06:37.743

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. – 2020-02-17T11:15:17.513

Are there other tools to do what I want? – Vincent L. – 2020-02-17T11:21:44.703

The VM needs to have two network interfaces, one to the network adapter that allows internet access, and a second one that is Host-Only for fast communication. You may find many many tutorials on internet for this setup, including about the required routing tables for your operating system. The subject is a bit too large to cover here in an answer. I suggest starting from my above link and studying the utilities that are used in the article. – harrymc – 2020-02-17T11:26:23.493

Thanks a lot for your answers. You confirm what I feared ... I read a lot on MacVTap mode bridge ... It will be the same problem or I dream? – Vincent L. – 2020-02-17T11:34:12.123

I don't know the Mac, but rest assured that you will encounter entirely different problems on Linux ... – harrymc – 2020-02-17T11:37:56.830

Thank you very much for your response. Have a nice day!! – Vincent L. – 2020-02-17T11:48:36.377

i find solution =) see comment ;) – Vincent L. – 2020-02-18T18:53:00.427