This tutorial show you how to create vxlan Network with L2 Connectivity between VMs (Compute Engine) in google cloud
Create VPC Network named vxlan-network
with custom mode
Create Subnet on vxlan-network
VPC Network
Create firewall rules to allow SSH and icmp for the VMs
Create two VM instances named vm-a
and vm-b
. (I use spot vm for this example to reduce the cost)
Setup vxlan on both VMs
-
SSH to vm-a as root user and setup vxlan
-
SSH to vm-b as root user and setup vxlan
Test ping from vm-a to vm-b and vice versa. You will get an error
Destination Host Unreachable
. This is because we still not open port to allow connectivity on vxlan.
Add firewall rules to open Overlay Transport Virtualization (OTV) and Virtual eXtensible Local Area Network (VXLAN) UDP ports
Now test ping again from vm-a to vm-b and vice versa. The ping will now success.