Search code examples
network-programmingvlan

Can VMs from different subnets communicate through VXLAN?


I am trying to understand VXLAN functionalities. All cases related to VM communication through VXLAN that I can find on Google are related to the interconnection of VMs on the same subnet.

My case study would be 2 hosts, each one hosting 1 VM. VM1 on host1 has IP is 10.200.1.2/24, and VM2 on host2 has IP is 10.200.2.2/24 Can I make the two VMs communicate through a VXLAN?


Solution

  • VXLAN is layer-2 tunneling across IP featuring virtually unlimited subtunnels (VLANs).

    If you want to connect two nodes (virtual or physical) in different subnets you use a router. If you can't route them directly (e.g. private IP addresses across public IP network) you use layer-3 tunneling or VPN.

    With both end nodes in different subnets there's no point using VXLAN.